Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| gcc_extensions [2019/07/25 12:35] – [Local labels] rpjday | gcc_extensions [2019/07/25 12:53] (current) – [Case ranges] rpjday | ||
|---|---|---|---|
| Line 33: | Line 33: | ||
| goto *ptr; | goto *ptr; | ||
| </ | </ | ||
| + | |||
| + | ==== Nested functions ==== | ||
| + | |||
| + | < | ||
| + | foo (double a, double b) | ||
| + | { | ||
| + | double square (double z) { return z * z; } | ||
| + | |||
| + | return square (a) + square (b); | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | See " | ||
| + | |||
| + | ==== Nonlocal gotos ==== | ||
| + | |||
| + | Use '' | ||
| + | |||
| + | ==== Constructing function calls ==== | ||
| + | |||
| + | ==== typeof ==== | ||
| + | |||
| + | < | ||
| + | #define max(a,b) \ | ||
| + | ({ typeof (a) _a = (a); \ | ||
| + | typeof (b) _b = (b); \ | ||
| + | _a > _b ? _a : _b; }) | ||
| + | </ | ||
| + | |||
| + | ==== Conditionals ==== | ||
| + | |||
| + | Equivalent: | ||
| + | |||
| + | < | ||
| + | x ? x : y | ||
| + | x ? : y | ||
| + | </ | ||
| + | |||
| + | ==== Non-constant initializers ==== | ||
| + | |||
| + | ==== Designated initializers ==== | ||
| + | |||
| + | ==== Case ranges ==== | ||
| + | |||
| + | < | ||
| + | case low ... high: | ||
| + | </ | ||
| + | |||
| + | Don't forget spaces. | ||
| + | |||
| + | |||