* ldgram.y: Tweak grammar to make reporting of invalid options work.

This commit is contained in:
David MacKenzie 1993-06-17 22:55:38 +00:00
parent 4ce149f970
commit 2de8edce8f
2 changed files with 9 additions and 4 deletions

View 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.

View 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 '}'
;