This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: RFA: fix PR



On Dec 2, 2004, at 2:26 PM, Tom Tromey wrote:


This fixes PR java/16675.

We represent `null' using null_pointer_node, which has type `void*'.
When creating an anonymous class constructor, we don't look for this,
and we end up creating a constructor with an argument of that type.
Then the name mangler crashes when trying to mangle this (which makes
sense in a way as this is not a valid java type).

This patch fixes the bug in the simplest way, by adding a check for
null_pointer_node when creating the anonymous constructor.  (We can't
do the check in the caller as that will cause problems when calling an
ordinary constructor with a `null' argument.)
Test case included. Ok?

I would be careful here because INTEGER_CST are shared and I assume that null is an INTEGER_CST. Maybe the better fix would be change null_pointer_node to represented a different way.

Thanks,
Andrew Pinski


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]