mirror of
git://repo.or.cz/tinycc.git
synced 2026-06-17 15:44:18 +08:00
tccpp: Add the define __STDC_HOSTED__ [C99]
Some checks are pending
build and test / test-x86_64-linux (push) Waiting to run
build and test / test-x86_64-osx (push) Waiting to run
build and test / test-aarch64-osx (push) Waiting to run
build and test / test-x86_64-win32 (push) Waiting to run
build and test / test-i386-win32 (push) Waiting to run
build and test / test-armv7-linux (push) Waiting to run
build and test / test-aarch64-linux (push) Waiting to run
build and test / test-riscv64-linux (push) Waiting to run
Some checks are pending
build and test / test-x86_64-linux (push) Waiting to run
build and test / test-x86_64-osx (push) Waiting to run
build and test / test-aarch64-osx (push) Waiting to run
build and test / test-x86_64-win32 (push) Waiting to run
build and test / test-i386-win32 (push) Waiting to run
build and test / test-armv7-linux (push) Waiting to run
build and test / test-aarch64-linux (push) Waiting to run
build and test / test-riscv64-linux (push) Waiting to run
Usually defined to 1, but when using "-nostdlib", the value is 0 (required for C99) -- Regards ... Detlef
This commit is contained in:
parent
f4e01bfcab
commit
cdebce3079
1
tccpp.c
1
tccpp.c
@ -3737,6 +3737,7 @@ static void tcc_predefs(TCCState *s1, CString *cs, int is_asm)
|
|||||||
cstr_printf(cs, "#define __SIZEOF_LONG__ %d\n", LONG_SIZE);
|
cstr_printf(cs, "#define __SIZEOF_LONG__ %d\n", LONG_SIZE);
|
||||||
if (!is_asm) {
|
if (!is_asm) {
|
||||||
putdef(cs, "__STDC__");
|
putdef(cs, "__STDC__");
|
||||||
|
cstr_printf(cs, "#define __STDC_HOSTED__ %d\n", s1->nostdlib ? 0 : 1);
|
||||||
cstr_printf(cs, "#define __STDC_VERSION__ %dL\n", s1->cversion);
|
cstr_printf(cs, "#define __STDC_VERSION__ %dL\n", s1->cversion);
|
||||||
cstr_cat(cs,
|
cstr_cat(cs,
|
||||||
/* load more predefs and __builtins */
|
/* load more predefs and __builtins */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user