xref: /third_party/ltp/tools/sparse/sparse-src/validation/goto-label.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/ltp/tools/sparse/sparse-src/validation/
1f08c3bdfSopenharmony_civoid foo(void)
2f08c3bdfSopenharmony_ci{
3f08c3bdfSopenharmony_ci	goto a;
4f08c3bdfSopenharmony_cia:
5f08c3bdfSopenharmony_cia:
6f08c3bdfSopenharmony_ci	return;
7f08c3bdfSopenharmony_ci}
8f08c3bdfSopenharmony_ci
9f08c3bdfSopenharmony_civoid g(void)
10f08c3bdfSopenharmony_ci{
11f08c3bdfSopenharmony_ci	goto a;
12f08c3bdfSopenharmony_cia:
13f08c3bdfSopenharmony_ci	return;
14f08c3bdfSopenharmony_ci}
15f08c3bdfSopenharmony_ci
16f08c3bdfSopenharmony_civoid bar(void)
17f08c3bdfSopenharmony_ci{
18f08c3bdfSopenharmony_ci	goto neverland;
19f08c3bdfSopenharmony_ci}
20f08c3bdfSopenharmony_ci
21f08c3bdfSopenharmony_ci/*
22f08c3bdfSopenharmony_ci * check-name: goto labels
23f08c3bdfSopenharmony_ci *
24f08c3bdfSopenharmony_ci * check-error-start
25f08c3bdfSopenharmony_cigoto-label.c:5:1: error: label 'a' redefined
26f08c3bdfSopenharmony_cigoto-label.c:18:9: error: label 'neverland' was not declared
27f08c3bdfSopenharmony_ci * check-error-end
28f08c3bdfSopenharmony_ci */
29f08c3bdfSopenharmony_ci
30

Indexes created Thu Nov 07 10:32:03 CST 2024