[Bug preprocessor/48248] New: Wrong error message location when compiling preprocessed code
joerg.richter@pdv-fs.de
gcc-bugzilla@gcc.gnu.org
Wed Mar 23 09:27:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48248
Summary: Wrong error message location when compiling
preprocessed code
Product: gcc
Version: 4.5.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: preprocessor
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: joerg.richter@pdv-fs.de
$ cat > foobar.h << EOF
enum Foo
{
BAR
};
#define BAR(x)
#define BARBAR BAR
EOF
$ cat > main.cc << EOF
#include "foobar.h"
void func()
{
(void)BARBAR;
aaa;
}
EOF
$ g++ -c main.cc
main.cc: In function 'void func()':
main.cc:8:3: error: 'aaa' was not declared in this scope
$ g++ -E main.cc > main.ii
$ g++ -c main.ii
foobar.h: In function 'void func()':
foobar.h:8:3: error: 'aaa' was not declared in this scope
Please notice the wrong filename when compiling the preprocessed source.
GCC 4.4 doesn't have this problem.
More information about the Gcc-bugs
mailing list