> 2012/3/16 Ludovic Courtès <ludovic.courtes@...>:
>> After writing an Autoconf macro that determines whether to build
>> plug-ins with gcc or g++ , I realized that nested functions, which my
>> plug-in uses extensively, are not supported in C++.
>> Any suggestions on how to address this?
> Don't use nested functions ;) GCC is supposed to be buildable with an ISO C99
> compiler which does not support nested functions either.
Right, but the nice thing with GCC plug-ins is they can be implemented
using all GNU extensions.
Nested functions can serve as the basis for some form of functional
programming, which some of the APIs lend themselves to very well.
For instance, the plug-in at  contains things like:
tree task = task_implementation_task (fn);
tree build_parameter (const_tree lst)
tree param, type;