aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family/c-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c-family/c-common.c')
-rw-r--r--gcc/c-family/c-common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 7b39d55..8eb849a 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -7348,7 +7348,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;
@@ -7631,7 +7631,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,
"%qE attribute requires prototypes with named arguments", name);