[Bug pch/45441] New: PCH: invalid file in error messages
gavv dot ml at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sun Aug 29 09:01:00 GMT 2010
Hello.
$ cat 1.h
void f();
$ cat 2.h
# include "1.h"
$ cat 1.c
#include "2.h"
int main()
{
a = b;
}
$ gcc 1.c
1.c: In function 'int main()':
1.c:5: error: 'a' was not declared in this scope
1.c:5: error: 'b' was not declared in this scope
But:
$ g++ 1.h
$ ls
1.c 1.h 1.h.gch 2.h
$ gcc 1.c
2.h: In function 'int main()':
2.h:5: error: 'a' was not declared in this scope
2.h:5: error: 'b' was not declared in this scope
Now error is located in "2.h" instead of "1.c". If "1.c" includes "1.h"
directly (not through "2.h") everything is ok.
--
Summary: PCH: invalid file in error messages
Product: gcc
Version: 4.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: pch
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gavv dot ml at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45441
More information about the Gcc-bugs
mailing list