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]

Re: C++ and Java CNI: Check Java references


On Wednesday, April 25, 2001, at 02:50  AM, Cedric Berger wrote:

> Andrew Haley wrote:
>
>> Cedric Berger writes:
>>> Shoudn't that be a #pragma put on the top of the CNI file?
>>
>> Rather than a compiler flag, you mean?
>
> Yes, my point is that if you write a piece of CNI code that rely
> on this feature (automatic generation of NullPointerException on
> NULLs), it's better to advertise that on the source code itself.
> something like:
> #pragme needs-automatic-java-null-check

Much of our CNI code implicitly relies on NullPointerException-on-null 
because its been written for targets which trap memory access exceptions 
and convert them to NullPointerExceptions. Andrew's patch is needed on 
targets that don't have MMUs in order that the behaviour of this code be 
consistent on those targets. Since its a special option that needs to be 
turned on only for specific targets, I would say its better off as a 
compiler option.

regards

   [ bryce ]


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