Date: Sun, 20 Dec 2015 00:33:15 -0800 From: Mark Millard <markmi@dsl-only.net> To: Andreas Tobler <andreast-list@fgznet.ch>, Konstantin Belousov <kostikbel@gmail.com> Cc: FreeBSD PowerPC ML <freebsd-ppc@freebsd.org> Subject: bug 205453: another buildworld failure that shows up for powerpc64 lib32 contexts Message-ID: <4E5F2AD9-180D-4800-98D7-774F40808FB6@dsl-only.net> In-Reply-To: <5671D5DD.9090808@fgznet.ch> References: <894D2513-6DE7-4E31-87A5-0529ECDF336C@dsl-only.net> <20151215123640.GG3625@kib.kiev.ua> <5671D5DD.9090808@fgznet.ch>
next in thread | previous in thread | raw e-mail | index | archive | help
I have submitted bug 205453: another buildworld failure that shows up = for powerpc64 lib32 contexts. But in this case I submitted against the Base System for sys/cdefs.h = and/or libcxxrt/guard.cc problems in using/handling C11's = _Static_assert. You may want to look and see if you expect it should instead be = attributed to the various g++ compilers (g++49, g++5, = powerpc64-portbld-freebsd11.0-g++, . . .). A simple 6 line program = source shows the g++ syntax error issue with a direct use of = _Static_assert. (See the bug.) As I understand C++ the rejections are = valid/allowed. gcc49, gcc5, powerpc64-portbld-freebsd11.0-gcc, . . . accept the same = C11 _Static_assert notation fine when compiling the same source file = content as C code. clang++ (3.7) accepts the C11 _Static_assert syntax = in C++ compiles. But: # clang++ -Wall -pedantic main.cc main.cc:2:1: warning: _Static_assert is a C11-specific feature = [-Wc11-extensions] _Static_assert(1,"Test"); ^ 1 warning generated. In the buildworld case the reason for lib32's -m32 compiles being = involved is #if/#elif/. . . structure for = non-__arm__/non-_LP64/non-__LITTLE_ENDIAN__ contexts being the only ones = to attempt to use C11's _Static_assert in libcxxrt/guard.cc's C++ source = code: #ifdef __arm__ . . . #elif defined(_LP64) . . . #else typedef uint32_t guard_lock_t; # if defined(__LITTLE_ENDIAN__) . . . # else typedef struct { uint32_t init_half; uint32_t lock_half; } guard_t; _Static_assert(sizeof(guard_t) =3D=3D sizeof(uint64_t), ""); . . . # endif . . . #endif =3D=3D=3D Mark Millard markmi at dsl-only.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E5F2AD9-180D-4800-98D7-774F40808FB6>