This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/17023] New: ICE with nested functions in parameter declaration
- From: "jsm28 at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Aug 2004 00:12:49 -0000
- Subject: [Bug c/17023] New: ICE with nested functions in parameter declaration
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
While converting the C front end to use proper structures instead of
trees for declarators, I came up with the following testcase which
ICEs with CVS mainline and most other GCC versions I tried it with.
(With 2.95.3, 2.7.2.3 and EGCS 1.0.3a, instead it gives bogus errors.)
The code is undoubtedly invalid, but no compiler version rejects it
with a meaningful error. (I might look into this later.)
void
f(a, b)
int a;
int b[({ void h() {} 1; })];
{
}
nested-func-mess.c: In function `f':
nested-func-mess.c:4: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Nested functions clearly should not be allowed outside the body of a
function.
--
Summary: ICE with nested functions in parameter declaration
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jsm28 at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17023