On Tue, Jun 18, 2013 at 8:19 AM, Rafael Espíndola
<[email protected]> wrote:
> The attache testcase makes us reject
>
> struct ABC {
>   static double a;
> };
> register double ABC::a = 1.0;
>
> Suggestions on better error wording are welcome. It would also be nice
> to reference the standard in the comments, but I could not find
> anything appropriate.

[dcl.stc]p2: The auto or register specifiers shall be applied only to
names of variables declared in a block or to function parameters.

You should reject "extern" here too:

[dcl.stc]p6: The extern specifier cannot be used in the declaration of
class members

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to