Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp2a
/
nodiscard-constructor2.C
blob: 3abb11847d1097943928cbedfd6d4d3bbf075ce3 [
file
] [
log
] [
blame
]
// PR c++/99362
// { dg-do compile { target c++20 } }
struct
S
{
[[
nodiscard
]]
S
()
{}
S
(
int
)
{}
};
int
main
()
{
S s
;
S
();
// { dg-warning "ignoring return value" }
(
void
)(
S
());
S t
=
1
;
S
(
1
);
(
void
)(
S
(
1
));
}