Skip to content

Conversation

@ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Dec 31, 2017

The default behaviour is to raise an internal compiler error and exit if cppmangle encounters a static array parameter. This is not compatible with how GDC represents va_lists internally.

In the codegen pass, GDC will saturate a va_list to a pointer if its underlying type is a static array.

Patch taken from #2194

However... I think that a better way to do this would be to move it to a backend hook, such as Target.cppTypePassedAs(Type t).

The default behaviour is to raise an internal compiler error and exit if
cppmangle encounters a static array parameter.  This is not compatible
with how GDC represents va_lists internally.

In the codegen pass, GDC will saturate a va_list to a pointer if its
underlying type is a static array.
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @ibuclaw!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

@dlang-bot dlang-bot merged commit dd9c139 into dlang:master Dec 31, 2017
@ibuclaw ibuclaw deleted the valistmangle branch December 31, 2017 08:41
@dnadlinger
Copy link
Contributor

Are arbitrary GDC/LDC-only patches accepted now? We have a few of these too…

@PetarKirov
Copy link
Member

PetarKirov commented Jan 2, 2018

@klickverbot Obviously we should all aim at reducing the need for IN_LLVM and IN_GCC, but shorter-term and more important goal for me is to make merging upstream frontend changes in LDC and GDC as easy as possible and one day testing each dmd/druntime/phobos PR on our CI infrastructure with the LLVM and GCC backends.

@ibuclaw
Copy link
Member Author

ibuclaw commented Jan 3, 2018

This wouldn't be so arbitrary if it was a condition-less runtime call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants