Re: Spurious -Wsequence-point with auto

2024-08-16 Thread Ben Boeckel via Gcc
On Fri, Aug 09, 2024 at 11:48:44 +0200, Alejandro Colomar via Gcc wrote: > On Fri, Aug 09, 2024 at 10:31:55AM GMT, Martin Uecker wrote: > > BTW: Double evaluation is not only a problem for semantics, but also because > > it can cause long compile times, cf. the 45 MB macro expansion example > > in

Re: Spurious -Wsequence-point with auto

2024-08-09 Thread Alejandro Colomar via Gcc
Hi Martin, On Fri, Aug 09, 2024 at 10:31:55AM GMT, Martin Uecker wrote: > Can you file a bug if there isn't one already? > BTW: Double evaluation is not only a problem for semantics, but also because > it can cause long compile times, cf. t

Re: Spurious -Wsequence-point with auto

2024-08-09 Thread Martin Uecker via Gcc
Am Freitag, dem 09.08.2024 um 01:10 +0200 schrieb Alejandro Colomar via Gcc: > Hi, > > I've seen some bogus warning in GCC that suggests that some use of auto > may cause undefined behavior (due to double evaluation). > > $ cat auto.c > #include > > int > main(void) > { > int i = 3; >

Spurious -Wsequence-point with auto

2024-08-08 Thread Alejandro Colomar via Gcc
Hi, I've seen some bogus warning in GCC that suggests that some use of auto may cause undefined behavior (due to double evaluation). $ cat auto.c #include int main(void) { int i = 3; int a[2 * i]; int (*p)[2 * i]; i = 1; p = &a; auto q = p +