diff options
author | Jan Beulich <jbeulich@novell.com> | 2015-12-08 10:12:54 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2015-12-08 10:12:54 +0100 |
commit | 35c1a4396497a4009c99e5587aa908bb6df4e1e6 (patch) | |
tree | a57ca88ce884380deebbfe9be46e76dd9a7f88d8 /gas/read.c | |
parent | fbdf9406b0589e9b8bbfbbed606f3fff2d060b3c (diff) | |
download | gdb-35c1a4396497a4009c99e5587aa908bb6df4e1e6.zip gdb-35c1a4396497a4009c99e5587aa908bb6df4e1e6.tar.gz gdb-35c1a4396497a4009c99e5587aa908bb6df4e1e6.tar.bz2 |
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.
Diffstat (limited to 'gas/read.c')
-rw-r--r-- | gas/read.c | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -5310,6 +5310,15 @@ stringer (int bits_appendzero) md_cons_align (1); #endif + /* If we have been switched into the abs_section then we + will not have an obstack onto which we can hang strings. */ + if (now_seg == absolute_section) + { + as_bad (_("strings must be placed into a section")); + ignore_rest_of_line (); + return; + } + /* The following awkward logic is to parse ZERO or more strings, comma separated. Recall a string expression includes spaces before the opening '\"' and spaces after the closing '\"'. @@ -5324,14 +5333,6 @@ stringer (int bits_appendzero) { c = ','; /* Do loop. */ } - /* If we have been switched into the abs_section then we - will not have an obstack onto which we can hang strings. */ - if (now_seg == absolute_section) - { - as_bad (_("strings must be placed into a section")); - c = 0; - ignore_rest_of_line (); - } while (c == ',' || c == '<' || c == '"') { |