+2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
+ (Wmultichar): Likewise.
+ (Wdate-time): Use C-family languages instead of Common. Use CPP
+ and Var.
+ * c-opts.c (c_common_handle_option): Do not handle the above
+ options here.
+ (sanitize_cpp_opts): Likewise.
+
2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/44054
/* ??? Don't add new options here. Use LangEnabledBy in c.opt. */
cpp_opts->warn_trigraphs = value;
- cpp_opts->warn_comments = value;
cpp_opts->warn_num_sign_change = value;
break;
cpp_opts->warn_builtin_macro_redefined = value;
break;
- case OPT_Wcomment:
- cpp_opts->warn_comments = value;
- break;
-
case OPT_Wc___compat:
cpp_opts->warn_cxx_operator_names = value;
break;
case OPT_Wmissing_include_dirs:
cpp_opts->warn_missing_include_dirs = value;
break;
-
- case OPT_Wmultichar:
- cpp_opts->warn_multichar = value;
- break;
-
case OPT_Wnormalized_:
+ /* FIXME: Move all this to c.opt. */
if (kind == DK_ERROR)
{
gcc_assert (!arg);
cpp_opts->unsigned_char = !flag_signed_char;
cpp_opts->stdc_0_in_system_headers = STDC_0_IN_SYSTEM_HEADERS;
- cpp_opts->warn_date_time = cpp_warn_date_time;
cpp_opts->cpp_warn_c90_c99_compat = warn_c90_c99_compat;
/* Wlong-long is disabled by default. It is enabled by:
Warn about variables that might be changed by \"longjmp\" or \"vfork\"
Wcomment
-C ObjC C++ ObjC++ Warning
+C ObjC C++ ObjC++ CPP(warn_comments) Var(cpp_warn_comment) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
Warn about possibly nested block comments, and C++ comments spanning more than one physical line
Wcomments
C ObjC C++ ObjC++ Ignore Warn(switch %qs is no longer supported)
Wmultichar
-C ObjC C++ ObjC++ Warning
+C ObjC C++ ObjC++ CPP(warn_multichar) Var(cpp_warn_multichar) Warning
Warn about use of multi-character character constants
Wnarrowing
Warn about misuses of pragmas
Wdate-time
-Common Var(cpp_warn_date_time) Warning
+C ObjC C++ ObjC++ CPP(warn_date_time) Var(cpp_warn_date_time) Warning
Warn about __TIME__, __DATE__ and __TIMESTAMP__ usage
Wproperty-assign-default
+2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ * g++.dg/warn/wdate-time.C: Remove.
+ * gcc.dg/wdate-time.c: Move from here...
+ * c-c++-common/wdate-time.c: ... to here.
+
2014-08-22 Joost VandeVondele <Joost.VandeVondele@mat.ethz.ch>
* gfortran.dg/use_without_only_1.f90: New test.
+++ /dev/null
-/* { dg-do compile } */
-/* { dg-options "-Wdate-time" } */
-
-const char time[] = __TIME__; /* { dg-warning "might prevent reproducible builds" } */
-const char date[] = __DATE__; /* { dg-warning "might prevent reproducible builds" } */
-const char timestamp[] = __TIMESTAMP__; /* { dg-warning "might prevent reproducible builds" } */
+++ /dev/null
-/* { dg-do compile } */
-/* { dg-options "-Wdate-time" } */
-
-const char time[] = __TIME__; /* { dg-warning "might prevent reproducible builds" } */
-const char date[] = __DATE__; /* { dg-warning "might prevent reproducible builds" } */
-const char timestamp[] = __TIMESTAMP__; /* { dg-warning "might prevent reproducible builds" } */