This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [patch] For BZ #17328, mark __errno_location with __attribute__((returns_nonnull)) for gcc >=4.9.0


On Sun, 1 Mar 2015, Mike Frysinger wrote:

> On 28 Feb 2015 14:03, Paul Pluzhnikov wrote:
> > +#  if __GNUC_PREREQ(4,9)
> > +     __attribute__((returns_nonnull))
> > +#  endif
> 
> repeating this everywhere is ugly.  update misc/sys/cdefs.h instead to create a 
> dedicated attribute define based on version, and then apply that define to all 
> the headers w/out any version checks.

Also, returns_nonnull is in the user namespace - this should have shown up 
in regression testing as conform/ test failures.  You need to use 
__returns_nonnull__.  And remember the space before the first '('.

-- 
Joseph S. Myers
joseph@codesourcery.com


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