This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/53925] New: dbgcnt.c:dbg_cnt_set_limit_by_index emits diagnostic via fprintf (stderr
- From: "gjl at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 11 Jul 2012 10:40:35 +0000
- Subject: [Bug other/53925] New: dbgcnt.c:dbg_cnt_set_limit_by_index emits diagnostic via fprintf (stderr
- Auto-submitted: auto-generated
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