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
55385538 *(double *)ptr = vtop->c.d;
55395539 break;
55405540 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");
55425547 break;
55435548 case VT_LLONG:
55445549 *(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