Hi,Attached are two patches to complement the recent work done by David Robins on __interface.
The first, interface-fix.diff, corrects a codegen regression created by r163013 whereby all methods (including constructors) inside an __interface were being marked pure virtual and were causing the vtable generation to be invalid.
The second, interface-enh.diff, adds in diagnostics for __interface, to match the spec laid down by Microsoft, i.e. that interfaces:
* Can inherit from zero or more base interfaces. * Cannot inherit from a base class. * Can only contain public, pure virtual methods. * Cannot contain constructors, destructors, or operators. * Cannot contain static methods. * Cannot contain data members; properties are allowed. [source: http://msdn.microsoft.com/en-us/library/50h7kwtb(v=vs.110).aspx] And another not explicitly in the spec: * Cannot be declared 'final'I've run my test-case against VS2010 (I don't have VS2012), and it generates similar diagnostics.
I hope the patches are good to commit; any comments welcome, although I'm travelling over the next few days and may not reply immediately!
Cheers Andy
interface-fix.diff
Description: Binary data
interface-enh.diff
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
