r196758 - Update compatibility page to list some GCC language extensions that Clang does

Richard Smith richard-llvm at metafoo.co.uk
Sun Dec 8 23:03:59 PST 2013


Author: rsmith
Date: Mon Dec  9 01:03:59 2013
New Revision: 196758

URL: http://llvm.org/viewvc/llvm-project?rev=196758&view=rev
Log:
Update compatibility page to list some GCC language extensions that Clang does
not support as a possible reason for choosing GCC instead of Clang (and vice
versa). Weaken some of the claimed advantages of Clang in light of GCC
improvements.

Modified:
    cfe/trunk/www/comparison.html

Modified: cfe/trunk/www/comparison.html
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/www/comparison.html?rev=196758&r1=196757&r2=196758&view=diff
==============================================================================
--- cfe/trunk/www/comparison.html (original)
+++ cfe/trunk/www/comparison.html Mon Dec  9 01:03:59 2013
@@ -51,8 +51,14 @@
     <li>GCC supports languages that clang does not aim to, such as Java, Ada,
         FORTRAN, etc.</li>
     <li>GCC supports more targets than LLVM.</li>
+    <li>GCC supports many language extensions, some of which are not implemented
+    by Clang. For instance, in C mode, GCC supports
+    <a href="http://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html">nested
+    functions</a> and has an
+    <a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37428">undocumented
+    extension allowing VLAs in structs</a>.
     </ul>
-    
+
     <p>Pro's of clang vs GCC:</p>
     
     <ul>
@@ -81,7 +87,8 @@
         GCC does not track information about macro instantiations when parsing
         source code.  This makes it very difficult for source rewriting tools
         (e.g. for refactoring) to work in the presence of (even simple) 
-        macros.</li>
+        macros. This appears to be partially or fully addressed in recent
+        releases of GCC.</li>
     <li>Clang does not implicitly simplify code as it parses it like GCC does.
         Doing so causes many problems for source analysis tools: as one simple
         example, if you write "x-x" in your source code, the GCC AST will
@@ -109,8 +116,12 @@
         pluggable optimizers, link-time optimization support, Just-In-Time
         compilation, ability to link in multiple code generators, etc.</li>
     <li><a href="compatibility.html#c++">Clang's support for C++</a> is more
-        compliant than GCC's in many ways (e.g. conformant two phase name
-        lookup).</li>
+        compliant than GCC's in many ways.</li>
+    <li>Clang supports
+        <a href="http://clang.llvm.org/docs/LanguageExtensions.html">many language
+        extensions</a>, some of which are not implemented by GCC. For instance,
+        Clang provides attributes for checking thread safety and extended vector
+        types.</li>
     </ul>
 
     <!--=====================================================================-->





More information about the cfe-commits mailing list