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

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 


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