aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@codesourcery.com>2010-12-22 19:45:58 +0000
committerNathan Froyd <froydnj@gcc.gnu.org>2010-12-22 19:45:58 +0000
commitf4da8dce7a9023cf147d1a7537c0b75fe41fecbf (patch)
tree0e435cd3933ac64da92933bc369a098bc84b208d /gcc/c-family
parent7d127f5921df15abb3d4bdbc3f71f4784c641207 (diff)
downloadgcc-f4da8dce7a9023cf147d1a7537c0b75fe41fecbf.zip
gcc-f4da8dce7a9023cf147d1a7537c0b75fe41fecbf.tar.gz
gcc-f4da8dce7a9023cf147d1a7537c0b75fe41fecbf.tar.bz2
c-aux-info.c (gen_formal_list_for_type): Use prototype_p.
gcc/ * c-aux-info.c (gen_formal_list_for_type): Use prototype_p. * c-decl.c (diagnose_arglist_conflict): Likewise. (diagnose_mismatched_decls, merge_decls): Likewise. (c_builtin_function, c_builtin_function_ext_scope): Likewise. (start_decl, start_function): Likewise. * c-tree.h (C_DECL_ISNT_PROTOTYPED): Likewise. * config/ia64/ia64.h (INIT_CUMULATIVE_ARGS): Likewise. * config/mep/mep.c (mep_validate_interrupt): Likewise. * config/pa/pa.h (INIT_CUMULATIVE_ARGS): Likewise. * config/rs6000/rs6000.c (init_cumulative_args): Likewise. * config/sh/sh.c (sh_init_cumulative_args): Likewise. * config/sparc/sparc.c (init_cumulative_args): Likewise. * dwarf2out.c (add_prototyped_attribute): Likewise. (gen_subprogram_die): Likewise. * ipa-type-escape.c (check_function_parameter_and_return_types): Likewise. (check_call): Likewise. * tree-ssa.c (useless_type_conversion_p): Likewise. gcc/ada/ * gcc-interface/utils.c (handle_nonnull_attribute): Use prototype_p. (handle_sentinel_attribute): Likewise. gcc/c-family/ * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute): Use prototype_p. gcc/cp/ * decl.c (decls_match, duplicate_decls): Use prototype_p. * pt.c (push_template_decl_real): Likewise. gcc/lto/ * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute): Use prototype_p. gcc/objc/ * objc-act.c (next_sjlj_build_enter_and_setjmp): Use prototype_p. From-SVN: r168181
Diffstat (limited to 'gcc/c-family')
-rw-r--r--gcc/c-family/ChangeLog5
-rw-r--r--gcc/c-family/c-common.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 4be312d..defca77 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,8 @@
+2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
+
+ * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
+ Use prototype_p.
+
2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
* c-objc.h (objc_maybe_warn_exceptions): New.
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);