public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/27370]  New: Bogus warning about ignoring function return value (__attribute__ ((warn_unused_result)))
@ 2006-05-01 15:18 rguenth at gcc dot gnu dot org
  2006-05-01 15:19 ` [Bug c++/27370] [4.0 Regression] " rguenth at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-05-01 15:18 UTC (permalink / raw)
  To: gcc-bugs

class QByteArray {
public:
  QByteArray(const QByteArray &);
};
class QString {
  QByteArray toLocal8Bit() const __attribute__ ((warn_unused_result));
  inline QByteArray local8Bit() const{ return toLocal8Bit(); }
};

Produces with g++ -S -Wall:

test.1.1.min.ii: In member function 'QByteArray QString::local8Bit() const':
test.1.1.min.ii:7: warning: ignoring return value of 'QByteArray
QString::toLocal8Bit() const', declared with attribute warn_unused_result


-- 
           Summary: Bogus warning about ignoring function return value
                    (__attribute__ ((warn_unused_result)))
           Product: gcc
           Version: 4.0.3
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27370


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-02-03 16:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-01 15:18 [Bug c++/27370] New: Bogus warning about ignoring function return value (__attribute__ ((warn_unused_result))) rguenth at gcc dot gnu dot org
2006-05-01 15:19 ` [Bug c++/27370] [4.0 Regression] " rguenth at gcc dot gnu dot org
2006-05-01 15:24 ` rguenth at gcc dot gnu dot org
2006-05-01 15:26 ` pinskia at gcc dot gnu dot org
2006-05-02  0:09 ` janis at gcc dot gnu dot org
2006-05-02 16:15 ` janis at gcc dot gnu dot org
2006-05-04 15:25 ` rguenth at gcc dot gnu dot org
2007-02-03 16:54 ` gdr at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).