From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26263 invoked by alias); 9 Apr 2002 00:24:15 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 26256 invoked from network); 9 Apr 2002 00:24:13 -0000 Received: from unknown (HELO zwingli.cygnus.com) (208.245.165.35) by sources.redhat.com with SMTP; 9 Apr 2002 00:24:13 -0000 Received: by zwingli.cygnus.com (Postfix, from userid 442) id A36A75EA11; Mon, 8 Apr 2002 19:24:12 -0500 (EST) To: Gianni Mariani Cc: Daniel Berlin , Daniel Jacobowitz , gdb@sources.redhat.com, Benjamin Kosnik Subject: Re: C++ nested classes, namespaces, structs, and compound statements References: <3CAF2FBA.5040000@mariani.ws> From: Jim Blandy Date: Mon, 08 Apr 2002 17:24:00 -0000 In-Reply-To: <3CAF2FBA.5040000@mariani.ws> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-04/txt/msg00107.txt.bz2 Gianni Mariani 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.