RE: Request for suppressing "warn_unused_result" warnings

2010-05-28 Thread Vakatov, Denis (NIH/NLM/NCBI) [E]
olo.bonz...@gmail.com] On Behalf Of Paolo Bonzini Sent: Friday, May 28, 2010 9:12 AM To: Lavrentiev, Anton (NIH/NLM/NCBI) [C] Cc: gcc@gcc.gnu.org; Vakatov, Denis (NIH/NLM/NCBI) [E] Subject: Re: Request for suppressing "warn_unused_result" warnings On 05/28/2010 06:36 AM, Lavrentiev, Ant

RE: Request for suppressing "warn_unused_result" warnings

2010-05-28 Thread Vakatov, Denis (NIH/NLM/NCBI) [E]
Behalf Of Paolo Bonzini Sent: Friday, May 28, 2010 1:10 PM To: Vakatov, Denis (NIH/NLM/NCBI) [E] Cc: Lavrentiev, Anton (NIH/NLM/NCBI) [C]; gcc@gcc.gnu.org Subject: Re: Request for suppressing "warn_unused_result" warnings On Fri, May 28, 2010 at 18:12, Vakatov, Denis (NIH/NLM/NCBI) [E] wr

RE: Request for suppressing "warn_unused_result" warnings

2010-05-28 Thread Vakatov, Denis (NIH/NLM/NCBI) [E]
Ian Lance Taylor wrote: > We should handle must_use_result and warn_unused_result similarly, except > that adding a cast to (void) disables the warn_unused_result warning. > Perhaps there should also be other simple ways to disable the > warn_unused_result warning. > > This is not a great solu

RE: Request for suppressing "warn_unused_result" warnings

2010-05-28 Thread Vakatov, Denis (NIH/NLM/NCBI) [E]
Ian Lance Taylor wrote: > [...] developers can not always be trusted. Instead, we assume that there at > least one trusted developer who can add warn_unused_result when > appropriate. Then the compiler arranges matters such that other developers > can not easily avoid the warning. Thus securi

RE: Request for suppressing "warn_unused_result" warnings

2010-06-03 Thread Vakatov, Denis (NIH/NLM/NCBI) [E]
Okay, I guess we 'll just disable the __wur's by default then -- as introducing an unnecessary hard-to-avoid noise. I recon many other people do the same. Thanks nevertheless. It's still a useful feature, just not flexible enough to use it for *everyday* compilation. Denis