This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [Patch] Fix 'incomplete type' warning in dummy_frame.h
David Daney <ddaney@avtrex.com> 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."