https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122312

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu.org
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #4 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> The benefit is being able to use nested functions knowing they'll be safe,
> regardless of whether the compiler optimizes or not.
> 
> The following code uses nested functions to implement a QChar-aware version
> of strtol(3).  It would be good to make sure that it doesn't require a
> writable stack by using 'static'.

That's the classical misconception about nested functions.  Nested functions
require a writable stack (or something fancy) *only* if you take their address.

So just use nested functions in GNU C without taking their address.

Reply via email to