On 10/11/2010 08:57 AM, Daniel Wallin wrote:
> On Sat, Oct 9, 2010 at 1:55 AM, Douglas Gregor<[email protected]>  wrote:
>> It'd be great if the declaration printer/dumper was updated to print the 
>> "class" in "enum class" and the fixed underlying type (when present), so 
>> that our -ast-dump and -ast-print output would be helpful.
>>
>> I've gone ahead and committed a tweaked version of your patch in r116122, 
>> with the minor tweaks above. It'd be great if you could address the issues 
>> above in a separate patch (disambiguation, diagnostics, declaration printer).
>
> Sure! The git mirror I'm using is a bit behind, so I'm not 100% sure
> these apply cleanly. If not I'll rebase when the mirror catches up.

I believe that

enum A { };
class C {
   enum A : int();
};

is a syntax error for attempting to declare an enumeration with an 
underlying function type, since the default rule in case of ambiguity is 
always to consider it a type-id. I do not believe that the patch 
correctly handles this; I think it should instead attempt to determine 
if it is a type-id before the semicolon/opening brace, and then act 
accordingly.

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

Reply via email to