This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/16976] New: Warn on unused function return values
- From: "mbp at sourcefrog dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Aug 2004 00:08:39 -0000
- Subject: [Bug c/16976] New: Warn on unused function return values
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I'd like a warning option to warn when non-void function return values are
unused. gcc now has an attribute to require this for particular functions. Why
not a global switch?
Obviously this will give a lot of warnings on existing code, but I think it may
be useful in some cases. There is already a pattern (from lint?) of casting to
void values that are unused. Making this explicit may be useful in avoiding
missed error returns, etc.
--
Summary: Warn on unused function return values
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mbp at sourcefrog dot net
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16976