scc

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

commit c5eea59cb17fc33ed9857467c0f62560ee437a0e
parent 9b4c6ff2e6afee8e2a97f96f21ab894c859e867e
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sat,  9 May 2015 19:45:42 +0200

Add pragma directive to cc1

Diffstat:
Mcc1/cpp.c | 12+++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/cc1/cpp.c b/cc1/cpp.c @@ -49,6 +49,14 @@ bad_include: error("#include expects \"FILENAME\" or <FILENAME>"); } +static char * +pragma(char *s) +{ + while (*s) + ++s; + return s; +} + char * preprocessor(char *p) { @@ -56,10 +64,12 @@ preprocessor(char *p) unsigned short n; static char **bp, *cmds[] = { "include", + "pragma", NULL }; static char *(*funs[])(char *) = { - include + include, + pragma }; while (isspace(*p))