...
| Code Block | ||||
|---|---|---|---|---|
| ||||
void f(void) {
for (int i = 0; i < 10; i++) {
long j;
/* ... */
}
} |
Exceptions
DCL01-C-EX1: A function argument in a function declaration may clash with a variable in a containing scope provided that when the function is defined, the argument has a name that clashes with no variables in any containing scopes.
| Code Block | ||||
|---|---|---|---|---|
| ||||
extern int name;
void f(char *name); /* Declaration: no problem here */
/* ... */
void f(char *arg) { /* Definition: no problem; arg doesn't hide name */
/* Use arg */
}
|
DCL01-C-EX2: A temporary variable within a new scope inside of a macro can override a surrounding identifier.
...