scc

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

commit 13768a26eb296d9b29d83256f6c19112ead43c0d
parent 48f5c933ab39f441a2d488e74769fd318be12c73
Author: Quentin Rameau <quinq@fifth.space>
Date:   Sat, 10 Dec 2016 14:59:54 +0100

[cpp] adjust __STDC_VERSION__ depending on cstd.h

Diffstat:
Mcc1/cpp.c | 2+-
Minc/c89/cstd.h | 3+++
Minc/c99/cstd.h | 3+++
3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/cc1/cpp.c b/cc1/cpp.c @@ -80,7 +80,7 @@ icpp(void) strftime(stime, sizeof(stime), "\"%H:%M:%S\"", tm); defdefine("__DATE__", sdate, "built-in"); defdefine("__TIME__", stime, "built-in"); - defdefine("__STDC_VERSION__", "199409L", "built-in"); + defdefine("__STDC_VERSION__", STDC_VERSION, "built-in"); defdefine("__LINE__", NULL, "built-in"); defdefine("__FILE__", NULL, "built-in"); diff --git a/inc/c89/cstd.h b/inc/c89/cstd.h @@ -1,5 +1,8 @@ /* See LICENSE file for copyright and license details. */ +#define STDC_VERSION "199409L" + +/* Translation limits */ /* * 15 nesting levels of compound statements, iteration control * structures, and selection control structures diff --git a/inc/c99/cstd.h b/inc/c99/cstd.h @@ -1,5 +1,8 @@ /* See LICENSE file for copyright and license details. */ +#define STDC_VERSION "199901L" + +/* Translation limits */ /* * 127 nesting levels of blocks */