This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [Bug c/61081] excessive warnings: right-hand operand of comma expression has no effect
- From: Marek Polacek <polacek at redhat dot com>
- To: peter_e at gmx dot net <gcc-bugzilla at gcc dot gnu dot org>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 6 May 2014 21:02:52 +0200
- Subject: Re: [Bug c/61081] excessive warnings: right-hand operand of comma expression has no effect
- Authentication-results: sourceware.org; auth=none
- References: <bug-61081-4 at http dot gcc dot gnu dot org/bugzilla/> <bug-61081-4-Xr3ozMZwbi at http dot gcc dot gnu dot org/bugzilla/>
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; }))