Subject: Re: CVS commit: gnusrc/gnu/libexec/uucp
To: Jason R Thorpe <thorpej@wasabisystems.com>
From: Christos Zoulas <christos@zoulas.com>
List: source-changes
Date: 05/30/2002 15:22:59
On May 30, 11:41am, thorpej@wasabisystems.com (Jason R Thorpe) wrote:
-- Subject: Re: CVS commit: gnusrc/gnu/libexec/uucp

|  > I suggest something:
|  > 
|  > 	__attribute__((__format__(__printf__,m,n[,
|  > 	    __nullformat__[,__emptyformat__]])));
|  > 
|  > to show that a function allows null and/or empty format strings.
| 
| I'll take this up with the GCC folks.  I expect to get pushback on it.
| I'd also have to think about how it might be implemented.
| 
| Note I implemented the "__nullformat__" thing in gcc-current .. it's generic
| null argument checking ... you specify that an argument is to be non-null
| like:
| 
| 	void my_memcpy(void *dst, const void *src, size_t len)
| 	   __attribute__((__nonnull__(1,2)));
| 
| ..and the printf, etc. built-ins have nonnull attributes chained to the
| format attributes.

I like that better:

	__attribute__((__format__(__printf__,__empty__(__null__(m)),n)));

so that you can specify that argument m, can be empty or null?

christos