[Bug 444188] New: gcc: wrong file/ line reference for error messages when using precompiled headers
https://bugzilla.novell.com/show_bug.cgi?id=444188 User Viatcheslav.Sysoltsev@h-d-gmbh.de added comment https://bugzilla.novell.com/show_bug.cgi?id=444188#c1 Summary: gcc: wrong file/line reference for error messages when using precompiled headers Product: openSUSE 11.0 Version: Final Platform: i586 OS/Version: openSUSE 11.0 Status: NEW Severity: Major Priority: P5 - None Component: Development AssignedTo: pth@novell.com ReportedBy: Viatcheslav.Sysoltsev@h-d-gmbh.de QAContact: qa@suse.de Found By: --- I've noticed that gcc emits wrong file/line reference in error/warning messages when precompiled header is used in compilation. The example: precompiled header pch.h: typedef unsigned int aaaa; labeling.h: #pragma once #include "pch.h" struct SomeStruct { }; labeling.cpp: #include "labeling.h" error here compile precompiled header with: g++ -g -O2 -c -x c++-header pch.h The compiling the labeling.cpp with: g++ -g -O2 labeling.cpp I get: In file included from pch.h:1: labeling.h:6: error: ‘error’ does not name a type The correct error message should be [which you get if precompiled header is removed]: labeling.cpp:3: error: ‘error’ does not name a type The gcc used is [gcc -v]: Using built-in specs. Target: i586-suse-linux Configured with: ../configure --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib --libexecdir=/usr/lib --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.3 --enable-ssp --disable-libssp --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --with-slibdir=/lib --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --program-suffix=-4.3 --enable-version-specific-runtime-libs --enable-linux-futex --without-system-libunwind --with-cpu=generic --build=i586-suse-linux Thread model: posix gcc version 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036] (SUSE Linux) uname -a: Linux muc-lap-002 2.6.25.18-0.2-default #1 SMP 2008-10-21 16:30:26 +0200 i686 i686 i386 GNU/Linux The severity is major because the warning/error diagnostics renders useless in presence of precompiled headers, which forces to disable precompiled headers in development process thus increasing compile time severely for the project. I attach once more the source and command to reproduce the problem in archive gcc_pch_wrong_file_line_diagnostics.tgz -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=444188
User Viatcheslav.Sysoltsev@h-d-gmbh.de added comment
https://bugzilla.novell.com/show_bug.cgi?id=444188#c1
--- Comment #1 from Viatcheslav Sysoltsev
https://bugzilla.novell.com/show_bug.cgi?id=444188
Cristian Rodríguez
https://bugzilla.novell.com/show_bug.cgi?id=444188
Richard Guenther
https://bugzilla.novell.com/show_bug.cgi?id=444188
User matz@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=444188#c2
Michael Matz
participants (1)
-
bugzilla_noreply@novell.com