Re: A bug in SunOne C compiler?

From: Måns Rullgård (mru_at_kth.se)
Date: 11/05/03


Date: Wed, 05 Nov 2003 22:29:59 +0100

Dragan Cvetkovic <me@privacy.net> writes:

>> It's the "const" that's causing the trouble. Many compilers require
>> both sides of a ?: operator to have *exactly* the same type.
>
> Thanks for your answer. I see that (at least in n869 (a draft of C99)),
> 6.5.15 the requirement is that the types need to be "compatible struct or
> union types" (in above case) and I thought that constr struct xxx and
> struct xxx are compatible.

The Sun compiler isn't fully C99 compliant, AFAIK. It could also be
interpreting the standard differently from you.

-- 
Måns Rullgård
mru@kth.se