This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA/dwarf 2/2] Mark all functions as prototyped except C functions.
- From: Stan Shebs <stanshebs at earthlink dot net>
- To: gdb-patches at sourceware dot org
- Date: Thu, 16 May 2013 10:52:23 -0700
- Subject: Re: [RFA/dwarf 2/2] Mark all functions as prototyped except C functions.
- References: <87txm6dhhm dot fsf at fleche dot redhat dot com> <1368623983-10625-1-git-send-email-brobecker at adacore dot com> <1368623983-10625-3-git-send-email-brobecker at adacore dot com> <87ip2k2s8u dot fsf at fleche dot redhat dot com> <20130516073804 dot GE5555 at adacore dot com>
On 5/16/13 12:38 AM, Joel Brobecker wrote:
>> Joel> + /* The DWARF standard implies that the DW_AT_prototyped attribute
>> Joel> + is only meaninful to C. So assume that non-C functions are
>> Joel> + always prototyped. */
>> Joel> + if (cu->language != language_c)
>> Joel> + return 1;
>>
>> Can Objective C have un-prototyped functions?
>> I don't know. But if it can, then it should be checked here.
>
> Hmmm, I am not 100% sure, but some internet searches suggest
> that this is probably true. Thanks! Attached is the updated patch,
> just adding language_objc to the condition, and adjusting the
> comment accordingly.
Objective-C (1.0 or 2.0) doesn't require prototypes; in general ObjC
tries to be purely an extension to C, and orthogonal to C dialect.
Stan
stan@codesourcery.com