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


>>>>> "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.

Tom


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