xref: /third_party/ltp/tools/sparse/sparse-src/validation/enum+mode.c (revision f08c3bdf)
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/ltp/tools/sparse/sparse-src/validation/
1f08c3bdfSopenharmony_cienum e { ZERO, ONE, TWO };
2f08c3bdfSopenharmony_ci
3f08c3bdfSopenharmony_cistruct s {
4f08c3bdfSopenharmony_ci	enum e __attribute__ ((mode(__byte__))) b;
5f08c3bdfSopenharmony_ci	enum e __attribute__ ((mode(__word__))) w;
6f08c3bdfSopenharmony_ci	enum e __attribute__ ((mode(__TI__))) t;
7f08c3bdfSopenharmony_ci};
8f08c3bdfSopenharmony_ci
9f08c3bdfSopenharmony_cistatic struct s s;
10f08c3bdfSopenharmony_ci
11f08c3bdfSopenharmony_ci_Static_assert(sizeof(s.b) == 1, "");
12f08c3bdfSopenharmony_ci_Static_assert(sizeof(s.w) == sizeof(long), "");
13f08c3bdfSopenharmony_ci_Static_assert(sizeof(s.t) == sizeof(long long), "");
14f08c3bdfSopenharmony_ci
15f08c3bdfSopenharmony_ci/*
16f08c3bdfSopenharmony_ci * check-name: enum+mode
17f08c3bdfSopenharmony_ci * check-known-to-fail
18f08c3bdfSopenharmony_ci */
19

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