C++ nested classes, namespaces, structs, and compound statements

Jim Blandy jimb@redhat.com
Mon Apr 8 17:24:00 GMT 2002


Gianni Mariani <gianni@mariani.ws> writes:
> Much of what is discussed here is language and compiler specific.  My
> generic approach to solving this kind of problem is to provide an
> abstraction layer where all the facilities are provided for in a API
> (abstract base interface class); the mapping is then language and
> compiler specific.  The burden is then on the compiler writer to
> provide the symbol binding mechanism/implementation which is where it
> belongs.

Well, the rules for identifier lookup are part of the language.
They're not compiler-specific, or else the meaning of your programs
would be, too.  (That does happen, but it's not generally regarded as
desireable.)

The rules for the correspondence between machine-level objects (bits,
bytes, registers) and source-level objects (variables, functions)
aren't really compiler-specific either: they're given by the ABI.
Many different compilers can (try to) share the same ABI.



More information about the Gdb mailing list