view gcc/testsuite/gcc.dg/noncompile/label-lineno-1.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* Ensure that diagnostics for labels appear on the correct lineno.
   by Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 8/23/2000.  */

void
foo(int i)
{
 my_label: /* { dg-message "note: previous definition" "prev label" } */

  i++;

 my_label: /* { dg-error "duplicate label" "label lineno" } */

  i++;
}