On Fri, Nov 25, 2016 at 1:46 AM, Thomas Schwinge <tho...@schwinge.name>
wrote:

> Hi!
>
> Motivation for bringing this up again: GDB has recently switched from
> using a C to a C++ compiler.  GDB, for obvious reasons, needs to access
> low-level Hurd/Mach interfaces.
>
>
I've also had problems compiling hurd code using g++.

In addition to what Thomas has described, the ports library is unusable
with C++ because struct port_info has a member named "class".

Also, the initializer syntax used in /usr/include/refcount.h is unusable
with g++.  For example:

    209   const union _references op =
    210     { .references = { .weak = ~0U, .hard = 1} };

generates a compiler error:

sorry, unimplemented: non-trivial designated initializers not supported

To reproduce both problems, just create a file containing the line #include
<hurd/ports.h> and try to compile it with g++.  It doesn't matter if you
put it inside an extern "C" block, either.

    agape
    brent

Reply via email to