diff options
author | Jason Merrill <jason@redhat.com> | 2016-04-13 16:11:29 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2016-04-13 16:11:29 -0400 |
commit | 2ee35bea2e5f0241fff589ddc038c9d8eb444fb9 (patch) | |
tree | f4446c9a372328e1c80530640ab77106661bfe34 /gcc/expr.c | |
parent | 5655267ca161de13e553dbfc0b7e58962fbb2443 (diff) | |
download | gcc-2ee35bea2e5f0241fff589ddc038c9d8eb444fb9.zip gcc-2ee35bea2e5f0241fff589ddc038c9d8eb444fb9.tar.gz gcc-2ee35bea2e5f0241fff589ddc038c9d8eb444fb9.tar.bz2 |
Warn about empty parameter ABI with -Wabi=9.
* call.c (empty_class_msg, mark_for_abi_warning)
(warn_empty_class_abi): New.
(build_call_a): Use them.
* decl.c (store_parm_decls): Use mark_for_abi_warning.
* error.c (pp_format_to_string): New.
From-SVN: r234960
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -10579,6 +10579,13 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode, 0, "%Kcall to %qs declared with attribute warning: %s", exp, identifier_to_locale (lang_hooks.decl_printable_name (fndecl, 1)), TREE_STRING_POINTER (TREE_VALUE (TREE_VALUE (attr)))); + if (warn_abi && fndecl + && (attr = lookup_attribute ("abi warning", + DECL_ATTRIBUTES (fndecl))) != NULL) + warning_at (tree_nonartificial_location (exp), + OPT_Wabi, "%Kcall to %qs: %s", + exp, identifier_to_locale (lang_hooks.decl_printable_name (fndecl, 1)), + TREE_STRING_POINTER (TREE_VALUE (TREE_VALUE (attr)))); /* Check for a built-in function. */ if (fndecl && DECL_BUILT_IN (fndecl)) |