From b430e8d98964bc1866199ac6eb5faecdbd963be1 Mon Sep 17 00:00:00 2001 From: rguenth Date: Tue, 3 Mar 2009 13:05:53 +0000 Subject: 2009-03-03 Richard Guenther 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144573 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/expr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'gcc/expr.c') diff --git a/gcc/expr.c b/gcc/expr.c index 9eb1ae70a0d..0e8e0eeee5c 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)) -- cgit v1.2.1