[ghemical-devel] about problems with gcc-3.2

Tommi Hassinen thassine@messi.uku.fi
Thu, 6 Mar 2003 10:40:34 +0200 (WET)


  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

---1045962744-646959846-1046940034=:66640
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Wed, 5 Mar 2003, Michael Banck wrote:

> > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=9433
>
> According to that site, the bug got fixed in CVS at the end of January
> (please correct me if I'm wrong).

Ok, perhaps that's not the same bug, but an another one!  :)

But seriously speaking, I think I have more evidence that this is a
compiler issue. In attachments there is a patch file for the CVS head
(v1.50) version, that fixes the problem in GnomeViewCreator() function.
Now there is no need to do the cast (project *) -> (gnome_project *)
anymore since the gtk_object_get_user_data() function returns a pointer of
correct type already in the first place. The patch works fine when
compiled with gcc-2.95, just like the original CVS version.

When I try with gcc-3.2 then, the function GnomeViewCreator() goes fine
now, since no dynamic_cast<>() is attempted there, fine. But now it does
an exactly similar crash in an another function later, this time it's in
gnome_views.cpp (around line ~951) ProduceTreeListView(). And, perhaps
not surprisingly, the problematic code this time looks like:

treelist_view * gnome_class_factory::ProduceTreeListView(project * prj1)
{
cout << "ok, trying the next dynamic_cast<>(); here we go..." << endl;
	gnome_project * prj2 = dynamic_cast<gnome_project *>(prj1);
cout << "...but I don't think we can get this far! :(" << endl;

so, it's again the same operation, dynamic_cast from (project *) to
(gnome_project *).  :(  The second cout command is indeed not reached.

> The Debian unstable packages routinely contain CVS code, so I'll try a
> build with g++-3.2 (and g++-3.3, just found out that it's available,
> too) sometime later this week or at the weekend.

OK, thanks. Now it looks that I'm stuck with this problem, since those
pointer conversions simply should work IMO.

Regards,

	Tommi


---1045962744-646959846-1046940034=:66640
Content-Type: APPLICATION/octet-stream; name="ghemical-1.50-dynamic_cast.diff.gz"
Content-Transfer-Encoding: BASE64
Content-Description: 
Content-Disposition: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