aboutsummaryrefslogtreecommitdiff
path: root/gas/macro.h
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2005-05-06 06:50:31 +0000
committerJan Beulich <jbeulich@novell.com>2005-05-06 06:50:31 +0000
commit6eaeac8ad728ca5efd19aca44c559199dcb296e2 (patch)
treef123565d5b6198599c3684dc76e3d7eef6b58299 /gas/macro.h
parent26aca5f60e2dde898fb5e6d71859778f0b786f09 (diff)
downloadgdb-6eaeac8ad728ca5efd19aca44c559199dcb296e2.zip
gdb-6eaeac8ad728ca5efd19aca44c559199dcb296e2.tar.gz
gdb-6eaeac8ad728ca5efd19aca44c559199dcb296e2.tar.bz2
gas/
2005-05-06 Jan Beulich <jbeulich@novell.com> * macro.c (new_formal, del_formal): New. (do_formals): Use new_formal. Check for and parse qualifier. Warn if required argument has default value. Stop looking for more formal when there was a vararg one. (macro_expand_body): Use new_formal and del_formal. (macro_expand): Likewise. Initialize local variable err. Don't return immediately when encountering an error. Warn when keyword argument already had a value assigned. Eliminate duplicate clearing of argument value. When current positional argument matches parameter of vararg type, assign to it all the remaining arguments. Issue error when required parameter does not have value. (free_macro): Use del_formal. (expand_irp): Initialize formal type. Free buffers associated with formal prior to returning. * macro.h (struct formal_struct): Add new field 'type' with new enumeration type 'formal_type'. * doc/as.texinfo: Document macro parameter qualifiers. * NEWS: Mention new functionality. gas/testsuite/ 2005-05-06 Jan Beulich <jbeulich@novell.com> * gas/macros/badarg.s: Add check for bad qualifier specification. * gas/macros/badarg.l: Adjust. * gas/macros/vararg.[sd]: New. * gas/macros/macros.exp: Run new test.
Diffstat (limited to 'gas/macro.h')
-rw-r--r--gas/macro.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gas/macro.h b/gas/macro.h
index e6ade7c..4fdaa52 100644
--- a/gas/macro.h
+++ b/gas/macro.h
@@ -45,6 +45,12 @@ typedef struct formal_struct {
sb def; /* The default value. */
sb actual; /* The actual argument (changed on each expansion). */
int index; /* The index of the formal 0..formal_count - 1. */
+ enum formal_type
+ {
+ FORMAL_OPTIONAL,
+ FORMAL_REQUIRED,
+ FORMAL_VARARG
+ } type; /* The kind of the formal. */
} formal_entry;
/* Other values found in the index field of a formal_entry. */