This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Null pointer check elimination
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: gdr at integrable-solutions dot net (Gabriel Dos Reis)
- Cc: pinskia at physics dot uc dot edu (Andrew Pinski), paul at codesourcery dot com (Paul Brook), gcc at gcc dot gnu dot org, per at bothner dot com (Per Bothner), green at redhat dot com (Anthony Green), java at gcc dot gnu dot org
- Date: Sat, 12 Nov 2005 19:20:39 -0500 (EST)
- Subject: Re: Null pointer check elimination
>
> Andrew Pinski <pinskia@physics.uc.edu> writes:
>
> | > | of what the semantics of REFERENCE_TYPE are/should be, then yes.
> | >
> | > See, it is not a semantics I made up. Even people arguing for null
> | > reference recognize it is undefined behaviour.
> |
> | With C++ yes but not with Fortran where there are optional arguments.
>
> Then what is the difference between a pointer type and a reference type?
To the middle-end nothing, to the debugging info there is something.
> | Well in fortran, all agruments are passed via a reference so that is just
> | wrong. Using pointers there would be just wrong, as that is not the
> | semantics for the variable.
>
> So, what is the semantics? What is the real difference?
The semantics for reference type to the middle-end is no different from a pointer
type, it is only when printing out what the debug info should include.
Let me ask you this, how would represent agruments for Fortran then as pointers
but then we get much worse debug info as we get currently?
GCC is not a C++ play ground.
-- Pinski