Mercurial > hg > CbC > old > device
diff test/macro.c @ 623:4e08fbf6754b
macro stringrise, switch unsginged mungle
author | kono |
---|---|
date | Sun, 10 Sep 2006 22:11:41 +0900 |
parents | e4e007f4026d |
children | 0554b7f985ee |
line wrap: on
line diff
--- a/test/macro.c Thu Sep 07 11:50:17 2006 +0900 +++ b/test/macro.c Sun Sep 10 22:11:41 2006 +0900 @@ -79,6 +79,26 @@ return 0; } +/* For GCC 2.7 and later, we can use specific type-size attributes. */ +# define __intN_t(N, MODE) \ + typedef int int##N##_t __attribute__ ((__mode__ (MODE))) +# define __u_intN_t(N, MODE) \ + typedef unsigned int u_int##N##_t __attribute__ ((__mode__ (MODE))) + +# ifndef __int8_t_defined +# define __int8_t_defined +__intN_t (8, __QI__); +__intN_t (16, __HI__); +__intN_t (32, __SI__); +__intN_t (64, __DI__); +# endif + +__u_intN_t (8, __QI__); +__u_intN_t (16, __HI__); +__u_intN_t (32, __SI__); +__u_intN_t (64, __DI__); + + int tmp() #if 0 {