------- Comment #5 from pgut001 at cs dot auckland dot ac dot nz 2008-03-15 09:09 ------- >Care to write a text? I will format it and submit it as a patch if you want.
How about the following, using as a starting point the latest docs (4.3.0), section 5.27, 'warn_unused_result', which currently ends with: "...results in warning on line 5.". Perhaps add to this: -- Snip -- Note that the warnings are generated by the compiler front-end before any data-flow analysis is performed, so situations in which the return value is assigned to a variable but the resulting variable is ignored will not be detected. Changing line 5 in the above code to: int value = fn(); would result in no warning being emitted even though the return value isn't used. -- Snip -- (You could get really pedantic with the wording and say that the caller should "act on the return value of the function" rather than the somewhat ambiguous "used", but I think the above should get the meaning across). Oh, I also have a feeling that "results in warning on line 5." in the current docs should really be "results in *a* warning on line 5." :-). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35579