Re: [PATCH] doc: Describe behaviour of enums with fixed underlying type

2023-05-02 Thread Jonathan Wakely via Gcc-patches
On Thu, 27 Apr 2023 at 16:58, Marek Polacek wrote: > On Thu, Apr 27, 2023 at 12:16:34PM +0100, Jonathan Wakely via Gcc-patches > wrote: > > C2x adds the ability to give an enumeration type a fixed underlying > > type, as C++ already has. The -fshort-enums option alters the compiler's > > choice of

Re: [PATCH] doc: Describe behaviour of enums with fixed underlying type

2023-04-27 Thread Marek Polacek via Gcc-patches
On Thu, Apr 27, 2023 at 12:16:34PM +0100, Jonathan Wakely via Gcc-patches wrote: > C2x adds the ability to give an enumeration type a fixed underlying > type, as C++ already has. The -fshort-enums option alters the compiler's > choice of underlying type, but when it's fixed the compiler can't > cho

[PATCH] doc: Describe behaviour of enums with fixed underlying type

2023-04-27 Thread Jonathan Wakely via Gcc-patches
C2x adds the ability to give an enumeration type a fixed underlying type, as C++ already has. The -fshort-enums option alters the compiler's choice of underlying type, but when it's fixed the compiler can't choose. Similarly for C++ -fstrict-enums has no effect with a fixed underlying type, becaus