This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: New null_terminated attribute for C/C++
- From: Per Bothner <per at bothner dot com>
- To: tromey at redhat dot com
- Cc: Gcc Patch List <gcc-patches at gcc dot gnu dot org>, Owen Taylor <otaylor at redhat dot com>
- Date: Mon, 14 Oct 2002 09:29:27 -0700
- Subject: Re: Patch: New null_terminated attribute for C/C++
- References: <87u1jq3q7v.fsf@fleche.redhat.com>
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/