diff mbox

Fix PR libstdc++/78264

Message ID 5811326.yNvE5WotYC@polaris
State New
Headers show

Commit Message

Eric Botcazou Dec. 8, 2016, 3:53 p.m. UTC
As documented a few lines below in the same file (but I presume that the 
BADNAMES file is long gone), using _N wreaks havoc on Solaris:

// This marks string literals in header files to be extracted for eventual
// translation.  It is primarily used for messages in thrown exceptions; see
// src/functexcept.cc.  We use __N because the more traditional _N is used
// for something else under certain OSes (see BADNAMES).
#define __N(msgid)     (msgid)

Tested on x86-64/Linux and SPARC/Solaris, applied on mainline as obvious.


2016-12-08  Eric Botcazou  <ebotcazou@adacore.com>

	PR libstdc++/78264
	* include/bits/c++config (_GLIBCXX_NOEXCEPT_PARM): Turn _N into _NE.
	(_GLIBCXX_NOEXCEPT_QUAL): Likewise.

-- 
Eric Botcazou

Comments

Ville Voutilainen Dec. 8, 2016, 3:58 p.m. UTC | #1
On 8 December 2016 at 17:53, Eric Botcazou <ebotcazou@adacore.com> wrote:
> As documented a few lines below in the same file (but I presume that the

> BADNAMES file is long gone), using _N wreaks havoc on Solaris:



I think this documentation has the same content as BADNAMES used to have?
https://gcc.gnu.org/onlinedocs/libstdc++/manual/source_code_style.html
diff mbox

Patch

Index: include/bits/c++config
===================================================================
--- include/bits/c++config	(revision 243333)
+++ include/bits/c++config	(working copy)
@@ -147,8 +147,8 @@ 
 #endif
 
 #if __cpp_noexcept_function_type
-#define _GLIBCXX_NOEXCEPT_PARM , bool _N
-#define _GLIBCXX_NOEXCEPT_QUAL noexcept (_N)
+#define _GLIBCXX_NOEXCEPT_PARM , bool _NE
+#define _GLIBCXX_NOEXCEPT_QUAL noexcept (_NE)
 #else
 #define _GLIBCXX_NOEXCEPT_PARM
 #define _GLIBCXX_NOEXCEPT_QUAL