xref: /third_party/ltp/tools/sparse/sparse-src/validation/bitwise-function-pointer.c (revision f08c3bdf)
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/ltp/tools/sparse/sparse-src/validation/
1f08c3bdfSopenharmony_ci#define __bitwise __attribute__((bitwise))
2f08c3bdfSopenharmony_ci
3f08c3bdfSopenharmony_citypedef unsigned int __bitwise t;
4f08c3bdfSopenharmony_ci
5f08c3bdfSopenharmony_ciunsigned int fun(void);
6f08c3bdfSopenharmony_ci
7f08c3bdfSopenharmony_cistatic t (*ptr)(void) = fun;
8f08c3bdfSopenharmony_ci
9f08c3bdfSopenharmony_ci/*
10f08c3bdfSopenharmony_ci * check-name: bitwise-function-pointer
11f08c3bdfSopenharmony_ci *
12f08c3bdfSopenharmony_ci * check-error-start
13f08c3bdfSopenharmony_cibitwise-function-pointer.c:7:25: warning: incorrect type in initializer (different base types)
14f08c3bdfSopenharmony_cibitwise-function-pointer.c:7:25:    expected restricted t ( *static [toplevel] ptr )( ... )
15f08c3bdfSopenharmony_cibitwise-function-pointer.c:7:25:    got unsigned int ( * )( ... )
16f08c3bdfSopenharmony_ci * check-error-end
17f08c3bdfSopenharmony_ci */
18

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