OSDN Git Service

* config/arm/arm.h (ARM_EABI_CTORS_SECTION_OP): Do not define if a
[pf3gnuchains/gcc-fork.git] / gcc / config / sh / symbian.c
index 0469c54..9bf6d82 100644 (file)
@@ -1,5 +1,5 @@
 /* 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.
 
@@ -144,7 +144,7 @@ sh_symbian_dllimport_p (tree decl)
     {
       /* 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;
     }
@@ -155,7 +155,7 @@ sh_symbian_dllimport_p (tree decl)
   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;
     }
@@ -205,7 +205,7 @@ sh_symbian_dllimport_name_p (const char *symbol)
 }
 
 /* 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)
@@ -230,8 +230,8 @@ 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);
@@ -276,7 +276,7 @@ sh_symbian_mark_dllimport (tree decl)
 
   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))
@@ -329,7 +329,7 @@ sh_symbian_encode_section_info (tree decl, rtx rtl, int first)
       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))
@@ -411,14 +411,14 @@ sh_symbian_handle_dll_attribute (tree *pnode, tree name, tree args,
                   | (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;
        }
 
@@ -433,7 +433,7 @@ sh_symbian_handle_dll_attribute (tree *pnode, tree name, tree args,
        {
          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;
            }
@@ -448,8 +448,8 @@ sh_symbian_handle_dll_attribute (tree *pnode, tree name, tree args,
        }
     }
 
-  /* 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
@@ -488,7 +488,7 @@ sh_symbian_handle_dll_attribute (tree *pnode, tree name, tree args,
 
          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);
@@ -497,7 +497,7 @@ sh_symbian_handle_dll_attribute (tree *pnode, tree name, tree args,
 
   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);
@@ -559,8 +559,7 @@ symbian_possibly_export_base_class (tree base_class)
   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);
@@ -879,7 +878,7 @@ symbian_import_export_class (tree ctype, int import_export)
   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)