This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix Solaris 8 bootstrap


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]