glibc/assert
Jim Meyering e077349ce5 assert.h: allow gcc to detect assert(a = 1) errors
* assert/assert.h (assert): Rewrite assert's definition so that
a s/==/=/ typo, e.g., assert(errno = ENOENT) is not hidden from
gcc's -Wparentheses by assert-added parentheses.  The new definition
uses "if (expr) /* empty */; else __assert_fail...", so
gcc -Wall will now detect that type of error in an assert, too.
The __STRICT_ANSI__ disjunct is to make this work also with both
-ansi and  -pedantic, which would reject the use of ({...}).
I would have preferred to use __extension__ to mark that, but
doing so would mistakenly suppress warnings about any extension
in the user-supplied "expr".
E.g., "assert ( ({1;}) )" must continue to evoke a warning.
2016-12-18 01:30:51 -08:00
..
__assert.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
assert-perr.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
assert.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
assert.h assert.h: allow gcc to detect assert(a = 1) errors 2016-12-18 01:30:51 -08:00
Depend Update. 2000-07-01 05:19:18 +00:00
Makefile Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
test-assert-perr.c Update. 2000-12-05 08:17:58 +00:00
test-assert.c Update. 2000-12-05 08:17:58 +00:00
Versions Update. 2000-08-02 00:09:25 +00:00