This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Usage of sizeof in testsuite/g++.dg/cpp0x/rv[1..8]p.C
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: GCC Development <gcc at gcc dot gnu dot org>
- Date: Tue, 10 Aug 2010 15:05:44 +0200
- Subject: Usage of sizeof in testsuite/g++.dg/cpp0x/rv[1..8]p.C
Hello!
A problem arises with the code in testsuite/g++.dg/cpp0x/rv[1..8]p.C.
These tests use "sizeof(..character array...) == <n>", but sizeof char
array depends heavily on the value of #define STRUCTURE_SIZE_BOUNDARY.
Targets that define this value to i.e. 32 (for performance reasons,
instead of default BITS_PER_UNIT) will fail all these checks.
Would it be acceptable to change all these checks from
"sa<sizeof(foo(a)) == 1> t1;"
to
"sa<sizeof(foo(a)) != 0> t1;" ?
Uros.