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: Preliminary mainline patch for __attribute__ ((sentinel))


On Sat, Aug 28, 2004 at 05:24:22PM +0000, Joseph S. Myers wrote:
> On Sat, 28 Aug 2004, Kaveh R. Ghazi wrote:
> > Let's go with my solution (accepting compatible sized ints) for -Wall,
> > and we can implement a -Wstrict-sentinel flag (activated by
> > -Wformat=2) which rejects all but (char*)0 or (void*)0.  That way,
> > both camps can check their code to the portability strictness level
> > they feel is appropriate for their own needs.
> 
> This is excess complexity compared to the existing, working practice for 
> printf %p.  I do not recall the handling of printf %p as having attracted 
> any user complaints.

Umm... that's because no one routinely writes code that expands to
printf ("%p", NULL).  Unlike concat or other sentinel-interface
functions.

-- 
Daniel Jacobowitz


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