[cfe-dev] size of pointer and size of long

Alireza.Moshtaghi at microchip.com Alireza.Moshtaghi at microchip.com
Tue Oct 21 10:38:28 PDT 2008


In the recent changes to the preprocessor, new assumptions are added
that assume the size of pointer to be same as size of long (or size of
long long for 64 bit targets) 
Although this is to mimic gcc behavior, not all ports necessarily want
to follow suite. 
Our target does not support long long and assumes 32 bit long and 16 bit
pointer.

There is an assertion in the Preprocessor.cpp line 600 that assumes
current targets have sizeof(long) == sizeof(void *). This assumption is
incorrect.

Are these assumptions only in the preprocessor? Or there are other
places in clang that these assumptions are also made?

Regards,
Alireza Moshtaghi
Senior Software Engineer
Development Systems, Microchip Technology





More information about the cfe-dev mailing list