[Issue 17056] No filename and line info for wrong extern C++ type

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Jan 4 12:32:08 PST 2017


https://issues.dlang.org/show_bug.cgi?id=17056

--- Comment #4 from bitter.taste at gmx.com ---
(In reply to Jacob Carlborg from comment #2)
> (In reply to bitter.taste from comment #1)
> > This should be only a matter of using the Loc of the Dsymbol we're currently
> > mangling when an error is thrown.
> 
> I'm pretty sure it's reporting the error as "Internal Compiler Error"
> because the error should have been caught earlier, properly reported with
> file and line number.

Nah, it's just that every error that's thrown from cppmangle.d is prefixed with
"Internal Compiler Error" and uses Loc() as loc instead of using the one of the
symbol it is trying to mangle.
No type checking is done in the mangler, it's just that there's no C++ type a D
`string' maps to, you could effectively prevent the use of types that have no
1:1 mapping to C++ ones but that's another matter, this approach just works
(TM).

--


More information about the Digitalmars-d-bugs mailing list