This is the mail archive of the
mailing list for the GCC project.
Re: Enough already with the KDE bug!
- To: Martin von Loewis <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Subject: Re: Enough already with the KDE bug!
- From: Hyman Rosen <hymie at prolifics dot com>
- Date: Mon, 30 Mar 1998 10:50:49 -0500
- Cc: jbuck at Synopsys dot COM, egcs-bugs at cygnus dot com
- References: <199712311841.NAA17274@calumny.jyacc.com><199803281559.QAA00182@mira.isdn.cs.tu-berlin.de>
Martin von Loewis writes:
> It seems to me that the union is a local class as described in
> [class.local]. In that section, the standard says
> A class can be defined within a function definition; such a class is
> called a local class. The name of a local class is local to its
> enclosing scope. The local class is in the scope of the enclosing
> scope, and has the same access to names outside the function as does
> the enclosing function.
> Since `i'is a name outside the member function, the local class can
> access it since the function can. So `i' should be accessible, even
> though it is private.
> What do you think?
Paragraph one of [class.local] says
Declarations in a local class can use only type names,
static variables, extern variables and functions, and
enumerators from the enclosing scope.
The name 'i' is none of these.