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

gdr at integrable-solutions dot net gcc-bugzilla@gcc.gnu.org
Sat Jan 10 02:13:00 GMT 2004


------- Additional Comments From gdr at integrable-solutions dot net  2004-01-10 02:13 -------
Subject: Re:  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-09 08:40 -------
| Gabriel Dos Reis wrote:
| 
| > | If the ARM did not mean to imply what I said it implied, then why
| > | was it so consistent in apparently implying it -- at least twice?
| > 
| > Saying twice it implies, does not actually make it do so. 
| 
| The ARM never explicitly says that "1+1 == 2" is a C++ expression that
| evaluates to 1, yet everyone knows it is so. 

Proof by analogy is fraud -- dixit one of authors of ARM :-)
You need hard data, not just what analogy you think was in the mind of
the author of ARM -- oh, by the way, the authorS of ARM were actually
the author of the ARM. 

[...]

| > | The only answer is that the authors were blessing the universal
| > | practice of the time, namely, that a base would always be at offset
| > | zero in a derived, when only single inheritance is involved.
| > 
| > I happen to work with one of the authors.
| 
| Do you want me to congratulate you or feel sorry for you?  Hopefully,
| Stroustrup's influence hasn't damaged you too badly.  :)

As you can see, I'm surviving, so I would say that his influence is
doing me more good than bad :-)

| Are you on the C++ committee?  If so, I appreciate the work you must
| have put into it.  The committee has done a huge job cleaning up C++.

yes, I'm on the committee but I did not write those clauses ;-)
Yes, the committee, overall, did a good job.

(My main pet peeves are those rules that are long list of special cases
-- see templates for example)
 
| > He never implies to impose a Single True Object Model.
| 
| He may not have intended to completely prescribe all features of the
| object layout.

I mean he -explicilty- wanted to open the door for different object
model. 

[...]

| > GCC changed object model it adopted the new ABI since GCC-3.0.
| > Any code hat relies on a particular preivous object model was broken
| > since then.
| 
| That's true.  But as I said earlier, let's have some pity for the
| maintainers of old ARM code, which is now broken.  The patch for
| -Wcast-incomplete is offered in that spirit.

I suspect that more diagnostics are always desirable -- where appropriate. 

-- Gaby


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13005



More information about the Gcc-bugs mailing list