<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, May 19, 2014 at 2:38 PM, Aaron Ballman <span dir="ltr"><<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Mon, May 19, 2014 at 5:32 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk">richard@metafoo.co.uk</a>> wrote:<br>

> You're citing the wrong section of the standard in your patch. The relevant<br>
> wording is [dcl.stc]p1: "If a storage-class-specifier appears in a<br>
> decl-specifier-seq, [...] the init-declarator-list of the declaration shall<br>
> not be empty [...]."<br>
<br>
</div>Ah, good to know. I made it down to p9 because we were declaring a<br>
type instead of a member variable, but that makes sense.<br>
<div class=""><br>
> Do we really need to change the code here? Is the new diagnostic better than<br>
> the old one?<br>
<br>
</div>Old diagnostic: ext-warn "'mutable' is not permitted on a declaration of a type"<br>
Proposed diagnostic: error "'mutable' can only be applied to member variables"<br>
<br>
Honestly, either works for me in terms of wording.<br>
<div class=""><br>
> Do we have a reason to promote this from ExtWarn to Error just<br>
> for mutable and not for other storage class specifiers?<br>
<br>
</div>I was going with error because the other mutable constraint violations<br>
are also errors (including this existing one which I was reusing).<br>
Also, it seems weird to treat this as an extension -- what does this<br>
extension actually provide in terms of benefit for the mutable<br>
keyword? What does a mutable type declaration even mean?</blockquote><div><br></div><div>It's weird that we allow this for other storage classes too. What does a static type declaration mean? =)</div><div><br></div><div>
No objection to the patch; I think I slightly prefer consistent treatment of 'mutable' over consistent treatment of storage classes on type declarations. But I wonder why we ExtWarn rather than Error'ing here in the other cases, and I'm slightly cautious about changing this without knowing the history.</div>
</div></div></div>