Home | History | Annotate | Line # | Download | only in lint1
d_c99_union_cast.c revision 1.5
      1 /*	$NetBSD: d_c99_union_cast.c,v 1.5 2021/08/03 20:34:23 rillig Exp $	*/
      2 # 3 "d_c99_union_cast.c"
      3 
      4 /* C99 does not define union cast, it is a GCC extension. */
      5 
      6 struct bar {
      7 	int a;
      8 	int b;
      9 };
     10 
     11 union foo {
     12 	struct bar *a;
     13 	int b;
     14 };
     15 
     16 void
     17 foo(void)
     18 {
     19 	struct bar *a;		/* expect: 192 */
     20 
     21 	((union foo)a).a;
     22 }
     23