I want to use the braced-group within expression, which is a GNU extension to C. The compiler will evaluate the whole block and use the value of the last statement contained in the block. The following code will print 5, but when I compile it with gcc it returns a warning
warning: statement with no effect [-Wunused-value]
typeof(5) x = ({1; 2;}) + 3; // The warning points to "1"
printf("%d\n", x);
Why would the GCC compiler return a warning if this expression was made by GNU?