annotate gcc/testsuite/g++.dg/template/incomplete1.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 // { dg-do compile }
kono
parents:
diff changeset
2 // Origin: Ivan Godard <igodard at pacbell dot net>
kono
parents:
diff changeset
3 // PR c++/17447: Detect parameters of dependent types even in templates
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 struct B; // { dg-message "forward declaration" }
kono
parents:
diff changeset
6 template<typename T> struct A {
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 friend A& operator <<(A& a, B b) { return a; } // { dg-error "incomplete" }
kono
parents:
diff changeset
9 friend A& operator <<(A& a, T b) { return a; }
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 void foo1(B b) {} // { dg-error "incomplete" }
kono
parents:
diff changeset
12 void foo1a(T b) {}
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 B foo2(void) {} // { dg-error "incomplete" }
kono
parents:
diff changeset
15 T foo2a(void) {}
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 void foo3(B b);
kono
parents:
diff changeset
18 };