]> granicus.if.org Git - clang/commitdiff
enable digraphs for C94, thanks to Neil for pointing this out.
authorChris Lattner <sabre@nondot.org>
Mon, 25 Feb 2008 04:01:39 +0000 (04:01 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 25 Feb 2008 04:01:39 +0000 (04:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47543 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/clang.cpp
include/clang/Basic/LangOptions.h

index 89e0bad4d0f39964360ad4309a7abdc3c4cda196..fa0c9fc43fc28002fcd2609505f2038bffe05fcf 100644 (file)
@@ -369,7 +369,6 @@ static void InitializeLanguageStandard(LangOptions &Options, LangKind LK) {
     // FALL THROUGH.
   case lang_gnu99:
   case lang_c99:
-    Options.Digraphs = 1;
     Options.C99 = 1;
     Options.HexFloats = 1;
     // FALL THROUGH.
@@ -377,6 +376,8 @@ static void InitializeLanguageStandard(LangOptions &Options, LangKind LK) {
     Options.BCPLComment = 1;  // Only for C99/C++.
     // FALL THROUGH.
   case lang_c94:
+    Options.Digraphs = 1;     // C94, C99, C++.
+    // FALL THROUGH.
   case lang_c89:
     break;
   }
index 1c4dac315e8ec532454a24c91648914dd2da449e..bee0b51ab2ff4c7030d19fdb0b26401b59136f30 100644 (file)
@@ -24,7 +24,7 @@ struct LangOptions {
   unsigned Trigraphs         : 1;  // Trigraphs in source files.
   unsigned BCPLComment       : 1;  // BCPL-style // comments.
   unsigned DollarIdents      : 1;  // '$' allowed in identifiers.
-  unsigned Digraphs          : 1;  // C++ and C99
+  unsigned Digraphs          : 1;  // C94, C99 and C++
   unsigned HexFloats         : 1;  // C99 Hexadecimal float constants.
   unsigned C99               : 1;  // C99 Support
   unsigned Microsoft         : 1;  // Microsoft extensions.