[Bug c++/71517] g++ gives different warnings if compiling a file directly or adding preprocess step
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71517 --- Comment #1 from Albert Astals Cid --- The used compiler is $ g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.3.1-14ubuntu2.1' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2.1)
[Bug c++/71517] New: g++ gives different warnings if compiling a file directly or adding preprocess step
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71517 Bug ID: 71517 Summary: g++ gives different warnings if compiling a file directly or adding preprocess step Product: gcc Version: 5.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: albert.astals at canonical dot com Target Milestone: --- Compiling the file at http://paste.ubuntu.com/17091697/ I get no warnings if just using -c $ g++ -c -fPIC -Wsuggest-override -isystem /usr/include/x86_64-linux-gnu/qt5/ q.cpp $ But if i add -E step i do get warnings $ g++ -E -fPIC -Wsuggest-override -isystem /usr/include/x86_64-linux-gnu/qt5/ q.cpp > preprocess.cpp $ g++ -c -fPIC -Wsuggest-override -isystem /usr/include/x86_64-linux-gnu/qt5/ preprocess.cpp q.cpp:5:75: warning: ‘virtual const QMetaObject* Moo::metaObject() const’ can be marked override [-Wsuggest-override] q.cpp:5:109: warning: ‘virtual void* Moo::qt_metacast(const char*)’ can be marked override [-Wsuggest-override] q.cpp:5:148: warning: ‘virtual int Moo::qt_metacall(QMetaObject::Call, int, void**)’ can be marked override [-Wsuggest-override] $ Don't know if the warning should be reported in the first case or not reported in the second case but seems a bit inconsistent to have it in one case and not in the other.
[Bug c++/71517] g++ gives different warnings if compiling a file directly or adding preprocess step
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71517 --- Comment #3 from Albert Astals Cid --- Ok, i see, this is regarding ccache bug https://github.com/ccache/ccache/issues/93
[Bug c++/65309] New: [Regression] Executes wrong function inside an anonymous namespace on runtime
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65309 Bug ID: 65309 Summary: [Regression] Executes wrong function inside an anonymous namespace on runtime Product: gcc Version: 4.9.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: albert.astals at canonical dot com Created attachment 34947 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34947&action=edit tar.gz containing files to reproduce To be honest the summary is probably wrong, not much of a compiler expert myself I have this code that when compiled with gcc 4.9.2 and -g fails but works with -O2 (also works with 4.8.2 whenever the flags used) Fails when printing: a.cpp a.cpp Works if printing: a.cpp b.cpp This is affecting Qt since this is reduced test case from Qt sources $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.9/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.9.2-10ubuntu7' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.9.2 (Ubuntu 4.9.2-10ubuntu7)
[Bug c++/65309] [Regression] Executes wrong function inside an anonymous namespace on runtime
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65309 --- Comment #1 from Albert Astals Cid --- Works fine with $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.8/lto-wrapper Target: i686-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.2-19ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-i386/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-i386 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-i386 --with-arch-directory=i386 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-targets=all --enable-multiarch --disable-werror --with-arch-32=i686 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu Thread model: posix gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
[Bug c++/65309] [Regression] Executes wrong function inside an anonymous namespace on runtime
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65309 --- Comment #3 from Albert Astals Cid --- I guess i'm using the system default one, that would be $ `which ld` -V GNU ld (GNU Binutils for Ubuntu) 2.25 Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 i386linux elf_l1om elf_k1om i386pep i386pe I'm not the only one with this problem, doesn't seem to be Ubuntu specific either, see http://lists.qt-project.org/pipermail/development/2015-March/020632.html
[Bug c++/65309] [Regression] Executes wrong function inside an anonymous namespace on runtime
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65309 --- Comment #6 from Albert Astals Cid --- Same as ecloud, also fails if using gold.