subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philip Martin <philip.mar...@wandisco.com>
Subject Re: svn commit: r1725957 - /subversion/trunk/subversion/svn/merge-cmd.c
Date Thu, 21 Jan 2016 18:04:29 GMT
Stefan Sperling <stsp@elego.de> writes:

>> The scope does matter: the C standard specifies that the lifetime of an
>> object "extends from entry into the block with which it is associated
>> until execution of that block ends" [6.2.4]. An optimising compiler is
>> free to reuse stack slots once out of scope, either for other stack
>> variables or for stack space to call a function.
>
> Interesting.  I stand corrected, thanks!

gcc implements this optimisation and has -fstack-reuse to control it:

https://gcc.gnu.org/onlinedocs/gcc-5.1.0/gcc/Code-Gen-Options.html

-- 
Philip Martin
WANdisco

Mime
View raw message