aboutsummaryrefslogtreecommitdiff
path: root/gas/read.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2005-01-31 14:26:13 +0000
committerJan Beulich <jbeulich@novell.com>2005-01-31 14:26:13 +0000
commit057f53c1ad39b24d7833c2eb23aec562c8c3a002 (patch)
tree26ad7ac7ca6bb3f17d7783ea997decae5fdd9aac /gas/read.c
parente87b2913a34b6a601214f3b3634e9c8949276526 (diff)
downloadgdb-057f53c1ad39b24d7833c2eb23aec562c8c3a002.zip
gdb-057f53c1ad39b24d7833c2eb23aec562c8c3a002.tar.gz
gdb-057f53c1ad39b24d7833c2eb23aec562c8c3a002.tar.bz2
gas/
2005-01-31 Jan Beulich <jbeulich@novell.com> * macro.c (do_formals): Adjust to no longer accept empty parameter names. (define_macro): Adjust to no longer accept empty macro name, garbage following the parameters, or macros that were previously defined. * read.c (s_bad_end): Declare. (potable): Add endm. Handler for endr and endm is s_bad_end. (s_bad_end): Rename from s_bad_endr. Adjust to handle both .endm and .endr. * read.h (s_bad_endr): Remove. gas/testsuite/ 2005-01-31 Jan Beulich <jbeulich@novell.com> * gas/macros/badarg.[ls]: New. * gas/macros/end.[ls]: New. * gas/macros/redef.[ls]: New. * gas/macros/macros.exp (run_list_test): Copy from elsewhere. Run new tests.
Diffstat (limited to 'gas/read.c')
-rw-r--r--gas/read.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/gas/read.c b/gas/read.c
index ffb208a..131937e 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -214,6 +214,7 @@ static int dwarf_file_string;
static void do_align (int, char *, int, int);
static void s_align (int, int);
static void s_altmacro (int);
+static void s_bad_end (int);
static int hex_float (int, char *);
static segT get_known_segmented_expression (expressionS * expP);
static void pobegin (void);
@@ -298,7 +299,8 @@ static const pseudo_typeS potable[] = {
{"endc", s_endif, 0},
{"endfunc", s_func, 1},
{"endif", s_endif, 0},
- {"endr", s_bad_endr, 0},
+ {"endm", s_bad_end, 0},
+ {"endr", s_bad_end, 1},
/* endef */
{"equ", s_set, 0},
{"equiv", s_set, 1},
@@ -2659,12 +2661,14 @@ s_purgem (int ignore ATTRIBUTE_UNUSED)
demand_empty_rest_of_line ();
}
-/* Handle the .rept pseudo-op. */
+/* Handle the .endm/.endr pseudo-ops. */
-void
-s_bad_endr (int ignore ATTRIBUTE_UNUSED)
+static void
+s_bad_end (int endr)
{
- as_warn (_(".endr encountered without preceeding .rept, .irc, or .irp"));
+ as_warn (_(".end%c encountered without preceeding %s"),
+ endr ? 'r' : 'm',
+ endr ? ".rept, .irp, or .irpc" : ".macro");
demand_empty_rest_of_line ();
}