<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 19.05.2019 09:34, Sven Barth via
      fpc-devel wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAFMUeB-YOEsJSoq2jSPoG6CwxqokNgU_es6k0hLHG=_KWWhoUQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="auto">
        <div>
          <div class="gmail_quote">
            <div dir="ltr" class="gmail_attr">J. Gareth Moreton <<a
                href="mailto:gareth@moreton-family.com"
                moz-do-not-send="true">gareth@moreton-family.com</a>>
              schrieb am So., 19. Mai 2019, 05:17:</div>
          </div>
        </div>
        <div dir="auto">
          <div class="gmail_quote">
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">I just
              feel that in this case, it should be a note, not a
              warning, <br>
              unless you're compiling under a dialect of Pascal (e.g.
              Extended) that <br>
              is stricter in its interpretation of the whitesheet and
              demands an error <br>
              be returned.<br>
            </blockquote>
          </div>
        </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">No, I don't think so. The compiler might
          generate quite some hints and notes some of which might be
          false positives (take the "uninitialized variable" in context
          of "var" parameters) and thus this note/hint would be lost
          among the noise.<br>
        </div>
      </div>
    </blockquote>
    <p>What makes you think an incomplete case statement might not be a
      false positive?<br>
    </p>
    <p><br>
    </p>
    <blockquote type="cite"
cite="mid:CAFMUeB-YOEsJSoq2jSPoG6CwxqokNgU_es6k0hLHG=_KWWhoUQ@mail.gmail.com">
      <div dir="auto">
        <div dir="auto">
          <div dir="auto">Also you need to keep in mind that enums are
            not necessarily static over the lifetime of the software.
            E.g. (using the compiler as an example) a new def type could
            be added. If you now haven't added empty else-clauses to the
            case-statements you'll now get a nice warning for every such
            case statement so that you can be reasonably sure you caught
            all.</div>
        </div>
      </div>
    </blockquote>
    <p>A note would do just the same.</p>
    <p>That all said, I very much like this new enum warning. A note
      would just do the same job (and I don't care if it's a warning or
      a note).</p>
    <p><br>
    </p>
    <blockquote type="cite"
cite="mid:CAFMUeB-YOEsJSoq2jSPoG6CwxqokNgU_es6k0hLHG=_KWWhoUQ@mail.gmail.com">
      <div dir="auto">
        <div dir="auto">
          <div dir="auto">At my work (where we use MSVC) we enabled the
            compiler's warning for this reason.</div>
        </div>
      </div>
    </blockquote>
    <p>In FPC we needed such a construct at every case block<br>
    </p>
    <p>    {$IF (Ord(High(TMyEnum)) <> 2)} {$MESSAGE Warning 'Case
      does not respond to all possible values'} {$IFEND}</p>
    <p>to get a warning when a new enum value is added. We don't need it
      anymore, good.</p>
    <p>Ondrej<br>
    </p>
  </body>
</html>