+2008-03-13 Evandro Menezes <evandro@yahoo.com>
+
+ PR gas/5895
+ * read.c (s_mexit): Warn if attempting to exit a macro when not
+ inside a macro definition.
+
2008-03-13 Alan Modra <amodra@bigpond.net.au>
* Makefile.am: Run "make dep-am".
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. */
+2008-03-13 Nick Clifton <nickc@redhat.com>
+
+ PR gas/5895
+ * gas/macros/exit.s: New test case.
+ * gas/macros/macros.exp: Run the new test, expect it to produce an
+ error result.
+
2008-03-09 Paul Brook <paul@codesourcery.com>
* gas/arm/vfpv3-d16-bad.d: New test.
--- /dev/null
+
+.macro MAC
+ BAD_OP
+.endm
+
+.exitm
+
+ MAC
if [string match "" [lindex [gas_run ../all/excl.s "-o /dev/null" ""] 0]] {
run_dump_test paren
}
+
+# PR 58925: A .exitm pseudo-op outside of a macro definition
+# prevented the assembler from parsing the rest of the file,
+# and hence catching an erroroneous instruction.
+gas_test_error "exit.s" "" ".exitm outside of a macro"