Subject: bug#15970: ignore_value vs (void) [was: [Bug-tar] bug#15970: bug#15970: Crash in gettext() after fork() on Mac OS X]

From: Joerg Schilling <[email-masked]>
Date: Wed, 27 Nov 2013 17:53:42 +0100

Eric Blake <[email-masked]> wrote:

> On 11/27/2013 09:30 AM, Joerg Schilling wrote:
> >>> Are you using "ignore_value" because of the gcc bug that ignores the official
> >>> method to tell that the return code is ignored intentionally:
> >>>
> >>> 	(void) write(fd, buf, len);
>
> The C standard does not document that '(void) write(...)' is required to
> avoid diagnostics, so I don't see the gcc behavior as a bug (yes, it's
> annoying behavior, but that doesn't make it incorrect behavior).

Well, there is a more than 30 year history of lint that causes 
'(void) write(...)' to be accepted without a warning.

Jörg

-- 
 EMail:[email-masked] (home) Jörg Schilling D-13353 Berlin
       [email-masked]                (uni)  
       [email-masked] (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily