From f8d08b1e1a13bdbdd96e667ab5c5650b03c97a6f Mon Sep 17 00:00:00 2001 From: acqn Date: Tue, 26 Jul 2022 21:40:19 +0800 Subject: [PATCH] More post-C99 predefined macros. --- src/cc65/compile.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/cc65/compile.c b/src/cc65/compile.c index 4b3584147..78d0817e3 100644 --- a/src/cc65/compile.c +++ b/src/cc65/compile.c @@ -407,6 +407,14 @@ void Compile (const char* FileName) /* DefineNumericMacro ("__STDC__", 1); <- not now */ DefineNumericMacro ("__STDC_HOSTED__", 1); + /* Stuff unsupported */ + if (IS_Get (&Standard) > STD_C99) { + DefineNumericMacro ("__STDC_NO_ATOMICS__", 1); + DefineNumericMacro ("__STDC_NO_COMPLEX__", 1); + DefineNumericMacro ("__STDC_NO_THREADS__", 1); + DefineNumericMacro ("__STDC_NO_VLA__", 1); + } + /* Create the base lexical level */ EnterGlobalLevel ();