diff options
author | David MacKenzie <djm@cygnus> | 1993-06-17 22:55:38 +0000 |
---|---|---|
committer | David MacKenzie <djm@cygnus> | 1993-06-17 22:55:38 +0000 |
commit | 2de8edce8f710ad4992542d0b077d79a057375d3 (patch) | |
tree | e4647451d53eaf151fa7af768db1e31314e8883b /ld/ldgram.y | |
parent | 4ce149f9700444f6ead6e3892d9806141afb08cd (diff) | |
download | gdb-2de8edce8f710ad4992542d0b077d79a057375d3.zip gdb-2de8edce8f710ad4992542d0b077d79a057375d3.tar.gz gdb-2de8edce8f710ad4992542d0b077d79a057375d3.tar.bz2 |
* ldgram.y: Tweak grammar to make reporting of invalid options work.
Diffstat (limited to 'ld/ldgram.y')
-rw-r--r-- | ld/ldgram.y | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/ld/ldgram.y b/ld/ldgram.y index 5921c47..25cc0f3 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 '}' ; |