On Wed, May 28, 2014 at 1:49 PM, Nico Rieck <[email protected]> wrote:
> On 28.05.2014 21:00, Hans Wennborg wrote:
>> On Tue, May 27, 2014 at 7:53 PM, Nico Rieck <[email protected]> wrote:
>>>
>>
>> This sounds reasonable, but MSVC doesn't seem to diagnose it. It seems
>> to happily compile the following:
>>
>>   struct S {
>>     void __declspec(dllexport) foo() = delete;
>>     void __declspec(dllexport) bar() {}
>>   };
>>
>> exporting bar(), but not foo(). My (pretty old unfortunately) MinGW
>> didn't error either.
>
> IMO this is a missed diagnostic by the other compilers because deleting
> non-member functions with dll attributes *is* diagnosed. Note that this
> doesn't fire if the class itself has the attribute. But if folks feel
> strongly about it I can exclude member functions.

Aha, I never tested it with free functions. Yes, this seems like the
right thing to do.

Patch LGTM.

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

Reply via email to