comparison gcc/c-tree.h @ 63:b7f97abdc517 gcc-4.6-20100522

update gcc from gcc-4.5.0 to gcc-4.6
author ryoma <e075725@ie.u-ryukyu.ac.jp>
date Mon, 24 May 2010 12:47:05 +0900
parents 77e2b8dfacca
children f6334be47118
comparison
equal deleted inserted replaced
56:3c8a44c06a95 63:b7f97abdc517
1 /* Definitions for C parsing and type checking. 1 /* Definitions for C parsing and type checking.
2 Copyright (C) 1987, 1993, 1994, 1995, 1997, 1998, 2 Copyright (C) 1987, 1993, 1994, 1995, 1997, 1998,
3 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009 3 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
4 Free Software Foundation, Inc. 4 Free Software Foundation, Inc.
5 5
6 This file is part of GCC. 6 This file is part of GCC.
7 7
8 GCC is free software; you can redistribute it and/or modify it under 8 GCC is free software; you can redistribute it and/or modify it under
158 /* A type specifier: this structure is created in the parser and 158 /* A type specifier: this structure is created in the parser and
159 passed to declspecs_add_type only. */ 159 passed to declspecs_add_type only. */
160 struct c_typespec { 160 struct c_typespec {
161 /* What kind of type specifier this is. */ 161 /* What kind of type specifier this is. */
162 enum c_typespec_kind kind; 162 enum c_typespec_kind kind;
163 /* Whether the expression has operands suitable for use in constant
164 expressions. */
165 bool expr_const_operands;
163 /* The specifier itself. */ 166 /* The specifier itself. */
164 tree spec; 167 tree spec;
165 /* An expression to be evaluated before the type specifier, in the 168 /* An expression to be evaluated before the type specifier, in the
166 case of typeof specifiers, or NULL otherwise or if no such 169 case of typeof specifiers, or NULL otherwise or if no such
167 expression is required for a particular typeof specifier. In 170 expression is required for a particular typeof specifier. In
169 modified type, that expression must be evaluated in order to 172 modified type, that expression must be evaluated in order to
170 determine array sizes that form part of the type, but the 173 determine array sizes that form part of the type, but the
171 expression itself (as opposed to the array sizes) forms no part 174 expression itself (as opposed to the array sizes) forms no part
172 of the type and so needs to be recorded separately. */ 175 of the type and so needs to be recorded separately. */
173 tree expr; 176 tree expr;
174 /* Whether the expression has operands suitable for use in constant
175 expressions. */
176 bool expr_const_operands;
177 }; 177 };
178 178
179 /* A storage class specifier. */ 179 /* A storage class specifier. */
180 enum c_storage_class { 180 enum c_storage_class {
181 csc_none, 181 csc_none,
218 tree decl_attr; 218 tree decl_attr;
219 /* When parsing, the attributes. Outside the parser, this will be 219 /* When parsing, the attributes. Outside the parser, this will be
220 NULL; attributes (possibly from multiple lists) will be passed 220 NULL; attributes (possibly from multiple lists) will be passed
221 separately. */ 221 separately. */
222 tree attrs; 222 tree attrs;
223 /* The storage class specifier, or csc_none if none. */
224 enum c_storage_class storage_class;
223 /* Any type specifier keyword used such as "int", not reflecting 225 /* Any type specifier keyword used such as "int", not reflecting
224 modifiers such as "short", or cts_none if none. */ 226 modifiers such as "short", or cts_none if none. */
225 enum c_typespec_keyword typespec_word; 227 ENUM_BITFIELD (c_typespec_keyword) typespec_word : 8;
226 /* The storage class specifier, or csc_none if none. */
227 enum c_storage_class storage_class;
228 /* Whether any expressions in typeof specifiers may appear in 228 /* Whether any expressions in typeof specifiers may appear in
229 constant expressions. */ 229 constant expressions. */
230 BOOL_BITFIELD expr_const_operands : 1; 230 BOOL_BITFIELD expr_const_operands : 1;
231 /* Whether any declaration specifiers have been seen at all. */ 231 /* Whether any declaration specifiers have been seen at all. */
232 BOOL_BITFIELD declspecs_seen_p : 1; 232 BOOL_BITFIELD declspecs_seen_p : 1;
250 BOOL_BITFIELD explicit_signed_p : 1; 250 BOOL_BITFIELD explicit_signed_p : 1;
251 /* Whether the specifiers include a deprecated typedef. */ 251 /* Whether the specifiers include a deprecated typedef. */
252 BOOL_BITFIELD deprecated_p : 1; 252 BOOL_BITFIELD deprecated_p : 1;
253 /* Whether the type defaulted to "int" because there were no type 253 /* Whether the type defaulted to "int" because there were no type
254 specifiers. */ 254 specifiers. */
255 BOOL_BITFIELD default_int_p; 255 BOOL_BITFIELD default_int_p : 1;
256 /* Whether "long" was specified. */ 256 /* Whether "long" was specified. */
257 BOOL_BITFIELD long_p : 1; 257 BOOL_BITFIELD long_p : 1;
258 /* Whether "long" was specified more than once. */ 258 /* Whether "long" was specified more than once. */
259 BOOL_BITFIELD long_long_p : 1; 259 BOOL_BITFIELD long_long_p : 1;
260 /* Whether "short" was specified. */ 260 /* Whether "short" was specified. */
304 /* A list of argument types to go in the FUNCTION_TYPE. */ 304 /* A list of argument types to go in the FUNCTION_TYPE. */
305 tree types; 305 tree types;
306 /* A list of non-parameter decls (notably enumeration constants) 306 /* A list of non-parameter decls (notably enumeration constants)
307 defined with the parameters. */ 307 defined with the parameters. */
308 tree others; 308 tree others;
309 /* A list of VLA sizes from the parameters. In a function 309 /* A VEC of VLA sizes from the parameters. In a function
310 definition, these are used to ensure that side-effects in sizes 310 definition, these are used to ensure that side-effects in sizes
311 of arrays converted to pointers (such as a parameter int i[n++]) 311 of arrays converted to pointers (such as a parameter int i[n++])
312 take place; otherwise, they are ignored. */ 312 take place; otherwise, they are ignored. */
313 tree pending_sizes; 313 VEC(tree,gc) *pending_sizes;
314 /* True when these arguments had [*]. */ 314 /* True when these arguments had [*]. */
315 BOOL_BITFIELD had_vla_unspec : 1; 315 BOOL_BITFIELD had_vla_unspec : 1;
316 }; 316 };
317 317
318 /* A declarator. */ 318 /* A declarator. */
319 struct c_declarator { 319 struct c_declarator {
320 /* The kind of declarator. */ 320 /* The kind of declarator. */
321 enum c_declarator_kind kind; 321 enum c_declarator_kind kind;
322 location_t id_loc; /* Currently only set for cdk_id, cdk_array. */
322 /* Except for cdk_id, the contained declarator. For cdk_id, NULL. */ 323 /* Except for cdk_id, the contained declarator. For cdk_id, NULL. */
323 struct c_declarator *declarator; 324 struct c_declarator *declarator;
324 location_t id_loc; /* Currently only set for cdk_id, cdk_array. */
325 union { 325 union {
326 /* For identifiers, an IDENTIFIER_NODE or NULL_TREE if an abstract 326 /* For identifiers, an IDENTIFIER_NODE or NULL_TREE if an abstract
327 declarator. */ 327 declarator. */
328 tree id; 328 tree id;
329 /* For functions. */ 329 /* For functions. */
509 extern bool c_vla_type_p (const_tree); 509 extern bool c_vla_type_p (const_tree);
510 extern bool c_mark_addressable (tree); 510 extern bool c_mark_addressable (tree);
511 extern void c_incomplete_type_error (const_tree, const_tree); 511 extern void c_incomplete_type_error (const_tree, const_tree);
512 extern tree c_type_promotes_to (tree); 512 extern tree c_type_promotes_to (tree);
513 extern struct c_expr default_function_array_conversion (location_t, 513 extern struct c_expr default_function_array_conversion (location_t,
514 struct c_expr); 514 struct c_expr);
515 extern struct c_expr default_function_array_read_conversion (location_t,
516 struct c_expr);
517 extern void mark_exp_read (tree);
515 extern tree composite_type (tree, tree); 518 extern tree composite_type (tree, tree);
516 extern tree build_component_ref (location_t, tree, tree); 519 extern tree build_component_ref (location_t, tree, tree);
517 extern tree build_array_ref (location_t, tree, tree); 520 extern tree build_array_ref (location_t, tree, tree);
518 extern tree build_external_ref (location_t, tree, int, tree *); 521 extern tree build_external_ref (location_t, tree, int, tree *);
519 extern void pop_maybe_used (bool); 522 extern void pop_maybe_used (bool);
534 extern void pedwarn_init (location_t, int opt, const char *); 537 extern void pedwarn_init (location_t, int opt, const char *);
535 extern void maybe_warn_string_init (tree, struct c_expr); 538 extern void maybe_warn_string_init (tree, struct c_expr);
536 extern void start_init (tree, tree, int); 539 extern void start_init (tree, tree, int);
537 extern void finish_init (void); 540 extern void finish_init (void);
538 extern void really_start_incremental_init (tree); 541 extern void really_start_incremental_init (tree);
539 extern void push_init_level (int); 542 extern void push_init_level (int, struct obstack *);
540 extern struct c_expr pop_init_level (int); 543 extern struct c_expr pop_init_level (int, struct obstack *);
541 extern void set_init_index (tree, tree); 544 extern void set_init_index (tree, tree, struct obstack *);
542 extern void set_init_label (tree); 545 extern void set_init_label (tree, struct obstack *);
543 extern void process_init_element (struct c_expr, bool); 546 extern void process_init_element (struct c_expr, bool, struct obstack *);
544 extern tree build_compound_literal (location_t, tree, tree, bool); 547 extern tree build_compound_literal (location_t, tree, tree, bool);
545 extern void check_compound_literal_type (location_t, struct c_type_name *); 548 extern void check_compound_literal_type (location_t, struct c_type_name *);
546 extern tree c_start_case (location_t, location_t, tree); 549 extern tree c_start_case (location_t, location_t, tree);
547 extern void c_finish_case (tree); 550 extern void c_finish_case (tree);
548 extern tree build_asm_expr (location_t, tree, tree, tree, tree, tree, bool); 551 extern tree build_asm_expr (location_t, tree, tree, tree, tree, tree, bool);
606 #endif 609 #endif
607 610
608 extern void pedwarn_c90 (location_t, int opt, const char *, ...) ATTRIBUTE_GCC_CDIAG(3,4); 611 extern void pedwarn_c90 (location_t, int opt, const char *, ...) ATTRIBUTE_GCC_CDIAG(3,4);
609 extern void pedwarn_c99 (location_t, int opt, const char *, ...) ATTRIBUTE_GCC_CDIAG(3,4); 612 extern void pedwarn_c99 (location_t, int opt, const char *, ...) ATTRIBUTE_GCC_CDIAG(3,4);
610 613
611 extern bool c_cpp_error (cpp_reader *, int, location_t, unsigned int, 614 extern bool c_cpp_error (cpp_reader *, int, int, location_t, unsigned int,
612 const char *, va_list *) 615 const char *, va_list *)
613 ATTRIBUTE_GCC_CDIAG(5,0); 616 ATTRIBUTE_GCC_CDIAG(6,0);
614 617
615 #endif /* ! GCC_C_TREE_H */ 618 #endif /* ! GCC_C_TREE_H */