This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: 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?

| So What you are saying is that Fortran should not use reference types.

No.  What I'm saying is that the use of "reference" to model
optional arguments needs more work in terms of explanation and
justification. 

| 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?

-- Gaby


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