1 Consider compiling test.c, with this content:
2 VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
6 main (int argc, char **argv)
12 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14 ...where test.h has this content:
15 VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
18 #define PLUS(A, B) A + B
19 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
22 The undocumented -fdump-internal-locations option outputs this information
23 to stderr, showing what each location_t value means. Source code
24 lines are quoted, showing both per-line location_t values and
25 per-line&column location_t values (written vertically under the
26 corresponding character of source code).
28 VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
30 location_t interval: 0 <= loc < 2
33 location_t interval: 32 <= loc < 64
36 column and range bits: 12
40 included from location: 0
41 test.c: 1|loc: 32|#include "test.h"
46 location_t interval: 64 <= loc < 96
49 column and range bits: 0
53 included from location: 0
56 location_t interval: 96 <= loc < 128
59 column and range bits: 0
63 included from location: 0
66 location_t interval: 128 <= loc < 250240
67 file: /usr/include/stdc-predef.h
69 column and range bits: 12
73 included from location: 127 (in ordinary map 2)
74 (contents of /usr/include/stdc-predef.h snipped for brevity)
77 location_t interval: 250240 <= loc < 250272
80 column and range bits: 12
84 included from location: 0
87 location_t interval: 250272 <= loc < 254368
90 column and range bits: 12
94 included from location: 0
95 test.c: 1|loc:250272|#include "test.h"
102 location_t interval: 254368 <= loc < 266720
105 column and range bits: 12
109 included from location: 250272 (in ordinary map 5)
110 test.h: 1|loc:254368|extern int foo ();
115 test.h: 2|loc:258464|
120 test.h: 3|loc:262560|#define PLUS(A, B) A + B
121 |222222222222233333333333
122 |566677788899900011122223
123 |925825814814704703603692
124 |246802468024680246802468
125 test.h: 4|loc:266656|
132 location_t interval: 266720 <= loc < 299520
135 column and range bits: 12
139 included from location: 0
140 test.c: 2|loc:266720|
145 test.c: 3|loc:270816|int
150 test.c: 4|loc:274912|main (int argc, char **argv)
151 |4455555555555555555555555555
152 |9900011122223334445556667778
153 |4704703603692692582581481470
154 |4680246802468024680246802468
155 test.c: 5|loc:279008|{
160 test.c: 6|loc:283104| int a = PLUS (1,2);
161 |333333333333333333333
162 |112222333444555666777
163 |360369269258258148147
164 |680246802468024680246
165 test.c: 7|loc:287200| int b = PLUS (3,4);
166 |777777777777777777777
167 |222333444555666777888
168 |369269258258148147047
169 |246802468024680246802
170 test.c: 8|loc:291296| return 0;
175 test.c: 9|loc:295392|}
180 test.c: 10|loc:299488|
186 UNALLOCATED LOCATIONS
187 location_t interval: 299520 <= loc < 2147483632
189 MACRO 3: PLUS (7 tokens)
190 location_t interval: 2147483632 <= loc < 2147483639
191 test.c:7:11: note: expansion point is location 287555
192 7 | int b = PLUS (3,4);
194 map->start_location: 2147483632
197 test.c:7:17: note: token 0 has x-location == 287744
198 7 | int b = PLUS (3,4);
200 test.c:7:17: note: token 0 has y-location == 263200
202 In file included from test.c:1:
203 test.h:3:22: note: token 1 has x-location == y-location == 263264
204 3 | #define PLUS(A, B) A + B
207 test.c:7:19: note: token 2 has x-location == 287808
208 7 | int b = PLUS (3,4);
210 test.c:7:19: note: token 2 has y-location == 263328
212 cc1: note: token 3 has x-location == y-location == 0
214 cc1: note: token 4 has x-location == y-location == 0
216 cc1: note: token 5 has x-location == y-location == 0
218 cc1: note: token 6 has x-location == y-location == 0
220 MACRO 2: PLUS (7 tokens)
221 location_t interval: 2147483639 <= loc < 2147483646
222 test.c:6:11: note: expansion point is location 283459
223 6 | int a = PLUS (1,2);
225 map->start_location: 2147483639
228 test.c:6:17: note: token 0 has x-location == 283648
229 6 | int a = PLUS (1,2);
231 test.c:6:17: note: token 0 has y-location == 263200
233 In file included from test.c:1:
234 test.h:3:22: note: token 1 has x-location == y-location == 263264
235 3 | #define PLUS(A, B) A + B
238 test.c:6:19: note: token 2 has x-location == 283712
239 6 | int a = PLUS (1,2);
241 test.c:6:19: note: token 2 has y-location == 263328
243 cc1: note: token 3 has x-location == y-location == 0
245 cc1: note: token 4 has x-location == y-location == 0
247 cc1: note: token 5 has x-location == y-location == 0
249 cc1: note: token 6 has x-location == y-location == 0
251 MACRO 1: __GCC_IEC_559_COMPLEX (1 tokens)
252 location_t interval: 2147483646 <= loc < 2147483647
253 In file included from <command-line>:31:
254 /usr/include/stdc-predef.h:45:6: note: expansion point is location 180564
255 45 | # if __GCC_IEC_559_COMPLEX > 0
256 | ^~~~~~~~~~~~~~~~~~~~~
257 map->start_location: 2147483646
260 <built-in>: note: token 0 has x-location == y-location == 1
262 MACRO 0: __GCC_IEC_559 (1 tokens)
263 location_t interval: 2147483647 <= loc < 2147483648
264 /usr/include/stdc-predef.h:37:6: note: expansion point is location 147788
265 37 | # if __GCC_IEC_559 > 0
267 map->start_location: 2147483647
270 <built-in>: note: token 0 has x-location == y-location == 1
273 location_t interval: 2147483647 <= loc < 2147483648
276 location_t interval: 2147483648 <= loc < 4294967295
277 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^