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

Message ID 20210218212358.246072-2-alx.manpages@gmail.com
State Not applicable
Headers
Series man[23]: SYNOPSIS: Use 'noreturn' in prototypes. |

Commit Message

Alejandro Colomar Feb. 18, 2021, 9:23 p.m. UTC
  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(-)
  

Comments

Michael Kerrisk \(man-pages\) Feb. 19, 2021, 12:31 p.m. UTC | #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
>
  

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