This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA 2/3] Add missing ATTRIBUTE_NORETURNs


On Wed, Sep 28, 2016 at 4:20 PM, Tom Tromey <tom@tromey.com> wrote:
>>>>>> "Yao" == Yao Qi <qiyaoltc@gmail.com> writes:
>
>>> -extern void throw_max_completions_reached_error (void);
>>> +extern void throw_max_completions_reached_error (void)
>>> +  ATTRIBUTE_NORETURN;
>
> Yao> Don't we need to also add ATTRIBUTE_NORETURN to the definition of
> Yao> throw_max_completions_reached_error?
>
> No, it's sufficient to have an attribute on a prototype, if the
> prototype is in scope when the definition is seen.  This seems to be the
> normal approach in gdb, e.g., see error_no_arg.
>

Er... right.  Patch is good to me.

-- 
Yao (齐尧)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]