This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
gcc error messages
- From: Peter Fraser <pjf at thinkage dot ca>
- To: "'gcc at gnu dot org'" <gcc at gnu dot org>
- Date: Mon, 26 Aug 2002 13:12:11 -0400
- Subject: gcc error messages
In gcc when you "switch" on a "enum"
and there is no "default:". gcc issues a
warning message for each declared "enum" value
that does not have a "case" In general
this is a good idea. It stops errors.
But in the case of "enum"s with a large number
of members. A simple syntax error can ending
generating a vast number of useless warning
messages. In my case an extra '}' ended up
generating over 500 lines of warning messages.
This much output does not help the programmer.
It would be better is if gcc took a ratio
of the missing "enum" values to the total set
of values and issued just one message if the
ratio was large. I suggest the number
should be: one message if there are more than 5
missing "enum" values or more then 10% missing
"enum" values, otherwise print a message for
each "enum" value.
__________________
Peter J Fraser 519 895 1860 x201
Thinkage 519 895 1864 fax
85 McIntyre Dr
Kitchener
On N2R 1H6