Hi all,

I have come across one strange case where dmd and dmc produce different mangling for seemingly identical declarations.

D:
extern(C++) const(const(bool)*) gc_pi1; // mangled as ?gc_pi1@@3PB_NB

C++:
extern bool const * const gc_pi1; // mangled as ?gc_pi1@@3QB_NB

So we have '[PQ]B_NB' which translates to '[pointer/const pointer] const bool const' where both of the const modifiers (for some reason) apply to the bool, not the pointer.

Is dmd incorrectly printing 'P' instead of 'Q' or have I missed something?

Thanks,
Daniel.

PS If anybody with msvc installed could try this I would be very grateful.