]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: fix dg-* typos
authorSam James <sam@gentoo.org>
Thu, 27 Mar 2025 13:26:34 +0000 (13:26 +0000)
committerSam James <sam@gentoo.org>
Thu, 27 Mar 2025 13:29:48 +0000 (13:29 +0000)
I have a handful more of these left but those introduce FAILs, while
these all introduce new PASSes.

libstdc++-v3/ChangeLog:

* testsuite/std/format/string_neg.cc: Add missing brace for dg-error.

gcc/testsuite/ChangeLog:

* gcc.dg/analyzer/fd-datagram-socket.c: Fix 'dg-message' spelling.
* gcc.dg/analyzer/out-of-bounds-zero.c: Fix whitespace in 'dg-additional-options'.
* gcc.dg/analyzer/strchr-1.c: Fix 'dg-message' whitespace.
* gnat.dg/sso/q11.adb: Fix 'dg-output' whitespace.

gcc/testsuite/gcc.dg/analyzer/fd-datagram-socket.c
gcc/testsuite/gcc.dg/analyzer/out-of-bounds-zero.c
gcc/testsuite/gcc.dg/analyzer/strchr-1.c
gcc/testsuite/gnat.dg/sso/q11.adb
libstdc++-v3/testsuite/std/format/string_neg.cc

index 8d32e858111a13fa51b0bf2f310430c755951445..37c715912469b671e6698a623d6808f79588fbba 100644 (file)
@@ -102,7 +102,7 @@ void test_listen_on_datagram_socket_with_bind (const char *sockname)
   memset (&addr, 0, sizeof (addr));
   addr.sun_family = AF_UNIX;
   strncpy (addr.sun_path, sockname, sizeof(addr.sun_path) - 1);
-  if (bind (fd, (struct sockaddr *)&addr, sizeof (addr)) == -1) /* { dg message "datagram socket bound here" } */
+  if (bind (fd, (struct sockaddr *)&addr, sizeof (addr)) == -1) /* { dg-message "datagram socket bound here" } */
     {
       close (fd);
       return;
index 201ca00ebdbb8c920c49a9beb20a180b2e7c9b19..6e62a9d2611fc02b3fc67aea83ad0d530db83ed8 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-additional-options "-Wno-stringop-overflow"} */
+/* { dg-additional-options "-Wno-stringop-overflow" } */
 /* -Wstringop-overflow= triggers on test5.  */
 
 #include <stdint.h>
index 08c429d8f9096246cf985a3b837317943607007e..181f1829724f84c0bfdc42e52359fedb8d2bec0a 100644 (file)
@@ -16,13 +16,13 @@ const char* test_literal (int x)
 
 void test_2 (const char *s, int c)
 {
-  char *p = __builtin_strchr (s, c); /* { dg-message "when '__builtin_strchr' returns NULL"} */
+  char *p = __builtin_strchr (s, c); /* { dg-message "when '__builtin_strchr' returns NULL" } */
   *p = 'A'; /* { dg-warning "dereference of NULL 'p'" "null deref" } */
 }
 
 void test_3 (const char *s, int c)
 {
-  char *p = strchr (s, c); /* { dg-message "when 'strchr' returns NULL"} */
+  char *p = strchr (s, c); /* { dg-message "when 'strchr' returns NULL" } */
   *p = 'A'; /* { dg-warning "dereference of NULL 'p'" "null deref" } */
 }
 
index 22ac5578dd71fd751dd0590e157f5dd10dbebe91..39853ef124220fb9ce5ea03110bffccddcc1c125 100644 (file)
@@ -31,7 +31,7 @@ begin
   Put ("B2 :");
   Dump (B2'Address, R2'Max_Size_In_Storage_Elements);
   New_Line;
-  -- { dg-output "B2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n"
+  -- { dg-output "B2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" }
 
   if A1.I /= B1.I or A1.A(1) /= B1.A(1) then
     raise Program_Error;
index d5963145b185af078d6e8755b44725139b2435bc..09cc9a25b3e11091416f29b9f4e5bfc08b5ba660 100644 (file)
@@ -6,5 +6,5 @@ auto s = std::format(" {9} "); // { dg-error "call to consteval function" }
 // { dg-error "invalid.arg.id" "" { target *-*-* } 0 }
 
 struct X { };
-std::format_string<X> str(""); // dg-error "here" }
+std::format_string<X> str(""); // dg-error "here" }
 // { dg-error "std::formatter must be specialized" "" { target *-*-* } 0 }