mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
math.h: Warn about an already-defined log macro
This is a common programming error, and the cause of the problem is not always obvious. <tgmath.h> defines a log macro, but it includes <math.h> before that, so that is compatible with the warning.
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
2017-09-04 Florian Weimer <fweimer@redhat.com>
|
||||||
|
|
||||||
|
* math/math.h: Issue warning if log is defined.
|
||||||
|
|
||||||
2017-09-04 Joseph Myers <joseph@codesourcery.com>
|
2017-09-04 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
* scripts/build-many-glibcs.py (Context.checkout): Default Linux
|
* scripts/build-many-glibcs.py (Context.checkout): Default Linux
|
||||||
|
@@ -26,6 +26,11 @@
|
|||||||
#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
|
#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
|
||||||
#include <bits/libc-header-start.h>
|
#include <bits/libc-header-start.h>
|
||||||
|
|
||||||
|
#if defined log && defined __GNUC__
|
||||||
|
# warning A macro called log was already defined when <math.h> was included.
|
||||||
|
# warning This will cause compilation problems.
|
||||||
|
#endif
|
||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
|
|
||||||
/* Get definitions of __intmax_t and __uintmax_t. */
|
/* Get definitions of __intmax_t and __uintmax_t. */
|
||||||
|
Reference in New Issue
Block a user