Errata for SuperTest Rembrandt Release Update 3

Errata for SuperTest Rembrandt Update 3

  • [20150203] The C99 test:
    • suite/C99/7/23/1/t1.c

mistakingly assumes that the CLOCKS_PER_SEC value can be stored in an int. Instead, the standard only guarantees that CLOCKS_PER_SEC is of an arithmetic type.
As a consequence, the test may incorrectly fail if the type of CLOCKS_PER_SEC is bigger than an int on the current platform.
Recommended action: Skip this test if CLOCKS_PER_SEC does not fit in an int. Optionally, the incorrect part of the test may also be replaced by:

        /* Macro CLOCKS_PER_SEC: ticks per second. */
        CVAL_ACTION ("CLOCKS_PER_SEC is positive if there is a clock");
        if (clock() != (clock_t)(-1)) {
                CVAL_VERIFY (CLOCKS_PER_SEC > 0);
        }
  • [20150226] The C++ tests:
    • suite/iso14882/14/6/t-6-07.C
    • suite/iso14882/14/6/t-6-16.C

will fail on big-endian targets because they make too many assumptions about union layout.
As a consequence, these tests may fail at run-time when actually there is no error.
Recommended action: Skip these tests on big-endian targets.

  • [20150226] The C++ tests:
    • suite/iso14882/25/1/6/t01.C
    • suite/iso14882/25/1/6/t02.C
    • suite/iso14882/25/2/11/t02.C

incorrectly use std::vector<A>::iterator::difference_type, where they should use std::vector<A>::difference_type instead.
As a consequence, these tests may fail while they should not.
Recommended action: Skip these tests if they fail.
Optionally modify the test to use the correct difference_type.

  • [20150313] The C test:
    • suite/3/5/3/tl15941.c

has an empty message in its CVAL_HEADER().
As a consequence, a diagnostic message marked with CHECK! can be found in the log-files. There is no other impact on SuperTest validation runs.
Recommended action: For this test ignore the diagnostic marked CHECK! in the log-files.

  • [20150316] The C++ test:
    • suite/iso14882/26/5/t81.C

has a superfluous CVAL_ENDSECTION().
As a consequence, a diagnostic message marked with CHECK! can be found in the log-files. There is no other impact on SuperTest validation runs.
Recommended action: For this test ignore the diagnostic marked CHECK! in the log-files.

  • [20150317] The argument value of the SuperTest library function do_exit() is ignored.
    As a consequence, the following tests may incorrectly report no error, when in fact an error has occurred:

    • suite/iso14882/12/5/t124-07.C
    • suite/iso14882/12/5/t124-12.C
    • suite/iso14882/12/5/t124-04.C
    • suite/iso14882/12/5/t124-08.C
    • suite/iso14882/12/5/t124-03.C
    • suite/iso14882/12/5/t124-11.C

