view gcc/testsuite/g++.dg/pr61941.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children
line wrap: on
line source

// 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__));
};