hstk30 / hstk30.github.io

hstk30's Blog
Apache License 2.0
0 stars 0 forks source link

函数声明、函数定义、函数原型之间的关系 #13

Closed hstk30-hw closed 9 months ago

hstk30-hw commented 10 months ago

C11 6.2.1P2

A function prototype is a declaration of a function that declares the types of its parameters

再看下:6.5.2.2 Function calls P6,P7

void func1(int a, int b); // Prototype
void func2(a, b) int a, b; {} // No prototype
void func3(); // No prototype, can be called with any number and type of arguments

编译器选项控制