__option() directive can be mapped to GCC by defining the macro #define __option(x) x.
| CodeWarrior | GCC |
|---|---|
| __option(unsigned_char) | #define unsigned_char __CHAR_UNSIGNED__ |
| __option(longlong) | #if __LONG_LONG_MAX__ #define longlong 1 #else#define longlong 0#endif |
| __option(C99) | #define C99 ( __STDC_VERSION__ >= 199901L) |
| __option(little_endian) | #define little_endian __ARMEL__ |
| __option(dont_inline) | #define dont_inline __NO_INLINE__ |
| __option(ANSI_strict) | #define ANSI_strict __STRICT_ANSI__ |
| __option(k63d) | #define k63d 0 |
| __option(bool) | #define bool 0 |
| __option(wchar_type) | #ifdef __WCHAR_TYPE__#define wchar_type 1#else#define wchar_type 0#endif |
| __option(mpwc_newline) | #define mpwc_newline 0 |
| __option(optimize_for_size) | #define optimize_for_size __OPTIMIZE_SIZE__ |
| __option(rsqrt) | #define rsqrt 0 |
| __option(floatingpoint) | #ifdef __NOFLOAT__#define floatingpoint 0#else#define floatingpoint 1#endif |
| __option(sfp_emulation) | #define sfp_emulation _SOFT_FLOAT |
| __option(e500_floatingpoint) | #define e500_floatingpoint 0 |
| __option( e500v2_floatingpoint) | #define e500v2_floatingpoint 0 |
| __option(__thumb) | #define __thumb __thumb__ |
| __option(exceptions) | #define exceptions __EXCEPTIONS |