#15955 closed bug (fixed)
`abort` function not marked as `noreturn`
Reported by: | ahwayakchih | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | R1/beta2 |
Component: | System/POSIX | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
I'm trying to build a C++ project, which has declarations like:
[[noreturn]] inline void Abort() { /* some code here, and then... */ abort(); }
It errors when compiling, because abort()
declared in Haiku is not marked as noreturn
. I added call to exit(-1)
at the end of function, but that's a bit ugly workaround.
Since abort()
never returns anyway (or does it?), it should be ok to mark it as such, right? So, in stdlib.h
, instead of:
extern void abort(void);
there could be:
extern void abort(void) __attribute__((noreturn));
Change History (4)
comment:1 by , 5 years ago
comment:4 by , 5 years ago
Milestone: | Unscheduled → R1/beta2 |
---|
Assign tickets with status=closed and resolution=fixed within the R1/beta2 development window to the R1/beta2 Milestone
Note:
See TracTickets
for help on using tickets.
https://review.haiku-os.org/c/haiku/+/2558