aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-10-12 08:56:17 +0000
committerNick Clifton <nickc@redhat.com>2001-10-12 08:56:17 +0000
commit7f28ab9dc7011dbaffb3d2566598ead9ebc7226f (patch)
tree9e73c03e3754e0413105885474caed47727973ee
parent65bf64b30a1fe883eeb46927c1294a66b73af529 (diff)
downloadgdb-7f28ab9dc7011dbaffb3d2566598ead9ebc7226f.zip
gdb-7f28ab9dc7011dbaffb3d2566598ead9ebc7226f.tar.gz
gdb-7f28ab9dc7011dbaffb3d2566598ead9ebc7226f.tar.bz2
Generate warning message if .endr is used without preceeding .rept/.irc/.irp
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/read.c11
-rw-r--r--gas/read.h1
3 files changed, 17 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 01e58d9..eddda37 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,10 @@
2001-10-12 Nick Clifton <nickc@cambridge.redhat.com>
+ * read.c (s_bad_endr): New function. Issues a warning message
+ about a bad use of the .rept pseudo op.
+ (po_table[]): Add .endr.
+ * read.h: Prototype s_bad_endr.
+
* CONTRIBUTORS: Update contact email address.
2001-10-11 Kazu Hirata <kazu@hxi.com>
diff --git a/gas/read.c b/gas/read.c
index 52de12d..5fc9511 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -315,6 +315,7 @@ static const pseudo_typeS potable[] = {
{"endc", s_endif, 0},
{"endfunc", s_func, 1},
{"endif", s_endif, 0},
+ {"endr", s_bad_endr, 0},
/* endef */
{"equ", s_set, 0},
{"equiv", s_set, 1},
@@ -2694,6 +2695,16 @@ s_purgem (ignore)
/* Handle the .rept pseudo-op. */
void
+s_bad_endr (ignore)
+ int ignore ATTRIBUTE_UNUSED;
+{
+ as_warn (_(".endr encountered without preceeding .rept, .irc, or .irp"));
+ demand_empty_rest_of_line ();
+}
+
+/* Handle the .rept pseudo-op. */
+
+void
s_rept (ignore)
int ignore ATTRIBUTE_UNUSED;
{
diff --git a/gas/read.h b/gas/read.h
index a56781c..60b4bed 100644
--- a/gas/read.h
+++ b/gas/read.h
@@ -139,6 +139,7 @@ extern void s_align_bytes PARAMS ((int arg));
extern void s_align_ptwo PARAMS ((int));
extern void s_app_file PARAMS ((int));
extern void s_app_line PARAMS ((int));
+extern void s_bad_endr PARAMS ((int));
extern void s_comm PARAMS ((int));
extern void s_data PARAMS ((int));
extern void s_desc PARAMS ((int));