https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431

Hamlet <_hamlet at libero dot it> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |_hamlet at libero dot it

--- Comment #29 from Hamlet <_hamlet at libero dot it> ---
For what it's worth, I confirm this (and bug 70888) with gcc 6.3.0 from
Gentoo/Linux.
In particular, the following program ("test.cpp"):

    #pragma GCC diagnostic ignored "-Wlong-long"
    const unsigned long long int ticks_per_day = 86400000000LL;

compiled with `g++-6.3.0 -c -std=c++03 -pedantic -Werror test.cpp` (C++03
standard) issues an error:

    test.cpp:2:46: error: use of C++11 long long integer constant
[-Werror=long-long]
     const unsigned long long int ticks_per_day = 86400000000LL;
                                              ^~~~~~~~~~~~~

about the long long literal value, while it correctly suppresses the one about
the variable itself. Skipping the preprocessor (`-fpreprocessed`) does not
affect the outcome (the preprocessor correctly leaves the `#pragma` directive
untouched anyway). 
Using `-Wno-long-long` in the command line instead works as expected (but it's
not a viable solution when dealing with third party libraries).


Info on GCC:

Using built-in specs.
COLLECT_GCC=gcc-6.3.0
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/6.3.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-6.3.0/work/gcc-6.3.0/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/6.3.0
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/6.3.0
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/6.3.0/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/6.3.0/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/include/g++-v6
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/6.3.0/python
--enable-languages=c,c++,java,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--enable-checking=release --with-bugurl=https://bugs.gentoo.org/
--with-pkgversion='Gentoo 6.3.0 p1.0' --disable-esp --enable-libstdcxx-time
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64
--disable-altivec --disable-fixed-point --enable-targets=all --enable-libgomp
--disable-libmudflap --disable-libssp --disable-libcilkrts --disable-libmpx
--enable-vtable-verify --enable-libvtv --enable-lto --without-isl
--enable-libsanitizer --disable-default-pie --disable-default-ssp
Thread model: posix
gcc version 6.3.0 (Gentoo 6.3.0 p1.0)

Reply via email to