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

Re: [patch, libgfortran] Bug 91593 - Implicit enum conversions in libgfortran/io/transfer.c


On 9/23/19 8:52 AM, Bernhard Reutner-Fischer wrote:
On 22 September 2019 22:51:46 CEST, Jerry DeLisle <jvdelisle@charter.net> wrote:
Hi all,

The attached patch eliminates several warnings by adjusting which
enumerator is
used in the subject offending code. I fixed this by adding an
enumerator at the
end of the file_mode definition.  This then triggered a warning in
several other
places for an unhandled case in the switch statements. I cleared those
by
throwing in an assert (false) since it cant happen unless something
really goes
wrong somehow.

I'm curious why you assert (false) instead of the usual gcc_unreachable ()?

Thanks,


Because I forgot all about gcc_unreachable.  I will give it a try.

Jerry


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