CHILL warning question ...

Dave Brolley brolley@cygnus.com
Tue Sep 29 16:59:00 GMT 1998


Kaveh R. Ghazi wrote:

>          The file ch/expr.c has ~160 "enumeration value not handled in
> switch" warnings which all stem from two switches.  (If you do a recent
> egcs bootstrap you'll see them, the switches *end* on lines 3542

This one should have "default: abort();" added since there are no additional
cases to handle and falling through will result in returning an uninitialized
"result"

> and
> 3620.

Same for this one.

>          I wasn't sure which one applied here.  Also, the second switch
> gets additional warnings of the type: "case value `??' not in enumerated
> type `chill_tree_code', which I found odd.  Would you please advise on
> how to proceed?

This is because all of the case values are from enum tree_code. I grepped thru
the code and it looks like the following functions should all take "enum
tree_code" instead of "enum chill_tree_code":

build_compare_expr, build_compare_discrete_expr, build_compare_set_expr,
build_compare_string_expr

> PS: Similar issues occur in ch/grant.c and ch/typeck.c.
>

I need you to point out the particular instances in question.

Dave





More information about the Gcc mailing list