diff options
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/utils.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 5aece2c..cbe8cad 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2010-12-22 Nathan Froyd <froydnj@codesourcery.com> + + * gcc-interface/utils.c (handle_nonnull_attribute): Use prototype_p. + (handle_sentinel_attribute): Likewise. + 2010-12-20 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> PR bootstrap/47027 diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index d044957..b92e916 100644 --- a/gcc/ada/gcc-interface/utils.c +++ b/gcc/ada/gcc-interface/utils.c @@ -5065,7 +5065,7 @@ handle_nonnull_attribute (tree *node, tree ARG_UNUSED (name), will have the correct types when we actually check them later. */ if (!args) { - if (!TYPE_ARG_TYPES (type)) + if (!prototype_p (type)) { error ("nonnull attribute without arguments on a non-prototype"); *no_add_attrs = true; @@ -5130,7 +5130,7 @@ handle_sentinel_attribute (tree *node, tree name, tree args, { tree params = TYPE_ARG_TYPES (*node); - if (!params) + if (!prototype_p (*node)) { warning (OPT_Wattributes, "%qs attribute requires prototypes with named arguments", |