Re: [ARM] Add endless loop to avoid a compiler warning on noreturn functions.

Craig Howland <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
On 10/01/2018 05:27 PM, Christophe Lyon wrote:
> Hi,
>
> While building newlib for ARM, I noticed GCC warnings for _exit() that
> the compiler thinks they return a value despite being noreturn.
>
> Like other targets, this small adds an endless loop to avoid the warning.
>
> OK?
>
> Christophe
The proper fix (for both places) is to add noreturn to the _kill() prototype in 
the file.  (Which presumably is true, otherwise _exit() will return.  I did test 
that it fixes the warning.)  (It would not be surprising if it also needed to be 
added to the _kill() source, itself.)
Craig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.