[cfe-commits] r47543 - in /cfe/trunk: Driver/clang.cpp include/clang/Basic/LangOptions.h

Chris Lattner sabre at nondot.org
Sun Feb 24 20:01:39 PST 2008


Author: lattner
Date: Sun Feb 24 22:01:39 2008
New Revision: 47543

URL: http://llvm.org/viewvc/llvm-project?rev=47543&view=rev
Log:
enable digraphs for C94, thanks to Neil for pointing this out.

Modified:
    cfe/trunk/Driver/clang.cpp
    cfe/trunk/include/clang/Basic/LangOptions.h

Modified: cfe/trunk/Driver/clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/clang.cpp?rev=47543&r1=47542&r2=47543&view=diff

==============================================================================
--- cfe/trunk/Driver/clang.cpp (original)
+++ cfe/trunk/Driver/clang.cpp Sun Feb 24 22:01:39 2008
@@ -369,7 +369,6 @@
     // FALL THROUGH.
   case lang_gnu99:
   case lang_c99:
-    Options.Digraphs = 1;
     Options.C99 = 1;
     Options.HexFloats = 1;
     // FALL THROUGH.
@@ -377,6 +376,8 @@
     Options.BCPLComment = 1;  // Only for C99/C++.
     // FALL THROUGH.
   case lang_c94:
+    Options.Digraphs = 1;     // C94, C99, C++.
+    // FALL THROUGH.
   case lang_c89:
     break;
   }

Modified: cfe/trunk/include/clang/Basic/LangOptions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/LangOptions.h?rev=47543&r1=47542&r2=47543&view=diff

==============================================================================
--- cfe/trunk/include/clang/Basic/LangOptions.h (original)
+++ cfe/trunk/include/clang/Basic/LangOptions.h Sun Feb 24 22:01:39 2008
@@ -24,7 +24,7 @@
   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.





More information about the cfe-commits mailing list