From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12520 invoked by alias); 8 Sep 2008 16:16:55 -0000 Received: (qmail 12512 invoked by uid 22791); 8 Sep 2008 16:16:55 -0000 X-Spam-Check-By: sourceware.org Received: from mail.suse.de (HELO mx1.suse.de) (195.135.220.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 08 Sep 2008 16:16:15 +0000 Received: from Relay1.suse.de (relay-ext.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 3A19941645; Mon, 8 Sep 2008 18:16:12 +0200 (CEST) From: Andreas Schwab To: David Daney Cc: Ulrich Weigand , gdb-patches@sourceware.org Subject: Re: [Patch] Fix 'incomplete type' warning in dummy_frame.h References: <200809081123.m88BNHHT030564@d12av02.megacenter.de.ibm.com> <48C5466D.6090906@avtrex.com> X-Yow: Yow! STYROFOAM.. Date: Mon, 08 Sep 2008 16:16:00 -0000 In-Reply-To: <48C5466D.6090906@avtrex.com> (David Daney's message of "Mon, 08 Sep 2008 08:36:13 -0700") Message-ID: User-Agent: Gnus/5.110009 (No Gnus v0.9) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-09/txt/msg00169.txt.bz2 David Daney writes: > Ulrich Weigand wrote: >> David Daney wrote: >> >>> Back on 2008-08-26, Ulrich Weigand added a declaration for >>> dummy_frame_pop to dummy_frame.h. This causes a fatal warning when I >>> build with gcc-3.4 targeting mipsel-linux-gnu because struct frame_id is >>> an incomplete type. >>> >>> Adding #include "frame.h" fixes the problem for me. >> >> Huh. Sorry for the breakage. Strange that this compiles without even >> a warning with GCC 4.1.1 ... > > I think it may depend on the ABI. The calling convention for passing a > struct can vary depending on the size of the struct. Only gcc 3.4 and before warn about this. The standard does not require complete parameter types in a function prototype that isn't also a definition. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."