Article View: gnu.gcc.bug
Article #1030nested functions
From: Giuseppe Attardi
Date: Mon, 31 Aug 1992 10:56
Date: Mon, 31 Aug 1992 10:56
17 lines
814 bytes
814 bytes
In gcc 2.0 under SunOS 4.1.2, the following program crashes the compiler
with the message:
gcc: Internal compiler error: program cc1 got fatal signal 6
foo(int a)
{ int x;
void bar (int z) { x = a; }
bar(a);
}
while it works with the assignement 'x = z'.
The manual (sec. 7.4) says that "a nested function can access all the
variables of the containing function", and I interpret this as including
the parameter 'a'.
Technical Details
Message-ID:
<9208310657.AA27212@life.ai.mit.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!di.unipi.IT!attardiShow Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!di.unipi.IT!attardi From: attardi@di.unipi.IT (Giuseppe Attardi) Subject: nested functions Message-ID: <9208310657.AA27212@life.ai.mit.edu> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Mon, 31 Aug 1992 10:56:59 GMT Approved: bug-gcc@prep.ai.mit.edu Lines: 19