public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/48248] New: Wrong error message location when compiling preprocessed code
@ 2011-03-23  9:27 joerg.richter@pdv-fs.de
  2011-03-23 10:05 ` [Bug preprocessor/48248] [4.5/4.6/4.7 Regression] " rguenth at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: joerg.richter@pdv-fs.de @ 2011-03-23  9:27 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-04-26 10:17 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-23  9:27 [Bug preprocessor/48248] New: Wrong error message location when compiling preprocessed code joerg.richter@pdv-fs.de
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

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).