Home | History | Annotate | Line # | Download | only in lint1
      1 /*	$NetBSD: msg_045.c,v 1.8 2025/04/12 15:49:50 rillig Exp $	*/
      2 # 3 "msg_045.c"
      3 
      4 /* Test for message: base type is really '%s %s' [45] */
      5 
      6 /* lint1-flags: -tw */
      7 
      8 struct counter {
      9 	int value;
     10 };
     11 
     12 function()
     13 {
     14 	/* expect+4: warning: base type is really 'struct counter' [45] */
     15 	/* expect+3: warning: declaration of 'union counter' introduces new type in C90 or later [44] */
     16 	/* expect+2: error: 'counter' has incomplete type 'incomplete union counter' [31] */
     17 	/* expect+1: warning: union 'counter' never defined [234] */
     18 	union counter counter;
     19 	/* expect+1: warning: invalid use of member 'value' [102] */
     20 	counter.value++;
     21 }
     22