On Thu, 23 Nov 2023 07:53:46 GMT, Robbin Ehn <r...@openjdk.org> wrote:

>>> But nested function are fine, so there is actually no issue with it.
>> 
>> Is it? The compilation error above says "error: function definition is not 
>> allowed here". It seems to me is saying that the compilation fails because 
>> of the nested function. Am I missing something?
>
> I don't know why.
> 
> 
> [rehn@rehn-xps ~]$ cat m.c
> int main() {
>   void foo() {
>     return;
>   };
>   foo();
>   return 0;
> }
> [rehn@rehn-xps ~]$ gcc -Wall -Wextra -std=c89 m.c 
> [rehn@rehn-xps ~]$

@robehn I think that is a gcc extension; not ANSI C.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/15138#discussion_r1403406177

Reply via email to