History

tccgen.c: use correct type for storing long double constants

Daniel Glöckner committed 10 years ago

Commit c09b6ce1 parent 3dfee1d1 file · +6 −1Browse files

Unified · Split

tccgen.c+6−1
@@ -5538,7 +5538,12 @@ static void init_putv(CType *type, Section *sec, unsigned long c, · 5537 unmodified lines
5538 *(double *)ptr = vtop->c.d;5538 *(double *)ptr = vtop->c.d;
5539 break;5539 break;
5540 case VT_LDOUBLE:5540 case VT_LDOUBLE:
5541 *(long double *)ptr = vtop->c.ld;5541 if (sizeof(long double) == LDOUBLE_SIZE)
5542 *(long double *)ptr = vtop->c.ld;
5543 else if (sizeof(double) == LDOUBLE_SIZE)
5544 *(double *)ptr = vtop->c.ld;
5545 else
5546 tcc_error("can't cross compile long double constants");
5542 break;5547 break;
5543 case VT_LLONG:5548 case VT_LLONG:
5544 *(long long *)ptr |= (vtop->c.i & bit_mask) << bit_pos;5549 *(long long *)ptr |= (vtop->c.i & bit_mask) << bit_pos;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t