aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2003-09-20 22:07:20 -0700
committerRichard Henderson <rth@gcc.gnu.org>2003-09-20 22:07:20 -0700
commitddd2d57e722237230da8eea70a2fcecb11bd0f81 (patch)
tree28f355780724c452ad42bb81a3672b2e8010c989 /gcc/tree-inline.c
parentccea753c0563b847b42d9ca5fc1b8afaee49f343 (diff)
downloadgcc-ddd2d57e722237230da8eea70a2fcecb11bd0f81.zip
gcc-ddd2d57e722237230da8eea70a2fcecb11bd0f81.tar.gz
gcc-ddd2d57e722237230da8eea70a2fcecb11bd0f81.tar.bz2
c-format.c (gcc_diag_char_table): Add %J.
* c-format.c (gcc_diag_char_table): Add %J. (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Likewise. (check_format_types): Fix wanted_type name lookup. (init_dynamic_diag_info): Setup %J. * diagnostic.c (text_specifies_location): Implement %J. * c-common.c, c-decl.c, c-objc-common.c, c-pragma.c, calls.c, dwarfout.c, expr.c, function.c, stmt.c, stor-layout.c, toplev.c, tree-inline.c, tree-optimize.c, varasm.c, config/arm/pe.c, config/i386/winnt.c, config/ia64/ia64.c, config/mcore/mcore.c, config/v850/v850.c, objc/objc-act.c: Use %J in diagnostics. * tree-inline.c: Include intl.h (inline_forbidden_p_1): Fix i18n of inline_forbidden_reason. * Makefile.in (tree-inline.o): Update. cp/ * decl.c, decl2.c, pt.c: Use %J in diagnostics. java/ * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics. testsuite/ * gcc.dg/format/gcc_diag-1.c: Add tests for %J. From-SVN: r71619
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c49
1 files changed, 27 insertions, 22 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 8a435a6..e4e24b2 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -38,6 +38,8 @@ Boston, MA 02111-1307, USA. */
#include "splay-tree.h"
#include "langhooks.h"
#include "cgraph.h"
+#include "intl.h"
+
/* This should be eventually be generalized to other languages, but
this would require a shared function-as-trees infrastructure. */
@@ -896,9 +898,9 @@ inline_forbidden_p_1 (tree *nodep, int *walk_subtrees ATTRIBUTE_UNUSED,
if (alloca_call_p (node)
&& !lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)))
{
- inline_forbidden_reason = "%Hfunction '%F' can never be inlined "
- "because it uses alloca (override using "
- "the always_inline attribute)";
+ inline_forbidden_reason
+ = N_("%Jfunction '%F' can never be inlined because it uses "
+ "alloca (override using the always_inline attribute)");
return node;
}
t = get_callee_fndecl (node);
@@ -909,8 +911,8 @@ inline_forbidden_p_1 (tree *nodep, int *walk_subtrees ATTRIBUTE_UNUSED,
/* We cannot inline functions that call setjmp. */
if (setjmp_call_p (t))
{
- inline_forbidden_reason = "%Hfunction '%F' can never be inlined"
- " because it uses setjmp";
+ inline_forbidden_reason
+ = N_("%Jfunction '%F' can never be inlined because it uses setjmp");
return node;
}
@@ -921,8 +923,9 @@ inline_forbidden_p_1 (tree *nodep, int *walk_subtrees ATTRIBUTE_UNUSED,
case BUILT_IN_VA_START:
case BUILT_IN_STDARG_START:
{
- inline_forbidden_reason = "%Hfunction '%F' can never be inlined "
- "because it uses variable argument lists";
+ inline_forbidden_reason
+ = N_("%Jfunction '%F' can never be inlined because it "
+ "uses variable argument lists");
return node;
}
case BUILT_IN_LONGJMP:
@@ -935,9 +938,9 @@ inline_forbidden_p_1 (tree *nodep, int *walk_subtrees ATTRIBUTE_UNUSED,
/* ??? Need front end help to identify "regular" non-local goto. */
if (DECL_BUILT_IN_CLASS (t) == BUILT_IN_NORMAL)
{
- inline_forbidden_reason = "%Hfunction '%F' can never be inlined "
- "because it uses setjmp-longjmp "
- "exception handling";
+ inline_forbidden_reason
+ = N_("%Jfunction '%F' can never be inlined "
+ "because it uses setjmp-longjmp exception handling");
return node;
}
}
@@ -953,8 +956,9 @@ inline_forbidden_p_1 (tree *nodep, int *walk_subtrees ATTRIBUTE_UNUSED,
if (TREE_CODE (TREE_OPERAND (node, 0)) == FUNCTION_DECL
&& DECL_INITIAL (TREE_OPERAND (node, 0)))
{
- inline_forbidden_reason = "%Hfunction '%F' can never be inlined "
- "because it contains a nested function";
+ inline_forbidden_reason
+ = N_("%Jfunction '%F' can never be inlined "
+ "because it contains a nested function");
return node;
}
break;
@@ -969,8 +973,9 @@ inline_forbidden_p_1 (tree *nodep, int *walk_subtrees ATTRIBUTE_UNUSED,
instantiations, which causes unexpected behavior. */
if (TREE_CODE (t) != LABEL_DECL)
{
- inline_forbidden_reason = "%Hfunction '%F' can never be inlined "
- "because it contains a nonlocal label";
+ inline_forbidden_reason
+ = N_("%Jfunction '%F' can never be inlined "
+ "because it contains a computed goto");
return node;
}
@@ -978,8 +983,9 @@ inline_forbidden_p_1 (tree *nodep, int *walk_subtrees ATTRIBUTE_UNUSED,
label. */
if (TREE_CODE (t) == LABEL_DECL && DECL_CONTEXT (t) != fn)
{
- inline_forbidden_reason = "%Hfunction '%F' can never be inlined "
- "because it contains a nonlocal goto";
+ inline_forbidden_reason
+ = N_("%Jfunction '%F' can never be inlined "
+ "because it contains a nonlocal goto");
return node;
}
@@ -1000,8 +1006,9 @@ inline_forbidden_p_1 (tree *nodep, int *walk_subtrees ATTRIBUTE_UNUSED,
for (t = TYPE_FIELDS (node); t; t = TREE_CHAIN (t))
if (variably_modified_type_p (TREE_TYPE (t)))
{
- inline_forbidden_reason = "%Hfunction '%F' can never be inlined "
- "because it uses variable sized variables";
+ inline_forbidden_reason
+ = N_("%Jfunction '%F' can never be inlined "
+ "because it uses variable sized variables");
return node;
}
#endif
@@ -1089,8 +1096,7 @@ inlinable_function_p (tree fn)
&& !DECL_IN_SYSTEM_HEADER (fn));
if (do_warning)
- warning (inline_forbidden_reason,
- &DECL_SOURCE_LOCATION (fn), fn);
+ warning (inline_forbidden_reason, fn, fn);
inlinable = false;
}
@@ -1302,8 +1308,7 @@ expand_call_inline (tree *tp, int *walk_subtrees, void *data)
if (warn_inline && DECL_INLINE (fn) && DECL_DECLARED_INLINE_P (fn)
&& !DECL_IN_SYSTEM_HEADER (fn))
{
- warning ("%Hinlining failed in call to '%F'",
- &DECL_SOURCE_LOCATION (fn), fn);
+ warning ("%Jinlining failed in call to '%F'", fn, fn);
warning ("called from here");
}
return NULL_TREE;