[Bug c++/65309] [Regression] Executes wrong function inside an anonymous namespace on runtime

2015-03-04 Thread s at ecloud dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65309

ecloud  changed:

   What|Removed |Added

 CC||s at ecloud dot org

--- Comment #5 from ecloud  ---
I can also reproduce this on Arch linux.

Yes it still fails if I change the Makefile to set

LINK  = g++ -fuse-ld=gold

However changing

CXX   = g++ -O2

makes it pass.

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/gcc-multilib/src/gcc-4.9-20150204/configure
--prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch
--disable-libssp --enable-gnu-unique-object --enable-linker-build-id
--enable-cloog-backend=isl --enable-lto --enable-plugin
--enable-install-libiberty --with-linker-hash-style=gnu --enable-multilib
--disable-werror --enable-checking=release
Thread model: posix
gcc version 4.9.2 20150204 (prerelease) (GCC)


[Bug c/70477] -Wtautological-compare too aggressive?

2016-06-20 Thread s at ecloud dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70477

ecloud  changed:

   What|Removed |Added

 CC||s at ecloud dot org

--- Comment #5 from ecloud  ---
>From my perspective it looks like https://bugreports.qt.io/browse/QTBUG-53373
is also a case of -Wtautological-compare being too aggressive too; but I'm not
an expert on that code, and it might turn out that someone comes up with some
solution other than disabling the warning.

If a macro exists in order to test something and generate different code
depending on the test result, then in any given use case of the macro, we can
say that the test inside the macro is a tautology, right?  But that shouldn't
mean that doing tests inside macros is bad.