repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fix broken MinGW build of gcc.c
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wunused-result-2.C
blob
56ed17a6abe864c61d2bf7f0b33532594974f3a9
1
// PR c++/66177
2
3
struct QSize
4
{
5
QSize(int w, int h) : wd(w), ht(h) {}
6
7
QSize expandedTo() const __attribute__ ((__warn_unused_result__))
8
{
9
return QSize(2, 3);
10
}
11
12
private:
13
int wd;
14
int ht;
15
};
16
17
void foo()
18
{
19
QSize sz(2, 2);
20
sz.expandedTo(); // { dg-warning "warn_unused_result" }
21
}