Strange pedantic error message
James Montgomerie
jrmg@dcs.ed.ac.uk
Thu Feb 8 04:13:00 GMT 2001
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.
More information about the Gcc
mailing list