gcc error messages
Peter Fraser
pjf@thinkage.ca
Mon Aug 26 10:15:00 GMT 2002
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
More information about the Gcc
mailing list