This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: fix bootstrap for solaris2 cc, ?: with different operand struct const-ness
On Fri, 17 Aug 2007, Kaveh R. GHAZI wrote:
> On Fri, 17 Aug 2007, Joseph S. Myers wrote:
>
> > On Fri, 17 Aug 2007, Kaveh R. GHAZI wrote:
> >
> > > My question: is the solaris compiler wrong to complain about this,
> > > is GCC wrong to silently accept it, or is this some gray area of the
> > > standard where implementations are free to choose either route?
> >
> > lvalue-to-rvalue conversion loses the const qualification, so by the time
> > expressions are operands of ? : they don't have qualified type any more.
>
> Well solaris cc apparently isn't losing the const-ness.
>
> So to be clear I take your statement to mean this is a solaris cc bug?
Yes.
--
Joseph S. Myers
joseph@codesourcery.com