OSDN Git Service

2009-05-31 Basile Starynkevitch <basile@starynkevitch.net>
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 31 May 2009 14:59:41 +0000 (14:59 +0000)
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 31 May 2009 14:59:41 +0000 (14:59 +0000)
* gcc/testsuite/gcc.dg/plugin/ggcplug.c: moved comment.
(plugin_init): fixed typo, declared i, returned 0 at end.

[also moved an entry from gcc/ChangeLog to gcc/testsuite/ChangeLog]

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148015 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/plugin/ggcplug.c

index 69d0ea2..40dca07 100644 (file)
        (Interacting with the GCC Garbage Collector): Added new section.
        (Giving information about a plugin): Added new section for
        PLUGIN_INFO.
-       * testsuite/gcc.dg/plugin/plugin.exp: Added ggcplug.c test plugin
-       with ggcplug-test-1.c for testing PLUGIN_GGC_MARKING etc...
-       * testsuite/gcc.dg/plugin/ggcplug-test-1.c: Added new file.
-       * testsuite/gcc.dg/plugin/ggcplug.c: Added new file.
        * ggc.h (ggc_register_root_tab): Added declaration.
        * gcc-plugin.h (PLUGIN_GGC_START, PLUGIN_GGC_MARKING)
        (PLUGIN_GGC_END, PLUGIN_REGISTER_GGC_ROOTS): Added new events.
index 8c7fc2b..10af18e 100644 (file)
@@ -1,3 +1,9 @@
+
+2009-05-31  Basile Starynkevitch  <basile@starynkevitch.net>
+
+       * gcc.dg/plugin/ggcplug.c: moved comment.
+       (plugin_init): fixed typo, declared i, returned 0 at end.
+
 2009-05-31  Ira Rosen  <irar@il.ibm.com>
 
        PR testsuite/40244
        patterns to reflect frontend changes.
        * gfortran.dg/vector_subscript_4.f90: Likewise.
 
-2009-05-27  Olivier Hainque  <hainque@adacore.com>     
+2009-05-27  Olivier Hainque  <hainque@adacore.com>
            Eric Botcazou  <botcazou@adacore.com>
-    
+
        * gcc.c-torture/execute/align-nest.c: New testcase.
        * gnat.dg/misaligned_nest.adb: New testcase.
 
        * gfortran.dg/c_f_pointer_shape_tests_4.f03:  New file.
        * gfortran.dg/c_f_pointer_shape_tests_4_driver.c:  New file.
 
+2009-05-26  Basile Starynkevitch  <basile@starynkevitch.net>
+
+       * testsuite/gcc.dg/plugin/plugin.exp: Added ggcplug.c test plugin
+       with ggcplug-test-1.c for testing PLUGIN_GGC_MARKING etc...
+       * testsuite/gcc.dg/plugin/ggcplug-test-1.c: Added new file.
+       * testsuite/gcc.dg/plugin/ggcplug.c: Added new file.
+
 2009-05-26  Tobias Burnus  <burnus@net-b.de>
 
        PR fortran/40246
index 136404a..f90e77b 100644 (file)
 #include "gcc-plugin.h"
 
 
-/* The initialization routine exposed to and called by GCC. The spec of this
-   function is defined in gcc/gcc-plugin.h.
-
-   Note that this function needs to be named exactly "plugin_init".  */
-
 
 /* our callback is the same for all PLUGIN_GGC_START,
    PLUGIN_GGC_MARKING, PLUGIN_GGC_END events; it just increments the
@@ -35,12 +30,18 @@ static const struct ggc_root_tab our_xtratab[] = {
   LAST_GGC_ROOT_TAB
 };
 
+
+/* The initialization routine exposed to and called by GCC. The spec of this
+   function is defined in gcc/gcc-plugin.h.
+
+   Note that this function needs to be named exactly "plugin_init".  */
 int
-plugin_init ((struct plugin_name_args *plugin_info,
+plugin_init (struct plugin_name_args *plugin_info,
              struct plugin_gcc_version *version)
 {
   const char *plugin_name = plugin_info->base_name;
   int argc = plugin_info->argc;
+  int i = 0;
   struct plugin_argument *argv = plugin_info->argv;
   if (!plugin_default_version_check (version, version))
     return 1;
@@ -97,7 +98,9 @@ plugin_init ((struct plugin_name_args *plugin_info,
                               (void *) our_xtratab);
        }
     }
-}
+  /* plugin initialization succeeded */
+  return 0;
+ }
 
 static void
 increment_callback (void *gcc_data, void *user_data)