public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/5666: ICE compiling old style C code with g++
@ 2002-04-08 17:15 jason
  0 siblings, 0 replies; 4+ messages in thread
From: jason @ 2002-04-08 17:15 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, reichelt

Synopsis: ICE compiling old style C code with g++

State-Changed-From-To: open->analyzed
State-Changed-By: jason
State-Changed-When: Mon Apr  8 17:15:23 2002
State-Changed-Why:
    This is not a regression; it should not have high priority.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5666


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

* Re: c++/5666: ICE compiling old style C code with g++
@ 2002-12-30 23:06 Gabriel Dos Reis
  0 siblings, 0 replies; 4+ messages in thread
From: Gabriel Dos Reis @ 2002-12-30 23:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/5666; it has been noted by GNATS.

From: Gabriel Dos Reis <gdr@integrable-solutions.net>
To: reichelt@igpm.rwth-aachen.de
Cc: gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org, reichelt@igpm.rwth-aachen.de
Subject: Re: c++/5666: ICE compiling old style C code with g++
Date: 31 Dec 2002 07:59:18 +0100

 reichelt@igpm.rwth-aachen.de writes:
 
 | Synopsis: ICE compiling old style C code with g++
 | 
 | State-Changed-From-To: analyzed->closed
 | State-Changed-By: reichelt
 | State-Changed-When: Mon Dec 30 14:13:32 2002
 | State-Changed-Why:
 |     Fixed in gcc 3.4 with the new parser.
 
 
 Please submit testcase for those PRs you're closing.  We ought to make
 sure that they woon't show up as regressions.
 
 Thanks,
 
 -- Gaby


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

* Re: c++/5666: ICE compiling old style C code with g++
@ 2002-12-30 14:13 reichelt
  0 siblings, 0 replies; 4+ messages in thread
From: reichelt @ 2002-12-30 14:13 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, reichelt

Synopsis: ICE compiling old style C code with g++

State-Changed-From-To: analyzed->closed
State-Changed-By: reichelt
State-Changed-When: Mon Dec 30 14:13:32 2002
State-Changed-Why:
    Fixed in gcc 3.4 with the new parser.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5666


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

* c++/5666: ICE compiling old style C code with g++
@ 2002-02-12  6:46 reichelt
  0 siblings, 0 replies; 4+ messages in thread
From: reichelt @ 2002-02-12  6:46 UTC (permalink / raw)
  To: gcc-gnats


>Number:         5666
>Category:       c++
>Synopsis:       ICE compiling old style C code with g++
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-illegal-code
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 12 06:46:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Volker Reichelt
>Release:        gcc version 3.1 20020204 (experimental)
>Organization:
>Environment:
mips-sgi-irix6.5, i686-pc-linux-gnu
>Description:
The following code snippet is legal old-style C code.
However, it is illegal C++ code. In fact it will cause
an ICE, when compiled with g++:

------------------------snip here-----------------------
void foo (i, j)
    int i;
    int j;
{
    quus(j);
    quus(j);
}

void bar (k)
    int k;
{
    int l;
    struct { int a[3]; } j;
}
------------------------snip here-----------------------

The error message reads:

OldStyle.cpp:1: `i' was not declared in this scope
OldStyle.cpp:1: `j' was not declared in this scope
OldStyle.cpp:2: variable or field `foo' declared void
OldStyle.cpp:2: initializer list being treated as compound expression
OldStyle.cpp:2: syntax error before `int'
OldStyle.cpp:4: parse error before `{' token
OldStyle.cpp:6: ISO C++ forbids declaration of `quus' with no type
OldStyle.cpp:7: parse error before `}' token
OldStyle.cpp:9: `k' was not declared in this scope
OldStyle.cpp:10: variable or field `bar' declared void
OldStyle.cpp:10: syntax error before `int'
OldStyle.cpp:13: conflicting types for `<anonymous struct> j'
OldStyle.cpp:3: previous declaration as `int j'
OldStyle.cpp:14: parse error before `}' token
OldStyle.cpp: In function `void __static_initialization_and_destruction_0(int, 
   int)':
OldStyle.cpp:6: Internal compiler error in emit_move_insn, at expr.c:2748
Please submit a full bug report, [etc.]

Remark: Be sure that the file has an extension like
.cpp .cc .ii and not .c or .i (otherwise you'll invoke
the C front-end, even if you use g++).
>How-To-Repeat:
g++ -c OldStyle.cpp
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2002-12-31  7:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-08 17:15 c++/5666: ICE compiling old style C code with g++ jason
  -- strict thread matches above, loose matches on Subject: below --
2002-12-30 23:06 Gabriel Dos Reis
2002-12-30 14:13 reichelt
2002-02-12  6:46 reichelt

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