Patchwork G++ namespace association extension

login
register
mail settings
Submitter Jonathan Wakely
Date July 10, 2012, 9:34 p.m.
Message ID <CAH6eHdT6i3AEceXP7Rph4TZd3d1P8C_b9ODmZ1JnxwZ51bdxVA@mail.gmail.com>
Download mbox | patch
Permalink /patch/170291/
State New
Headers show

Comments

Jonathan Wakely - July 10, 2012, 9:34 p.m.
On 9 July 2012 14:18, Jason Merrill wrote:
> On 07/09/2012 01:26 PM, Jonathan Wakely wrote:
>>
>> http://gcc.gnu.org/onlinedocs/gcc/Namespace-Association.html says:
>>
>> "Caution: The semantics of this extension are not fully defined. Users
>> should refrain from using this extension as its semantics may change
>> subtly over time. It is possible that this extension will be removed
>> in future versions of G++. "
>>
>> Is it safe to assume that the semantics are now fixed to match those
>> of C++11 inline namespaces and will not change unless removed?
>
>
> Yes, but people should use inline namespaces instead; we should deprecate
> this form and then remove it in 4.9.

        * doc/extend.texi (Namespace Association): Alter cautionary text.

How's this, OK for trunk?
commit d6a414f6ebcd96645a1a6612e324eafee24b39e9
Author: Jonathan Wakely <jwakely.gcc@gmail.com>
Date:   Tue Jul 10 21:21:09 2012 +0100

    	* doc/extend.texi (Namespace Association): Alter cautionary text.
Jason Merrill - July 10, 2012, 11:25 p.m.
OK.

Jason
Gerald Pfeifer - July 15, 2012, 11:26 a.m.
On Tue, 10 Jul 2012, Jonathan Wakely wrote:
>> Yes, but people should use inline namespaces instead; we should deprecate
>> this form and then remove it in 4.9.
> 
>         * doc/extend.texi (Namespace Association): Alter cautionary text.

I think this also should go into the GCC 4.8 release notes
(gcc-4.8/changes.html)?

Gerald
Jonathan Wakely - July 15, 2012, 3:10 p.m.
On 15 July 2012 12:26, Gerald Pfeifer wrote:
> On Tue, 10 Jul 2012, Jonathan Wakely wrote:
>>> Yes, but people should use inline namespaces instead; we should deprecate
>>> this form and then remove it in 4.9.
>>
>>         * doc/extend.texi (Namespace Association): Alter cautionary text.
>
> I think this also should go into the GCC 4.8 release notes
> (gcc-4.8/changes.html)?

I can do that too.  There's no gcc-4.8 dir yet, do I need to copy over
the various other files from the gcc-4.7 dir or can I just create
changes.html and leave the RM to do the rest at the appropriate time?
Gerald Pfeifer - July 15, 2012, 11:34 p.m.
On Sun, 15 Jul 2012, Jonathan Wakely wrote:
>> I think this also should go into the GCC 4.8 release notes
>> (gcc-4.8/changes.html)?
> I can do that too.  There's no gcc-4.8 dir yet, do I need to copy over
> the various other files from the gcc-4.7 dir or can I just create
> changes.html and leave the RM to do the rest at the appropriate time?

If you run `cvs up -PAd` it should magically appear. :-)

Gerald
Jason Merrill - July 16, 2012, 3:46 p.m.
On 07/15/2012 07:26 AM, Gerald Pfeifer wrote:
> I think this also should go into the GCC 4.8 release notes
> (gcc-4.8/changes.html)?

I doubt that it has gotten wide enough usage to need that, but I suppose 
it doesn't hurt.

Jason

Patch

diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 91e7385..c3faf09 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -15527,10 +15527,9 @@  See also @ref{Namespace Association}.
 @node Namespace Association
 @section Namespace Association
 
-@strong{Caution:} The semantics of this extension are not fully
-defined.  Users should refrain from using this extension as its
-semantics may change subtly over time.  It is possible that this
-extension will be removed in future versions of G++.
+@strong{Caution:} The semantics of this extension are equivalent
+to C++ 2011 inline namespaces.  Users should use inline namespaces
+instead as this extension will be removed in future versions of G++.
 
 A using-directive with @code{__attribute ((strong))} is stronger
 than a normal using-directive in two ways: