aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorDavid MacKenzie <djm@cygnus>1993-06-17 22:55:38 +0000
committerDavid MacKenzie <djm@cygnus>1993-06-17 22:55:38 +0000
commit2de8edce8f710ad4992542d0b077d79a057375d3 (patch)
treee4647451d53eaf151fa7af768db1e31314e8883b /ld
parent4ce149f9700444f6ead6e3892d9806141afb08cd (diff)
downloadgdb-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')
-rw-r--r--ld/ChangeLog2
-rw-r--r--ld/ldgram.y11
2 files changed, 9 insertions, 4 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 079edc5..bb1e09a 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 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 '}'
;