This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch: libcpp, c-family, Fortran] Re: Warning about __DATE__ and __TIME__


Ian Lance Taylor wrote:
On Wed, Nov 6, 2013 at 7:37 AM, Tom Tromey <tromey@redhat.com> wrote:
Tobias> +         cpp_warning (pfile, CPP_W_DATE_TIME, "Macro \"%s\" might prevent "
Tobias> +                      "reproduce builds", NODE_NAME (node));

Tobias> +       cpp_warning (pfile, CPP_W_DATE_TIME, "Macro \"%s\" might prevent "
Tobias> +                    "reproduce builds", NODE_NAME (node));

I think change "reproduce" to "reproducible" in these warnings.
In GCC warnings pretty much always start with a lower case letter.
Any reason not to s/Macro/macro/ here?

Because I am too used to the gfortran error messages, which pretty much always start with a capital letter (for what ever reason, that started before my time).

Both is now corrected since Rev. 204486 (after bootstrapping + regtesting).

Thanks for the comments!

Tobias
Index: gcc/ChangeLog
===================================================================
--- gcc/ChangeLog	(Revision 204485)
+++ gcc/ChangeLog	(Arbeitskopie)
@@ -1,3 +1,7 @@
+2013-11-06  Tobias Burnus  <burnus@net-b.de>
+
+	* doc/invoke.texi (Wdate-time): Fix typo.
+
 2013-11-06  Oleg Endo  <olegendo@gcc.gnu.org>
 
 	* config/sh/sh.md (addsf3, divsf3, divsf3_i, rsqrtsf2, cmpgtdf_t,
Index: gcc/c-family/ChangeLog
===================================================================
--- gcc/c-family/ChangeLog	(Revision 204485)
+++ gcc/c-family/ChangeLog	(Arbeitskopie)
@@ -1,3 +1,7 @@
+2013-11-06  Tobias Burnus  <burnus@net-b.de>
+
+	* c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
+
 2013-11-06  Joseph Myers  <joseph@codesourcery.com>
 
 	* c-opts.c (c_common_post_options): Set -ffp-contract=off in C
Index: gcc/c-family/c-common.c
===================================================================
--- gcc/c-family/c-common.c	(Revision 204485)
+++ gcc/c-family/c-common.c	(Arbeitskopie)
@@ -9565,6 +9565,7 @@ static const struct reason_option_codes_t option_c
   {CPP_W_INVALID_PCH,			OPT_Winvalid_pch},
   {CPP_W_WARNING_DIRECTIVE,		OPT_Wcpp},
   {CPP_W_LITERAL_SUFFIX,		OPT_Wliteral_suffix},
+  {CPP_W_DATE_TIME,			OPT_Wdate_time},
   {CPP_W_NONE,				0}
 };
 
Index: gcc/doc/invoke.texi
===================================================================
--- gcc/doc/invoke.texi	(Revision 204485)
+++ gcc/doc/invoke.texi	(Arbeitskopie)
@@ -4530,7 +4530,7 @@ be useful to facilitate the conversion to @code{nu
 @opindex Wdate-time
 @opindex Wno-date-time
 Warn when macros @code{__TIME__}, @code{__DATE__} or @code{__TIMESTAMP__}
-are encountered as they might prevent bit-wise-identical reproducable
+are encountered as they might prevent bit-wise-identical reproducible
 compilations.
 
 @item -Wdelete-incomplete @r{(C++ and Objective-C++ only)}
Index: gcc/testsuite/ChangeLog
===================================================================
--- gcc/testsuite/ChangeLog	(Revision 204485)
+++ gcc/testsuite/ChangeLog	(Arbeitskopie)
@@ -1,3 +1,9 @@
+2013-11-06  Tobias Burnus  <burnus@net-b.de>
+
+	* g++.dg/warn/wdate-time.C: Update dg-error pattern.
+	* gcc.dg/wdate-time.c: Ditto.
+	* gfortran.dg/wdate-time.F90: Ditto.
+
 2013-11-06  Oleg Endo  <olegendo@gcc.gnu.org>
 
 	PR target/30807
Index: gcc/testsuite/g++.dg/warn/wdate-time.C
===================================================================
--- gcc/testsuite/g++.dg/warn/wdate-time.C	(Revision 204485)
+++ gcc/testsuite/g++.dg/warn/wdate-time.C	(Arbeitskopie)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-Wdate-time" } */
 
-const char time[] = __TIME__;  /* { dg-warning "might prevent reproduce builds" }  */
-const char date[] = __DATE__;  /* { dg-warning "might prevent reproduce builds" }  */
-const char timestamp[] = __TIMESTAMP__;  /* { dg-warning "might prevent reproduce builds" }  */
+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" }  */
Index: gcc/testsuite/gcc.dg/wdate-time.c
===================================================================
--- gcc/testsuite/gcc.dg/wdate-time.c	(Revision 204485)
+++ gcc/testsuite/gcc.dg/wdate-time.c	(Arbeitskopie)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-Wdate-time" } */
 
-const char time[] = __TIME__;  /* { dg-warning "might prevent reproduce builds" }  */
-const char date[] = __DATE__;  /* { dg-warning "might prevent reproduce builds" }  */
-const char timestamp[] = __TIMESTAMP__;  /* { dg-warning "might prevent reproduce builds" }  */
+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" }  */
Index: gcc/testsuite/gfortran.dg/wdate-time.F90
===================================================================
--- gcc/testsuite/gfortran.dg/wdate-time.F90	(Revision 204485)
+++ gcc/testsuite/gfortran.dg/wdate-time.F90	(Arbeitskopie)
@@ -1,6 +1,6 @@
 ! { dg-do compile }
 ! { dg-options "-Wdate-time" }
-print *, __TIMESTAMP__  ! { dg-warning "might prevent reproduce builds" }
-print *, __TIME__  ! { dg-warning "might prevent reproduce builds" }
-print *, __DATE__  ! { dg-warning "might prevent reproduce builds" }
+print *, __TIMESTAMP__  ! { dg-warning "might prevent reproducible builds" }
+print *, __TIME__  ! { dg-warning "might prevent reproducible builds" }
+print *, __DATE__  ! { dg-warning "might prevent reproducible builds" }
 end
Index: libcpp/ChangeLog
===================================================================
--- libcpp/ChangeLog	(Revision 204485)
+++ libcpp/ChangeLog	(Arbeitskopie)
@@ -1,3 +1,8 @@
+2013-11-06  Tobias Burnus  <burnus@net-b.de>
+
+	* macro.c (_cpp_builtin_macro_text): Correct
+	wording of two warnings.
+
 2013-11-05  Tobias Burnus  <burnus@net-b.de>
 
 	* include/cpplib.h (CPP_W_DATE_TIME): Added.
Index: libcpp/macro.c
===================================================================
--- libcpp/macro.c	(Revision 204485)
+++ libcpp/macro.c	(Arbeitskopie)
@@ -233,8 +233,8 @@ _cpp_builtin_macro_text (cpp_reader *pfile, cpp_ha
     case BT_TIMESTAMP:
       {
 	if (CPP_OPTION (pfile, warn_date_time))
-	  cpp_warning (pfile, CPP_W_DATE_TIME, "Macro \"%s\" might prevent "
-		       "reproduce builds", NODE_NAME (node));
+	  cpp_warning (pfile, CPP_W_DATE_TIME, "macro \"%s\" might prevent "
+		       "reproducible builds", NODE_NAME (node));
 
 	cpp_buffer *pbuffer = cpp_get_buffer (pfile);
 	if (pbuffer->timestamp == NULL)
@@ -330,8 +330,8 @@ _cpp_builtin_macro_text (cpp_reader *pfile, cpp_ha
     case BT_DATE:
     case BT_TIME:
       if (CPP_OPTION (pfile, warn_date_time))
-	cpp_warning (pfile, CPP_W_DATE_TIME, "Macro \"%s\" might prevent "
-		     "reproduce builds", NODE_NAME (node));
+	cpp_warning (pfile, CPP_W_DATE_TIME, "macro \"%s\" might prevent "
+		     "reproducible builds", NODE_NAME (node));
       if (pfile->date == NULL)
 	{
 	  /* Allocate __DATE__ and __TIME__ strings from permanent

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]