]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Make use of gcc attributes in some standard include headers.
authorPedro F. Giffuni <pfg@FreeBSD.org>
Mon, 6 Apr 2015 01:39:16 +0000 (01:39 +0000)
committerPedro F. Giffuni <pfg@FreeBSD.org>
Mon, 6 Apr 2015 01:39:16 +0000 (01:39 +0000)
commit153cbcd6579a5c285e7f384c09211b081bb800c4
treebfe8c34c1990c129daa869d6fab191672ea7ec14
parenta1c1feb511ea04fec55420931d1733576819ff2b
Make use of gcc attributes in some standard include headers.

The `nonnull' attribute specifies that some function parameters should be
non-null pointers.  This is very useful as it helps the compiler generate
warnings on suspicious code and can also enable some small optimizations.

Also start using 'alloc_size' attribute in the allocator functions.

This is an initial step to better integrate our libc with the compiler:
these attributes are fully supported by clang and they are also useful
for the static analyzer.

Note that due to some bogus internal procedure in the way gcc ports
are built they may require updating if they were built before r280801.

Relnotes: yes
Hinted by: Android's bionic libc
Differential Revision: https://reviews.freebsd.org/D2107
include/pthread.h
include/signal.h
include/stdlib.h