* ldgram.y: Tweak grammar to make reporting of invalid options work.
authorDavid MacKenzie <djm@cygnus>
Thu, 17 Jun 1993 22:55:38 +0000 (22:55 +0000)
committerDavid MacKenzie <djm@cygnus>
Thu, 17 Jun 1993 22:55:38 +0000 (22:55 +0000)
ld/ChangeLog
ld/ldgram.y

index 079edc516a4a0640c716bf37a237ffaae798ee87..bb1e09a87c1943cd48da3ff06ee752fe18f1fa09 100644 (file)
@@ -1,5 +1,7 @@
 Thu Jun 17 14:33:09 1993  David J. Mackenzie  (djm@thepub.cygnus.com)
 
+       * ldgram.y: Tweak grammar to make reporting of invalid options work.
+
        * Makefile.in (.cc.o): Restore .SUFFIXES entry for .cc
        and .cc.o rule.
 
index 5921c47f8e7c9c55f1f69782c91d6b6368432571..25cc0f377d7e762e0910c68198bc620e9f7be12f 100644 (file)
@@ -362,11 +362,14 @@ command_line_option:
                {
                  g_switch_value = yylval.integer;
                }
-       | '-' NAME
-                { einfo("%P%F illegal option -- %s\n", $2);  }
         |      NAME
-               { lang_add_input_file($1,lang_input_file_is_file_enum,
-                                (char *)NULL); }
+               {
+                 if (*$1 == '-')
+                   einfo("%P%F: illegal option -- %s\n", $1);
+                 else
+                   lang_add_input_file($1,lang_input_file_is_file_enum,
+                                       (char *)NULL);
+               }
        | '{' script_file '}'  
        ;
 
This page took 0.027993 seconds and 4 git commands to generate.