[1/6] abort.3: SYNOPSIS: Use 'noreturn' in prototypes

Message ID 20210218212358.246072-2-alx.manpages@gmail.com
State New
Headers show
Series
  • man[23]: SYNOPSIS: Use 'noreturn' in prototypes.
Related show

Commit Message

Mike Frysinger via Libc-alpha Feb. 18, 2021, 9:23 p.m.
POSIX specifies that abort() shall not return.
Glibc uses __attribute__((__noreturn__)).
Let's use standard C11 'noreturn' in the manual page.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>

---
 man3/abort.3 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.30.1.721.g45526154a5

Comments

Mike Frysinger via Libc-alpha Feb. 19, 2021, 12:31 p.m. | #1
Hi Alex,

On 2/18/21 10:23 PM, Alejandro Colomar wrote:
> POSIX specifies that abort() shall not return.

> Glibc uses __attribute__((__noreturn__)).

> Let's use standard C11 'noreturn' in the manual page.


C11!? I'm only just getting over C99... But okay, it seems
reasonable :-). I applied all of the patches.

Cheers,

Michael
> 

> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>

> ---

>  man3/abort.3 | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/man3/abort.3 b/man3/abort.3

> index 71d555841..b33d23ad1 100644

> --- a/man3/abort.3

> +++ b/man3/abort.3

> @@ -38,7 +38,7 @@ abort \- cause abnormal process termination

>  .nf

>  .B #include <stdlib.h>

>  .PP

> -.B void abort(void);

> +.B noreturn void abort(void);

>  .fi

>  .SH DESCRIPTION

>  The

> 



-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

Patch

diff --git a/man3/abort.3 b/man3/abort.3
index 71d555841..b33d23ad1 100644
--- a/man3/abort.3
+++ b/man3/abort.3
@@ -38,7 +38,7 @@  abort \- cause abnormal process termination
 .nf
 .B #include <stdlib.h>
 .PP
-.B void abort(void);
+.B noreturn void abort(void);
 .fi
 .SH DESCRIPTION
 The