From: ceriel Date: Wed, 13 Nov 1991 17:07:30 +0000 (+0000) Subject: Accomodate ANSI C compiler better X-Git-Tag: release-5-5~634 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=36de35bcd23a8d170f6065ae62780eebac921e0a;p=ack.git Accomodate ANSI C compiler better --- diff --git a/fast/driver/afcc.1 b/fast/driver/afcc.1 index 1826ae06f..a95b5b578 100644 --- a/fast/driver/afcc.1 +++ b/fast/driver/afcc.1 @@ -1,6 +1,6 @@ .TH AFCC 1 .SH NAME -afcc \- fast ACK compatible ANSI C compiler +afcc \- fast ACK compatible C compiler .SH SYNOPSIS .B afcc [ @@ -10,6 +10,12 @@ afcc \- fast ACK compatible ANSI C compiler .B \-v ] [ +.B \-ansi +] +[ +.B \-R +] +[ .B \-vn ] [ \fB\-D\fIname\fR ] @@ -77,6 +83,14 @@ You can specify a name for the executable by using the option. .SH OPTIONS .LP +.IP \fB\-ansi\fP +Use the ANSI C compiler instead of the K&R one. This flag must be first, +and must also be used when linking through +.I afcc +or +.I ack. +.IP \fB\-R\fP +test for more compatibility with Kernighan & Ritchie C [1]. .IP \fB\-c\fP .br Suppress the loading phase of the compilation, and force an object module to diff --git a/fast/driver/driver.c b/fast/driver/driver.c index 5230571ef..f28f10a5c 100644 --- a/fast/driver/driver.c +++ b/fast/driver/driver.c @@ -225,6 +225,12 @@ lang_opt(str) char *str; { switch(str[1]) { + case 'R': + if (! ansi_c) { + append(&COMP_FLAGS, str); + return 1; + } + break; case '-': /* debug options */ append(&COMP_FLAGS, str); return 1; @@ -236,6 +242,10 @@ lang_opt(str) } break; case 'w': /* disable warnings */ + if (! ansi_c) { + append(&COMP_FLAGS, str); + return 1; + } if (str[2]) { str[1] = '-'; append(&COMP_FLAGS, &str[1]);