On Mon, Feb 12, 2024 at 10:45:40PM -0800, Tyler Retzlaff wrote:
> The zero sized RTE_MARKER<n> typedefs are a GCC extension unsupported by
> MSVC.  Replace the use of the RTE_MARKER typedefs with anonymous unions.
> 
> Note:
> 
> v1 of the series tried to maintain the API after some study it has been
> discovered that some existing uses of the markers do not produce compilation
> failure but evaluate to unintended values in the absence of adaptation.
> For this reason the existing markers cannot be removed because it is too hard
> to identify what needs to be changed by consumers. While the ABI has been
> maintained the subtle API change is just too risky.
> 
> The question I'm asking now is how to gracefully deprecate the markers
> while allowing consumption of the struct on Windows.
> 
> I propose the following:
> 
> * Introduce the unions as per-this series except instead of adding members
>   that match the original RTE_MARKER field names provide *new* names.
> * Retain (conditionally compiled away on Windows) the existing RTE_MARKER
>   fields with their original names.
> * Convert in-tree code to use the new names in the unions.
> 
> The old names & markers would be announced for deprecation and eventually
> removed and when they are the conditional compilation would also go away.
> 
> Thoughts?
> 
This seems a good approach. +1 from me for the idea.

/Bruce

Reply via email to