[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] CValue
From: |
Edmund Grimley Evans |
Subject: |
[Tinycc-devel] CValue |
Date: |
Thu, 5 Mar 2015 22:13:17 +0000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Can anyone think of an argument for preserving the way TCC currently
stores an integer constant in one of the following union members?
int i;
unsigned int ui;
unsigned int ul; /* address (should be unsigned long on 64 bit cpu) */
long long ll;
unsigned long long ull;
To me it seems to make the implementation more complicated while
inviting people to rely on undefined behaviour such as signed overflow
and writing to one member of a union then reading from another. The
obvious thing to do is to use unsigned long long (or uint64_t or
uintmax_t) for all integer constants, but I've not actually tried
changing the code.
Edmund
- [Tinycc-devel] CValue,
Edmund Grimley Evans <=
- Prev by Date:
[Tinycc-devel] [PATCH] tccgen.c: Optimise 0<<x, 0>>x, -1>>x, x&0, x*0, x|-1, x%1.
- Next by Date:
Re: [Tinycc-devel] regressions on i386
- Previous by thread:
[Tinycc-devel] [PATCH] tccgen.c: Optimise 0<<x, 0>>x, -1>>x, x&0, x*0, x|-1, x%1.
- Next by thread:
Re: [Tinycc-devel] CValue
- Index(es):