[cfe-dev] More long long
Neil Booth
neil at daikokuya.co.uk
Tue Aug 28 15:30:38 PDT 2007
Literals too.
Neil.
-------------- next part --------------
Index: test/Sema/c89.c
===================================================================
--- test/Sema/c89.c (revision 41557)
+++ test/Sema/c89.c (working copy)
@@ -24,3 +24,5 @@
void test3(int i) {
int A[i]; /* expected-warning {{variable length array}} */
}
+
+int test4 = 0LL; /* expected-warning {{long long}} */
Index: Sema/SemaExpr.cpp
===================================================================
--- Sema/SemaExpr.cpp (revision 41557)
+++ Sema/SemaExpr.cpp (working copy)
@@ -156,6 +156,11 @@
} else {
QualType t;
+ // long long is a C99 feature.
+ if (!getLangOptions().C99 && !getLangOptions().CPlusPlus0x &&
+ Literal.isLongLong)
+ Diag(Tok.getLocation(), diag::ext_longlong);
+
// Get the value in the widest-possible width.
llvm::APInt ResultVal(Context.Target.getIntMaxTWidth(Tok.getLocation()), 0);
More information about the cfe-dev
mailing list