i386.c (ix86_function_versions): Use error + inform.
2013-08-12 Paolo Carlini <paolo.carlini@oracle.com> * config/i386/i386.c (ix86_function_versions): Use error + inform. /cp 2013-08-12 Paolo Carlini <paolo.carlini@oracle.com> * decl.c (warn_extern_redeclared_static, duplicate_decls, check_elaborated_type_specifier): Use error + inform. * friend.c (make_friend_class): Likewise. * semantics.c (finish_id_expression): Likewise. /testsuite 2013-08-12 Paolo Carlini <paolo.carlini@oracle.com> * g++.dg/cpp0x/constexpr-function2.C: Adjust for error -> inform changes. * g++.dg/cpp0x/constexpr-neg1.C: Likewise. * g++.dg/cpp0x/defaulted2.C: Likewise. * g++.dg/cpp0x/defaulted31.C: Likewise. * g++.dg/cpp0x/error6.C: Likewise. * g++.dg/cpp0x/gen-attrs-32.C: Likewise. * g++.dg/cpp0x/override2.C: Likewise. * g++.dg/cpp0x/parse1.C: Likewise. * g++.dg/cpp0x/scoped_enum.C: Likewise. * g++.dg/cpp0x/temp_default4.C: Likewise. * g++.dg/ext/attrib32.C: Likewise. * g++.dg/ext/gnu-inline-global-reject.C: Likewise. * g++.dg/ext/mv13.C: Likewise. * g++.dg/ext/mv7.C: Likewise. * g++.dg/ext/mv9.C: Likewise. * g++.dg/ext/pr57362.C: Likewise. * g++.dg/ext/typeof10.C: Likewise. * g++.dg/lookup/anon6.C: Likewise. * g++.dg/lookup/crash6.C: Likewise. * g++.dg/lookup/name-clash5.C: Likewise. * g++.dg/lookup/name-clash6.C: Likewise. * g++.dg/other/anon4.C: Likewise. * g++.dg/other/error15.C: Likewise. * g++.dg/other/error8.C: Likewise. * g++.dg/other/redecl2.C: Likewise. * g++.dg/parse/crash16.C: Likewise. * g++.dg/parse/crash21.C: Likewise. * g++.dg/parse/crash38.C: Likewise. * g++.dg/parse/redef2.C: Likewise. * g++.dg/parse/struct-as-enum1.C: Likewise. * g++.dg/template/crash39.C: Likewise. * g++.dg/template/redecl3.C: Likewise. * g++.dg/tls/diag-3.C: Likewise. * g++.dg/warn/Wredundant-decls-spec.C: Likewise. * g++.old-deja/g++.benjamin/typedef01.C: Likewise. * g++.old-deja/g++.benjamin/warn02.C: Likewise. * g++.old-deja/g++.brendan/crash16.C: Likewise. * g++.old-deja/g++.brendan/crash18.C: Likewise. * g++.old-deja/g++.brendan/err-msg4.C: Likewise. * g++.old-deja/g++.brendan/redecl1.C: Likewise. * g++.old-deja/g++.brendan/static3.C: Likewise. * g++.old-deja/g++.bugs/900127_02.C: Likewise. * g++.old-deja/g++.jason/binding.C: Likewise. * g++.old-deja/g++.jason/crash4.C: Likewise. * g++.old-deja/g++.jason/crash7.C: Likewise. * g++.old-deja/g++.jason/lineno.C: Likewise. * g++.old-deja/g++.jason/scoping7.C: Likewise. * g++.old-deja/g++.mike/misc3.C: Likewise. * g++.old-deja/g++.mike/net44.C: Likewise. * g++.old-deja/g++.mike/ns3.C: Likewise. * g++.old-deja/g++.ns/alias4.C: Likewise. * g++.old-deja/g++.ns/ns11.C: Likewise. * g++.old-deja/g++.other/crash23.C: Likewise. * g++.old-deja/g++.other/decl8.C: Likewise. * g++.old-deja/g++.other/linkage3.C: Likewise. * g++.old-deja/g++.other/typeck1.C: Likewise. * g++.old-deja/g++.other/typedef5.C: Likewise. * g++.old-deja/g++.pt/explicit34.C: Likewise. * g++.old-deja/g++.pt/friend36.C: Likewise. * obj-c++.dg/method-8.mm: Likewise. * obj-c++.dg/tls/diag-3.mm: Likewise. From-SVN: r201671
This commit is contained in:
parent
82ca21b50b
commit
2e507b9a99
68 changed files with 200 additions and 126 deletions
|
@ -1,3 +1,7 @@
|
|||
2013-08-12 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
* config/i386/i386.c (ix86_function_versions): Use error + inform.
|
||||
|
||||
2013-08-12 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* config/i386/i386.md (floatunssi<mode>2 expand): Use MODEF mode
|
||||
|
|
|
@ -29870,8 +29870,8 @@ ix86_function_versions (tree fn1, tree fn2)
|
|||
error_at (DECL_SOURCE_LOCATION (fn2),
|
||||
"missing %<target%> attribute for multi-versioned %D",
|
||||
fn2);
|
||||
error_at (DECL_SOURCE_LOCATION (fn1),
|
||||
"previous declaration of %D", fn1);
|
||||
inform (DECL_SOURCE_LOCATION (fn1),
|
||||
"previous declaration of %D", fn1);
|
||||
/* Prevent diagnosing of the same error multiple times. */
|
||||
DECL_ATTRIBUTES (fn2)
|
||||
= tree_cons (get_identifier ("target"),
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
2013-08-12 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
* decl.c (warn_extern_redeclared_static, duplicate_decls,
|
||||
check_elaborated_type_specifier): Use error + inform.
|
||||
* friend.c (make_friend_class): Likewise.
|
||||
* semantics.c (finish_id_expression): Likewise.
|
||||
|
||||
2013-08-09 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
Revert:
|
||||
|
|
|
@ -1146,8 +1146,9 @@ warn_extern_redeclared_static (tree newdecl, tree olddecl)
|
|||
&& DECL_ARTIFICIAL (olddecl))
|
||||
return;
|
||||
|
||||
permerror (input_location, "%qD was declared %<extern%> and later %<static%>", newdecl);
|
||||
permerror (input_location, "previous declaration of %q+D", olddecl);
|
||||
if (permerror (input_location,
|
||||
"%qD was declared %<extern%> and later %<static%>", newdecl))
|
||||
inform (input_location, "previous declaration of %q+D", olddecl);
|
||||
}
|
||||
|
||||
/* NEW_DECL is a redeclaration of OLD_DECL; both are functions or
|
||||
|
@ -1287,19 +1288,19 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
|
|||
&& DECL_UNINLINABLE (olddecl)
|
||||
&& lookup_attribute ("noinline", DECL_ATTRIBUTES (olddecl)))
|
||||
{
|
||||
warning (OPT_Wattributes, "function %q+D redeclared as inline",
|
||||
newdecl);
|
||||
warning (OPT_Wattributes, "previous declaration of %q+D "
|
||||
"with attribute noinline", olddecl);
|
||||
if (warning (OPT_Wattributes, "function %q+D redeclared as inline",
|
||||
newdecl))
|
||||
inform (input_location, "previous declaration of %q+D "
|
||||
"with attribute noinline", olddecl);
|
||||
}
|
||||
else if (DECL_DECLARED_INLINE_P (olddecl)
|
||||
&& DECL_UNINLINABLE (newdecl)
|
||||
&& lookup_attribute ("noinline", DECL_ATTRIBUTES (newdecl)))
|
||||
{
|
||||
warning (OPT_Wattributes, "function %q+D redeclared with "
|
||||
"attribute noinline", newdecl);
|
||||
warning (OPT_Wattributes, "previous declaration of %q+D was inline",
|
||||
olddecl);
|
||||
if (warning (OPT_Wattributes, "function %q+D redeclared with "
|
||||
"attribute noinline", newdecl))
|
||||
inform (input_location, "previous declaration of %q+D was inline",
|
||||
olddecl);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1485,7 +1486,7 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
|
|||
error ("%q#D redeclared as different kind of symbol", newdecl);
|
||||
if (TREE_CODE (olddecl) == TREE_LIST)
|
||||
olddecl = TREE_VALUE (olddecl);
|
||||
error ("previous declaration of %q+#D", olddecl);
|
||||
inform (input_location, "previous declaration of %q+#D", olddecl);
|
||||
|
||||
return error_mark_node;
|
||||
}
|
||||
|
@ -1550,7 +1551,8 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
|
|||
else
|
||||
{
|
||||
error ("conflicting declaration %q#D", newdecl);
|
||||
error ("%q+D has a previous declaration as %q#D", olddecl, olddecl);
|
||||
inform (input_location,
|
||||
"%q+D has a previous declaration as %q#D", olddecl, olddecl);
|
||||
return error_mark_node;
|
||||
}
|
||||
}
|
||||
|
@ -1613,9 +1615,10 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
|
|||
{
|
||||
error_at (DECL_SOURCE_LOCATION (newdecl), errmsg, newdecl);
|
||||
if (DECL_NAME (olddecl) != NULL_TREE)
|
||||
error ((DECL_INITIAL (olddecl) && namespace_bindings_p ())
|
||||
? G_("%q+#D previously defined here")
|
||||
: G_("%q+#D previously declared here"), olddecl);
|
||||
inform (input_location,
|
||||
(DECL_INITIAL (olddecl) && namespace_bindings_p ())
|
||||
? G_("%q+#D previously defined here")
|
||||
: G_("%q+#D previously declared here"), olddecl);
|
||||
return error_mark_node;
|
||||
}
|
||||
else if (TREE_CODE (olddecl) == FUNCTION_DECL
|
||||
|
@ -1759,8 +1762,10 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
|
|||
&& (! DECL_TEMPLATE_SPECIALIZATION (newdecl)
|
||||
|| DECL_TEMPLATE_SPECIALIZATION (olddecl)))
|
||||
{
|
||||
warning (OPT_Wredundant_decls, "redundant redeclaration of %qD in same scope", newdecl);
|
||||
warning (OPT_Wredundant_decls, "previous declaration of %q+D", olddecl);
|
||||
if (warning (OPT_Wredundant_decls,
|
||||
"redundant redeclaration of %qD in same scope",
|
||||
newdecl))
|
||||
inform (input_location, "previous declaration of %q+D", olddecl);
|
||||
}
|
||||
|
||||
if (!(DECL_TEMPLATE_INSTANTIATION (olddecl)
|
||||
|
@ -11836,14 +11841,14 @@ check_elaborated_type_specifier (enum tag_types tag_code,
|
|||
&& tag_code != typename_type)
|
||||
{
|
||||
error ("%qT referred to as %qs", type, tag_name (tag_code));
|
||||
error ("%q+T has a previous declaration here", type);
|
||||
inform (input_location, "%q+T has a previous declaration here", type);
|
||||
return error_mark_node;
|
||||
}
|
||||
else if (TREE_CODE (type) != ENUMERAL_TYPE
|
||||
&& tag_code == enum_type)
|
||||
{
|
||||
error ("%qT referred to as enum", type);
|
||||
error ("%q+T has a previous declaration here", type);
|
||||
inform (input_location, "%q+T has a previous declaration here", type);
|
||||
return error_mark_node;
|
||||
}
|
||||
else if (!allow_template_p
|
||||
|
|
|
@ -327,7 +327,7 @@ make_friend_class (tree type, tree friend_type, bool complain)
|
|||
{
|
||||
error ("%qT is not a member class template of %qT",
|
||||
name, ctype);
|
||||
error ("%q+D declared here", decl);
|
||||
inform (input_location, "%q+D declared here", decl);
|
||||
return;
|
||||
}
|
||||
if (!template_member_p && (TREE_CODE (decl) != TYPE_DECL
|
||||
|
@ -335,7 +335,7 @@ make_friend_class (tree type, tree friend_type, bool complain)
|
|||
{
|
||||
error ("%qT is not a nested class of %qT",
|
||||
name, ctype);
|
||||
error ("%q+D declared here", decl);
|
||||
inform (input_location, "%q+D declared here", decl);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -3131,7 +3131,7 @@ finish_id_expression (tree id_expression,
|
|||
error (VAR_P (decl)
|
||||
? G_("use of local variable with automatic storage from containing function")
|
||||
: G_("use of parameter from containing function"));
|
||||
error (" %q+#D declared here", decl);
|
||||
inform (input_location, "%q+#D declared here", decl);
|
||||
return error_mark_node;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,68 @@
|
|||
2013-08-12 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
* g++.dg/cpp0x/constexpr-function2.C: Adjust for error -> inform
|
||||
changes.
|
||||
* g++.dg/cpp0x/constexpr-neg1.C: Likewise.
|
||||
* g++.dg/cpp0x/defaulted2.C: Likewise.
|
||||
* g++.dg/cpp0x/defaulted31.C: Likewise.
|
||||
* g++.dg/cpp0x/error6.C: Likewise.
|
||||
* g++.dg/cpp0x/gen-attrs-32.C: Likewise.
|
||||
* g++.dg/cpp0x/override2.C: Likewise.
|
||||
* g++.dg/cpp0x/parse1.C: Likewise.
|
||||
* g++.dg/cpp0x/scoped_enum.C: Likewise.
|
||||
* g++.dg/cpp0x/temp_default4.C: Likewise.
|
||||
* g++.dg/ext/attrib32.C: Likewise.
|
||||
* g++.dg/ext/gnu-inline-global-reject.C: Likewise.
|
||||
* g++.dg/ext/mv13.C: Likewise.
|
||||
* g++.dg/ext/mv7.C: Likewise.
|
||||
* g++.dg/ext/mv9.C: Likewise.
|
||||
* g++.dg/ext/pr57362.C: Likewise.
|
||||
* g++.dg/ext/typeof10.C: Likewise.
|
||||
* g++.dg/lookup/anon6.C: Likewise.
|
||||
* g++.dg/lookup/crash6.C: Likewise.
|
||||
* g++.dg/lookup/name-clash5.C: Likewise.
|
||||
* g++.dg/lookup/name-clash6.C: Likewise.
|
||||
* g++.dg/other/anon4.C: Likewise.
|
||||
* g++.dg/other/error15.C: Likewise.
|
||||
* g++.dg/other/error8.C: Likewise.
|
||||
* g++.dg/other/redecl2.C: Likewise.
|
||||
* g++.dg/parse/crash16.C: Likewise.
|
||||
* g++.dg/parse/crash21.C: Likewise.
|
||||
* g++.dg/parse/crash38.C: Likewise.
|
||||
* g++.dg/parse/redef2.C: Likewise.
|
||||
* g++.dg/parse/struct-as-enum1.C: Likewise.
|
||||
* g++.dg/template/crash39.C: Likewise.
|
||||
* g++.dg/template/redecl3.C: Likewise.
|
||||
* g++.dg/tls/diag-3.C: Likewise.
|
||||
* g++.dg/warn/Wredundant-decls-spec.C: Likewise.
|
||||
* g++.old-deja/g++.benjamin/typedef01.C: Likewise.
|
||||
* g++.old-deja/g++.benjamin/warn02.C: Likewise.
|
||||
* g++.old-deja/g++.brendan/crash16.C: Likewise.
|
||||
* g++.old-deja/g++.brendan/crash18.C: Likewise.
|
||||
* g++.old-deja/g++.brendan/err-msg4.C: Likewise.
|
||||
* g++.old-deja/g++.brendan/redecl1.C: Likewise.
|
||||
* g++.old-deja/g++.brendan/static3.C: Likewise.
|
||||
* g++.old-deja/g++.bugs/900127_02.C: Likewise.
|
||||
* g++.old-deja/g++.jason/binding.C: Likewise.
|
||||
* g++.old-deja/g++.jason/crash4.C: Likewise.
|
||||
* g++.old-deja/g++.jason/crash7.C: Likewise.
|
||||
* g++.old-deja/g++.jason/lineno.C: Likewise.
|
||||
* g++.old-deja/g++.jason/scoping7.C: Likewise.
|
||||
* g++.old-deja/g++.mike/misc3.C: Likewise.
|
||||
* g++.old-deja/g++.mike/net44.C: Likewise.
|
||||
* g++.old-deja/g++.mike/ns3.C: Likewise.
|
||||
* g++.old-deja/g++.ns/alias4.C: Likewise.
|
||||
* g++.old-deja/g++.ns/ns11.C: Likewise.
|
||||
* g++.old-deja/g++.other/crash23.C: Likewise.
|
||||
* g++.old-deja/g++.other/decl8.C: Likewise.
|
||||
* g++.old-deja/g++.other/linkage3.C: Likewise.
|
||||
* g++.old-deja/g++.other/typeck1.C: Likewise.
|
||||
* g++.old-deja/g++.other/typedef5.C: Likewise.
|
||||
* g++.old-deja/g++.pt/explicit34.C: Likewise.
|
||||
* g++.old-deja/g++.pt/friend36.C: Likewise.
|
||||
* obj-c++.dg/method-8.mm: Likewise.
|
||||
* obj-c++.dg/tls/diag-3.mm: Likewise.
|
||||
|
||||
2013-08-12 Perez Read <netfirewall@gmail.com>
|
||||
|
||||
PR target/58132
|
||||
|
|
|
@ -38,7 +38,7 @@ constexpr int g(int x, int n) // error: body not just ‘‘return expr’’
|
|||
} // { dg-error "not a return-statement" }
|
||||
|
||||
constexpr int
|
||||
bar(int x, int y) { return x + y + x * y; } // { dg-error "previously" }
|
||||
bar(int x, int y) { return x + y + x * y; } // { dg-message "previously" }
|
||||
|
||||
int bar(int x, int y) // { dg-error "redefinition" }
|
||||
{ return x * 2 + 3 * y; }
|
||||
|
|
|
@ -50,7 +50,7 @@ private:
|
|||
bool flag;
|
||||
};
|
||||
// OK
|
||||
constexpr int bar(int x, int y) // { dg-error "previously defined here" }
|
||||
constexpr int bar(int x, int y) // { dg-message "previously defined here" }
|
||||
{ return x + y + x*y; }
|
||||
// ...
|
||||
// error: redefinition of bar
|
||||
|
|
|
@ -6,13 +6,13 @@ void f() = delete; // { dg-error "deleted" }
|
|||
|
||||
struct A
|
||||
{
|
||||
A() { } // { dg-error "previous" }
|
||||
A() { } // { dg-message "previous" }
|
||||
void f() = default; // { dg-error "default" }
|
||||
};
|
||||
|
||||
A::A() = default; // { dg-error "redefinition" }
|
||||
|
||||
void g() {} // { dg-error "previous" }
|
||||
void g() {} // { dg-message "previous" }
|
||||
void g() = delete; // { dg-error "redefinition" }
|
||||
|
||||
struct B // { dg-message "user-provided default constructor" }
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
struct A
|
||||
{
|
||||
A() { } // { dg-error "defined" }
|
||||
A() { } // { dg-message "defined" }
|
||||
~A() = default; // { dg-error "defaulted" }
|
||||
};
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// { dg-options -std=c++0x }
|
||||
|
||||
template<typename C>
|
||||
auto g(C& c) -> decltype (c.f()) { return c.f(); } // { dg-error "decltype .c\\.f" }
|
||||
auto g(C& c) -> decltype (c.f()) { return c.f(); } // { dg-message "decltype .c\\.f" }
|
||||
|
||||
template<typename C>
|
||||
auto g(C& c) -> decltype (c.f()) { return c.f(); } // { dg-error "decltype .c\\.f" }
|
||||
|
|
|
@ -13,7 +13,7 @@ void bar()
|
|||
|
||||
typedef union U1 { int i; } U2 [[gnu::transparent_union]]; // { dg-warning "ignored" }
|
||||
|
||||
static void foo2(U1) {} // { dg-error "previously defined" }
|
||||
static void foo2(U1) {} // { dg-message "previously defined" }
|
||||
static void foo2(U2) {} // { dg-error "redefinition" }
|
||||
|
||||
void bar2(U1 u1, U2 u2)
|
||||
|
|
|
@ -44,7 +44,7 @@ int main()
|
|||
B2 final2 = final;
|
||||
struct B2 {}; // { dg-error "redefinition" }
|
||||
struct B2 final; // { dg-error "redeclaration" }
|
||||
struct B2 override; // { dg-error "previously declared here" }
|
||||
struct B2 override; // { dg-message "previously declared here" }
|
||||
struct B2 final {}; // { dg-error "redefinition" }
|
||||
struct B2 override {}; // { dg-error "cannot specify 'override' for a class" }
|
||||
B2 override{}; // { dg-error "redeclaration" }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// PR c++/43509
|
||||
// { dg-options "-std=c++0x" }
|
||||
|
||||
typedef int B; // { dg-error "" }
|
||||
typedef int B; // { dg-message "" }
|
||||
B::B() {} // { dg-error "" }
|
||||
|
|
|
@ -6,7 +6,7 @@ enum class Color1 {
|
|||
};
|
||||
|
||||
enum struct Color2 {
|
||||
Red, // { dg-error "previously declared here" }
|
||||
Red, // { dg-message "previously declared here" }
|
||||
Orange,
|
||||
Yellow,
|
||||
Green,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class X {
|
||||
template<typename T = int> friend void f(X) { }
|
||||
template<typename T> friend void g(X); // { dg-error "previously declared here" }
|
||||
template<typename T> friend void g(X); // { dg-message "previously declared here" }
|
||||
template<typename T = int> friend void h(X); // { dg-error "function template friend" }
|
||||
};
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ void bar()
|
|||
|
||||
typedef union U1 { int i; } U2 __attribute__((transparent_union)); // { dg-warning "ignored" }
|
||||
|
||||
static void foo2(U1) {} // { dg-error "previously defined" }
|
||||
static void foo2(U1) {} // { dg-message "previously defined" }
|
||||
static void foo2(U2) {} // { dg-error "redefinition" }
|
||||
|
||||
void bar2(U1 u1, U2 u2)
|
||||
|
|
|
@ -10,47 +10,47 @@
|
|||
|
||||
#undef fn
|
||||
#define fn pfx(func_decl_inline_before)
|
||||
decl(inline, fn) // { dg-error "previous" "" }
|
||||
decl(inline, fn) // { dg-message "previous" "" }
|
||||
gnuindef(fn, 0) // { dg-error "redeclared" "" }
|
||||
|
||||
#undef fn
|
||||
#define fn pfx(func_decl_inline_after)
|
||||
gnuindef(fn, 0) // { dg-error "previous" "" }
|
||||
gnuindef(fn, 0) // { dg-message "previous" "" }
|
||||
decl(inline, fn) // { dg-error "redeclared" "" }
|
||||
|
||||
#undef fn
|
||||
#define fn pfx(func_def_gnuin_redef)
|
||||
gnuindef(fn, 0) // { dg-error "previous" "" }
|
||||
gnuindef(fn, 0) // { dg-message "previous" "" }
|
||||
gnuindef(fn, 1) // { dg-error "redefinition" "" }
|
||||
|
||||
#undef fn
|
||||
#define fn pfx(func_def_inline_redef)
|
||||
def(inline, fn, 0) // { dg-error "previous" "" }
|
||||
def(inline, fn, 0) // { dg-message "previous" "" }
|
||||
def(inline, fn, 1) // { dg-error "redefinition" "" }
|
||||
|
||||
#undef fn
|
||||
#define fn pfx(func_def_inline_after)
|
||||
gnuindef(fn, 0) // { dg-error "previous" "" }
|
||||
gnuindef(fn, 0) // { dg-message "previous" "" }
|
||||
def(inline, fn, 1) // { dg-error "redeclare" "" }
|
||||
|
||||
#undef fn
|
||||
#define fn pfx(func_def_inline_before)
|
||||
def(inline, fn, 0) // { dg-error "previous" "" }
|
||||
def(inline, fn, 0) // { dg-message "previous" "" }
|
||||
gnuindef(fn, 1) // { dg-error "redefinition" "" }
|
||||
|
||||
#undef fn
|
||||
#define fn pfx(func_def_before)
|
||||
def(, fn, 0) // { dg-error "previous" "" }
|
||||
def(, fn, 0) // { dg-message "previous" "" }
|
||||
gnuindef(fn, 1) // { dg-error "redefinition" "" }
|
||||
|
||||
#undef fn
|
||||
#define fn pfx(func_decl_static_inline_before)
|
||||
decl(static inline, fn) // { dg-error "previous" "" }
|
||||
decl(static inline, fn) // { dg-message "previous" "" }
|
||||
gnuindef(fn, 0) // { dg-error "redeclared" "" }
|
||||
|
||||
#undef fn
|
||||
#define fn pfx(func_def_static_inline_after)
|
||||
decl(static, fn)
|
||||
gnuindef(fn, 0) // { dg-error "previous" "" }
|
||||
gnuindef(fn, 0) // { dg-message "previous" "" }
|
||||
decl(static, fn)
|
||||
def(static inline, fn, 1) // { dg-error "redeclare" "" }
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
extern "C"
|
||||
__attribute__ ((target ("default")))
|
||||
int foo () // { dg-error "previously defined here" }
|
||||
int foo () // { dg-message "previously defined here" }
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// { dg-options "" }
|
||||
|
||||
__attribute__((target ("default")))
|
||||
void foo (void) // { dg-error "previously defined here" }
|
||||
void foo (void) // { dg-message "previously defined here" }
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
void foo ();
|
||||
void foo () __attribute__((target ("sse4")));
|
||||
void foo () __attribute__((target ("default"))); // { dg-error "previous declaration" }
|
||||
void foo () __attribute__((target ("default"))); // { dg-message "previous declaration" }
|
||||
void foo () // { dg-error "attribute for multi-versioned" }
|
||||
{
|
||||
}
|
||||
|
|
|
@ -193,7 +193,6 @@ int foo(void) { return 1; }
|
|||
}
|
||||
|
||||
/* { dg-prune-output "attribute.* is unknown" } */
|
||||
/* { dg-prune-output "redefinition of int foo" } */
|
||||
/* { dg-prune-output "previous declaration of int foo" } */
|
||||
/* { dg-prune-output "int foo.* previously defined here" } */
|
||||
/* { dg-prune-output "missing 'target' attribute*" } */
|
||||
/* { dg-prune-output "redefinition of 'int foo" } */
|
||||
/* { dg-prune-output "No dispatcher found for" } */
|
||||
|
|
|
@ -5,7 +5,7 @@ template<int> struct A
|
|||
{
|
||||
void foo()
|
||||
{
|
||||
typedef int T; // { dg-error "previous" }
|
||||
typedef int T; // { dg-message "previous" }
|
||||
typedef __typeof__(*this) T; // { dg-error "conflicting" }
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
extern int v1; // { dg-error "declared" }
|
||||
extern int v1; // { dg-message "declared" }
|
||||
static union { int v1; }; // { dg-error "redeclaration" }
|
||||
|
||||
static union { int v2; }; // { dg-error "declared" }
|
||||
static union { int v2; }; // { dg-message "declared" }
|
||||
extern int v2; // { dg-error "redeclaration" }
|
||||
|
||||
int v3; // { dg-error "declared" }
|
||||
int v3; // { dg-message "declared" }
|
||||
static union { int v3; }; // { dg-error "redeclaration" }
|
||||
|
||||
static union { int v4; }; // { dg-error "declared" }
|
||||
static union { int v4; }; // { dg-message "declared" }
|
||||
static union { int v4; }; // { dg-error "redeclaration" }
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
|
||||
// PR c++/18652: ICE redeclaring variable as template.
|
||||
|
||||
int A; // { dg-error "previous declaration" }
|
||||
int A; // { dg-message "previous declaration" }
|
||||
template<int> struct A; // { dg-error "different kind of symbol" }
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
// declarative region (7.3.2, clause 14). ]"
|
||||
|
||||
namespace N
|
||||
{ // { dg-error "previous declaration" }
|
||||
{ // { dg-message "previous declaration" }
|
||||
}
|
||||
|
||||
class N; // { dg-error "redeclared" }
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
// "[Note: a namespace name or a class template name must be unique in its
|
||||
// declarative region (7.3.2, clause 14). ]"
|
||||
|
||||
class N; // { dg-error "previous declaration" }
|
||||
class N; // { dg-message "previous declaration" }
|
||||
|
||||
namespace N
|
||||
{ // { dg-error "redeclared" }
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
|
||||
void foo()
|
||||
{
|
||||
int i; // { dg-error "previously" }
|
||||
int i; // { dg-message "previously" }
|
||||
union { int i; }; // { dg-error "redeclaration" }
|
||||
}
|
||||
|
|
|
@ -3,39 +3,39 @@
|
|||
extern void g0 (int a, int b);
|
||||
extern void g1 (int a, float b);
|
||||
|
||||
extern void f0 (int a, // { dg-error "previous" }
|
||||
extern void f0 (int a, // { dg-message "previous" }
|
||||
int a); // { dg-error "redefinition" }
|
||||
extern void f1 (int a, // { dg-error "previous" }
|
||||
extern void f1 (int a, // { dg-message "previous" }
|
||||
float a); // { dg-error "conflicting" }
|
||||
extern void f3 (int a, int b, int c, // { dg-error "previous" }
|
||||
extern void f3 (int a, int b, int c, // { dg-message "previous" }
|
||||
int a); // { dg-error "redefinition" }
|
||||
extern void f4 (int a, int b, int c, // { dg-error "previous" }
|
||||
extern void f4 (int a, int b, int c, // { dg-message "previous" }
|
||||
int a, // { dg-error "redefinition" }
|
||||
int a); // { dg-error "redefinition" }
|
||||
extern void f5 (int a, int b, int c, int d, int e, int f, int g, int h, // { dg-error "previous" }
|
||||
extern void f5 (int a, int b, int c, int d, int e, int f, int g, int h, // { dg-message "previous" }
|
||||
int a, // { dg-error "redefinition" }
|
||||
int i, int j, int k, int l, int m, int n, int o, int p,
|
||||
int q, int r, int s, int t, int u, int v, int w, int x, int y,
|
||||
int z);
|
||||
|
||||
extern void f6 (int a, int, int, int, int, int, int, int, int, int, int, // { dg-error "previous" }
|
||||
extern void f6 (int a, int, int, int, int, int, int, int, int, int, int, // { dg-message "previous" }
|
||||
int a, // { dg-error "redefinition" }
|
||||
int, int, int, int, int, int, int, int, int, int, int,
|
||||
float, float, float, float, float, float, float, float,
|
||||
int);
|
||||
|
||||
extern void f7 (void (*a)(int), // { dg-error "previous" }
|
||||
extern void f7 (void (*a)(int), // { dg-message "previous" }
|
||||
void (*a)(int)); // { dg-error "redefinition" }
|
||||
extern void f8 (float (*a)(int), // { dg-error "previous" }
|
||||
extern void f8 (float (*a)(int), // { dg-message "previous" }
|
||||
int (*a)(float)); // { dg-error "conflicting" }
|
||||
|
||||
extern void f9 (int a, // { dg-error "previous" }
|
||||
extern void f9 (int a, // { dg-message "previous" }
|
||||
int a, // { dg-error "redefinition" }
|
||||
int a); // { dg-error "redefinition" }
|
||||
|
||||
extern void f10 (int a, // { dg-error "previous" }
|
||||
int b, // { dg-error "previous" }
|
||||
int c, // { dg-error "previous" }
|
||||
extern void f10 (int a, // { dg-message "previous" }
|
||||
int b, // { dg-message "previous" }
|
||||
int c, // { dg-message "previous" }
|
||||
int c, // { dg-error "redefinition" }
|
||||
int b, // { dg-error "redefinition" }
|
||||
int a); // { dg-error "redefinition" }
|
||||
|
@ -43,7 +43,7 @@ extern void f10 (int a, // { dg-error "previous" }
|
|||
class C1 {
|
||||
public:
|
||||
void C1_g0 (int a, int b);
|
||||
void C1_f0 (int a, // { dg-error "previous" }
|
||||
void C1_f0 (int a, // { dg-message "previous" }
|
||||
int a); // { dg-error "redefinition" }
|
||||
};
|
||||
|
||||
|
@ -51,6 +51,6 @@ template <class T>
|
|||
class C2 {
|
||||
public:
|
||||
void C2_g0 (T a, T b);
|
||||
void C2_f0 (T a, // { dg-error "previous" }
|
||||
void C2_f0 (T a, // { dg-message "previous" }
|
||||
T a); // { dg-error "redefinition" }
|
||||
};
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
void foo(void)
|
||||
{
|
||||
union { int alpha; int beta; }; // { dg-error "previous declaration" }
|
||||
union { int alpha; int beta; }; // { dg-message "previous declaration" }
|
||||
double alpha; // { dg-error "conflicting declaration" }
|
||||
}
|
||||
|
||||
|
|
|
@ -7,5 +7,5 @@ struct S {
|
|||
virtual int foo() = 0;
|
||||
};
|
||||
|
||||
int S::foo() { return 0; } // { dg-error "defined here" }
|
||||
int S::foo() { return 0; } // { dg-message "defined here" }
|
||||
int S::foo() { return 0; } // { dg-error "redefinition" }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// PR c++/16971
|
||||
|
||||
namespace N {
|
||||
int i; // { dg-error "" }
|
||||
int i; // { dg-message "" }
|
||||
// By checking for an explicit keyword on the next line we avoid
|
||||
// matching an ICE message.
|
||||
int i; // { dg-error "redefinition" }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
namespace N
|
||||
{
|
||||
struct A; // { dg-error "previous declaration" "" }
|
||||
struct A; // { dg-message "previous declaration" "" }
|
||||
}
|
||||
|
||||
template<int I>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
/* PR c++/33207 */
|
||||
|
||||
/* This would not ICE. */
|
||||
namespace M { } /* { dg-error "previous declaration" } */
|
||||
namespace M { } /* { dg-message "previous declaration" } */
|
||||
struct M; /* { dg-error "redeclared as different kind of symbol" } */
|
||||
M *p; /* { dg-error "does not name a type" } */
|
||||
|
||||
/* This would ICE when processing 'p'. */
|
||||
namespace N { } /* { dg-error "previous declaration" } */
|
||||
namespace N { } /* { dg-message "previous declaration" } */
|
||||
struct N; /* { dg-error "redeclared as different kind of symbol" } */
|
||||
struct N* p; /* { dg-error "redeclared as different kind of symbol|invalid type" } */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// { dg-do compile }
|
||||
|
||||
char * d [10]; // { dg-error "8: 'd' has a previous declaration as" }
|
||||
char * d [10]; // { dg-message "8: 'd' has a previous declaration as" }
|
||||
char e [15][10];
|
||||
int (*f)();
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace N
|
||||
{
|
||||
struct A {}; // { dg-error "previous declaration" }
|
||||
struct A {}; // { dg-message "previous declaration" }
|
||||
}
|
||||
|
||||
typedef enum N::A B; // { dg-error "enum|invalid type" }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// PR c++/22405
|
||||
|
||||
template <typename T> void foo(T &arg) { // { dg-error "declared" }
|
||||
template <typename T> void foo(T &arg) { // { dg-message "declared" }
|
||||
arg+=1;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
|
||||
// { dg-do compile }
|
||||
|
||||
int foo; // { dg-error "previous declaration" }
|
||||
int foo; // { dg-message "previous declaration" }
|
||||
template<int> void foo() {} // { dg-error "redeclared" }
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// Report invalid extern and __thread combinations.
|
||||
// { dg-require-effective-target tls }
|
||||
|
||||
extern int j; // { dg-error "previously declared here" }
|
||||
extern int j; // { dg-message "previously declared here" }
|
||||
__thread int j; // { dg-error "follows non-thread-local" }
|
||||
|
||||
extern __thread int i; // { dg-error "previously declared here" }
|
||||
extern __thread int i; // { dg-message "previously declared here" }
|
||||
int i; // { dg-error "follows thread-local" }
|
||||
|
||||
extern __thread int k; // This is fine.
|
||||
|
|
|
@ -8,5 +8,5 @@ template <typename T> struct S
|
|||
|
||||
template<> void S<int>::foo();
|
||||
|
||||
template<> void S<double>::foo(); // { dg-warning "previous declaration" }
|
||||
template<> void S<double>::foo(); // { dg-message "previous declaration" }
|
||||
template<> void S<double>::foo(); // { dg-warning "redundant redeclaration" }
|
||||
|
|
|
@ -16,7 +16,7 @@ typedef int I;
|
|||
typedef I I;
|
||||
|
||||
//p3--cannot redefine to a different type in a given scope
|
||||
class complex2 { /* ... */ };// { dg-error "" } .*
|
||||
class complex2 { /* ... */ };// { dg-message "" } .*
|
||||
typedef int complex2;// { dg-error "" } .*
|
||||
typedef int complex3;// { dg-message "" } .*
|
||||
class complex3 { /* ... */ };// { dg-error "" } .*
|
||||
|
|
|
@ -44,11 +44,5 @@ public:
|
|||
int b;
|
||||
};
|
||||
|
||||
extern int foo3(const char *); // { dg-message "" }
|
||||
extern int foo3(const char *); // { dg-warning "" }
|
||||
extern int foo3(const char *); // { dg-warning "" }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
class Graph { // { dg-error "1:new types|1: note: \\(perhaps" }
|
||||
public:
|
||||
unsigned char N;
|
||||
Graph(void) {} // { dg-error "7:'Graph" }
|
||||
Graph(void) {} // { dg-message "7:'Graph" }
|
||||
}
|
||||
|
||||
Graph::Graph(void) // { dg-error "18:return type|1: error: redefinition" }
|
||||
|
|
|
@ -7,7 +7,7 @@ public:
|
|||
Pix(const Pix&);
|
||||
|
||||
// Friend functions so that v == x works as does x == v works
|
||||
friend int operator==(void *v, const Pix& x) // { dg-error "previously" }
|
||||
friend int operator==(void *v, const Pix& x) // { dg-message "previously" }
|
||||
{ return v == index; } // { dg-error "from this location" }
|
||||
// ??? should be operator!=
|
||||
friend int operator==(void *v, const Pix& x) // { dg-error "redefinition" }
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
// GROUPS passed error-messages
|
||||
class X {
|
||||
public:
|
||||
static int x;// { dg-error "" } previous.*
|
||||
static int y;// { dg-error "" } previous.*
|
||||
static int x;// { dg-message "" } previous.*
|
||||
static int y;// { dg-message "" } previous.*
|
||||
};
|
||||
|
||||
unsigned X::x;// { dg-error "" } conflict.*
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// { dg-do assemble }
|
||||
// GROUPS passed redeclaration
|
||||
inline int min(int x, int y) {return x < y ? x : y;} /* 235 */// { dg-error "" } .*
|
||||
inline int min(int x, int y) {return x < y ? x : y;} /* 235 */// { dg-message "" } .*
|
||||
int min(int a, int b);
|
||||
inline int min(int a, int b) {return (a < b)?a:b;}// { dg-error "" } .*
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
class foo{
|
||||
public:
|
||||
static void bar( int i ){ value = i; }
|
||||
static int value;// { dg-error "" } .*
|
||||
static int value;// { dg-message "" } .*
|
||||
};
|
||||
|
||||
const int foo::value = 0; // should be an error.// { dg-error "" } .*
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
|
||||
// keywords: name spaces, overloading
|
||||
|
||||
int global0; // { dg-error "" }
|
||||
int global0; // { dg-message "" }
|
||||
int global0 (); // { dg-error "" }
|
||||
|
||||
int global1 (); // { dg-error "" } xref for below
|
||||
int global1 (); // { dg-message "" } xref for below
|
||||
int global1; // { dg-error "" } caught
|
||||
|
||||
struct struct_0 {
|
||||
|
@ -34,13 +34,13 @@ struct struct_1 {
|
|||
|
||||
void function_0 ()
|
||||
{
|
||||
int function_0_local; // { dg-error "" }
|
||||
int function_0_local; // { dg-message "" }
|
||||
extern int function_0_local (); // { dg-error "" }
|
||||
}
|
||||
|
||||
void function_1 ()
|
||||
{
|
||||
int function_1_local (); // { dg-error "" }
|
||||
int function_1_local (); // { dg-message "" }
|
||||
extern int function_1_local; // { dg-error "" }
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ struct T { ~T(); };
|
|||
int main()
|
||||
{
|
||||
foo:
|
||||
T t; // { dg-error "" } redeclared
|
||||
T t; // { dg-message "" } redeclared
|
||||
bar:
|
||||
T t; // { dg-error "" } redeclaration
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ public:
|
|||
};
|
||||
|
||||
template <class T>
|
||||
const ccObjectInfo& cc_Array<T>::repInvariant(int) const // { dg-error "previously declared" }
|
||||
const ccObjectInfo& cc_Array<T>::repInvariant(int) const // { dg-message "previously declared" }
|
||||
{ return *this /* *this is required here */; }
|
||||
|
||||
template <class T>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// { dg-do assemble }
|
||||
// Bug: g++ can't deal.
|
||||
|
||||
typedef unsigned size_t; // { dg-error "" } previous declaration
|
||||
typedef unsigned size_t; // { dg-message "" } previous declaration
|
||||
typedef unsigned long size_t; // { dg-error "" } redefining size_t
|
||||
void f (size_t); // causes compiler segfault -
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// { dg-do assemble }
|
||||
// Bug; g++ binds a function definition to the line number of a later decl.
|
||||
|
||||
void foo () { } // { dg-error "" } redeclared
|
||||
void foo () { } // { dg-message "" } redeclared
|
||||
void foo (); // { dg-bogus "" } invalid binding
|
||||
void foo () { } // { dg-error "" } redeclared
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
// Bug: g++ doesn't flag name collisions between types and non-types as
|
||||
// errors. It shouldn't for class names, but it should for typedefs.
|
||||
|
||||
int bar; // { dg-error "" }
|
||||
int bar; // { dg-message "" }
|
||||
typedef int bar; // { dg-error "" }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// { dg-do assemble }
|
||||
// GROUPS uncaught
|
||||
int a;// { dg-error "" } .*
|
||||
int a;// { dg-message "" } .*
|
||||
int a;// { dg-error "" } .*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// { dg-do assemble }
|
||||
// Make sure we don't dump core
|
||||
|
||||
enum request { q, w, e}; // { dg-error "" }
|
||||
enum request { q, w, e}; // { dg-message "" }
|
||||
|
||||
class request { // { dg-error "" }
|
||||
public:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// { dg-do assemble }
|
||||
int i; // { dg-error "" }
|
||||
int i; // { dg-message "" }
|
||||
|
||||
namespace i { // { dg-error "" }
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace D { // { dg-error "" } reopening namespace with alias
|
|||
void f();
|
||||
}
|
||||
|
||||
void C::f(){} // { dg-error "" } previous definition
|
||||
void C::f(){} // { dg-message "" } previous definition
|
||||
|
||||
void D::f(){} // { dg-error "" } redefinition
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
namespace A{
|
||||
void f(int);
|
||||
void f(int,int);
|
||||
int i; // { dg-error "" } .*
|
||||
int i; // { dg-message "" } .*
|
||||
}
|
||||
|
||||
void A::f(){} // { dg-error "" } should have been declared before
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
// Origin: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
|
||||
|
||||
class T;
|
||||
inline void operator<(T&, T&) { } // { dg-error "" } previous definition
|
||||
inline void operator<(T&, T&) { } // { dg-message "" } previous definition
|
||||
inline void operator<(T&, T&) { } // { dg-error "" } duplicate definition
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
void foo(void)
|
||||
{
|
||||
extern int i; // { dg-error "" } previous declaration
|
||||
extern int i; // { dg-message "" } previous declaration
|
||||
extern double i; // { dg-error "" } conflicting type
|
||||
extern int j;
|
||||
extern int j;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// { dg-do assemble }
|
||||
// Origin: Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
extern "C" void f (); // { dg-error "" } previous declaration
|
||||
extern "C" void f (); // { dg-message "" } previous declaration
|
||||
static void f () {} // { dg-error "" } extern redeclared static
|
||||
|
|
|
@ -4,7 +4,7 @@ extern int a[][]; // { dg-error "" } invalid multidimensional array
|
|||
extern int b[7][]; // { dg-error "" } invalid multidimensional array
|
||||
extern int c[][7]; // OK
|
||||
|
||||
extern int (*i)[]; // { dg-error "" } previous declaration
|
||||
extern int (*i)[]; // { dg-message "" } previous declaration
|
||||
extern int (*i)[7]; // { dg-error "" } conflicting types for `i'
|
||||
|
||||
extern int m[];
|
||||
|
|
|
@ -10,7 +10,7 @@ typedef int t;
|
|||
typedef t* u;
|
||||
typedef u v;
|
||||
typedef v* (*w)(t const); // this is ok
|
||||
typedef v* (*w)(t); // { dg-error "" } covers message `previously declared here'
|
||||
typedef v* (*w)(t); // { dg-message "" } covers message `previously declared here'
|
||||
typedef v* (*const w)(t); // { dg-error "" } invalid redeclaration
|
||||
typedef v const* (*w)(t); // { dg-error "" } invalid redeclaration
|
||||
typedef v* const (*w)(t); // { dg-error "" } invalid redeclaration
|
||||
|
|
|
@ -5,7 +5,7 @@ template <class T>
|
|||
void foo(T t);
|
||||
|
||||
template <>
|
||||
void foo(int) {}; // { dg-error "6:previously declared here" }
|
||||
void foo(int) {}; // { dg-message "6:previously declared here" }
|
||||
|
||||
template <>
|
||||
void foo<int>(int) {} // { dg-error "6:redefinition" }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// { dg-do assemble }
|
||||
|
||||
template <class T>
|
||||
void f(T) {} // { dg-error "previously" }
|
||||
void f(T) {} // { dg-message "previously" }
|
||||
|
||||
template <class U>
|
||||
struct S {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
@end
|
||||
|
||||
@implementation class3
|
||||
- (int) meth1 { return 0; } /* { dg-error "previously defined here" } */
|
||||
- (int) meth1 { return 0; } /* { dg-message "previously defined here" } */
|
||||
- (int) meth1 { return 0; } /* { dg-error "redefinition of" } */
|
||||
@end
|
||||
|
||||
|
@ -25,6 +25,6 @@
|
|||
@end
|
||||
|
||||
@implementation class4
|
||||
+ (void) meth1 {} /* { dg-error "previously defined here" } */
|
||||
+ (void) meth1 {} /* { dg-message "previously defined here" } */
|
||||
+ (void) meth1 {} /* { dg-error "redefinition of" } */
|
||||
@end
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/* Report invalid extern and __thread combinations. */
|
||||
/* { dg-require-effective-target tls } */
|
||||
|
||||
extern int j; /* { dg-error "previously declared here" } */
|
||||
extern int j; /* { dg-message "previously declared here" } */
|
||||
__thread int j; /* { dg-error "follows non-thread-local" } */
|
||||
|
||||
extern __thread int i; /* { dg-error "previously declared here" } */
|
||||
extern __thread int i; /* { dg-message "previously declared here" } */
|
||||
int i; /* { dg-error "follows thread-local" } */
|
||||
|
||||
extern __thread int k; /* This is fine. */
|
||||
|
|
Loading…
Add table
Reference in a new issue