xref: /netbsd-src/tests/usr.bin/xlint/lint2/msg_000.ln (revision 4b004442778f1201b2161e87fd65ba87aae6601a)
1# $NetBSD: msg_000.ln,v 1.5 2023/08/02 18:51:25 rillig Exp $
2#
3# Test data for message 0 of lint2:
4#	%s used( %s ), but not defined
5#
6
7# Define file number 0.
80 s msg_000.c
9
10# Define the main file of the translation unit.
11S msg_000.c
12
13# Have a function that is used but not defined, and a function that is defined
14# but not used, generated by this code:
15#	1:	# 2 "msg_000.c"
16#	2:	defined_not_used() {
17#	3:		used_not_defined(12345, 0.0);
18#	4:	}
19#
20# The function call in line 3 generates this entry:
21#	'3'	logical line 3 in the main .c source
22#	'c'	function call
23#	'0.3'	file 0, logical line 3 in the currently included file
24#	'p1'	argument 1 is a positive constant
25#	'i'	the return value of the function call is ignored
26#	'16...'	the name of the called function
27#	'f2'	the function is called with 2 arguments
28#	'I'	the first argument has type 'int'
29#	'D'	the first argument has type 'double'
30#	'I'	the return type of the function is (implicitly) 'int'
313 c 0.3 p1 i 16used_not_defined f2 I D I
32#
33# The function definition in line 2 generates this entry:
34#	'2'	logical line 2 in the main .c source
35#	'd'	function definition
36#	'0.2'	file 0, logical line 2 in the currently included file
37#	'd'	function definition
38#	'o'	old-style function definition
39#	'16...'	the name of the defined function
40#	'f0'	it's a function with 0 parameters
41#	'I'	the return type of the function is (implicitly) 'int'
422 d 0.2 d o 16defined_not_used f0 I
43