On 20 Oct 2022 09:32, Tsukasa OI wrote: > Clang generates a warning if there is an enum value with a mismatching type > without an explicit cast ("-Wenum-conversion"). > On the default configuration, it causes a build failure > (unless "--disable-werror" is specified). > > This commit adds an explicit cast. > --- > sim/mn10300/op_utils.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > --- a/sim/mn10300/op_utils.c > +++ b/sim/mn10300/op_utils.c > @@ -152,8 +152,9 @@ do_syscall (SIM_DESC sd) > if (cb_target_to_host_syscall (STATE_CALLBACK (sd), func) == CB_SYS_exit) > { > /* EXIT - caller can look in parm1 to work out the reason */ > - sim_engine_halt (simulator, STATE_CPU (simulator, 0), NULL, PC, > - (parm1 == 0xdead ? SIM_SIGABRT : sim_exited), parm1); > + sim_engine_halt ( > + simulator, STATE_CPU (simulator, 0), NULL, PC, > + (parm1 == 0xdead ? (enum sim_stop) SIM_SIGABRT : sim_exited), parm1); i'm fairly certain the existing code is wrong, and adding the cast masks that error. so we don't want to do this. signals should be passed as the sigrc argument. -mike