public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [C++ Patch] deprecation of access declarations
@ 2011-12-29  8:08 Fabien Chêne
  2011-12-30 16:40 ` Jason Merrill
  2012-01-07 10:30 ` Gerald Pfeifer
  0 siblings, 2 replies; 13+ messages in thread
From: Fabien Chêne @ 2011-12-29  8:08 UTC (permalink / raw)
  To: Jason Merrill; +Cc: GCC Patches

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

Hi,

As previously announced, here is a patch that deprecate access
declarations . I did a little tour in the GCC museum old-deja --and in
g++.dg as well -- to disinter and adjust those dusty tests. To avoid
false positive on invalid code, I have decided to only emit the
warning if the access declaration is actually valid.
Bootstrapped/Tested x86_64-unknown-linux-gnu, OK to commit ?

gcc/testsuite/ChangeLog

2011-12-28  Fabien Chêne  <fabien@gcc.gnu.org>

	* g++.old-deja/g++.brendan/crash25.C: Adjust.
	* g++.old-deja/g++.brendan/crash56.C: Likewise.
	* g++.old-deja/g++.jason/access14.C: Likewise.
	* g++.old-deja/g++.jason/access8.C: Likewise.
	* g++.old-deja/g++.jason/access1.C: Likewise.
	* g++.old-deja/g++.other/access3.C: Likewise.
	* g++.old-deja/g++.other/access5.C: Likewise.
	* g++.old-deja/g++.law/unsorted1.C: Likewise.
	* g++.old-deja/g++.law/visibility22.C: Likewise.
	* g++.old-deja/g++.law/visibility26.C: Likewise.
	* g++.old-deja/g++.mike/p2746.C: Likewise.
	* g++.dg/debug/using1.C: Likewise.
	* g++.dg/lookup/using51.C: Likewise.
	* g++.dg/inherit/using5.C: Likewise.
	* g++.dg/inherit/pr30297.C: Likewise.
	* g++.dg/inherit/access8.C: Likewise.
	* g++.dg/torture/pr39362.C: Likewise.
	* g++.dg/template/crash13.C: Likewise.
	* g++.dg/template/using10.C: Likewise.

gcc/cp/ChangeLog

2011-12-28  Fabien Chêne  <fabien@gcc.gnu.org>

	* parser.c (cp_parser_using_declaration): Add a warning about
	deprecated access declarations when no errors were encountered
	while parsing the access declaration. Save the first token in
	order to emit the warning at the right place.

-- 
Fabien

