[RFA 2/3] Add missing ATTRIBUTE_NORETURNs
Yao Qi
qiyaoltc@gmail.com
Wed Sep 28 17:41:00 GMT 2016
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 (齐尧)
More information about the Gdb-patches
mailing list