Article View: gnu.g++.bug
Article #1936g++ 1.34.2 parameter passing bug
From: Michael Tiemann
Date: Wed, 03 May 1989 15:17
Date: Wed, 03 May 1989 15:17
41 lines
1932 bytes
1932 bytes
Date: 2 May 89 16:15:25 GMT
From: mcvax!i2unix!semto!paolo@uunet.uu.net (Paolo Zeppegno)
Organization: Systems & Management (Torino - Italy)
Sender: bug-g++-request@prep.ai.mit.edu
I'm not c++ guru, but I think the following program should not compile
(for people not familiar with InterViews Banner is a subclass of Interactor)
g++ 1.34.2 compiles this without a warning..
#include <InterViews/world.h>
#include <InterViews/banner.h>
test(Interactor p)
{
printf("%d\n", sizeof p);
}
main()
{
Banner *foo = 0;
printf("%d\n", sizeof *foo);
test(*foo);
}
g++ version 1.34.2
/usr/local/lib/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ -Dvax -Dunix -D__vax__ -D__unix__ prova.c /tmp/cc003707.cpp
GNU CPP version 1.34
/usr/local/lib/gcc-c++ /tmp/cc003707.cpp -quiet -dumpbase prova.c -g -version - o /tmp/cc003707.s
GNU C++ version 1.32.0 (vax) compiled by GNU C version 1.34.
First, I claim that it should compile, since you can make an
interactor from a banner, since interactor is a public base class of
banner. This is a legal, default conversion.
Second, you have the 1.34.2 driver, but the compiler being accessed is
version 1.32.0. You should run the installation procedure so that the
latest compiler (c++) is accessed by the latest driver (g++). Then
you should get consistent (1.34, 1.34.2) version numbers.
Michael
Technical Details
Message-ID:
<8905031517.AA02793@yahi.stanford.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!YAHI.STANFORD.EDU!tiemannReferences:
<392@semto.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!YAHI.STANFORD.EDU!tiemann From: tiemann@YAHI.STANFORD.EDU (Michael Tiemann) Newsgroups: gnu.g++.bug Subject: g++ 1.34.2 parameter passing bug Message-ID: <8905031517.AA02793@yahi.stanford.edu> Date: 3 May 89 15:17:20 GMT References: <392@semto.UUCP> Sender: daemon@tut.cis.ohio-state.edu Reply-To: tiemann@lurch.stanford.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 41