[Mingw-w64-public] Fwd: Re: [PATCH] Include driverspecs.h in specstrings.h.
Jonathan Wakely
jwakely.gcc@gmail.com
Tue May 16 09:35:00 GMT 2017
On 11 May 2017 at 17:55, David Grayson wrote:
> Hello, gcc-help.
>
> There is an incompatibility between libstdc++ and the headers provided
> by Microsoft and mingw-w64, because libstdc++ uses __in as a parameter
> name in several places while the Microsoft headers define __in as a
> preprocessor macro as part of their Source Annotation Language.
Is it not possible to disable that noise somehow so that the macros
aren't defined?
> You can see several uses of __in in Microsoft-style code here:
>
> https://github.com/Microsoft/Windows-driver-samples/search?q=__in
>
> I would be willing to create, test, and submit a patch that changes
> libstdc++ to use ___in (with three underscores) to avoid this issue.
Three underscores is disgusting and wrong.
> I expect that to be a pretty safe change that doesn't break anything.
> Maybe I would add a test to help prevent this from happening in the
> future. Would the GCC maintainers consider accepting such a patch?
Yes, but not by simply adding an underscore.
The patch should add "__in" to
https://gcc.gnu.org/onlinedocs/libstdc++/manual/source_code_style.html#coding_style.bad_identifiers
and maybe to testsuite/17_intro/names.cc in order to avoid problems in
future.
More information about the Gcc-help
mailing list