cproc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/cproc
Log | Files | Refs | Submodules | README | LICENSE

commit 448e9cce6d8756a2cca1c389905aed96d97cfedc
parent 732a27073509badbd23395e75f2578513fa9716c
Author: Michael Forney <mforney@mforney.org>
Date:   Tue, 21 May 2019 14:02:39 -0700

Handle alternate keywords in the compiler itself

Diffstat:
Mconfigure | 10----------
Mpp.c | 8++++++++
2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/configure b/configure @@ -139,16 +139,6 @@ static char *preprocesscmd[] = { /* ignore attributes and extension markers */ "-D", "__attribute__(x)=", "-D", "__extension__=", - - /* alternate keywords */ - "-D", "__alignof__=_Alignof", - "-D", "__asm=__asm__", - "-D", "__inline=inline", - "-D", "__inline__=inline", - "-D", "__signed=signed", - "-D", "__signed__=signed", - "-D", "__thread=_Thread_local", - "-D", "__volatile__=volatile", $defines}; static char *codegencmd[] = {"$DEFAULT_QBE", "-t", "$qbetarget"}; static char *assemblecmd[] = {"$DEFAULT_ASSEMBLER"}; diff --git a/pp.c b/pp.c @@ -26,8 +26,16 @@ keyword(struct token *tok) {"_Noreturn", T_NORETURN}, {"_Static_assert", T_STATIC_ASSERT}, {"_Thread_local", T_THREAD_LOCAL}, + {"__alignof__", T_ALIGNOF}, + {"__asm", T__ASM__}, {"__asm__", T__ASM__}, + {"__inline", TINLINE}, + {"__inline__", TINLINE}, + {"__signed", TSIGNED}, + {"__signed__", TSIGNED}, + {"__thread", T_THREAD_LOCAL}, {"__typeof__", T__TYPEOF__}, + {"__volatile__", TVOLATILE}, {"auto", TAUTO}, {"break", TBREAK}, {"case", TCASE},