public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Rename cxx1998 into normal
@ 2017-10-26  5:54 François Dumont
  2017-10-26 17:07 ` Daniel Krügler
  0 siblings, 1 reply; 5+ messages in thread
From: François Dumont @ 2017-10-26  5:54 UTC (permalink / raw)
  To: libstdc++, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 438 bytes --]

Hi

     We once talk about rename the __cxx1998 namespace into something 
less C++98 biased. Here is the patch to do so.

     Ok with the new name ?

     Tested under Linux x86_64 normal and debug modes.

     Note that pretty printers do not work with Debug mode but for the 
moment I checked the manually the output and it looks good. I'll try to 
make those work in a future patch.

François


[-- Attachment #2: rename_cxx1998.patch --]
[-- Type: text/x-patch, Size: 2001 bytes --]

diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config
index 21e3fbb..919f269 100644
--- a/libstdc++-v3/include/bits/c++config
+++ b/libstdc++-v3/include/bits/c++config
@@ -192,7 +192,7 @@
     namespace __debug { }
     namespace __parallel { }
     namespace __profile { }
-    namespace __cxx1998 { }
+    namespace __normal { }
 
     namespace __detail {
       namespace __variant { }				// C++17
@@ -317,7 +317,7 @@ namespace std
 _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
   // Non-inline namespace for components replaced by alternates in active mode.
-  namespace __cxx1998
+  namespace __normal
   {
 # if _GLIBCXX_USE_CXX11_ABI
   inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { }
@@ -371,7 +371,7 @@ _GLIBCXX_END_NAMESPACE_VERSION
 // _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
 // _GLIBCXX_END_NAMESPACE_CONTAINER
 #if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PROFILE)
-# define _GLIBCXX_STD_C __cxx1998
+# define _GLIBCXX_STD_C __normal
 # define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER \
 	 namespace _GLIBCXX_STD_C {
 # define _GLIBCXX_END_NAMESPACE_CONTAINER }
@@ -382,7 +382,7 @@ _GLIBCXX_END_NAMESPACE_VERSION
 #endif
 
 #ifdef _GLIBCXX_PARALLEL
-# define _GLIBCXX_STD_A __cxx1998
+# define _GLIBCXX_STD_A __normal
 # define _GLIBCXX_BEGIN_NAMESPACE_ALGO \
 	 namespace _GLIBCXX_STD_A {
 # define _GLIBCXX_END_NAMESPACE_ALGO }
diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py
index b7b2a0f..3f928ea 100644
--- a/libstdc++-v3/python/libstdcxx/v6/printers.py
+++ b/libstdc++-v3/python/libstdcxx/v6/printers.py
@@ -1232,7 +1232,7 @@ class Printer(object):
     # Add a name using _GLIBCXX_BEGIN_NAMESPACE_CONTAINER.
     def add_container(self, base, name, function):
         self.add_version(base, name, function)
-        self.add_version(base + '__cxx1998::', name, function)
+        self.add_version(base + '__normal::', name, function)
 
     @staticmethod
     def get_basic_type(type):

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Rename cxx1998 into normal
  2017-10-26  5:54 Rename cxx1998 into normal François Dumont
@ 2017-10-26 17:07 ` Daniel Krügler
  2017-10-26 17:12   ` Jonathan Wakely
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Krügler @ 2017-10-26 17:07 UTC (permalink / raw)
  To: François Dumont; +Cc: libstdc++, gcc-patches

2017-10-26 7:51 GMT+02:00 François Dumont <frs.dumont@gmail.com>:
> Hi
>
>     We once talk about rename the __cxx1998 namespace into something less
> C++98 biased. Here is the patch to do so.
>
>     Ok with the new name ?

IMO the name should somehow still contain "cxx" somewhere, otherwise
this could easily cause a semantic ambiguity in situations, where the
term "normal" has a specific meaning.

What about "__cxxdef[ault]" ?

- Daniel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Rename cxx1998 into normal
  2017-10-26 17:07 ` Daniel Krügler
