Message ID | CAPK5YPZ0axpUipBm6BLiFr2k=s6WK5Zx-h+BVo5+7E+juM3pWA@mail.gmail.com |
---|---|
State | New |
Headers | show |
On Tue, May 14, 2013 at 6:58 PM, Easwaran Raman <eraman@google.com> wrote: > This patch dumps the column number as part of dump_loc making the > output similar to inform(). This allows these messages to be pattern > matched by dg_message. Bootstraps with this change. Ok for trunk? Eh, column numbers are mostly noise for these messages. Why not improve dg_message instead? Btw, I think that note:'s are ignored in most harnesses - at least vect.exp passes with -fopt-info-vec-optimized for example. Richard. > - Easwaran > --------- > > 2013-05-14 Easwaran Raman <eraman@google.com> > > * dumpfile.c (dump_loc): Print column number. > > Index: gcc/dumpfile.c > =================================================================== > --- gcc/dumpfile.c (revision 198852) > +++ gcc/dumpfile.c (working copy) > @@ -261,12 +261,13 @@ dump_loc (int dump_kind, FILE *dfile, source_locat > if (dump_kind) > { > if (LOCATION_LOCUS (loc) > BUILTINS_LOCATION) > - fprintf (dfile, "\n%s:%d: note: ", LOCATION_FILE (loc), > - LOCATION_LINE (loc)); > + fprintf (dfile, "\n%s:%d:%d: note: ", LOCATION_FILE (loc), > + LOCATION_LINE (loc), LOCATION_COLUMN (loc)); > else if (current_function_decl) > - fprintf (dfile, "\n%s:%d: note: ", > + fprintf (dfile, "\n%s:%d:%d: note: ", > DECL_SOURCE_FILE (current_function_decl), > - DECL_SOURCE_LINE (current_function_decl)); > + DECL_SOURCE_LINE (current_function_decl), > + DECL_SOURCE_COLUMN (current_function_decl)); > } > }
Index: gcc/dumpfile.c =================================================================== --- gcc/dumpfile.c (revision 198852) +++ gcc/dumpfile.c (working copy) @@ -261,12 +261,13 @@ dump_loc (int dump_kind, FILE *dfile, source_locat if (dump_kind) { if (LOCATION_LOCUS (loc) > BUILTINS_LOCATION) - fprintf (dfile, "\n%s:%d: note: ", LOCATION_FILE (loc), - LOCATION_LINE (loc)); + fprintf (dfile, "\n%s:%d:%d: note: ", LOCATION_FILE (loc), + LOCATION_LINE (loc), LOCATION_COLUMN (loc)); else if (current_function_decl) - fprintf (dfile, "\n%s:%d: note: ", + fprintf (dfile, "\n%s:%d:%d: note: ", DECL_SOURCE_FILE (current_function_decl), - DECL_SOURCE_LINE (current_function_decl)); + DECL_SOURCE_LINE (current_function_decl), + DECL_SOURCE_COLUMN (current_function_decl)); } }