[PATCH] -ftime-report vs --disable-checking and --enable-checking

Andrew Pinski pinskia@gmail.com
Tue Feb 20 00:51:00 GMT 2007


Hi,
  We already warn to users about -ftime-report when checking is
enabled but it seems like a good thing to also warn about when assert
checking is DISABLED as the released compiler has assert checking
enabled so timings will not be the same as a released compiler.  I
also changed the --disable-checking to --enable-checking=release in
the warning about when checking is enabled so people get the correct
idea.

OK? Bootstrapped and tested on i686-linux-gnu with no regressions.

Thanks,
Andrew Pinski

ChangeLog:
       * timevar.c (timevar_print): Change reference of --disable-checking to
       --enable-checking=release.  Also warn if assert checking is disabled.
-------------- next part --------------
Index: timevar.c
===================================================================
--- timevar.c	(revision 122135)
+++ timevar.c	(working copy)
@@ -481,8 +481,13 @@
 
 #ifdef ENABLE_CHECKING
   fprintf (fp, "Extra diagnostic checks enabled; compiler may run slowly.\n");
-  fprintf (fp, "Configure with --disable-checking to disable checks.\n");
+  fprintf (fp, "Configure with --enable-checking=release to disable checks.\n");
 #endif
+#ifndef ASSERT_CHECKING
+  fprintf (fp, "Assert checking was disable; if you do an official compiling\n");
+  fprintf (fp, "time testing please use --enable-checking=release instead of\n");
+  fprintf (fp, "--disable-checking.\n");
+#endif
 
 #endif /* defined (HAVE_USER_TIME) || defined (HAVE_SYS_TIME)
 	  || defined (HAVE_WALL_TIME) */


More information about the Gcc-patches mailing list