Opened 12 months ago
#297 new defect
Parameter name does not shadow in-scope type name
| Reported by: | mlbrooks | Owned by: | |
|---|---|---|---|
| Priority: | minor | Component: | cfa-cc |
| Version: | 1.0 | Keywords: | |
| Cc: | parser |
Description
typedef int T;
void sut( int T ) {
printf("%d\n", T); // syntax error suggesting T is a type
}
void fyi() {
int T = 1;
printf("%d\n", T); // ok
}
int main() {
sut( 1 );
fyi();
return 0;
}
CFA Actual: compile error, as commented above
GCC Actual, All Expected: print "1" twice
Note:
See TracTickets
for help on using tickets.