aboutsummaryrefslogtreecommitdiff
path: root/gcc/opts.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2010-11-11 16:54:49 +0000
committerJoseph Myers <jsm28@gcc.gnu.org>2010-11-11 16:54:49 +0000
commitf954bd2c81520966ffccdd2786bab6415bd6f6ac (patch)
tree2057187053c110209cde5ca5305225655fda8d8f /gcc/opts.c
parenta5f09e731173ce7b5fbe6731b0afde5390663147 (diff)
downloadgcc-f954bd2c81520966ffccdd2786bab6415bd6f6ac.zip
gcc-f954bd2c81520966ffccdd2786bab6415bd6f6ac.tar.gz
gcc-f954bd2c81520966ffccdd2786bab6415bd6f6ac.tar.bz2
opts.c (warning_as_error_callback, [...]): Remove.
* opts.c (warning_as_error_callback, register_warning_as_error_callback): Remove. (enable_warning_as_error): Don't use warning_as_error_callback. * opts.h (register_warning_as_error_callback): Remove. c-family: * c-opts.c (warning_as_error_callback): Remove. (c_common_initialize_diagnostics): Don't call register_warning_as_error_callback. (c_common_handle_option): Handle -Werror=normalized= here. testsuite: * gcc.dg/cpp/warn-normalized-3.c: Update expected note text. From-SVN: r166606
Diffstat (limited to 'gcc/opts.c')
-rw-r--r--gcc/opts.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/gcc/opts.c b/gcc/opts.c
index a7557ed..53ae596 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -2393,19 +2393,6 @@ get_option_state (struct gcc_options *opts, int option,
return true;
}
-/* Callback function, called when -Werror= enables a warning. */
-
-static void (*warning_as_error_callback) (int) = NULL;
-
-/* Register a callback for enable_warning_as_error calls. */
-
-void
-register_warning_as_error_callback (void (*callback) (int))
-{
- gcc_assert (warning_as_error_callback == NULL || callback == NULL);
- warning_as_error_callback = callback;
-}
-
/* Enable (or disable if VALUE is 0) a warning option ARG (language
mask LANG_MASK, option handlers HANDLERS) as an error for
diagnostic context DC (possibly NULL). This is used by
@@ -2449,9 +2436,6 @@ enable_warning_as_error (const char *arg, int value, unsigned int lang_mask,
option_index, NULL, value, lang_mask,
(int)kind, handlers,
dc);
-
- if (warning_as_error_callback)
- warning_as_error_callback (option_index);
}
}
free (new_option);