Add `long long` as an alias for `long`

This commit is contained in:
Rui Ueyama 2020-04-20 21:53:23 +09:00
parent 287906abb8
commit f46370ef98
2 changed files with 4 additions and 0 deletions

View File

@ -271,6 +271,8 @@ static Type *declspec(Token **rest, Token *tok) {
break;
case LONG:
case LONG + INT:
case LONG + LONG:
case LONG + LONG + INT:
ty = ty_long;
break;
default:

View File

@ -8,6 +8,8 @@ int main() {
ASSERT(8, ({ long int x; sizeof(x); }));
ASSERT(8, ({ int long x; sizeof(x); }));
ASSERT(8, ({ long long x; sizeof(x); }));
printf("OK\n");
return 0;
}