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/16976] New: Warn on unused function return values


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


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