[-- Attachment #2: access_decls_deprecation.patch --]
[-- Type: application/octet-stream, Size: 9262 bytes --]

Index: gcc/testsuite/g++.old-deja/g++.brendan/crash25.C
===================================================================
--- gcc/testsuite/g++.old-deja/g++.brendan/crash25.C	(revision 182209)
+++ gcc/testsuite/g++.old-deja/g++.brendan/crash25.C	(working copy)
@@ -14,5 +14,5 @@ public:
 class buff_head : private port_head {
 public:
 	static int rep;
-	port_head::cap;
+	port_head::cap; // { dg-warning "" } deprecated
 };
Index: gcc/testsuite/g++.old-deja/g++.brendan/crash56.C
===================================================================
--- gcc/testsuite/g++.old-deja/g++.brendan/crash56.C	(revision 182209)
+++ gcc/testsuite/g++.old-deja/g++.brendan/crash56.C	(working copy)
@@ -1,5 +1,5 @@
 // { dg-do assemble  }
-// { dg-options "" }
+// { dg-options "-Wno-deprecated" }
 // GROUPS passed old-abort
 
 const bool FALSE = 0;
Index: gcc/testsuite/g++.old-deja/g++.jason/access14.C
===================================================================
--- gcc/testsuite/g++.old-deja/g++.jason/access14.C	(revision 182209)
+++ gcc/testsuite/g++.old-deja/g++.jason/access14.C	(working copy)
@@ -4,7 +4,7 @@ template <class T> struct A { T t; };
 
 template <class T> class B: private T {
  public:
-  T::t;			   // { dg-bogus "" } doesn't recognize access decl
+  T::t; // { dg-warning "" } deprecated
 };
 
 template class B<A<int> >;
Index: gcc/testsuite/g++.old-deja/g++.jason/access8.C
===================================================================
--- gcc/testsuite/g++.old-deja/g++.jason/access8.C	(revision 182209)
+++ gcc/testsuite/g++.old-deja/g++.jason/access8.C	(working copy)
@@ -12,7 +12,7 @@ protected:
 class mel : private inh {
 protected:
         int t;
-	inh::myf;
+	inh::myf;  // { dg-warning "" } deprecated 
 };
 
 class top_t : protected mel {
Index: gcc/testsuite/g++.old-deja/g++.jason/access1.C
===================================================================
--- gcc/testsuite/g++.old-deja/g++.jason/access1.C	(revision 182209)
+++ gcc/testsuite/g++.old-deja/g++.jason/access1.C	(working copy)
@@ -8,10 +8,10 @@ public:
 
 class B: private A {
 public:
-  A::foo;
+  A::foo; // { dg-warning "" } deprecated 
 };
 
 void foo() {
   B b;
-  b.foo ();			// { dg-bogus "" } 
+  b.foo ();                    // { dg-bogus "" }
 }
Index: gcc/testsuite/g++.old-deja/g++.other/access3.C
===================================================================
--- gcc/testsuite/g++.old-deja/g++.other/access3.C	(revision 182209)
+++ gcc/testsuite/g++.old-deja/g++.other/access3.C	(working copy)
@@ -10,7 +10,7 @@ struct A
 
 struct B: private virtual A
 {
-  A::f;
+  A::f; // { dg-warning "" } deprecated
 };
 
 struct C: private virtual A, public B
Index: gcc/testsuite/g++.old-deja/g++.other/access5.C
===================================================================
--- gcc/testsuite/g++.old-deja/g++.other/access5.C	(revision 182209)
+++ gcc/testsuite/g++.old-deja/g++.other/access5.C	(working copy)
@@ -9,7 +9,7 @@ protected:
 class B : private A
 {
 protected:
-  A::i;
+  A::i; // { dg-warning "" } deprecated
 };
 
 struct C : public B {
Index: gcc/testsuite/g++.old-deja/g++.law/unsorted1.C
===================================================================
--- gcc/testsuite/g++.old-deja/g++.law/unsorted1.C	(revision 182209)
+++ gcc/testsuite/g++.old-deja/g++.law/unsorted1.C	(working copy)
@@ -20,7 +20,7 @@ class B : public A {
 
 class C : private B {
   public:
-    B::func;
+    B::func; // { dg-warning "" } deprecated 
 };
 
 class D {
Index: gcc/testsuite/g++.old-deja/g++.law/visibility22.C
===================================================================
--- gcc/testsuite/g++.old-deja/g++.law/visibility22.C	(revision 182209)
+++ gcc/testsuite/g++.old-deja/g++.law/visibility22.C	(working copy)
@@ -19,7 +19,7 @@ public:
 
 class B : private A {
 protected:
-        A::f;
+        A::f; // { dg-warning "" } deprecated 
 public:
-        A::g;
+        A::g; // { dg-warning "" } deprecated 
 };
Index: gcc/testsuite/g++.old-deja/g++.law/visibility26.C
===================================================================
--- gcc/testsuite/g++.old-deja/g++.law/visibility26.C	(revision 182209)
+++ gcc/testsuite/g++.old-deja/g++.law/visibility26.C	(working copy)
@@ -14,5 +14,7 @@ class X {
 class Y : private X {
   public:
     void f(int);
-    X::f;  // used to be an error; now equivalent to 'using X::f'
+
+    // 'X::f' used to be an error; now equivalent to 'using X::f'
+    X::f; // { dg-warning "" } deprecated
 };
Index: gcc/testsuite/g++.old-deja/g++.mike/p2746.C
===================================================================
--- gcc/testsuite/g++.old-deja/g++.mike/p2746.C	(revision 182209)
+++ gcc/testsuite/g++.old-deja/g++.mike/p2746.C	(working copy)
@@ -86,7 +86,7 @@ public:
   void remove(T *p) { IListBase::remove(p); }
   T *head() { return (T *)IListBase::head(); }
   T *get() { return (T *)IListBase::get(); }
-  IListBase::empty;
+  IListBase::empty; // { dg-warning "" } deprecated
 friend class IListIter<T>;
 };
 
@@ -136,8 +136,8 @@ class IListIter : private IListIterBase
 public:
   IListIter(const IList<T> &list) : IListIterBase(list) { }
   T *cur() { return (T *)IListIterBase::cur(); }
-  IListIterBase::next;
-  IListIterBase::done;
+  IListIterBase::next; // { dg-warning "" } deprecated
+  IListIterBase::done; // { dg-warning "" } deprecated
 };
 
 
Index: gcc/testsuite/g++.dg/debug/using1.C
===================================================================
--- gcc/testsuite/g++.dg/debug/using1.C	(revision 182209)
+++ gcc/testsuite/g++.dg/debug/using1.C	(working copy)
@@ -9,7 +9,7 @@ struct A
 
 struct B : public A
 {
-  A::d;
+  A::d; // { dg-warning "deprecated" }
 };
 
 B b;
Index: gcc/testsuite/g++.dg/lookup/using51.C
===================================================================
--- gcc/testsuite/g++.dg/lookup/using51.C	(revision 182209)
+++ gcc/testsuite/g++.dg/lookup/using51.C	(working copy)
@@ -1,5 +1,6 @@
 // PR c++/51382
 // { dg-do compile }
+// { dg-options "-Wno-deprecated" }
 
 template< int Value >
 struct Base
Index: gcc/testsuite/g++.dg/inherit/pr30297.C
===================================================================
--- gcc/testsuite/g++.dg/inherit/pr30297.C	(revision 182209)
+++ gcc/testsuite/g++.dg/inherit/pr30297.C	(working copy)
@@ -7,5 +7,5 @@ struct A
 
 extern "C" struct B : A
 {
-  A::i;
+  A::i; // { dg-warning "deprecated" }
 };
Index: gcc/testsuite/g++.dg/inherit/access8.C
===================================================================
--- gcc/testsuite/g++.dg/inherit/access8.C	(revision 182209)
+++ gcc/testsuite/g++.dg/inherit/access8.C	(working copy)
@@ -13,8 +13,8 @@ public:
 class B : private A
 {
 public:
-  A::i;
-  A::A1;
+  A::i; // { dg-warning "deprecated" }
+  A::A1; // { dg-warning "deprecated" }
 };
 
 void
Index: gcc/testsuite/g++.dg/torture/pr39362.C
===================================================================
--- gcc/testsuite/g++.dg/torture/pr39362.C	(revision 182209)
+++ gcc/testsuite/g++.dg/torture/pr39362.C	(working copy)
@@ -57,7 +57,7 @@ template <typename T> struct I <T, 0> :
   I (int capacity) { allocateBuffer (capacity); }
   ~I () { this->deallocateBuffer (buffer ()); }
   using H <T>::allocateBuffer;
-  H <T>::buffer;
+  H <T>::buffer; // { dg-warning "deprecated" } 
 };
 template <typename T, int cap = 0> struct J
 {
Index: gcc/testsuite/g++.dg/template/crash13.C
===================================================================
--- gcc/testsuite/g++.dg/template/crash13.C	(revision 182209)
+++ gcc/testsuite/g++.dg/template/crash13.C	(working copy)
@@ -13,6 +13,8 @@ template <typename T> struct C
 {
     typedef typename A<T>::B X;
     X::Y;			// { dg-error "not a base type" }
+// { dg-warning "deprecated" "" { target *-*-* } 15 }
 };
 
 C<void> c;			// { dg-message "required" }
+
Index: gcc/testsuite/g++.dg/template/using10.C
===================================================================
--- gcc/testsuite/g++.dg/template/using10.C	(revision 182209)
+++ gcc/testsuite/g++.dg/template/using10.C	(working copy)
@@ -7,5 +7,5 @@ struct B {
 template <typename T> class I : public B {}; 
  
 template <typename T> class D : private I<T> { 
-  I<T>::B::foo; 
+  I<T>::B::foo; // { dg-warning "deprecated" } 
 }; 
Index: gcc/cp/parser.c
===================================================================
--- gcc/cp/parser.c	(revision 182209)
+++ gcc/cp/parser.c	(working copy)
@@ -14863,9 +14863,14 @@ cp_parser_using_declaration (cp_parser*
   tree decl;
   tree identifier;
   tree qscope;
+  int oldcount = errorcount;
+  cp_token *diag_token;
 
   if (access_declaration_p)
-    cp_parser_parse_tentatively (parser);
+    {
+      diag_token = cp_lexer_peek_token (parser->lexer);
+      cp_parser_parse_tentatively (parser);
+    }
   else
     {
       /* Look for the `using' keyword.  */
@@ -14973,7 +14978,13 @@ cp_parser_using_declaration (cp_parser*
 
   /* Look for the final `;'.  */
   cp_parser_require (parser, CPP_SEMICOLON, RT_SEMICOLON);
-  
+
+  if (access_declaration_p && errorcount == oldcount)
+    warning_at (diag_token->location, OPT_Wdeprecated,
+		"access declarations are deprecated "
+		"in favour of using-declarations; "
+		"suggestion: add the %<using%> keyword");
+
   return true;
 }
 

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

* Re: [C++ Patch] deprecation of access declarations
  2011-12-29  8:08 [C++ Patch] deprecation of access declarations Fabien Chêne
@ 2011-12-30 16:40 ` Jason Merrill
  2011-12-30 18:26   ` Fabien Chêne
  2012-01-07 10:30 ` Gerald Pfeifer
  1 sibling, 1 reply; 13+ messages in thread
From: Jason Merrill @ 2011-12-30 16:40 UTC (permalink / raw)
  To: Fabien Chêne; +Cc: GCC Patches

Why // { dg-warning "" } deprecated on some tests, and
// { dg-warning "deprecated" } on others?  I would think all of the 
could use the second form.

> +  cp_token *diag_token;

Let's initialize this to NULL to make sure we avoid spurious warnings 
about it being used without being set.

OK with those changes.

Jason

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

* Re: [C++ Patch] deprecation of access declarations
  2011-12-30 16:40 ` Jason Merrill
@ 2011-12-30 18:26   ` Fabien Chêne
  2011-12-30 22:36     ` Mike Stump
  0 siblings, 1 reply; 13+ messages in thread
From: Fabien Chêne @ 2011-12-30 18:26 UTC (permalink / raw)
  To: Jason Merrill; +Cc: GCC Patches

2011/12/30 Jason Merrill <jason@redhat.com>:
> Why // { dg-warning "" } deprecated on some tests, and
> // { dg-warning "deprecated" } on others?  I would think all of the could
> use the second form.

I was believing that "// { dg-warning "" } deprecated" was the way to
test a warning in old-deja. If we can use the modern deja-gnu syntax
in old-deja, that's great, I would be much less reluctant to adjust
the tests there ;-)

-- 
Fabien

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

* Re: [C++ Patch] deprecation of access declarations
  2011-12-30 18:26   ` Fabien Chêne
@ 2011-12-30 22:36     ` Mike Stump
  2011-12-31 17:16       ` Jason Merrill
  0 siblings, 1 reply; 13+ messages in thread
From: Mike Stump @ 2011-12-30 22:36 UTC (permalink / raw)
  To: Mark Mitchell; +Cc: Jason Merrill, GCC Patches, Fabien Chêne

On Dec 30, 2011, at 10:18 AM, Fabien Chêne wrote:
> 2011/12/30 Jason Merrill <jason@redhat.com>:
>> Why // { dg-warning "" } deprecated on some tests, and
>> // { dg-warning "deprecated" } on others?  I would think all of the could
>> use the second form.
> 
> I was believing that "// { dg-warning "" } deprecated" was the way to
> test a warning in old-deja. If we can use the modern deja-gnu syntax
> in old-deja, that's great, I would be much less reluctant to adjust
> the tests there ;-)

So, I'm wondering why it was done this way originally:

r66317 | mmitchel | 2003-04-30 19:02:59 -0700 (Wed, 30 Apr 2003) | 10 lines

        * lib/g++-dg.exp (g++-dg-test): Add "repo" option.
        (dg-gpp-additional-sources): New function.
        (dg-gpp-additional-files): Likewise.
        * lib/g++.exp (additional_sources): New variable.
        (additional_files): Likewise.
        (g++_target_compile): Deal with them.
        * lib/old-dejagnu.exp: Remove.
        * g++.old-deja/old-deja.exp: Use dg.exp, not old-dejagnu.exp.
        * g++.old-deja: Revise all tests to use dg commands.


-  static int S1;               // ERROR - uses same name 9.3                    
+  static int S1;               // { dg-error "" } uses same name 9.3            


and not:

-  static int S1;               // ERROR - uses same name 9.3                    
+  static int S1;               // { dg-error "uses same name 9.3" }

?  Mark, you recall?

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

* Re: [C++ Patch] deprecation of access declarations
  2011-12-30 22:36     ` Mike Stump
@ 2011-12-31 17:16       ` Jason Merrill
  2011-12-31 19:58         ` Mike Stump
  0 siblings, 1 reply; 13+ messages in thread
From: Jason Merrill @ 2011-12-31 17:16 UTC (permalink / raw)
  To: Mike Stump; +Cc: Mark Mitchell, GCC Patches, Fabien Chêne

On 12/30/2011 04:34 PM, Mike Stump wrote:
> So, I'm wondering why it was done this way originally:
>
> -  static int S1;               // ERROR - uses same name 9.3
> +  static int S1;               // { dg-error "" } uses same name 9.3
>
> and not:
>
> -  static int S1;               // ERROR - uses same name 9.3
> +  static int S1;               // { dg-error "uses same name 9.3" }

"uses same name 9.3" sounds like a comment, not error text.

Jason

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

* Re: [C++ Patch] deprecation of access declarations
  2011-12-31 17:16       ` Jason Merrill
@ 2011-12-31 19:58         ` Mike Stump
  0 siblings, 0 replies; 13+ messages in thread
From: Mike Stump @ 2011-12-31 19:58 UTC (permalink / raw)
  To: Jason Merrill; +Cc: Mark Mitchell, GCC Patches, Fabien Chêne

On Dec 31, 2011, at 9:14 AM, Jason Merrill wrote:
> On 12/30/2011 04:34 PM, Mike Stump wrote:
>> So, I'm wondering why it was done this way originally:
>> 
>> -  static int S1;               // ERROR - uses same name 9.3
>> +  static int S1;               // { dg-error "" } uses same name 9.3
>> 
>> and not:
>> 
>> -  static int S1;               // ERROR - uses same name 9.3
>> +  static int S1;               // { dg-error "uses same name 9.3" }
> 
> "uses same name 9.3" sounds like a comment, not error text.

Ah, yes, we never had text matching, that would do it.  Thanks.

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

* Re: [C++ Patch] deprecation of access declarations
  2011-12-29  8:08 [C++ Patch] deprecation of access declarations Fabien Chêne
  2011-12-30 16:40 ` Jason Merrill
@ 2012-01-07 10:30 ` Gerald Pfeifer
  2012-01-13 10:14   ` Fabien Chêne
  1 sibling, 1 reply; 13+ messages in thread
From: Gerald Pfeifer @ 2012-01-07 10:30 UTC (permalink / raw)
  To: Fabien Chêne; +Cc: Jason Merrill, GCC Patches

[-- Attachment #1: Type: TEXT/PLAIN, Size: 672 bytes --]

On Thu, 29 Dec 2011, Fabien Chêne wrote:
> As previously announced, here is a patch that deprecate access
> declarations . I did a little tour in the GCC museum old-deja --and in
> g++.dg as well -- to disinter and adjust those dusty tests. To avoid
> false positive on invalid code, I have decided to only emit the
> warning if the access declaration is actually valid.

Mind suggesting a snippt for our release notes at
http://gcc.gnu.org/gcc-4.7/changes.html ?

(http://gcc.gnu.org/cvs.html has background on how to make changes
to our web pages, though if you want to send just a patch against
the online ones or a text snippet, I'll take care of the rest.)

Gerald

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

* Re: [C++ Patch] deprecation of access declarations
  2012-01-07 10:30 ` Gerald Pfeifer
@ 2012-01-13 10:14   ` Fabien Chêne
  2012-01-27 20:51     ` [wwwdocs] " Fabien Chêne
  0 siblings, 1 reply; 13+ messages in thread
From: Fabien Chêne @ 2012-01-13 10:14 UTC (permalink / raw)
  To: Gerald Pfeifer; +Cc: Jason Merrill, GCC Patches

Hi,

2012/1/7 Gerald Pfeifer <gerald@pfeifer.com>:
> On Thu, 29 Dec 2011, Fabien Chêne wrote:
>> As previously announced, here is a patch that deprecate access
>> declarations . I did a little tour in the GCC museum old-deja --and in
>> g++.dg as well -- to disinter and adjust those dusty tests. To avoid
>> false positive on invalid code, I have decided to only emit the
>> warning if the access declaration is actually valid.
>
> Mind suggesting a snippt for our release notes at
> http://gcc.gnu.org/gcc-4.7/changes.html ?

Yes, sure, thanks for suggestion. Unfortunately, my machine is
currently down, I'll get back to you when it is repaired.

-- 
Fabien

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

* [wwwdocs] deprecation of access declarations
  2012-01-13 10:14   ` Fabien Chêne
@ 2012-01-27 20:51     ` Fabien Chêne
  2012-02-12 20:16       ` Fabien Chêne
  2012-02-12 21:56       ` Gerald Pfeifer
  0 siblings, 2 replies; 13+ messages in thread
From: Fabien Chêne @ 2012-01-27 20:51 UTC (permalink / raw)
  To: Gerald Pfeifer; +Cc: Jason Merrill, GCC Patches

Hi Gerald,

2012/1/13 Fabien Chêne <fabien.chene@gmail.com>:
[...]
>> Mind suggesting a snippet for our release notes at
>> http://gcc.gnu.org/gcc-4.7/changes.html ?
>
> Yes, sure, thanks for suggestion. Unfortunately, my machine is
> currently down, I'll get back to you when it is repaired.

I get back to you for the snippet about deprecated access
declarations. I would also find it sensible to advertise about the fix
of c++/14258, a popular bug I have hit myself many times. OK to commit
the below ?

Index: gcc-4.7/changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.7/changes.html,v
retrieving revision 1.74
diff -r1.74 changes.html
396a397,405
>
>   <li>As per C++98, access-declarations are now deprecated by
>       G++. Using-declarations are to be used instead. Furthermore,
>       some efforts have been made to improve the support of class
>       scope using declarations. In particular, using-declarations
>       referring to a dependent type now work as expected
>       (<a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14258">c++/14258</a>).
>   </li>
>

-- 
Fabien

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

* Re: [wwwdocs] deprecation of access declarations
  2012-01-27 20:51     ` [wwwdocs] " Fabien Chêne
@ 2012-02-12 20:16       ` Fabien Chêne
  2012-02-12 21:56       ` Gerald Pfeifer
  1 sibling, 0 replies; 13+ messages in thread
From: Fabien Chêne @ 2012-02-12 20:16 UTC (permalink / raw)
  To: Gerald Pfeifer; +Cc: Jason Merrill, GCC Patches

Ping ?

2012/1/27 Fabien Chêne <fabien.chene@gmail.com>:
> Hi Gerald,
>
> 2012/1/13 Fabien Chêne <fabien.chene@gmail.com>:
> [...]
>>> Mind suggesting a snippet for our release notes at
>>> http://gcc.gnu.org/gcc-4.7/changes.html ?
>>
>> Yes, sure, thanks for suggestion. Unfortunately, my machine is
>> currently down, I'll get back to you when it is repaired.
>
> I get back to you for the snippet about deprecated access
> declarations. I would also find it sensible to advertise about the fix
> of c++/14258, a popular bug I have hit myself many times. OK to commit
> the below ?
>
> Index: gcc-4.7/changes.html
> ===================================================================
> RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.7/changes.html,v
> retrieving revision 1.74
> diff -r1.74 changes.html
> 396a397,405
>>
>>   <li>As per C++98, access-declarations are now deprecated by
>>       G++. Using-declarations are to be used instead. Furthermore,
>>       some efforts have been made to improve the support of class
>>       scope using declarations. In particular, using-declarations
>>       referring to a dependent type now work as expected
>>       (<a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14258">c++/14258</a>).
>>   </li>

-- 
Fabien

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

* Re: [wwwdocs] deprecation of access declarations
  2012-01-27 20:51     ` [wwwdocs] " Fabien Chêne
  2012-02-12 20:16       ` Fabien Chêne
@ 2012-02-12 21:56       ` Gerald Pfeifer
  2012-02-13 21:48         ` Fabien Chêne
  1 sibling, 1 reply; 13+ messages in thread
From: Gerald Pfeifer @ 2012-02-12 21:56 UTC (permalink / raw)
  To: Fabien Chêne; +Cc: Jason Merrill, GCC Patches

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1161 bytes --]

On Fri, 27 Jan 2012, Fabien Chêne wrote:
> I get back to you for the snippet about deprecated access
> declarations. I would also find it sensible to advertise about the fix
> of c++/14258, a popular bug I have hit myself many times. OK to commit
> the below ?

Yes, thank you.

One suggestion: where it reads "c++/14258", how about making this
"bug c++/14258", for those who are less familiar how we name things?

Do we need an update for http://gcc.gnu.org/gcc-4.7/porting_to.html
as well?

Gerald

> Index: gcc-4.7/changes.html
> ===================================================================
> RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.7/changes.html,v
> retrieving revision 1.74
> diff -r1.74 changes.html
> 396a397,405
>>
>>   <li>As per C++98, access-declarations are now deprecated by
>>       G++. Using-declarations are to be used instead. Furthermore,
>>       some efforts have been made to improve the support of class
>>       scope using declarations. In particular, using-declarations
>>       referring to a dependent type now work as expected
>>       (<a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14258">c++/14258</a>).
>>   </li>

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

* Re: [wwwdocs] deprecation of access declarations
  2012-02-12 21:56       ` Gerald Pfeifer
@ 2012-02-13 21:48         ` Fabien Chêne
  2012-02-13 22:50           ` Gerald Pfeifer
  0 siblings, 1 reply; 13+ messages in thread
From: Fabien Chêne @ 2012-02-13 21:48 UTC (permalink / raw)
  To: Gerald Pfeifer; +Cc: Jason Merrill, GCC Patches

2012/2/12 Gerald Pfeifer <gerald@pfeifer.com>:
> On Fri, 27 Jan 2012, Fabien Chêne wrote:
>> I get back to you for the snippet about deprecated access
>> declarations. I would also find it sensible to advertise about the fix
>> of c++/14258, a popular bug I have hit myself many times. OK to commit
>> the below ?
>
> Yes, thank you.
>
> One suggestion: where it reads "c++/14258", how about making this
> "bug c++/14258", for those who are less familiar how we name things?

I have committed it with the change that you have suggested.

> Do we need an update for http://gcc.gnu.org/gcc-4.7/porting_to.html
> as well?

I don't know. The deprecation of access declarations only raises a
warning -- unless -Werror is used.
Is porting_to.html appropriate to describe the way to fix the warning ?

Concerning the other changes related to using declarations, I don't
expect them to (massively) break some existing code.

-- 
Fabien

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

* Re: [wwwdocs] deprecation of access declarations
  2012-02-13 21:48         ` Fabien Chêne
@ 2012-02-13 22:50           ` Gerald Pfeifer
  0 siblings, 0 replies; 13+ messages in thread
From: Gerald Pfeifer @ 2012-02-13 22:50 UTC (permalink / raw)
  To: Fabien Chêne; +Cc: Jason Merrill, GCC Patches

[-- Attachment #1: Type: TEXT/PLAIN, Size: 459 bytes --]

On Mon, 13 Feb 2012, Fabien Chêne wrote:
>> Do we need an update for http://gcc.gnu.org/gcc-4.7/porting_to.html
>> as well?
> I don't know. The deprecation of access declarations only raises a
> warning -- unless -Werror is used.
> Is porting_to.html appropriate to describe the way to fix the warning ?

Hmm, I guess if it's only a warning we do not need to document it
yet.  Let's see whether Jason or other C++ affine developers think
differently.

Gerald

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

end of thread, other threads:[~2012-02-13 22:45 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-29  8:08 [C++ Patch] deprecation of access declarations Fabien Chêne
2011-12-30 16:40 ` Jason Merrill
2011-12-30 18:26   ` Fabien Chêne
2011-12-30 22:36     ` Mike Stump
2011-12-31 17:16       ` Jason Merrill
2011-12-31 19:58         ` Mike Stump
2012-01-07 10:30 ` Gerald Pfeifer
2012-01-13 10:14   ` Fabien Chêne
2012-01-27 20:51     ` [wwwdocs] " Fabien Chêne
2012-02-12 20:16       ` Fabien Chêne
2012-02-12 21:56       ` Gerald Pfeifer
2012-02-13 21:48         ` Fabien Chêne
2012-02-13 22:50           ` Gerald Pfeifer

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).