public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: grigory@stl.sarov.ru
To: gcc-gnats@gcc.gnu.org
Subject: libstdc++/7442: cxxabi.h does not match the C++ ABI
Date: Tue, 30 Jul 2002 01:26:00 -0000	[thread overview]
Message-ID: <20020730081820.16478.qmail@sources.redhat.com> (raw)


>Number:         7442
>Category:       libstdc++
>Synopsis:       cxxabi.h does not match the C++ ABI
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 30 01:26:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Grigory Zagorodnev
>Release:        3.1.1
>Organization:
>Environment:
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ./configure --enable-threads
>Description:
There is a couple of discrepancies between G++ implementation of 'cxxabi.h' file and the C++ ABI.

I. Member name difference
-------------------------

The C++ ABI defines that...
2.9.5 RTTI Layout 
9 The abi::__pointer_to_member_type_info type adds one field to abi::__pbase_type_info: 

      class __pointer_to_member_type_info : public __pbase_type_info {
	public:
	  const abi::__class_type_info *__context;
      };


G++ implementation is the following:
--- cxxabi.h ------------------------------------------------------------
class __pointer_to_member_type_info
  : public __pbase_type_info
{
/* abi defined member variables */
public:
  __class_type_info *__context_class;   /* class of the member */
-------------------------------------------------------------------------



II. Class name difference
-------------------------
Class '__base_class_type_info' specifyed by the C++ ABI, declared with the name '__base_class_info' in the G++'s cxxabi.h file. Moreover, name of the member __base_type is different too.

2.9.5 RTTI Layout 
6. Three different types are used to represent user type information: 
__base_info[] is an array of base class descriptions -- one for every direct proper base. Each description is of the type: 

      struct abi::__base_class_type_info {
	public:
         const __class_type_info *__base_type;
	 long __offset_flags;

	 enum __offset_flags_masks {
	   __virtual_mask = 0x1,
	   __public_mask = 0x2,
	   __offset_shift = 8
	 };

      };

--- G++'s cxxabi.h ------------------------------------------------------
class __base_class_info
{
/* abi defined member variables */
public:
  const __class_type_info *__base;    /* base class type */
  long __offset_flags;            /* offset and info */
-------------------------------------------------------------------------
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2002-07-30  8:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-30  1:26 grigory [this message]
2002-07-31 12:39 bkoz
2002-07-31 14:19 bkoz
2002-08-01 14:13 bkoz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020730081820.16478.qmail@sources.redhat.com \
    --to=grigory@stl.sarov.ru \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).