Author: dgregor
Date: Wed Nov 10 14:24:21 2010
New Revision: 118712

URL: http://llvm.org/viewvc/llvm-project?rev=118712&view=rev
Log:
Document a language-compatibility issue with function parameter names in 
function prototypes in C++

Modified:
    cfe/trunk/www/compatibility.html

Modified: cfe/trunk/www/compatibility.html
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/www/compatibility.html?rev=118712&r1=118711&r2=118712&view=diff
==============================================================================
--- cfe/trunk/www/compatibility.html (original)
+++ cfe/trunk/www/compatibility.html Wed Nov 10 14:24:21 2010
@@ -56,6 +56,7 @@
       <li><a href="#default_init_const">Default initialization of const
       variable of a class type requires user-defined default
       constructor</a></li>
+      <li><a href="#param_name_lookup">Parameter name lookup</a></li>
     </ul>
   </li>
   <li><a href="#objective-c++">Objective-C++ compatibility</a>
@@ -675,6 +676,18 @@
 </pre>
 
 <!-- ======================================================================= 
-->
+<h3 id="param_name_lookup">Parameter name lookup</h3>
+<!-- ======================================================================= 
-->
+
+<p>Due to a bug in its implementation, GCC allows the redeclaration of 
function parameter names within a function prototype in C++ code, e.g.</p>
+<blockquote>
+<pre>
+void f(int a, int a);
+</pre>
+</blockquote>
+<p>Clang diagnoses this error (where the parameter name has been redeclared). 
To fix this problem, rename one of the parameters.</p>
+
+<!-- ======================================================================= 
-->
 <h2 id="objective-c++">Objective-C++ compatibility</h3>
 <!-- ======================================================================= 
-->
 


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to