view gcc/testsuite/gcc.dg/parse-decl-after-label.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
line wrap: on
line source

/* PR 29062 
{ dg-do compile }
{ dg-options "-fsyntax-only" }
*/

int f(int x)
{
  if (x > 1) 
    {
      goto finish;
    }
  return x;
  
 finish:
  int ret = 1; /* { dg-error "a label can only be part of a statement and a declaration is not a statement" } */
  return ret;
}