summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/stmt-expr-3.c
blob: 6ef7e069eea0dc6a1dc6dce645e1a35e1cc02d63 (plain)
1
2
3
4
5
6
7
8
9
10
11
/* Test diagnostic for GNU extension: statement expressions.  Test
   with -pedantic-errors.  */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */
/* { dg-options "-std=gnu99 -pedantic-errors" } */

int
f (void)
{
  return ({ 1; }); /* { dg-error "ISO C forbids braced-groups within expressions" } */
}