This is the mail archive of the gcc-patches@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]

Re: [PATCH] Add check_result attribute


> Coming as I do from a Lisp background, I balk at the idea that there is 
> something dangerous about discarding a value.  There are functions that 
> return values which some callers may find useful; it makes no sense to 
> clutter the program with a cast to void whenever the value isn't useful.

However, as an application programmer, I can attest that there are
times when policy requires that return values always be checked
properly - with exceptions duly noted and commented.  Being able to
explicitly tag such functions and forbid discarding their return
values would be a useful extension to have.


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