<div dir="ltr">On Mon, Jun 10, 2013 at 9:14 AM, Jordan Rose <span dir="ltr"><<a href="mailto:jordan_rose@apple.com" target="_blank">jordan_rose@apple.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div>The text says "already-defined", but in the first case it's merely declared twice.</div>
</div></blockquote><div><br></div><div style>Fixed.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div style="word-wrap:break-word"><div><br></div><div>If there's really no better justification than "because the standard says so", why not make this Ext or ExtWarn instead of Error? Clearly we already have this working.</div>
</div></blockquote><div><br></div><div style>I made it ExtWarn and gave it the flag -Wmember-class-redeclared.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div style="word-wrap:break-word"><span class=""><font color="#888888"><div><br></div><div>Jordan</div></font></span><div><div class="h5"><div><br></div><br><div><div>On Jun 9, 2013, at 23:51 , David Majnemer <<a href="mailto:david.majnemer@gmail.com" target="_blank">david.majnemer@gmail.com</a>> wrote:</div>
<br><blockquote type="cite"><div dir="ltr">The attached patch implements DR85 [*] which disallows the existence of a declaration of a member class that isn't a forward declaration before it's definition.<div><br></div>
<div>This means that the following would be disallowed:</div>
<div>class A {</div>  struct B; // note here<br>  struct B; // error here<div>};</div><div><br></div><div>as well as:</div><div>class C {</div><div>  struct B {}; // note here</div><div>  struct B; // error here</div>
<div>};</div><div><br></div><div>I'm very open to suggestions on the diagnostic, I couldn't think of a great one that doesn't boil down to "this is forbidden because the standard says so."</div>
<div><div><br></div><div>[*] <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#85" target="_blank">http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#85</a></div><div><br></div><div>Thanks</div>
<div>
-- </div><div>David Majnemer</div></div></div>
</blockquote></div></div></div></div>
<br><div style="word-wrap:break-word"><div><blockquote type="cite">_______________________________________________<br>cfe-commits mailing list<br><a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br></blockquote></div><br></div>
<br></blockquote></div><br></div></div>