]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c/c++: use positive tone in missing header notes [PR84890]
authorDavid Malcolm <dmalcolm@redhat.com>
Tue, 13 Jun 2023 21:42:47 +0000 (17:42 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Tue, 13 Jun 2023 21:42:47 +0000 (17:42 -0400)
Quoting "How a computer should talk to people" (as quoted
in "Concepts Error Messages for Humans"):

"Various negative tones or actions are unfriendly: being manipulative,
not giving a second chance, talking down, using fashionable slang,
blaming. We must not seem to blame the person. We should avoid suggesting
that the person is inadequate. Phrases like "you forgot" may seem
harmless, but what if a computer said this to you four or five times in
two minutes? Anyway, the person may disagree, so why risk offense?"

gcc/c-family/ChangeLog:
PR c/84890
* known-headers.cc
(suggest_missing_header::~suggest_missing_header): Reword note to
avoid negative tone of "forgetting".

gcc/cp/ChangeLog:
PR c/84890
* name-lookup.cc (missing_std_header::~missing_std_header): Reword
note to avoid negative tone of "forgetting".

gcc/testsuite/ChangeLog:
PR c/84890
* g++.dg/cpp2a/srcloc3.C: Update expected message.
* g++.dg/lookup/missing-std-include-2.C: Likewise.
* g++.dg/lookup/missing-std-include-3.C: Likewise.
* g++.dg/lookup/missing-std-include-6.C: Likewise.
* g++.dg/lookup/missing-std-include.C: Likewise.
* g++.dg/spellcheck-inttypes.C: Likewise.
* g++.dg/spellcheck-stdint.C: Likewise.
* g++.dg/spellcheck-stdlib.C: Likewise.
* gcc.dg/spellcheck-inttypes.c: Likewise.
* gcc.dg/spellcheck-stdbool.c: Likewise.
* gcc.dg/spellcheck-stdint.c: Likewise.
* gcc.dg/spellcheck-stdlib.c: Likewise.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
14 files changed:
gcc/c-family/known-headers.cc
gcc/cp/name-lookup.cc
gcc/testsuite/g++.dg/cpp2a/srcloc3.C
gcc/testsuite/g++.dg/lookup/missing-std-include-2.C
gcc/testsuite/g++.dg/lookup/missing-std-include-3.C
gcc/testsuite/g++.dg/lookup/missing-std-include-6.C
gcc/testsuite/g++.dg/lookup/missing-std-include.C
gcc/testsuite/g++.dg/spellcheck-inttypes.C
gcc/testsuite/g++.dg/spellcheck-stdint.C
gcc/testsuite/g++.dg/spellcheck-stdlib.C
gcc/testsuite/gcc.dg/spellcheck-inttypes.c
gcc/testsuite/gcc.dg/spellcheck-stdbool.c
gcc/testsuite/gcc.dg/spellcheck-stdint.c
gcc/testsuite/gcc.dg/spellcheck-stdlib.c

index de92cfd6f3c082f00e6a640b973777750998f454..3484c867ca0a675a09acca3d46451102dc6edaae 100644 (file)
@@ -320,6 +320,6 @@ suggest_missing_header::~suggest_missing_header ()
   maybe_add_include_fixit (&richloc, m_header_hint, true);
   inform (&richloc,
          "%qs is defined in header %qs;"
-         " did you forget to %<#include %s%>?",
+         " this is probably fixable by adding %<#include %s%>",
          m_name_str, m_header_hint, m_header_hint);
 }
index b8ca7306a2824cba6876a57962c40f18074133e7..53b6870f067b8fc637d8c7bc4bf99e84cdf94746 100644 (file)
@@ -6760,7 +6760,7 @@ class missing_std_header : public deferred_diagnostic
        maybe_add_include_fixit (&richloc, header, true);
        inform (&richloc,
                "%<std::%s%> is defined in header %qs;"
-               " did you forget to %<#include %s%>?",
+               " this is probably fixable by adding %<#include %s%>",
                m_name_str, header, header);
       }
     else
index 324e03cd5480c5deec3f48f6df7dc9858d163946..c843e07fd4f44e368d0e8b82dccb3e4886b2a6be 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++20 } }
 
 auto x = __builtin_source_location (); // { dg-error "'source_location' is not a member of 'std'" }
-// { dg-message "std::source_location' is defined in header '<source_location>'; did you forget to '#include <source_location>'" "" { target *-*-* } .-1 }
+// { dg-message "std::source_location' is defined in header '<source_location>'; this is probably fixable by adding '#include <source_location>'" "" { target *-*-* } .-1 }
 // { dg-message "using '__builtin_source_location'" "" { target *-*-* } .-2 }
index 51c604a9f1e2afc667a244e566d41cd34f5c78f1..fa1ec0b0e66aa2e56bf7b6d89e5127f57ee3d43a 100644 (file)
@@ -16,10 +16,10 @@ namespace std
 void test (void)
 {
   std::string s ("hello world"); // { dg-error ".string. is not a member of .std." }
-  // { dg-message ".std::string. is defined in header .<string>.; did you forget to .#include <string>.?" "" { target *-*-* } .-1 }
+  // { dg-message ".std::string. is defined in header .<string>.; this is probably fixable by adding .#include <string>." "" { target *-*-* } .-1 }
 
   std::cout << 10; // { dg-error ".cout. is not a member of .std." }
-  // { dg-message ".std::cout. is defined in header .<iostream>.; did you forget to .#include <iostream>.?" "" { target *-*-* } .-1 }
+  // { dg-message ".std::cout. is defined in header .<iostream>.; this is probably fixable by adding .#include <iostream>." "" { target *-*-* } .-1 }
 }
 
 /* Same again, to test idempotency of the added "#include" fix-it.  */
@@ -27,10 +27,10 @@ void test (void)
 void test_2 (void)
 {
   std::string s ("hello again"); // { dg-error ".string. is not a member of .std." }
-  // { dg-message ".std::string. is defined in header .<string>.; did you forget to .#include <string>.?" "" { target *-*-* } .-1 }
+  // { dg-message ".std::string. is defined in header .<string>.; this is probably fixable by adding .#include <string>." "" { target *-*-* } .-1 }
 
   std::cout << 10; // { dg-error ".cout. is not a member of .std." }
-  // { dg-message ".std::cout. is defined in header .<iostream>.; did you forget to .#include <iostream>.?" "" { target *-*-* } .-1 }
+  // { dg-message ".std::cout. is defined in header .<iostream>.; this is probably fixable by adding .#include <iostream>." "" { target *-*-* } .-1 }
 }
 
 /* Verify the output from -fdiagnostics-generate-patch.
index 23f868dff09a4c08ccae3a06e41499037ab971ec..ee567edde60349318b8892f00947828224ebf113 100644 (file)
@@ -7,7 +7,7 @@
 void test ()
 {
   std::string test; // { dg-error ".string. is not a member of .std." }
-  // { dg-message ".std::string. is defined in header .<string>.; did you forget to .#include <string>.?" "" { target *-*-* } .-1 }
+  // { dg-message ".std::string. is defined in header .<string>.; this is probably fixable by adding .#include <string>." "" { target *-*-* } .-1 }
 }
 
 #include <string>
index a8f27473e6dc833da73b48027a2cd7e0c9acc788..e6f5ec0b93944bc873cb8e7428b2f96fcbc7fb3e 100644 (file)
@@ -55,12 +55,12 @@ void test_move(T&& arg)
 void test_array ()
 {
   std::array a; // { dg-error ".array. is not a member of .std." }
-  // { dg-message ".std::array. is defined in header .<array>.; did you forget to .#include <array>.?" "" { target *-*-* } .-1 }
+  // { dg-message ".std::array. is defined in header .<array>.; this is probably fixable by adding .#include <array>." "" { target *-*-* } .-1 }
 }
 
 void test_tuple ()
 {
   std::tuple<int,float> p; // { dg-error ".tuple. is not a member of .std." }
-  // { dg-message ".std::tuple. is defined in header .<tuple>.; did you forget to .#include <tuple>.?" "" { target *-*-* } .-1 }
+  // { dg-message ".std::tuple. is defined in header .<tuple>.; this is probably fixable by adding .#include <tuple>." "" { target *-*-* } .-1 }
   // { dg-error "expected primary-expression before .int." "" { target *-*-* } .-2 }
 }
index 0fcc72b7d30e2e1efc875927a85710d50fe5144a..f28618bd5d12414e839a435f57fd1dbc11468d08 100644 (file)
@@ -1,30 +1,30 @@
 void test (void)
 {
   std::string s ("hello world"); // { dg-error ".string. is not a member of .std." }
-  // { dg-message ".std::string. is defined in header .<string>.; did you forget to .#include <string>.?" "" { target *-*-* } .-1 }
+  // { dg-message ".std::string. is defined in header .<string>.; this is probably fixable by adding .#include <string>." "" { target *-*-* } .-1 }
 
   std::wstring ws ("hello world"); // { dg-error ".wstring. is not a member of .std." }
-  // { dg-message ".std::wstring. is defined in header .<string>.; did you forget to .#include <string>.?" "" { target *-*-* } .-1 }
+  // { dg-message ".std::wstring. is defined in header .<string>.; this is probably fixable by adding .#include <string>." "" { target *-*-* } .-1 }
 
   std::cout << 10; // { dg-error ".cout. is not a member of .std." }
-  // { dg-message ".std::cout. is defined in header .<iostream>.; did you forget to .#include <iostream>.?" "" { target *-*-* } .-1 }
+  // { dg-message ".std::cout. is defined in header .<iostream>.; this is probably fixable by adding .#include <iostream>." "" { target *-*-* } .-1 }
 
   int i;
   std::cin >> i; // { dg-error ".cin. is not a member of .std." }
-  // { dg-message ".std::cin. is defined in header .<iostream>.; did you forget to .#include <iostream>.?" "" { target *-*-* } .-1 }
+  // { dg-message ".std::cin. is defined in header .<iostream>.; this is probably fixable by adding .#include <iostream>." "" { target *-*-* } .-1 }
 
   std::deque a; // { dg-error ".deque. is not a member of .std." }
-  // { dg-message ".std::deque. is defined in header .<deque>.; did you forget to .#include <deque>.?" "" { target *-*-* } .-1 }
+  // { dg-message ".std::deque. is defined in header .<deque>.; this is probably fixable by adding .#include <deque>." "" { target *-*-* } .-1 }
 
   std::vector<int> v; // { dg-error ".vector. is not a member of .std." }
-  // { dg-message ".std::vector. is defined in header .<vector>.; did you forget to .#include <vector>.?" "" { target *-*-* } .-1 }
+  // { dg-message ".std::vector. is defined in header .<vector>.; this is probably fixable by adding .#include <vector>." "" { target *-*-* } .-1 }
   // { dg-error "expected primary-expression before .int." "" { target *-*-* } .-2 }
 
   std::list<int> lst;  // { dg-error ".list. is not a member of .std." }
-  // { dg-message ".std::list. is defined in header .<list>.; did you forget to .#include <list>.?" "" { target *-*-* } .-1 }
+  // { dg-message ".std::list. is defined in header .<list>.; this is probably fixable by adding .#include <list>." "" { target *-*-* } .-1 }
   // { dg-error "expected primary-expression before .int." "" { target *-*-* } .-2 }
 
   std::pair<int,float> p; // { dg-error ".pair. is not a member of .std." }
-  // { dg-message ".std::pair. is defined in header .<utility>.; did you forget to .#include <utility>.?" "" { target *-*-* } .-1 }
+  // { dg-message ".std::pair. is defined in header .<utility>.; this is probably fixable by adding .#include <utility>." "" { target *-*-* } .-1 }
   // { dg-error "expected primary-expression before .int." "" { target *-*-* } .-2 }
 }
index fea309608868544da9d68dded0caf3aec7836d48..541d668cbba42330bcb43b9172cf62f4cee1d578 100644 (file)
@@ -16,68 +16,68 @@ uintptr_t up;
 
 /* As an identifier.  */
 const char *hex8_fmt = PRIx8; /* { dg-error "'PRIx8' was not declared" "undeclared identifier" { target *-*-* } } */
-/* { dg-message "'PRIx8' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIx8' is defined in header '<cinttypes>'; this is probably fixable by adding '#include <cinttypes>'" "replacement note" { target *-*-* } .-1 } */
 const char *hex16_fmt = PRIx16; /* { dg-error "'PRIx16' was not declared" "undeclared identifier" { target *-*-* } } */
-/* { dg-message "'PRIx16' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIx16' is defined in header '<cinttypes>'; this is probably fixable by adding '#include <cinttypes>'" "replacement note" { target *-*-* } .-1 } */
 const char *hex32_fmt = PRIx32; /* { dg-error "'PRIx32' was not declared" "undeclared identifier" { target *-*-* } } */
-/* { dg-message "'PRIx32' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIx32' is defined in header '<cinttypes>'; this is probably fixable by adding '#include <cinttypes>'" "replacement note" { target *-*-* } .-1 } */
 const char *hex64_fmt = PRIx64; /* { dg-error "'PRIx64' was not declared" "undeclared identifier" { target *-*-* } } */
-/* { dg-message "'PRIx64' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIx64' is defined in header '<cinttypes>'; this is probably fixable by adding '#include <cinttypes>'" "replacement note" { target *-*-* } .-1 } */
 const char *hexptr_fmt = PRIxPTR; /* { dg-error "'PRIxPTR' was not declared" "undeclared identifier" { target *-*-* } } */
-/* { dg-message "'PRIxPTR' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIxPTR' is defined in header '<cinttypes>'; this is probably fixable by adding '#include <cinttypes>'" "replacement note" { target *-*-* } .-1 } */
 
 /* As a part of a string-literal.  */
 const char *dec8msg_fmt = "Provide %" PRId8 "\n"; /* { dg-error "expected" "expected string-literal" { target *-*-* } } */
-/* { dg-message "'PRId8' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRId8' is defined in header '<cinttypes>'; this is probably fixable by adding '#include <cinttypes>'" "replacement note" { target *-*-* } .-1 } */
 const char *dec16msg_fmt = "Provide %" PRId16 "\n"; /* { dg-error "expected" "expected string-literal" { target *-*-* } } */
-/* { dg-message "'PRId16' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRId16' is defined in header '<cinttypes>'; this is probably fixable by adding '#include <cinttypes>'" "replacement note" { target *-*-* } .-1 } */
 const char *dec32msg_fmt = "Provide %" PRId32 "\n"; /* { dg-error "expected" "expected string-literal" { target *-*-* } } */
-/* { dg-message "'PRId32' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRId32' is defined in header '<cinttypes>'; this is probably fixable by adding '#include <cinttypes>'" "replacement note" { target *-*-* } .-1 } */
 const char *dec64msg_fmt = "Provide %" PRId64 "\n"; /* { dg-error "expected" "expected string-literal" { target *-*-* } } */
-/* { dg-message "'PRId64' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRId64' is defined in header '<cinttypes>'; this is probably fixable by adding '#include <cinttypes>'" "replacement note" { target *-*-* } .-1 } */
 const char *decptrmsg_fmt = "Provide %" PRIdPTR "\n"; /* { dg-error "expected" "expected string-literal" { target *-*-* } } */
-/* { dg-message "'PRIdPTR' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIdPTR' is defined in header '<cinttypes>'; this is probably fixable by adding '#include <cinttypes>'" "replacement note" { target *-*-* } .-1 } */
 
 void test_printf (void)
 {
   printf ("some format strings %s, %s, %s, %s, %s, %s\n",
          PRId8, /* { dg-error "'PRId8' was not declared" "undeclared identifier" { target *-*-* } } */
-/* { dg-message "'PRId8' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRId8' is defined in header '<cinttypes>'; this is probably fixable by adding '#include <cinttypes>'" "replacement note" { target *-*-* } .-1 } */
          PRIi16, /* { dg-error "'PRIi16' was not declared" "undeclared identifier" { target *-*-* } } */
-/* { dg-message "'PRIi16' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIi16' is defined in header '<cinttypes>'; this is probably fixable by adding '#include <cinttypes>'" "replacement note" { target *-*-* } .-1 } */
          PRIo32, /* { dg-error "'PRIo32' was not declared" "undeclared identifier" { target *-*-* } } */
-/* { dg-message "'PRIo32' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIo32' is defined in header '<cinttypes>'; this is probably fixable by adding '#include <cinttypes>'" "replacement note" { target *-*-* } .-1 } */
          PRIu64, /* { dg-error "'PRIu64' was not declared" "undeclared identifier" { target *-*-* } } */
-/* { dg-message "'PRIu64' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIu64' is defined in header '<cinttypes>'; this is probably fixable by adding '#include <cinttypes>'" "replacement note" { target *-*-* } .-1 } */
          PRIx32, /* { dg-error "'PRIx32' was not declared" "undeclared identifier" { target *-*-* } } */
-/* { dg-message "'PRIx32' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIx32' is defined in header '<cinttypes>'; this is probably fixable by adding '#include <cinttypes>'" "replacement note" { target *-*-* } .-1 } */
          PRIoPTR);  /* { dg-error "'PRIoPTR' was not declared" "undeclared identifier" { target *-*-* } } */
-/* { dg-message "'PRIoPTR' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIoPTR' is defined in header '<cinttypes>'; this is probably fixable by adding '#include <cinttypes>'" "replacement note" { target *-*-* } .-1 } */
 
   printf ("%" PRIo8 "\n", i8); /* { dg-error "expected" } */
-/* { dg-message "'PRIo8' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIo8' is defined in header '<cinttypes>'; this is probably fixable by adding '#include <cinttypes>'" "replacement note" { target *-*-* } .-1 } */
   printf ("%" PRIo16 "\n", i16); /* { dg-error "expected" } */
-/* { dg-message "'PRIo16' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIo16' is defined in header '<cinttypes>'; this is probably fixable by adding '#include <cinttypes>'" "replacement note" { target *-*-* } .-1 } */
   printf ("%" PRIo32 "\n", i32); /* { dg-error "expected" } */
-/* { dg-message "'PRIo32' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIo32' is defined in header '<cinttypes>'; this is probably fixable by adding '#include <cinttypes>'" "replacement note" { target *-*-* } .-1 } */
   printf ("%" PRIo64 "\n", i64); /* { dg-error "expected" } */
-/* { dg-message "'PRIo64' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIo64' is defined in header '<cinttypes>'; this is probably fixable by adding '#include <cinttypes>'" "replacement note" { target *-*-* } .-1 } */
   printf ("%" PRIoPTR "\n", ip); /* { dg-error "expected" } */
-/* { dg-message "'PRIoPTR' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIoPTR' is defined in header '<cinttypes>'; this is probably fixable by adding '#include <cinttypes>'" "replacement note" { target *-*-* } .-1 } */
 }
 
 void test_scanf (void)
 {
   scanf ("%" SCNu8 "\n", &i8); /* { dg-error "expected" } */
-/* { dg-message "'SCNu8' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'SCNu8' is defined in header '<cinttypes>'; this is probably fixable by adding '#include <cinttypes>'" "replacement note" { target *-*-* } .-1 } */
   scanf ("%" SCNu16 "\n", &i16); /* { dg-error "expected" } */
-/* { dg-message "'SCNu16' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'SCNu16' is defined in header '<cinttypes>'; this is probably fixable by adding '#include <cinttypes>'" "replacement note" { target *-*-* } .-1 } */
   scanf ("%" SCNu32 "\n", &i32); /* { dg-error "expected" } */
-/* { dg-message "'SCNu32' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'SCNu32' is defined in header '<cinttypes>'; this is probably fixable by adding '#include <cinttypes>'" "replacement note" { target *-*-* } .-1 } */
   scanf ("%" SCNu64 "\n", &i64); /* { dg-error "expected" } */
-/* { dg-message "'SCNu64' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'SCNu64' is defined in header '<cinttypes>'; this is probably fixable by adding '#include <cinttypes>'" "replacement note" { target *-*-* } .-1 } */
   scanf ("%" SCNuPTR "\n", &ip); /* { dg-error "expected" } */
-/* { dg-message "'SCNuPTR' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'SCNuPTR' is defined in header '<cinttypes>'; this is probably fixable by adding '#include <cinttypes>'" "replacement note" { target *-*-* } .-1 } */
   scanf ("%" SCNxPTR "\n", &up); /* { dg-error "expected" } */
-/* { dg-message "'SCNxPTR' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'SCNxPTR' is defined in header '<cinttypes>'; this is probably fixable by adding '#include <cinttypes>'" "replacement note" { target *-*-* } .-1 } */
 }
index b9ce3b7aed8148c6b0c222eeba6eb943b917260a..aa9c7e643e252c8c4170e0c23addedcfd847cf32 100644 (file)
@@ -2,19 +2,19 @@
 /* Missing <cstdint>.  */
 
 char c = INT8_MAX; // { dg-error "'INT8_MAX' was not declared" }
-// { dg-message "'INT8_MAX' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?" "" { target *-*-* } .-1 }
+// { dg-message "'INT8_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
 
 short s = INT16_MAX; // { dg-error "'INT16_MAX' was not declared" }
-// { dg-message "'INT16_MAX' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?" "" { target *-*-* } .-1 }
+// { dg-message "'INT16_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
 
 int i = INT32_MAX; // { dg-error "'INT32_MAX' was not declared" }
-// { dg-message "'INT32_MAX' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?" "" { target *-*-* } .-1 }
+// { dg-message "'INT32_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
 
 long l = INT64_MAX; // { dg-error "'INT64_MAX' was not declared" }
-// { dg-message "'INT64_MAX' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?" "" { target *-*-* } .-1 }
+// { dg-message "'INT64_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
 
 intptr_t test_intptr (void) // { dg-error "'intptr_t' does not name a type" }
-// { dg-message "'intptr_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?" "" { target *-*-* } .-1 }
+// { dg-message "'intptr_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
 {
   return 0;
 }
@@ -22,11 +22,11 @@ intptr_t test_intptr (void) // { dg-error "'intptr_t' does not name a type" }
 int test_intptr_max (void)
 {
   return (int) INTPTR_MAX; // { dg-error "'INTPTR_MAX' was not declared" }
-// { dg-message "'INTPTR_MAX' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?" "" { target *-*-* } .-1 }
+// { dg-message "'INTPTR_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
 }
 
 uintptr_t test_uintptr (void) // { dg-error "'uintptr_t' does not name a type" }
-// { dg-message "'uintptr_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?" "" { target *-*-* } .-1 }
+// { dg-message "'uintptr_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
 {
   return 0;
 }
@@ -34,35 +34,35 @@ uintptr_t test_uintptr (void) // { dg-error "'uintptr_t' does not name a type" }
 unsigned int test_uintptr_max (void)
 {
   return (unsigned int) UINTPTR_MAX; // { dg-error "'UINTPTR_MAX' was not declared" }
-// { dg-message "'UINTPTR_MAX' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?" "" { target *-*-* } .-1 }
+// { dg-message "'UINTPTR_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
 }
 
 int8_t i8; // { dg-error "'int8_t' does not name a type" }
-// { dg-message "'int8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?" "" { target *-*-* } .-1 }
+// { dg-message "'int8_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
 int16_t i16; // { dg-error "'int16_t' does not name a type" }
-// { dg-message "'int16_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?" "" { target *-*-* } .-1 }
+// { dg-message "'int16_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
 int32_t i32; // { dg-error "'int32_t' does not name a type" }
-// { dg-message "'int32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?" "" { target *-*-* } .-1 }
+// { dg-message "'int32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
 int64_t i64; // { dg-error "'int64_t' does not name a type" }
-// { dg-message "'int64_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?" "" { target *-*-* } .-1 }
+// { dg-message "'int64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
 
 void test_uint_t (void)
 {
   char bu8[(unsigned int)UINT8_MAX]; // { dg-error "'UINT8_MAX' was not declared" }
-  // { dg-message "'UINT8_MAX' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?" "" { target *-*-* } .-1 }
+  // { dg-message "'UINT8_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
   char bu16[(unsigned int)UINT16_MAX]; // { dg-error "'UINT16_MAX' was not declared" }
-  // { dg-message "'UINT16_MAX' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?" "" { target *-*-* } .-1 }
+  // { dg-message "'UINT16_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
   char bu32[(unsigned int)UINT32_MAX]; // { dg-error "'UINT32_MAX' was not declared" }
-  // { dg-message "'UINT32_MAX' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?" "" { target *-*-* } .-1 }
+  // { dg-message "'UINT32_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
   char bu64[(unsigned int)UINT64_MAX]; // { dg-error "'UINT64_MAX' was not declared" }
-  // { dg-message "'UINT64_MAX' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?" "" { target *-*-* } .-1 }
+  // { dg-message "'UINT64_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
 
   auto ui8 = (uint8_t) 8; // { dg-error "'uint8_t' was not declared" }
-  // { dg-message "'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?" "" { target *-*-* } .-1 }
+  // { dg-message "'uint8_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
   auto ui16 = (uint16_t) 16; // { dg-error "'uint16_t' was not declared" }
-  // { dg-message "'uint16_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?" "" { target *-*-* } .-1 }
+  // { dg-message "'uint16_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
   auto ui32 = (uint32_t) 32; // { dg-error "'uint32_t' was not declared" }
-  // { dg-message "'uint32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?" "" { target *-*-* } .-1 }
+  // { dg-message "'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
   auto ui64 = (uint64_t) 64; // { dg-error "'uint64_t' was not declared" }
-  // { dg-message "'uint64_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?" "" { target *-*-* } .-1 }
+  // { dg-message "'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
 }
index 7a70641e3ae13c05c126e9d0492baab69ee11f32..fd0f3a9b8c9020a7c23d7d26ca6a6291c07a43da 100644 (file)
@@ -1,40 +1,40 @@
 /* Missing <cstddef>.  */
 
 void *ptr = NULL; // { dg-error "'NULL' was not declared" }
-// { dg-message "'NULL' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?" "" { target *-*-* } .-1 }
+// { dg-message "'NULL' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'" "" { target *-*-* } .-1 }
 
 ptrdiff_t pd; // { dg-error "'ptrdiff_t' does not name a type" }
-// { dg-message "'ptrdiff_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?" "" { target *-*-* } .-1 }
+// { dg-message "'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'" "" { target *-*-* } .-1 }
 
 size_t sz; // { dg-error "'size_t' does not name a type" }
-// { dg-message "'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?" "" { target *-*-* } .-1 }
+// { dg-message "'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'" "" { target *-*-* } .-1 }
 
 /* Missing <cstdio>.  */
 
 void test_cstdio (void)
 {
   FILE *f; // { dg-error "'FILE' was not declared in this scope" }
-  // { dg-message "'FILE' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?" "" { target *-*-* } .-1 }
+  // { dg-message "'FILE' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'" "" { target *-*-* } .-1 }
   // { dg-error "'f' was not declared in this scope" "" { target *-*-* } .-2 }
   // { dg-bogus "suggested alternative: 'if'" "PR c++/80567" { target *-*-* } .-3 }
 
   char buf[BUFSIZ]; // { dg-error "'BUFSIZ' was not declared" }
-  // { dg-message "'BUFSIZ' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?" "" { target *-*-* } .-1 }
+  // { dg-message "'BUFSIZ' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'" "" { target *-*-* } .-1 }
 
   char buf2[FILENAME_MAX]; // { dg-error "'FILENAME_MAX' was not declared" }
-  // { dg-message "'FILENAME_MAX' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?" "" { target *-*-* } .-1 }
+  // { dg-message "'FILENAME_MAX' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'" "" { target *-*-* } .-1 }
 
   stderr; // { dg-error "'stderr' was not declared" }
-  // { dg-message "'stderr' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?" "" { target *-*-* } .-1 }
+  // { dg-message "'stderr' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'" "" { target *-*-* } .-1 }
 
   stdin; // { dg-error "'stdin' was not declared" }
-  // { dg-message "'stdin' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?" "" { target *-*-* } .-1 }
+  // { dg-message "'stdin' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'" "" { target *-*-* } .-1 }
 
   stdout; // { dg-error "'stdout' was not declared" }
-  // { dg-message "'stdout' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?" "" { target *-*-* } .-1 }
+  // { dg-message "'stdout' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'" "" { target *-*-* } .-1 }
 
   EOF; // { dg-error "'EOF' was not declared" }
-  // { dg-message "'EOF' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?" "" { target *-*-* } .-1 }
+  // { dg-message "'EOF' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'" "" { target *-*-* } .-1 }
 
   fopen ("test.txt"); // { dg-error "'fopen' was not declared" }
   // { dg-message "'#include <cstdio>'" "" { target *-*-* } .-1 }
@@ -57,7 +57,7 @@ void test_cstdio (void)
 int test_cerrno (void)
 {
   return errno; // { dg-error "'errno' was not declared" }
-  // { dg-message "'errno' is defined in header '<cerrno>'; did you forget to '#include <cerrno>'?" "" { target *-*-* } .-1 }
+  // { dg-message "'errno' is defined in header '<cerrno>'; this is probably fixable by adding '#include <cerrno>'" "" { target *-*-* } .-1 }
 }
 
 /* Missing <cstdarg>.  */
@@ -65,7 +65,7 @@ int test_cerrno (void)
 void test_cstdarg (void)
 {
   va_list ap; // { dg-error "'va_list'" }
-  // { dg-message "'va_list' is defined in header '<cstdarg>'; did you forget to '#include <cstdarg>'?" "" { target *-*-* } .-1 }
+  // { dg-message "'va_list' is defined in header '<cstdarg>'; this is probably fixable by adding '#include <cstdarg>'" "" { target *-*-* } .-1 }
 }
 
 /* Missing <climits>.  */
@@ -74,13 +74,13 @@ int test_INT_MAX (void)
   return INT_MAX; // { dg-line INT_MAX_line }
   // { dg-error "'INT_MAX' was not declared" "" { target *-*-* } INT_MAX_line }
   // { dg-bogus "__INT_MAX__" "" { target *-*-* } INT_MAX_line }
-  // { dg-message "'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?" "" { target *-*-* } INT_MAX_line }
+  // { dg-message "'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'" "" { target *-*-* } INT_MAX_line }
 }
 
 /* Missing <cfloat>.  */
 float test_FLT_MAX = FLT_MAX; // { dg-line FLT_MAX_line }
 // { dg-error "'FLT_MAX' was not declared" "" { target *-*-* } FLT_MAX_line }
-// { dg-message "'FLT_MAX' is defined in header '<cfloat>'; did you forget to '#include <cfloat>'?" "" { target *-*-* } FLT_MAX_line }
+// { dg-message "'FLT_MAX' is defined in header '<cfloat>'; this is probably fixable by adding '#include <cfloat>'" "" { target *-*-* } FLT_MAX_line }
 
 /* Missing <cstring>.  */
 
index 611d7f02258a3e12fea9e5ca94d0eb718674f105..24e075433fc9a0ae8987c90e2e6c5517388e2bcc 100644 (file)
@@ -17,66 +17,66 @@ uintptr_t up;
 
 /* As an identifier.  */
 const char *hex8_fmt = PRIx8; /* { dg-error "'PRIx8' undeclared" "undeclared identifier" { target *-*-* } } */
-/* { dg-message "'PRIx8' is defined in header '<inttypes.h>'; did you forget to '#include <inttypes.h>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIx8' is defined in header '<inttypes.h>'; this is probably fixable by adding '#include <inttypes.h>'" "replacement note" { target *-*-* } .-1 } */
 const char *hex16_fmt = PRIx16; /* { dg-error "'PRIx16' undeclared" "undeclared identifier" { target *-*-* } } */
-/* { dg-message "'PRIx16' is defined in header '<inttypes.h>'; did you forget to '#include <inttypes.h>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIx16' is defined in header '<inttypes.h>'; this is probably fixable by adding '#include <inttypes.h>'" "replacement note" { target *-*-* } .-1 } */
 const char *hex32_fmt = PRIx32; /* { dg-error "'PRIx32' undeclared" "undeclared identifier" { target *-*-* } } */
-/* { dg-message "'PRIx32' is defined in header '<inttypes.h>'; did you forget to '#include <inttypes.h>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIx32' is defined in header '<inttypes.h>'; this is probably fixable by adding '#include <inttypes.h>'" "replacement note" { target *-*-* } .-1 } */
 const char *hex64_fmt = PRIx64; /* { dg-error "'PRIx64' undeclared" "undeclared identifier" { target *-*-* } } */
-/* { dg-message "'PRIx64' is defined in header '<inttypes.h>'; did you forget to '#include <inttypes.h>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIx64' is defined in header '<inttypes.h>'; this is probably fixable by adding '#include <inttypes.h>'" "replacement note" { target *-*-* } .-1 } */
 const char *hexptr_fmt = PRIxPTR; /* { dg-error "'PRIxPTR' undeclared" "undeclared identifier" { target *-*-* } } */
-/* { dg-message "'PRIxPTR' is defined in header '<inttypes.h>'; did you forget to '#include <inttypes.h>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIxPTR' is defined in header '<inttypes.h>'; this is probably fixable by adding '#include <inttypes.h>'" "replacement note" { target *-*-* } .-1 } */
 
 /* As a part of a string-literal.  */
 const char *dec8msg_fmt = "Provide %" PRId8 "\n"; /* { dg-error "expected" "expected string-literal" { target *-*-* } } */
-/* { dg-message "'PRId8' is defined in header '<inttypes.h>'; did you forget to '#include <inttypes.h>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRId8' is defined in header '<inttypes.h>'; this is probably fixable by adding '#include <inttypes.h>'" "replacement note" { target *-*-* } .-1 } */
 const char *dec16msg_fmt = "Provide %" PRId16 "\n"; /* { dg-error "expected" "expected string-literal" { target *-*-* } } */
-/* { dg-message "'PRId16' is defined in header '<inttypes.h>'; did you forget to '#include <inttypes.h>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRId16' is defined in header '<inttypes.h>'; this is probably fixable by adding '#include <inttypes.h>'" "replacement note" { target *-*-* } .-1 } */
 const char *dec32msg_fmt = "Provide %" PRId32 "\n"; /* { dg-error "expected" "expected string-literal" { target *-*-* } } */
-/* { dg-message "'PRId32' is defined in header '<inttypes.h>'; did you forget to '#include <inttypes.h>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRId32' is defined in header '<inttypes.h>'; this is probably fixable by adding '#include <inttypes.h>'" "replacement note" { target *-*-* } .-1 } */
 const char *dec64msg_fmt = "Provide %" PRId64 "\n"; /* { dg-error "expected" "expected string-literal" { target *-*-* } } */
-/* { dg-message "'PRId64' is defined in header '<inttypes.h>'; did you forget to '#include <inttypes.h>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRId64' is defined in header '<inttypes.h>'; this is probably fixable by adding '#include <inttypes.h>'" "replacement note" { target *-*-* } .-1 } */
 const char *decptrmsg_fmt = "Provide %" PRIdPTR "\n"; /* { dg-error "expected" "expected string-literal" { target *-*-* } } */
-/* { dg-message "'PRIdPTR' is defined in header '<inttypes.h>'; did you forget to '#include <inttypes.h>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIdPTR' is defined in header '<inttypes.h>'; this is probably fixable by adding '#include <inttypes.h>'" "replacement note" { target *-*-* } .-1 } */
 
 void test_printf (void)
 {
   printf ("some format strings %s, %s, %s, %s, %s, %s\n",
          PRId8, /* { dg-error "'PRId8' undeclared" "undeclared identifier" { target *-*-* } } */
-/* { dg-message "'PRId8' is defined in header '<inttypes.h>'; did you forget to '#include <inttypes.h>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRId8' is defined in header '<inttypes.h>'; this is probably fixable by adding '#include <inttypes.h>'" "replacement note" { target *-*-* } .-1 } */
          PRIi16, /* { dg-error "'PRIi16' undeclared" "undeclared identifier" { target *-*-* } } */
-/* { dg-message "'PRIi16' is defined in header '<inttypes.h>'; did you forget to '#include <inttypes.h>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIi16' is defined in header '<inttypes.h>'; this is probably fixable by adding '#include <inttypes.h>'" "replacement note" { target *-*-* } .-1 } */
          PRIo32, /* { dg-error "'PRIo32' undeclared" "undeclared identifier" { target *-*-* } } */
-/* { dg-message "'PRIo32' is defined in header '<inttypes.h>'; did you forget to '#include <inttypes.h>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIo32' is defined in header '<inttypes.h>'; this is probably fixable by adding '#include <inttypes.h>'" "replacement note" { target *-*-* } .-1 } */
          PRIu64, /* { dg-error "'PRIu64' undeclared" "undeclared identifier" { target *-*-* } } */
-/* { dg-message "'PRIu64' is defined in header '<inttypes.h>'; did you forget to '#include <inttypes.h>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIu64' is defined in header '<inttypes.h>'; this is probably fixable by adding '#include <inttypes.h>'" "replacement note" { target *-*-* } .-1 } */
          PRIoPTR);  /* { dg-error "'PRIoPTR' undeclared" "undeclared identifier" { target *-*-* } } */
-/* { dg-message "'PRIoPTR' is defined in header '<inttypes.h>'; did you forget to '#include <inttypes.h>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIoPTR' is defined in header '<inttypes.h>'; this is probably fixable by adding '#include <inttypes.h>'" "replacement note" { target *-*-* } .-1 } */
 
   printf ("%" PRIo8 "\n", i8); /* { dg-error "expected" } */
-/* { dg-message "'PRIo8' is defined in header '<inttypes.h>'; did you forget to '#include <inttypes.h>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIo8' is defined in header '<inttypes.h>'; this is probably fixable by adding '#include <inttypes.h>'" "replacement note" { target *-*-* } .-1 } */
   printf ("%" PRIo16 "\n", i16); /* { dg-error "expected" } */
-/* { dg-message "'PRIo16' is defined in header '<inttypes.h>'; did you forget to '#include <inttypes.h>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIo16' is defined in header '<inttypes.h>'; this is probably fixable by adding '#include <inttypes.h>'" "replacement note" { target *-*-* } .-1 } */
   printf ("%" PRIo32 "\n", i32); /* { dg-error "expected" } */
-/* { dg-message "'PRIo32' is defined in header '<inttypes.h>'; did you forget to '#include <inttypes.h>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIo32' is defined in header '<inttypes.h>'; this is probably fixable by adding '#include <inttypes.h>'" "replacement note" { target *-*-* } .-1 } */
   printf ("%" PRIo64 "\n", i64); /* { dg-error "expected" } */
-/* { dg-message "'PRIo64' is defined in header '<inttypes.h>'; did you forget to '#include <inttypes.h>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIo64' is defined in header '<inttypes.h>'; this is probably fixable by adding '#include <inttypes.h>'" "replacement note" { target *-*-* } .-1 } */
   printf ("%" PRIoPTR "\n", ip); /* { dg-error "expected" } */
-/* { dg-message "'PRIoPTR' is defined in header '<inttypes.h>'; did you forget to '#include <inttypes.h>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'PRIoPTR' is defined in header '<inttypes.h>'; this is probably fixable by adding '#include <inttypes.h>'" "replacement note" { target *-*-* } .-1 } */
 }
 
 void test_scanf (void)
 {
   scanf ("%" SCNu8 "\n", &i8); /* { dg-error "expected" } */
-/* { dg-message "'SCNu8' is defined in header '<inttypes.h>'; did you forget to '#include <inttypes.h>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'SCNu8' is defined in header '<inttypes.h>'; this is probably fixable by adding '#include <inttypes.h>'" "replacement note" { target *-*-* } .-1 } */
   scanf ("%" SCNu16 "\n", &i16); /* { dg-error "expected" } */
-/* { dg-message "'SCNu16' is defined in header '<inttypes.h>'; did you forget to '#include <inttypes.h>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'SCNu16' is defined in header '<inttypes.h>'; this is probably fixable by adding '#include <inttypes.h>'" "replacement note" { target *-*-* } .-1 } */
   scanf ("%" SCNu32 "\n", &i32); /* { dg-error "expected" } */
-/* { dg-message "'SCNu32' is defined in header '<inttypes.h>'; did you forget to '#include <inttypes.h>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'SCNu32' is defined in header '<inttypes.h>'; this is probably fixable by adding '#include <inttypes.h>'" "replacement note" { target *-*-* } .-1 } */
   scanf ("%" SCNu64 "\n", &i64); /* { dg-error "expected" } */
-/* { dg-message "'SCNu64' is defined in header '<inttypes.h>'; did you forget to '#include <inttypes.h>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'SCNu64' is defined in header '<inttypes.h>'; this is probably fixable by adding '#include <inttypes.h>'" "replacement note" { target *-*-* } .-1 } */
   scanf ("%" SCNuPTR "\n", &ip); /* { dg-error "expected" } */
-/* { dg-message "'SCNuPTR' is defined in header '<inttypes.h>'; did you forget to '#include <inttypes.h>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'SCNuPTR' is defined in header '<inttypes.h>'; this is probably fixable by adding '#include <inttypes.h>'" "replacement note" { target *-*-* } .-1 } */
   scanf ("%" SCNxPTR "\n", &up); /* { dg-error "expected" } */
-/* { dg-message "'SCNxPTR' is defined in header '<inttypes.h>'; did you forget to '#include <inttypes.h>'?" "replacement note" { target *-*-* } .-1 } */
+/* { dg-message "'SCNxPTR' is defined in header '<inttypes.h>'; this is probably fixable by adding '#include <inttypes.h>'" "replacement note" { target *-*-* } .-1 } */
 }
index 01f12da35cfe9367f6f785c2a1c548b84bded57a..088896b51cb725af87ab9995eb666d4d86101591 100644 (file)
@@ -2,16 +2,16 @@
 /* Missing <stdbool.h>.  */
 
 bool b; /* { dg-error "unknown type name 'bool'" } */
-/* { dg-message "'bool' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?" "" { target *-*-* } .-1 } */
+/* { dg-message "'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'" "" { target *-*-* } .-1 } */
 
 int test_true (void)
 {
   return true; /* { dg-error "'true' undeclared" } */
-  /* { dg-message "'true' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?" "" { target *-*-* } .-1 } */
+  /* { dg-message "'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'" "" { target *-*-* } .-1 } */
 }
 
 int test_false (void)
 {
   return false; /* { dg-error "'false' undeclared" } */
-  /* { dg-message "'false' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?" "" { target *-*-* } .-1 } */
+  /* { dg-message "'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'" "" { target *-*-* } .-1 } */
 }
index 852c86954b6acaa3c76781e2bbb994906da40498..f89159415edabfce5766440dcb87be1cb363f5c8 100644 (file)
@@ -2,61 +2,61 @@
 /* Missing <stdint.h>.  */
 
 char c = INT8_MAX; // { dg-error "'INT8_MAX' undeclared" }
-// { dg-message "'INT8_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
+// { dg-message "'INT8_MAX' is defined in header '<stdint.h>'; this is probably fixable by adding '#include <stdint.h>'" "" { target *-*-* } .-1 }
 
 short s = INT16_MAX; // { dg-error "'INT16_MAX' undeclared" }
-// { dg-message "'INT16_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
+// { dg-message "'INT16_MAX' is defined in header '<stdint.h>'; this is probably fixable by adding '#include <stdint.h>'" "" { target *-*-* } .-1 }
 
 int i = INT32_MAX; // { dg-error "'INT32_MAX' undeclared" }
-// { dg-message "'INT32_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
+// { dg-message "'INT32_MAX' is defined in header '<stdint.h>'; this is probably fixable by adding '#include <stdint.h>'" "" { target *-*-* } .-1 }
 
 long l = INT64_MAX; // { dg-error "'INT64_MAX' undeclared" }
-// { dg-message "'INT64_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
+// { dg-message "'INT64_MAX' is defined in header '<stdint.h>'; this is probably fixable by adding '#include <stdint.h>'" "" { target *-*-* } .-1 }
 
 intptr_t test_intptr (void) // { dg-error "unknown type name 'intptr_t'" }
-// { dg-message "'intptr_t' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
+// { dg-message "'intptr_t' is defined in header '<stdint.h>'; this is probably fixable by adding '#include <stdint.h>'" "" { target *-*-* } .-1 }
 {
   return INTPTR_MAX; // { dg-error "'INTPTR_MAX' undeclared" }
-// { dg-message "'INTPTR_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
+// { dg-message "'INTPTR_MAX' is defined in header '<stdint.h>'; this is probably fixable by adding '#include <stdint.h>'" "" { target *-*-* } .-1 }
 }
 
 uintptr_t test_uintptr (void) // { dg-error "unknown type name 'uintptr_t'" }
-// { dg-message "'uintptr_t' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
+// { dg-message "'uintptr_t' is defined in header '<stdint.h>'; this is probably fixable by adding '#include <stdint.h>'" "" { target *-*-* } .-1 }
 {
   return UINTPTR_MAX; // { dg-error "'UINTPTR_MAX' undeclared" }
-// { dg-message "'UINTPTR_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
+// { dg-message "'UINTPTR_MAX' is defined in header '<stdint.h>'; this is probably fixable by adding '#include <stdint.h>'" "" { target *-*-* } .-1 }
 }
 
 int8_t i8; // { dg-error "unknown type name 'int8_t'" }
-// { dg-message "'int8_t' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
+// { dg-message "'int8_t' is defined in header '<stdint.h>'; this is probably fixable by adding '#include <stdint.h>'" "" { target *-*-* } .-1 }
 int16_t i16; // { dg-error "unknown type name 'int16_t'" }
-// { dg-message "'int16_t' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
+// { dg-message "'int16_t' is defined in header '<stdint.h>'; this is probably fixable by adding '#include <stdint.h>'" "" { target *-*-* } .-1 }
 int32_t i32; // { dg-error "unknown type name 'int32_t'" }
-// { dg-message "'int32_t' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
+// { dg-message "'int32_t' is defined in header '<stdint.h>'; this is probably fixable by adding '#include <stdint.h>'" "" { target *-*-* } .-1 }
 int64_t i64; // { dg-error "unknown type name 'int64_t'" }
-// { dg-message "'int64_t' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
+// { dg-message "'int64_t' is defined in header '<stdint.h>'; this is probably fixable by adding '#include <stdint.h>'" "" { target *-*-* } .-1 }
 
 void test_uint_t (void)
 {
   char bu8[(unsigned int)UINT8_MAX]; // { dg-error "'UINT8_MAX' undeclared" }
-  // { dg-message "'UINT8_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
+  // { dg-message "'UINT8_MAX' is defined in header '<stdint.h>'; this is probably fixable by adding '#include <stdint.h>'" "" { target *-*-* } .-1 }
   char bu16[(unsigned int)UINT16_MAX]; // { dg-error "'UINT16_MAX' undeclared" }
-  // { dg-message "'UINT16_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
+  // { dg-message "'UINT16_MAX' is defined in header '<stdint.h>'; this is probably fixable by adding '#include <stdint.h>'" "" { target *-*-* } .-1 }
   char bu32[(unsigned int)UINT32_MAX]; // { dg-error "'UINT32_MAX' undeclared" }
-  // { dg-message "'UINT32_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
+  // { dg-message "'UINT32_MAX' is defined in header '<stdint.h>'; this is probably fixable by adding '#include <stdint.h>'" "" { target *-*-* } .-1 }
   char bu64[(unsigned int)UINT64_MAX]; // { dg-error "'UINT64_MAX' undeclared" }
-  // { dg-message "'UINT64_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
+  // { dg-message "'UINT64_MAX' is defined in header '<stdint.h>'; this is probably fixable by adding '#include <stdint.h>'" "" { target *-*-* } .-1 }
 
   char ui8 = (uint8_t) 8; // { dg-error "'uint8_t' undeclared" }
   // { dg-error "expected" "" { target *-*-* } .-1 }
-  // { dg-message "'uint8_t' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-2 }
+  // { dg-message "'uint8_t' is defined in header '<stdint.h>'; this is probably fixable by adding '#include <stdint.h>'" "" { target *-*-* } .-2 }
   short ui16 = (uint16_t) 16; // { dg-error "'uint16_t' undeclared" }
   // { dg-error "expected" "" { target *-*-* } .-1 }
-  // { dg-message "'uint16_t' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-2 }
+  // { dg-message "'uint16_t' is defined in header '<stdint.h>'; this is probably fixable by adding '#include <stdint.h>'" "" { target *-*-* } .-2 }
   int ui32 = (uint32_t) 32; // { dg-error "'uint32_t' undeclared" }
   // { dg-error "expected" "" { target *-*-* } .-1 }
-  // { dg-message "'uint32_t' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-2 }
+  // { dg-message "'uint32_t' is defined in header '<stdint.h>'; this is probably fixable by adding '#include <stdint.h>'" "" { target *-*-* } .-2 }
   long ui64 = (uint64_t) 64; // { dg-error "'uint64_t' undeclared" }
   // { dg-error "expected" "" { target *-*-* } .-1 }
-  // { dg-message "'uint64_t' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-2 }
+  // { dg-message "'uint64_t' is defined in header '<stdint.h>'; this is probably fixable by adding '#include <stdint.h>'" "" { target *-*-* } .-2 }
 }
index 7297a92368f648d98bc6e35a60dfd688b9b4937f..3459fad1d058666f8a99c0d4b6295e2e2e9d119e 100644 (file)
@@ -1,41 +1,41 @@
 /* Missing <stddef.h>.  */
 
 void *ptr = NULL; /* { dg-error "'NULL' undeclared here" } */
-/* { dg-message "'NULL' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?" "" { target *-*-* } .-1 } */
+/* { dg-message "'NULL' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'" "" { target *-*-* } .-1 } */
 
 ptrdiff_t pd; /* { dg-error "unknown type name 'ptrdiff_t'" } */
-/* { dg-message "'ptrdiff_t' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?" "" { target *-*-* } .-1 } */
+/* { dg-message "'ptrdiff_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'" "" { target *-*-* } .-1 } */
 
 wchar_t wc; /* { dg-error "unknown type name 'wchar_t'" } */
-/* { dg-message "'wchar_t' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?" "" { target *-*-* } .-1 } */
+/* { dg-message "'wchar_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'" "" { target *-*-* } .-1 } */
 
 size_t sz; /* { dg-error "unknown type name 'size_t'" } */
-/* { dg-message "'size_t' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?" "" { target *-*-* } .-1 } */
+/* { dg-message "'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'" "" { target *-*-* } .-1 } */
 
 /* Missing <stdio.h>.  */
 
 void test_stdio_h (void)
 {
   FILE *f; /* { dg-error "unknown type name 'FILE'" } */
-  /* { dg-message "'FILE' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'?" "" { target *-*-* } .-1 } */
+  /* { dg-message "'FILE' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'" "" { target *-*-* } .-1 } */
 
   char buf[BUFSIZ]; /* { dg-error "'BUFSIZ' undeclared" } */
-  /* { dg-message "'BUFSIZ' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'?" "" { target *-*-* } .-1 } */
+  /* { dg-message "'BUFSIZ' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'" "" { target *-*-* } .-1 } */
 
   char buf2[FILENAME_MAX]; /* { dg-error "'FILENAME_MAX' undeclared" } */
-  /* { dg-message "'FILENAME_MAX' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'?" "" { target *-*-* } .-1 } */
+  /* { dg-message "'FILENAME_MAX' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'" "" { target *-*-* } .-1 } */
 
   stderr; /* { dg-error "'stderr' undeclared" } */
-  /* { dg-message "'stderr' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'?" "" { target *-*-* } .-1 } */
+  /* { dg-message "'stderr' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'" "" { target *-*-* } .-1 } */
 
   stdin; /* { dg-error "'stdin' undeclared" } */
-  /* { dg-message "'stdin' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'?" "" { target *-*-* } .-1 } */
+  /* { dg-message "'stdin' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'" "" { target *-*-* } .-1 } */
 
   stdout; /* { dg-error "'stdout' undeclared" } */
-  /* { dg-message "'stdout' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'?" "" { target *-*-* } .-1 } */
+  /* { dg-message "'stdout' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'" "" { target *-*-* } .-1 } */
 
   EOF; /* { dg-error "'EOF' undeclared" } */
-  /* { dg-message "'EOF' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'?" "" { target *-*-* } .-1 } */
+  /* { dg-message "'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'" "" { target *-*-* } .-1 } */
 }
 
 /* Missing <stdlib.h>.  */
@@ -43,9 +43,9 @@ void test_stdio_h (void)
 void test_stdlib (int i)
 {
   i = EXIT_SUCCESS; /* { dg-error "'EXIT_SUCCESS' undeclared" } */
-  /* { dg-message "'EXIT_SUCCESS' is defined in header '<stdlib.h>'; did you forget to '#include <stdlib.h>'?" "" { target *-*-* } .-1 } */
+  /* { dg-message "'EXIT_SUCCESS' is defined in header '<stdlib.h>'; this is probably fixable by adding '#include <stdlib.h>'" "" { target *-*-* } .-1 } */
   i = EXIT_FAILURE; /* { dg-error "'EXIT_FAILURE' undeclared" } */
-  /* { dg-message "'EXIT_FAILURE' is defined in header '<stdlib.h>'; did you forget to '#include <stdlib.h>'?" "" { target *-*-* } .-1 } */
+  /* { dg-message "'EXIT_FAILURE' is defined in header '<stdlib.h>'; this is probably fixable by adding '#include <stdlib.h>'" "" { target *-*-* } .-1 } */
 }
 
 /* Missing <errno.h>.  */
@@ -53,7 +53,7 @@ void test_stdlib (int i)
 int test_errno_h (void)
 {
   return errno; /* { dg-error "'errno' undeclared" } */
-  /* { dg-message "'errno' is defined in header '<errno.h>'; did you forget to '#include <errno.h>'?" "" { target *-*-* } .-1 } */
+  /* { dg-message "'errno' is defined in header '<errno.h>'; this is probably fixable by adding '#include <errno.h>'" "" { target *-*-* } .-1 } */
 }
 
 /* Missing <stdarg.h>.  */
@@ -61,7 +61,7 @@ int test_errno_h (void)
 void test_stdarg_h (void)
 {
   va_list ap; /* { dg-error "unknown type name 'va_list'" } */
-  /* { dg-message "'va_list' is defined in header '<stdarg.h>'; did you forget to '#include <stdarg.h>'?" "" { target *-*-* } .-1 } */
+  /* { dg-message "'va_list' is defined in header '<stdarg.h>'; this is probably fixable by adding '#include <stdarg.h>'" "" { target *-*-* } .-1 } */
 }
 
 /* Missing <limits.h>.  */
@@ -70,10 +70,10 @@ int test_INT_MAX (void)
   return INT_MAX; /* { dg-line INT_MAX_line } */
   /* { dg-error "'INT_MAX' undeclared" "" { target *-*-* } INT_MAX_line } */
   /* { dg-bogus "__INT_MAX__" "" { target *-*-* } INT_MAX_line } */
-  /* { dg-message "'INT_MAX' is defined in header '<limits.h>'; did you forget to '#include <limits.h>'?" "" { target *-*-* } INT_MAX_line } */
+  /* { dg-message "'INT_MAX' is defined in header '<limits.h>'; this is probably fixable by adding '#include <limits.h>'" "" { target *-*-* } INT_MAX_line } */
 }
 
 /* Missing <float.h>.  */
 float test_FLT_MAX = FLT_MAX; /* { dg-line FLT_MAX_line } */
 /* { dg-error "'FLT_MAX' undeclared" "" { target *-*-* } FLT_MAX_line } */
-/* { dg-message "'FLT_MAX' is defined in header '<float.h>'; did you forget to '#include <float.h>'?" "" { target *-*-* } FLT_MAX_line } */
+/* { dg-message "'FLT_MAX' is defined in header '<float.h>'; this is probably fixable by adding '#include <float.h>'" "" { target *-*-* } FLT_MAX_line } */