public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "joerg.richter@pdv-fs.de" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug preprocessor/48248] New: Wrong error message location when compiling preprocessed code Date: Wed, 23 Mar 2011 09:27:00 -0000 [thread overview] Message-ID: <bug-48248-4@http.gcc.gnu.org/bugzilla/> (raw) 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.
next reply other threads:[~2011-03-23 8:47 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-03-23 9:27 joerg.richter@pdv-fs.de [this message] 2011-03-23 10:05 ` [Bug preprocessor/48248] [4.5/4.6/4.7 Regression] " rguenth at gcc dot gnu.org 2011-03-28 14:05 ` jakub at gcc dot gnu.org 2011-03-28 14:26 ` joerg.richter@pdv-fs.de 2011-03-28 16:40 ` jakub at gcc dot gnu.org 2011-03-28 19:46 ` jakub at gcc dot gnu.org 2011-03-29 20:31 ` jakub at gcc dot gnu.org 2011-03-29 20:39 ` jakub at gcc dot gnu.org 2011-03-29 21:14 ` [Bug preprocessor/48248] [4.5 " jakub at gcc dot gnu.org 2011-04-10 10:45 ` rguenth at gcc dot gnu.org 2011-04-19 9:14 ` rguenth at gcc dot gnu.org 2011-04-19 9:21 ` rguenth at gcc dot gnu.org 2011-04-19 9:36 ` rguenth at gcc dot gnu.org 2011-04-26 10:17 ` rguenth at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-48248-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).