[haiku-bugs] [Haiku] #15110: exit and _Exit are not marked noreturn

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Wed, 12 Jun 2019 19:27:46 -0000

#15110: exit and _Exit are not marked noreturn
-----------------------+---------------------------
 Reporter:  icculus    |        Owner:  nobody
     Type:  bug        |       Status:  new
 Priority:  normal     |    Milestone:  Unscheduled
Component:  - General  |      Version:  R1/beta1
 Keywords:             |   Blocked By:
 Blocking:             |  Has a Patch:  0
 Platform:  All        |
-----------------------+---------------------------
 (I can't find this file surfing around the git web interface, so I'm not
 sure if this was changed recently, but my About Haiku dialog says I'm on
 R1/beta1 revision hrev52295+129, fwiw.)

 In /boot/system/sources/haiku/headers/posix/stdlib.h, there's a
 declaration for exit() and _Exit()--capital E--and it doesn't have an
 __attribute__((noreturn)) on it.

 In the same header, _exit()--lowercase e--does have this attribute.

 This causes a minor problem in SDL, since we have this code:

 https://hg.libsdl.org/SDL/file/a9a7c1e48f0b/src/SDL_assert.c#l123

 Which generates this warning when built on Haiku (I presume it selected
 the _Exit() codepath)...

 https://buildbot.libsdl.org/builders/sdl-
 haiku/builds/3683/steps/compile/logs/warnings%20%281%29

 I'm putting in an #ifdef that will make Haiku builds prefer _exit() for
 now, and this isn't the end of the world in any case, but can someone add
 that attribute to the headers?

 Thanks,
 --ryan.

-- 
Ticket URL: <https://dev.haiku-os.org/ticket/15110>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: