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]

Re: Warning elimination patches in cp/call.c



> This is an enormous amount of work, not to mention flat out impossible
> since we allow language front ends to make their own tree nodes.

OK, this makes it clear that we can't expect to individually handle
every case.

> Yes, there may be a few that should be aborts.  But the behavior with
> the default: break case matches the current behavior -- which is
> what I think we want to do unless we know its wrong (as has been
> the case for some of the suggested paren warning fixes).

It seems that inserting default: break should be fine in most cases.  The
only exception is where each case computes a needed result or returns a
value; here default: break won't compute the result or return a value, so
it seems that there should be a default: abort in such cases (otherwise
we'll wind up with an uninitialized variable or fall off the end of
a function).


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