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

--- Comment #14 from Manu <[email protected]> ---
I use those workarounds; but I still have to explain why it's broken to people.

Those cases you describe, which are all cases of effectively anonymous
functions, should be the ones that use pragma(mangle), you can generate any
string you like and stuff it in there, the name is totally irrelevant. But
you're telling that I should generate the proper name in the default case,
which is the only case where the name IS relevant.

C functions have naming requirements too; C functions need to have an
underscore, or not, depending on the ABI. I shouldn't have to implement that
logic to emit a C function name with or without underscore.

The case where extern(C) doesn't mean extern(C) (your proposed cases where you
want to emit many functions, which is distinctly NOT C) are the ones that
should be doing special work; it should require effort to violate the meaning
of extern(C), not the other way around.

I also bet there are precisely zero use cases as you describe in existence.

--

Reply via email to