xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_012.c (revision e6298b924c5ba98f3a22919b56dab04a87cdbb1c)
1 /*	$NetBSD: msg_012.c,v 1.5 2023/07/07 19:45:22 rillig Exp $	*/
2 # 3 "msg_012.c"
3 
4 // Test for message: compiler takes size of function [12]
5 /* This message is not used. */
6 
7 /* lint1-extra-flags: -X 351 */
8 
9 unsigned long
example(void)10 example(void)
11 {
12 	/* expect+1: error: cannot take size/alignment of function type 'function(void) returning unsigned long' [144] */
13 	return sizeof(example);
14 }
15