On Sat, Sep 19, 2015 at 05:17:52PM +0200, John Tytgat wrote: > On 09/19/2015 04:29 PM, Gavin Wraith wrote: > >[...] > >The Acorn C manual had a useful chapter "Implementation Details" > >that assured me that ints and longs were 32-bit and so on. > >Where do I find something similar for the RISC OS implementation > >of 4.7.4? There is a dizzying range of possibilities for > >what numbers are in Lua. New to Lua 5.3 is a distinction > >(in the C code) between the types LUA_NUMBER and LUA_INTEGER > >so I need to check out what GCC is producing. > > Probably the most interesting info is that int/long/wchar_t/wint_t > are signed 32 bit, char is unsigned, long long/long double 8 bytes > wide, short 2 bytes wide. AFAIK all in sync with Norcroft C > implementation details.
If you have control over what types Lua is using (because there's a header file with typedefs somewhere), and you're using C99 or later, I recommend using stdint.h. This defines a series of types like uint32_t which do exactly what they say on the tin, so there's no worries that another compiler or another platform will do something different. Theo _______________________________________________ GCCSDK mailing list gcc@gccsdk.riscos.info Bugzilla: http://www.riscos.info/bugzilla/index.cgi List Info: http://www.riscos.info/mailman/listinfo/gcc Main Page: http://www.riscos.info/index.php/GCCSDK