Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 2
    It is supported by the GNU C compiler, as a special extension. But only for C, not C++. Commented Dec 1, 2010 at 13:29
  • Ah. I don't have any special extensions in my C compiler. That's good to know, though. I'll add that titbit to my answer. Commented Dec 1, 2010 at 13:30
  • I've used the gcc extension for support of nested functions (in C, though, not C++). Nested functions are a nifty thing (as in Pascal and Ada) for managing complex, yet cohesive structures that are not meant to be of general use. As long as one uses the gcc toolchain, it is assured to be mostly portable to all targeted architectures. But if there is change of having to compile the resulting code with a non-gcc compiler, then, it is best to avoid such extensions and stick as close as possible to the ansi/posix mantra. Commented Dec 1, 2010 at 17:34