Re: [swift-dev] SILNode versus C++

2018-01-04 Thread John McCall via swift-dev
> On Jan 4, 2018, at 8:29 PM, David Zarzycki wrote: > > Hi Adrian, > > Feel free to file a bug if you’re motivated. Personally speaking, I don’t > expect this bug to be on anybody’s priority list. The workaround of using > named structs/unions has no downside for most projects, and Swift is n

Re: [swift-dev] SILNode versus C++

2018-01-04 Thread David Zarzycki via swift-dev
Hi Adrian, Feel free to file a bug if you’re motivated. Personally speaking, I don’t expect this bug to be on anybody’s priority list. The workaround of using named structs/unions has no downside for most projects, and Swift is no exception. Dave -- Sent from my iPad > On Jan 4, 2018, at 20:

Re: [swift-dev] SILNode versus C++

2018-01-04 Thread Adrian Prantl via swift-dev
> On Dec 16, 2017, at 10:31 AM, John McCall via swift-dev > wrote: > >> >> On Dec 16, 2017, at 9:08 AM, David Zarzycki via swift-dev >> wrote: >> >> Hello, >> >> I’m trying to improve SILNode memory layout density by adopting the AST >> bitfield macros. Unfortunately, multiple inheritanc

Re: [swift-dev] SILNode versus C++

2017-12-16 Thread John McCall via swift-dev
> On Dec 16, 2017, at 9:08 AM, David Zarzycki via swift-dev > wrote: > > Hello, > > I’m trying to improve SILNode memory layout density by adopting the AST > bitfield macros. Unfortunately, multiple inheritance doesn’t seem to get > along with anonymous/unnamed unions. Here is a distillation

Re: [swift-dev] SILNode versus C++

2017-12-16 Thread Jonathan Prescott via swift-dev
This is expected. The inheritance chain ultimately ends up a B in both cases, so the reference to j is ambiguous, and the compiler can’t resolve which B is meant. This works. class B { protected: int i; union { int j; }; }; class C { protected:

[swift-dev] SILNode versus C++

2017-12-16 Thread David Zarzycki via swift-dev
Hello, I’m trying to improve SILNode memory layout density by adopting the AST bitfield macros. Unfortunately, multiple inheritance doesn’t seem to get along with anonymous/unnamed unions. Here is a distillation of the problem: class B { protected: int i; union { int j; }; }; class X :