This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: C syntax problem in gcc
- To: Joerg Czeranski <jc at joerch dot org>
- Subject: Re: C syntax problem in gcc
- From: Mo McKinlay <mmckinlay at labs dot interopen dot org>
- Date: Wed, 5 Apr 2000 19:54:19 +0100 (GMT)
- cc: gcc-bugs at gcc dot gnu dot org
# For this source code:
#
# typedef int x;
# void proc(int (*x)(void)) {}
gcc 2.95.2 gives the same error; although personally I'm not sure whether
it's correct in its asessment or not. In the short term, though, may I
suggest writing something similar to:
typedef int x;
typedef int (*xfn_t)(void);
void proc(xfn_t x) {}
Which compiles fine.
My gut feeling is that your code is ambiguous, although I'm no expert (and
I'm probably wrong ;-).
Regards,
--
Mo McKinlay Chief Software Architect inter/open
mmckinlay@labs.interopen.org http://www.interopen.org