This is the mail archive of the gcc-patches@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: Patch: New null_terminated attribute for C/C++


Tom Tromey wrote:
In particular I tested both C and C++, where the final argument is
NULL, an ordinary char* value, or 0.  I also tested that you get a
warning if the attribute is applied to something other than a function
decl.
I'd like a warning if the final argument is 0 rather than an explict
null pointer (NULL or (TYPE*)0), since 0 is non-portable.  Does your
patch do that?

Of course if the definition of NULL is 0, it may be difficult to make
this check!  But perhaps fix-includes fixes this?
--
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/


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