On 05/27/2014 04:41 AM, Benoît Canet wrote: >> - fprintf(stderr, "%s: can't open device %s: %s\n", progname, >> name, >> + fprintf(stderr, "%s: can't open%s%s: %s\n", progname, >> + name ? " device " : "", name ?: "", > > name ?: "" seems to be a GNU C extension: see > http://en.wikipedia.org/wiki/%3F:#C > > Don't we want this code to work on most compilers ?
It already works on all 2 compilers we actively support (gcc and clang), and this is not the first instance of this extension in the code base: $ git grep '\?:' | wc 210 1081 15271 If it ever becomes a real portability problem to someone trying to port to another compiler, it would be a search-and-replace fix to the whole tree at that time. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature