This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Bug 16115, C++ invisible references
Richard Henderson wrote:
But once we start trying to add semantics to the representation,
in particular anything that needs strict logical nesting, then
I think we should drop all requirement that we match up directly
with the source.
What do you mean by "semantics"?
Certainly, unlowered EDG IL is semantic, in the sense that it would be
easy to execute.
For example, a call to an overloaded function is resolved into a call to
a particular function, and implicit conversions (say, using an
overloaded "operator int" on a class) are represented explicitly as
function calls. However, things are still at the level of C++; for
example, calls to virtual functions are represented as such (without any
reference to vtables). I believe the only dependency on the particular
C/C++ ABI is in determining the sizes and alignment of objects.
This representation is perfect for cross-reference tools and
source-level analysis tools (like lint); you can compute call graphs,
you can find all the places where a given variable is used, etc.
--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com