From: David MacKenzie Date: Thu, 17 Jun 1993 22:55:38 +0000 (+0000) Subject: * ldgram.y: Tweak grammar to make reporting of invalid options work. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2de8edce8f710ad4992542d0b077d79a057375d3;p=binutils-gdb.git * ldgram.y: Tweak grammar to make reporting of invalid options work. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 079edc516a4..bb1e09a87c1 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -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. diff --git a/ld/ldgram.y b/ld/ldgram.y index 5921c47f8e7..25cc0f377d7 100644 --- a/ld/ldgram.y +++ b/ld/ldgram.y @@ -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 '}' ;