Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

/*	$NetBSD: d_lint_assert.c,v 1.7 2023/03/28 14:44:34 rillig Exp $	*/
# 3 "d_lint_assert.c"

/*
 * Trigger the various assertions in the lint1 code.  Several of them are
 * just hard to trigger, but not impossible.
*/

/* lint1-extra-flags: -X 351 */

enum {
	// Before decl.c 1.118 from 2021-01-10:
	// lint: assertion "sym->s_scl == EXTERN || sym->s_scl == STATIC"
	// failed in check_global_variable at decl.c:3135
	// near d_lint_assert.c:14
	A = +++
};
/* expect-1: error: syntax error '}' [249] */

/*
 * Before decl.c 1.196 from 2021-07-10, lint ran into an assertion failure
 * for 'sym->s_type != NULL' in declare_argument.
 */
/* expect+1: warning: old-style declaration; add 'int' [1] */
c(void());