scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit b28fbe8ac9f8a23b909f200723f8947e6f94155e
parent b3f2f478c75b4649c5bdb99c0d23b681ec2f18fe
Author: Quentin Rameau <quinq@fifth.space>
Date:   Tue, 28 Jun 2016 19:05:29 +0200

[cpp] define keywords before defining macros

Diffstat:
Mcc1/cpp.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cc1/cpp.c b/cc1/cpp.c @@ -81,20 +81,20 @@ icpp(void) {NULL, 0, 0} }; + keywords(keys, NS_CPPCLAUSES); + t = time(NULL); tm = localtime(&t); strftime(sdate, sizeof(sdate), "-1#\"%b %d %Y\"", tm); strftime(stime, sizeof(stime), "-1#\"%H:%M:%S\"", tm); defmacro("__DATE__")->u.s = sdate; defmacro("__TIME__")->u.s = stime; - defmacro("__STDC_VERSION__")->u.s = "-1#199409L"; symline = defmacro("__LINE__"); symfile = defmacro("__FILE__"); for (bp = list; *bp; ++bp) defmacro(*bp)->u.s = "-1#1"; - keywords(keys, NS_CPPCLAUSES); } static void