Hi Joseph, On Tue, Oct 14, 2025 at 03:53:18PM +0000, Joseph Myers wrote: > On Tue, 14 Oct 2025, Alejandro Colomar wrote: > > > I thought about that while implementing it, and I left bool unsupported > > on purpose. The proposal I wrote for C2y fails to exclude bool, though. > > > > The thing is, bool is not a regular integer type, and I'm not sure it > > should be supported (does it make any sense?), so I prefer leaving it > > out. We're always in time to add support for it later. > > In any case you need to test bool in the testsuite, and if the proposed
Yup, it's tested (although I should probably move the test to a
different function, as the current name is inappropriate. It's
currently tested here:
+void
+non_int (void)
+{
+ struct s {int x;};
+ union u {int x;};
+
+ _Maxof (struct s); /* { dg-error "to type" } */
+ _Minof (struct s); /* { dg-error "to type" } */
+ _Maxof (union u); /* { dg-error "to type" } */
+ _Minof (union u); /* { dg-error "to type" } */
+ _Maxof (bool); /* { dg-error "to type" } */
+ _Minof (bool); /* { dg-error "to type" } */
+ _Maxof (int [1]); /* { dg-error "to type" } */
+ _Minof (int [1]); /* { dg-error "to type" } */
+}
> feature is "like N3628 but with changes X and Y" it needs to be stated
> explicitly.
Yep. I'll instead send a new N document removing bool from the
supported types, and then refer to that.
Cheers,
Alex
--
<https://www.alejandro-colomar.es>
Use port 80 (that is, <...:80/>).
signature.asc
Description: PGP signature
