Retro68/gcc/gcc/testsuite/g++.dg/pr61941.C
Wolfgang Thaller 6fbf4226da gcc-9.1
2019-06-20 20:10:10 +02:00

13 lines
340 B
C

// PR c++/61941 - Misparsing of warn_unused_result function with ref-qualifiers
// { dg-do compile { target c++11 } }
// { dg-options "-Wall" }
class S
{
public:
S x() const __attribute__ ((__warn_unused_result__));
S y() const & __attribute__ ((__warn_unused_result__));
S y() && __attribute__ ((__warn_unused_result__));
};