This is the mail archive of the gcc-bugs@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]

[Bug other/53925] New: dbgcnt.c:dbg_cnt_set_limit_by_index emits diagnostic via fprintf (stderr


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53925

             Bug #: 53925
           Summary: dbgcnt.c:dbg_cnt_set_limit_by_index emits diagnostic
                    via fprintf (stderr
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: gjl@gcc.gnu.org


There is this code in dbgcnt.c

static void
dbg_cnt_set_limit_by_index (enum debug_counter index, int value)
{
  limit[index] = value;

  fprintf (stderr, "dbg_cnt '%s' set to %d\n", map[index].name, value);
}

If the user specifies -fdbg-cnt= that will trigger a diagnostic output.

IMO setting an option should not emit a diagnose, except in the case when the
user explicitly requests so, e.g. by means of -dbg-cnt-list, -print-multi-lib,
etc.

The fprintf (stderr should be removed or print to a dump file.

== Command line to reproduce ==

echo | gcc -fdbg-cnt=dce:0 -x c - -c


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