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] |
On Tue, Aug 14, 2012 at 8:40 PM, Diego Novillo <dnovillo@google.com> wrote:On 12-08-14 14:26 , Steven Bosscher wrote:
@@ -505,6 +507,16 @@ timevar_print (FILE *fp) TIMEVAR. */ start_time = now;
+#ifdef ENABLE_CHECKING + /* Pester those who add timevars with too long names. */ + for (id = 0; id < (unsigned int) TIMEVAR_LAST; ++id) + { + struct timevar_def *tv = &timevars[(timevar_id_t) id]; + if ((timevar_id_t) id != TV_TOTAL && tv->used) + gcc_assert (strlen (tv->name) <= name_width); + } +#endif
I'm not liking this too much. I would rather do truncation or wrapping. Not ICEing. And we'd do this all the time, not just with checking enabled.
Wrapping would be bad, it'd break scripts that parse the -ftime-report output.
Truncation is a bit silly, too: If the name is always truncated, why have the long name in the first place?
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |