OSDN Git Service

033d707778c8de92db3449f1b6411e303fd16c5c
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / warn / unused-result1-Werror.c
1 // PR 40614
2 // { dg-options "-Werror=unused-result" }
3 class QByteArray {
4 public:
5   QByteArray(const QByteArray &);
6 };
7 class QString {
8   QByteArray toLocal8Bit() const __attribute__ ((warn_unused_result));
9   void fooWarnHere() const { toLocal8Bit(); } // { dg-error "ignoring" }
10 };