This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/35579] __attribute__(( warn_unused_result )) warns when it shouldn't, doesn't warn when it should



------- Comment #1 from pinskia at gcc dot gnu dot org  2008-03-14 04:54 -------
This is the design of warn_unused_result, you cannot ignore the value, that is
why casting to void does not work.

The warning happens in the front-end so we don't know if you really ignore the
value if you don't use the actually variable.


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]