[cfe-commits] r141922 - in /cfe/trunk: include/clang/Frontend/LangStandards.def test/Driver/std.cpp

Richard Smith richard-llvm at metafoo.co.uk
Thu Oct 13 17:34:29 PDT 2011


Author: rsmith
Date: Thu Oct 13 19:34:28 2011
New Revision: 141922

URL: http://llvm.org/viewvc/llvm-project?rev=141922&view=rev
Log:
Add support for -std=gnu90 and -std=c++03, for compatibility with modern gcc.

Modified:
    cfe/trunk/include/clang/Frontend/LangStandards.def
    cfe/trunk/test/Driver/std.cpp

Modified: cfe/trunk/include/clang/Frontend/LangStandards.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/LangStandards.def?rev=141922&r1=141921&r2=141922&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/LangStandards.def (original)
+++ cfe/trunk/include/clang/Frontend/LangStandards.def Thu Oct 13 19:34:28 2011
@@ -37,6 +37,9 @@
 LANGSTANDARD(gnu89, "gnu89",
              "ISO C 1990 with GNU extensions",
              BCPLComment | C89 | Digraphs | GNUMode | ImplicitInt)
+LANGSTANDARD(gnu90, "gnu90",
+             "ISO C 1990 with GNU extensions",
+             BCPLComment | C89 | Digraphs | GNUMode | ImplicitInt)
 
 // C99-ish modes
 LANGSTANDARD(c99, "c99",
@@ -75,8 +78,11 @@
 LANGSTANDARD(cxx98, "c++98",
              "ISO C++ 1998 with amendments",
              BCPLComment | CPlusPlus | Digraphs)
+LANGSTANDARD(cxx03, "c++03",
+             "ISO C++ 1998 with amendments",
+             BCPLComment | CPlusPlus | Digraphs)
 LANGSTANDARD(gnucxx98, "gnu++98",
-             "ISO C++ 1998 with " "amendments and GNU extensions",
+             "ISO C++ 1998 with amendments and GNU extensions",
              BCPLComment | CPlusPlus | Digraphs | GNUMode)
 
 LANGSTANDARD(cxx0x, "c++0x",

Modified: cfe/trunk/test/Driver/std.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/std.cpp?rev=141922&r1=141921&r2=141922&view=diff
==============================================================================
--- cfe/trunk/test/Driver/std.cpp (original)
+++ cfe/trunk/test/Driver/std.cpp Thu Oct 13 19:34:28 2011
@@ -1,5 +1,6 @@
 // RUN: %clang -std=c++98 %s -Wno-c++0x-compat -fsyntax-only 2>&1 | FileCheck -check-prefix=CXX98 %s
 // RUN: %clang -std=gnu++98 %s -Wno-c++0x-compat -fsyntax-only 2>&1 | FileCheck -check-prefix=GNUXX98 %s
+// RUN: %clang -std=c++03 %s -Wno-c++0x-compat -fsyntax-only 2>&1 | FileCheck -check-prefix=CXX98 %s
 // RUN: %clang -std=c++0x %s -fsyntax-only 2>&1 | FileCheck -check-prefix=CXX11 %s
 // RUN: %clang -std=gnu++0x %s -fsyntax-only 2>&1 | FileCheck -check-prefix=GNUXX11 %s
 // RUN: %clang -std=c++11 %s -fsyntax-only 2>&1 | FileCheck -check-prefix=CXX11 %s





More information about the cfe-commits mailing list