summaryrefslogtreecommitdiff
path: root/usr.bin/pcc/cc
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2007-09-27 20:00:24 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2007-09-27 20:00:24 +0000
commite2068541246f750fc8585db75a7d12475ff5193a (patch)
tree6e34ca43639d9a83630b6a9b48b53b7a92d1db6f /usr.bin/pcc/cc
parent2736758c95141eb666f6d5224384a044cd659aa2 (diff)
flag usage checks and -E with outfile. from Jeremy C. Reed via ragge's
repo.
Diffstat (limited to 'usr.bin/pcc/cc')
-rw-r--r--usr.bin/pcc/cc/cc/cc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/pcc/cc/cc/cc.c b/usr.bin/pcc/cc/cc/cc.c
index 58e4b8019da..59fc77c8d11 100644
--- a/usr.bin/pcc/cc/cc/cc.c
+++ b/usr.bin/pcc/cc/cc/cc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cc.c,v 1.12 2007/09/24 16:04:01 otto Exp $ */
+/* $OpenBSD: cc.c,v 1.13 2007/09/27 20:00:23 otto Exp $ */
/*
* Copyright(C) Caldera International Inc. 2001-2002. All rights reserved.
*
@@ -346,8 +346,8 @@ main(int argc, char *argv[])
/* Sanity checking */
if (nc == 0 && nl == 0)
errorx(8, "no input files");
- if (outfile && (cflag || sflag) && nc > 1)
- errorx(8, "-o given with -c || -S and more than one file");
+ if (outfile && (cflag || sflag || Eflag) && nc > 1)
+ errorx(8, "-o given with -c || -E || -S and more than one file");
if (outfile && clist[0] && strcmp(outfile, clist[0]) == 0)
errorx(8, "output file will be clobbered");
#if 0
@@ -433,6 +433,8 @@ main(int argc, char *argv[])
av[na++] = clist[i];
if (!Eflag && !Mflag)
av[na++] = tmp4;
+ if (Eflag && outfile)
+ av[na++] = outfile;
av[na++]=0;
if (callsys(passp, av))
{exfail++; eflag++;}