summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-12-09 07:03:59 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-12-09 07:03:59 +0000
commitca4764740a23eda71a452f9ddf21c3893860ed2d (patch)
treed5da8aa65cff2ba83ddd509d582c8a5e70ee5208 /www
parent13cd246821b8bbdedd243d25277595baa4119464 (diff)
downloadclang-ca4764740a23eda71a452f9ddf21c3893860ed2d.tar.gz
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196758 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'www')
-rw-r--r--www/comparison.html19
1 files changed, 15 insertions, 4 deletions
diff --git a/www/comparison.html b/www/comparison.html
index afc321e061..40a0d001b2 100644
--- a/www/comparison.html
+++ b/www/comparison.html
@@ -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>
<!--=====================================================================-->