public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/25509]  New: can't voidify __attribute__((warn_unused_result))
@ 2005-12-20 23:09 mueller at kde dot org
  2005-12-20 23:53 ` [Bug c/25509] " joseph at codesourcery dot com
                   ` (26 more replies)
  0 siblings, 27 replies; 34+ messages in thread
From: mueller at kde dot org @ 2005-12-20 23:09 UTC (permalink / raw)
  To: gcc-bugs

casting to (void) doesn't avoid the unused_result warning. testcase: 

=== Cut ===
extern int foo() __attribute__((warn_unused_result));
int main()
{
   (void) foo();

   return 0;
}
=== Cut ===
g++ -Wall -W -O2 -c unused.cc

unused.cc: In function 'int main()':
unused.cc:4: warning: ignoring return value of 'int foo()', declared with
attribute warn_unused_result


-- 
           Summary: can't voidify __attribute__((warn_unused_result))
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mueller at kde dot org
  GCC host triplet: i686-suse-linux


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


^ permalink raw reply	[flat|nested] 34+ messages in thread
[parent not found: <bug-25509-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2015-06-11 13:37 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-20 23:09 [Bug c/25509] New: can't voidify __attribute__((warn_unused_result)) mueller at kde dot org
2005-12-20 23:53 ` [Bug c/25509] " joseph at codesourcery dot com
2005-12-21  0:07 ` mueller at kde dot org
2005-12-21  3:20 ` pinskia at gcc dot gnu dot org
2005-12-21  3:35 ` mueller at kde dot org
2005-12-21  3:47 ` pinskia at gcc dot gnu dot org
2005-12-21  3:55 ` joseph at codesourcery dot com
2005-12-21  4:02 ` mueller at kde dot org
2005-12-21  4:17 ` mueller at kde dot org
2005-12-21  9:59 ` rguenth at gcc dot gnu dot org
2005-12-21 10:16 ` rguenth at gcc dot gnu dot org
2005-12-21 10:59 ` rguenth at gcc dot gnu dot org
2005-12-21 13:04 ` joseph at codesourcery dot com
2005-12-21 14:07 ` mueller at kde dot org
2005-12-21 17:05 ` gdr at integrable-solutions dot net
2007-03-15 21:41 ` fche at redhat dot com
2008-10-17 11:41 ` [Bug c/25509] can't disable __attribute__((warn_unused_result)) bonzini at gnu dot org
2008-10-17 15:32 ` joseph at codesourcery dot com
2008-10-17 15:49 ` bonzini at gnu dot org
2008-10-17 16:56 ` joseph at codesourcery dot com
2008-11-22 15:44 ` thomas at mich dot com
2008-11-22 17:17   ` Andrew Thomas Pinski
2008-11-22 17:18 ` pinskia at gmail dot com
2008-11-22 18:36 ` fche at redhat dot com
2009-07-10  7:28 ` manu at gcc dot gnu dot org
2009-07-10  7:29 ` manu at gcc dot gnu dot org
2010-08-30 14:43 ` bkorb at gnu dot org
2010-08-30 15:01 ` rguenth at gcc dot gnu dot org
2010-08-30 21:09 ` ericb at gcc dot gnu dot org
     [not found] <bug-25509-4@http.gcc.gnu.org/bugzilla/>
2014-08-13 22:13 ` ppluzhnikov at google dot com
2014-08-13 23:47 ` manu at gcc dot gnu.org
2015-06-11  8:08 ` manu at gcc dot gnu.org
2015-06-11  8:54 ` manu at gcc dot gnu.org
2015-06-11 13:37 ` filbranden at google dot com

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).