Hi, when ms-extensions are enabled, numbers with `i64` suffix are treated
as having type `__int64`; however, the uppercase version (`I64`) results in
a syntax error. The patch fixes this. Test case is included.
-- 
Martin
Index: lib/Lex/LiteralSupport.cpp
===================================================================
--- lib/Lex/LiteralSupport.cpp	(revision 116402)
+++ lib/Lex/LiteralSupport.cpp	(working copy)
@@ -431,6 +431,7 @@
       }
       continue;  // Success.
     case 'i':
+	case 'I':
       if (PP.getLangOptions().Microsoft) {
         if (isFPConstant || isLong || isLongLong) break;
 
@@ -467,7 +468,6 @@
         }
       }
       // fall through.
-    case 'I':
     case 'j':
     case 'J':
       if (isImaginary) break;   // Cannot be repeated.
Index: test/Lexer/ms-extensions.c
===================================================================
--- test/Lexer/ms-extensions.c	(revision 116402)
+++ test/Lexer/ms-extensions.c	(working copy)
@@ -4,6 +4,7 @@
 __int16 x2 = 4i16;
 __int32 x3 = 5i32;
 __int64 x5 = 0x42i64;
+__int64 x6 = 0x42I64;
 __int64 x4 = 70000000i128;
 
 __int64 y = 0x42i64u;  // expected-error {{invalid suffix}}
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to