This is the mail archive of the java-patches@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: Patch to use concat instead of xmalloc/sprintf for JAVA dir


> >>>>> "Kaveh" == Kaveh R Ghazi <ghazi@caip.rutgers.edu> writes:
> 
>     Kaveh> Regarding NULL vs NULL_PTR, there is some inconsistency as
>     Kaveh> both styles are currently used in calls to concat.  However
>     Kaveh> NULL_PTR is deprecated according to comments in ansidecl.h
>     Kaveh> where it is defined, so I used NULL.
> 
> Hmm.  I thought we were supposed to use NULL_PTR (like NULL_RTX and
> NULL_TREE).  But, I see that on the trunk there is indeed the comment
> you mentioned.  So, I think using NULL is correct, and that we should
> stop using NULL_PTR on the trunk.


IIUC, NULL_PTR is useful as a parameter to functions which might not have 
a prototype in force.  This ensures that the size of the pointer is 
correct on targets where pointer size is not the same as sizeof(int).  
NULL_PTR has a type, whereas NULL does not.

Of course, most targets that have such behaviour should probably be 
enforcing the use of prototypes nowadays...

R.


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