OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [warn/] [unused-result1-Werror.c] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR 40614
2
// { dg-options "-Werror=unused-result" }
3
/* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
4
class QByteArray {
5
public:
6
  QByteArray(const QByteArray &);
7
};
8
class QString {
9
  QByteArray toLocal8Bit() const __attribute__ ((warn_unused_result));
10
  void fooWarnHere() const { toLocal8Bit(); } // { dg-error "ignoring" }
11
};

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.