This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Error Given for Missing Symbol Name


I would like to suggest the following patch so that an error is given to 
the user if they do not specify the symbol name in the .equ, .equiv, or 
.set directives.

Tracy


Index: gas/read.c
===================================================================
RCS file: /cvs/src/gas/read.c,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 read.c
--- gas/read.c  16 Apr 2001 20:14:37 -0000      1.1.1.2
+++ gas/read.c  26 Jul 2001 22:22:43 -0000
@@ -2743,6 +2743,14 @@ s_set (equiv)
   input_line_pointer++;
   *end_name = 0;
 
+  if (strlen(name) == 0)
+    {
+      as_bad (_("Expected symbol name.  Ignoring directive."));
+      *end_name = delim;
+      discard_rest_of_line ();
+      return;
+    }
+
   if (name[0] == '.' && name[1] == '\0')
     {
       /* Turn '. = mumble' into a .org mumble.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]