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

From: Steven J. Dovich <dovich@cadence.com>
Date: Thu Oct 07 2004 - 15:29:50 PDT

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 15:30:12 2004

This archive was generated by hypermail 2.1.8 : Thu Oct 07 2004 - 15:30:15 PDT