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]

Re: Error Given for Missing Symbol Name


On Thu, Jul 26, 2001 at 03:34:02PM -0700, Tracy.Kuhrt@microchip.com wrote:
> 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.

Thanks.  I've applied a slightly different patch.  Next time, please send
a ChangeLog entry too.

gas/ChangeLog
	* read.c (s_set): Check for missing symbol name.

-- 
Alan Modra

Index: gas/read.c
===================================================================
RCS file: /cvs/src/src/gas/read.c,v
retrieving revision 1.43
diff -u -p -r1.43 read.c
--- read.c	2001/07/10 09:45:50	1.43
+++ read.c	2001/07/27 08:29:36
@@ -2737,6 +2737,15 @@ s_set (equiv)
   name = input_line_pointer;
   delim = get_symbol_end ();
   end_name = input_line_pointer;
+
+  if (name[0] == '\0')
+    {
+      as_bad (_("expected symbol name"));
+      *end_name = delim;
+      discard_rest_of_line ();
+      return;
+    }
+
   *end_name = delim;
   SKIP_WHITESPACE ();
 


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