This is the mail archive of the gcc@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: g++ and aliasing bools


> Conclusion: if program P exists, we can convert the relevant parts of
> the point where we miscompile it into a C program, and GCC will also
> miscompile the C program.  (imagine passing it through, say, EDG's
> or KAI's C++ to C compiler).

OK, I like this argument.  *I* find it convincing, at least. :-)

Implicitly, you're assuming that a simple_enough C++ struct (minus
member functions and gunk) is also a C struct.  There's one pedantic
case where this is false: zero-sized structs are not part of ANSI/ISO
C89, but are part of C++.  But, they are supported in GNU C, so
your reduction still works.

Thanks for taking the time to work out the reduction explicitly.

Therefore, I'll pre-approve the patch, in concept -- but only for 3.2.
(I can't see how this is a "bug fix" by the criteria we've been using.)

So, after the branch, let's have a patch to do this.

Thanks,

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


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