This is the mail archive of the
mailing list for the GDB project.
Re: C++ nested classes, namespaces, structs, and compound statements
- From: Jim Blandy <jimb at redhat dot com>
- To: Gianni Mariani <gianni at mariani dot ws>
- Cc: Daniel Berlin <dan at dberlin dot org>,Daniel Jacobowitz <drow at mvista dot com>, gdb at sources dot redhat dot com,Benjamin Kosnik <bkoz at redhat dot com>
- Date: 08 Apr 2002 19:24:12 -0500
- Subject: Re: C++ nested classes, namespaces, structs, and compound statements
- References: <Pine.LNX.email@example.com><3CAF2FBA.firstname.lastname@example.org>
Gianni Mariani <email@example.com> 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
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
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.