Enforce preprocessor to run with gnu11#21349
Enforce preprocessor to run with gnu11#21349bangbangsheshotmedown wants to merge 1 commit intodlang:masterfrom
Conversation
|
Thanks for your pull request and interest in making D better, @bangbangsheshotmedown! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
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 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 + dmd#21349" |
|
From what I can see, this should work with both gcc and clang. |
|
Seems reasonable to me. @the-horo? For Windows/MSVC, we should probably use |
the-horo
left a comment
There was a problem hiding this comment.
Can confirm that this fixes it for me. Other than the trailing space the only concern would be the fact that the std is gnu11 rather then c11. Given that this was the implicit value picked by the compilers (at least on linux) I don't think the PR needs to be adjusted.
| argv.push(p); | ||
| } | ||
|
|
||
| argv.push("-std=gnu11"); |
There was a problem hiding this comment.
| argv.push("-std=gnu11"); | |
| argv.push("-std=gnu11"); |
It seems that // foo.c
#include <stdlib.h> |
|
I can confirm this. Also happens with |
|
Which have been merged - thx! |
After updating my machine, I started getting ton of errors like:
when using
-std=c11i get:when using
-std=gnu11it all works properlyPerhaps: #21311