On Wed, Apr 12, 2023 at 5:07 AM Joerg Sonnenberger <jo...@bec.de> wrote: > > Am Wed, Apr 12, 2023 at 09:17:49AM -0000 schrieb Michael van Elst: > > jo...@bec.de (Joerg Sonnenberger) writes: > > > > >Which compiler from this century doesn't allocate stack space > > >independent from the source order? > > > > gcc with -O0 and -O1 allocates variables in source order. > > More by accident, not guaranteed.
FWIW clang also does with -O0, not sure if it proves it is a common mistake to make or there might be some intention to it. Carlo