[PATCH] Fix one type mismatch in the C++ front-end (PR 22358)

Andrew Pinski pinskia@physics.uc.edu
Tue Jul 12 17:21:00 GMT 2005


The problem here is that we don't convert BINFO_OFFSET to 
ptrdiff_type_node as the
other side of the cond_expr is that type and the type of cond_expr is 
declared as
that type.

This patch fixes the problem by calling convert on BINFO_OFFSET which 
fixes the
problem.

OK? Bootstrapped and tested on powerpc-darwin with no regressions.

The testcase was reduced from complex_io.cc in libstdc++ using the 
patch in PR 22368
to find this.

Thanks,
Andrew Pinski

ChangeLog:
	* class.c (build_base_path): Convert BINFO_OFFSET to the correct type.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: t.diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20050712/aadfb554/attachment.txt>
-------------- next part --------------



Testcase:
struct a
{
   virtual ~a();
};
struct b : virtual a { };
b a11;


More information about the Gcc-patches mailing list