This is the mail archive of the gcc@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]

format cheching (was: Re: Warning for unadorned 0 in varargs lists?)


Joe.Buck@synopsys.COM (Joe Buck)  wrote on 19.08.04 in <20040819170217.A19357@synopsys.com>:

> But if the attribute approach were followed, the user can add her own
> attributes to do checking for execl-like functions.  This is already
> easily done for nonstandard printf-like functions.

Unfortunately, I currently can't do that in the case I most care about  
(and I've been burned more than once by this). I'm still using 2.95 on  
that project, but I believe 3.4 doesn't make a difference (am I wrong?);  
is there hope for 3.5?

The case I'm talking about is Objective C, and NSString style format  
arguments. Several problems here:

1. The argument string isn't a plain C string, but an @"..." construct.

2. An Objective C specific format, %@, is used rather often.

3. One would need to attach the property to methods. AFAIK, methods  
currently cannot take attributes.

Does the objc-improvements stuff touch any of this, perhaps?

MfG Kai


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