This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: g++ and aliasing bools
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Joe Buck <jbuck at synopsys dot COM>
- Cc: Paolo Carlini <pcarlini at unitus dot it>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Fri, 25 Jan 2002 13:28:18 -0800
- Subject: Re: g++ and aliasing bools
- References: <200201252116.NAA21326@atrus.synopsys.com>
> 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