weird code generation differences without optimization [was Re: purify 4.1 and egcs still appear to be incompatible.]
Jason Merrill
jason@cygnus.com
Tue Feb 17 18:28:00 GMT 1998
>>>>> Ian Haggard <ian@shellus.com> writes:
> So I was wrong in saying that the single byte taken up by an empty class
> should be (or is even allowed to be) copied by a conforming C++
> implementation.
Fie. The standard says nothing at all about padding bytes; the compiler is
free to do anything with them. I will agree that the current behavior is
suboptimal, but it's not unconforming.
Someone could fix this in do_build_copy_constructor by checking to see if
the class is totally empty, and doing nothing in that case.
Jason
More information about the Gcc-bugs
mailing list