<div dir="ltr"><div>If such a warning would be implemented, would it be possible to also add selective `-Werror` (same syntax as `-Xlint`)? Because then it would be possible for people to turn on "exhaustive switch" at will (which would be awesome in my opinion). Selectiveness of `-Werror` is necessary for this, because there are warnings that I wouldn't want to turn off, but don't want an outright build failure, because of them. Also, selective `-Werror` would be useful for some other warnings as well.</div><div><br></div><div>Attila</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Brian Goetz <<a href="mailto:brian.goetz@oracle.com">brian.goetz@oracle.com</a>> ezt írta (időpont: 2023. okt. 29., V, 21:09):<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

  
  <div>
    <font size="4"><font face="monospace">At the same time, we should
        consider a lint warning for non-exhaustive old-style switches,
        which a recommendation to make them exhaustive with `default:`
        or `default -> {}`, depending on the switch style.</font></font><br><br>
  </div>

</blockquote></div></div>