xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_349.c (revision 7d62b00eb9ad855ffcd7da46b41e23feb5476fac)
1 /*	$NetBSD: msg_349.c,v 1.1 2022/05/12 20:49:21 rillig Exp $	*/
2 # 3 "msg_349.c"
3 
4 // Test for message 349: non type argument to alignof is a GCC extension [348]
5 
6 /* lint1-flags: -S -w */
7 
8 unsigned long c11_type = _Alignof(int);
9 
10 /* expect+1: warning: non type argument to alignof is a GCC extension [349] */
11 unsigned long c11_expr = _Alignof(3);
12 
13 unsigned long gcc_type = __alignof__(int);
14 
15 /* expect+1: warning: non type argument to alignof is a GCC extension [349] */
16 unsigned long gcc_expr = __alignof__(3);
17