Skip to content

Windows: Preprocess C files in C11 mode, as on Posix#21391

Merged
thewilsonator merged 1 commit intodlang:masterfrom
kinke:msvc_c11
May 18, 2025
Merged

Windows: Preprocess C files in C11 mode, as on Posix#21391
thewilsonator merged 1 commit intodlang:masterfrom
kinke:msvc_c11

Conversation

@kinke
Copy link
Copy Markdown
Contributor

@kinke kinke commented May 18, 2025

Incl. supporting __declspec(_Noreturn) in ImportC, as apparently used in Microsoft headers when running with /std:c11, e.g.:

C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include\intrin.h(204): Error: extended-decl-modifier expected after `__declspec(`, saw `_Noreturn` instead
__declspec(_Noreturn) void __fastfail(unsigned int);

@dlang-bot
Copy link
Copy Markdown
Contributor

Thanks for your pull request and interest in making D better, @kinke! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Your 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 locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#21391"

@kinke kinke force-pushed the msvc_c11 branch 2 times, most recently from fe81322 to 0646de3 Compare May 18, 2025 14:29
Incl. supporting `__declspec(_Noreturn)` in ImportC, as apparently
used in Microsoft headers when running with `/std:c11`, e.g.:

C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include\intrin.h(204): Error: extended-decl-modifier expected after `__declspec(`, saw `_Noreturn` instead
__declspec(_Noreturn) void __fastfail(unsigned int);
@kinke kinke marked this pull request as ready for review May 18, 2025 14:52
@kinke kinke requested a review from ibuclaw as a code owner May 18, 2025 14:52
@thewilsonator thewilsonator merged commit f6c1b9a into dlang:master May 18, 2025
40 of 42 checks passed
@kinke kinke deleted the msvc_c11 branch May 18, 2025 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants