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: Generally use underscore-pre-/-postfixed attributes? (was: GNU C Library master sources branch master updated. glibc-2.17-262-gf6432d8)


It only matters for installed headers.  It really doesn't matter how you
write it in non-installed sources.  Always using __unused__ et al does
ensure that one will never overlook the issue from not noticing when one is
touching an installed header vs touching other sources.  But there is no
need for a hard and fast rule.  IMHO what's more important is that everyone
be thoroughly circumspect about every jot and tittle when touching any
installed header--there are many potential pitfalls beyond the simple name
space issues.

I am not going to start using __unused__ in non-installed code just for
foolish consistency.  There is no harm in using it, but also no defensible
reason for a reviewer to tell someone to do so.  OTOH, the issue is made
moot by using macros like __attribute_used__ and it wouldn't hurt to add an
__attribute_unused__ just for convenience and consistency.  Those are
shorter to type than the full syntax anyway.


Thanks,
Roland


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