[cairo] Missing const in cairo API ?
aetdcarbonne at free.fr
Mon Oct 2 15:08:41 PDT 2006
Robert O'Callahan a écrit :
> On Sun, 2006-10-01 at 20:31 -0400, Behdad Esfahbod wrote:
>> And I'm not sure if adding const keywords in the API is even safe. The
>> compiler uses consts to make certain assumptions. Can't think of
>> anything in particular here though.
> Compilers do not generally assume that "const" data is unchanging, since
> in most cases the compiler has to assume there are non-const aliases to
> data passed in as a const parameter.
Isn't "strict-alias" compiler option related to this kind of assumption ?
More information about the cairo