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);
}
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
// { 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 }
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. */
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.
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>
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 }
}
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 }
}
/* 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 } */
}
/* 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;
}
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;
}
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 }
}
/* 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 }
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>. */
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>. */
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>. */
/* 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 } */
}
/* 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 } */
}
/* 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 }
}
/* 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>. */
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>. */
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>. */
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>. */
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 } */