RE: [sv-cc] C Macros For C++ Virtual Function access

From: Kevin Cameron <KCAMERON@altera.com>
Date: Thu Oct 07 2004 - 17:18:25 PDT

 

Here's a document on the GNU C++ ABI -

 

http://www.codesourcery.com/public/publications/a_common_vendor_abi_for_
cplusplus.pdf

 

Kev.

 

-----Original Message-----
From: Steven J. Dovich [mailto:dovich@cadence.com]
Sent: Thursday, October 07, 2004 3:30 PM
To: Kevin Cameron
Cc: Stickley, John; sv-cc@eda.org
Subject: Re: [sv-cc] C Macros For C++ Virtual Function access

 

Before we get too far down this clever path, realize that there is

nothing in the C++ standard that suggests how virtual functions

are associated with objects. If it was that easy, then the C language

standard would have included that capability as a builtin mechanism

provided in the standard header files.

 

There have been implementations of C++ that did not use vtables,

and so this particular strategy is insufficiently robust for solving

the DPI data interchange problem for the universe of all possible

SystemVerilog/C compiler combinations. Dealing with the universe

of possible implementations is the essential business of standards

work, and one of the reasons why the "de jure" standards documents

are the best platform for specifying the behavior of DPI.

 

Empirical evidence gathered from one or more implementations does

not consitute proof of what is contained in the C or C++ standards.

I would encourage everyone to get themselves a copy of either or

both of these standards, ISO-9899:1999 [C] and ISO-14882:2003 [C++].

They are $18 per at the www.ansi.org E-Standards store. These

documents are also useful as an indication of where the quality

bar should be in terms of robust and precise description of the

behavior of SystemVerilog. Enough of my soapbox on that topic...

 

/sjd
Received on Thu Oct 7 17:18:36 2004

This archive was generated by hypermail 2.1.8 : Thu Oct 07 2004 - 17:18:39 PDT