Messages in this thread | | | Subject | Re: sparse segfaults | From | Nikita Danilov <> | Date | Mon, 22 Nov 2004 01:29:08 +0300 |
| |
linux-os <linux-os@chaos.analogic.com> writes:
> On Sat, 20 Nov 2004, Russell King wrote: >
[...]
>> >> int tickadj = 500/HZ ? : 1; /* microsecs */ >> >> which makes it look like sparse doesn't understand such constructions. > > I don't think any 'C' compiler should understand such constructions > either. > There is no result for the TRUE condition, and the standard > does not provide for a default. The compiler should have written > a diagnostic.
This is GCC extension.
foo ? : bar
is equivalent to
foo ? foo : bar
except that foo is evaluated only once.
Nikita. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |