<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Adding a separate flag to control this
      is probably fine. Not sure about the name fplan9-extensions; in
      gcc, I think that includes some other extensions we don't
      implement.<br>
      <br>
      -Eli<br>
      <br>
      On 7/30/2018 12:52 PM, Richard Smith wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAOfiQqn29MTpcHcCeb0zavizPZ8nCekDGkf3egFjnZJrO-0YcQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <div dir="ltr">Would it make sense to add a -fplan9-extensions
        flag, to enable support for this without enabling all the other
        MS extensions that we support?</div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr">On Mon, 30 Jul 2018 at 11:53, Friedman, Eli via
          cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org"
            moz-do-not-send="true">cfe-dev@lists.llvm.org</a>> wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">On 7/30/2018
          9:08 AM, Frank Redeker via cfe-dev wrote:<br>
          > Hello List,<br>
          ><br>
          > Given the following piece of code.<br>
          ><br>
          > typedef union {<br>
          >       struct {<br>
          >               unsigned char   LOW;<br>
          >               unsigned char   HIGH;<br>
          >       };<br>
          >       unsigned short  SHORT;          <br>
          > } UNION;<br>
          ><br>
          > typedef struct {<br>
          >       UNION; // <-- use of type only<br>
          >       union {<br>
          >               unsigned char   FOO;<br>
          >       };<br>
          > } STRUCT;<br>
          ><br>
          > STRUCT        Variable;<br>
          ><br>
          > void Function () {<br>
          >       Variable.LOW = 1;<br>
          > }<br>
          ><br>
          ><br>
          > This code compiles without any error using gcc 7.2 (When
          compiling with<br>
          > -ansi -pedantic I get the warning "ISO C90 doesn't
          support unnamed<br>
          > structs/unions". If I add -std=c11 the warning
          disappears)<br>
          <br>
          Declaring an anonymous union like that non-standard; you need
          to pass <br>
          -fms-extensions.<br>
          <br>
          -Eli<br>
          <br>
          -- <br>
          Employee of Qualcomm Innovation Center, Inc.<br>
          Qualcomm Innovation Center, Inc. is a member of Code Aurora
          Forum, a Linux Foundation Collaborative Project<br>
          <br>
          _______________________________________________<br>
          cfe-dev mailing list<br>
          <a href="mailto:cfe-dev@lists.llvm.org" target="_blank"
            moz-do-not-send="true">cfe-dev@lists.llvm.org</a><br>
          <a
            href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev"
            rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
        </blockquote>
      </div>
    </blockquote>
    <p><br>
    </p>
    <pre class="moz-signature" cols="72">-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project</pre>
  </body>
</html>