svn commit: r280636 - head/include
Bruce Evans
brde at optusnet.com.au
Thu Mar 26 02:14:19 UTC 2015
On Wed, 25 Mar 2015, Pedro F. Giffuni wrote:
> Log:
> Temporarily revert 280458.
>
> GCC is still carries an old version of cdefs.h which doesn't
> accept multiple parameters for the nonnull attribute.
>
> Since this issue probably affects many ports in the tree
> we will revert it for now until gcc gets fixed.
Note that sys/cdefs.h is supposed to work with any version of
gcc back to gcc-1, and does mostly work back to at least gcc-2.95.
The whole point of sys/cdefs.h is to provide compatibity macros
for old and other non-default compilers. Standard compilers don't
even have __attribute__(()). So no changes in future versions
of gcc will fix the previous commit.
The ifdefs for __nonnull() seem to be broken. They assume that
all versions of gcc >= 3.3 support the same semantics for __nonnull()
and that no non-gcc compiler supports the __nonnull__() attribute.
Non-gcc compilers like clang get this by pretending to be gcc.
Non-gcc compilers like icc tend to not get this by not pretending to
be gcc. __nonnull__() is one of the few attributes that is only a
hint, so definining it as nothing when it is not known to work is
correct.
Bruce
More information about the svn-src-all
mailing list