add nothrow and @nogc to windows files#3796
add nothrow and @nogc to windows files#3796WalterBright wants to merge 1 commit intodlang:masterfrom
Conversation
|
Thanks for your pull request, @WalterBright! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + druntime#3796" |
|
This turns callback types nothrow nogc as well, which is a breaking change. That might be fine, but worth considering. |
Yes, something to keep an eye on, but in this case the function types seem to be meant as types of the respected functions, e.g. to be used for casting the result of The change in |
|
https://devblogs.microsoft.com/oldnewthing/20200911-00/?p=104205 suggests that COM interfaces are nothrow. They're also designed to be used with C, which doesn't throw. |
|
Indeed, the Not allowing arbitrary allocations with |
|
@rainers what prompted this is I can't get dmd source code to be (Also, the AddRef and Release functions were designed before exception handling came about, and they obviously won't work with exceptions flying around.) |
|
I understand what you are trying to do but
I forgot that attributes are inherited by overriding functions automatically, so that restricts breakage to implementations of these methods that call unannotated functions. I'm fine with updating my sources (though most use a different translation of the Windows headers anyway), but I suspect there will be some breakage. |
|
I rebooted this as #3797 |
blocking dlang/dmd#13960