Commit 7a6336aa by Roger Sayle Committed by Roger Sayle

re PR middle-end/14521 (Inconsistent quoting in new warning)


	PR middle-end/14521
	* tree-inline.c (inline_forbidden_p_1): Use %qF instead of '%F'
	for consistent quoting in diagnostic messages.
	(expand_call_inline): Likewise.
	* tree-optimize.c (tree_rest_of_compilation): Likewise.
	* tree-ssa.c (warn_uninitialized_var): Likewise.
	(warn_uninitialized_phi): Likewise.

From-SVN: r89918
parent 29b4addf
2004-10-31 Roger Sayle <roger@eyesopen.com>
PR middle-end/14521
* tree-inline.c (inline_forbidden_p_1): Use %qF instead of '%F'
for consistent quoting in diagnostic messages.
(expand_call_inline): Likewise.
* tree-optimize.c (tree_rest_of_compilation): Likewise.
* tree-ssa.c (warn_uninitialized_var): Likewise.
(warn_uninitialized_phi): Likewise.
2004-10-31 Richard Sandiford <rsandifo@redhat.com> 2004-10-31 Richard Sandiford <rsandifo@redhat.com>
* config/mips/mips.c (mips_cannot_change_mode_class): Use a stricter * config/mips/mips.c (mips_cannot_change_mode_class): Use a stricter
......
...@@ -941,7 +941,7 @@ inline_forbidden_p_1 (tree *nodep, int *walk_subtrees ATTRIBUTE_UNUSED, ...@@ -941,7 +941,7 @@ inline_forbidden_p_1 (tree *nodep, int *walk_subtrees ATTRIBUTE_UNUSED,
&& !lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn))) && !lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)))
{ {
inline_forbidden_reason inline_forbidden_reason
= N_("%Jfunction '%F' can never be inlined because it uses " = N_("%Jfunction %qF can never be inlined because it uses "
"alloca (override using the always_inline attribute)"); "alloca (override using the always_inline attribute)");
return node; return node;
} }
...@@ -953,7 +953,7 @@ inline_forbidden_p_1 (tree *nodep, int *walk_subtrees ATTRIBUTE_UNUSED, ...@@ -953,7 +953,7 @@ inline_forbidden_p_1 (tree *nodep, int *walk_subtrees ATTRIBUTE_UNUSED,
if (setjmp_call_p (t)) if (setjmp_call_p (t))
{ {
inline_forbidden_reason inline_forbidden_reason
= N_("%Jfunction '%F' can never be inlined because it uses setjmp"); = N_("%Jfunction %qF can never be inlined because it uses setjmp");
return node; return node;
} }
...@@ -967,7 +967,7 @@ inline_forbidden_p_1 (tree *nodep, int *walk_subtrees ATTRIBUTE_UNUSED, ...@@ -967,7 +967,7 @@ inline_forbidden_p_1 (tree *nodep, int *walk_subtrees ATTRIBUTE_UNUSED,
case BUILT_IN_NEXT_ARG: case BUILT_IN_NEXT_ARG:
case BUILT_IN_VA_END: case BUILT_IN_VA_END:
inline_forbidden_reason inline_forbidden_reason
= N_("%Jfunction '%F' can never be inlined because it " = N_("%Jfunction %qF can never be inlined because it "
"uses variable argument lists"); "uses variable argument lists");
return node; return node;
...@@ -978,14 +978,14 @@ inline_forbidden_p_1 (tree *nodep, int *walk_subtrees ATTRIBUTE_UNUSED, ...@@ -978,14 +978,14 @@ inline_forbidden_p_1 (tree *nodep, int *walk_subtrees ATTRIBUTE_UNUSED,
function calling __builtin_longjmp to be inlined into the function calling __builtin_longjmp to be inlined into the
function calling __builtin_setjmp, Things will Go Awry. */ function calling __builtin_setjmp, Things will Go Awry. */
inline_forbidden_reason inline_forbidden_reason
= N_("%Jfunction '%F' can never be inlined because " = N_("%Jfunction %qF can never be inlined because "
"it uses setjmp-longjmp exception handling"); "it uses setjmp-longjmp exception handling");
return node; return node;
case BUILT_IN_NONLOCAL_GOTO: case BUILT_IN_NONLOCAL_GOTO:
/* Similarly. */ /* Similarly. */
inline_forbidden_reason inline_forbidden_reason
= N_("%Jfunction '%F' can never be inlined because " = N_("%Jfunction %qF can never be inlined because "
"it uses non-local goto"); "it uses non-local goto");
return node; return node;
...@@ -1004,7 +1004,7 @@ inline_forbidden_p_1 (tree *nodep, int *walk_subtrees ATTRIBUTE_UNUSED, ...@@ -1004,7 +1004,7 @@ inline_forbidden_p_1 (tree *nodep, int *walk_subtrees ATTRIBUTE_UNUSED,
if (TREE_CODE (t) != LABEL_DECL) if (TREE_CODE (t) != LABEL_DECL)
{ {
inline_forbidden_reason inline_forbidden_reason
= N_("%Jfunction '%F' can never be inlined " = N_("%Jfunction %qF can never be inlined "
"because it contains a computed goto"); "because it contains a computed goto");
return node; return node;
} }
...@@ -1018,7 +1018,7 @@ inline_forbidden_p_1 (tree *nodep, int *walk_subtrees ATTRIBUTE_UNUSED, ...@@ -1018,7 +1018,7 @@ inline_forbidden_p_1 (tree *nodep, int *walk_subtrees ATTRIBUTE_UNUSED,
because we cannot remap the destination label used in the because we cannot remap the destination label used in the
function that is performing the non-local goto. */ function that is performing the non-local goto. */
inline_forbidden_reason inline_forbidden_reason
= N_("%Jfunction '%F' can never be inlined " = N_("%Jfunction %qF can never be inlined "
"because it receives a non-local goto"); "because it receives a non-local goto");
return node; return node;
} }
...@@ -1040,7 +1040,7 @@ inline_forbidden_p_1 (tree *nodep, int *walk_subtrees ATTRIBUTE_UNUSED, ...@@ -1040,7 +1040,7 @@ inline_forbidden_p_1 (tree *nodep, int *walk_subtrees ATTRIBUTE_UNUSED,
if (variably_modified_type_p (TREE_TYPE (t), NULL)) if (variably_modified_type_p (TREE_TYPE (t), NULL))
{ {
inline_forbidden_reason inline_forbidden_reason
= N_("%Jfunction '%F' can never be inlined " = N_("%Jfunction %qF can never be inlined "
"because it uses variable sized variables"); "because it uses variable sized variables");
return node; return node;
} }
...@@ -1471,7 +1471,7 @@ expand_call_inline (tree *tp, int *walk_subtrees, void *data) ...@@ -1471,7 +1471,7 @@ expand_call_inline (tree *tp, int *walk_subtrees, void *data)
{ {
if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn))) if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)))
{ {
sorry ("%Jinlining failed in call to '%F': %s", fn, fn, reason); sorry ("%Jinlining failed in call to %qF: %s", fn, fn, reason);
sorry ("called from here"); sorry ("called from here");
} }
else if (warn_inline && DECL_DECLARED_INLINE_P (fn) else if (warn_inline && DECL_DECLARED_INLINE_P (fn)
...@@ -1479,7 +1479,7 @@ expand_call_inline (tree *tp, int *walk_subtrees, void *data) ...@@ -1479,7 +1479,7 @@ expand_call_inline (tree *tp, int *walk_subtrees, void *data)
&& strlen (reason) && strlen (reason)
&& !lookup_attribute ("noinline", DECL_ATTRIBUTES (fn))) && !lookup_attribute ("noinline", DECL_ATTRIBUTES (fn)))
{ {
warning ("%Jinlining failed in call to '%F': %s", fn, fn, reason); warning ("%Jinlining failed in call to %qF: %s", fn, fn, reason);
warning ("called from here"); warning ("called from here");
} }
goto egress; goto egress;
......
...@@ -683,10 +683,10 @@ tree_rest_of_compilation (tree fndecl) ...@@ -683,10 +683,10 @@ tree_rest_of_compilation (tree fndecl)
= TREE_INT_CST_LOW (TYPE_SIZE_UNIT (ret_type)); = TREE_INT_CST_LOW (TYPE_SIZE_UNIT (ret_type));
if (compare_tree_int (TYPE_SIZE_UNIT (ret_type), size_as_int) == 0) if (compare_tree_int (TYPE_SIZE_UNIT (ret_type), size_as_int) == 0)
warning ("%Jsize of return value of '%D' is %u bytes", warning ("%Jsize of return value of %qD is %u bytes",
fndecl, fndecl, size_as_int); fndecl, fndecl, size_as_int);
else else
warning ("%Jsize of return value of '%D' is larger than %wd bytes", warning ("%Jsize of return value of %qD is larger than %wd bytes",
fndecl, fndecl, larger_than_size); fndecl, fndecl, larger_than_size);
} }
} }
......
...@@ -1388,7 +1388,7 @@ warn_uninitialized_var (tree *tp, int *walk_subtrees, void *data) ...@@ -1388,7 +1388,7 @@ warn_uninitialized_var (tree *tp, int *walk_subtrees, void *data)
/* We only do data flow with SSA_NAMEs, so that's all we can warn about. */ /* We only do data flow with SSA_NAMEs, so that's all we can warn about. */
if (TREE_CODE (t) == SSA_NAME) if (TREE_CODE (t) == SSA_NAME)
{ {
warn_uninit (t, "%H'%D' is used uninitialized in this function", locus); warn_uninit (t, "%H%qD is used uninitialized in this function", locus);
*walk_subtrees = 0; *walk_subtrees = 0;
} }
else if (IS_TYPE_OR_DECL_P (t)) else if (IS_TYPE_OR_DECL_P (t))
...@@ -1413,7 +1413,7 @@ warn_uninitialized_phi (tree phi) ...@@ -1413,7 +1413,7 @@ warn_uninitialized_phi (tree phi)
{ {
tree op = PHI_ARG_DEF (phi, i); tree op = PHI_ARG_DEF (phi, i);
if (TREE_CODE (op) == SSA_NAME) if (TREE_CODE (op) == SSA_NAME)
warn_uninit (op, "%H'%D' may be used uninitialized in this function", warn_uninit (op, "%H%qD may be used uninitialized in this function",
NULL); NULL);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment