aboutsummaryrefslogtreecommitdiff
path: root/include/sys/cdefs.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-05-10 20:15:11 +0000
committerUlrich Drepper <drepper@redhat.com>2007-05-10 20:15:11 +0000
commit00afb11fc0a9282d7e2cbc51cd1c65bf1b79a5ae (patch)
treee97f119f1d4854f3ef629401b5b3db763367ef4a /include/sys/cdefs.h
parent7d29b542a839aec5621f9159a6eb09c4a684b0c4 (diff)
downloadglibc-00afb11fc0a9282d7e2cbc51cd1c65bf1b79a5ae.tar
glibc-00afb11fc0a9282d7e2cbc51cd1c65bf1b79a5ae.tar.gz
glibc-00afb11fc0a9282d7e2cbc51cd1c65bf1b79a5ae.tar.bz2
glibc-00afb11fc0a9282d7e2cbc51cd1c65bf1b79a5ae.zip
Redefine __nonnull so that test for incorrect parameters in the libc code itself are not omitted.
Diffstat (limited to 'include/sys/cdefs.h')
-rw-r--r--include/sys/cdefs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/sys/cdefs.h b/include/sys/cdefs.h
index 8ba980477d..cd0750b452 100644
--- a/include/sys/cdefs.h
+++ b/include/sys/cdefs.h
@@ -2,6 +2,12 @@
#include <misc/sys/cdefs.h>
+/* The compiler will optimize based on the knowledge the parameter is
+ not NULL. This will omit tests. A robust implementation cannot allow
+ this so when compiling glibc itself we ignore this attribute. */
+#undef __nonnull
+#define __nonnull(params)
+
extern void __chk_fail (void) __attribute__ ((__noreturn__));
libc_hidden_proto (__chk_fail)
rtld_hidden_proto (__chk_fail)