[9014] in Athena Bugs
xlc generates incorrect error
daemon@ATHENA.MIT.EDU (John Carr)
Tue Feb 25 07:43:24 1992
To: bugs@Athena.MIT.EDU
Cc: lwvanels@Athena.MIT.EDU
Date: Tue, 25 Feb 92 07:43:11 EST
From: John Carr <jfc@Athena.MIT.EDU>
xlc versions 1.1.8.9, 1.1.8.11, 1.1.8.12, and 1.2.0.0 all generate an
incorrect error message for this code. Version 1.1.8.0 does not.
typedef void (*proc3)(int, int, int);
typedef void (*proc2)(int, int);
f(proc2 fnp){(*(proc3)fnp)(1,2,3);}
It appears that xlc is checking the argument list against the type of
fnp, not the type of the casted expression, because it says
"unexpected argument" with the arrow pointing at the third argument.