Add "long double" as an alias for "double"

This commit is contained in:
Rui Ueyama 2020-08-26 14:51:06 +09:00
parent ffea4219b1
commit 9bf96124ba
2 changed files with 3 additions and 0 deletions

View File

@ -528,6 +528,7 @@ static Type *declspec(Token **rest, Token *tok, VarAttr *attr) {
ty = ty_float;
break;
case DOUBLE:
case LONG + DOUBLE:
ty = ty_double;
break;
default:

View File

@ -96,6 +96,8 @@ int main() {
ASSERT(4, sizeof(1f/2));
ASSERT(8, sizeof(1.0/2));
ASSERT(8, sizeof(long double));
printf("OK\n");
return 0;
}