public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/15167] New: Internal compiler error with "#pragma once"
@ 2004-04-27 11:56 Roland dot Meub at Tenovis dot com
  2004-04-27 12:46 ` [Bug preprocessor/15167] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
                   ` (22 more replies)
  0 siblings, 23 replies; 24+ messages in thread
From: Roland dot Meub at Tenovis dot com @ 2004-04-27 11:56 UTC (permalink / raw)
  To: gcc-bugs

Compiling sources with "#pragma once" with header files in subdirectories may
lead to an internal compiler error in the preprocessor.

(I have stripped my sources down to show this problem)

scenario:
1. The test.cpp includes a header file "a.h", located in the subdirectory "inc".
2. "inc/a.h" includes a header file "b.h" in the base directory.
3. "b.h" uses "#pragma once" and includes "c.h" in the base directory.
4. "c.h" includes "b.h" in the base direcotry
   (recursive include prevented with #ifndef/#define)
5. test.cpp includes an other header file "d.h" in the base directory.
6. "d.h" includes also "b.h"
   This is the point, where the ICE occures.

here is my compile command and the resulting output
(I've used "-H" to show the includes)

gcc -I. -E -o test.i test.cpp -H
. inc/a.h
.. ./b.h
... ./c.h
. d.h
In file included from test.cpp:0:
<internal>:0: interner Compiler-Fehler: Speicherzugriffsfehler
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

I've also found out, that a changed search path with "-I- -I."
prevents the ICE

sample command with output:
gcc -I. -E -o test.i test.cpp -H -I- -I.
. ./inc/a.h
.. ./b.h
... ./c.h
. ./d.h

-- 
           Summary: Internal compiler error with "#pragma once"
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: Roland dot Meub at Tenovis dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i386-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15167


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

end of thread, other threads:[~2004-12-15 13:43 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-27 11:56 [Bug preprocessor/15167] New: Internal compiler error with "#pragma once" Roland dot Meub at Tenovis dot com
2004-04-27 12:46 ` [Bug preprocessor/15167] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
2004-04-27 12:48 ` Roland dot Meub at Tenovis dot com
2004-04-27 13:08 ` pinskia at gcc dot gnu dot org
2004-04-27 13:36 ` pinskia at gcc dot gnu dot org
2004-04-28 17:01 ` ossama at dre dot vanderbilt dot edu
2004-04-28 17:01 ` ossama at dre dot vanderbilt dot edu
2004-06-15 14:35 ` chucky at outmax dot org
2004-06-15 14:40 ` pinskia at gcc dot gnu dot org
2004-06-22  8:08 ` mmitchel at gcc dot gnu dot org
2004-08-29 18:12 ` mmitchel at gcc dot gnu dot org
2004-08-29 18:16 ` mmitchel at gcc dot gnu dot org
2004-10-11  5:22 ` [Bug preprocessor/15167] [3.4/4.0 " pinskia at gcc dot gnu dot org
2004-10-13 11:31 ` pinskia at gcc dot gnu dot org
2004-11-01  0:47 ` mmitchel at gcc dot gnu dot org
2004-11-12  4:54 ` pinskia at gcc dot gnu dot org
2004-12-02 18:55 ` ebotcazou at gcc dot gnu dot org
2004-12-05 18:48 ` pinskia at gcc dot gnu dot org
2004-12-06  2:27 ` neil at gcc dot gnu dot org
2004-12-06  7:12 ` ebotcazou at gcc dot gnu dot org
2004-12-09  7:07 ` ebotcazou at gcc dot gnu dot org
2004-12-15 13:31 ` cvs-commit at gcc dot gnu dot org
2004-12-15 13:42 ` cvs-commit at gcc dot gnu dot org
2004-12-15 13:43 ` ebotcazou at gcc dot gnu dot 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).