diff options
author | Nathan Froyd <froydnj@codesourcery.com> | 2010-12-22 19:45:58 +0000 |
---|---|---|
committer | Nathan Froyd <froydnj@gcc.gnu.org> | 2010-12-22 19:45:58 +0000 |
commit | f4da8dce7a9023cf147d1a7537c0b75fe41fecbf (patch) | |
tree | 0e435cd3933ac64da92933bc369a098bc84b208d /gcc/cp | |
parent | 7d127f5921df15abb3d4bdbc3f71f4784c641207 (diff) | |
download | gcc-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/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/decl.c | 8 | ||||
-rw-r--r-- | gcc/cp/pt.c | 2 |
3 files changed, 10 insertions, 5 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index cb9cd95..5bdfa43 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2010-12-22 Nathan Froyd <froydnj@codesourcery.com> + + * decl.c (decls_match, duplicate_decls): Use prototype_p. + * pt.c (push_template_decl_real): Likewise. + 2010-12-22 Jason Merrill <jason@redhat.com> PR c++/47003 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index f9331bc..f74b0c2 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -983,7 +983,7 @@ decls_match (tree newdecl, tree olddecl) if (same_type_p (TREE_TYPE (f1), TREE_TYPE (f2))) { - if (p2 == NULL_TREE && DECL_EXTERN_C_P (olddecl) + if (!prototype_p (f2) && DECL_EXTERN_C_P (olddecl) && (DECL_BUILT_IN (olddecl) #ifndef NO_IMPLICIT_EXTERN_C || (DECL_IN_SYSTEM_HEADER (newdecl) && !DECL_CLASS_SCOPE_P (newdecl)) @@ -996,7 +996,7 @@ decls_match (tree newdecl, tree olddecl) TREE_TYPE (newdecl) = TREE_TYPE (olddecl); } #ifndef NO_IMPLICIT_EXTERN_C - else if (p1 == NULL_TREE + else if (!prototype_p (f1) && (DECL_EXTERN_C_P (olddecl) && DECL_IN_SYSTEM_HEADER (olddecl) && !DECL_CLASS_SCOPE_P (olddecl)) @@ -1536,8 +1536,8 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) } else if (TREE_CODE (olddecl) == FUNCTION_DECL && DECL_INITIAL (olddecl) != NULL_TREE - && TYPE_ARG_TYPES (TREE_TYPE (olddecl)) == NULL_TREE - && TYPE_ARG_TYPES (TREE_TYPE (newdecl)) != NULL_TREE) + && !prototype_p (TREE_TYPE (olddecl)) + && prototype_p (TREE_TYPE (newdecl))) { /* Prototype decl follows defn w/o prototype. */ warning_at (input_location, 0, "prototype for %q+#D", newdecl); diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index c76d381..ae6aed0 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -4737,7 +4737,7 @@ push_template_decl_real (tree decl, bool is_friend) return error_mark_node; } if (NEW_DELETE_OPNAME_P (DECL_NAME (decl)) - && (!TYPE_ARG_TYPES (TREE_TYPE (decl)) + && (!prototype_p (TREE_TYPE (decl)) || TYPE_ARG_TYPES (TREE_TYPE (decl)) == void_list_node || !TREE_CHAIN (TYPE_ARG_TYPES (TREE_TYPE (decl))) || (TREE_CHAIN (TYPE_ARG_TYPES ((TREE_TYPE (decl)))) |