Usually defined to 1, but when using "-nostdlib", the value is 0 (required for C99) -- Regards ... Detlef
Unified · Split
| @@ -3737,6 +3737,7 @@ static void tcc_predefs(TCCState *s1, CString *cs, int is_asm) · 3736 unmodified lines | ||
| 3737 | 3737 | cstr_printf(cs, "#define __SIZEOF_LONG__ %d\n", LONG_SIZE); |
| 3738 | 3738 | if (!is_asm) { |
| 3739 | 3739 | putdef(cs, "__STDC__"); |
| 3740 | + cstr_printf(cs, "#define __STDC_HOSTED__ %d\n", s1->nostdlib ? 0 : 1); | |
| 3740 | 3741 | cstr_printf(cs, "#define __STDC_VERSION__ %dL\n", s1->cversion); |
| 3741 | 3742 | cstr_cat(cs, |
| 3742 | 3743 | /* load more predefs and __builtins */ |