scc

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

commit c3a50031fc81663f985a3abfc0efa2c0ea3ee5eb
parent b5225423a6f068c95a96c56690b5fb2ecf692df3
Author: Quentin Rameau <quinq@fifth.space>
Date:   Mon, 13 Mar 2017 12:32:37 +0100

[driver] In cpp mode without pathname, read stdin

Diffstat:
Mdriver/posix/scc.c | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/driver/posix/scc.c b/driver/posix/scc.c @@ -281,6 +281,8 @@ toolfor(char *file) return LD; if (!strcmp(dot, ".a")) return LD; + } else if (!strcmp(file, "-")) { + return CC1; } die("scc: do not recognize filetype of %s", file); @@ -504,6 +506,9 @@ operand: for (; *argv; --argc, ++argv) goto operand; + if (Eflag && linkchain.n == 0) + newitem(&linkchain, "-"); + if (Eflag && Mflag || (Eflag || Mflag) && (Sflag || kflag) || linkchain.n == 0 ||