emit.ln revision 1.5 1 # $NetBSD: emit.ln,v 1.5 2022/01/15 17:33:42 rillig Exp $
2 #
3 # Test emitting a lint library file.
4
5 # Extracted from ../lint1/emit.exp-ln.
6 0 s emit.c
7 S emit.c
8
9 # Global variables that are declared using 'extern' are not part of a
10 # library's interface, therefore they are omitted from the output.
11 101 d 0.101 e 12extern__Bool B
12
13 # Global variables that are defined, not only declared, are part of a
14 # library's interface.
15 106 d 0.106 t 11defined_int I
16
17 # Referring to an anonymous tagged type forces the source file to be listed as
18 # part of the library. If it weren't listed, the diagnostics from lint2 would
19 # not be able to refer to the location where this type has been defined.
20 97 d 0.97 e 21extern_anonymous_enum eT395.0.0
21
22 # Function declarations, as opposed to function definitions, are not part of a
23 # library's interface, therefore they are omitted from the output.
24 121 d 0.121 e 30return_void_unknown_parameters F V
25 122 d 0.122 e 38return_implicit_int_unknown_parameters F I
26 125 d 0.125 e 32extern_return_void_no_parameters F0 V
27
28 # Function calls are not part of a library's interface, therefore they are
29 # omitted from the output.
30 161 c 0.161 s2"%" i 9my_printf f2 PcC PC V
31
32 # Function definitions are copied to the output.
33 159 d 0.159 d 14cover_outqchar F0 V
34
35 # Taken from ../lint1/expr_promote.exp-ln.
36 0 s expr_promote.c
37 S expr_promote.c
38
39 10 d 0.10 e 4sink F2 PcC E V
40 58 c 0.58 i 4sink f20 PcC B I I I I I I uI L uL Q uQ D D lD sX X lX eT331.0.0 V
41 37 d 0.37 d 6caller F1 PsT116arithmetic_types V
42
43 # Emit all basic types.
44 0 d 0.0 d 9var__Bool B
45 0 d 0.0 d 14var_plain_char C
46 0 d 0.0 d 15var_signed_char sC
47 0 d 0.0 d 17var_unsigned_char uC
48 0 d 0.0 d 16var_signed_short S
49 0 d 0.0 d 18var_unsigned_short uS
50 0 d 0.0 d 14var_signed_int I
51 0 d 0.0 d 16var_unsigned_int uI
52 0 d 0.0 d 15var_signed_long L
53 0 d 0.0 d 17var_unsigned_long uL
54 0 d 0.0 d 20var_signed_long_long Q
55 0 d 0.0 d 22var_unsigned_long_long uQ
56 # see emit_lp64 for __int128_t
57 # see emit_lp64 for __uint128_t
58 0 d 0.0 d 9var_float sD
59 0 d 0.0 d 10var_double D
60 0 d 0.0 d 15var_long_double lD
61 0 d 0.0 d 19var_pointer_to_void PV
62 0 d 0.0 d 14var_struct_tag sT1 10struct_tag
63 0 d 0.0 d 18var_struct_typedef sT2 14struct_typedef
64 0 d 0.0 d 20var_struct_anonymous sT3 0.0.0
65 0 d 0.0 d 13var_union_tag uT1 9union_tag
66 0 d 0.0 d 17var_union_typedef uT2 13union_typedef
67 0 d 0.0 d 19var_union_anonymous uT3 0.0.0
68 0 d 0.0 d 12var_enum_tag eT1 8enum_tag
69 0 d 0.0 d 16var_enum_typedef eT2 12enum_typedef
70 0 d 0.0 d 18var_enum_anonymous eT3 0.0.0
71 0 d 0.0 d 18var_pointer_to_int PI
72 0 d 0.0 d 19var_array_of_double A7D
73 0 d 0.0 d 33var_pointer_to_old_style_function P F I
74 0 d 0.0 d 37var_pointer_to_parameterless_function P F0 I
75 0 d 0.0 d 33var_pointer_to_prototype_function P F2 PcvC I I
76 0 d 0.0 d 31var_pointer_to_varargs_function P F3 PcC I E I
77 0 d 0.0 d 17var_float_complex sX
78 0 d 0.0 d 18var_double_complex X
79 0 d 0.0 d 23var_long_double_complex lX
80
81 0 d 0.0 d 28func_old_style_parameterless f0 D
82 0 d 0.0 d 25func_old_style_parameters f2 PC I D
83 0 d 0.0 v1 d 12func_varargs F2 PC E I
84 0 d 0.0 v1 P1 d 15func_printflike f1 PC I
85 0 d 0.0 v1 S1 d 14func_scanflike f1 PC I
86
87 # old_style_void() {}
88 0 d 0.0 d o 14old_style_void f0 I
89 # old_style_int() { return 1; }
90 0 d 0.0 d r o 13old_style_int f0 I
91
92 # TODO: find out how traditional C defined a varargs function
93