Accomodate ANSI C compiler better
authorceriel <none@none>
Wed, 13 Nov 1991 17:07:30 +0000 (17:07 +0000)
committerceriel <none@none>
Wed, 13 Nov 1991 17:07:30 +0000 (17:07 +0000)
fast/driver/afcc.1
fast/driver/driver.c

index 1826ae0..a95b5b5 100644 (file)
@@ -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
index 5230571..f28f10a 100644 (file)
@@ -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]);