在 2021/3/19 上午2:58, Ken Goldman 写道:

gcc --version
gcc (MinGW.org GCC Build-2) 9.2.0


In general, the 'nested function declared extern' error usually suggests a missing close brace of a function, after which another (probably system) header is included and a function is found:

```
lh_mouse@lhmouse-ideapad ~/Desktop $ cat test.c
int main(void) {
  extern int something(void) { return 42;  }
  return something();
}
lh_mouse@lhmouse-ideapad ~/Desktop $ gcc test.c
test.c: In function ‘main’:
test.c:2:14: error: nested function ‘something’ declared ‘extern’
    2 |   extern int something(void) { return 42;  }
      |              ^~~~~~~~~
```

If you think there is a problem in MinGW.org headers, please file a bug report to them. This is the mingw-w64 list and we aren't responsible for MinGW.org issues.


--
Best regards,
Liu Hao

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to