diff mbox series

Avoid undeclared use of abort in gcc.dg/cpp/wchar-1.c

Message ID 87il6eeq9v.fsf@oldenburg.str.redhat.com
State New
Headers show
Series Avoid undeclared use of abort in gcc.dg/cpp/wchar-1.c | expand

Commit Message

Florian Weimer Nov. 6, 2023, 5:38 p.m. UTC
This should be safe because this is a preprocessor test; it
should not exercise implicit function declarations.

	* gcc.dg/cpp/wchar-1.c (main): Call __builtin_abort instead of
	abort.

---
 gcc/testsuite/gcc.dg/cpp/wchar-1.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


base-commit: d28f4194922fe8b25310b926c126e7ec1776c71d

Comments

Jakub Jelinek Nov. 6, 2023, 5:54 p.m. UTC | #1
On Mon, Nov 06, 2023 at 06:38:04PM +0100, Florian Weimer wrote:
> This should be safe because this is a preprocessor test; it
> should not exercise implicit function declarations.
> 
> 	* gcc.dg/cpp/wchar-1.c (main): Call __builtin_abort instead of
> 	abort.

Ok.

> diff --git a/gcc/testsuite/gcc.dg/cpp/wchar-1.c b/gcc/testsuite/gcc.dg/cpp/wchar-1.c
> index ac9b38b80da..51ef2fb0f1d 100644
> --- a/gcc/testsuite/gcc.dg/cpp/wchar-1.c
> +++ b/gcc/testsuite/gcc.dg/cpp/wchar-1.c
> @@ -14,10 +14,10 @@ int main ()
>  
>  #if L'\x0' - 1 < 0
>    if (c > 0)
> -    abort ();
> +    __builtin_abort ();
>  #else
>    if (c < 0)
> -    abort ();
> +    __builtin_abort ();
>  #endif
>   
>    return 0;
> 
> base-commit: d28f4194922fe8b25310b926c126e7ec1776c71d

	Jakub
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.dg/cpp/wchar-1.c b/gcc/testsuite/gcc.dg/cpp/wchar-1.c
index ac9b38b80da..51ef2fb0f1d 100644
--- a/gcc/testsuite/gcc.dg/cpp/wchar-1.c
+++ b/gcc/testsuite/gcc.dg/cpp/wchar-1.c
@@ -14,10 +14,10 @@  int main ()
 
 #if L'\x0' - 1 < 0
   if (c > 0)
-    abort ();
+    __builtin_abort ();
 #else
   if (c < 0)
-    abort ();
+    __builtin_abort ();
 #endif
  
   return 0;