This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix Solaris 8 bootstrap
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 8 Dec 2008 13:31:38 +0000 (UTC)
- Subject: Re: Fix Solaris 8 bootstrap
- References: <493D1230.4070800@redhat.com>
On Mon, 8 Dec 2008, Andrew Haley wrote:
> This fixes Solaris 8 bootstrap.
>
> C99 is stricter than C90 in that the second and third operands of
> a conditional operator must have the same structure or union type,
> not simply compatible types. The Solaris bootstrap fails because
> types with different cv quals are used in conditional expressions.
This is a bug in the Solaris compiler, nothing to do with C99. Types with
different qualifiers are neither the same nor compatible, but at the point
they are operands of the conditional operator they have been converted
from lvalues to rvalues and no longer have qualified type. (There is a
related bug with such qualifiers in GCC: bug 35235.)
--
Joseph S. Myers
joseph@codesourcery.com