This is the mail archive of the 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: Website patch: update projects to remove attribute nonnull

 > From: "Joseph S. Myers" <>
 > On Sat, 17 May 2003, Kaveh R. Ghazi wrote:
 > > This one is done right?
 > The nonnull attribute is in, but related checks for functions such as
 > execle aren't.  (There was a patch
 > <> for the latter
 > which could be mentioned in the projects list by way of illustration, but
 > a proper analysis of variadic function termination conventions is needed
 > with a more general design for checking them rather than a potential
 > accumulation of ad hoc attributes.)

Joseph, IMHO surveying variadic function termination conventions is
overdoing it.  NULL is pretty much it.

Since you've grouped this in with the other format attributes in the
projects page, I think we should follow the existing style and avoid
adding a new attribute.  I suggest this:

__attribute__ ((__format__ (__execl__)))

Rather than ad hoc, this follows the printf and scanf format
convention by specifying the type of format check via the name of the
standard function whose variadic style we are emulating.

WRT it's behavior, I read through the thread you cited above, and I
think the consensus was that the terminating value must be an integral
zero with the same width as a pointer, or any pointer-typed zero.
E.g. NULL or (T*)0.

Does this sound ok?  If so, I'll try and update Tom's patch.

Kaveh R. Ghazi

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