Unified · Split
| @@ -2527,7 +2527,9 @@ static int parse_btype(CType *type, AttributeDef *ad) · 2526 unmodified lines | ||
| 2527 | 2527 | case TOK_LONG: |
| 2528 | 2528 | next(); |
| 2529 | 2529 | if ((t & VT_BTYPE) == VT_DOUBLE) { |
| 2530 | +#ifndef TCC_TARGET_PE | |
| 2530 | 2531 | t = (t & ~VT_BTYPE) | VT_LDOUBLE; |
| 2532 | +#endif | |
| 2531 | 2533 | } else if ((t & VT_BTYPE) == VT_LONG) { |
| 2532 | 2534 | t = (t & ~VT_BTYPE) | VT_LLONG; |
| 2533 | 2535 | } else { |
| @@ -2544,7 +2546,11 @@ static int parse_btype(CType *type, AttributeDef *ad) · 10 unmodified lines | ||
| 2544 | 2546 | case TOK_DOUBLE: |
| 2545 | 2547 | next(); |
| 2546 | 2548 | if ((t & VT_BTYPE) == VT_LONG) { |
| 2549 | +#ifdef TCC_TARGET_PE | |
| 2550 | + t = (t & ~VT_BTYPE) | VT_DOUBLE; | |
| 2551 | +#else | |
| 2547 | 2552 | t = (t & ~VT_BTYPE) | VT_LDOUBLE; |
| 2553 | +#endif | |
| 2548 | 2554 | } else { |
| 2549 | 2555 | u = VT_DOUBLE; |
| 2550 | 2556 | goto basic_type1; |
| @@ -1743,9 +1743,14 @@ void parse_number(const char *p) · 1742 unmodified lines | ||
| 1743 | 1743 | tokc.f = (float)d; |
| 1744 | 1744 | } else if (t == 'L') { |
| 1745 | 1745 | ch = *p++; |
| 1746 | +#ifdef TCC_TARGET_PE | |
| 1747 | + tok = TOK_CDOUBLE; | |
| 1748 | + tokc.d = d; | |
| 1749 | +#else | |
| 1746 | 1750 | tok = TOK_CLDOUBLE; |
| 1747 | 1751 | /* XXX: not large enough */ |
| 1748 | 1752 | tokc.ld = (long double)d; |
| 1753 | +#endif | |
| 1749 | 1754 | } else { |
| 1750 | 1755 | tok = TOK_CDOUBLE; |
| 1751 | 1756 | tokc.d = d; |
| @@ -1794,8 +1799,13 @@ void parse_number(const char *p) · 42 unmodified lines | ||
| 1794 | 1799 | tokc.f = strtof(token_buf, NULL); |
| 1795 | 1800 | } else if (t == 'L') { |
| 1796 | 1801 | ch = *p++; |
| 1802 | +#ifdef TCC_TARGET_PE | |
| 1803 | + tok = TOK_CDOUBLE; | |
| 1804 | + tokc.d = strtod(token_buf, NULL); | |
| 1805 | +#else | |
| 1797 | 1806 | tok = TOK_CLDOUBLE; |
| 1798 | 1807 | tokc.ld = strtold(token_buf, NULL); |
| 1808 | +#endif | |
| 1799 | 1809 | } else { |
| 1800 | 1810 | tok = TOK_CDOUBLE; |
| 1801 | 1811 | tokc.d = strtod(token_buf, NULL); |