这个不是C标准的,是gcc的私有扩展,你在编译时加上 -std=c11 -Wpedantic 试试
将会警告你:ISO C forbids nested functions
【附】
-Wpedantic
-pedantic Issue all the warnings demanded by strict ISO C and ISO C++; reject all programs that use forbidden extensions, and some other programs that do not follow ISO C and ISO C++. For ISO C, follows the version of the ISO C standard specified by any -std option used.
The new option -Wpedantic is an alias for -pedantic, which is now deprecated.