From 384d3837d8f439a3572b1651796613b53be0c5bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20L=C3=B3pez-Ib=C3=A1=C3=B1ez?= Date: Tue, 9 Oct 2007 22:07:04 +0000 Subject: c-opts.c (c_common_handle_option): -Wnontemplate-friend... 2007-10-09 Manuel Lopez-Ibanez * c-opts.c (c_common_handle_option): -Wnontemplate-friend, -Wwrite-strings and -Wmultichar are enabled by default, so Wall enabling them is redundant. Don't check two times for c_dialect_cxx. From-SVN: r129183 --- gcc/ChangeLog | 7 +++++++ gcc/c-opts.c | 7 +------ 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2c65ee6..1aa5aa3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2007-10-09 Manuel Lopez-Ibanez + + * c-opts.c (c_common_handle_option): -Wnontemplate-friend, + -Wwrite-strings and -Wmultichar are enabled by default, so Wall + enabling them is redundant. Don't check two times for + c_dialect_cxx. + 2007-10-09 H.J. Lu * ra-conflict.c (record_one_conflict_between_regnos): Revert diff --git a/gcc/c-opts.c b/gcc/c-opts.c index 80c01a0..16710b6 100644 --- a/gcc/c-opts.c +++ b/gcc/c-opts.c @@ -400,8 +400,6 @@ c_common_handle_option (size_t scode, const char *arg, int value) warn_parentheses = value; warn_return_type = value; warn_sequence_point = value; /* Was C only. */ - if (c_dialect_cxx ()) - warn_sign_compare = value; warn_switch = value; set_Wstrict_aliasing (value); warn_address = value; @@ -425,17 +423,14 @@ c_common_handle_option (size_t scode, const char *arg, int value) else { /* C++-specific warnings. */ + warn_sign_compare = value; warn_reorder = value; - warn_nontemplate_friend = value; warn_cxx0x_compat = value; - if (value > 0) - warn_write_strings = true; } cpp_opts->warn_trigraphs = value; cpp_opts->warn_comments = value; cpp_opts->warn_num_sign_change = value; - cpp_opts->warn_multichar = value; /* Was C++ only. */ if (warn_pointer_sign == -1) warn_pointer_sign = 1; -- cgit v1.1