This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13005] Pointer wrongly adjusted for derived class containing virtual function
- From: "falk dot hueffner at student dot uni-tuebingen dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Jan 2004 08:10:45 -0000
- Subject: [Bug c++/13005] Pointer wrongly adjusted for derived class containing virtual function
- References: <20031111075141.13005.stephenma@telus.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From falk dot hueffner at student dot uni-tuebingen dot de 2004-01-08 08:10 -------
Subject: Re: [3.3/3.4 Regresssion] [aliasing] Pointer wrongly adjusted for derived class containing virtual function
"stephenma at telus dot net" <gcc-bugzilla@gcc.gnu.org> writes:
> ------- Additional Comments From stephenma at telus dot net 2004-01-08 02:01 -------
> I will attach a patch against the mainline snapshot gcc-3.4-20031231.
+ if (warn_cast_incomplete)
+ if (!COMPLETE_TYPE_P (TREE_TYPE (type)) || !COMPLETE_TYPE_P (TREE_TYPE (otype)))
+ warning ("casting from/to an incomplete type is risky; see -Wno-cast-incomplete");
+
Lines must not be longer than 78 characters. Also leave out the "see",
we don't do that for any other warning.
+class Beta; *b; // Incomplete class
Spurious ;.
The changelog lacks file references. Also, you need test cases
(http://gcc.gnu.org/codingconventions.html). If you have that, I
suggest you post your patch to gcc-patches.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13005