]> Savannah Git Hosting - gnulib.git/commit
tests: Avoid GCC over-optimization caused by _GL_ARG_NONNULL attributes.
authorBruno Haible <bruno@clisp.org>
Sun, 5 Jan 2020 08:13:25 +0000 (09:13 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 5 Jan 2020 18:20:45 +0000 (19:20 +0100)
commitb7d7afe10ddf599452bd80b8a840c830cd474b09
treefed821b2f08baa71e91e47db2d3e2ea85d1ca693
parentddfc731627e86f590eb99b4f1b07d04cc9b1ef79
tests: Avoid GCC over-optimization caused by _GL_ARG_NONNULL attributes.

Reported by Jim Meyering in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00040.html>.

* lib/stdlib.in.h (GNULIB_defined_canonicalize_file_name): New macro.
(GNULIB_defined_ptsname_r): New macro.
* tests/test-canonicalize.c (_GL_ARG_NONNULL): Define to empty.
(main): Disable the NULL argument test if canonicalize_file_name does
not come from gnulib.
* tests/test-canonicalize-lgpl.c (_GL_ARG_NONNULL): Define to empty.
(main): Disable the NULL argument test if canonicalize_file_name does
not come from gnulib.
* tests/test-ptsname_r.c (_GL_ARG_NONNULL): Define to empty.
(test_errors): Disable the NULL argument test if ptsname_r does not come
from gnulib.
ChangeLog
lib/stdlib.in.h
tests/test-canonicalize-lgpl.c
tests/test-canonicalize.c
tests/test-ptsname_r.c