This is the mail archive of the binutils@sourceware.org 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]
Other format: [Raw text]

[PATCH 1/2] gas: don't get confused by .asci{i,z} after .struct


While not allowed, this certainly shouldn't result in confusing the
programmer (by skipping lines in unexpected ways): Without returning,
demand_empty_rest_of_line() (at the end of the function) will demand
the _next_ line to be empty, and without the conditional we would
ignore the next line.

gas/
2015-12-07  Jan Beulich  <jbeulich@suse.com>

	* read.c (stringer): Conditionalize ignoring of the rest of the
	line. Return right away.

--- 2015-12-07/gas/read.c
+++ 2015-12-07/gas/read.c
@@ -5329,8 +5329,9 @@ stringer (int bits_appendzero)
   if (now_seg == absolute_section)
     {
       as_bad (_("strings must be placed into a section"));
-      c = 0;
-      ignore_rest_of_line ();
+      if (c)
+	ignore_rest_of_line ();
+      return;
     }
 
   while (c == ',' || c == '<' || c == '"')



Attachment: binutils-master-ascii-in-struct.patch
Description: Text document


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