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/61081] excessive warnings: right-hand operand of comma expression has no effect


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61081

--- Comment #3 from Marek Polacek <polacek at redhat dot com> ---
On Tue, May 06, 2014 at 06:33:03PM +0000, peter_e at gmx dot net wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61081
> 
> --- Comment #2 from Peter Eisentraut <peter_e at gmx dot net> ---
> No, these "functions" need to have a usable return value, because someone could
> write
> 
> if (!sigemptyset(...))
>     weirderror();

So would the following work for you?
#define sigemptyset(set) (__extension__ ({ *(set) = 0; 0; }))


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