...
| Code Block | ||
|---|---|---|
| ||
/* compile using gcc4.3.3 */
void foo (void) {
int i = 3;
printf("i value: %d\n", i);
}
|
Implementation Details (ambiguous interface)
In gcc-4.3.3, when the above compliant solution is used and foo(3) is called, gcc will complain the following, which alerts programmer the misuse of the function interface.
| Code Block | ||
|---|---|---|
| ||
error: too many arguments to function â€⃜foo’
|
Noncompliant Code Example (information outflow)
...