On 7/10/25 6:34 PM, Jakub Jelinek wrote:
On Thu, Jul 10, 2025 at 05:46:06PM -0400, Jason Merrill wrote:
+ bool trivially_relocatable_if_eligible : 1;
+ bool replaceable_if_eligible : 1;
+
+ bool trivially_relocatable : 1;
+ bool trivially_relocatable_computed : 1;
+ bool replaceable : 1;
+ bool replaceable_computed : 1;
I wonder if we can get away with two bits per property? I don't think
there's a way to query whether the "if_eligible" appeared on the type, only
whether it is in fact e.g. replaceable.
So if replaceable is set and replaceable_computed is not, it means
_if_eligible was specified?
Good idea. Is it enough like done in the following updated patch, or shall
there be also *_IF_ELIGIBLE macros that would check both bits and macros to
set it etc.?
I think maybe just change e.g. CLASSTYPE_TRIVIALLY_RELOCATABLE to
CLASSTYPE_TRIVIALLY_RELOCATABLE_BIT to avoid confusion. OK with that tweak.
Jason