Re: [Mingw-w64-public] Fwd: Re: [PATCH] Include driverspecs.h in specstrings.h.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2017/5/11 21:51, David Grayson wrote:
Unfortunately, my patch seems to break several classes in libstdc++,
preventing Qt from building.  The problem is that driverspecs.h defines
__in to be empty so we can compile Microsoft-type code that uses __in as a
source annotation on function parameters while GCC's libstdc++ uses __in as
the name of an input argument for many of its methods:

$ egrep -lr '\b__in\b' /mingw32/include/
/mingw32/include/c++/6.3.0/bits/basic_string.h
/mingw32/include/c++/6.3.0/bits/basic_string.tcc
/mingw32/include/c++/6.3.0/bits/istream.tcc
/mingw32/include/c++/6.3.0/bits/locale_facets.h
/mingw32/include/c++/6.3.0/ext/random.tcc
/mingw32/include/c++/6.3.0/ext/vstring.tcc
/mingw32/include/c++/6.3.0/istream
/mingw32/include/c++/6.3.0/tr1/tuple
/mingw32/include/c++/6.3.0/tr1/utility
/mingw32/include/c++/6.3.0/tr2/bool_set
/mingw32/include/c++/6.3.0/tr2/bool_set.tcc
/mingw32/include/c++/6.3.0/tuple
/mingw32/include/c++/6.3.0/utility

One of the errors I get looks like this:

/nix/.../include/c++/6.3.0/utility:208:57: error: no matching function for
call to 'move()'
      { return __pair_get<_Int>::__move_get(std::move(__in)); }

I don't think this is necessarily a problem with mingw-w64, or a problem
with that patch.  Adrien Nader's attitude on this mailing list in
2015-11-03 was "Really, there's a platform and software is built on top of
it; it is that software that is supposed to adapt to the platform."  Microsoft
Windows and mingw-w64 are platforms that define __in to have a special
meaning.  The software built on that platform (libstdc++) should adapt to
the platform.
I CC'd gcc-help. Hope it helps.
Anyway Windows headers are really a can of worms (think about the macros `min` and `max` for example).

One odd thing is that our __in gets defined in driverspecs.h, while
Microsoft defines their __in in sal.h.  But specstrings.h (for both
mingw-w64 and Microsoft) includes both sal.h and driverspecs.h so that
shouldn't affect when the bug appears.
Both headers seem to be out of sync for years. I hope they can be updated someday.


--
Best regards,
LH_Mouse




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux