W dniu 2017-05-15 o 08:51, Liu Hao pisze:
> On 2017/5/11 23:11, Kai Tietz wrote:
>> I would prefer this too, but I don't believe that we can convince
>> libstdc++ maintainers to modify their code for this.  Sadly the MS'
>> platform sdk defines a lot of stuff, which collides some times with
>> some projects.  We made about this already a lot of bad experiences
>> ... especially in context of MIDL ... defining
>> IN/OUT/INOUT/OPTIONAL/etc is really no clever move ...
>> Nevertheless it might be worth a try to ask libstdc++ people for those
>> __in.... A good argument (and bad one too) might be that the double
>> underscore symbols are reserved to compilers/system headers.  And
>> well, C++ headers aren't really system headers, which is in general
>> just a POV ;)
> I suggest we comment out `__in` and `__out` from _driverspecs.h_. The 
> compatibility with GNU libstdc++ and LLVM libcxx is more essential than 
> that with Windows in my opinion.

+1

> 
> These macros are defined after including _windows.h_ from official 
> Windows SDK, as shown in this example:
> 
> ------------------------------------------------------------
> E:\Desktop>cat test.c
> #include <stdio.h>
> #include <windows.h>
> 
> int main(){
> #if defined(__in)
>          puts("__in is defined.");
> #else
>          puts("__in is not defined.");
> #endif
> }
> 
> E:\Desktop>cl test.c /nologo /Fea.exe
> test.c
> 
> E:\Desktop>cat test.c
> #include <stdio.h>
> #include <windows.h>
> 
> int main(){
> #if defined(__in)
>          puts("__in is defined.");
> #else
>          puts("__in is not defined.");
> #endif
> }
> 
> E:\Desktop>cl test.c /nologo /Fe:a.exe
> test.c
> 
> E:\Desktop>a.exe
> __in is defined.
> 
> E:\Desktop>gcc test.c
> 
> E:\Desktop>a.exe
> __in is not defined.
> ------------------------------------------------------------
> 
> 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to