summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2011-10-14 00:34:28 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2011-10-14 00:34:28 +0000
commit172604adb36fd226dee7845ff3f4708354e96e5a (patch)
tree55cef409b503044e71700808f62ed79e493ec78c
parentde8a1046338902e6c0ab31c8f22d062debe1f9b8 (diff)
downloadbcm5719-llvm-172604adb36fd226dee7845ff3f4708354e96e5a.tar.gz
bcm5719-llvm-172604adb36fd226dee7845ff3f4708354e96e5a.zip
Add support for -std=gnu90 and -std=c++03, for compatibility with modern gcc.
llvm-svn: 141922
-rw-r--r--clang/include/clang/Frontend/LangStandards.def8
-rw-r--r--clang/test/Driver/std.cpp1
2 files changed, 8 insertions, 1 deletions
diff --git a/clang/include/clang/Frontend/LangStandards.def b/clang/include/clang/Frontend/LangStandards.def
index 22229b29169..c82290b20d6 100644
--- a/clang/include/clang/Frontend/LangStandards.def
+++ b/clang/include/clang/Frontend/LangStandards.def
@@ -37,6 +37,9 @@ LANGSTANDARD(c94, "iso9899:199409",
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(gnu1x, "gnu1x",
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",
diff --git a/clang/test/Driver/std.cpp b/clang/test/Driver/std.cpp
index 99deb11365e..7704c8dda1e 100644
--- a/clang/test/Driver/std.cpp
+++ b/clang/test/Driver/std.cpp
@@ -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
OpenPOWER on IntegriCloud