repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fortran: Fix PR 47485.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
warn
/
effc5.C
blob
43fdd0952164eec811c3d4916b14024196446907
1
// PR c++/98841
2
// { dg-do compile }
3
// { dg-options "-Weffc++" }
4
5
struct S {
6
template <typename T>
7
S& operator=(const T&) { return *this; } // { dg-bogus "should return a reference to" }
8
S& operator=(const S&) { return *this; }
9
};
10
11
void
12
foo ()
13
{
14
S s, t;
15
s = 1;
16
s = t;
17
}