aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-tree.h
AgeCommit message (Collapse)AuthorFilesLines
2005-06-29c-tree.h (default_function_array_conversion): Take and return struct c_expr.Joseph Myers1-1/+1
* c-tree.h (default_function_array_conversion): Take and return struct c_expr. * c-typeck.c (default_function_array_conversion): Split into array_to_pointer_conversion and function_to_pointer_conversion. Take and return struct c_expr. (array_to_pointer_conversion): Do not handle type qualifiers or COMPOUND_EXPRs specially. (build_function_call): Call function_to_pointer_conversion for function designators. (build_unary_op): Call array_to_pointer_conversion, not default_function_array_conversion. (digest_init, output_init_element): Likewise. * c-parser.c: All callers of default_function_array_conversion changed. From-SVN: r101440
2005-06-25Update FSF address.Kelley Cook1-2/+2
From-SVN: r101317
2005-06-15c-tree.h (default_function_array_conversion): Declare.Joseph Myers1-0/+1
* c-tree.h (default_function_array_conversion): Declare. * c-typeck.c (default_function_array_conversion): Export. Correct comment. (default_conversion): Do not call default_function_array_conversion. Do not allow FUNCTION_TYPE. (build_function_call): Call default_function_array_conversion on the function. (convert_arguments): Do not call it on the function arguments. (build_unary_op): Do not allow ARRAY_TYPE or FUNCTION_TYPE for TRUTH_NOT_EXPR. Call default_function_array_conversion for taking address of ARRAY_REF. (build_compound_expr): Do not call default_function_array_conversion. (build_c_cast): Do not call default_function_array_conversion. (convert_for_assignment): Do not call default_conversion. (digest_init): Call default_function_array_conversion to convert string constants and compound literals to pointers, but not otherwise. (output_init_element): Likewise. (build_asm_expr): Do not call default_function_array_conversion. (c_process_expr_stmt): Likewise. (c_objc_common_truthvalue_conversion): Likewise. Do not allow FUNCTION_TYPE. * c-parser.c (c_parser_expression_conv): New. (c_parser_asm_operands, c_parser_expr_list): Add convert_p argument. All callers changed. Call default_function_array_conversion if convert_p. (c_parser_initializer, c_parser_initval): Call default_function_array_conversion except for string constants and compound literals. (c_parser_initelt): Call default_function_array_conversion for ObjC expression received. (c_parser_statement_after_labels): Call c_parser_expression_conv for return and expression statements. (c_parser_paren_condition, c_parser_for_statement, c_parser_conditional_expression): Call c_parser_expression_conv. (c_parser_expr_no_commas, c_parser_conditional_expression, c_parser_binary_expression, c_parser_cast_expression, c_parser_unary_expression): Call default_function_array_conversion. objc: * objc-act.c (my_build_string_pointer): New. (objc_get_class_reference, get_super_receiver): Call my_build_string_pointer instead of my_build_string when building function arguments. testsuite: * gcc.dg/noncompile/20040203-3.c: Update expected message. From-SVN: r100984
2005-05-09c-tree.h (parser_build_unary_op): New prototype.Roger Sayle1-0/+1
* c-tree.h (parser_build_unary_op): New prototype. * c-typeck.c (parser_build_unary_op): New function to construct a unary operation in the C parser. * c-parser.c (c_parser_unary_expression): Use the new function parser_build_unary_op when appropriate. From-SVN: r99471
2005-05-02re PR c/15698 (no error in presence of broken builtin fn + K&R declaration)Joseph Myers1-0/+5
PR c/15698 * c-tree.h (C_DECL_BUILTIN_PROTOTYPE): New. * c-decl.c (current_function_prototype_built_in, current_function_prototype_arg_types): New. (merge_decls): Keep source location of prototype followed by nonprototype declaration. Update C_DECL_BUILTIN_PROTOTYPE. (builtin_function): Set C_DECL_BUILTIN_PROTOTYPE. (start_function): Always set current_function_prototype_locus, current_function_prototype_built_in and current_function_prototype_arg_types. Check for external prototype whether or not visible for external function and set current_function_prototype_arg_types accordingly. (store_parm_decls_oldstyle): Use current_function_prototype_arg_types for checking old-style definition against prototype. Give warnings only if current_function_prototype_built_in). testsuite: * gcc.dg/builtins-30.c: Update expected messages. * gcc.dg/pr15698-1.c, gcc.dg/pr15698-2.c, gcc.dg/pr15698-3.c, gcc.dg/pr15698-4.c, gcc.dg/pr15698-5.c, gcc.dg/pr15698-6.c, gcc.dg/pr15698-7.c, pr15698-8.c: New tests. From-SVN: r99118
2005-04-20re PR c/12913 (Jumps into variable length array scope not rejected)Joseph Myers1-7/+41
PR c/12913 * c-tree.h (struct c_label_list): Update comment. (struct c_label_context): Rename to struct c_label_context_se. (label_context_stack): Rename to label_context_stack_se. (C_DECL_UNJUMPABLE_VM, C_DECL_UNDEFINABLE_VM, struct c_label_context_vm, label_context_stack_vm, c_begin_vm_scope, c_end_vm_scope): New. (C_DECL_DECLARED_BUILTIN, C_DECL_USED): Use FUNCTION_DECL_CHECK. * c-decl.c (pop_scope): Call c_end_vm_scope. (pushdecl): Call c_begin_vm_scope for variably modified declarations. (define_label): Check for jumping into scope of identifier with variably modified type. Push label on stack for those defined at current context of identifiers with variably modified type. (start_function): Create stack level for context of identifiers with variably modified type. (finish_function): Pop stack level for context of identifiers with variably modified type. * c-typeck.c (label_context_stack): Rename to label_context_stack_se. (label_context_stack_vm, c_begin_vm_scope, c_end_vm_scope): New. (c_finish_goto_label): Check for jumping into scope of identifier with variably modified type. Push label on stack for those jumped to from current context of identifiers with variably modified type. (struct c_switch): Add blocked_vm. (c_start_case): Initialize blocked_vm. (do_case): Check blocked_vm. (c_finish_case): Add comment. (c_begin_stmt_expr, c_finish_stmt_expr): Update for renamed variable label_context_stack. objc: * objc-act.c (objc_start_function): Create stack level for context of identifiers with variably modified type. testsuite: * gcc.dg/c99-vla-jump-1.c, gcc.dg/c99-vla-jump-2.c, gcc.dg/c99-vla-jump-3.c, gcc.dg/c99-vla-jump-4.c, gcc.dg/c99-vla-jump-5.c: New tests. From-SVN: r98464
2005-04-08* c-tree.h (C_LANG_TREE_NODE_CHAIN_NEXT): Remove.Kazu Hirata1-7/+0
From-SVN: r97836
2005-03-30re PR c++/772 (Statement expressions issues)Joseph Myers1-0/+33
PR c/772 PR c/17913 * c-tree.h (C_DECL_UNJUMPABLE_STMT_EXPR, C_DECL_UNDEFINABLE_STMT_EXPR, struct c_label_list, struct c_label_context, label_context_stack): New. * c-decl.c (define_label): Check for jumps into statement expressions. Add label to list of defined labels. (start_function): Push context on label_context_stack. (finish_function): Pop context from label_context_stack. * c-typeck.c (label_context_stack): New. (c_finish_goto_label): Check for jumps into statement expressions. Add label to list of jumped to labels. (struct c_switch): Add blocked_stmt_expr. (c_start_case): Initialize it. (do_case): Check it. (c_finish_case): Verify !blocked_stmt_expr. (c_begin_stmt_expr): Push context on label_context_stack. Increment blocked_stmt_expr. Mark labels jumped to from outside as undefinable. (c_finish_stmt_expr): December blocked_stmt_expr. Mark labels defined in the statement expression and no longer jumpable to. Mark labels jumped to from just outside the statement expression as again definable. Pop context from label_context_stack. * doc/extend.texi (Statement Exprs): Update. objc: * objc-act.c (objc_start_function): Push context on label_context_stack. testsuite: * gcc.dg/stmt-expr-label-1.c, gcc.dg/stmt-expr-label-2.c, gcc.dg/stmt-expr-label-3.c : New tests. * gcc.c-torture/execute/medce-2.c: Remove. From-SVN: r97273
2005-03-29re PR c/20519 (completed type not selected properly with typeof)Richard Henderson1-1/+0
PR c/20519 * c-decl.c (c_finish_incomplete_decl): Update complete_array_type call. (build_compound_literal): Likewise. Propagate decl type into the initializer. (finish_decl): Likewise. Use new return value from complete_array_type for zero sized arrays. (complete_array_type): Move ... * c-common.c (complete_array_type): ... here. Change first argument to pointer-to-type-node. Consistently use sizetype for the index except for zero sized arrays. Detect zero sized arrays for pedantic mode diagnostics. Create a new type node instead of modifying the old node in place. * c-tree.h (complete_array_type): Move decl ... * c-common.h (complete_array_type): ... here. cp/ * decl.c (cp_complete_array_type): Rename from complete_array_type. Use the new complete_array_type in c-common.c. Update all callers. * cp-tree.h (cp_complete_array_type): Update to match. From-SVN: r97223
2005-03-23c-common.h (default_conversion): Remove.Joseph Myers1-0/+1
* c-common.h (default_conversion): Remove. (perform_integral_promotions): Add. * c-tree.h (default_conversion): Add. * c-typeck.c (perform_integral_promotions): New, split out from default_conversion. * c-common.c (check_case_value): Use perform_integral_promotions, not default_conversion. (c_add_case_label): Don't continue processing case label after found to be pointer. cp: * cp-tree.h (perform_integral_promotions): Remove. (default_conversion): Add. From-SVN: r96916
2005-03-11c-tree.h (struct c_declarator): New id_loc field.Per Bothner1-0/+1
* c-tree.h (struct c_declarator): New id_loc field. * c-pragma.h (c_lex_with_flags): Take position reference. * c-lex.c (c_lex_with_flags): Set passed-in location from cpp token, iff USE_MAPPED_LOCATION. (Type doesn't match otherwise.) (c_lex): Pass dummy location to c_lex_with_flags. * c-parser.c (c_lex_one_token): Set c_token's location using c_lex_with_flags, instead of input_location, which might be "ahead". (c_parser_direct_declarator): Set declarator's id_loc from c_token's id_loc. * c-decl.c (grokdeclarator): Set DECL_SOURCE_LOCATION from declarator's id_loc, rather than probably-imprecise input_location. (build_id_declarator): Initialize c_declarator's id_loc field. From-SVN: r96329
2005-03-02re PR c/8927 (Gcc give error for wrong line of C code.)Joseph Myers1-2/+2
PR c/8927 * c-tree.h (undeclared_variable, build_external_ref): Add extra argument. * c-decl.c (undeclared_variable): Take location as argument. * c-typeck.c (build_external_ref): Likewise. * c-parser.c (c_parser_postfix_expression): Pass location of identifier to build_external_ref. testsuite: * gcc.dg/pr8927-1.c: New test. From-SVN: r95773
2005-02-25c-parser.c: New file.Joseph Myers1-1/+5
* c-parser.c: New file. * c-parse.in: Remove. * Makefile.in (c-parse.o-warn, c-parse.o, c-parse.c, c-parse.y): Remove. (c-parser.o): Add dependencies. (C_AND_OBJC_OBJC, C_OBJS, gcc.srcextra, GTFILES, distclean, maintainer-clean, TAGS): Update. * c-config-lang.in (gtfiles): Update. * gengtype-lex.l: Don't handle "@@". * stub-objc.c (objc_get_class_ivars, objc_build_throw_stmt, objc_build_synchronized, objc_begin_try_stmt, objc_begin_catch_clause, objc_finish_catch_clause, objc_build_finally_clause, objc_finish_try_stmt): New. * c-tree.h (struct c_declspecs): Add declspecs_seen_p and type_seen_p. (c_parse_init): Update comment. * c-decl.c (c_init_decl_processing): Update comment. (build_null_declspecs, declspecs_add_qual, declspecs_add_type, declspecs_add_scspec, declspecs_add_attrs): Initialize and update new c_declspecs members. objc: * Make-lang.in (objc/objc-parse.o-warn, objc/objc-parse.o, objc/objc-parse.c, objc/objc-parse.y): Remove (OBJC_OBJS, objc.srcextra, objc.tags, objc.mostlyclean, objc.distclean, objc.maintainer-clean): Update for new parser. * config-lang.in (gtfiles): Update for new parser. testsuite: * gcc.dg/cpp/separate-1.c, gcc.dg/noncompile/971104-1.c, gcc.dg/noncompile/990416-1.c: Adjust expected messages for new parser. From-SVN: r95558
2005-02-12c-tree.h, [...]: Fix comment typos.Kazu Hirata1-1/+1
* c-tree.h, combine.c, expmed.c, flow.c, libgcc2.c, simplify-rtx.c, tree-ssa-live.h: Fix comment typos. Follow spelling conventions. From-SVN: r94939
2005-01-18basic-block.h, [...]: Update copyright.Kazu Hirata1-1/+1
* basic-block.h, c-common.c, c-cppbuiltin.c, c-lang.c, c-tree.h, cfgbuild.c, cgraph.c, cgraph.h, collect2.c, combine.c, config.gcc, coverage.h, cse.c, cselib.c, defaults.h, df.c, dwarf2asm.c, dwarf2out.c, explow.c, expr.c, flow.c, fold-const.c, gcse.c, ggc-page.c, gimple-low.c, gimplify.c, ifcvt.c, langhooks-def.h, lcm.c, optabs.h, output.h, postreload-gcse.c, postreload.c, recog.c, resource.c, rtl.def, rtlanal.c, sched-deps.c, sched-rgn.c, targhooks.h, toplev.c, tree-data-ref.c, tree-eh.c, tree-flow.h, tree-loop-linear.c, tree-mudflap.h, tree-nrv.c, tree-optimize.c, tree-outof-ssa.c, tree-pass.h, tree-scalar-evolution.c, tree-ssa-copy.c, tree-ssa-dce.c, tree-ssa-dse.c, tree-ssa-loop-ivopts.c, tree-ssa-operands.c, tree-ssa-pre.c, tree-ssa.c, tree-vectorizer.c, tree.def, unwind-dw2-fde-darwin.c, var-tracking.c: Update copyright. From-SVN: r93827
2005-01-14c-tree.h, [...]: Remove unused prototypes.Kazu Hirata1-1/+0
* c-tree.h, coverage.h, langhooks-def.h, optabs.h, output.h, rtl.h, targhooks.h, tree-flow.h, tree-mudflap.h, tree.h: Remove unused prototypes. From-SVN: r93651
2004-12-18re PR middle-end/16417 (crappy code (gcc.c-torture/compile/20020210-1.c) in ↵Richard Henderson1-4/+1
arguments causes ICE) PR middle-end/16417 * c-decl.c (store_parm_decls): Clarify get_pending_sizes insertion comment. * c-objc-common.c (c_cannot_inline_tree_fn): Remove pending sizes checks. * c-tree.h (struct lang_decl): Remove pending_sizes. * function.c: Include tree-gimple.h (assign_parm_setup_reg): Remove callee-copies code. (gimplify_parm_type, gimplify_parameters): New functions. (expand_pending_sizes): Remove. (expand_function_start): Don't call it. * gimplify.c (gimplify_expr): Examine DECL_VALUE_EXPR for PARM_DECL. (gimplify_body): Add do_parms argument. Use gimplify_parameters. (gimplify_function_tree): Setup cfun. Update gimplify_body call. * tree-gimple.h (gimplify_body): Update decl. * tree-inline.c (initialize_inlined_parameters): Update gimplify_body call. * tree.h (gimplify_parameters): Declare. * Makefile.in (function.o): Depend on TREE_GIMPLE_H. From-SVN: r92373
2004-12-07c-tree.h (struct lang_type): Rename 'objc_protocols' field to 'objc_info'.Ziemowit Laski1-3/+4
[gcc/ChangeLog] 2004-12-07 Ziemowit Laski <zlaski@apple.com> * c-tree.h (struct lang_type): Rename 'objc_protocols' field to 'objc_info'. [gcc/cp/ChangeLog] 2004-12-07 Ziemowit Laski <zlaski@apple.com> * cp-tree.h (struct lang_type_class): Rename 'objc_protocols' field to 'objc_info'. From-SVN: r91833
2004-12-07c-tree.h (struct lang_type): Add 'objc_protocols' field.Ziemowit Laski1-0/+3
[gcc/ChangeLog] 2004-12-06 Ziemowit Laski <zlaski@apple.com> * c-tree.h (struct lang_type): Add 'objc_protocols' field. [gcc/cp/ChangeLog] 2004-12-06 Ziemowit Laski <zlaski@apple.com> * cp-tree.h (struct lang_type_class): Add 'objc_protocols' field. From-SVN: r91803
2004-11-11c-typeck.c (c_size_in_bytes, [...]): Make them static.Kazu Hirata1-2/+0
* c-typeck.c (c_size_in_bytes, record_maybe_used_decl): Make them static. * c-tree.h: Remove the corresponding prototypes. From-SVN: r90504
2004-10-14c-tree.h (enum c_typespec_kind, [...]): New.Joseph Myers1-2/+41
* c-tree.h (enum c_typespec_kind, struct c_typespec, parser_xref_tag): New. (struct c_declspecs): Add tag_defined_p. Adjust definition of typedef_p. (declspecs_add_type): Adjust prototypes. * c-parse.in (%union): Add tstype. (typespec_nonattr, typespec_attr, typespec_reserved_nonattr, typespec_reserved_attr, typespec_nonreserved_nonattr, structsp_attr, structsp_nonattr): Change to tstype. Update actions. * c-decl.c (build_null_declspecs): Initialize tag_defined_p. (declspecs_add_type): Update to take struct c_typespec argument. Set tag_defined_p and typedef_p as appropriate. (xref_tag): Rename to parser_xref_tag and replace by wrapper. Update to return struct c_typespec. (shadow_tag_warned): Don't let empty declarations with qualifiers or storage class specifiers redeclare a tag if a previous declaration is visible. testsuite: * gcc.dg/c99-tag-3.c, gcc.dg/declspec-14.c: New tests. From-SVN: r89021
2004-09-30c-tree.h (readonly_error): Remove.Joseph Myers1-1/+0
* c-tree.h (readonly_error): Remove. * c-typeck (enum lvalue_use): New. (lvalue_or_else, readonly_error): Use it. All callers changed. (readonly_error): Make static. testsuite: * gcc.dg/lvalue-2.c: New test. From-SVN: r88362
2004-09-17c-tree.h (enum c_typespec_keyword): New.Joseph Myers1-11/+36
* c-tree.h (enum c_typespec_keyword): New. (struct c_declspecs): Adjust description of "type". Remove specbits, explicit_int_p and explicit_char_p. Rename typedef_signed_p to explicit_signed_p. Add default_int_p, long_p, short_p, signed_p, unsigned_p and complex_p. (finish_declspecs): New. * c-parse.in (datadef, datadecl, setspecs, decl, component_decl, typename): Call finish_declspecs. * c-decl.c (finish_declspecs): New. (declspecs_add_type): Check for combinations which cannot occur in valid specifier lists. Update comments. (shadow_tag_warned): Remove checks done in finish_declspecs. Don't report useless type name if type defaulted to int. (grokdeclarator): Remove checks and actions done in finish_declspecs. Don't allow for type being NULL. Update for datastructures changes. Initialize decl_attr. (build_null_declspecs, quals_from_declspecs): Update for datastructures changes. testsuite: * gcc.dg/declspec-4.c, gcc.dg/declspec-5.c, gcc.dg/declspec-6.c: Update expected messages. * gcc.dg/declspec-13.c: New test. From-SVN: r87660
2004-09-14c-tree.h (struct c_declspecs): Add const_p, volatile_p and restrict_p.Joseph Myers1-3/+12
* c-tree.h (struct c_declspecs): Add const_p, volatile_p and restrict_p. (struct c_declarator): Change u.array.quals and pointer_quals to int. Add u.array.attrs. (quals_from_declspecs): New. * c-decl.c (quals_from_declspecs): New. (shadow_tag_warned): Give more specific message for useless type qualifiers. (build_array_declarator, set_array_declarator_inner, grokdeclarator, make_pointer_declarator, build_null_declspecs, declspecs_add_qual): Update for changed structures. testsuite: * gcc.dg/declspec-12.c: New test. From-SVN: r87500
2004-09-13c-common.c, [...]: Use %q, %< and %> for quoting in diagnostics.Joseph Myers1-2/+8
* c-common.c, c-decl.c, c-lex.c, c-objc-common.c, c-opts.c, c-parse.in, c-pragma.c, c-typeck.c: Use %q, %< and %> for quoting in diagnostics. Use %' for English apostrophes. * c-tree.h (ATTRIBUTE_GCC_CDIAG): Define. (pedwarn_c90, pedwarn_c99): Use it. * c-decl.c (lookup_label): Quote label name in diagnostic. * c-parse.in (yyprint): Use ' instead of ` for left quote. * c-typeck.c (warn_for_assignment): Likewise. testsuite: * g++.dg/warn/Wswitch-1.C, g++.dg/warn/Wswitch-2.C, gcc.dg/Wswitch-2.c, gcc.dg/Wswitch-enum.c, gcc.dg/Wswitch.c, gcc.dg/declspec-9.c, gcc.dg/declspec-10.c, gcc.dg/declspec-11.c, gcc.dg/m-un-2.c, gcc.dg/noreturn-1.c, gcc.dg/wtr-conversion-1.c: Update expected messages. From-SVN: r87413
2004-09-11c-tree.h (enum c_storage_class): New.Joseph Myers1-0/+16
* c-tree.h (enum c_storage_class): New. (struct c_declspecs): Add storage_class, inline_p and thread_p. * c-decl.c (shadow_tag_warned): Give errors for "inline" in empty declarations and "auto" or "register" in file scope empty declarations. Give more specific warnings for other cases of storage class specifiers in empty declarations. (grokdeclarator): Update for new structures. Don't check for multiple storage classes. Diagnose file-scope "register" if pedantic. (build_null_declspecs): Update. (declspecs_add_scspec): Update. Diagnose multiple storage class specifiers and invalid uses of "__thread". testsuite: * gcc.dg/declspec-4.c, gcc.dg/declspec-5.c, gcc.dg/declspec-6.c, gcc.dg/tls/diag-2.c: Update expected messages. * gcc.dg/991209-1.c: Specify compilation options. Update expected messages. * gcc.dg/pr14289-2.c, gcc.dg/pr14289-3.c: Remove. * gcc.dg/declspec-7.c, gcc.dg/declspec-8.c, gcc.dg/declspec-9.c, gcc.dg/declspec-10.c, gcc.dg/declspec-11.c, gcc.dg/tls/diag-4.c, gcc.dg/tls/diag-5.c: New tests. From-SVN: r87376
2004-09-11c-tree.h (struct c_declspecs): Remove typedef_decl.Joseph Myers1-2/+5
* c-tree.h (struct c_declspecs): Remove typedef_decl. Add typedef_p and typedef_signed_p. * c-decl.c (shadow_tag_warned): Check typedef_p, not typedef_decl. (grokdeclarator): Don't use typedef_decl for warn_deprecated_use. Check typedef_p and typedef_signed_p, not typedef_decl. (grokfield): Check typedef_p, not typedef_decl. (build_null_declspecs): Initialize typedef_p and typedef_signed_p, not typedef_decl. (declspecs_add_type): Set typedef_p and typedef_signed_p, not typedef_decl. testsuite: * gcc.dg/bitfld-9.c: New test. From-SVN: r87326
2004-09-09re PR c/8420 (volatile after the type specifier for an unnamed structure is ↵Joseph Myers1-13/+52
rejected) PR c/8420 * c-tree.h (struct c_declspecs): New. (struct c_declarator, struct c_type_name, struct c_parm): Update element types. (build_array_declarator, grokfield, shadow_tag, shadow_tag_warned, start_function, start_decl, build_c_parm, make_pointer_declarator): Update prototypes. (build_null_declspecs, declspecs_add_qual, declspecs_add_type, declspecs_add_scspec, declspecs_add_attrs): New. (split_specs_attrs): Remove. * c-parse.in (%union): Add dsptype. (declspecs_nosc_nots_nosa_noea, declspecs_nosc_nots_nosa_ea, declspecs_nosc_nots_sa_noea, declspecs_nosc_nots_sa_ea, declspecs_nosc_ts_nosa_noea, declspecs_nosc_ts_nosa_ea, declspecs_nosc_ts_sa_noea, declspecs_nosc_ts_sa_ea, declspecs_sc_nots_nosa_noea, declspecs_sc_nots_nosa_ea, declspecs_sc_nots_sa_noea, declspecs_sc_nots_sa_ea, declspecs_sc_ts_nosa_noea, declspecs_sc_ts_nosa_ea, declspecs_sc_ts_sa_noea, declspecs_sc_ts_sa_ea, declspecs_ts, declspecs_nots, declspecs_ts_nosa, declspecs_nots_nosa, declspecs_nosc_ts, declspecs_nosc_nots, declspecs_nosc, declspecs, maybe_type_quals_attrs): Change to dsptype. (struct c_declspec_stack): New. (current_declspecs, declspec_stack): Change type. (PUSH_DECLSPEC_STACK, POP_DECLSPEC_STACK): Update to new structures. (extdefs): Likewise. (setspecs): Likewise. (fndef): Use current_declspecs for empty declspecs list. (declspecs_nosc_nots_nosa_noea, declspecs_nosc_nots_nosa_ea, declspecs_nosc_nots_sa_noea, declspecs_nosc_nots_sa_ea, declspecs_nosc_ts_nosa_noea, declspecs_nosc_ts_nosa_ea, declspecs_nosc_ts_sa_noea, declspecs_nosc_ts_sa_ea, declspecs_sc_nots_nosa_noea, declspecs_sc_nots_nosa_ea, declspecs_sc_nots_sa_noea, declspecs_sc_nots_sa_ea, declspecs_sc_ts_nosa_noea, declspecs_sc_ts_nosa_ea, declspecs_sc_ts_sa_noea, declspecs_sc_ts_sa_ea): Update to new structures and helper functions. Update comments. (typespec_nonattr): Correct comment. (maybe_type_quals_attrs, typename): Update to new structures. * c-decl.c (grokdeclarator, build_array_declarator, grokfield, shadow_tag, shadow_tag_warned, start_function, start_decl, build_c_parm, make_pointer_declarator, set_array_declarator_inner, groktypename): Update to new structures. (build_null_declspecs, declspecs_add_qual, declspecs_add_type, declspecs_add_scspec, declspecs_add_attrs): New. (split_specs_attrs): Remove. (shadow_tag_warned): Make warning for useless type names a pedwarn. Give hard error for long, short, signed, unsigned or _Complex used with struct, union or enum in empty declaration. Make found_tag a bool. (grokdeclarator): Remove checks now done at parse time. testsuite: * gcc.dg/anon-struct-4.c, gcc.dg/declspec-1.c, gcc.dg/declspec-2.c, gcc.dg/declspec-3.c, gcc.dg/declspec-4.c, gcc.dg/declspec-5.c, gcc.dg/declspec-6.c, gcc.dg/long-long-typespec-1.c: New tests. * gcc.dg/tls/diag-2.c: Update expected diagnostics From-SVN: r87218
2004-09-09c-tree.h (enum c_declarator_kind, [...]): New.Joseph Myers1-17/+98
* c-tree.h (enum c_declarator_kind, struct c_arg_info, struct c_declarator, struct c_type_name, struct c_parm): New. (build_array_declarator, set_array_declarator_inner, get_parm_info, grokfield, groktypename, grokparm, push_parm_decl, start_function, start_decl, build_c_parm, build_attrs_declarator, build_function_declarator, make_pointer_declarator, c_cast_expr, store_parm_decls_newstyle, c_expr_sizeof_type): Update prototypes. (build_id_declarator): New. * c-typeck.c (c_cast_expr, c_expr_sizeof_type): Update to new structures. * c-decl.c (ARG_INFO_PARMS, ARG_INFO_TAGS, ARG_INFO_TYPES, ARG_INFO_OTHERS): Remove. (build_id_declarator): New. (build_array_declarator, set_array_declarator_inner, groktypename, start_decl, grokparm, push_parm_decl, grokparms, get_parm_info, grokfield, start_function, store_parm_decls_newstyle, store_parm_decls_oldstyle, store_parm_decls, build_c_parm, build_attrs_declarator, build_function_declarator, make_pointer_declarator, grokdeclarator): Update to new structures. * c-parse.in (%union): Add arginfotype, dtrtype, typenametype and parmtype. (declarator, notype_declarator, after_type_declarator, parm_declarator, parm_declarator_starttypename, parm_declarator_nostarttypename, array_declarator, typename, absdcl, absdcl1, absdcl1_ea, absdcl1_noea, direct_absdcl1, absdcl_maybe_attribute, parm, firstparm, parms, parmlist, parmlist_1, parmlist_2, parmlist_or_identifiers, parmlist_or_identifiers_1): Use these types. (primary, after_type_declarator, parm_declarator_starttypename, notype_declarator, component_decl, component_declarator, component_notype_declarator, typename, absdcl, absdcl_maybe_attribute, absdcl1_ea, direct_absdcl1, parmlist_1, parmlist_2, parmlist_or_identifiers_1): Update to new structures. objc: * objc-act.c (objc_start_function, really_start_method, objc_get_parm_info, start_method_def): Update to new arg_info structures. From-SVN: r87217
2004-09-09c-tree.h (C_DECL_USED, [...]): New.Joseph Myers1-0/+15
* c-tree.h (C_DECL_USED, parser_obstack, in_alignof, in_sizeof, in_typeof, record_maybe_used_decl, pop_maybe_used, c_expr_sizeof_expr, c_expr_sizeof_type): New. * c-decl.c (parser_obstack): New. (c_init_decl_processing): Initialize parser_obstack. (c_write_global_declarations_1): Check for used but undefined static functions. * c-parse.in (%union): Add otype. (save_obstack_position): New. (extdefs): Use it. (unary_expr): Update in_sizeof and in_alignof. Use c_expr_sizeof_expr and c_expr_sizeof_type. (sizeof): Update in_sizeof. (alignof): Update in_alignof. (typeof): Update in_typeof. (typespec_nonreserved_nonattr): Call pop_maybe_used. * c-typeck.c (in_alignof, in_sizeof, in_typeof, struct maybe_used_decl, maybe_used_decls, record_maybe_used_decl, pop_maybe_used, c_expr_sizeof_expr, c_expr_sizeof_type): New. (build_external_ref): Set C_DECL_USED or call record_maybe_used_decl if appropriate. * toplev.c (check_global_declarations): Check TREE_NO_WARNING. testsuite: * gcc.dg/c90-static-1.c, gcc.dg/c99-static-1.c, gcc.dg/gnu99-static-1.c: New tests. From-SVN: r87216
2004-09-08c-decl.c (groktypename_in_parm_context): Remove function.Ziemowit Laski1-1/+0
[gcc/ChangeLog] 2004-09-07 Ziemowit Laski <zlaski@apple.com> * c-decl.c (groktypename_in_parm_context): Remove function. * c-tree.h (groktypename_in_parm_context): Remove prototype. From-SVN: r87169
2004-09-03c-decl.c (store_parm_decls_newstyle): Make static.Ziemowit Laski1-1/+1
[gcc/ChangeLog] 2004-09-02 Ziemowit Laski <zlaski@apple.com> * c-decl.c (store_parm_decls_newstyle): Make static. (store_parm_decls_from): New function. * c-tree.h (store_parm_decls_newstyle): Remove prototype. (store_parm_decls_from): New prototype. From-SVN: r87022
2004-09-02c-decl.c (store_parm_decls_newstyle): Make externally visible.Ziemowit Laski1-0/+1
[gcc/ChangeLog] 2004-09-02 Ziemowit Laski <zlaski@apple.com> * c-decl.c (store_parm_decls_newstyle): Make externally visible. * c-tree.h (store_parm_decls_newstyle): New prototype. From-SVN: r86998
2004-08-31attribs.c (strip_attrs): Remove.Joseph Myers1-0/+1
* attribs.c (strip_attrs): Remove. (split_specs_attrs): Move ... * c-decl.c: ... to here. * tree.h (split_specs_attrs, strip_attrs): Remove. * c-tree.h (split_specs_attrs): Declare. From-SVN: r86823
2004-08-30c-tree.h (struct language_function): Add arg_info element.Joseph Myers1-0/+1
* c-tree.h (struct language_function): Add arg_info element. * c-decl.c (current_function_arg_info): New. (grokdeclarator, store_parm_decls): Use it instead of DECL_ARGUMENTS. (c_push_function_context, c_pop_function_context): Save and restore it. From-SVN: r86798
2004-08-28c-common.h: Update comments about ObjC/ObjC++ entry points.Ziemowit Laski1-2/+0
[gcc/ChangeLog] 2004-08-28 Ziemowit Laski <zlaski@apple.com> * c-common.h: Update comments about ObjC/ObjC++ entry points. (objc_is_reserved_word): New prototype. (get_current_scope, objc_mark_locals_volatile): Move prototypes to separate section; these are call-backs. * c-lex.c (c_lex_with_flags): Call objc_is_reserved_word() to detect ObjC/ObjC++ "@" keywords. * c-tree.h (get_current_scope, objc_mark_locals_volatile): Remove prototypes; they already live in c-common.h. * stub-objc.c: Update copyright notice. (objc_is_reserved_word): New stub. [gcc/cp/ChangeLog] 2004-08-28 Ziemowit Laski <zlaski@apple.com> * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and CXX_AND_OBJCXX_OBJS. (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing separately on the link line. [gcc/objc/ChangeLog] 2004-08-28 Ziemowit Laski <zlaski@apple.com> * objc-act.c (objc_is_reserved_word): New function. From-SVN: r86702
2004-08-26c-typeck.c (build_offsetof): Remove.Richard Henderson1-1/+0
* c-typeck.c (build_offsetof): Remove. * c-tree.h (build_offsetof): Remove. * c-common.c (fold_offsetof_1, fold_offsetof): New. * c-common.h (fold_offsetof): Declare. * c-parse.in (offsetof_base): New. (offsetof_member_designator): Use it. Build references, not just a tree list. (primary): Use fold_offsetof, not build_offsetof. From-SVN: r86651
2004-08-25c-decl.c (grokparm): New function.Ziemowit Laski1-0/+1
[gcc/ChangeLog] 2004-08-25 Ziemowit Laski <zlaski@apple.com> * c-decl.c (grokparm): New function. * c-tree.h (grokparm): New prototype. From-SVN: r86587
2004-08-22* c-tree.h (c_sizeof_nowarn): Remove.Joseph Myers1-2/+0
From-SVN: r86379
2004-08-21c-decl.c (set_array_declarator_type): Rename to set_array_declarator_inner.Joseph Myers1-1/+4
* c-decl.c (set_array_declarator_type): Rename to set_array_declarator_inner. (build_c_parm, build_attrs_declarator, build_function_declarator): New functions. (make_pointer_declarator): Call build_attrs_declarator. * c-tree.h (set_array_declarator_type): Rename to set_array_declarator_inner. (build_c_parm, build_attrs_declarator, build_function_declarator): New prototypes. * c-parse.in (after_type_declarator, parm_declarator_starttypename, parm_declarator_nostarttypename, notype_declarator, absdcl_maybe_attribute, direct_absdcl1, parm, firstparm): Use these functions From-SVN: r86367
2004-08-21c-decl.c (build_array_declarator, [...]): Change boolean parameters to type ↵Joseph Myers1-3/+3
bool. * c-decl.c (build_array_declarator, set_array_declarator_type, start_decl, grokdeclarator, grokparms): Change boolean parameters to type bool. * c-tree.h (build_array_declarator, set_array_declarator_type, start_decl): Update prototypes. * c-decl.c, c-parse.in: All callers changed. From-SVN: r86366
2004-07-22re PR c/11250 (-pedantic accepts `char a[] = ("x");')Joseph Myers1-4/+6
PR c/11250 * c-parse.in (init): Change to exprtype. (primary): Set original_code for STRING to STRING_CST. Call maybe_warn_string_init for compound literals. (initdcl, notype_initdcl): Call maybe_warn_string_init. (initval): Update. * c-tree.h (maybe_warn_string_init): New. (pop_init_level, process_init_element): Use struct c_expr. (struct c_expr): Update comment. * c-typeck.c (maybe_warn_string_init): New function. (digest_init): Call it. Additional parameter strict_string. All callers changed. (output_init_element): Likewise. (struct constructor_stack): Use struct c_expr for replacement_value. (really_start_incremental_init, push_init_level): Update. (pop_init_level): Update. Return struct c_expr. (process_init_level): Update. Take struct c_expr argument. testsuite: * gcc.dg/init-string-1.c: New test. From-SVN: r85022
2004-07-19c-tree.h (struct c_expr): Define.Joseph Myers1-6/+15
* c-tree.h (struct c_expr): Define. (C_SET_EXP_ORIGINAL_CODE): Remove. (parser_build_binary_op, build_compound_expr): Update prototypes. * c-parse.in (%union): Add exprtype. (FUNC_NAME): Mark as ttype. (expr, expr_no_commas, cast_expr, unary_expr, primary): Change to exprtype. (expr): Update. Define directly in terms of expr_no_commas instead of using nonnull_exprlist. (nonnull_exprlist, unary_expr, cast_expr, expr_no_commas, primary, offsetof_member_designator, typespec_nonreserved_nonattr, init, initval, designator, component_declarator, component_notype_declarator, enumerator, array_declarator, condition, exexpr, switch_statement, stmt_nocomp, stmt, nonnull_asm_operands, ivar_declarator, receiver): Update. Don't set C_EXP_ORIGINAL_CODE. Use TREE_NO_WARNING for assignments where appropriate. * c-common.h (C_EXP_ORIGINAL_CODE): Remove. * c-common.c (c_common_truthvalue_conversion): Don't check C_EXP_ORIGINAL_CODE. * c-typeck.c (parser_build_binary_op): Use c_expr structures. Don't use C_EXP_ORIGINAL_CODE. (default_conversion, default_function_array_conversion): Don't use C_EXP_ORIGINAL_CODE. Preserve TREE_NO_WARNING. (internal_build_compound_expr): Merge into build_compound_expr. (build_compound_expr): Take two operands instead of a TREE_LIST. * objc/objc-act.c (get_super_receiver): Update calls to build_compound_expr. cp: * typeck.c (build_modify_expr, build_x_modify_expr): Set TREE_NO_WARNING on assignments with an operator other than '='. testsuite: * g++.dg/warn/Wparentheses-1.C, g++.dg/warn/Wparentheses-2.C, gcc.dg/Wparentheses-10.c: New tests. * gcc.dg/Wparentheses-5.c: Remove XFAILs. From-SVN: r84911
2004-07-17langhooks.h (builtin_function): New langhook.Joseph Myers1-0/+2
* langhooks.h (builtin_function): New langhook. * langhooks-def.h (LANG_HOOKS_BUILTIN_FUNCTION): New. (LANG_HOOKS_INITIALIZER): Update. * tree.h (builtin_function): Remove. * doc/tm.texi: Update. * c-tree.h (builtin_function): Declare. * c-common.c, config/alpha/alpha.c, config/arm/arm.c, config/c4x/c4x.c, config/frv/frv.c, config/i386/i386.c, config/ia64/ia64.c, config/iq2000/iq2000.c, config/rs6000/rs6000.c, config/s390/s390.c, config/sh/sh.c, config/stormy16/stormy16.c: All callers of builtin_function changed. ada: * gigi.h (builtin_function): Declare. cp: * cp-tree.h (builtin_function): Declare. fortran: * trans.h (builtin_function): Declare. java: * java-tree.h (builtin_function): Declare. From-SVN: r84878
2004-07-08c-decl.c (static_ctors, [...]): Make static.Zack Weinberg1-4/+0
* c-decl.c (static_ctors, static_dtors): Make static. (pop_file_scope): Call c_common_write_pch and cgraph_finalize_compilation_unit here. (build_cdtor): Moved here from c-objc-common.c; simplify. (c_write_global_declarations_1): Clarify comment. (c_write_global_declarations): Close the external scope before doing anything else. Call build_cdtor, cgraph_optimize, and mudflap_finish_file here. * c-lang.c (finish_file): Don't call c_objc_common_finish_file. Clarify comment. * c-objc-common.c: No need to include cgraph.h. (build_cdtor): Moved to c-decl.c. (c_objc_common_finish_file): Delete. * c-tree.h: Update to match. * objc/objc-act.c (finish_file): Don't call c_objc_common_finish_file. (generate_static_references): Set TREE_USED before calling finish_decl. Eliminate unnecessary dummy declaration. Call rest_of_decl_compilation on the static_instances_decl. From-SVN: r84307
2004-07-05langhooks.c: Don't include gt-langhooks.h.Zack Weinberg1-1/+0
* langhooks.c: Don't include gt-langhooks.h. (var_labelno): Delete. (lhd_set_decl_assembler_name): Do not append a distinguishing number to file-scope internal-linkage declarations for the first input file, even if they have DECL_CONTEXT set. Use DECL_UID of the declaration itself (if at block scope), or its containing TRANSLATION_UNIT_DECL (if at file scope) for the distinguishing number. * opts.c (cur_in_fname): New global. * opts.h: Declare it. * tree.c: Include opts.h. (make_node_stat): If creating a TRANSLATION_UNIT_DECL, give it DECL_UID equal to cur_in_fname. (copy_node_stat): Do not change DECL_UID when copying a TRANSLATION_UNIT_DECL. (build_common_tree_nodes): Adjust next_decl_uid to reserve the range 0 .. num_in_fnames-1 for TRANSLATION_UNIT_DECLs. * c-decl.c (c_static_assembler_name): Delete. * c-tree.h (c_static_assembler_name): Delete prototype. * c-lang.c, objc/objc-lang.c: Don't override LANG_HOOKS_SET_DECL_ASSEMBLER_NAME. * Makefile.in (tree.o): Update dependencies. (GTFILES): Remove langhooks.c. cp: * decl.c (cxx_init_decl_processing): Call build_common_tree_nodes before creating the global NAMESPACE_DECL. From-SVN: r84123
2004-07-05c-tree.h (TYPE_ACTUAL_ARG_TYPES): Use TYPE_LANG_SLOT_1.Nathan Sidwell1-1/+1
* c-tree.h (TYPE_ACTUAL_ARG_TYPES): Use TYPE_LANG_SLOT_1. * dwarf2out.c (add_data_member_location_attribute): Check for TREE_BINFO. * tree.c (tree_node_kinds): Add "binfos". (binfo_lang_slots): New. (make_node_stat): Add TREE_BINFO. (make_tree_binfo_stat): New. (tree_node_structure): Add TREE_BINFO. * tree.def (TREE_BINFO): New. * tree.h (REC_OR_UNION_CHECK): Rename to ... (RECORD_OR_UNION_CHECK): ... here. (NOT_RECORD_OR_UNION_CHECK): New. (TRE_VIA_VIRTUAL): Allow TREE_LIST or TREE_BINFO. (TYPE_FIELDS, TYPE_METHODS, TYPE_VFIELD): Adjust for RECORD_OR_UNION_CHECK. (TYPE_BINFO): Use RECORD_OR_UNION_CHECK. (TYPE_LANG_SLOT_1): New. (BINFO_TYPE, BINFO_OFFSET, BINFO_VTABLE, BINFO_VIRTUALS, BINFO_BASETYPES, TYPE_BINFO_BASETYPES, BINFO_VPTR_FIELD, BINFO_BASEACCESSES, BINFO_INHERITANCE_CHAIN): Adjust. (BINFO_ELTS): Remove. (BINFO_LANG_SLOT): New. (struct tree_binfo): New. (binfo_lang_slots): Declare. (enum tree_node_structure_enum): Add TS_BINFO. (union tree_node): Add binfo. (make_tree_binfo_stat): Declare. (make_tree_binfo): New. (enum tree_node_kind): Add binfo_kind. * cp/call.c (enforce_access): Expect TREE_BINFO. * cp/class.c (binfo_ctor_vtable): Check TREE_BINFO. * cp/cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove. (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF): Adjust. (BINFO_LANG_ELTS): Remove. (BINFO_LANG_SLOTS): New. (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1. (CLASSTYPE_TEMPLATE_INFO): Adjust. * cp/pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case. * cp/search.c (lookup_member): Check TREE_BINFO. * cp/semantics.c (perform_or_defer_access_check): Likewise. (check_accessibility_of_qualified_id): Check deferred_access_no_check. * cp/tree.c (make_binfo): Use make_tree_binfo. * java/class.c (make_class): Use make_tree_binfo. (set_super_info, add_interface_do): Likewise. * java/java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO. * objc/objc-act.c (start_class, objc_declare_protocols, start_protocols): Use TYPE_LANG_SLOT_1. * objc/objc-act.h (CLASS_BINFO_ELTS, PROTOCOL_BINFO_ELTS): Rename to ... (CLASS_LANG_SLOT_ELTS, PROTOCOL_LANG_SLOT_ELTS): ... here. (CLASS_IVARS, CLASS_RAW_IVARS, CLASS_STATIC_TEMPLATE, CLASS_CATEGORY_LIST, CLASS_PROTOCOL_LIST, CLASS_OWN_IVARS, PROTOCOL_LIST, PROTOCOL_FORWARD_DECL): Use TYPE_LANG_SLOT_1. From-SVN: r84110
2004-07-03c-decl.c (struct c_binding): Remove contour field; add depth, invisible, ↵Zack Weinberg1-6/+2
nested fields. * c-decl.c (struct c_binding): Remove contour field; add depth, invisible, nested fields. (B_IN_SCOPE, B_IN_CURRENT_SCOPE, B_IN_FILE_SCOPE) (B_IN_EXTERNAL_SCOPE): New convenience macros. (bind): Add invisible and nested arguments. Initialize new fields of struct c_binding; adjust loop scanning for insertion point. (free_binding_and_advance): Clear structure with memset. (pop_scope): Adjust to match. Set DECL_CONTEXT on everything in file scope, even if it's in external scope too. (pushdecl): Adjust to match. Create invisible file-scope declarations for block-scope forward declarations of static functions. (pushtag, warn_if_shadowing, pushdecl_top_level, implicitly_declare) (undeclared_variable, lookup_label, declare_label, define_label) (lookup_tag, lookup_name, lookup_name_in_scope, builtin_function) (c_make_fname_decl, store_parm_decls_newstyle, identifier_global_value) (store_parm_decls_oldstyle): Adjust to match. (diagnose_mismatched_decls): Correct handling of linkage clashes. (merge_decls): No need to copy C_DECL_IN_EXTERNAL_SCOPE. * c-tree.h (C_DECL_IN_EXTERNAL_SCOPE): Delete. (C_DECL_DECLARED_BUILTIN, C_DECL_REGISTER): Slide down one. From-SVN: r84046
2004-07-01re PR c/1027 (slightly misleading printf format warning)Joseph Myers1-0/+2
PR c/1027 * c-lang.c (c_initialize_diagnostics): Move from here ... * c-objc-common.c: ... to here. Include "c-pretty-print.h". (c_tree_printer): Use pretty-printer to format %T. * c-pretty-print.c (pp_c_specifier_qualifier_list): Include space before '*' if not C++. (pp_c_direct_abstract_declarator): Don't try to print array upper bound for flexible array members. * c-tree.h: Include "diagnostic.h". (c_initialize_diagnostics): Declare. * objc/objc-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Define. * c-format.c (format_type_warning): New function. Improve diagnostics for incorrect format argument types. (check_format_types): Use it. Add two parameters. Use the TYPE_MAIN_VARIANT of wanted_type. (check_format_info_main): Pass new parameters to check_format_types. (struct format_wanted_type): Update comment. testsuite: * gcc.dg/Wswitch-enum.c, gcc.dg/Wswitch.c, gcc.dg/format/branch-1.c, gcc.dg/format/diag-1.c, gcc.dg/format/multattr-3.c, gcc.dg/format/xopen-1.c: Update expected warning text. * gcc.dg/format/diag-2.c: New test. From-SVN: r83965
2004-06-24c-decl.c (c_in_iteration_stmt, [...]): Remove.Richard Henderson1-20/+14
* c-decl.c (c_in_iteration_stmt, c_in_case_stmt): Remove. (c_break_label, c_cont_label): New. (start_function): Update initializations. (c_push_function_context): Update saves. (c_pop_function_context): Update restores. * c-parse.in: Update expected conflicts. (stmt_count, compstmt_count): Remove. Remove all updates. (if_prefix, simple_if, do_stmt_start): Remove. (lineno_labeled_stmt): Remove. (lineno_labels): New. (c99_block_lineno_labeled_stmt): Use it. (lineno_stmt, lineno_label): Don't clear EXPR_LOCUS before calling annotate_with_locus. (select_or_iter_stmt): Replace by ... (condition, if_statement_1, if_statement_2, if_statement, start_break, start_continue, while_statement, do_statement, for_cond_expr, for_incr_expr, for_statement, switch_statement): New. (stmt): Split out ... (stmt_nocomp): ... this. Use c_finish_bc_stmt, c_finish_goto_label, c_finish_goto_ptr. * c-semantics.c (add_stmt): Don't add line numbers to labels. * c-tree.h: Update prototypes. (struct language_function): Remove x_in_iteration_stmt, x_in_case_stmt; add x_break_label, x_cont_label, x_switch_stack. (c_switch_stack): Declare. * c-typeck.c (c_finish_goto_label, c_finish_goto_ptr): New. (c_finish_return): Return the statement. (c_switch_stack): Rename from switch_stack; export. (if_elt, if_stack, if_stack_space, if_stack_pointer): Remove. (c_begin_if_stmt, c_finish_if_cond, c_finish_then, c_begin_else, c_finish_else): Remove. (c_finish_if_stmt): Rewrite to perform the entire operation. (c_begin_while_stmt, c_finish_while_stmt_cond, c_finish_while_stmt, c_begin_for_stmt, c_finish_for_stmt_init, c_finish_for_stmt_cond, c_finish_for_stmt_incr, c_finish_for_stmt): Remove. (c_finish_loop): New. (c_finish_bc_stmt): New. (c_finish_expr_stmt): Return the statement. Split out... (c_process_expr_stmt): ... this. Don't add locus to error marks. * gimplify.c (gimplify_cond_expr): Accept NULL type statements. * tree-gimple.c (is_gimple_stmt): Likewise. * tree-pretty-print.c (dump_generic_node <COND_EXPR>): Likewise. (print_struct_decl): Delete empty compound statement. * objc/objc-act.c (objc_build_throw_stmt): Return the statement. * objc/objc-act.h: Update decl. From-SVN: r83620