/* Routines for GCC for a Symbian OS targeted SH backend.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
Contributed by RedHat.
Most of this code is stolen from i386/winnt.c.
{
/* Don't warn about artificial methods. */
if (!DECL_ARTIFICIAL (decl))
- warning ("%H function '%D' is defined after prior declaration as dllimport: attribute ignored",
+ warning (0, "%H function '%D' is defined after prior declaration as dllimport: attribute ignored",
& DECL_SOURCE_LOCATION (decl), decl);
return false;
}
else if (TREE_CODE (decl) == FUNCTION_DECL && DECL_INLINE (decl))
{
if (extra_warnings)
- warning ("%Hinline function '%D' is declared as dllimport: attribute ignored.",
+ warning (0, "%Hinline function '%D' is declared as dllimport: attribute ignored.",
& DECL_SOURCE_LOCATION (decl), decl);
return false;
}
}
/* Mark a DECL as being dllexport'd.
- Note that we override the previous setting (eg: dllimport). */
+ Note that we override the previous setting (e.g.: dllimport). */
static void
sh_symbian_mark_dllexport (tree decl)
/* Remove DLL_IMPORT_PREFIX.
Note - we do not issue a warning here. In Symbian's environment it
is legitimate for a prototype to be marked as dllimport and the
- corresponding defintion to be marked as dllexport. The prototypes
- are in headers used everywhere and the defintion is in a translation
+ corresponding definition to be marked as dllexport. The prototypes
+ are in headers used everywhere and the definition is in a translation
unit which has included the header in order to ensure argument
correctness. */
oldname += strlen (DLL_IMPORT_PREFIX);
if (sh_symbian_dllexport_name_p (oldname))
{
- error ("`%s' declared as both exported to and imported from a DLL",
+ error ("%qs declared as both exported to and imported from a DLL",
IDENTIFIER_POINTER (DECL_NAME (decl)));
}
else if (sh_symbian_dllimport_name_p (oldname))
tree idp = get_identifier (oldname + strlen (DLL_IMPORT_PREFIX));
rtx newrtl = gen_rtx_SYMBOL_REF (Pmode, IDENTIFIER_POINTER (idp));
- warning ("%H%s '%D' %s after being referenced with dllimport linkage.",
+ warning (0, "%H%s '%D' %s after being referenced with dllimport linkage.",
& DECL_SOURCE_LOCATION (decl),
TREE_CODE (decl) == VAR_DECL ? "variable" : "function",
decl, (DECL_INITIAL (decl) || !DECL_EXTERNAL (decl))
| (int) ATTR_FLAG_FUNCTION_NEXT
| (int) ATTR_FLAG_ARRAY_NEXT))
{
- warning ("`%s' attribute ignored", attr);
+ warning (0, "%qs attribute ignored", attr);
*no_add_attrs = true;
return tree_cons (name, args, NULL_TREE);
}
if (TREE_CODE (node) != RECORD_TYPE && TREE_CODE (node) != UNION_TYPE)
{
- warning ("`%s' attribute ignored", attr);
+ warning (0, "%qs attribute ignored", attr);
*no_add_attrs = true;
}
{
if (DECL_INITIAL (node))
{
- error ("%Hvariable `%D' definition is marked dllimport.",
+ error ("%Hvariable %qD definition is marked dllimport.",
& DECL_SOURCE_LOCATION (node), node);
*no_add_attrs = true;
}
}
}
- /* If the node is an overloaded constructor or desctructor, then we must
- make sure that the attribute is propogated along the overload chain,
+ /* If the node is an overloaded constructor or destructor, then we must
+ make sure that the attribute is propagated along the overload chain,
as it is these overloaded functions which will be emitted, rather than
the user declared constructor itself. */
if (TREE_CODE (TREE_TYPE (node)) == METHOD_TYPE
symbian_add_attribute (function, attr);
- /* Propogate the attribute to any function thunks as well. */
+ /* Propagate the attribute to any function thunks as well. */
for (thunk = DECL_THUNKS (function); thunk; thunk = TREE_CHAIN (thunk))
if (TREE_CODE (thunk) == FUNCTION_DECL)
symbian_add_attribute (thunk, attr);
if (TREE_CODE (node) == FUNCTION_DECL && DECL_VIRTUAL_P (node))
{
- /* Propogate the attribute to any thunks of this function. */
+ /* Propagate the attribute to any thunks of this function. */
for (thunk = DECL_THUNKS (node); thunk; thunk = TREE_CHAIN (thunk))
if (TREE_CODE (thunk) == FUNCTION_DECL)
symbian_add_attribute (thunk, attr);
tree methods;
int len;
- if (! (TYPE_POLYMORPHIC_P (base_class)
- || TYPE_USES_VIRTUAL_BASECLASSES (base_class)))
+ if (! (TYPE_CONTAINS_VPTR_P (base_class)))
return;
methods = CLASSTYPE_METHOD_VEC (base_class);
return import_export;
}
-/* Dummy defintion of this array for cc1 building purposes. */
+/* Dummy definition of this array for cc1 building purposes. */
tree cp_global_trees[CPTI_MAX] __attribute__((weak));
#if defined ENABLE_TREE_CHECKING && (GCC_VERSION >= 2007)