This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: C++ and Java CNI: Check Java references
- To: Cedric Berger <cedric at wireless-networks dot com>
- Subject: Re: C++ and Java CNI: Check Java references
- From: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- Date: Wed, 25 Apr 2001 15:09:21 +1200
- Cc: Andrew Haley <aph at cambridge dot redhat dot com>, java at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
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 ]