xref: /third_party/ltp/tools/sparse/sparse-src/validation/builtin_unreachable.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/ltp/tools/sparse/sparse-src/validation/
1f08c3bdfSopenharmony_ci/* example from gcc documents */
2f08c3bdfSopenharmony_ci
3f08c3bdfSopenharmony_civoid function_that_never_returns (void);
4f08c3bdfSopenharmony_ci
5f08c3bdfSopenharmony_cistatic int g (int c)
6f08c3bdfSopenharmony_ci{
7f08c3bdfSopenharmony_ci	if (c)
8f08c3bdfSopenharmony_ci		return 1;
9f08c3bdfSopenharmony_ci	function_that_never_returns ();
10f08c3bdfSopenharmony_ci	__builtin_unreachable ();
11f08c3bdfSopenharmony_ci}
12f08c3bdfSopenharmony_ci
13f08c3bdfSopenharmony_ci/*
14f08c3bdfSopenharmony_ci * check-name: __builtin_unreachable()
15f08c3bdfSopenharmony_ci */
16

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