aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2023-06-13 17:42:47 -0400
committerDavid Malcolm <dmalcolm@redhat.com>2023-06-13 17:42:47 -0400
commit7474c46cf2d3715fe23871671c756fd5f65bc225 (patch)
tree2b7cf075d40302935f095ea846aa157fc7b50e69 /gcc
parent5a897036187468d4ded330b90b2abdaff5061ed6 (diff)
downloadgcc-7474c46cf2d3715fe23871671c756fd5f65bc225.zip
gcc-7474c46cf2d3715fe23871671c756fd5f65bc225.tar.gz
gcc-7474c46cf2d3715fe23871671c756fd5f65bc225.tar.bz2
c/c++: use positive tone in missing header notes [PR84890]
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>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/c-family/known-headers.cc2
-rw-r--r--gcc/cp/name-lookup.cc2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/srcloc3.C2
-rw-r--r--gcc/testsuite/g++.dg/lookup/missing-std-include-2.C8
-rw-r--r--gcc/testsuite/g++.dg/lookup/missing-std-include-3.C2
-rw-r--r--gcc/testsuite/g++.dg/lookup/missing-std-include-6.C4
-rw-r--r--gcc/testsuite/g++.dg/lookup/missing-std-include.C16
-rw-r--r--gcc/testsuite/g++.dg/spellcheck-inttypes.C54
-rw-r--r--gcc/testsuite/g++.dg/spellcheck-stdint.C40
-rw-r--r--gcc/testsuite/g++.dg/spellcheck-stdlib.C28
-rw-r--r--gcc/testsuite/gcc.dg/spellcheck-inttypes.c52
-rw-r--r--gcc/testsuite/gcc.dg/spellcheck-stdbool.c6
-rw-r--r--gcc/testsuite/gcc.dg/spellcheck-stdint.c40
-rw-r--r--gcc/testsuite/gcc.dg/spellcheck-stdlib.c34
14 files changed, 145 insertions, 145 deletions
diff --git a/gcc/c-family/known-headers.cc b/gcc/c-family/known-headers.cc
index de92cfd..3484c86 100644
--- a/gcc/c-family/known-headers.cc
+++ b/gcc/c-family/known-headers.cc
@@ -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);
}
diff --git a/gcc/cp/name-lookup.cc b/gcc/cp/name-lookup.cc
index b8ca730..53b6870 100644
--- a/gcc/cp/name-lookup.cc
+++ b/gcc/cp/name-lookup.cc
@@ -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
diff --git a/gcc/testsuite/g++.dg/cpp2a/srcloc3.C b/gcc/testsuite/g++.dg/cpp2a/srcloc3.C
index 324e03c..c843e07 100644
--- a/gcc/testsuite/g++.dg/cpp2a/srcloc3.C
+++ b/gcc/testsuite/g++.dg/cpp2a/srcloc3.C
@@ -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 }
diff --git a/gcc/testsuite/g++.dg/lookup/missing-std-include-2.C b/gcc/testsuite/g++.dg/lookup/missing-std-include-2.C
index 51c604a..fa1ec0b 100644
--- a/gcc/testsuite/g++.dg/lookup/missing-std-include-2.C
+++ b/gcc/testsuite/g++.dg/lookup/missing-std-include-2.C
@@ -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.
diff --git a/gcc/testsuite/g++.dg/lookup/missing-std-include-3.C b/gcc/testsuite/g++.dg/lookup/missing-std-include-3.C
index 23f868d..ee567ed 100644
--- a/gcc/testsuite/g++.dg/lookup/missing-std-include-3.C
+++ b/gcc/testsuite/g++.dg/lookup/missing-std-include-3.C
@@ -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>
diff --git a/gcc/testsuite/g++.dg/lookup/missing-std-include-6.C b/gcc/testsuite/g++.dg/lookup/missing-std-include-6.C
index a8f2747..e6f5ec0 100644
--- a/gcc/testsuite/g++.dg/lookup/missing-std-include-6.C
+++ b/gcc/testsuite/g++.dg/lookup/missing-std-include-6.C
@@ -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 }
}
diff --git a/gcc/testsuite/g++.dg/lookup/missing-std-include.C b/gcc/testsuite/g++.dg/lookup/missing-std-include.C
index 0fcc72b..f28618b 100644
--- a/gcc/testsuite/g++.dg/lookup/missing-std-include.C
+++ b/gcc/testsuite/g++.dg/lookup/missing-std-include.C
@@ -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 }
}
diff --git a/gcc/testsuite/g++.dg/spellcheck-inttypes.C b/gcc/testsuite/g++.dg/spellcheck-inttypes.C
index fea3096..541d668 100644
--- a/gcc/testsuite/g++.dg/spellcheck-inttypes.C
+++ b/gcc/testsuite/g++.dg/spellcheck-inttypes.C
@@ -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 } */
}
diff --git a/gcc/testsuite/g++.dg/spellcheck-stdint.C b/gcc/testsuite/g++.dg/spellcheck-stdint.C
index b9ce3b7..aa9c7e6 100644
--- a/gcc/testsuite/g++.dg/spellcheck-stdint.C
+++ b/gcc/testsuite/g++.dg/spellcheck-stdint.C
@@ -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 }
}
diff --git a/gcc/testsuite/g++.dg/spellcheck-stdlib.C b/gcc/testsuite/g++.dg/spellcheck-stdlib.C
index 7a70641..fd0f3a9 100644
--- a/gcc/testsuite/g++.dg/spellcheck-stdlib.C
+++ b/gcc/testsuite/g++.dg/spellcheck-stdlib.C
@@ -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>. */
diff --git a/gcc/testsuite/gcc.dg/spellcheck-inttypes.c b/gcc/testsuite/gcc.dg/spellcheck-inttypes.c
index 611d7f0..24e0754 100644
--- a/gcc/testsuite/gcc.dg/spellcheck-inttypes.c
+++ b/gcc/testsuite/gcc.dg/spellcheck-inttypes.c
@@ -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 } */
}
diff --git a/gcc/testsuite/gcc.dg/spellcheck-stdbool.c b/gcc/testsuite/gcc.dg/spellcheck-stdbool.c
index 01f12da..088896b 100644
--- a/gcc/testsuite/gcc.dg/spellcheck-stdbool.c
+++ b/gcc/testsuite/gcc.dg/spellcheck-stdbool.c
@@ -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 } */
}
diff --git a/gcc/testsuite/gcc.dg/spellcheck-stdint.c b/gcc/testsuite/gcc.dg/spellcheck-stdint.c
index 852c869..f891594 100644
--- a/gcc/testsuite/gcc.dg/spellcheck-stdint.c
+++ b/gcc/testsuite/gcc.dg/spellcheck-stdint.c
@@ -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 }
}
diff --git a/gcc/testsuite/gcc.dg/spellcheck-stdlib.c b/gcc/testsuite/gcc.dg/spellcheck-stdlib.c
index 7297a92..3459fad 100644
--- a/gcc/testsuite/gcc.dg/spellcheck-stdlib.c
+++ b/gcc/testsuite/gcc.dg/spellcheck-stdlib.c
@@ -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 } */