[Bug preprocessor/48248] [4.5/4.6/4.7 Regression] Wrong error message location when compiling preprocessed code
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Mar 23 10:05:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48248
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.03.23 09:41:27
CC| |tromey at gcc dot gnu.org
Target Milestone|--- |4.5.3
Summary|Wrong error message |[4.5/4.6/4.7 Regression]
|location when compiling |Wrong error message
|preprocessed code |location when compiling
| |preprocessed code
Ever Confirmed|0 |1
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-23 09:41:27 UTC ---
Confirmed.
> g++-4.5 -S foo.c -save-temps
foobar.h: In function ‘void func()’:
foobar.h:8:3: error: ‘aaa’ was not declared in this scope
and preprocessed source looks like
# 1 "foo.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "foo.c"
# 1 "foobar.h" 1
enum Foo
{
BAR
};
# 2 "foo.c" 2
void func()
{
(void)
# 6 "foobar.h"
BAR
;
aaa;
}
we miss to switch back to foo.c. 4.4 does not switch to foobar.h at all.
More information about the Gcc-bugs
mailing list