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 #ifndef GCC_C_COMMON_H
00027 #define GCC_C_COMMON_H
00028
00029 #include "splay-tree.h"
00030 #include "cpplib.h"
00031 #ifdef KEY
00032 #include "omp_types.h"
00033 #endif
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058 enum rid
00059 {
00060
00061
00062 RID_STATIC = 0,
00063 RID_UNSIGNED, RID_LONG, RID_CONST, RID_EXTERN,
00064 RID_REGISTER, RID_TYPEDEF, RID_SHORT, RID_INLINE,
00065 RID_VOLATILE, RID_SIGNED, RID_AUTO, RID_RESTRICT,
00066
00067
00068 #if defined(TARG_SL)
00069
00070 RID_SBUF,
00071 RID_V1BUF, RID_V2BUF, RID_V4BUF,
00072 #endif
00073
00074 RID_BOUNDED, RID_UNBOUNDED, RID_COMPLEX, RID_THREAD,
00075
00076
00077 RID_FRIEND, RID_VIRTUAL, RID_EXPLICIT, RID_EXPORT, RID_MUTABLE,
00078
00079
00080 RID_IN, RID_OUT, RID_INOUT, RID_BYCOPY, RID_BYREF, RID_ONEWAY,
00081
00082
00083 RID_INT, RID_CHAR, RID_FLOAT, RID_DOUBLE, RID_VOID,
00084 RID_ENUM, RID_STRUCT, RID_UNION, RID_IF, RID_ELSE,
00085 RID_WHILE, RID_DO, RID_FOR, RID_SWITCH, RID_CASE,
00086 RID_DEFAULT, RID_BREAK, RID_CONTINUE, RID_RETURN, RID_GOTO,
00087 RID_SIZEOF,
00088
00089
00090 RID_ASM, RID_TYPEOF, RID_ALIGNOF, RID_ATTRIBUTE, RID_VA_ARG,
00091 RID_EXTENSION, RID_IMAGPART, RID_REALPART, RID_LABEL, RID_PTRBASE,
00092 RID_PTREXTENT, RID_PTRVALUE, RID_CHOOSE_EXPR, RID_TYPES_COMPATIBLE_P,
00093
00094
00095 RID_FUNCTION_NAME, RID_PRETTY_FUNCTION_NAME, RID_C99_FUNCTION_NAME,
00096
00097
00098 RID_BOOL, RID_WCHAR, RID_CLASS,
00099 RID_PUBLIC, RID_PRIVATE, RID_PROTECTED,
00100 RID_TEMPLATE, RID_NULL, RID_CATCH,
00101 RID_DELETE, RID_FALSE, RID_NAMESPACE,
00102 RID_NEW, RID_OFFSETOF, RID_OPERATOR, RID_THIS,
00103 RID_THROW, RID_TRUE, RID_TRY,
00104 RID_TYPENAME, RID_TYPEID, RID_USING,
00105
00106
00107 RID_CONSTCAST, RID_DYNCAST, RID_REINTCAST, RID_STATCAST,
00108
00109
00110 RID_ID, RID_AT_ENCODE, RID_AT_END,
00111 RID_AT_CLASS, RID_AT_ALIAS, RID_AT_DEFS,
00112 RID_AT_PRIVATE, RID_AT_PROTECTED, RID_AT_PUBLIC,
00113 RID_AT_PROTOCOL, RID_AT_SELECTOR, RID_AT_INTERFACE,
00114 RID_AT_IMPLEMENTATION,
00115
00116
00117 RID_MAX,
00118
00119 RID_FIRST_MODIFIER = RID_STATIC,
00120 RID_LAST_MODIFIER = RID_ONEWAY,
00121
00122 RID_FIRST_AT = RID_AT_ENCODE,
00123 RID_LAST_AT = RID_AT_IMPLEMENTATION,
00124 RID_FIRST_PQ = RID_IN,
00125 RID_LAST_PQ = RID_ONEWAY
00126 };
00127
00128 #define OBJC_IS_AT_KEYWORD(rid) \
00129 ((unsigned int)(rid) >= (unsigned int)RID_FIRST_AT && \
00130 (unsigned int)(rid) <= (unsigned int)RID_LAST_AT)
00131
00132 #define OBJC_IS_PQ_KEYWORD(rid) \
00133 ((unsigned int)(rid) >= (unsigned int)RID_FIRST_PQ && \
00134 (unsigned int)(rid) <= (unsigned int)RID_LAST_PQ)
00135
00136
00137
00138 extern tree *ridpointers;
00139
00140
00141
00142 enum c_tree_index
00143 {
00144 CTI_WCHAR_TYPE,
00145 CTI_SIGNED_WCHAR_TYPE,
00146 CTI_UNSIGNED_WCHAR_TYPE,
00147 CTI_WINT_TYPE,
00148 CTI_SIGNED_SIZE_TYPE,
00149 CTI_UNSIGNED_PTRDIFF_TYPE,
00150 CTI_INTMAX_TYPE,
00151 CTI_UINTMAX_TYPE,
00152 CTI_WIDEST_INT_LIT_TYPE,
00153 CTI_WIDEST_UINT_LIT_TYPE,
00154
00155 CTI_CHAR_ARRAY_TYPE,
00156 CTI_WCHAR_ARRAY_TYPE,
00157 CTI_INT_ARRAY_TYPE,
00158 CTI_STRING_TYPE,
00159 CTI_CONST_STRING_TYPE,
00160
00161
00162 CTI_BOOLEAN_TYPE,
00163 CTI_BOOLEAN_TRUE,
00164 CTI_BOOLEAN_FALSE,
00165
00166 CTI_C_BOOL_TYPE,
00167 CTI_C_BOOL_TRUE,
00168 CTI_C_BOOL_FALSE,
00169 CTI_DEFAULT_FUNCTION_TYPE,
00170
00171 CTI_G77_INTEGER_TYPE,
00172 CTI_G77_UINTEGER_TYPE,
00173 CTI_G77_LONGINT_TYPE,
00174 CTI_G77_ULONGINT_TYPE,
00175
00176
00177 CTI_FUNCTION_NAME_DECL,
00178 CTI_PRETTY_FUNCTION_NAME_DECL,
00179 CTI_C99_FUNCTION_NAME_DECL,
00180 CTI_SAVED_FUNCTION_NAME_DECLS,
00181
00182 CTI_VOID_ZERO,
00183
00184 CTI_MAX
00185 };
00186
00187 #define C_RID_CODE(id) (((struct c_common_identifier *) (id))->node.rid_code)
00188
00189
00190
00191 struct c_common_identifier GTY(())
00192 {
00193 struct tree_common common;
00194 struct cpp_hashnode GTY ((skip (""))) node;
00195 };
00196
00197 #define wchar_type_node c_global_trees[CTI_WCHAR_TYPE]
00198 #define signed_wchar_type_node c_global_trees[CTI_SIGNED_WCHAR_TYPE]
00199 #define unsigned_wchar_type_node c_global_trees[CTI_UNSIGNED_WCHAR_TYPE]
00200 #define wint_type_node c_global_trees[CTI_WINT_TYPE]
00201 #define signed_size_type_node c_global_trees[CTI_SIGNED_SIZE_TYPE]
00202 #define unsigned_ptrdiff_type_node c_global_trees[CTI_UNSIGNED_PTRDIFF_TYPE]
00203 #define intmax_type_node c_global_trees[CTI_INTMAX_TYPE]
00204 #define uintmax_type_node c_global_trees[CTI_UINTMAX_TYPE]
00205 #define widest_integer_literal_type_node c_global_trees[CTI_WIDEST_INT_LIT_TYPE]
00206 #define widest_unsigned_literal_type_node c_global_trees[CTI_WIDEST_UINT_LIT_TYPE]
00207
00208 #define boolean_type_node c_global_trees[CTI_BOOLEAN_TYPE]
00209 #define boolean_true_node c_global_trees[CTI_BOOLEAN_TRUE]
00210 #define boolean_false_node c_global_trees[CTI_BOOLEAN_FALSE]
00211
00212 #define c_bool_type_node c_global_trees[CTI_C_BOOL_TYPE]
00213 #define c_bool_true_node c_global_trees[CTI_C_BOOL_TRUE]
00214 #define c_bool_false_node c_global_trees[CTI_C_BOOL_FALSE]
00215
00216 #define char_array_type_node c_global_trees[CTI_CHAR_ARRAY_TYPE]
00217 #define wchar_array_type_node c_global_trees[CTI_WCHAR_ARRAY_TYPE]
00218 #define int_array_type_node c_global_trees[CTI_INT_ARRAY_TYPE]
00219 #define string_type_node c_global_trees[CTI_STRING_TYPE]
00220 #define const_string_type_node c_global_trees[CTI_CONST_STRING_TYPE]
00221
00222 #define default_function_type c_global_trees[CTI_DEFAULT_FUNCTION_TYPE]
00223
00224
00225 #define g77_integer_type_node c_global_trees[CTI_G77_INTEGER_TYPE]
00226 #define g77_uinteger_type_node c_global_trees[CTI_G77_UINTEGER_TYPE]
00227 #define g77_longint_type_node c_global_trees[CTI_G77_LONGINT_TYPE]
00228 #define g77_ulongint_type_node c_global_trees[CTI_G77_ULONGINT_TYPE]
00229
00230 #define function_name_decl_node c_global_trees[CTI_FUNCTION_NAME_DECL]
00231 #define pretty_function_name_decl_node c_global_trees[CTI_PRETTY_FUNCTION_NAME_DECL]
00232 #define c99_function_name_decl_node c_global_trees[CTI_C99_FUNCTION_NAME_DECL]
00233 #define saved_function_name_decls c_global_trees[CTI_SAVED_FUNCTION_NAME_DECLS]
00234
00235
00236 #define void_zero_node c_global_trees[CTI_VOID_ZERO]
00237
00238 extern GTY(()) tree c_global_trees[CTI_MAX];
00239
00240
00241
00242 #define C_DECLARED_LABEL_FLAG(label) TREE_LANG_FLAG_1 (label)
00243
00244
00245
00246 #define C_ARTIFICIAL_STRING_P(NODE) TREE_LANG_FLAG_0 (NODE)
00247
00248 typedef enum c_language_kind
00249 {
00250 clk_c = 0,
00251 clk_cplusplus
00252 }
00253 c_language_kind;
00254
00255
00256
00257 struct stmt_tree_s GTY(()) {
00258
00259 tree x_last_stmt;
00260
00261
00262 tree x_last_expr_type;
00263
00264 const char *x_last_expr_filename;
00265
00266
00267
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279 int stmts_are_full_exprs_p;
00280 };
00281
00282 typedef struct stmt_tree_s *stmt_tree;
00283
00284
00285
00286
00287 struct c_language_function GTY(()) {
00288
00289
00290 struct stmt_tree_s x_stmt_tree;
00291
00292 tree x_scope_stmt_stack;
00293 };
00294
00295
00296
00297
00298 #define last_tree (current_stmt_tree ()->x_last_stmt)
00299
00300
00301
00302 #define last_expr_type (current_stmt_tree ()->x_last_expr_type)
00303
00304
00305
00306 #define last_expr_filename (current_stmt_tree ()->x_last_expr_filename)
00307
00308
00309
00310
00311
00312
00313 #define RECHAIN_STMTS(stmt, substmt) \
00314 do { \
00315 substmt = TREE_CHAIN (stmt); \
00316 TREE_CHAIN (stmt) = NULL_TREE; \
00317 last_tree = stmt; \
00318 } while (0)
00319
00320
00321
00322 extern int (*lang_statement_code_p) PARAMS ((enum tree_code));
00323 extern void (*lang_expand_stmt) PARAMS ((tree));
00324 extern void (*lang_expand_decl_stmt) PARAMS ((tree));
00325 extern void (*lang_expand_function_end) PARAMS ((void));
00326 extern tree gettags PARAMS ((void));
00327
00328
00329
00330 extern int (*lang_missing_noreturn_ok_p) PARAMS ((tree));
00331
00332 extern int yyparse PARAMS ((void));
00333 extern void free_parser_stacks PARAMS ((void));
00334
00335 extern stmt_tree current_stmt_tree PARAMS ((void));
00336 extern tree *current_scope_stmt_stack PARAMS ((void));
00337 extern void begin_stmt_tree PARAMS ((tree *));
00338 extern tree add_stmt PARAMS ((tree));
00339 extern void add_decl_stmt PARAMS ((tree));
00340 extern tree add_scope_stmt PARAMS ((int, int));
00341 extern void finish_stmt_tree PARAMS ((tree *));
00342
00343 extern int statement_code_p PARAMS ((enum tree_code));
00344 extern tree walk_stmt_tree PARAMS ((tree *,
00345 walk_tree_fn,
00346 void *));
00347 extern void prep_stmt PARAMS ((tree));
00348 extern void expand_stmt PARAMS ((tree));
00349 extern void shadow_warning PARAMS ((const char *,
00350 tree, tree));
00351 extern tree c_begin_if_stmt PARAMS ((void));
00352 extern tree c_begin_while_stmt PARAMS ((void));
00353 extern void c_finish_while_stmt_cond PARAMS ((tree, tree));
00354
00355
00356
00357
00358
00359
00360
00361 struct c_lang_decl GTY(()) {
00362 unsigned declared_inline : 1;
00363 };
00364
00365
00366
00367
00368
00369 #define DECL_NUM_STMTS(NODE) \
00370 (FUNCTION_DECL_CHECK (NODE)->decl.u1.i)
00371
00372
00373
00374
00375 extern c_language_kind c_language;
00376
00377
00378
00379
00380 extern int flag_preprocess_only;
00381
00382
00383
00384 extern int flag_iso;
00385
00386
00387 extern int flag_objc;
00388
00389
00390
00391 extern int flag_undef;
00392
00393
00394
00395 extern int flag_no_builtin;
00396
00397
00398
00399
00400 extern int flag_no_nonansi_builtin;
00401
00402
00403
00404 extern int flag_short_double;
00405
00406
00407
00408 extern int flag_short_wchar;
00409
00410
00411 extern int flag_ms_extensions;
00412
00413
00414
00415 extern int flag_no_asm;
00416
00417
00418
00419
00420 extern int flag_const_strings;
00421
00422
00423
00424 extern int dollars_in_ident;
00425
00426
00427
00428 extern int flag_signed_bitfields;
00429 extern int explicit_flag_signed_bitfields;
00430
00431
00432
00433
00434 extern int warn_cast_qual;
00435
00436
00437
00438 extern int warn_missing_format_attribute;
00439
00440
00441
00442
00443 extern int warn_pointer_arith;
00444
00445
00446
00447
00448 extern int warn_missing_prototypes;
00449
00450
00451
00452 extern int warn_parentheses;
00453
00454
00455
00456 extern int warn_missing_braces;
00457
00458
00459
00460
00461 extern int warn_sign_compare;
00462
00463
00464
00465 extern int warn_long_long;
00466
00467
00468
00469
00470 extern int warn_write_strings;
00471
00472
00473
00474
00475 extern int warn_redundant_decls;
00476
00477
00478
00479 extern int warn_float_equal;
00480
00481
00482
00483 extern int warn_char_subscripts;
00484
00485
00486
00487 extern int warn_conversion;
00488
00489
00490
00491 extern int warn_unknown_pragmas;
00492
00493
00494
00495
00496 extern int warn_format;
00497
00498
00499
00500 extern int warn_format_y2k;
00501
00502
00503
00504 extern int warn_format_extra_args;
00505
00506
00507
00508 extern int warn_format_zero_length;
00509
00510
00511
00512 extern int warn_format_nonliteral;
00513
00514
00515
00516 extern int warn_format_security;
00517
00518
00519
00520
00521
00522
00523
00524
00525 extern int mesg_implicit_function_declaration;
00526
00527
00528
00529
00530 extern int flag_cond_mismatch;
00531
00532
00533
00534 extern int flag_isoc94;
00535
00536
00537
00538 extern int flag_isoc99;
00539
00540
00541
00542 extern int flag_hosted;
00543
00544
00545
00546
00547 extern int flag_noniso_default_format_attributes;
00548
00549
00550
00551
00552
00553 extern int warn_bad_function_cast;
00554
00555
00556
00557 extern int warn_traditional;
00558
00559
00560
00561 extern int warn_declaration_after_statement;
00562
00563
00564
00565
00566 extern int warn_strict_prototypes;
00567
00568
00569
00570
00571 extern int warn_missing_declarations;
00572
00573
00574
00575
00576
00577
00578
00579 extern int warn_nested_externs;
00580
00581
00582
00583 extern int warn_main;
00584
00585
00586
00587 extern int warn_sequence_point;
00588
00589
00590 extern int warn_div_by_zero;
00591
00592
00593
00594 extern int warn_implicit_int;
00595
00596
00597
00598
00599 extern int warn_nonnull;
00600
00601
00602
00603
00604
00605
00606
00607
00608 extern int flag_gen_declaration;
00609
00610
00611
00612 extern int flag_next_runtime;
00613
00614
00615
00616
00617
00618 extern int print_struct_values;
00619
00620
00621
00622 extern const char *constant_string_class_name;
00623
00624
00625
00626
00627
00628 extern int warn_selector;
00629
00630
00631
00632
00633
00634
00635 extern int warn_undeclared_selector;
00636
00637
00638
00639
00640
00641 extern int warn_protocol;
00642
00643
00644
00645
00646
00647
00648
00649 extern int flag_no_gnu_keywords;
00650
00651
00652
00653
00654 extern int flag_implement_inlines;
00655
00656
00657
00658
00659 extern int flag_external_templates;
00660
00661
00662
00663
00664
00665 extern int flag_alt_external_templates;
00666
00667
00668
00669 extern int flag_implicit_templates;
00670
00671
00672
00673
00674
00675 extern int flag_implicit_inline_templates;
00676
00677
00678
00679
00680 extern int flag_use_repository;
00681
00682
00683
00684
00685 extern int flag_optional_diags;
00686
00687
00688
00689 extern int flag_elide_constructors;
00690
00691
00692
00693
00694 extern int flag_default_inline;
00695
00696
00697
00698
00699 extern int flag_rtti;
00700
00701
00702
00703
00704
00705
00706 extern int flag_conserve_space;
00707
00708
00709
00710 extern int flag_access_control;
00711
00712
00713
00714
00715 extern int flag_check_new;
00716
00717
00718
00719
00720
00721
00722
00723
00724 extern int flag_new_for_scope;
00725
00726
00727
00728
00729
00730 extern int flag_weak;
00731
00732
00733
00734
00735 extern int flag_use_cxa_atexit;
00736
00737
00738
00739 extern int flag_vtable_gc;
00740
00741
00742
00743
00744 extern int flag_permissive;
00745
00746
00747
00748
00749
00750
00751 extern int flag_enforce_eh_specs;
00752
00753
00754
00755
00756
00757
00758
00759
00760
00761
00762
00763
00764
00765
00766 extern int flag_abi_version;
00767
00768
00769
00770
00771 extern int warn_abi;
00772
00773
00774
00775 extern int warn_implicit;
00776
00777
00778
00779
00780 extern int warn_ctor_dtor_privacy;
00781
00782
00783
00784
00785
00786 extern int warn_overloaded_virtual;
00787
00788
00789
00790
00791 extern int warn_nonvdtor;
00792
00793
00794
00795 extern int warn_reorder;
00796
00797
00798
00799 extern int warn_synth;
00800
00801
00802
00803
00804 extern int warn_pmf2ptr;
00805
00806
00807
00808 extern int warn_ecpp;
00809
00810
00811
00812
00813 extern int warn_sign_promo;
00814
00815
00816
00817 extern int warn_old_style_cast;
00818
00819
00820
00821
00822 extern int warn_nontemplate_friend;
00823
00824
00825
00826 extern int warn_deprecated;
00827
00828
00829
00830
00831
00832 extern int max_tinst_depth;
00833
00834
00835
00836
00837 extern int skip_evaluation;
00838
00839
00840
00841 #define C_TYPE_OBJECT_P(type) \
00842 (TREE_CODE (type) != FUNCTION_TYPE && TYPE_SIZE (type))
00843
00844 #define C_TYPE_INCOMPLETE_P(type) \
00845 (TREE_CODE (type) != FUNCTION_TYPE && TYPE_SIZE (type) == 0)
00846
00847 #define C_TYPE_FUNCTION_P(type) \
00848 (TREE_CODE (type) == FUNCTION_TYPE)
00849
00850
00851
00852 #define C_TYPE_OBJECT_OR_INCOMPLETE_P(type) \
00853 (!C_TYPE_FUNCTION_P (type))
00854
00855
00856
00857 #define C_EXP_ORIGINAL_CODE(exp) ((enum tree_code) TREE_COMPLEXITY (exp))
00858
00859
00860 extern const struct attribute_spec c_common_attribute_table[];
00861 extern const struct attribute_spec c_common_format_attribute_table[];
00862
00863
00864
00865
00866
00867
00868 extern tree (*make_fname_decl) PARAMS ((tree, int));
00869
00870 extern tree identifier_global_value PARAMS ((tree));
00871 extern void record_builtin_type PARAMS ((enum rid,
00872 const char *, tree));
00873 extern tree build_void_list_node PARAMS ((void));
00874 extern void start_fname_decls PARAMS ((void));
00875 extern void finish_fname_decls PARAMS ((void));
00876 extern const char *fname_as_string PARAMS ((int));
00877 extern tree fname_decl PARAMS ((unsigned, tree));
00878 extern const char *fname_string PARAMS ((unsigned));
00879
00880 extern void check_function_arguments PARAMS ((tree, tree));
00881 extern void check_function_arguments_recurse PARAMS ((void (*) (void *,
00882 tree,
00883 unsigned HOST_WIDE_INT),
00884 void *, tree,
00885 unsigned HOST_WIDE_INT));
00886 extern void check_function_format PARAMS ((int *, tree, tree));
00887 extern void set_Wformat PARAMS ((int));
00888 extern tree handle_format_attribute PARAMS ((tree *, tree, tree,
00889 int, bool *));
00890 extern tree handle_format_arg_attribute PARAMS ((tree *, tree, tree,
00891 int, bool *));
00892 extern void c_common_insert_default_attributes PARAMS ((tree));
00893 extern int c_common_decode_option PARAMS ((int, char **));
00894 extern tree c_common_type_for_mode PARAMS ((enum machine_mode,
00895 int));
00896 extern tree c_common_type_for_size PARAMS ((unsigned int, int));
00897 extern tree c_common_unsigned_type PARAMS ((tree));
00898 extern tree c_common_signed_type PARAMS ((tree));
00899 extern tree c_common_signed_or_unsigned_type PARAMS ((int, tree));
00900 extern tree c_common_truthvalue_conversion PARAMS ((tree));
00901 extern void c_apply_type_quals_to_decl PARAMS ((int, tree));
00902 extern tree c_sizeof_or_alignof_type PARAMS ((tree, enum tree_code, int));
00903 extern tree c_alignof_expr PARAMS ((tree));
00904
00905
00906 extern void binary_op_error PARAMS ((enum tree_code));
00907 #define my_friendly_assert(EXP, N) (void) \
00908 (((EXP) == 0) ? (fancy_abort (__FILE__, __LINE__, __FUNCTION__), 0) : 0)
00909
00910 extern tree c_expand_expr_stmt PARAMS ((tree));
00911 extern void c_expand_start_cond PARAMS ((tree, int, tree));
00912 extern void c_finish_then PARAMS ((void));
00913 extern void c_expand_start_else PARAMS ((void));
00914 extern void c_finish_else PARAMS ((void));
00915 extern void c_expand_end_cond PARAMS ((void));
00916
00917 extern tree check_case_value PARAMS ((tree));
00918 extern tree fix_string_type PARAMS ((tree));
00919 struct varray_head_tag;
00920 extern tree combine_strings PARAMS ((struct varray_head_tag *));
00921 extern void constant_expression_warning PARAMS ((tree));
00922 extern tree convert_and_check PARAMS ((tree, tree));
00923 extern void overflow_warning PARAMS ((tree));
00924 extern void unsigned_conversion_warning PARAMS ((tree, tree));
00925
00926
00927 extern char *get_directive_line PARAMS ((void));
00928 #define GET_DIRECTIVE_LINE() get_directive_line ()
00929 #define c_sizeof(T) c_sizeof_or_alignof_type (T, SIZEOF_EXPR, 1)
00930 #define c_alignof(T) c_sizeof_or_alignof_type (T, ALIGNOF_EXPR, 1)
00931
00932
00933
00934
00935 extern tree shorten_compare PARAMS ((tree *, tree *, tree *, enum tree_code *));
00936
00937 extern tree pointer_int_sum PARAMS ((enum tree_code, tree, tree));
00938 extern unsigned int min_precision PARAMS ((tree, int));
00939
00940
00941 extern tree c_build_qualified_type PARAMS ((tree, int));
00942
00943
00944
00945 extern void c_common_nodes_and_builtins PARAMS ((void));
00946
00947 extern void disable_builtin_function PARAMS ((const char *));
00948
00949 extern tree build_va_arg PARAMS ((tree, tree));
00950
00951 extern void c_common_init_options PARAMS ((enum c_language_kind));
00952 extern bool c_common_post_options PARAMS ((void));
00953 extern const char *c_common_init PARAMS ((const char *));
00954 extern void c_common_finish PARAMS ((void));
00955 extern void c_common_parse_file PARAMS ((int));
00956 extern HOST_WIDE_INT c_common_get_alias_set PARAMS ((tree));
00957 extern bool c_promoting_integer_type_p PARAMS ((tree));
00958 extern int self_promoting_args_p PARAMS ((tree));
00959 extern tree strip_array_types PARAMS ((tree));
00960
00961
00962
00963
00964
00965
00966
00967 #define STMT_IS_FULL_EXPR_P(NODE) TREE_LANG_FLAG_1 ((NODE))
00968
00969
00970
00971
00972 #define IF_COND(NODE) TREE_OPERAND (IF_STMT_CHECK (NODE), 0)
00973 #define THEN_CLAUSE(NODE) TREE_OPERAND (IF_STMT_CHECK (NODE), 1)
00974 #define ELSE_CLAUSE(NODE) TREE_OPERAND (IF_STMT_CHECK (NODE), 2)
00975
00976
00977
00978 #define WHILE_COND(NODE) TREE_OPERAND (WHILE_STMT_CHECK (NODE), 0)
00979 #define WHILE_BODY(NODE) TREE_OPERAND (WHILE_STMT_CHECK (NODE), 1)
00980
00981
00982
00983 #define DO_COND(NODE) TREE_OPERAND (DO_STMT_CHECK (NODE), 0)
00984 #define DO_BODY(NODE) TREE_OPERAND (DO_STMT_CHECK (NODE), 1)
00985
00986
00987
00988
00989 #define RETURN_STMT_EXPR(NODE) TREE_OPERAND (RETURN_STMT_CHECK (NODE), 0)
00990
00991
00992
00993 #define EXPR_STMT_EXPR(NODE) TREE_OPERAND (EXPR_STMT_CHECK (NODE), 0)
00994
00995
00996
00997
00998 #define FOR_INIT_STMT(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 0)
00999 #define FOR_COND(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 1)
01000 #define FOR_EXPR(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 2)
01001 #define FOR_BODY(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 3)
01002
01003
01004
01005
01006 #define SWITCH_COND(NODE) TREE_OPERAND (SWITCH_STMT_CHECK (NODE), 0)
01007 #define SWITCH_BODY(NODE) TREE_OPERAND (SWITCH_STMT_CHECK (NODE), 1)
01008 #define SWITCH_TYPE(NODE) TREE_OPERAND (SWITCH_STMT_CHECK (NODE), 2)
01009
01010
01011
01012 #define CASE_LOW(NODE) TREE_OPERAND (CASE_LABEL_CHECK (NODE), 0)
01013 #define CASE_HIGH(NODE) TREE_OPERAND (CASE_LABEL_CHECK (NODE), 1)
01014 #define CASE_LABEL_DECL(NODE) TREE_OPERAND (CASE_LABEL_CHECK (NODE), 2)
01015
01016
01017
01018 #define GOTO_DESTINATION(NODE) TREE_OPERAND (GOTO_STMT_CHECK (NODE), 0)
01019
01020 #define GOTO_FAKE_P(NODE) (TREE_LANG_FLAG_0 (GOTO_STMT_CHECK (NODE)))
01021
01022
01023
01024
01025
01026 #define COMPOUND_BODY(NODE) TREE_OPERAND (COMPOUND_STMT_CHECK (NODE), 0)
01027
01028
01029
01030
01031
01032 #define ASM_CV_QUAL(NODE) TREE_OPERAND (ASM_STMT_CHECK (NODE), 0)
01033 #define ASM_STRING(NODE) TREE_OPERAND (ASM_STMT_CHECK (NODE), 1)
01034 #define ASM_OUTPUTS(NODE) TREE_OPERAND (ASM_STMT_CHECK (NODE), 2)
01035 #define ASM_INPUTS(NODE) TREE_OPERAND (ASM_STMT_CHECK (NODE), 3)
01036 #define ASM_CLOBBERS(NODE) TREE_OPERAND (ASM_STMT_CHECK (NODE), 4)
01037
01038
01039
01040 #define DECL_STMT_DECL(NODE) TREE_OPERAND (DECL_STMT_CHECK (NODE), 0)
01041
01042
01043 #define STMT_EXPR_STMT(NODE) TREE_OPERAND (STMT_EXPR_CHECK (NODE), 0)
01044
01045
01046 #define STMT_EXPR_NO_SCOPE(NODE) \
01047 TREE_LANG_FLAG_0 (STMT_EXPR_CHECK (NODE))
01048
01049
01050
01051 #define LABEL_STMT_LABEL(NODE) TREE_OPERAND (LABEL_STMT_CHECK (NODE), 0)
01052
01053
01054 #ifndef SGI_MONGOOSE
01055 #define COMPOUND_LITERAL_EXPR_DECL_STMT(NODE) \
01056 TREE_OPERAND (COMPOUND_LITERAL_EXPR_CHECK (NODE), 0)
01057 #else
01058
01059
01060
01061 #define COMPOUND_LITERAL_EXPR_DECL_STMT(NODE) \
01062 TREE_OPERAND (NODE, 0)
01063 #endif
01064 #define COMPOUND_LITERAL_EXPR_DECL(NODE) \
01065 DECL_STMT_DECL (COMPOUND_LITERAL_EXPR_DECL_STMT (NODE))
01066
01067
01068 #define SCOPE_BEGIN_P(NODE) \
01069 (TREE_LANG_FLAG_0 (SCOPE_STMT_CHECK (NODE)))
01070
01071
01072 #define SCOPE_END_P(NODE) \
01073 (!SCOPE_BEGIN_P (SCOPE_STMT_CHECK (NODE)))
01074
01075
01076 #define SCOPE_STMT_BLOCK(NODE) \
01077 (TREE_OPERAND (SCOPE_STMT_CHECK (NODE), 0))
01078
01079
01080 #define SCOPE_NULLIFIED_P(NODE) \
01081 (SCOPE_STMT_BLOCK ((NODE)) == NULL_TREE)
01082
01083
01084
01085
01086 #define SCOPE_NO_CLEANUPS_P(NODE) \
01087 (TREE_LANG_FLAG_3 (SCOPE_STMT_CHECK (NODE)))
01088
01089
01090
01091
01092
01093
01094
01095
01096
01097
01098
01099
01100
01101 #define SCOPE_PARTIAL_P(NODE) \
01102 (TREE_LANG_FLAG_4 (SCOPE_STMT_CHECK (NODE)))
01103
01104
01105 #define ASM_VOLATILE_P(NODE) \
01106 (ASM_CV_QUAL (ASM_STMT_CHECK (NODE)) != NULL_TREE)
01107
01108
01109 #define CLEANUP_DECL(NODE) \
01110 TREE_OPERAND (CLEANUP_STMT_CHECK (NODE), 0)
01111
01112 #define CLEANUP_EXPR(NODE) \
01113 TREE_OPERAND (CLEANUP_STMT_CHECK (NODE), 1)
01114
01115
01116 #ifndef SGI_MONGOOSE
01117 #define FILE_STMT_FILENAME_NODE(NODE) \
01118 (TREE_OPERAND (FILE_STMT_CHECK (NODE), 0))
01119 #else
01120
01121
01122
01123 #define FILE_STMT_FILENAME_NODE(NODE) \
01124 (TREE_OPERAND (NODE, 0))
01125 #endif
01126 #define FILE_STMT_FILENAME(NODE) \
01127 (IDENTIFIER_POINTER (FILE_STMT_FILENAME_NODE (NODE)))
01128
01129
01130
01131
01132 #define STMT_LINENO(NODE) \
01133 (TREE_COMPLEXITY ((NODE)))
01134
01135
01136
01137 #define STMT_LINENO_FOR_FN_P(NODE) \
01138 (TREE_LANG_FLAG_2 ((NODE)))
01139
01140
01141
01142 #define NEW_FOR_SCOPE_P(NODE) (TREE_LANG_FLAG_0 (NODE))
01143
01144
01145
01146 #define ASM_INPUT_P(NODE) (TREE_LANG_FLAG_0 (NODE))
01147
01148 #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) SYM,
01149
01150 enum c_tree_code {
01151 C_DUMMY_TREE_CODE = LAST_AND_UNUSED_TREE_CODE,
01152 #include "c-common.def"
01153 LAST_C_TREE_CODE
01154 };
01155
01156 #undef DEFTREECODE
01157
01158 extern void genrtl_do_pushlevel PARAMS ((void));
01159 extern void genrtl_goto_stmt PARAMS ((tree));
01160 extern void genrtl_expr_stmt PARAMS ((tree));
01161 extern void genrtl_expr_stmt_value PARAMS ((tree, int, int));
01162 extern void genrtl_decl_stmt PARAMS ((tree));
01163 extern void genrtl_if_stmt PARAMS ((tree));
01164 extern void genrtl_while_stmt PARAMS ((tree));
01165 extern void genrtl_do_stmt PARAMS ((tree));
01166 extern void genrtl_return_stmt PARAMS ((tree));
01167 extern void genrtl_for_stmt PARAMS ((tree));
01168 extern void genrtl_break_stmt PARAMS ((void));
01169 extern void genrtl_continue_stmt PARAMS ((void));
01170 extern void genrtl_scope_stmt PARAMS ((tree));
01171 extern void genrtl_switch_stmt PARAMS ((tree));
01172 extern void genrtl_case_label PARAMS ((tree));
01173 extern void genrtl_compound_stmt PARAMS ((tree));
01174 extern void genrtl_asm_stmt PARAMS ((tree, tree,
01175 tree, tree,
01176 tree, int));
01177 extern void genrtl_decl_cleanup PARAMS ((tree));
01178 extern int stmts_are_full_exprs_p PARAMS ((void));
01179 extern int anon_aggr_type_p PARAMS ((tree));
01180
01181
01182
01183 #define DECL_ANON_UNION_ELEMS(NODE) DECL_ARGUMENTS ((NODE))
01184
01185
01186 #define DECL_C_BIT_FIELD(NODE) \
01187 (DECL_LANG_FLAG_4 (FIELD_DECL_CHECK (NODE)) == 1)
01188 #define SET_DECL_C_BIT_FIELD(NODE) \
01189 (DECL_LANG_FLAG_4 (FIELD_DECL_CHECK (NODE)) = 1)
01190 #define CLEAR_DECL_C_BIT_FIELD(NODE) \
01191 (DECL_LANG_FLAG_4 (FIELD_DECL_CHECK (NODE)) = 0)
01192
01193
01194
01195 #define DECL_C_HARD_REGISTER(DECL) DECL_LANG_FLAG_4 (VAR_DECL_CHECK (DECL))
01196
01197 extern void emit_local_var PARAMS ((tree));
01198 extern void make_rtl_for_local_static PARAMS ((tree));
01199 extern tree expand_cond PARAMS ((tree));
01200 extern tree c_expand_return PARAMS ((tree));
01201 extern tree do_case PARAMS ((tree, tree));
01202 extern tree build_stmt PARAMS ((enum tree_code, ...));
01203 extern tree build_case_label PARAMS ((tree, tree, tree));
01204 extern tree build_continue_stmt PARAMS ((void));
01205 extern tree build_break_stmt PARAMS ((void));
01206 extern tree build_return_stmt PARAMS ((tree));
01207
01208 #define COMPOUND_STMT_NO_SCOPE(NODE) TREE_LANG_FLAG_0 (NODE)
01209
01210
01211
01212 #define COMPOUND_STMT_BODY_BLOCK(NODE) TREE_LANG_FLAG_3 (NODE)
01213
01214 extern void c_expand_asm_operands PARAMS ((tree, tree, tree, tree, int, const char *, int));
01215
01216
01217
01218
01219 extern tree build_unary_op PARAMS ((enum tree_code,
01220 tree, int));
01221 extern tree build_binary_op PARAMS ((enum tree_code,
01222 tree, tree, int));
01223 extern int lvalue_p PARAMS ((tree));
01224 extern tree default_conversion PARAMS ((tree));
01225
01226
01227
01228
01229 extern tree common_type PARAMS ((tree, tree));
01230
01231 extern tree expand_tree_builtin PARAMS ((tree, tree, tree));
01232
01233 extern tree decl_constant_value PARAMS ((tree));
01234
01235
01236 extern tree boolean_increment PARAMS ((enum tree_code,
01237 tree));
01238
01239
01240
01241 extern void extract_interface_info PARAMS ((void));
01242
01243 extern int case_compare PARAMS ((splay_tree_key,
01244 splay_tree_key));
01245
01246 extern tree c_add_case_label PARAMS ((splay_tree,
01247 tree, tree,
01248 tree));
01249
01250 extern tree build_function_call PARAMS ((tree, tree));
01251
01252 extern tree finish_label_address_expr PARAMS ((tree));
01253
01254
01255
01256 extern tree lookup_label PARAMS ((tree));
01257
01258 extern rtx c_expand_expr PARAMS ((tree, rtx,
01259 enum machine_mode,
01260 int));
01261
01262 extern int c_safe_from_p PARAMS ((rtx, tree));
01263
01264 extern int c_staticp PARAMS ((tree));
01265
01266 extern int c_common_unsafe_for_reeval PARAMS ((tree));
01267
01268 extern const char *init_c_lex PARAMS ((const char *));
01269
01270 extern void cb_register_builtins PARAMS ((cpp_reader *));
01271
01272
01273
01274 struct c_fileinfo
01275 {
01276 int time;
01277 short interface_only;
01278 short interface_unknown;
01279 };
01280
01281 struct c_fileinfo *get_fileinfo PARAMS ((const char *));
01282 extern void dump_time_statistics PARAMS ((void));
01283
01284 extern int c_dump_tree PARAMS ((void *, tree));
01285
01286 #ifdef KEY
01287
01288
01289 extern tree build_omp_stmt PARAMS ((enum omp_tree_type,
01290 void *));
01291 #endif
01292
01293 #endif