This is the mail archive of the gcc-bugs@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]

[Bug c++/13005] Pointer wrongly adjusted for derived class containing virtual function


------- 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


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