This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] allow assert in inner class
- From: Andrew Haley <aph at redhat dot com>
- To: Per Bothner <per at bothner dot com>
- Cc: gcc-patches at gcc dot gnu dot org, java at gcc dot gnu dot org
- Date: Thu, 26 Feb 2004 10:14:52 +0000
- Subject: [committed] allow assert in inner class
- References: <403D85B0.3090101@bothner.com>
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?
Andrew.