]> gcc.gnu.org Git - gcc.git/commitdiff
Avoid undeclared use of abort in gcc.dg/cpp/wchar-1.c
authorFlorian Weimer <fweimer@redhat.com>
Mon, 6 Nov 2023 17:38:04 +0000 (18:38 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Mon, 6 Nov 2023 18:52:18 +0000 (19:52 +0100)
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

index ac9b38b80da775a07f055e2c35bab9070b8fd7da..51ef2fb0f1d7fad688207c917b8b27e7408eb744 100644 (file)
@@ -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;
This page took 0.080395 seconds and 5 git commands to generate.