Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/warn/deprecated-13.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++/84222 // { dg-do compile } struct __attribute__((deprecated)) C { // { dg-message "declared here" } C () {} C (const C &); // { dg-bogus "'C' is deprecated" } C (const C &x, const C &y) { C z = x; } // { dg-bogus "'C' is deprecated" } void foo (const C &x, const C &y); // { dg-bogus "'C' is deprecated" } }; void C::foo (const C &x, const C &y) // { dg-bogus "'C' is deprecated" } { C z = x; // { dg-bogus "'C' is deprecated" } } void bar (const C &x, const C &y) // { dg-warning "'C' is deprecated" } { C z = x; // { dg-warning "'C' is deprecated" } } template <int N> struct __attribute__((deprecated)) D { // { dg-message "declared here" } D () {} D (const D &); // { dg-bogus "is deprecated" } D (const D &x, const D &y) { D z = x; } // { dg-bogus "is deprecated" } void foo (const D &x, const D &y); // { dg-bogus "is deprecated" } }; template <int N> void D<N>::foo // { dg-bogus "is deprecated" "" { xfail *-*-* } } (const D &x, const D &y) // { dg-bogus "is deprecated" } { D z = x; // { dg-bogus "is deprecated" } } template <int N> void bar (const D<N> &x, const D<N> &y) // { dg-warning "is deprecated" } { D<N> z = x; // { dg-warning "is deprecated" } }