00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #include "config.h"
00030 #include "system.h"
00031 #include "coretypes.h"
00032 #include "tm.h"
00033 #include "input.h"
00034 #include "tree.h"
00035 #include "cp-tree.h"
00036 #include "cpplib.h"
00037 #include "flags.h"
00038 #include "c-pragma.h"
00039 #include "toplev.h"
00040 #include "output.h"
00041 #include "tm_p.h"
00042 #include "timevar.h"
00043 #ifdef KEY
00044 #include "gspin-gcc-interface.h"
00045 #endif
00046
00047 static int interface_strcmp (const char *);
00048 static void init_cp_pragma (void);
00049
00050 static tree parse_strconst_pragma (const char *, int);
00051 static void handle_pragma_vtable (cpp_reader *);
00052 static void handle_pragma_unit (cpp_reader *);
00053 static void handle_pragma_interface (cpp_reader *);
00054 static void handle_pragma_implementation (cpp_reader *);
00055 static void handle_pragma_java_exceptions (cpp_reader *);
00056
00057 static void init_operators (void);
00058 static void copy_lang_type (tree);
00059
00060
00061 #define CONSTRAINT(name, expr) extern int constraint_##name [(expr) ? 1 : -1]
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082 struct impl_files
00083 {
00084 const char *filename;
00085 struct impl_files *next;
00086 };
00087
00088 static struct impl_files *impl_file_chain;
00089
00090
00091 void
00092 cxx_finish (void)
00093 {
00094 c_common_finish ();
00095 }
00096
00097
00098 operator_name_info_t operator_name_info[(int) LAST_CPLUS_TREE_CODE];
00099
00100 operator_name_info_t assignment_operator_name_info[(int) LAST_CPLUS_TREE_CODE];
00101
00102
00103
00104 #define DEF_OPERATOR(NAME, C, M, AR, AP) \
00105 CONSTRAINT (C, sizeof "operator " + sizeof NAME <= 256);
00106 #include "operators.def"
00107 #undef DEF_OPERATOR
00108
00109 static void
00110 init_operators (void)
00111 {
00112 tree identifier;
00113 char buffer[256];
00114 struct operator_name_info_t *oni;
00115
00116 #define DEF_OPERATOR(NAME, CODE, MANGLING, ARITY, ASSN_P) \
00117 sprintf (buffer, ISALPHA (NAME[0]) ? "operator %s" : "operator%s", NAME); \
00118 identifier = get_identifier (buffer); \
00119 IDENTIFIER_OPNAME_P (identifier) = 1; \
00120 \
00121 oni = (ASSN_P \
00122 ? &assignment_operator_name_info[(int) CODE] \
00123 : &operator_name_info[(int) CODE]); \
00124 oni->identifier = identifier; \
00125 oni->name = NAME; \
00126 oni->mangled_name = MANGLING; \
00127 oni->arity = ARITY;
00128
00129 #include "operators.def"
00130 #undef DEF_OPERATOR
00131
00132 operator_name_info[(int) ERROR_MARK].identifier
00133 = get_identifier ("<invalid operator>");
00134
00135
00136
00137
00138
00139
00140
00141 operator_name_info [(int) INIT_EXPR].name
00142 = operator_name_info [(int) MODIFY_EXPR].name;
00143 operator_name_info [(int) EXACT_DIV_EXPR].name = "(ceiling /)";
00144 operator_name_info [(int) CEIL_DIV_EXPR].name = "(ceiling /)";
00145 operator_name_info [(int) FLOOR_DIV_EXPR].name = "(floor /)";
00146 operator_name_info [(int) ROUND_DIV_EXPR].name = "(round /)";
00147 operator_name_info [(int) CEIL_MOD_EXPR].name = "(ceiling %)";
00148 operator_name_info [(int) FLOOR_MOD_EXPR].name = "(floor %)";
00149 operator_name_info [(int) ROUND_MOD_EXPR].name = "(round %)";
00150 operator_name_info [(int) ABS_EXPR].name = "abs";
00151 operator_name_info [(int) TRUTH_AND_EXPR].name = "strict &&";
00152 operator_name_info [(int) TRUTH_OR_EXPR].name = "strict ||";
00153 operator_name_info [(int) RANGE_EXPR].name = "...";
00154 operator_name_info [(int) CONVERT_EXPR].name = "+";
00155
00156 assignment_operator_name_info [(int) EXACT_DIV_EXPR].name
00157 = "(exact /=)";
00158 assignment_operator_name_info [(int) CEIL_DIV_EXPR].name
00159 = "(ceiling /=)";
00160 assignment_operator_name_info [(int) FLOOR_DIV_EXPR].name
00161 = "(floor /=)";
00162 assignment_operator_name_info [(int) ROUND_DIV_EXPR].name
00163 = "(round /=)";
00164 assignment_operator_name_info [(int) CEIL_MOD_EXPR].name
00165 = "(ceiling %=)";
00166 assignment_operator_name_info [(int) FLOOR_MOD_EXPR].name
00167 = "(floor %=)";
00168 assignment_operator_name_info [(int) ROUND_MOD_EXPR].name
00169 = "(round %=)";
00170 }
00171
00172
00173 struct resword
00174 {
00175 const char *const word;
00176 ENUM_BITFIELD(rid) const rid : 16;
00177 const unsigned int disable : 16;
00178 };
00179
00180
00181
00182 #define D_EXT 0x01
00183 #define D_ASM 0x02
00184
00185 CONSTRAINT(ridbits_fit, RID_LAST_MODIFIER < sizeof(unsigned long) * CHAR_BIT);
00186
00187 static const struct resword reswords[] =
00188 {
00189 { "_Complex", RID_COMPLEX, 0 },
00190 { "__FUNCTION__", RID_FUNCTION_NAME, 0 },
00191 { "__PRETTY_FUNCTION__", RID_PRETTY_FUNCTION_NAME, 0 },
00192 { "__alignof", RID_ALIGNOF, 0 },
00193 { "__alignof__", RID_ALIGNOF, 0 },
00194 { "__asm", RID_ASM, 0 },
00195 { "__asm__", RID_ASM, 0 },
00196 { "__attribute", RID_ATTRIBUTE, 0 },
00197 { "__attribute__", RID_ATTRIBUTE, 0 },
00198 { "__builtin_offsetof", RID_OFFSETOF, 0 },
00199 { "__builtin_va_arg", RID_VA_ARG, 0 },
00200 { "__complex", RID_COMPLEX, 0 },
00201 { "__complex__", RID_COMPLEX, 0 },
00202 { "__const", RID_CONST, 0 },
00203 { "__const__", RID_CONST, 0 },
00204 { "__extension__", RID_EXTENSION, 0 },
00205 { "__func__", RID_C99_FUNCTION_NAME, 0 },
00206 { "__imag", RID_IMAGPART, 0 },
00207 { "__imag__", RID_IMAGPART, 0 },
00208 { "__inline", RID_INLINE, 0 },
00209 { "__inline__", RID_INLINE, 0 },
00210 { "__label__", RID_LABEL, 0 },
00211 { "__null", RID_NULL, 0 },
00212 { "__real", RID_REALPART, 0 },
00213 { "__real__", RID_REALPART, 0 },
00214 { "__restrict", RID_RESTRICT, 0 },
00215 { "__restrict__", RID_RESTRICT, 0 },
00216 { "__signed", RID_SIGNED, 0 },
00217 { "__signed__", RID_SIGNED, 0 },
00218 { "__thread", RID_THREAD, 0 },
00219 { "__typeof", RID_TYPEOF, 0 },
00220 { "__typeof__", RID_TYPEOF, 0 },
00221 { "__volatile", RID_VOLATILE, 0 },
00222 { "__volatile__", RID_VOLATILE, 0 },
00223 { "asm", RID_ASM, D_ASM },
00224 { "auto", RID_AUTO, 0 },
00225 { "bool", RID_BOOL, 0 },
00226 { "break", RID_BREAK, 0 },
00227 { "case", RID_CASE, 0 },
00228 { "catch", RID_CATCH, 0 },
00229 { "char", RID_CHAR, 0 },
00230 { "class", RID_CLASS, 0 },
00231 { "const", RID_CONST, 0 },
00232 { "const_cast", RID_CONSTCAST, 0 },
00233 { "continue", RID_CONTINUE, 0 },
00234 { "default", RID_DEFAULT, 0 },
00235 { "delete", RID_DELETE, 0 },
00236 { "do", RID_DO, 0 },
00237 { "double", RID_DOUBLE, 0 },
00238 { "dynamic_cast", RID_DYNCAST, 0 },
00239 { "else", RID_ELSE, 0 },
00240 { "enum", RID_ENUM, 0 },
00241 { "explicit", RID_EXPLICIT, 0 },
00242 { "export", RID_EXPORT, 0 },
00243 { "extern", RID_EXTERN, 0 },
00244 { "false", RID_FALSE, 0 },
00245 { "float", RID_FLOAT, 0 },
00246 { "for", RID_FOR, 0 },
00247 { "friend", RID_FRIEND, 0 },
00248 { "goto", RID_GOTO, 0 },
00249 { "if", RID_IF, 0 },
00250 { "inline", RID_INLINE, 0 },
00251 { "int", RID_INT, 0 },
00252 { "long", RID_LONG, 0 },
00253 { "mutable", RID_MUTABLE, 0 },
00254 { "namespace", RID_NAMESPACE, 0 },
00255 { "new", RID_NEW, 0 },
00256 { "operator", RID_OPERATOR, 0 },
00257 { "private", RID_PRIVATE, 0 },
00258 { "protected", RID_PROTECTED, 0 },
00259 { "public", RID_PUBLIC, 0 },
00260 { "register", RID_REGISTER, 0 },
00261 { "reinterpret_cast", RID_REINTCAST, 0 },
00262 { "return", RID_RETURN, 0 },
00263 { "short", RID_SHORT, 0 },
00264 { "signed", RID_SIGNED, 0 },
00265 { "sizeof", RID_SIZEOF, 0 },
00266 { "static", RID_STATIC, 0 },
00267 { "static_cast", RID_STATCAST, 0 },
00268 { "struct", RID_STRUCT, 0 },
00269 { "switch", RID_SWITCH, 0 },
00270 { "template", RID_TEMPLATE, 0 },
00271 { "this", RID_THIS, 0 },
00272 { "throw", RID_THROW, 0 },
00273 { "true", RID_TRUE, 0 },
00274 { "try", RID_TRY, 0 },
00275 { "typedef", RID_TYPEDEF, 0 },
00276 { "typename", RID_TYPENAME, 0 },
00277 { "typeid", RID_TYPEID, 0 },
00278 { "typeof", RID_TYPEOF, D_ASM|D_EXT },
00279 { "union", RID_UNION, 0 },
00280 { "unsigned", RID_UNSIGNED, 0 },
00281 { "using", RID_USING, 0 },
00282 { "virtual", RID_VIRTUAL, 0 },
00283 { "void", RID_VOID, 0 },
00284 { "volatile", RID_VOLATILE, 0 },
00285 { "wchar_t", RID_WCHAR, 0 },
00286 { "while", RID_WHILE, 0 },
00287
00288 };
00289
00290 void
00291 init_reswords (void)
00292 {
00293 unsigned int i;
00294 tree id;
00295 int mask = ((flag_no_asm ? D_ASM : 0)
00296 | (flag_no_gnu_keywords ? D_EXT : 0));
00297
00298 ridpointers = ggc_calloc ((int) RID_MAX, sizeof (tree));
00299 for (i = 0; i < ARRAY_SIZE (reswords); i++)
00300 {
00301 id = get_identifier (reswords[i].word);
00302 C_RID_CODE (id) = reswords[i].rid;
00303 ridpointers [(int) reswords[i].rid] = id;
00304 if (! (reswords[i].disable & mask))
00305 C_IS_RESERVED_WORD (id) = 1;
00306 }
00307 }
00308
00309 static void
00310 init_cp_pragma (void)
00311 {
00312 c_register_pragma (0, "vtable", handle_pragma_vtable);
00313 c_register_pragma (0, "unit", handle_pragma_unit);
00314 c_register_pragma (0, "interface", handle_pragma_interface);
00315 c_register_pragma (0, "implementation", handle_pragma_implementation);
00316 c_register_pragma ("GCC", "interface", handle_pragma_interface);
00317 c_register_pragma ("GCC", "implementation", handle_pragma_implementation);
00318 c_register_pragma ("GCC", "java_exceptions", handle_pragma_java_exceptions);
00319 }
00320
00321
00322
00323
00324
00325 bool
00326 cxx_init (void)
00327 {
00328 static const enum tree_code stmt_codes[] = {
00329 c_common_stmt_codes,
00330 cp_stmt_codes
00331 };
00332
00333 INIT_STATEMENT_CODES (stmt_codes);
00334
00335
00336
00337
00338 #ifdef USE_MAPPED_LOCATION
00339 push_srcloc (BUILTINS_LOCATION);
00340 #else
00341 push_srcloc ("<built-in>", 0);
00342 #endif
00343
00344 init_reswords ();
00345 init_tree ();
00346 init_cp_semantics ();
00347 init_operators ();
00348 init_method ();
00349 init_error ();
00350
00351 current_function_decl = NULL;
00352
00353 class_type_node = ridpointers[(int) RID_CLASS];
00354
00355 cxx_init_decl_processing ();
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366 flag_unit_at_a_time = 1;
00367
00368 if (c_common_init () == false)
00369 {
00370 pop_srcloc();
00371 return false;
00372 }
00373
00374 init_cp_pragma ();
00375
00376 init_repo ();
00377
00378 pop_srcloc();
00379 return true;
00380 }
00381
00382
00383
00384
00385 static int
00386 interface_strcmp (const char* s)
00387 {
00388
00389 struct impl_files *ifiles;
00390 const char *s1;
00391
00392 for (ifiles = impl_file_chain; ifiles; ifiles = ifiles->next)
00393 {
00394 const char *t1 = ifiles->filename;
00395 s1 = s;
00396
00397 if (*s1 != *t1 || *s1 == 0)
00398 continue;
00399
00400 while (*s1 == *t1 && *s1 != 0)
00401 s1++, t1++;
00402
00403
00404 if (*s1 == *t1)
00405 return 0;
00406
00407
00408 if (strchr (s1, '.') || strchr (t1, '.'))
00409 continue;
00410
00411 if (*s1 == '\0' || s1[-1] != '.' || t1[-1] != '.')
00412 continue;
00413
00414
00415 return 0;
00416 }
00417
00418
00419 return 1;
00420 }
00421
00422
00423
00424
00425
00426 static tree
00427 parse_strconst_pragma (const char* name, int opt)
00428 {
00429 tree result, x;
00430 enum cpp_ttype t;
00431
00432 t = c_lex (&x);
00433 if (t == CPP_STRING)
00434 {
00435 result = x;
00436 if (c_lex (&x) != CPP_EOF)
00437 warning ("junk at end of #pragma %s", name);
00438 return result;
00439 }
00440
00441 if (t == CPP_EOF && opt)
00442 return 0;
00443
00444 error ("invalid #pragma %s", name);
00445 return (tree)-1;
00446 }
00447
00448 static void
00449 handle_pragma_vtable (cpp_reader* dfile ATTRIBUTE_UNUSED )
00450 {
00451 parse_strconst_pragma ("vtable", 0);
00452 sorry ("#pragma vtable no longer supported");
00453 }
00454
00455 static void
00456 handle_pragma_unit (cpp_reader* dfile ATTRIBUTE_UNUSED )
00457 {
00458
00459 parse_strconst_pragma ("unit", 0);
00460 }
00461
00462 static void
00463 handle_pragma_interface (cpp_reader* dfile ATTRIBUTE_UNUSED )
00464 {
00465 tree fname = parse_strconst_pragma ("interface", 1);
00466 struct c_fileinfo *finfo;
00467 const char *filename;
00468
00469 if (fname == (tree)-1)
00470 return;
00471 else if (fname == 0)
00472 filename = lbasename (input_filename);
00473 else
00474 filename = ggc_strdup (TREE_STRING_POINTER (fname));
00475
00476 finfo = get_fileinfo (filename);
00477
00478 if (impl_file_chain == 0)
00479 {
00480
00481
00482 if (main_input_filename == 0)
00483 main_input_filename = input_filename;
00484 }
00485
00486 finfo->interface_only = interface_strcmp (filename);
00487
00488
00489 if (!MULTIPLE_SYMBOL_SPACES || !finfo->interface_only)
00490 finfo->interface_unknown = 0;
00491
00492 #ifdef KEY
00493 gs_set_program_flag_value (GS_PRAGMA_INTERFACE, 1);
00494 #endif
00495 }
00496
00497
00498
00499
00500
00501
00502
00503
00504
00505
00506 static void
00507 handle_pragma_implementation (cpp_reader* dfile ATTRIBUTE_UNUSED )
00508 {
00509 tree fname = parse_strconst_pragma ("implementation", 1);
00510 const char *filename;
00511 struct impl_files *ifiles = impl_file_chain;
00512
00513 if (fname == (tree)-1)
00514 return;
00515
00516 if (fname == 0)
00517 {
00518 if (main_input_filename)
00519 filename = main_input_filename;
00520 else
00521 filename = input_filename;
00522 filename = lbasename (filename);
00523 }
00524 else
00525 {
00526 filename = ggc_strdup (TREE_STRING_POINTER (fname));
00527 #if 0
00528
00529
00530
00531
00532
00533
00534 if (cpp_included (parse_in, filename))
00535 warning ("#pragma implementation for %qs appears after "
00536 "file is included", filename);
00537 #endif
00538 }
00539
00540 for (; ifiles; ifiles = ifiles->next)
00541 {
00542 if (! strcmp (ifiles->filename, filename))
00543 break;
00544 }
00545 if (ifiles == 0)
00546 {
00547 ifiles = xmalloc (sizeof (struct impl_files));
00548 ifiles->filename = filename;
00549 ifiles->next = impl_file_chain;
00550 impl_file_chain = ifiles;
00551 }
00552
00553 #ifdef KEY
00554 gs_set_program_flag_value (GS_PRAGMA_IMPLEMENTATION, 1);
00555 #endif
00556 }
00557
00558
00559 static void
00560 handle_pragma_java_exceptions (cpp_reader* dfile ATTRIBUTE_UNUSED )
00561 {
00562 tree x;
00563 if (c_lex (&x) != CPP_EOF)
00564 warning ("junk at end of #pragma GCC java_exceptions");
00565
00566 choose_personality_routine (lang_java);
00567 }
00568
00569
00570
00571
00572 tree
00573 unqualified_name_lookup_error (tree name)
00574 {
00575 if (IDENTIFIER_OPNAME_P (name))
00576 {
00577 if (name != ansi_opname (ERROR_MARK))
00578 error ("%qD not defined", name);
00579 }
00580 else
00581 {
00582 error ("%qD was not declared in this scope", name);
00583
00584
00585 if (current_function_decl)
00586 {
00587 tree decl;
00588 decl = build_decl (VAR_DECL, name, error_mark_node);
00589 DECL_CONTEXT (decl) = current_function_decl;
00590 push_local_binding (name, decl, 0);
00591
00592
00593 TREE_USED (decl) = 1;
00594 }
00595 }
00596
00597 return error_mark_node;
00598 }
00599
00600
00601
00602
00603
00604 tree
00605 unqualified_fn_lookup_error (tree name)
00606 {
00607 if (processing_template_decl)
00608 {
00609
00610
00611
00612
00613
00614
00615
00616
00617
00618
00619 pedwarn ("there are no arguments to %qD that depend on a template "
00620 "parameter, so a declaration of %qD must be available",
00621 name, name);
00622
00623 if (!flag_permissive)
00624 {
00625 static bool hint;
00626 if (!hint)
00627 {
00628 error ("(if you use %<-fpermissive%>, G++ will accept your "
00629 "code, but allowing the use of an undeclared name is "
00630 "deprecated)");
00631 hint = true;
00632 }
00633 }
00634 return name;
00635 }
00636
00637 return unqualified_name_lookup_error (name);
00638 }
00639
00640 tree
00641 build_lang_decl (enum tree_code code, tree name, tree type)
00642 {
00643 tree t;
00644
00645 t = build_decl (code, name, type);
00646 retrofit_lang_decl (t);
00647
00648
00649
00650 if (code == FUNCTION_DECL)
00651 DECL_NO_STATIC_CHAIN (t) = 1;
00652
00653 return t;
00654 }
00655
00656
00657
00658
00659 void
00660 retrofit_lang_decl (tree t)
00661 {
00662 struct lang_decl *ld;
00663 size_t size;
00664
00665 if (CAN_HAVE_FULL_LANG_DECL_P (t))
00666 size = sizeof (struct lang_decl);
00667 else
00668 size = sizeof (struct lang_decl_flags);
00669
00670 ld = GGC_CNEWVAR (struct lang_decl, size);
00671
00672 ld->decl_flags.can_be_full = CAN_HAVE_FULL_LANG_DECL_P (t) ? 1 : 0;
00673 ld->decl_flags.u1sel = TREE_CODE (t) == NAMESPACE_DECL ? 1 : 0;
00674 ld->decl_flags.u2sel = 0;
00675 if (ld->decl_flags.can_be_full)
00676 ld->u.f.u3sel = TREE_CODE (t) == FUNCTION_DECL ? 1 : 0;
00677
00678 DECL_LANG_SPECIFIC (t) = ld;
00679 if (current_lang_name == lang_name_cplusplus
00680 || decl_linkage (t) == lk_none)
00681 SET_DECL_LANGUAGE (t, lang_cplusplus);
00682 else if (current_lang_name == lang_name_c)
00683 SET_DECL_LANGUAGE (t, lang_c);
00684 else if (current_lang_name == lang_name_java)
00685 SET_DECL_LANGUAGE (t, lang_java);
00686 else
00687 gcc_unreachable ();
00688
00689 #ifdef GATHER_STATISTICS
00690 tree_node_counts[(int)lang_decl] += 1;
00691 tree_node_sizes[(int)lang_decl] += size;
00692 #endif
00693 }
00694
00695 void
00696 cxx_dup_lang_specific_decl (tree node)
00697 {
00698 int size;
00699 struct lang_decl *ld;
00700
00701 if (! DECL_LANG_SPECIFIC (node))
00702 return;
00703
00704 if (!CAN_HAVE_FULL_LANG_DECL_P (node))
00705 size = sizeof (struct lang_decl_flags);
00706 else
00707 size = sizeof (struct lang_decl);
00708 ld = GGC_NEWVAR (struct lang_decl, size);
00709 memcpy (ld, DECL_LANG_SPECIFIC (node), size);
00710 DECL_LANG_SPECIFIC (node) = ld;
00711
00712 #ifdef GATHER_STATISTICS
00713 tree_node_counts[(int)lang_decl] += 1;
00714 tree_node_sizes[(int)lang_decl] += size;
00715 #endif
00716 }
00717
00718
00719
00720 tree
00721 copy_decl (tree decl)
00722 {
00723 tree copy;
00724
00725 copy = copy_node (decl);
00726 cxx_dup_lang_specific_decl (copy);
00727 return copy;
00728 }
00729
00730
00731
00732 static void
00733 copy_lang_type (tree node)
00734 {
00735 int size;
00736 struct lang_type *lt;
00737
00738 if (! TYPE_LANG_SPECIFIC (node))
00739 return;
00740
00741 if (TYPE_LANG_SPECIFIC (node)->u.h.is_lang_type_class)
00742 size = sizeof (struct lang_type);
00743 else
00744 size = sizeof (struct lang_type_ptrmem);
00745 lt = GGC_NEWVAR (struct lang_type, size);
00746 memcpy (lt, TYPE_LANG_SPECIFIC (node), size);
00747 TYPE_LANG_SPECIFIC (node) = lt;
00748
00749 #ifdef GATHER_STATISTICS
00750 tree_node_counts[(int)lang_type] += 1;
00751 tree_node_sizes[(int)lang_type] += size;
00752 #endif
00753 }
00754
00755
00756
00757 tree
00758 copy_type (tree type)
00759 {
00760 tree copy;
00761
00762 copy = copy_node (type);
00763 copy_lang_type (copy);
00764 return copy;
00765 }
00766
00767 tree
00768 cxx_make_type (enum tree_code code)
00769 {
00770 tree t = make_node (code);
00771
00772
00773 if (IS_AGGR_TYPE_CODE (code)
00774 || code == BOUND_TEMPLATE_TEMPLATE_PARM)
00775 {
00776 struct lang_type *pi = GGC_CNEW (struct lang_type);
00777
00778 TYPE_LANG_SPECIFIC (t) = pi;
00779 pi->u.c.h.is_lang_type_class = 1;
00780
00781 #ifdef GATHER_STATISTICS
00782 tree_node_counts[(int)lang_type] += 1;
00783 tree_node_sizes[(int)lang_type] += sizeof (struct lang_type);
00784 #endif
00785 }
00786
00787
00788 if (IS_AGGR_TYPE_CODE (code))
00789 {
00790 struct c_fileinfo *finfo = get_fileinfo (lbasename (input_filename));
00791 SET_CLASSTYPE_INTERFACE_UNKNOWN_X (t, finfo->interface_unknown);
00792 CLASSTYPE_INTERFACE_ONLY (t) = finfo->interface_only;
00793 }
00794
00795 return t;
00796 }
00797
00798 tree
00799 make_aggr_type (enum tree_code code)
00800 {
00801 tree t = cxx_make_type (code);
00802
00803 if (IS_AGGR_TYPE_CODE (code))
00804 SET_IS_AGGR_TYPE (t, 1);
00805
00806 return t;
00807 }