Recommended action: None, no false errors are reported.
Optionally, to fix this error one may change the code of do_exit() in lib/report.c to:

        void
        do_exit(int x)
        {
            exitval |= x;
            cval_do_exit_output();
  • [20150323] The tests:
    • suite/Cxx11/5/1/2/t07.C
    • suite/Cxx11/5/1/2/t07.C

both define lambda functions (at global scope) with an auto-capture list ‘[=]‘, while they are not in a block-scope. Also, they do not declare a return type, while they do return an ‘int‘ value and their body does not consist of a single return statement.
As a consequence, these tests may report failure at compilation, while the compiler is in fact not at fault.
Recommended action: Skip this test if the compiler reports errors about the capture list or the type of the lambda function.
Optionally, the first line of the definition of the lambda functions may be changed to:

        const int x = [] () -> int {
  • [20150330] For the tests in the following list:
    • iso14882/26/2/1/t01.C
    • iso14882/26/2/1/t02.C
    • iso14882/26/2/1/t03.C
    • iso14882/26/2/8/t13.C
    • iso14882/26/2/8/t14.C
    • iso14882/26/2/8/t15.C
    • iso14882/26/2/8/t16.C
    • iso14882/26/2/8/t17.C
    • iso14882/26/2/8/t18.C
    • iso14882/26/2/8/t19.C
    • iso14882/26/2/8/t20.C
    • iso14882/26/2/8/t21.C
    • iso14882/26/2/8/t22.C
    • iso14882/26/2/8/t23.C
    • iso14882/26/2/8/t24.C

The std:: namespace prefix is missing for a number of uses of sqrtlogexpatansin and cos.
As a consequence: these tests will fail for implementations that have not added the functions in cmath to the global namespace, while actually the compiler is not at fault.
Recommended action: Skip the tests after verifying that the failure is due to a missing std:: prefix.
Optionally, request a tar-file with the corrected tests from Solid Sands.

  • [20150422] The C99 test:
    • suite/C99/7/12/11/1/t2.c

incorrectly assumes that the conversion from float to double preserves the sign if the operand is a negative NaN. However, in section 6.3 of ISO/IEC/IEEE FDIS 60559 it is stated that the sign bit of NaN is not interpreted, except for a few operations on bit strings.
As a consequence:  these tests may report failure at run-time, while the compiler is in fact not at fault.
Recommended action: Skip this test if the compiler reports an error in the NAN section. Optionally, modify the type of res to float to correct the test.

  • [20150422] The C++ test:
    • iso14882/26/3/2/1/t11.C

incorrectly assumes that the overloaded assignment of a slicearray accepts a const LHS object. This is not true for the 1998 standard of C++ (but is true for all later C++ standards).
As a consequence: the test may report a compile-time error, while the compiler is not at fault.
Recommended action: For improved compatibility, one is advised to change the library definition of slicearray to accept const target objects for overloaded assignment, without implications for backward compatibility. Alternatively, skip the test after it is verified that the compiler failure is due to the const property of the result value. Optionally, remove const from the definition of result to correct the test.

  • [20150728 ST-87] The C99 test:
    • C99/6/7/4/tspr5642.gen

is missing an int in the declaration of test_it. This is correct C89, but incorrect C99 (although many compilers still accept it with a warning).
As a consequence: the test may report a compile-time error, while the compiler is not at fault.
Recommended action: Ignore the test if a failure is reported for the reason mentioned above. Alternative, add the int type to the test definition.

  • [20150730 ST-90] The C test:
    • 3/1/2/3/tspr3636.c

assumes an implicit conversion of an incompatible pointer type at the first argument of the call to f(). This is incorrect according to the ISO-C specification. See “6.2.7 Compatible type sub 1”; “6.5.2.2 Function calls sub 7”; and “6.5.16.1 Simple assignment” (references to the C99 specification).
As a consequence: the test may be reported to fail because the compiler correctly refuses to compile the incorrect conversion.
Recommended action: Ignore the test if a failure is reported for the reason stated. Alternatively, add a (void *) cast to the first argument of the call.
Warning: Many compilers do incorrectly accept this type of implicit pointer conversion, albeit with a warning diagnostic. End users are recommended to use a compiler option that turns warnings into errors/failures of the compiler when compiling applications. For gcc and llvm compilers, the option -Werror will do this.

  • [20150825 ST-92, ST-96] The C tests:
    • 3/1/2/6/tspr4236.c
    • 3/3/2/2/tspr4105.c

assume implicit conversion between a structure type and an anonymous structure type that is defined in an argument list. However, these are two definitions of different structure types, hence they are not assignable. (Similar to 3/1/2/3/tspr3636.c above.)
As a consequence: the tests may be reported to fail because the compiler correctly refuses to compile the incorrect conversion.
Recommended action: Ignore the tests if a failure is reported for the reason stated.

  • [20150825 ST-94] The C99 test:
    • C99/7/20/1/3/t4.c

incorrectly passes a const qualified argument to the second argument of strtod.
As a consequence: the test may be reported to fail because the compiler correctly refuses to compile the incorrect call.
Recommended action: Ignore the test if a failure is reported. Alternatively, remove constfrom the definition of  ptr.

  • [20150825 ST-95] The C test:
    • 3/1/2/1/tspr3444.c

assumes implicit conversion between two enum types that are separately defined. However, these are two definitions of different enum types, hence they are not assignable. (Similar to 3/1/2/3/tspr3636.c above.)
As a consequence: the test may be reported to fail because the compiler correctly refuses to compile the incorrect conversion.
Recommended action: Ignore the test if a failure is reported for the reason stated.

  • [20150825 ST-100] The C++ test:
    • iso14882/18/4/1/t03.C

incorrectly includes the non-standard include file unistd.h.
As a consequence: the test may be reported to fail because the compiler correctly cannot find the non-existing include file.
Recommended action: Ignore the test if a failure is reported for the reason stated. Alternatively, remove the line with the include.

  • [20150825 ST-98] The C tests:
    • 3/5/4/2/tspr4667a.c
    • 3/5/4/2/tspr4667a.c
    • 3/5/4/2/tspr4667a.c

incorrectly use incomplete structure types as array elements. This is incorrect according to C11-6.2.5sub20, see also the first paragraph for the definition of object type (and Footnote 36 in the C99 standard).
As a consequence: the test may be reported to fail while the compiler correctly cannot compile the tests.
Recommended action: Ignore the tests if a failure is reported.