]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/cp/lex.c
tree-core.h: Include symtab.h.
[thirdparty/gcc.git] / gcc / cp / lex.c
1 /* Separate lexical analyzer for GNU C++.
2 Copyright (C) 1987-2015 Free Software Foundation, Inc.
3 Hacked by Michael Tiemann (tiemann@cygnus.com)
4
5 This file is part of GCC.
6
7 GCC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
10 any later version.
11
12 GCC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
20
21
22 /* This file is the lexical analyzer for GNU C++. */
23
24 #include "config.h"
25 #include "system.h"
26 #include "coretypes.h"
27 #include "tm.h"
28 #include "alias.h"
29 #include "tree.h"
30 #include "stringpool.h"
31 #include "cp-tree.h"
32 #include "cpplib.h"
33 #include "flags.h"
34 #include "c-family/c-pragma.h"
35 #include "c-family/c-objc.h"
36 #include "tm_p.h"
37 #include "timevar.h"
38
39 static int interface_strcmp (const char *);
40 static void init_cp_pragma (void);
41
42 static tree parse_strconst_pragma (const char *, int);
43 static void handle_pragma_vtable (cpp_reader *);
44 static void handle_pragma_unit (cpp_reader *);
45 static void handle_pragma_interface (cpp_reader *);
46 static void handle_pragma_implementation (cpp_reader *);
47 static void handle_pragma_java_exceptions (cpp_reader *);
48
49 static void init_operators (void);
50 static void copy_lang_type (tree);
51
52 /* A constraint that can be tested at compile time. */
53 #define CONSTRAINT(name, expr) extern int constraint_##name [(expr) ? 1 : -1]
54
55 /* Functions and data structures for #pragma interface.
56
57 `#pragma implementation' means that the main file being compiled
58 is considered to implement (provide) the classes that appear in
59 its main body. I.e., if this is file "foo.cc", and class `bar'
60 is defined in "foo.cc", then we say that "foo.cc implements bar".
61
62 All main input files "implement" themselves automagically.
63
64 `#pragma interface' means that unless this file (of the form "foo.h"
65 is not presently being included by file "foo.cc", the
66 CLASSTYPE_INTERFACE_ONLY bit gets set. The effect is that none
67 of the vtables nor any of the inline functions defined in foo.h
68 will ever be output.
69
70 There are cases when we want to link files such as "defs.h" and
71 "main.cc". In this case, we give "defs.h" a `#pragma interface',
72 and "main.cc" has `#pragma implementation "defs.h"'. */
73
74 struct impl_files
75 {
76 const char *filename;
77 struct impl_files *next;
78 };
79
80 static struct impl_files *impl_file_chain;
81
82 /* True if we saw "#pragma GCC java_exceptions". */
83 bool pragma_java_exceptions;
84 \f
85 void
86 cxx_finish (void)
87 {
88 c_common_finish ();
89 }
90
91 /* A mapping from tree codes to operator name information. */
92 operator_name_info_t operator_name_info[(int) MAX_TREE_CODES];
93 /* Similar, but for assignment operators. */
94 operator_name_info_t assignment_operator_name_info[(int) MAX_TREE_CODES];
95
96 /* Initialize data structures that keep track of operator names. */
97
98 #define DEF_OPERATOR(NAME, C, M, AR, AP) \
99 CONSTRAINT (C, sizeof "operator " + sizeof NAME <= 256);
100 #include "operators.def"
101 #undef DEF_OPERATOR
102
103 static void
104 init_operators (void)
105 {
106 tree identifier;
107 char buffer[256];
108 struct operator_name_info_t *oni;
109
110 #define DEF_OPERATOR(NAME, CODE, MANGLING, ARITY, ASSN_P) \
111 sprintf (buffer, ISALPHA (NAME[0]) ? "operator %s" : "operator%s", NAME); \
112 identifier = get_identifier (buffer); \
113 IDENTIFIER_OPNAME_P (identifier) = 1; \
114 \
115 oni = (ASSN_P \
116 ? &assignment_operator_name_info[(int) CODE] \
117 : &operator_name_info[(int) CODE]); \
118 oni->identifier = identifier; \
119 oni->name = NAME; \
120 oni->mangled_name = MANGLING; \
121 oni->arity = ARITY;
122
123 #include "operators.def"
124 #undef DEF_OPERATOR
125
126 operator_name_info[(int) ERROR_MARK].identifier
127 = get_identifier ("<invalid operator>");
128
129 /* Handle some special cases. These operators are not defined in
130 the language, but can be produced internally. We may need them
131 for error-reporting. (Eventually, we should ensure that this
132 does not happen. Error messages involving these operators will
133 be confusing to users.) */
134
135 operator_name_info [(int) INIT_EXPR].name
136 = operator_name_info [(int) MODIFY_EXPR].name;
137 operator_name_info [(int) EXACT_DIV_EXPR].name = "(ceiling /)";
138 operator_name_info [(int) CEIL_DIV_EXPR].name = "(ceiling /)";
139 operator_name_info [(int) FLOOR_DIV_EXPR].name = "(floor /)";
140 operator_name_info [(int) ROUND_DIV_EXPR].name = "(round /)";
141 operator_name_info [(int) CEIL_MOD_EXPR].name = "(ceiling %)";
142 operator_name_info [(int) FLOOR_MOD_EXPR].name = "(floor %)";
143 operator_name_info [(int) ROUND_MOD_EXPR].name = "(round %)";
144 operator_name_info [(int) ABS_EXPR].name = "abs";
145 operator_name_info [(int) TRUTH_AND_EXPR].name = "strict &&";
146 operator_name_info [(int) TRUTH_OR_EXPR].name = "strict ||";
147 operator_name_info [(int) RANGE_EXPR].name = "...";
148 operator_name_info [(int) UNARY_PLUS_EXPR].name = "+";
149
150 assignment_operator_name_info [(int) EXACT_DIV_EXPR].name
151 = "(exact /=)";
152 assignment_operator_name_info [(int) CEIL_DIV_EXPR].name
153 = "(ceiling /=)";
154 assignment_operator_name_info [(int) FLOOR_DIV_EXPR].name
155 = "(floor /=)";
156 assignment_operator_name_info [(int) ROUND_DIV_EXPR].name
157 = "(round /=)";
158 assignment_operator_name_info [(int) CEIL_MOD_EXPR].name
159 = "(ceiling %=)";
160 assignment_operator_name_info [(int) FLOOR_MOD_EXPR].name
161 = "(floor %=)";
162 assignment_operator_name_info [(int) ROUND_MOD_EXPR].name
163 = "(round %=)";
164 }
165
166 /* Initialize the reserved words. */
167
168 void
169 init_reswords (void)
170 {
171 unsigned int i;
172 tree id;
173 int mask = 0;
174
175 if (cxx_dialect < cxx11)
176 mask |= D_CXX11;
177 if (flag_no_asm)
178 mask |= D_ASM | D_EXT;
179 if (flag_no_gnu_keywords)
180 mask |= D_EXT;
181
182 /* The Objective-C keywords are all context-dependent. */
183 mask |= D_OBJC;
184
185 ridpointers = ggc_cleared_vec_alloc<tree> ((int) RID_MAX);
186 for (i = 0; i < num_c_common_reswords; i++)
187 {
188 if (c_common_reswords[i].disable & D_CONLY)
189 continue;
190 id = get_identifier (c_common_reswords[i].word);
191 C_SET_RID_CODE (id, c_common_reswords[i].rid);
192 ridpointers [(int) c_common_reswords[i].rid] = id;
193 if (! (c_common_reswords[i].disable & mask))
194 C_IS_RESERVED_WORD (id) = 1;
195 }
196
197 for (i = 0; i < NUM_INT_N_ENTS; i++)
198 {
199 char name[50];
200 sprintf (name, "__int%d", int_n_data[i].bitsize);
201 id = get_identifier (name);
202 C_SET_RID_CODE (id, RID_FIRST_INT_N + i);
203 C_IS_RESERVED_WORD (id) = 1;
204 }
205 }
206
207 static void
208 init_cp_pragma (void)
209 {
210 c_register_pragma (0, "vtable", handle_pragma_vtable);
211 c_register_pragma (0, "unit", handle_pragma_unit);
212 c_register_pragma (0, "interface", handle_pragma_interface);
213 c_register_pragma (0, "implementation", handle_pragma_implementation);
214 c_register_pragma ("GCC", "interface", handle_pragma_interface);
215 c_register_pragma ("GCC", "implementation", handle_pragma_implementation);
216 c_register_pragma ("GCC", "java_exceptions", handle_pragma_java_exceptions);
217 }
218 \f
219 /* TRUE if a code represents a statement. */
220
221 bool statement_code_p[MAX_TREE_CODES];
222
223 /* Initialize the C++ front end. This function is very sensitive to
224 the exact order that things are done here. It would be nice if the
225 initialization done by this routine were moved to its subroutines,
226 and the ordering dependencies clarified and reduced. */
227 bool
228 cxx_init (void)
229 {
230 location_t saved_loc;
231 unsigned int i;
232 static const enum tree_code stmt_codes[] = {
233 CTOR_INITIALIZER, TRY_BLOCK, HANDLER,
234 EH_SPEC_BLOCK, USING_STMT, TAG_DEFN,
235 IF_STMT, CLEANUP_STMT, FOR_STMT,
236 RANGE_FOR_STMT, WHILE_STMT, DO_STMT,
237 BREAK_STMT, CONTINUE_STMT, SWITCH_STMT,
238 EXPR_STMT
239 };
240
241 memset (&statement_code_p, 0, sizeof (statement_code_p));
242 for (i = 0; i < ARRAY_SIZE (stmt_codes); i++)
243 statement_code_p[stmt_codes[i]] = true;
244
245 saved_loc = input_location;
246 input_location = BUILTINS_LOCATION;
247
248 init_reswords ();
249 init_tree ();
250 init_cp_semantics ();
251 init_operators ();
252 init_method ();
253
254 current_function_decl = NULL;
255
256 class_type_node = ridpointers[(int) RID_CLASS];
257
258 cxx_init_decl_processing ();
259
260 if (c_common_init () == false)
261 {
262 input_location = saved_loc;
263 return false;
264 }
265
266 init_cp_pragma ();
267
268 init_repo ();
269
270 input_location = saved_loc;
271 return true;
272 }
273 \f
274 /* Return nonzero if S is not considered part of an
275 INTERFACE/IMPLEMENTATION pair. Otherwise, return 0. */
276
277 static int
278 interface_strcmp (const char* s)
279 {
280 /* Set the interface/implementation bits for this scope. */
281 struct impl_files *ifiles;
282 const char *s1;
283
284 for (ifiles = impl_file_chain; ifiles; ifiles = ifiles->next)
285 {
286 const char *t1 = ifiles->filename;
287 s1 = s;
288
289 if (*s1 == 0 || filename_ncmp (s1, t1, 1) != 0)
290 continue;
291
292 while (*s1 != 0 && filename_ncmp (s1, t1, 1) == 0)
293 s1++, t1++;
294
295 /* A match. */
296 if (*s1 == *t1)
297 return 0;
298
299 /* Don't get faked out by xxx.yyy.cc vs xxx.zzz.cc. */
300 if (strchr (s1, '.') || strchr (t1, '.'))
301 continue;
302
303 if (*s1 == '\0' || s1[-1] != '.' || t1[-1] != '.')
304 continue;
305
306 /* A match. */
307 return 0;
308 }
309
310 /* No matches. */
311 return 1;
312 }
313
314 \f
315
316 /* Parse a #pragma whose sole argument is a string constant.
317 If OPT is true, the argument is optional. */
318 static tree
319 parse_strconst_pragma (const char* name, int opt)
320 {
321 tree result, x;
322 enum cpp_ttype t;
323
324 t = pragma_lex (&result);
325 if (t == CPP_STRING)
326 {
327 if (pragma_lex (&x) != CPP_EOF)
328 warning (0, "junk at end of #pragma %s", name);
329 return result;
330 }
331
332 if (t == CPP_EOF && opt)
333 return NULL_TREE;
334
335 error ("invalid #pragma %s", name);
336 return error_mark_node;
337 }
338
339 static void
340 handle_pragma_vtable (cpp_reader* /*dfile*/)
341 {
342 parse_strconst_pragma ("vtable", 0);
343 sorry ("#pragma vtable no longer supported");
344 }
345
346 static void
347 handle_pragma_unit (cpp_reader* /*dfile*/)
348 {
349 /* Validate syntax, but don't do anything. */
350 parse_strconst_pragma ("unit", 0);
351 }
352
353 static void
354 handle_pragma_interface (cpp_reader* /*dfile*/)
355 {
356 tree fname = parse_strconst_pragma ("interface", 1);
357 struct c_fileinfo *finfo;
358 const char *filename;
359
360 if (fname == error_mark_node)
361 return;
362 else if (fname == 0)
363 filename = lbasename (LOCATION_FILE (input_location));
364 else
365 filename = TREE_STRING_POINTER (fname);
366
367 finfo = get_fileinfo (LOCATION_FILE (input_location));
368
369 if (impl_file_chain == 0)
370 {
371 /* If this is zero at this point, then we are
372 auto-implementing. */
373 if (main_input_filename == 0)
374 main_input_filename = LOCATION_FILE (input_location);
375 }
376
377 finfo->interface_only = interface_strcmp (filename);
378 /* If MULTIPLE_SYMBOL_SPACES is set, we cannot assume that we can see
379 a definition in another file. */
380 if (!MULTIPLE_SYMBOL_SPACES || !finfo->interface_only)
381 finfo->interface_unknown = 0;
382 }
383
384 /* Note that we have seen a #pragma implementation for the key MAIN_FILENAME.
385 We used to only allow this at toplevel, but that restriction was buggy
386 in older compilers and it seems reasonable to allow it in the headers
387 themselves, too. It only needs to precede the matching #p interface.
388
389 We don't touch finfo->interface_only or finfo->interface_unknown;
390 the user must specify a matching #p interface for this to have
391 any effect. */
392
393 static void
394 handle_pragma_implementation (cpp_reader* /*dfile*/)
395 {
396 tree fname = parse_strconst_pragma ("implementation", 1);
397 const char *filename;
398 struct impl_files *ifiles = impl_file_chain;
399
400 if (fname == error_mark_node)
401 return;
402
403 if (fname == 0)
404 {
405 if (main_input_filename)
406 filename = main_input_filename;
407 else
408 filename = LOCATION_FILE (input_location);
409 filename = lbasename (filename);
410 }
411 else
412 {
413 filename = TREE_STRING_POINTER (fname);
414 if (cpp_included_before (parse_in, filename, input_location))
415 warning (0, "#pragma implementation for %qs appears after "
416 "file is included", filename);
417 }
418
419 for (; ifiles; ifiles = ifiles->next)
420 {
421 if (! filename_cmp (ifiles->filename, filename))
422 break;
423 }
424 if (ifiles == 0)
425 {
426 ifiles = XNEW (struct impl_files);
427 ifiles->filename = xstrdup (filename);
428 ifiles->next = impl_file_chain;
429 impl_file_chain = ifiles;
430 }
431 }
432
433 /* Indicate that this file uses Java-personality exception handling. */
434 static void
435 handle_pragma_java_exceptions (cpp_reader* /*dfile*/)
436 {
437 tree x;
438 if (pragma_lex (&x) != CPP_EOF)
439 warning (0, "junk at end of #pragma GCC java_exceptions");
440
441 choose_personality_routine (lang_java);
442 pragma_java_exceptions = true;
443 }
444
445 /* Issue an error message indicating that the lookup of NAME (an
446 IDENTIFIER_NODE) failed. Returns the ERROR_MARK_NODE. */
447
448 tree
449 unqualified_name_lookup_error (tree name)
450 {
451 if (IDENTIFIER_OPNAME_P (name))
452 {
453 if (name != ansi_opname (ERROR_MARK))
454 error ("%qD not defined", name);
455 }
456 else
457 {
458 if (!objc_diagnose_private_ivar (name))
459 {
460 error ("%qD was not declared in this scope", name);
461 suggest_alternatives_for (location_of (name), name);
462 }
463 /* Prevent repeated error messages by creating a VAR_DECL with
464 this NAME in the innermost block scope. */
465 if (local_bindings_p ())
466 {
467 tree decl;
468 decl = build_decl (input_location,
469 VAR_DECL, name, error_mark_node);
470 DECL_CONTEXT (decl) = current_function_decl;
471 push_local_binding (name, decl, 0);
472 /* Mark the variable as used so that we do not get warnings
473 about it being unused later. */
474 TREE_USED (decl) = 1;
475 }
476 }
477
478 return error_mark_node;
479 }
480
481 /* Like unqualified_name_lookup_error, but NAME is an unqualified-id
482 used as a function. Returns an appropriate expression for
483 NAME. */
484
485 tree
486 unqualified_fn_lookup_error (tree name)
487 {
488 if (processing_template_decl)
489 {
490 /* In a template, it is invalid to write "f()" or "f(3)" if no
491 declaration of "f" is available. Historically, G++ and most
492 other compilers accepted that usage since they deferred all name
493 lookup until instantiation time rather than doing unqualified
494 name lookup at template definition time; explain to the user what
495 is going wrong.
496
497 Note that we have the exact wording of the following message in
498 the manual (trouble.texi, node "Name lookup"), so they need to
499 be kept in synch. */
500 permerror (input_location, "there are no arguments to %qD that depend on a template "
501 "parameter, so a declaration of %qD must be available",
502 name, name);
503
504 if (!flag_permissive)
505 {
506 static bool hint;
507 if (!hint)
508 {
509 inform (input_location, "(if you use %<-fpermissive%>, G++ will accept your "
510 "code, but allowing the use of an undeclared name is "
511 "deprecated)");
512 hint = true;
513 }
514 }
515 return name;
516 }
517
518 return unqualified_name_lookup_error (name);
519 }
520
521 /* Wrapper around build_lang_decl_loc(). Should gradually move to
522 build_lang_decl_loc() and then rename build_lang_decl_loc() back to
523 build_lang_decl(). */
524
525 tree
526 build_lang_decl (enum tree_code code, tree name, tree type)
527 {
528 return build_lang_decl_loc (input_location, code, name, type);
529 }
530
531 /* Build a decl from CODE, NAME, TYPE declared at LOC, and then add
532 DECL_LANG_SPECIFIC info to the result. */
533
534 tree
535 build_lang_decl_loc (location_t loc, enum tree_code code, tree name, tree type)
536 {
537 tree t;
538
539 t = build_decl (loc, code, name, type);
540 retrofit_lang_decl (t);
541
542 return t;
543 }
544
545 /* Add DECL_LANG_SPECIFIC info to T. Called from build_lang_decl
546 and pushdecl (for functions generated by the back end). */
547
548 void
549 retrofit_lang_decl (tree t)
550 {
551 struct lang_decl *ld;
552 size_t size;
553 int sel;
554
555 if (DECL_LANG_SPECIFIC (t))
556 return;
557
558 if (TREE_CODE (t) == FUNCTION_DECL)
559 sel = 1, size = sizeof (struct lang_decl_fn);
560 else if (TREE_CODE (t) == NAMESPACE_DECL)
561 sel = 2, size = sizeof (struct lang_decl_ns);
562 else if (TREE_CODE (t) == PARM_DECL)
563 sel = 3, size = sizeof (struct lang_decl_parm);
564 else if (LANG_DECL_HAS_MIN (t))
565 sel = 0, size = sizeof (struct lang_decl_min);
566 else
567 gcc_unreachable ();
568
569 ld = (struct lang_decl *) ggc_internal_cleared_alloc (size);
570
571 ld->u.base.selector = sel;
572
573 DECL_LANG_SPECIFIC (t) = ld;
574 if (current_lang_name == lang_name_cplusplus
575 || decl_linkage (t) == lk_none)
576 SET_DECL_LANGUAGE (t, lang_cplusplus);
577 else if (current_lang_name == lang_name_c)
578 SET_DECL_LANGUAGE (t, lang_c);
579 else if (current_lang_name == lang_name_java)
580 SET_DECL_LANGUAGE (t, lang_java);
581 else
582 gcc_unreachable ();
583
584 if (GATHER_STATISTICS)
585 {
586 tree_node_counts[(int)lang_decl] += 1;
587 tree_node_sizes[(int)lang_decl] += size;
588 }
589 }
590
591 void
592 cxx_dup_lang_specific_decl (tree node)
593 {
594 int size;
595 struct lang_decl *ld;
596
597 if (! DECL_LANG_SPECIFIC (node))
598 return;
599
600 if (TREE_CODE (node) == FUNCTION_DECL)
601 size = sizeof (struct lang_decl_fn);
602 else if (TREE_CODE (node) == NAMESPACE_DECL)
603 size = sizeof (struct lang_decl_ns);
604 else if (TREE_CODE (node) == PARM_DECL)
605 size = sizeof (struct lang_decl_parm);
606 else if (LANG_DECL_HAS_MIN (node))
607 size = sizeof (struct lang_decl_min);
608 else
609 gcc_unreachable ();
610
611 ld = (struct lang_decl *) ggc_internal_alloc (size);
612 memcpy (ld, DECL_LANG_SPECIFIC (node), size);
613 DECL_LANG_SPECIFIC (node) = ld;
614
615 if (GATHER_STATISTICS)
616 {
617 tree_node_counts[(int)lang_decl] += 1;
618 tree_node_sizes[(int)lang_decl] += size;
619 }
620 }
621
622 /* Copy DECL, including any language-specific parts. */
623
624 tree
625 copy_decl (tree decl)
626 {
627 tree copy;
628
629 copy = copy_node (decl);
630 cxx_dup_lang_specific_decl (copy);
631 return copy;
632 }
633
634 /* Replace the shared language-specific parts of NODE with a new copy. */
635
636 static void
637 copy_lang_type (tree node)
638 {
639 int size;
640 struct lang_type *lt;
641
642 if (! TYPE_LANG_SPECIFIC (node))
643 return;
644
645 if (TYPE_LANG_SPECIFIC (node)->u.h.is_lang_type_class)
646 size = sizeof (struct lang_type);
647 else
648 size = sizeof (struct lang_type_ptrmem);
649 lt = (struct lang_type *) ggc_internal_alloc (size);
650 memcpy (lt, TYPE_LANG_SPECIFIC (node), size);
651 TYPE_LANG_SPECIFIC (node) = lt;
652
653 if (GATHER_STATISTICS)
654 {
655 tree_node_counts[(int)lang_type] += 1;
656 tree_node_sizes[(int)lang_type] += size;
657 }
658 }
659
660 /* Copy TYPE, including any language-specific parts. */
661
662 tree
663 copy_type (tree type)
664 {
665 tree copy;
666
667 copy = copy_node (type);
668 copy_lang_type (copy);
669 return copy;
670 }
671
672 tree
673 cxx_make_type (enum tree_code code)
674 {
675 tree t = make_node (code);
676
677 /* Create lang_type structure. */
678 if (RECORD_OR_UNION_CODE_P (code)
679 || code == BOUND_TEMPLATE_TEMPLATE_PARM)
680 {
681 struct lang_type *pi
682 = (struct lang_type *) ggc_internal_cleared_alloc
683 (sizeof (struct lang_type));
684
685 TYPE_LANG_SPECIFIC (t) = pi;
686 pi->u.c.h.is_lang_type_class = 1;
687
688 if (GATHER_STATISTICS)
689 {
690 tree_node_counts[(int)lang_type] += 1;
691 tree_node_sizes[(int)lang_type] += sizeof (struct lang_type);
692 }
693 }
694
695 /* Set up some flags that give proper default behavior. */
696 if (RECORD_OR_UNION_CODE_P (code))
697 {
698 struct c_fileinfo *finfo = \
699 get_fileinfo (LOCATION_FILE (input_location));
700 SET_CLASSTYPE_INTERFACE_UNKNOWN_X (t, finfo->interface_unknown);
701 CLASSTYPE_INTERFACE_ONLY (t) = finfo->interface_only;
702 }
703
704 return t;
705 }
706
707 tree
708 make_class_type (enum tree_code code)
709 {
710 tree t = cxx_make_type (code);
711 SET_CLASS_TYPE_P (t, 1);
712 return t;
713 }
714
715 /* Returns true if we are currently in the main source file, or in a
716 template instantiation started from the main source file. */
717
718 bool
719 in_main_input_context (void)
720 {
721 struct tinst_level *tl = outermost_tinst_level();
722
723 if (tl)
724 return filename_cmp (main_input_filename,
725 LOCATION_FILE (tl->locus)) == 0;
726 else
727 return filename_cmp (main_input_filename, LOCATION_FILE (input_location)) == 0;
728 }