diff options
author | Nikolai Merinov <n.merinov@inango-systems.com> | 2018-11-07 21:02:27 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2018-11-07 14:02:27 -0700 |
commit | e217792beda1ca48daea497c00694a3924f992c5 (patch) | |
tree | a9b3a57a076c540e02affb6a305a3f52f651f185 /gcc/expr.c | |
parent | 285556b5599bc180ad7a7ba1bb5f226b558ab32d (diff) | |
download | gcc-e217792beda1ca48daea497c00694a3924f992c5.zip gcc-e217792beda1ca48daea497c00694a3924f992c5.tar.gz gcc-e217792beda1ca48daea497c00694a3924f992c5.tar.bz2 |
common.opt: Add -Wattribute-warning.
* common.opt: Add -Wattribute-warning.
* doc/invoke.texi: Add documentation for -Wno-attribute-warning.
* expr.c (expand_expr_real_1): Add new attribute to warning_at
call to allow user configure behavior of "warning" attribute.
* gcc.dg/Wno-attribute-warning.c: New test.
From-SVN: r265891
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -10930,7 +10930,8 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode, DECL_ATTRIBUTES (fndecl))) != NULL) { const char *ident = lang_hooks.decl_printable_name (fndecl, 1); - warning_at (tree_nonartificial_location (exp), 0, + warning_at (tree_nonartificial_location (exp), + OPT_Wattribute_warning, "%Kcall to %qs declared with attribute warning: %s", exp, identifier_to_locale (ident), TREE_STRING_POINTER (TREE_VALUE (TREE_VALUE (attr)))); |