diff options
Diffstat (limited to 'gcc/diagnostic.c')
-rw-r--r-- | gcc/diagnostic.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c index a057f8d..40ddc23 100644 --- a/gcc/diagnostic.c +++ b/gcc/diagnostic.c @@ -113,6 +113,7 @@ diagnostic_initialize (diagnostic_context *context, int n_opts) diagnostic_starter (context) = default_diagnostic_starter; diagnostic_finalizer (context) = default_diagnostic_finalizer; context->option_enabled = NULL; + context->option_state = NULL; context->option_name = NULL; context->last_module = 0; context->x_data = NULL; @@ -435,7 +436,8 @@ diagnostic_report_diagnostic (diagnostic_context *context, /* This tests if the user provided the appropriate -Wfoo or -Wno-foo option. */ - if (! context->option_enabled (diagnostic->option_index)) + if (! context->option_enabled (diagnostic->option_index, + context->option_state)) return false; /* This tests for #pragma diagnostic changes. */ |