This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ and Java CNI: Check Java references
Ok, thanks, and sorry for my bad suggestion...
Cedric
Andrew Haley wrote:
> Cedric Berger writes:
> > 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
>
> It's not a property of the CNI application code because all existing
> CNI code relies on an implementation to check null pointers. The only
> issue is how the system does this: either with a MMU or with explicit
> in-line checks. Adding in-line checks to the compiler removes the
> need for an MMU.
>
> Andrew.