This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][www] Mention C++ change wrt hiding names


Ok for www?

Thanks,
Richard.

Index: changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.3/changes.html,v
retrieving revision 1.74
diff -u -r1.74 changes.html
--- changes.html	20 Sep 2007 12:14:29 -0000	1.74
+++ changes.html	24 Sep 2007 14:42:35 -0000
@@ -269,6 +269,23 @@
   easier to port larger projects using shared libraries from Microsoft's
   Visual Studio to ELF and Mach-O systems.</li>
 
+  <li>GCC by default no longer accepts code such as
+  <pre>
+    template <class _Tp> class auto_ptr {};
+    template <class _Tp>
+    class counted_ptr
+    {
+    public:
+      auto_ptr<_Tp> auto_ptr();
+    };</pre>
+  but will issue the diagnostic
+  <pre>
+    error: declaration of 'auto_ptr<_Tp> counted_ptr<_Tp>::auto_ptr()'
+    error: changes meaning of 'auto_ptr' from 'class auto_ptr<_Tp>'</pre>
+  The reference to <code>auto_ptr</code> needs to be qualified here.
+  This error can be turned into a warning with <code>-fpermissive</code>.
+  Note that then in some case name lookup will not be standard conforming.</li>
+
   </ul>
 
   <h4>Runtime Library (libstdc++)</h4>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]