This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Strange pedantic error message
- To: Fergus Henderson <fjh at cs dot mu dot oz dot au>
- Subject: Re: Strange pedantic error message
- From: James Montgomerie <jrmg at dcs dot ed dot ac dot uk>
- Date: Thu, 8 Feb 2001 12:13:23 +0000 (GMT)
- cc: gcc at gcc dot gnu dot org
On Thu, 8 Feb 2001, Fergus Henderson wrote:
>
> It means that in a conditional expression `x ? y : z',
> ANSI C does not allow just one of `x' and `y' to have type `void'.
> They can both be `void', or they can both not be `void',
> but if only one of them has type `void', that is not allowed.
>
Aha! Yes, that' s the answer - I had a conditional expression involving
library calls inside the 'else'-less 'if' statements I thought were
causing the error, but it was wrapped up in a macro, so I didn't spot it.
Thanks, (hopefully Google will index this thread so that others won't be
as confused as me in the future :-)
Jamie.