commit 9c488f726b50ebedc800791caada9aef20e92a6e
parent b4bedf30b77624450f8c1e9d3aafd7ab0e41075c
Author: Quentin Rameau <quinq@fifth.space>
Date: Wed, 15 Feb 2017 18:15:25 +0100
[cc1] Remove -o option
It's not necessary, the user can use shell redirection if needed.
Diffstat:
2 files changed, 2 insertions(+), 16 deletions(-)
diff --git a/cc1/cc1.h b/cc1/cc1.h
@@ -478,7 +478,7 @@ extern int lexmode, namespace;
extern int onlycpp, onlyheader;
extern unsigned curctx;
extern Symbol *curfun, *zero, *one;
-extern char *infile, *outfile;
+extern char *infile;
extern unsigned lineno;
extern char filenam[FILENAME_MAX];
diff --git a/cc1/main.c b/cc1/main.c
@@ -10,7 +10,7 @@ static char sccsid[] = "@(#) ./cc1/main.c";
#include "../inc/cc.h"
#include "cc1.h"
-char *argv0, *infile, *outfile;
+char *argv0, *infile;
int warnings;
jmp_buf recover;
@@ -22,13 +22,6 @@ int onlycpp, onlyheader;
extern int failure;
static void
-clean(void)
-{
- if (failure && outfile)
- remove(outfile);
-}
-
-static void
defmacro(char *macro)
{
char *p = strchr(macro, '=');
@@ -54,7 +47,6 @@ main(int argc, char *argv[])
char *cp;
int i;
- atexit(clean);
ilex();
icpp();
icode();
@@ -79,9 +71,6 @@ main(int argc, char *argv[])
case 'd':
DBGON();
break;
- case 'o':
- outfile = EARGF(usage());
- break;
case 'w':
warnings = 1;
break;
@@ -92,9 +81,6 @@ main(int argc, char *argv[])
if (argc > 1)
usage();
- if (outfile && !freopen(outfile, "w", stdout))
- die("error opening output: %s", strerror(errno));
-
for (i = 0; i < uflags.n; ++i)
undefmacro(uflags.s[i]);