This is the mail archive of the mailing list for the libstdc++ 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: [Patch] Fix libstdc++/9659

On Tue, Feb 11, 2003 at 04:35:58PM +0100, Paolo Carlini wrote:
> Nathan Myers wrote:
> >This looks to me like a grave compiler bug.
> Indeed, naively, seems weird that, being operator+ defined inside fpos 
> besides operator+=, an user of pos_type cannot use that syntax.
> Could you please explain in a little more techincal detail what seems 
> wrong with the compiler?

If op= followed by op+= ever produces different results from op+,
all applied to build-in types, something is very wrong somewhere.

> Afterwards, we may possibly apply the temporary hack and, at the same 
> time, file an high-priority PR for the compiler.

No.  We should warn against compiling with -O3 until PR number
such-and-such is fixed.  We should not uglify the code to work 
around (what had better be!) temporary compiler bugs.

My only doubt is that this is such a heavily-exercised operation,
the failure might not be caused by a code genertion bug, but by some 
kind of memory corruption that you have sidestepped by changing the 
line numbering or something.  In that case it is especially important
not to paper over the bug.

Can you try to reduce it to a nice test case and file a compiler bug 
report?  If necessary, just attach the gcc -E output, unedited.

Is anybody else seeing this?

Nathan Myers

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