aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2009-03-03 13:05:53 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2009-03-03 13:05:53 +0000
commit9bd9f73827bfddb9485bcc9a8a2c80d4ed5c9cd8 (patch)
treeadb9abf659e3d9d8949be2fad8b9306ded1d415d /gcc/expr.c
parentf07049c8f1741e8a56f8e6dc3702216a652a532d (diff)
downloadgcc-9bd9f73827bfddb9485bcc9a8a2c80d4ed5c9cd8.zip
gcc-9bd9f73827bfddb9485bcc9a8a2c80d4ed5c9cd8.tar.gz
gcc-9bd9f73827bfddb9485bcc9a8a2c80d4ed5c9cd8.tar.bz2
re PR tree-optimization/39272 (-D_FORTIFY_SOURCE=2 no longer warns with new glibc headers)
2009-03-03 Richard Guenther <rguenther@suse.de> PR middle-end/39272 * tree.c (tree_nonartificial_location): New function. * tree.h (tree_nonartificial_location): Declare. * builtins.c (expand_builtin_memory_chk): Provide location of the call location for artificial function pieces. (maybe_emit_chk_warning): Likewise. (maybe_emit_sprintf_chk_warning): Likewise. (maybe_emit_free_warning): Likewise. * expr.c (expand_expr_real_1): Likewise. From-SVN: r144573
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 9eb1ae7..0e8e0eee 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -8061,9 +8061,10 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
if (fndecl
&& (attr = lookup_attribute ("warning",
DECL_ATTRIBUTES (fndecl))) != NULL)
- warning (0, "%Kcall to %qs declared with attribute warning: %s",
- exp, lang_hooks.decl_printable_name (fndecl, 1),
- TREE_STRING_POINTER (TREE_VALUE (TREE_VALUE (attr))));
+ warning_at (tree_nonartificial_location (exp),
+ 0, "%Kcall to %qs declared with attribute warning: %s",
+ exp, 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))