xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_261.c (revision e6298b924c5ba98f3a22919b56dab04a87cdbb1c)
1 /*	$NetBSD: msg_261.c,v 1.6 2023/07/07 19:45:22 rillig Exp $	*/
2 # 3 "msg_261.c"
3 
4 // Test for message: previous definition of '%s' [261]
5 
6 /* lint1-extra-flags: -r -X 351 */
7 
8 /* expect+2: previous definition of 'function' [261] */
9 void
function(void)10 function(void)
11 {
12 }
13 
14 /* expect+2: error: redeclaration of 'function' with type 'function(void) returning int', expected 'function(void) returning void' [347] */
15 /* expect+1: warning: static function 'function' declared but not defined [290] */
16 static int function(void);
17