re PR c/12913 (Jumps into variable length array scope not rejected)
[gcc.git] / gcc / c-tree.h
1 /* Definitions for C parsing and type checking.
2 Copyright (C) 1987, 1993, 1994, 1995, 1997, 1998,
3 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
4
5 This file is part of GCC.
6
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
10 version.
11
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING. If not, write to the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA. */
21
22 #ifndef GCC_C_TREE_H
23 #define GCC_C_TREE_H
24
25 #include "c-common.h"
26 #include "diagnostic.h"
27
28 /* struct lang_identifier is private to c-decl.c, but langhooks.c needs to
29 know how big it is. This is sanity-checked in c-decl.c. */
30 #define C_SIZEOF_STRUCT_LANG_IDENTIFIER \
31 (sizeof (struct c_common_identifier) + 3 * sizeof (void *))
32
33 /* Language-specific declaration information. */
34
35 struct lang_decl GTY(())
36 {
37 char dummy;
38 };
39
40 /* In a RECORD_TYPE or UNION_TYPE, nonzero if any component is read-only. */
41 #define C_TYPE_FIELDS_READONLY(TYPE) TREE_LANG_FLAG_1 (TYPE)
42
43 /* In a RECORD_TYPE or UNION_TYPE, nonzero if any component is volatile. */
44 #define C_TYPE_FIELDS_VOLATILE(TYPE) TREE_LANG_FLAG_2 (TYPE)
45
46 /* In a RECORD_TYPE or UNION_TYPE or ENUMERAL_TYPE
47 nonzero if the definition of the type has already started. */
48 #define C_TYPE_BEING_DEFINED(TYPE) TYPE_LANG_FLAG_0 (TYPE)
49
50 /* In an incomplete RECORD_TYPE or UNION_TYPE, a list of variable
51 declarations whose type would be completed by completing that type. */
52 #define C_TYPE_INCOMPLETE_VARS(TYPE) TYPE_VFIELD (TYPE)
53
54 /* In an IDENTIFIER_NODE, nonzero if this identifier is actually a
55 keyword. C_RID_CODE (node) is then the RID_* value of the keyword,
56 and C_RID_YYCODE is the token number wanted by Yacc. */
57 #define C_IS_RESERVED_WORD(ID) TREE_LANG_FLAG_0 (ID)
58
59 struct lang_type GTY(())
60 {
61 /* In a RECORD_TYPE, a sorted array of the fields of the type. */
62 struct sorted_fields_type * GTY ((reorder ("resort_sorted_fields"))) s;
63 /* In an ENUMERAL_TYPE, the min and max values. */
64 tree enum_min;
65 tree enum_max;
66 /* In a RECORD_TYPE, information specific to Objective-C, such
67 as a list of adopted protocols or a pointer to a corresponding
68 @interface. See objc/objc-act.h for details. */
69 tree objc_info;
70 };
71
72 /* Record whether a type or decl was written with nonconstant size.
73 Note that TYPE_SIZE may have simplified to a constant. */
74 #define C_TYPE_VARIABLE_SIZE(TYPE) TYPE_LANG_FLAG_1 (TYPE)
75 #define C_DECL_VARIABLE_SIZE(TYPE) DECL_LANG_FLAG_0 (TYPE)
76
77 /* Record whether a typedef for type `int' was actually `signed int'. */
78 #define C_TYPEDEF_EXPLICITLY_SIGNED(EXP) DECL_LANG_FLAG_1 (EXP)
79
80 /* For a FUNCTION_DECL, nonzero if it was defined without an explicit
81 return type. */
82 #define C_FUNCTION_IMPLICIT_INT(EXP) DECL_LANG_FLAG_1 (EXP)
83
84 /* For a FUNCTION_DECL, nonzero if it was an implicit declaration. */
85 #define C_DECL_IMPLICIT(EXP) DECL_LANG_FLAG_2 (EXP)
86
87 /* For FUNCTION_DECLs, evaluates true if the decl is built-in but has
88 been declared. */
89 #define C_DECL_DECLARED_BUILTIN(EXP) \
90 DECL_LANG_FLAG_3 (FUNCTION_DECL_CHECK (EXP))
91
92 /* Record whether a decl was declared register. This is strictly a
93 front-end flag, whereas DECL_REGISTER is used for code generation;
94 they may differ for structures with volatile fields. */
95 #define C_DECL_REGISTER(EXP) DECL_LANG_FLAG_4 (EXP)
96
97 /* Record whether a decl was used in an expression anywhere except an
98 unevaluated operand of sizeof / typeof / alignof. This is only
99 used for functions declared static but not defined, though outside
100 sizeof and typeof it is set for other function decls as well. */
101 #define C_DECL_USED(EXP) DECL_LANG_FLAG_5 (FUNCTION_DECL_CHECK (EXP))
102
103 /* Record whether a label was defined in a statement expression which
104 has finished and so can no longer be jumped to. */
105 #define C_DECL_UNJUMPABLE_STMT_EXPR(EXP) \
106 DECL_LANG_FLAG_6 (LABEL_DECL_CHECK (EXP))
107
108 /* Record whether a label was the subject of a goto from outside the
109 current level of statement expression nesting and so cannot be
110 defined right now. */
111 #define C_DECL_UNDEFINABLE_STMT_EXPR(EXP) \
112 DECL_LANG_FLAG_7 (LABEL_DECL_CHECK (EXP))
113
114 /* Record whether a label was defined in the scope of an identifier
115 with variably modified type which has finished and so can no longer
116 be jumped to. */
117 #define C_DECL_UNJUMPABLE_VM(EXP) \
118 DECL_LANG_FLAG_3 (LABEL_DECL_CHECK (EXP))
119
120 /* Record whether a label was the subject of a goto from outside the
121 current level of scopes of identifiers with variably modified type
122 and so cannot be defined right now. */
123 #define C_DECL_UNDEFINABLE_VM(EXP) \
124 DECL_LANG_FLAG_5 (LABEL_DECL_CHECK (EXP))
125
126 /* Nonzero for a decl which either doesn't exist or isn't a prototype.
127 N.B. Could be simplified if all built-in decls had complete prototypes
128 (but this is presently difficult because some of them need FILE*). */
129 #define C_DECL_ISNT_PROTOTYPE(EXP) \
130 (EXP == 0 \
131 || (TYPE_ARG_TYPES (TREE_TYPE (EXP)) == 0 \
132 && !DECL_BUILT_IN (EXP)))
133
134 /* For FUNCTION_TYPE, a hidden list of types of arguments. The same as
135 TYPE_ARG_TYPES for functions with prototypes, but created for functions
136 without prototypes. */
137 #define TYPE_ACTUAL_ARG_TYPES(NODE) TYPE_LANG_SLOT_1 (NODE)
138
139 /* Record parser information about an expression that is irrelevant
140 for code generation alongside a tree representing its value. */
141 struct c_expr
142 {
143 /* The value of the expression. */
144 tree value;
145 /* Record the original binary operator of an expression, which may
146 have been changed by fold, STRING_CST for unparenthesized string
147 constants, or ERROR_MARK for other expressions (including
148 parenthesized expressions). */
149 enum tree_code original_code;
150 };
151
152 /* A kind of type specifier. Note that this information is currently
153 only used to distinguish tag definitions, tag references and typeof
154 uses. */
155 enum c_typespec_kind {
156 /* A reserved keyword type specifier. */
157 ctsk_resword,
158 /* A reference to a tag, previously declared, such as "struct foo".
159 This includes where the previous declaration was as a different
160 kind of tag, in which case this is only valid if shadowing that
161 tag in an inner scope. */
162 ctsk_tagref,
163 /* A reference to a tag, not previously declared in a visible
164 scope. */
165 ctsk_tagfirstref,
166 /* A definition of a tag such as "struct foo { int a; }". */
167 ctsk_tagdef,
168 /* A typedef name. */
169 ctsk_typedef,
170 /* An ObjC-specific kind of type specifier. */
171 ctsk_objc,
172 /* A typeof specifier. */
173 ctsk_typeof
174 };
175
176 /* A type specifier: this structure is created in the parser and
177 passed to declspecs_add_type only. */
178 struct c_typespec {
179 /* What kind of type specifier this is. */
180 enum c_typespec_kind kind;
181 /* The specifier itself. */
182 tree spec;
183 };
184
185 /* A storage class specifier. */
186 enum c_storage_class {
187 csc_none,
188 csc_auto,
189 csc_extern,
190 csc_register,
191 csc_static,
192 csc_typedef
193 };
194
195 /* A type specifier keyword "void", "_Bool", "char", "int", "float",
196 "double", or none of these. */
197 enum c_typespec_keyword {
198 cts_none,
199 cts_void,
200 cts_bool,
201 cts_char,
202 cts_int,
203 cts_float,
204 cts_double
205 };
206
207 /* A sequence of declaration specifiers in C. */
208 struct c_declspecs {
209 /* The type specified, if a single type specifier such as a struct,
210 union or enum specifier, typedef name or typeof specifies the
211 whole type, or NULL_TREE if none or a keyword such as "void" or
212 "char" is used. Does not include qualifiers. */
213 tree type;
214 /* The attributes from a typedef decl. */
215 tree decl_attr;
216 /* When parsing, the attributes. Outside the parser, this will be
217 NULL; attributes (possibly from multiple lists) will be passed
218 separately. */
219 tree attrs;
220 /* Any type specifier keyword used such as "int", not reflecting
221 modifiers such as "short", or cts_none if none. */
222 enum c_typespec_keyword typespec_word;
223 /* The storage class specifier, or csc_none if none. */
224 enum c_storage_class storage_class;
225 /* Whether any declaration specifiers have been seen at all. */
226 BOOL_BITFIELD declspecs_seen_p : 1;
227 /* Whether a type specifier has been seen. */
228 BOOL_BITFIELD type_seen_p : 1;
229 /* Whether something other than a storage class specifier or
230 attribute has been seen. This is used to warn for the
231 obsolescent usage of storage class specifiers other than at the
232 start of the list. (Doing this properly would require function
233 specifiers to be handled separately from storage class
234 specifiers.) */
235 BOOL_BITFIELD non_sc_seen_p : 1;
236 /* Whether the type is specified by a typedef or typeof name. */
237 BOOL_BITFIELD typedef_p : 1;
238 /* Whether a struct, union or enum type either had its content
239 defined by a type specifier in the list or was the first visible
240 declaration of its tag. */
241 BOOL_BITFIELD tag_defined_p : 1;
242 /* Whether the type is explicitly "signed" or specified by a typedef
243 whose type is explicitly "signed". */
244 BOOL_BITFIELD explicit_signed_p : 1;
245 /* Whether the specifiers include a deprecated typedef. */
246 BOOL_BITFIELD deprecated_p : 1;
247 /* Whether the type defaulted to "int" because there were no type
248 specifiers. */
249 BOOL_BITFIELD default_int_p;
250 /* Whether "long" was specified. */
251 BOOL_BITFIELD long_p : 1;
252 /* Whether "long" was specified more than once. */
253 BOOL_BITFIELD long_long_p : 1;
254 /* Whether "short" was specified. */
255 BOOL_BITFIELD short_p : 1;
256 /* Whether "signed" was specified. */
257 BOOL_BITFIELD signed_p : 1;
258 /* Whether "unsigned" was specified. */
259 BOOL_BITFIELD unsigned_p : 1;
260 /* Whether "complex" was specified. */
261 BOOL_BITFIELD complex_p : 1;
262 /* Whether "inline" was specified. */
263 BOOL_BITFIELD inline_p : 1;
264 /* Whether "__thread" was specified. */
265 BOOL_BITFIELD thread_p : 1;
266 /* Whether "const" was specified. */
267 BOOL_BITFIELD const_p : 1;
268 /* Whether "volatile" was specified. */
269 BOOL_BITFIELD volatile_p : 1;
270 /* Whether "restrict" was specified. */
271 BOOL_BITFIELD restrict_p : 1;
272 };
273
274 /* The various kinds of declarators in C. */
275 enum c_declarator_kind {
276 /* An identifier. */
277 cdk_id,
278 /* A function. */
279 cdk_function,
280 /* An array. */
281 cdk_array,
282 /* A pointer. */
283 cdk_pointer,
284 /* Parenthesized declarator with nested attributes. */
285 cdk_attrs
286 };
287
288 /* Information about the parameters in a function declarator. */
289 struct c_arg_info {
290 /* A list of parameter decls. */
291 tree parms;
292 /* A list of structure, union and enum tags defined. */
293 tree tags;
294 /* A list of argument types to go in the FUNCTION_TYPE. */
295 tree types;
296 /* A list of non-parameter decls (notably enumeration constants)
297 defined with the parameters. */
298 tree others;
299 };
300
301 /* A declarator. */
302 struct c_declarator {
303 /* The kind of declarator. */
304 enum c_declarator_kind kind;
305 /* Except for cdk_id, the contained declarator. For cdk_id, NULL. */
306 struct c_declarator *declarator;
307 location_t id_loc; /* Currently only set for cdk_id. */
308 union {
309 /* For identifiers, an IDENTIFIER_NODE or NULL_TREE if an abstract
310 declarator. */
311 tree id;
312 /* For functions. */
313 struct c_arg_info *arg_info;
314 /* For arrays. */
315 struct {
316 /* The array dimension, or NULL for [] and [*]. */
317 tree dimen;
318 /* The qualifiers inside []. */
319 int quals;
320 /* The attributes (currently ignored) inside []. */
321 tree attrs;
322 /* Whether [static] was used. */
323 BOOL_BITFIELD static_p : 1;
324 /* Whether [*] was used. */
325 BOOL_BITFIELD vla_unspec_p : 1;
326 } array;
327 /* For pointers, the qualifiers on the pointer type. */
328 int pointer_quals;
329 /* For attributes. */
330 tree attrs;
331 } u;
332 };
333
334 /* A type name. */
335 struct c_type_name {
336 /* The declaration specifiers. */
337 struct c_declspecs *specs;
338 /* The declarator. */
339 struct c_declarator *declarator;
340 };
341
342 /* A parameter. */
343 struct c_parm {
344 /* The declaration specifiers, minus any prefix attributes. */
345 struct c_declspecs *specs;
346 /* The attributes. */
347 tree attrs;
348 /* The declarator. */
349 struct c_declarator *declarator;
350 };
351
352 /* Save and restore the variables in this file and elsewhere
353 that keep track of the progress of compilation of the current function.
354 Used for nested functions. */
355
356 struct language_function GTY(())
357 {
358 struct c_language_function base;
359 tree x_break_label;
360 tree x_cont_label;
361 struct c_switch * GTY((skip)) x_switch_stack;
362 struct c_arg_info * GTY((skip)) arg_info;
363 int returns_value;
364 int returns_null;
365 int returns_abnormally;
366 int warn_about_return_type;
367 int extern_inline;
368 };
369
370 /* Save lists of labels used or defined in particular contexts.
371 Allocated on the parser obstack. */
372
373 struct c_label_list
374 {
375 /* The label at the head of the list. */
376 tree label;
377 /* The rest of the list. */
378 struct c_label_list *next;
379 };
380
381 /* Statement expression context. */
382
383 struct c_label_context_se
384 {
385 /* The labels defined at this level of nesting. */
386 struct c_label_list *labels_def;
387 /* The labels used at this level of nesting. */
388 struct c_label_list *labels_used;
389 /* The next outermost context. */
390 struct c_label_context_se *next;
391 };
392
393 /* Context of variably modified declarations. */
394
395 struct c_label_context_vm
396 {
397 /* The labels defined at this level of nesting. */
398 struct c_label_list *labels_def;
399 /* The labels used at this level of nesting. */
400 struct c_label_list *labels_used;
401 /* The scope of this context. Multiple contexts may be at the same
402 numbered scope, since each variably modified declaration starts a
403 new context. */
404 unsigned scope;
405 /* The next outermost context. */
406 struct c_label_context_vm *next;
407 };
408
409 \f
410 /* in c-parser.c */
411 extern void c_parse_init (void);
412
413 /* in c-aux-info.c */
414 extern void gen_aux_info_record (tree, int, int, int);
415
416 /* in c-decl.c */
417 extern struct obstack parser_obstack;
418 extern tree c_break_label;
419 extern tree c_cont_label;
420
421 extern int global_bindings_p (void);
422 extern void push_scope (void);
423 extern tree pop_scope (void);
424 extern void insert_block (tree);
425 extern tree pushdecl (tree);
426 extern void c_expand_body (tree);
427
428 extern void c_init_decl_processing (void);
429 extern void c_dup_lang_specific_decl (tree);
430 extern void c_print_identifier (FILE *, tree, int);
431 extern int quals_from_declspecs (const struct c_declspecs *);
432 extern struct c_declarator *build_array_declarator (tree, struct c_declspecs *,
433 bool, bool);
434 extern tree build_enumerator (tree, tree);
435 extern void check_for_loop_decls (void);
436 extern void mark_forward_parm_decls (void);
437 extern void declare_parm_level (void);
438 extern void undeclared_variable (tree, location_t);
439 extern tree declare_label (tree);
440 extern tree define_label (location_t, tree);
441 extern void finish_decl (tree, tree, tree);
442 extern tree finish_enum (tree, tree, tree);
443 extern void finish_function (void);
444 extern tree finish_struct (tree, tree, tree);
445 extern struct c_arg_info *get_parm_info (bool);
446 extern tree grokfield (struct c_declarator *, struct c_declspecs *, tree);
447 extern tree groktypename (struct c_type_name *);
448 extern tree grokparm (const struct c_parm *);
449 extern tree implicitly_declare (tree);
450 extern void keep_next_level (void);
451 extern tree lookup_name (tree);
452 extern void pending_xref_error (void);
453 extern void c_push_function_context (struct function *);
454 extern void c_pop_function_context (struct function *);
455 extern void push_parm_decl (const struct c_parm *);
456 extern tree pushdecl_top_level (tree);
457 extern struct c_declarator *set_array_declarator_inner (struct c_declarator *,
458 struct c_declarator *,
459 bool);
460 extern tree builtin_function (const char *, tree, int, enum built_in_class,
461 const char *, tree);
462 extern void shadow_tag (const struct c_declspecs *);
463 extern void shadow_tag_warned (const struct c_declspecs *, int);
464 extern tree start_enum (tree);
465 extern int start_function (struct c_declspecs *, struct c_declarator *, tree);
466 extern tree start_decl (struct c_declarator *, struct c_declspecs *, bool,
467 tree);
468 extern tree start_struct (enum tree_code, tree);
469 extern void store_parm_decls (void);
470 extern void store_parm_decls_from (struct c_arg_info *);
471 extern tree xref_tag (enum tree_code, tree);
472 extern struct c_typespec parser_xref_tag (enum tree_code, tree);
473 extern int c_expand_decl (tree);
474 extern struct c_parm *build_c_parm (struct c_declspecs *, tree,
475 struct c_declarator *);
476 extern struct c_declarator *build_attrs_declarator (tree,
477 struct c_declarator *);
478 extern struct c_declarator *build_function_declarator (struct c_arg_info *,
479 struct c_declarator *);
480 extern struct c_declarator *build_id_declarator (tree);
481 extern struct c_declarator *make_pointer_declarator (struct c_declspecs *,
482 struct c_declarator *);
483 extern struct c_declspecs *build_null_declspecs (void);
484 extern struct c_declspecs *declspecs_add_qual (struct c_declspecs *, tree);
485 extern struct c_declspecs *declspecs_add_type (struct c_declspecs *,
486 struct c_typespec);
487 extern struct c_declspecs *declspecs_add_scspec (struct c_declspecs *, tree);
488 extern struct c_declspecs *declspecs_add_attrs (struct c_declspecs *, tree);
489 extern struct c_declspecs *finish_declspecs (struct c_declspecs *);
490
491 /* in c-objc-common.c */
492 extern int c_disregard_inline_limits (tree);
493 extern int c_cannot_inline_tree_fn (tree *);
494 extern bool c_objc_common_init (void);
495 extern bool c_missing_noreturn_ok_p (tree);
496 extern tree c_objc_common_truthvalue_conversion (tree expr);
497 extern bool c_warn_unused_global_decl (tree);
498 extern void c_initialize_diagnostics (diagnostic_context *);
499
500 #define c_build_type_variant(TYPE, CONST_P, VOLATILE_P) \
501 c_build_qualified_type ((TYPE), \
502 ((CONST_P) ? TYPE_QUAL_CONST : 0) | \
503 ((VOLATILE_P) ? TYPE_QUAL_VOLATILE : 0))
504
505 /* in c-typeck.c */
506 extern int in_alignof;
507 extern int in_sizeof;
508 extern int in_typeof;
509
510 extern struct c_switch *c_switch_stack;
511 extern struct c_label_context_se *label_context_stack_se;
512 extern struct c_label_context_vm *label_context_stack_vm;
513
514 extern tree require_complete_type (tree);
515 extern int same_translation_unit_p (tree, tree);
516 extern int comptypes (tree, tree);
517 extern bool c_mark_addressable (tree);
518 extern void c_incomplete_type_error (tree, tree);
519 extern tree c_type_promotes_to (tree);
520 extern tree default_conversion (tree);
521 extern tree composite_type (tree, tree);
522 extern tree build_component_ref (tree, tree);
523 extern tree build_indirect_ref (tree, const char *);
524 extern tree build_array_ref (tree, tree);
525 extern tree build_external_ref (tree, int, location_t);
526 extern void pop_maybe_used (bool);
527 extern struct c_expr c_expr_sizeof_expr (struct c_expr);
528 extern struct c_expr c_expr_sizeof_type (struct c_type_name *);
529 extern struct c_expr parser_build_binary_op (enum tree_code, struct c_expr,
530 struct c_expr);
531 extern tree build_conditional_expr (tree, tree, tree);
532 extern tree build_compound_expr (tree, tree);
533 extern tree c_cast_expr (struct c_type_name *, tree);
534 extern tree build_c_cast (tree, tree);
535 extern tree build_modify_expr (tree, enum tree_code, tree);
536 extern void store_init_value (tree, tree);
537 extern void error_init (const char *);
538 extern void pedwarn_init (const char *);
539 extern void maybe_warn_string_init (tree, struct c_expr);
540 extern void start_init (tree, tree, int);
541 extern void finish_init (void);
542 extern void really_start_incremental_init (tree);
543 extern void push_init_level (int);
544 extern struct c_expr pop_init_level (int);
545 extern void set_init_index (tree, tree);
546 extern void set_init_label (tree);
547 extern void process_init_element (struct c_expr);
548 extern tree build_compound_literal (tree, tree);
549 extern tree c_start_case (tree);
550 extern void c_finish_case (tree);
551 extern tree build_asm_expr (tree, tree, tree, tree, bool);
552 extern tree build_asm_stmt (tree, tree);
553 extern tree c_convert_parm_for_inlining (tree, tree, tree, int);
554 extern int c_types_compatible_p (tree, tree);
555 extern tree c_begin_compound_stmt (bool);
556 extern tree c_end_compound_stmt (tree, bool);
557 extern void c_finish_if_stmt (location_t, tree, tree, tree, bool);
558 extern void c_finish_loop (location_t, tree, tree, tree, tree, tree, bool);
559 extern tree c_begin_stmt_expr (void);
560 extern tree c_finish_stmt_expr (tree);
561 extern tree c_process_expr_stmt (tree);
562 extern tree c_finish_expr_stmt (tree);
563 extern tree c_finish_return (tree);
564 extern tree c_finish_bc_stmt (tree *, bool);
565 extern tree c_finish_goto_label (tree);
566 extern tree c_finish_goto_ptr (tree);
567 extern void c_begin_vm_scope (unsigned int);
568 extern void c_end_vm_scope (unsigned int);
569
570 /* Set to 0 at beginning of a function definition, set to 1 if
571 a return statement that specifies a return value is seen. */
572
573 extern int current_function_returns_value;
574
575 /* Set to 0 at beginning of a function definition, set to 1 if
576 a return statement with no argument is seen. */
577
578 extern int current_function_returns_null;
579
580 /* Set to 0 at beginning of a function definition, set to 1 if
581 a call to a noreturn function is seen. */
582
583 extern int current_function_returns_abnormally;
584
585 /* Nonzero means we are reading code that came from a system header file. */
586
587 extern int system_header_p;
588
589 /* True means global_bindings_p should return false even if the scope stack
590 says we are in file scope. */
591
592 extern bool c_override_global_bindings_to_false;
593
594 /* True means we've initialized exception handling. */
595 extern bool c_eh_initialized_p;
596
597 /* In c-decl.c */
598 extern void c_finish_incomplete_decl (tree);
599 extern void c_write_global_declarations (void);
600
601 /* In order for the format checking to accept the C frontend
602 diagnostic framework extensions, you must include this file before
603 toplev.h, not after. */
604 #define GCC_DIAG_STYLE __gcc_cdiag__
605 #if GCC_VERSION >= 3005
606 #define ATTRIBUTE_GCC_CDIAG(m, n) __attribute__ ((__format__ (GCC_DIAG_STYLE, m ,n))) ATTRIBUTE_NONNULL(m)
607 #else
608 #define ATTRIBUTE_GCC_CDIAG(m, n) ATTRIBUTE_NONNULL(m)
609 #endif
610
611 extern void pedwarn_c90 (const char *, ...) ATTRIBUTE_GCC_CDIAG(1,2);
612 extern void pedwarn_c99 (const char *, ...) ATTRIBUTE_GCC_CDIAG(1,2);
613
614 #endif /* ! GCC_C_TREE_H */