public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "Roland dot Meub at Tenovis dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug preprocessor/15167] New: Internal compiler error with "#pragma once"
Date: Tue, 27 Apr 2004 11:56:00 -0000	[thread overview]
Message-ID: <20040427115120.15167.Roland.Meub@Tenovis.com> (raw)

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


             reply	other threads:[~2004-04-27 11:51 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-27 11:56 Roland dot Meub at Tenovis dot com [this message]
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

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=20040427115120.15167.Roland.Meub@Tenovis.com \
    --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: link
Be 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).