This is the mail archive of the
mailing list for the GCC project.
Re: [committed] allow assert in inner class
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: Andrew Haley <aph at redhat dot com>
- Cc: Per Bothner <per at bothner dot com>, gcc-patches at gcc dot gnu dot org, Andrew Pinski <pinskia at physics dot uc dot edu>, java at gcc dot gnu dot org
- Date: Thu, 26 Feb 2004 08:38:39 -0800
- Subject: Re: [committed] allow assert in inner class
- References: <403D85B0.firstname.lastname@example.org> <email@example.com>
On Feb 26, 2004, at 02:14, Andrew Haley wrote:
Per Bothner writes:
If you use assert, the compiler generates some code
that includes doing THIS_CLASS.class, which in turn
is implemented by a static helper method named class$.
If THIS_CLASS was an inner class, the compiler would
lose because static methods aren't allowed in inner classes.
The solution (which matches JDK) is to move the class$
helper method to the outer class.
Tested on Fedora and checked into mainline.
Thanks. 3.4 too? Or is this not sufficiently important?
Also please close bugs which are fixed by this patch, it looks like
is fixed by this patch.
gcc bug master