aboutsummaryrefslogtreecommitdiff
path: root/gas/read.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/read.c')
-rw-r--r--gas/read.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gas/read.c b/gas/read.c
index 8163c5a..ec69c4e 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -2554,8 +2554,13 @@ s_macro (int ignore ATTRIBUTE_UNUSED)
void
s_mexit (int ignore ATTRIBUTE_UNUSED)
{
- cond_exit_macro (macro_nest);
- buffer_limit = input_scrub_next_buffer (&input_line_pointer);
+ if (macro_nest)
+ {
+ cond_exit_macro (macro_nest);
+ buffer_limit = input_scrub_next_buffer (&input_line_pointer);
+ }
+ else
+ as_warn (_("ignoring macro exit outside a macro definition."));
}
/* Switch in and out of MRI mode. */