<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I think the usual guidance for warnings is "useful enough to be on by default, or don't have it". Since this is warning is more about optimizable code and not about correctness, I think this is ok in this case.<br>
</blockquote></div>
</div></div></div></blockquote><div><br></div></div></div><div>The idea is similar to -Wpadded, that diagnostic does not presume to answer how to minimize the padding in your struct.  Likewise, there are many ways to silence this diagnostic depending on the TU:</div>

<div>1. Move the definition above the point where in the inheritance model is selected.</div><div>2. Use an inheritance keyword like __single_inheritance.</div><div>3. Use #pragma pointers_to_members to select an inheritance model.</div>

<div>4. Use the /vmg and /vm{s,m,v} flags</div></div></div></div></blockquote><div><br></div><div>I thought that padding is a more widely known thing than inheritance model warnings (and it's also a warning that's shared with gcc, so it has some documentation :-) ), so I thought giving more guidance would be appropriate.</div>
<div><br></div><div>I then conducted a study on a sample population of experienced Windows developers (sample size 1), and 100% of the sample population understood what the warning was about and could think of mitigations 1 and 2. So I think this is fine, lgtm.</div>
</div></div></div>