diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2004-01-08 08:23:31 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2004-01-08 08:23:31 +0000 |
commit | 662b798520d927038cb2ffc3e1a7662e4e2d22ab (patch) | |
tree | eff7bcf051bd51e1f609c251f1a51c9f40a9922b | |
parent | eb8106f9b63468b43268604bdc46d60e44f33e88 (diff) |
add stub for attribute "sentinel".
-rw-r--r-- | gnu/usr.bin/gcc/gcc/c-common.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/gnu/usr.bin/gcc/gcc/c-common.c b/gnu/usr.bin/gcc/gcc/c-common.c index 9c95cf3e7ba..7edd965cb97 100644 --- a/gnu/usr.bin/gcc/gcc/c-common.c +++ b/gnu/usr.bin/gcc/gcc/c-common.c @@ -769,6 +769,8 @@ static tree handle_bounded_attribute PARAMS ((tree *, tree, tree, int, bool *)); static tree handle_nonnull_attribute PARAMS ((tree *, tree, tree, int, bool *)); +static tree handle_sentinel_attribute PARAMS ((tree *, tree, tree, int, + bool *)); static tree handle_nothrow_attribute PARAMS ((tree *, tree, tree, int, bool *)); static tree handle_cleanup_attribute PARAMS ((tree *, tree, tree, int, @@ -860,6 +862,8 @@ const struct attribute_spec c_common_attribute_table[] = handle_tls_model_attribute }, { "nonnull", 0, -1, false, true, true, handle_nonnull_attribute }, + { "sentinel", 0, 0, false, true, true, + handle_sentinel_attribute }, { "nothrow", 0, 0, true, false, false, handle_nothrow_attribute }, { "may_alias", 0, 0, false, true, false, NULL }, @@ -6395,11 +6399,27 @@ handle_bounded_attribute (node, name, args, flags, no_add_attrs) tree name ATTRIBUTE_UNUSED; tree args ATTRIBUTE_UNUSED; int flags ATTRIBUTE_UNUSED; - bool *no_add_attrs ATTRIBUTE_UNUSED; + bool *no_add_attrs; { + *no_add_attrs = true; return NULL_TREE; } +/* Handle a "sentinel" attribute. + Just a stub for now. */ + +static tree +handle_sentinel_attribute (node, name, args, flags, no_add_attrs) + tree *node; + tree name ATTRIBUTE_UNUSED; + tree args; + int flags ATTRIBUTE_UNUSED; + bool *no_add_attrs; +{ + *no_add_attrs = true; + return NULL_TREE; +} + /* Handle the "nonnull" attribute. */ static tree handle_nonnull_attribute (node, name, args, flags, no_add_attrs) |