This is the mail archive of the java@gcc.gnu.org mailing list for the Java 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: java/6754: Casting to gnu.gcj.RawData causes SEGV


>>>>> "Bryce" == Bryce McKinlay <bryce@waitaki.otago.ac.nz> writes:

>> public static RawData bar(Object o) {
>> return (RawData)o;
>> }

Bryce> This isn't a bug. It isn't really safe to do anything with
Bryce> non-Java objects in Java code, you certainly can't cast one.

We should probably check for this case in the compiler and reject it.
We should also reject `instanceof RawData'.
That would be more friendly for the user.

The problems with extensions... :-(

Tom


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