Martin =?utf-8?q?Storsjö?= <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>


erichkeane wrote:

> Thanks for looking at this!
> 
> > Otherwise, what is the behavior if someone specifies BOTH `ms_struct` AND 
> > `gcc_struct`? It seems to me we should both test and define what that means.
> 
> On one hand, I'm not entirely sure if we want to explicitly document the 
> behaviour for this case - should we rather say that specifying both is 
> unspecified? Then we can make that into an error (due to the user passing 
> directly conflicting attributes) later if we want to?
> 
> > At the moment, it seems like this would just default to the `gcc_struct`, 
> > which seems wrong to me.
> 
> What would be the right behaviour to you? If both are passed, I don't really 
> see which outcome would be less wrong, other than erroring out?
> 
> I'll try to expand the documentation briefly about what the differences are.

IMO, just error'ing is the only right behavior I could think of.  I left it 
open in case you had a better idea.  Leaving it 'undefined'/'unspecified' is 
pretty unacceptable.  

Defaulting to `gcc_struct` seems arbitrary and without any reason whatsoever, 
and I don't see any value to that.  

Barring any good ideas, this needs to error.

https://github.com/llvm/llvm-project/pull/71148
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to