msg_347.c revision 1.1
1/*	$NetBSD: msg_347.c,v 1.1 2021/09/12 16:28:45 rillig Exp $	*/
2# 3 "msg_347.c"
3
4// Test for message: redeclaration of '%s' with type '%s', expected '%s' [347]
5
6/* lint1-extra-flags: -r */
7
8/*
9 * Message 27 already covers redeclarations, but it doesn't include enough
10 * details to make any sense of it.
11 */
12
13/*
14 * As of 2021-09-12, lint complains about mismatched types.
15 * GCC and Clang accept this.
16 *
17 * Above:
18 *     function(pointer to void, int) returning void
19 *
20 * Below: function(
21 *     pointer to void,
22 *     pointer to function(pointer to void, int) returning pointer to double
23 * ) returning void
24 */
25/* FIXME: the type of the second parameter is not 'int' */
26/* expect+1: previous declaration of function_parameter [260] */
27void function_parameter(void *, double *(void *, int));
28/* expect+1: error: redeclaration of 'function_parameter' with type 'function(pointer to void, pointer to function(pointer to void, int) returning pointer to double) returning void', expected 'function(pointer to void, int) returning void' [347] */
29void function_parameter(void *fs, double *func(void *, int));
30