[cfe-dev] [PATCH] Add Microsoft's handling of exception specifications
Douglas Gregor
dgregor at apple.com
Thu Aug 26 07:42:06 PDT 2010
On Aug 24, 2010, at 3:19 AM, Martin Vejnár wrote:
> On Tue, 24 Aug 2010 05:51:10 -0400, Francois Pichet <pichet2000 at gmail.com>
> wrote:
>> I don't think it is necessary to add a MsExceptSpec flag in
>> LangOptions nor a -fms-except-spec compiler switch.
>> Simply add the following test for MSVC compatibility:
>> if (getLangOptions().Microsoft)
>>
>> Because if we add an option or switch for every microsoft extension,
>> it is never going to end.
>
> That was my original thought as well, however, the mistreatment of
> exception specifications is not strictly speaking an extension. I can
> imagine a situation where we would want to support MS extensions and yet
> deal with exception specifications correctly.
>
> In any case, I'm attaching another patch that does what you suggest.
I think the patch is okay, but please provide test cases that explore how Visual C++ actually checks compatibility of exception specifications, to make sure that we're modeling what Visual C++ does rather than having some different non-conforming behavior.
- Doug
More information about the cfe-dev
mailing list