about summary refs log tree commit diff
path: root/ChangeLog
diff options
context:
space:
mode:
authorBrooks Moses <bmoses@google.com>2013-12-11 17:46:46 -0800
committerBrooks Moses <bmoses@google.com>2013-12-23 15:50:54 -0800
commit3f637079f549956fe71a363fd82e1b66295deda2 (patch)
treefb4a09326c7092e81e9dfe937abe18e0e73aa403 /ChangeLog
parentabc26e998f74750850cc02f9c249ee794cbdd8e8 (diff)
downloadglibc-3f637079f549956fe71a363fd82e1b66295deda2.tar.gz
glibc-3f637079f549956fe71a363fd82e1b66295deda2.tar.xz
glibc-3f637079f549956fe71a363fd82e1b66295deda2.zip
Define __CORRECT_ISO_CPP_STRING_H_PROTO correctly for Clang.
In the string/string.h and string/strings.h headers, we have a couple
of macros that "tell the caller that we provide correct C++
prototypes" according to the comment; they are used to determine
whether to wrap some prototypes in "extern "C++"" (and provide
multiple overloads of them, and some other magic) when __cplusplus is
defined.

The macros are set to check for sufficiently-recent GCC versions (4.4
and later), but this is not the right check for non-GCC compilers.  In
particular, these macros should also be set when using Clang -- if
they are not set, then Clang will be unable to correctly diagnose a
number of subtle bugs that will be errors in GCC compilations.

As per discussion on earlier versions of this patch, rather than
restrict the fix to Clang per se, we assume that all C++ compilers that
claim to fully support C++98 are using a standard-conforming C++
standard library, which seems pretty reasonable.  Clang has been
providing an appropriate value of __cplusplus since May 2012.
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog7
1 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 9528f88097..584f5896fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2013-12-24  Brooks Moses  <bmoses@google.com>
+
+	* string/string.h (__CORRECT_ISO_CPP_STRING_H_PROTO): Define for
+	all compilers that claim C++98 compliance, not just GCC.
+	* string/strings.h (__CORRECT_ISO_CPP_STRINGS_H_PROTO):
+	Likewise.
+
 2013-12-24  Maxim Kuvyrkov  <maxim@kugelworks.com>
 
 	* NEWS: Restore accidentally deleted bug-fix entries.