On Fri, Nov 30, 2012 at 1:50 PM, Stephen Canon <[email protected]> wrote:
> • fixed indentation
> • i32 and i64 will now have the correct size (instead of i32 being "long"
> even on LP64 platforms). We can't do this for i8 or i16 without more
> invasive changes, so those will wait for another patch.
> • MS literals get sign- or zero-extended as appropriate.
> • MS literal path is generally cleaner.
> • adopted hasInt128Type().
+ if (sizeof(__uint64_t) <= sizeof(int)) {
+ ASSERT_TRUE(PrintedStmtMSMatches(
+ "void A() { 1i64, -1i64, 1ui64; }",
+ "A", "1 , -1 , 1U"));
+ } else if (sizeof(__uint64_t) <= sizeof(long)) {
+ ASSERT_TRUE(PrintedStmtMSMatches(
+ "void A() { 1i64, -1i64, 1ui64; }",
+ "A", "1L , -1L , 1UL"));
+ } else {
+ ASSERT_TRUE(PrintedStmtMSMatches(
+ "void A() { 1i64, -1i64, 1ui64; }",
+ "A", "1LL , -1LL , 1ULL"));
+ }
This does not look portable. Why can't we fold sizeof(__uint64_t) to
8? And also, this assumes that clang will target the same platform as
host...
Dmitri
--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <[email protected]>*/
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits