win32: treat long double as double

This commit is contained in:
grischka
2009-07-18 22:07:17 +02:00
parent 97738d1ae9
commit 9fda4f4248
2 changed files with 16 additions and 0 deletions

View File

@ -2527,7 +2527,9 @@ static int parse_btype(CType *type, AttributeDef *ad)
case TOK_LONG:
next();
if ((t & VT_BTYPE) == VT_DOUBLE) {
#ifndef TCC_TARGET_PE
t = (t & ~VT_BTYPE) | VT_LDOUBLE;
#endif
} else if ((t & VT_BTYPE) == VT_LONG) {
t = (t & ~VT_BTYPE) | VT_LLONG;
} else {
@ -2544,7 +2546,11 @@ static int parse_btype(CType *type, AttributeDef *ad)
case TOK_DOUBLE:
next();
if ((t & VT_BTYPE) == VT_LONG) {
#ifdef TCC_TARGET_PE
t = (t & ~VT_BTYPE) | VT_DOUBLE;
#else
t = (t & ~VT_BTYPE) | VT_LDOUBLE;
#endif
} else {
u = VT_DOUBLE;
goto basic_type1;