bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

stdalign.h __alignas_is_defined not defined for C++


From: Sundaram
Subject: stdalign.h __alignas_is_defined not defined for C++
Date: Mon, 3 Aug 2015 01:46:39 +0000 (UTC)

Hi
As per C11 standard, stdalign.h has to have two convenience macros alignas and alignof to expand to the keywords _Alignas and _Alignof respectively. Whereas, C++14 mandates alignas and alignof as keywords directly; no macros here.

I see the two macros alignas and alignof defined as _Alignas and _Alignof, wrapped within #ifndef __cplusplus, which makes sense. However, both language standards require that the macros __alignas_is_defined and __alignof_is_defined are to be defined to 1, if the above keywords are supported by the implementation. But I see that these two macros are also under the #ifndef __cplusplus's body, thereby letting them undefined for C++. Although the GNU C++ compiler supports both these keywords, due to this, the macros continue to be undefined under C++.

clang's stdalign.h (http://clang.llvm.org/doxygen/stdalign_8h_source.html) doesn't have this issue; the last two macros are not wrapped under any if clause.

Here're the specs:
32-bit GCC version 5.1.1 on Linux
32-bit MinGW version 5.1.0 on Win 8

Using built-in specs.
COLLECT_GCC=C:\mingw32\bin\g++.exe
COLLECT_LTO_WRAPPER=C:/mingw32/bin/../libexec/gcc/i686-w64-mingw32/5.1.0/lto-wrapper.exe
Target: i686-w64-mingw32
Configured with: ../../../src/gcc-5.1.0/configure --host=i686-w64-mingw32 --build=i686-w64-mingw32 --target=i686-w64-mingw32 --prefix=/mingw32 --with-sysroot=/c/mingw510/i686-510-posix-dwarf-rt_v4-rev0/mingw32 --with-gxx-include-dir=/mingw32/i686-w64-mingw32/include/c++ --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,objc,obj-c++,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --disable-sjlj-exceptions --with-dwarf2 --disable-isl-version-check --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=i686 --with-tune=generic --with-libiconv --with-system-zlib --with-gmp=/c/mingw510/prerequisites/i686-w64-mingw32-static --with-mpfr=/c/mingw510/prerequisites/i686-w64-mingw32-static --with-mpc=/c/mingw510/prerequisites/i686-w64-mingw32-static --with-isl=/c/mingw510/prerequisites/i686-w64-mingw32-static --with-pkgversion='i686-posix-dwarf-rev0, Built by MinGW-W64 project' --with-bugurl=http://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -I/c/mingw510/i686-510-posix-dwarf-rt_v4-rev0/mingw32/opt/include -I/c/mingw510/prerequisites/i686-zlib-static/include -I/c/mingw510/prerequisites/i686-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -I/c/mingw510/i686-510-posix-dwarf-rt_v4-rev0/mingw32/opt/include -I/c/mingw510/prerequisites/i686-zlib-static/include -I/c/mingw510/prerequisites/i686-w64-mingw32-static/include' CPPFLAGS= LDFLAGS='-pipe -L/c/mingw510/i686-510-posix-dwarf-rt_v4-rev0/mingw32/opt/lib -L/c/mingw510/prerequisites/i686-zlib-static/lib -L/c/mingw510/prerequisites/i686-w64-mingw32-static/lib -Wl,--large-address-aware'
Thread model: posix
gcc version 5.1.0 (i686-posix-dwarf-rev0, Built by MinGW-W64 project)

Thanks
Sundaram


reply via email to

[Prev in Thread] Current Thread [Next in Thread]