On Sunday-201404-27, 18:37, Karl Williamson wrote: > The makers of gcc refuse to consider casting to (void) to be a valid way > of handling the return value of a function which is declared as having > its return value not ignored. Had to see this myself... I started up a Linux image [1] and now I see somewhat more clearly... oh, so, yes it's not so much a gcc issue alone, though, but an interaction of gcvt() being marked up with the gcc attribute warn_unused_result (in glibc, I guess). And (void) in gcc failing to overcome that attribute. Maybe something like: #ifdef __GNUC__ #define UNUSED_RESULT(v) ({ typeof(v) z = (v); (void)sizeof(z); }) #else #define UNUSED_RESULT(v) ((void)(v)) #endif Or something. No idea how typeof fares across GCC versions (that solution nicked from stackoverflow, we are not the first to have this problem). [1] vagrant in OS X rocks.Thread Previous | Thread Next