[cfe-dev] User manual, and GCC functions not implemented

Renato Golin renato.golin at linaro.org
Sat Jul 26 02:35:07 PDT 2014


On 25 July 2014 17:51, Hal Finkel <hfinkel at anl.gov> wrote:
> Not that I'm advocating implementing it, but I wonder if now that we have support for many similar constructs (C++ lambdas, OpenMP outlining, etc.) it would not be as complex as it once was.

Hal,

It's not about code complexity, it's about semantics.

Nested functions play with scopes, which are rigorously defined by the
standard, and access to internal variables can be a mess when you
start mixing up stuff. The standards committees made it pretty clear
that nested functions are a no-no and I'd bet on their wisdom more
than on a random library writer's any day.

A better strategy would be to cry foul to the library writers and ask
them to conform to the standard, since other projects rely on their
library.

cheers,
--renato



More information about the cfe-dev mailing list