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 warn_unused_result attribute (take 2)


"Zack Weinberg" <zack@codesourcery.com> writes:

| Jakub Jelinek <jakub@redhat.com> writes:
| 
| > On Sat, Sep 13, 2003 at 10:52:54PM +0100, Joseph S. Myers wrote:
| >> On Sat, 13 Sep 2003, Jakub Jelinek wrote:
| >> 
| >> > a) function type attribute instead of decl type
| >> 
| >> So there should be corresponding tests that you do get the warning (which
| >> in this case can't name the particular function called) when the call
| >> isn't directly to a named function (e.g. through a function pointer
| >> variable with the appropriate type, or (x ? check1 : check2)()).
| >
| > Added.  Also, warning string arguments in the source split into two lines
| > as requested by Gaby.
| > Ok to commit?
| 
| I still object to the unnecessarily verbose warning messages.

It is better to have verbose and intelligible diagnostics than terse
and incomprehensible message.  I think Jakub's formulation is a pretty
good one.

-- Gaby


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