about summary refs log tree commit diff
path: root/elf/dl-printf.c
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2022-05-13 14:16:34 +0100
committerJonathan Wakely <jwakely@redhat.com>2022-05-16 16:48:51 +0100
commit21244c70c24db4b3bd7a2169a7a48f637cad5930 (patch)
treeb7d015c3fb910960a62e6be834853e8da75a13b1 /elf/dl-printf.c
parent61a87530108ec9181e1b18a9b727ec3cc3ba7532 (diff)
downloadglibc-21244c70c24db4b3bd7a2169a7a48f637cad5930.tar.gz
glibc-21244c70c24db4b3bd7a2169a7a48f637cad5930.tar.xz
glibc-21244c70c24db4b3bd7a2169a7a48f637cad5930.zip
sys/cdefs.h: Do not require C++ compilers to define __STDC__
The check for an ISO C compiler assumes that anything GCC-like will
define __STDC__, even if it's actually a C++ compiler. That's currently
true for G++ and compilers like clang++ that also define __GNUC__, but
it might not always be true.

The C++ standard leaves it implementation-defined whether or not
__STDC__ is defined by C++ compilers. And really the check should be
"ISO C or ISO C++ conforming compiler" anyway. So only give an error if
__GNUC__ is defined and neither __STDC__ nor __cplusplus is defined.

Reviewed-by: Fangrui Song <maskray@google.com>
Diffstat (limited to 'elf/dl-printf.c')
0 files changed, 0 insertions, 0 deletions