* Michael Meissner:

> On Mon, Mar 24, 2025 at 09:15:26PM +0100, Florian Weimer wrote:
>> * Michael Meissner:
>> 
>> > +enum reverse_cond_t {
>> > +  REVERSE_COND_ORDERED_OK,
>> > +  REVERSE_COND_NO_ORDERED
>> > +};
>> 
>> This should probably be something 
>> like
>> 
>> enum reverse_cond_t {
>>   ordered_ok,
>>   no_ordered,
>> };
>> 
>> to inhibit implicit conversion to integer types and bool.
>
> Thanks.  At heart I am still a C programmer, so I missed this.  I wrote 
> version
> 4 of the patch that hopefully codes this correctly.
>
> https://gcc.gnu.org/pipermail/gcc-patches/2025-March/679428.html

Unfortunately I totally botched my advice and dropped a critical
keyword.

To get scoped enum, you have to write:

enum class reverse_cond_t {
  ordered_ok,
  no_ordered,
};

Sorry!

Reply via email to