* gcc.dg/noncompile/label-lineno-1.c: New test.

From-SVN: r35924
This commit is contained in:
Kaveh R. Ghazi 2000-08-23 21:12:15 +00:00 committed by Kaveh Ghazi
parent bdb47d3ef8
commit 7eda0d2ddf
2 changed files with 18 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2000-08-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.dg/noncompile/label-lineno-1.c: New test.
2000-08-23 Joseph S. Myers <jsm28@cam.ac.uk>
* gcc.dg/c99-array-nonobj-1.c: New test.

View File

@ -0,0 +1,14 @@
/* Ensure that diagnostics for labels appear on the correct lineno.
by Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 8/23/2000. */
int
foo(int i)
{
my_label:
i++;
my_label: /* { dg-error "duplicate label" "label lineno" } */
i++;
}