[cfe-commits] r117168 - /cfe/trunk/www/compatibility.html
Fariborz Jahanian
fjahanian at apple.com
Fri Oct 22 15:35:51 PDT 2010
Author: fjahanian
Date: Fri Oct 22 17:35:51 2010
New Revision: 117168
URL: http://llvm.org/viewvc/llvm-project?rev=117168&view=rev
Log:
Update compatibility page for objective-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=117168&r1=117167&r2=117168&view=diff
==============================================================================
--- cfe/trunk/www/compatibility.html (original)
+++ cfe/trunk/www/compatibility.html Fri Oct 22 17:35:51 2010
@@ -42,6 +42,7 @@
<li><a href="#super-cast">Cast of super</a></li>
<li><a href="#sizeof-interface">Size of interfaces</a></li>
<li><a href="#objc_objs-cast">Internal Objective-C types</a></li>
+ <li><a href="#c_variables-class">C variables in @class or @protocol</a></li>
</ul>
</li>
<li><a href="#c++">C++ compatibility</a>
@@ -283,6 +284,24 @@
instead of the internal types.</p>
<!-- ======================================================================= -->
+<h3 id="c_variables-class">C variables in @class or @protocol</h3>
+<!-- ======================================================================= -->
+
+<p>GCC allows declaration of C variables in a @class or @protocol, but not
+C functions. Clang does not allow variable or C function declarations. External
+declarations, however, is allowed. Variables may only be declared in an
+ at implementation.
+
+<pre>
+ at interface XX
+int x; // not allowed in clang
+int one=1; // not allowed in clang
+extern int OK;
+ at end
+
+</pre>
+
+<!-- ======================================================================= -->
<h2 id="c++">C++ compatibility</h3>
<!-- ======================================================================= -->
More information about the cfe-commits
mailing list