@ 2017-10-26 17:12   ` Jonathan Wakely
  2017-10-26 19:47     ` François Dumont
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Wakely @ 2017-10-26 17:12 UTC (permalink / raw)
  To: Daniel Krügler; +Cc: François Dumont, libstdc++, gcc-patches

On 26/10/17 18:55 +0200, Daniel Krügler wrote:
>2017-10-26 7:51 GMT+02:00 François Dumont <frs.dumont@gmail.com>:
>> Hi
>>
>>     We once talk about rename the __cxx1998 namespace into something less
>> C++98 biased. Here is the patch to do so.
>>
>>     Ok with the new name ?
>
>IMO the name should somehow still contain "cxx" somewhere, otherwise
>this could easily cause a semantic ambiguity in situations, where the
>term "normal" has a specific meaning.
>
>What about "__cxxdef[ault]" ?

I'm not sure we need to change it at all. The name is anachronistic,
but harmless.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Rename cxx1998 into normal
  2017-10-26 17:12   ` Jonathan Wakely
@ 2017-10-26 19:47     ` François Dumont
  2017-10-26 20:30       ` Jonathan Wakely
  0 siblings, 1 reply; 5+ messages in thread
From: François Dumont @ 2017-10-26 19:47 UTC (permalink / raw)
  To: Jonathan Wakely, Daniel Krügler; +Cc: libstdc++, gcc-patches

On 26/10/2017 19:09, Jonathan Wakely wrote:
> On 26/10/17 18:55 +0200, Daniel Krügler wrote:
>> 2017-10-26 7:51 GMT+02:00 François Dumont <frs.dumont@gmail.com>:
>>> Hi
>>>
>>>     We once talk about rename the __cxx1998 namespace into something 
>>> less
>>> C++98 biased. Here is the patch to do so.
>>>
>>>     Ok with the new name ?
>>
>> IMO the name should somehow still contain "cxx" somewhere, otherwise
>> this could easily cause a semantic ambiguity in situations, where the
>> term "normal" has a specific meaning.
>>
>> What about "__cxxdef[ault]" ?
>
> I'm not sure we need to change it at all. The name is anachronistic,
> but harmless.
>
>
As part of this message:

https://gcc.gnu.org/ml/libstdc++/2016-09/msg00076.html

I thought that you also wanted to rename it. But I simply misunderstood, 
it is fine with me to keep it this way.

François


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Rename cxx1998 into normal
  2017-10-26 19:47     ` François Dumont
@ 2017-10-26 20:30       ` Jonathan Wakely
  0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Wakely @ 2017-10-26 20:30 UTC (permalink / raw)
  To: François Dumont; +Cc: Daniel Krügler, libstdc++, gcc-patches

On 26/10/17 21:45 +0200, François Dumont wrote:
>On 26/10/2017 19:09, Jonathan Wakely wrote:
>>On 26/10/17 18:55 +0200, Daniel Krügler wrote:
>>>2017-10-26 7:51 GMT+02:00 François Dumont <frs.dumont@gmail.com>:
>>>>Hi
>>>>
>>>>    We once talk about rename the __cxx1998 namespace into 
>>>>something less
>>>>C++98 biased. Here is the patch to do so.
>>>>
>>>>    Ok with the new name ?
>>>
>>>IMO the name should somehow still contain "cxx" somewhere, otherwise
>>>this could easily cause a semantic ambiguity in situations, where the
>>>term "normal" has a specific meaning.
>>>
>>>What about "__cxxdef[ault]" ?
>>
>>I'm not sure we need to change it at all. The name is anachronistic,
>>but harmless.
>>
>>
>As part of this message:
>
>https://gcc.gnu.org/ml/libstdc++/2016-09/msg00076.html
>
>I thought that you also wanted to rename it. But I simply 
>misunderstood, it is fine with me to keep it this way.

I was objecting to creating a new namespace called __cxx1998_a,
because for a new one we can choose any name. For the existing one I
don't really _like_ the name, but I don't think we need to change it.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-10-26 20:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-26  5:54 Rename cxx1998 into normal François Dumont
2017-10-26 17:07 ` Daniel Krügler
2017-10-26 17:12   ` Jonathan Wakely
2017-10-26 19:47     ` François Dumont
2017-10-26 20:30       ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).