]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
diagnostic.c (diagnostic_report_diagnostic): Do not warn about loaded plugins for...
authorDiego Novillo <dnovillo@google.com>
Wed, 15 Apr 2009 03:41:28 +0000 (23:41 -0400)
committerDiego Novillo <dnovillo@gcc.gnu.org>
Wed, 15 Apr 2009 03:41:28 +0000 (23:41 -0400)
* diagnostic.c (diagnostic_report_diagnostic): Do not
warn about loaded plugins for DK_ERROR and DK_WARNING.
* c-decl.c (declspecs_add_type): Move call to
invoke_plugin_callbacks ...
* c-parser.c (c_parser_declspecs): ... here.
* plugin.c (dump_active_plugins): Tidy output.

cp/ChangeLog

* parser.c (cp_parser_type_specifier_seq): Move call to
invoke_plugin_callbacks ...
(cp_parser_type_specifier_seq): ... here.

From-SVN: r146078

gcc/ChangeLog
gcc/c-decl.c
gcc/c-parser.c
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/diagnostic.c
gcc/plugin.c

index cbdc1a48176f1c3e268edbe97c0fad31639b9730..9d9aba899fd846247b5b5665e27cc74408b3b17a 100644 (file)
@@ -3,6 +3,15 @@
        * config/rs6000/rs6000.c (rs6000_dwarf_register_span): Fix debug
        output for other floating point modes.
 
+2009-04-14  Diego Novillo  <dnovillo@google.com>
+
+       * diagnostic.c (diagnostic_report_diagnostic): Do not
+       warn about loaded plugins for DK_ERROR and DK_WARNING.
+       * c-decl.c (declspecs_add_type): Move call to
+       invoke_plugin_callbacks ...
+       * c-parser.c (c_parser_declspecs): ... here.
+       * plugin.c (dump_active_plugins): Tidy output.
+
 2009-04-14  Diego Novillo  <dnovillo@google.com>
            Le-Chun Wu  <lcwu@google.com>
 
index c5f573a028b93275a97087bd2d9528ba3ee3a433..62262034d8cecf856fb23d11fe3bf4eb926686b4 100644 (file)
@@ -7262,9 +7262,6 @@ struct c_declspecs *
 declspecs_add_type (struct c_declspecs *specs, struct c_typespec spec)
 {
   tree type = spec.spec;
-
-  invoke_plugin_callbacks (PLUGIN_FINISH_TYPE, type);
-
   specs->non_sc_seen_p = true;
   specs->declspecs_seen_p = true;
   specs->type_seen_p = true;
index 1443bc5b6c4bf091f61b333e035d1f8902d852f5..7887391dfccd5ce3090ae4facd041af21b95532d 100644 (file)
@@ -1553,6 +1553,7 @@ c_parser_declspecs (c_parser *parser, struct c_declspecs *specs,
          attrs_ok = true;
          seen_type = true;
          t = c_parser_struct_or_union_specifier (parser);
+          invoke_plugin_callbacks (PLUGIN_FINISH_TYPE, t.spec);
          declspecs_add_type (specs, t);
          break;
        case RID_TYPEOF:
index 23d135b47496a6e4102d7343006e8cf2bb4ca750..aa0ef54e603a60614e18ee2d37f32958a67935db 100644 (file)
@@ -1,3 +1,9 @@
+2009-04-14  Diego Novillo  <dnovillo@google.com>
+
+       * parser.c (cp_parser_type_specifier_seq): Move call to
+       invoke_plugin_callbacks ...
+       (cp_parser_type_specifier_seq): ... here.
+
 2009-04-14  Le-Chun Wu  <lcwu@google.com>
 
        * Make-lang.in: Modify dependencies of files including plugin.h.
index 8a8ca0654d4021221f1017b016391653b5552e9b..3dba794612a6e2c4ee8a01d956f3c2992c4b0ad7 100644 (file)
@@ -11015,6 +11015,7 @@ cp_parser_type_specifier (cp_parser* parser,
       cp_parser_parse_tentatively (parser);
       /* Look for the class-specifier.  */
       type_spec = cp_parser_class_specifier (parser);
+      invoke_plugin_callbacks (PLUGIN_FINISH_TYPE, type_spec);
       /* If that worked, we're done.  */
       if (cp_parser_parse_definitely (parser))
        {
@@ -13891,8 +13892,6 @@ cp_parser_type_specifier_seq (cp_parser* parser,
          break;
        }
 
-      invoke_plugin_callbacks (PLUGIN_FINISH_TYPE, type_specifier);
-
       seen_type_specifier = true;
       /* The standard says that a condition can be:
 
index c0648cd53b2f9fd0704a7883ca2c88f7359db1b2..42a40c6f33751d9d200f36ba94a5a415fe8c54df 100644 (file)
@@ -372,10 +372,7 @@ diagnostic_report_diagnostic (diagnostic_context *context,
 
   context->lock++;
 
-  if ((diagnostic->kind == DK_ERROR
-       || diagnostic->kind == DK_WARNING
-       || diagnostic->kind == DK_ICE)
-      && plugins_active_p ())
+  if (diagnostic->kind == DK_ICE && plugins_active_p ())
     {
       fnotice (stderr, "*** WARNING *** there are active plugins, do not report"
               " this as a bug unless you can reproduce it without enabling"
index 93e158c7867f26495848d8ce8f176474c5ddffd4..92e88a8d5344093b9e90a457af82ac66c9ffcb98 100644 (file)
@@ -647,7 +647,7 @@ dump_active_plugins (FILE *file)
   if (!plugins_active_p ())
     return;
 
-  fprintf (stderr, "Event\t\tPlugins\n");
+  fprintf (stderr, "Event\t\t\tPlugins\n");
   for (event = PLUGIN_PASS_MANAGER_SETUP; event < PLUGIN_EVENT_LAST; event++)
     if (plugin_callbacks[event])
       {