This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: adding knowledge of the int_fastN_t types to the compiler


I suggest runtime-variable values depending on a
target-independent macro such as LONG_TYPE_SIZE. Also remember the
various GNU/Linux targets that do not use config/linux.h (alpha, rs6000,
sparc).

Thanks for both hints, I'll update the patch.


Note that the size is not enough for implementing <stdint.h>, you need the
actual type as well to get C++ mangling right. So I suggest using
type-name strings as is done for the other standard typedefs

That raises a question: darwin has, for example, in its system headers:


typedef signed char           int8_t;
[...]
/* 7.18.1.3 Fastest-width integer types */
typedef int8_t            int_fast8_t;
typedef int16_t          int_fast16_t;

To do the right thing, do I have to #define INT_FAST8_TYPE in darwin.h to be "int8_t", or "signed char"? I'd go for the second, but as I know nothing about C++, I'd like to be sure :)

Thanks,
FX

--
François-Xavier Coudert
http://www.homepages.ucl.ac.uk/~uccafco/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]