🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #1030

nested functions

#1030
From: Giuseppe Attardi
Date: Mon, 31 Aug 1992 10:56
17 lines
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!attardi

Show 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