gcc complains that he can't assure if switch-enum is complete

This commit is contained in:
Yuichi Nishiwaki 2014-01-19 00:32:43 -08:00
parent 7bfe165a73
commit ab411cc298
2 changed files with 3 additions and 0 deletions

View File

@ -199,6 +199,8 @@ pic_type(pic_value v)
return PIC_TT_EOF;
case PIC_VTYPE_HEAP:
return ((struct pic_object *)pic_ptr(v))->tt;
default:
return -1; /* logic flaw */
}
}

View File

@ -554,6 +554,7 @@ analyze_node(analyze_state *state, pic_value obj, bool tailpos)
case PIC_TT_IREP:
pic_error(pic, "invalid expression given");
}
pic_abort(pic, "logic flaw");
}
static pic_value