tinycc-devel
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]