scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit ae6540fbe147eb182f05e94cd4072dc55b806196
parent 1258e68dd96e65545956fb658b9235e52c99d6a4
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sun, 31 Oct 2021 23:59:13 +0100

testscc: Fix /0159-typedef.c

Multiple redefinitions of typedef is allowed
only after C11. C99 considers it like an error.
Then, this test must protect the redifinition
of the typedef with a feature macro.

Diffstat:
Mtests/cc/execute/0159-typedef.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/cc/execute/0159-typedef.c b/tests/cc/execute/0159-typedef.c @@ -4,8 +4,11 @@ typedef struct Clock0link Clock0link; typedef struct Clock0link { int (*clock)(void); Clock0link* link; -} Clock0link; +}; +#if __STDC_VERSION__ >= 201112L +typedef struct Clock0link Clock0link; +#endif int f(void)