This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Usage of sizeof in testsuite/g++.dg/cpp0x/rv[1..8]p.C


Uros Bizjak <ubizjak@gmail.com> writes:

> 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;" ?

Sounds fine to me.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]