Home | History | Annotate | Line # | Download | only in lint1
d_lint_assert.c revision 1.5
      1 /*	$NetBSD: d_lint_assert.c,v 1.5 2022/01/15 14:22:03 rillig Exp $	*/
      2 # 3 "d_lint_assert.c"
      3 
      4 /*
      5  * Trigger the various assertions in the lint1 code.  Several of them are
      6  * just hard to trigger, but not impossible.
      7 */
      8 
      9 enum {
     10 	// Before decl.c 1.118 from 2021-01-10:
     11 	// lint: assertion "sym->s_scl == EXTERN || sym->s_scl == STATIC"
     12 	// failed in check_global_variable at decl.c:3135
     13 	// near d_lint_assert.c:14
     14 	A = +++
     15 };
     16 /* expect-1: error: syntax error '}' [249] */
     17 
     18 /*
     19  * Before decl.c 1.196 from 2021-07-10, lint ran into an assertion failure
     20  * for 'sym->s_type != NULL' in declare_argument.
     21  */
     22 /* expect+1: warning: old style declaration; add 'int' [1] */
     23 c(void());
     24