From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28810 invoked by alias); 6 Feb 2002 18:48:48 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 28587 invoked from network); 6 Feb 2002 18:48:46 -0000 Received: from unknown (HELO zwingli.cygnus.com) (208.245.165.35) by sources.redhat.com with SMTP; 6 Feb 2002 18:48:46 -0000 Received: by zwingli.cygnus.com (Postfix, from userid 442) id 291CD5E9DE; Wed, 6 Feb 2002 13:50:19 -0500 (EST) To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com, Jason Merrill Subject: Re: RFA: MI tests: tolerate prototypes References: <20020203210609.E5E035E9DE@zwingli.cygnus.com> <20020203180133.C26302@nevyn.them.org> <20020205202132.A17384@nevyn.them.org> <20020206004829.A1357@nevyn.them.org> From: Jim Blandy Date: Wed, 06 Feb 2002 10:48:00 -0000 In-Reply-To: <20020206004829.A1357@nevyn.them.org> 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-02/txt/msg00173.txt.bz2 Daniel Jacobowitz writes: > > Ah, by building `prototype'-style types for all the functions, even > > those declared without prototypes, and using the called-as types as > > the prototype argument types. It'll work because, even though the > > type claims to be prototyped, the argument types are such that we end > > up doing the same promotions required by the rules for calling > > non-prototyped functions. > > So, the question becomes - do we need MAYBE_PROTOTYPED? If we accept > that the types marked in stabs as parameters are promoted types, then > we can simply mark stabs functions as being prototyped, and trust > TYPE_FLAG_PROTOTYPED more than we do. If we do that, then: - Dwarf 2 will continue to work correctly, since its prototype info has always been accurate, - under STABS, calls to functions whose definitions we have debug info for will always work, unlike the current state of affairs, and - under STABS, calls via function pointers will do non-prototyped argument promotion, which is no worse than now. Sounds good to me. It does bother me, sort of on principle, that we won't really have info about which functions were declared in which way. I mean, prototypedness is a real property of function types in ISO C. But given that our debug format doesn't carry the info we need, I guess I'll just get over it. :)