User Tools

Site Tools


This is an old revision of the document!


Most useful GCC extensions to C language; avoid by using -pedantic.


Statements and declarations in expressions

A compound statement enclosed in parentheses may appear as an expression in GNU C. This allows you to use loops, switches, and local variables within an expression.

#define maxint(a,b) \
  ({int _a = (a), _b = (b); _a > _b ? _a : _b; })
gcc_extensions.1564057050.txt.gz · Last modified: 2019/07/25 12:17 by rpjday