summaryrefslogtreecommitdiff
path: root/gcc/c-parse.in
Commit message (Collapse)AuthorAgeFilesLines
* /tmp/cvs001644kcook2003-10-021-1/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72005 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-09-25 Ziemowit Laski <zlaski@apple.com>zlaski2003-09-251-1/+1
| | | | | | | * cp-parse.in (objc_try_stmt): Do not specify a %type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71762 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-09-24 Ziemowit Laski <zlaski@apple.com>zlaski2003-09-251-160/+142
| | | | | | | | | MERGE OF objc-improvements-branch into MAINLINE. See 'gcc/ChangeLog' and 'gcc/testsuite/ChangeLog' for the gory details. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71748 138bc75d-0d04-0410-961f-82ee72b054a4
* Revert DECL_SOURCE_LOCATION -> TREE_LOCUS change.rth2003-09-221-5/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71641 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree.h (TREE_LOCUS): Rename from DECL_SOURCE_LOCATION; make const.rth2003-09-211-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (TREE_FILENAME, TREE_LINENO): Likewise. (set_tree_locus, copy_tree_locus, set_tree_file_line): New. (TREE_LOCUS_SET_P): New. * c-aux-info.c, c-decl.c, c-parse.in, coverage.c, dbxout.c, diagnostic.c, dwarf2out.c, dwarfout.c, function.c, integrate.c, print-tree.c, stmt.c, toplev.c, tree-dump.c, tree-inline.c, tree-optimize.c, tree.c, tree.def, xcoffout.c, config/alpha/alpha.c, config/mips/mips.c, doc/c-tree.texi, objc/objc-act.c: Update to match. ada/ * trans.c, utils.c: Update for DECL_SOURCE_LOCATION rename and change to const. cp/ * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c, method.c, optimize.c, pt.c, semantics.c, tree.c: Update for DECL_SOURCE_LOCATION rename and change to const. f/ * com.c, ste.c: Update for DECL_SOURCE_LOCATION rename and change to const. java/ * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y, resource.c: Update for DECL_SOURCE_LOCATION rename and change to const. treelang/ * treetree.c: Update for DECL_SOURCE_LOCATION rename and change to const. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71636 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-09-15 Andreas Jaeger <aj@suse.de>aj2003-09-151-0/+7
| | | | | | | | | | | | | | | | | | | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * doc/invoke.texi (Warning Options): Describe -Wold-style-definition. * c-opts.c (c_common_handle_option): Handle OPT_Wold_style_definition. * c-parse.in: Warn about old-style parameter definition. * c-common.c: Define warn_old_style_defintion. * c-common.h: Declare it. * c.opt: Add Wold-style-defintion. testsuite: 2003-09-15 Andreas Jaeger <aj@suse.de> * gcc.dg/Wold-style-definition-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71400 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (c-objc-common.o): Kill gt-c-objc-common.h dependency.hubicka2003-09-031-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-decl.c (finish_function): Kill arguments, always use cgraph path. * c-objc-common.c: Kill include of gt-c-objc-common.h (expand_deferred_fns, deffer_fn): Kill function. (deferred_fns): Kill variable. (finish_cdtor): Update finish_function call. (c_objc_common_finish_file): Always call cgraph code. * c-parse.c: Regenerate. * c-parse.y: Regenerate. * c-tree.h (finish_function): Update prototype. * objc-acct.c (build_module_descriptor, finish_method_def): Update call of finish_function. * cgraphunit.c (cgraph_default_inline_p, cgraph_analyze_function): Add forward prototype. (cgraph_finalize_function): In non-unit-at-a-time mode analyze the function and assemble it if needed. (cgraph_finalize_compilation_unit): Do nothing in non-unit-at-a-time mode. (cgraph_optimize): Likewise. (cgraph_expand_function): In non-unit-at-a-time mode keep function body even when it has no inline callees. * c-parse.in: Update calls to finish_function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71028 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-decl.c (gettags, pushdecl_function_level): Delete.zack2003-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (last_function_parm_vars): Rename last_function_parm_others. (current_function_parm_vars): Rename current_function_parm_others. (struct c_scope): Rewrite comment explaining this data structure. Add names_last, blocks_last, parms_last fields. Rename incomplete_list to incomplete. (SCOPE_LIST_APPEND, SCOPE_LIST_CONCAT): New macros. (poplevel): Ignore second argument. No need to nreverse anything. Restructure such that each list is processed exactly once. Use 'const location_t *locus' syntactic sugar variable where useful. Issue unused variable warnings ourselves, do not rely on function.c. (insert_block, pushdecl, bind_label): Use SCOPE_LIST_APPEND. (pushdecl_top_level): Likewise. Don't call duplicate_decls. (implicitly_declare): decl cannot be error_mark_node. (undeclared_variable): Manipulate scope structure directly. (c_make_fname_decl): Likewise. (getdecls, c_init_decl_processing): Fix comment. (mark_forward_parm_decls): Use SCOPE_LIST_CONCAT. No need for 'last' variable. (grokparms): No need to nreverse parms list. (store_parm_decls_newstyle): Set up the parms_last and names_last fields of the new scope too. (store_parm_decls_oldstyle): Can assume DECL_WEAK is not set on parms to begin with; check this under ENABLE_CHECKING. Set up parms_last. (check_for_loop_decls): Refer directly to current_scope->tags. Use consistent quote style in diagnostics. (c_write_global_declarations): The names list is not backward. * c-common.h: Don't prototype gettags. * c-parse.in: Call poplevel with second argument 0 always. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70061 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-decl.c (last_function_parm_vars, current_function_parm_vars):zack2003-07-291-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New static variables. (struct c_scope): Add parms and warned_forward_parm_decls fields; remove parm_order. (storedecls, storetags): Delete. (poplevel): Also clear bindings on the parms chain. (pushdecl): Handle forward declarations of parameters, and chain PARM_DECLs on the parms list, not the names list. (lookup_name_current_level): Check for PARM_DECLs on the parms list too. (push_parm_decl): Don't update parm_order. (clear_parm_order): Rename mark_forward_parm_decls. Issue the warning, only once per parameter list, and set TREE_ASM_WRITTEN on the decls here. Then move the forward decls to the names list. (grokparms): Set last_function_parm_vars. (get_parm_info): Don't use gettags or getdecls. No need to extract non-parms from the parms list, or reorganize the parms list. Feed nonparms back in the TREE_TYPE of the list node returned. Issue only one error per parameter list for "void" appearing more than once in said parameter list. Collapse parmlist_tags_warning into this function to avoid double scan of tags list. (start_function): Set current_function_parm_vars. (store_parm_decls_newstyle): Bypass pushdecl, manipulate scope directly. Get non-parms from current_function_parm_vars; no need to extract them from the parms chain. Properly bind tags in the new scope. (store_parm_decls_oldstyle): No need to extract non-parameters from the parms chain, nor to store them back afterward. Move declaration to top of function, restructure code reordering DECL_ARGUMENTS. (store_parm_decls): No need to save and restore warn_shadow. * c-parse.in: Don't call parmlist_tags_warning nor clear_parm_order. Call mark_forward_parm_decls when forward parm decls are encountered. * c-tree.h: Prototype mark_forward_parm_decls; not clear_parm_order or parmlist_tags_warning. testsuite: * gcc.dg/struct-in-proto-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69945 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-parse.in (lineno_stmt_decl_or_labels_ending_decl): Also warnhp2003-07-281-2/+5
| | | | | | | | | | | | | | | | | | when warn_declaration_after_statement. Call pedwarn_c90, not pedwarn. Correct message: it's "ISO C90", not "ISO C89". * c-common.c (warn_declaration_after_statement): Define. * c-common.h (warn_declaration_after_statement): Declare. * c.opt (Wdeclaration-after-statement): New. * c-errors.c (pedwarn_c90): New function. * c-opts.c (c_common_handle_option) <case OPT_Wdeclaration_after_statement>: New. * c-tree.h (pedwarn_c90): Declare. * doc/invoke.texi (Option Summary): Document -Wdeclaration-after-statement. (Warning Options): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69899 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree.h (boolean_type_node): Move from C/C++/Java frontends.jason2003-07-241-10/+10
| | | | | | | | | | | | | | | | | | (boolean_true_node, boolean_false_node): Likewise. (enum tree_index): Add TI_BOOLEAN_{TYPE,FALSE,TRUE}. * tree.c (build_common_tree_nodes): Init boolean_type_node. (build_common_tree_nodes_2): Init boolean_{true,false}_node. * stor-layout.c (set_sizetype): Handle an early BOOLEAN_TYPE. * c-common.h (truthvalue_type_node): Renamed from boolean_type_node. (truthvalue_true_node): Renamed from boolean_true_node. (truthvalue_false_node): Renamed from boolean_false_node. * c-decl.c: Just set truthvalue_* to integer_*. * c-*.[ch]: s/boolean/truthvalue/. s/c_bool/boolean/. * cp/decl.c: Just set truthvalue_* to boolean_*. * java/java-tree.h: Move boolean_type_node et al to the back end. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69758 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-decl.c (named_labels, shadowed_labels, label_level_chain)zack2003-07-191-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (push_label_level, pop_label_level): Kill. (struct binding_level): Rename level_chain to outer. Add outer_function field. Change parm_flag, function_body, keep, keep_if_subblocks to 1-bit bitfields of type bool. (current_function_level): New variable. (keep_next_level_flag, keep_next_if_subblocks): Change type to bool. (keep_next_level, declare_parm_level, warn_if_shadowing): Update to match. (struct language_function): Kill named_labels, shadowed_labels fields. (c_init_decl_processing, start_function, c_push__function_context) (c_pop_function_context): No need to muck with named_labels nor shadowed_labels. (make_binding_level): No need to clear the structure here. (pop_binding_level): Always operate on current_binding_level. Update current_function_level if necessary. (pushlevel): Don't clear named_labels. Update current_function_level if necessary. Use "true" and "false" where appropriate. (poplevel): Diagnose labels defined but not used, or vice versa, and clear out label-meanings leaving scope, while walking down the decls list, for all binding levels. Handle LABEL_DECLs appearing in the shadowed list. pop_binding_level takes no arguments. (pushdecl_function_level): Use current_function_level. (make_label, bind_label): New static functions. (declare_label): New exported function. (lookup_label, define_label): Rewritten for new data structure. (shadow_label): Kill. * c-tree.h: Prototype declare_label; don't prototype push_label_level, pop_label_level, nor shadow_label. * c-parse.in: Remove all calls to push_label_level and pop_label_level. Use declare_label for __label__ decls. * doc/extend.texi: Clarify that __label__ can be used to declare labels with local scope in any nested block, not just statement expressions. Cross-reference nested functions section from local labels section. testsuite: * gcc.dg/noncompile/label-1.c: New comprehensive test case for diagnostics of ill-formed constructs involving labels. * gcc.dg/noncompile/label-lineno-1.c: Add error regexp for the new 'previously defined here' message. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69597 138bc75d-0d04-0410-961f-82ee72b054a4
* * alias.c alloc-pool.c bitmap.c bitmap.h bt-load.c builtins.cghazi2003-07-191-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | c-common.c c-decl.c c-incpath.c c-lex.c c-opts.c c-parse.in c-pragma.c c-typeck.c calls.c cfg.c cfganal.c cfgloop.c cfgrtl.c collect2.c combine.c conflict.c coverage.c cppexp.c cppfiles.c cpphash.c cppinit.c cpplex.c cpplib.c cppmacro.c cppspec.c cpptrad.c cse.c cselib.c dbxout.c defaults.h df.c dominance.c dwarf2out.c dwarfout.c emit-rtl.c except.c expmed.c expr.c final.c fix-header.c flow.c fold-const.c function.c gcc.c gccspec.c gcov.c gcse.c genattr.c genattrtab.c genautomata.c genconditions.c genemit.c genextract.c genoutput.c genrecog.c gensupport.c ggc-page.c ggc-simple.c global.c graph.c haifa-sched.c hashtable.c integrate.c jump.c langhooks.c lcm.c line-map.c local-alloc.c loop.c mips-tdump.c mips-tfile.c mkdeps.c optabs.c params.c postreload.c prefix.c print-tree.c protoize.c ra-build.c ra-colorize.c ra-rewrite.c ra.c recog.c reg-stack.c regclass.c regmove.c regrename.c reload.c reload1.c reorg.c resource.c sbitmap.c sched-deps.c sched-rgn.c sched-vis.c sdbout.c simplify-rtx.c ssa-ccp.c ssa.c stmt.c stor-layout.c timevar.c tlink.c toplev.c tree-dump.c tree.c unroll.c unwind-dw2-fde.c varasm.c varray.c vmsdbgout.c xcoffout.c: Remove unnecessary casts. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69587 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-decl.c (pushdecl_function_level): Make static, return nothing.zack2003-07-181-2/+2
| | | | | | | | | | | | | | (kept_level_p): Fold into poplevel. (undeclared_variable): Moved here from c-typeck.c. Export. * c-tree.h (KEEP_YES, KEEP_NO, KEEP_MAYBE): New #defines. (undeclared_variable): Prototype here. Don't prototype kept_level_p nor pushdecl_function_level. * c-parse.in: Change first argument to poplevel from "kept_level_p()" to "KEEP_MAYBE". * c-typeck.c (undeclared_variable): Moved to c-decl.c. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69540 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-decl.c: Fix typos in several comments. Remove allzack2003-07-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | #if 0 blocks; reindent as needed. Remove unused argument to declare_parm_level; all callers changed. * c-parse.in: Update calls to declare_parm_level. Avoid issuing a double warning in some circumstances. * c-typeck.c: Update calls to declare_parm_level. * c-tree.h: Update prototype of declare_parm_level. * c-pragma.c (apply_pragma_weak): Don't complain about a redundant #pragma weak. * objc/objc-act.c (forward_declare_categories, build_selector_reference_decl, build_class_reference_decl, build_objc_string_decl, synth_forward_declarations, build_protocol_reference): Set TREE_PUBLIC on synthetic forward decl to 0, consistent with eventual definition. Correct comments to match. cp: * pt.c (get_bindings): Make definition consistent with forward declaration. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69519 138bc75d-0d04-0410-961f-82ee72b054a4
* Index: ChangeLoggeoffk2003-07-111-13/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-07-10 Geoffrey Keating <geoffk@apple.com> * c-decl.c (finish_decl): Handle 'used' here... * cgraphunit.c (cgraph_finalize_function): ... and here ... * c-common.c: (handle_used_attribute): ... not here. * configure.in (onstep): Support --enable-intermodule. * Makefile.in (OBJS-common): New. (OBJS-md): New. (OBJS-archive): New. (OBJS): Build from OBJS-common, OBJS-md, OBJS-archive. (OBJS-onestep): New. (libbackend.a): Support @onestep@. (libbackend.o): New. * configure: Regenerate. * c-common.h (c_reset_state): New prototype. (c_parse_file): New prototype. (finish_file): Move prototype from c-tree.h. * c-decl.c: Include <hashtab.h>. (builtin_decls): New. (current_file_decl): New. (duplicate_decls): Add extra parameter. Change all callers. Don't output duplicate common symbols. (link_hash_hash): New. (link_hash_eq): New. (poplevel): Handle popping of the top level. (warn_if_shadowing): Handle TRANSLATION_UNIT_DECL. (pushdecl): Set DECL_CONTEXT to TRANSLATION_UNIT_DECL if appropriate. (pushdecl_top_level): Likewise. (redeclaration_error_message): Handle TRANSLATION_UNIT_DECL. (c_init_decl_processing): Create TRANSLATION_UNIT_DECL. (finish_decl): Handle TRANSLATION_UNIT_DECL. (merge_translation_unit_decls): New. (c_write_global_declarations): New. (c_reset_state): New. (implicitly_declare): Handle TRANSLATION_UNIT_DECL. * c-lang.c (LANG_HOOKS_WRITE_GLOBALS): New. * c-objc-common.c (c_cannot_inline_tree_fn): Handle TRANSLATION_UNIT_DECL. (c_objc_common_finish_file): Call merge_translation_unit_decls. * c-opts.c (in_fnames): Rename from in_fname. (c_common_decode_option): Handle multiple input filenames. (c_common_post_options): Likewise. (c_common_parse_file): Likewise; also, call c_parse_file rather than yyparse. * c-parse.in: Move cleanup code to c_parse_file. (free_parser_stacks): Move contents to c_parse_file. (c_parse_file): New. * c-tree.h (union lang_tree_node): Chain along TYPE_NEXT_VARIANT for integer types. (C_DECL_FILE_SCOPE): New. (finish_file): Move prototype to c-common.h. (merge_translation_unit_decls): New prototype. (comptypes): Add extra parameter to prototype. (c_write_global_declarations): New prototype. * c-typeck.c (tagged_types_tu_compatible_p): New. (function_types_compatible_p): Add extra parameter, change all callers. (type_lists_compatible_p): Likewise. (comptypes): Likewise. (struct tagged_tu_seen): New. (tagged_tu_seen_base): New. (build_unary_op): Handle TRANSLATION_UNIT_DECL. (c_mark_addressable): Remove #if 0 code. * calls.c (special_function_p): Handle TRANSLATION_UNIT_DECL, add comment explaining why it shouldn't have to. * cgraph.h (struct cgraph_node): Add chain_next and chain_prev GTY options. * cppinit.c (cpp_read_next_file): New. (cpp_read_main_file): Use it. * cpplib.c (undefine_macros): New. (cpp_undef_all): New. * cpplib.h (cpp_read_next_file): Prototype. (cpp_undef_all): Prototype. * langhooks-def.h (write_global_declarations): Remove prototype. * toplev.h (write_global_declarations): Add prototype. * tree.c (decl_type_context): Use switch statement, handle TRANSLATION_UNIT_DECL. * tree.def: Update documentation for TRANSLATION_UNIT_DECL. (TRANSLATION_UNIT_DECL): New kind of tree. * tree.h: Update documentation for TRANSLATION_UNIT_DECL. * Makefile.in (c-decl.o): Add $(HASHTAB_H) to dependencies. * doc/invoke.texi: Make attempt to document new functionality. 2003-05-19 Per Bothner <bothner@apple.com> * gcc.c (combine_inputs): New. (process_command): Set combine_inputs. (do_spec_1): Handle combine_inputs. (main): Likewise. Index: cp/ChangeLog 2003-07-10 Geoffrey Keating <geoffk@apple.com> * decl.c (cp_finish_decl): Handle 'used' attribute. * cp-lang.c (c_reset_state): New dummy routine. * cp-tree.h (finish_file): Move prototype to c-common.h. * parser.c (c_parse_file): Rename from yyparse; don't call finish_file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69224 138bc75d-0d04-0410-961f-82ee72b054a4
* * rtl.h (emit_line_note): Take a location_t.nathan2003-07-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (emit_line_note_force): Remove. (set_file_and_line_for_statement): Take a location_t. * tree.g (emit_line_note): Take a location_t. * emit-rtl.c (emit_line_note): Take a location_t. (emit_line_note_force): Remove. * function.c (init_function_start): Adjust emit_line_note call. (expand_function_end): Use force_next_line_note, not emit_line_note_force. * c-parse.in (maybe_type_qual): Adjust emit_line_note calls. * c-semantics.c (genrtl_do_pushlevel, genrtl_goto_stmt, genrtl_expr_stmt_value, genrtl_decl_stmt, genrtl_if_stmt, genrtl_while_stmt, genrtl_do_stmt_1, genrtl_return_stmt, genrtl_for_stmt, genrtl_break_stmt, genrtl_continue_stmt, genrtl_continue_stmt, genrtl_switch_stmt, genrtl_asm_stmt): Likewise. * expr.c (expand_expr): Likewise. * integrate.c (expand_inline_function): Likewise. * stmt.c (set_file_and_line_for_stmt): Take a location_t. (expand_decl_init): Adjust emit_line_note call. * ada/trans.c (build_unit_elab, set_lineno): Adjust emit_line_note calls. * cp/semantics.c: (genrtl_try_block) Adjust emit_line_note calls. * f/com.c (bison_rule_pushlevel_, bison_rule_compstmt_): Adjust emit_line_note calls. * f/ste.c (ffeste_emit_line_note_): Likewise. * java/expr.c (expand_byte_code): * treelang/treetree.c (tree_code_if_start, tree_code_if_else, tree_code_if_end, tree_code_create_function_initial, tree_code_create_function_wrapup, tree_code_generate_return, tree_code_output_expression_statement): Adjust emit_line_note calls. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69047 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h: Convert prototypes to ISO C90.aj2003-07-061-18/+14
| | | | | | | | | | | | | | | | | | * c-parse.in: Likewise. * c-pragma.h: Likewise. * c-typeck.c: Likewise. * cfghooks.h: Likewise. * cfgloopanal.c: Likewise. * dbxout.h: Likewise. * debug.h: Likewise. * dwarf2asm.h: Likewise. * gcov.c: Likewise. * gengtype-lex.l: Likewise. * sched-int.h: Likewise. * timevar.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69010 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makfile.in: Remove traces of mbchar.neil2003-07-061-4/+0
| | | | | | | | | | | | | | | | * c-parse.in (MULTIBYTE_CHARS): Remove. * config.in (MULTIBYTE_CHARS): Remove. * configure: Remove --enable-mbchar. * configure.in: Remove --enable-mbchar. * mbchar.c, mbchar.h: Remove. * system.h: Poison MULTIBYTE_CHARS. * config/linux-aout.h (MULTIBYTE_CHARS): Remove. * config/linux.h (MULTIBYTE_CHARS): Remove. * config/svr4.h (MULTIBYTE_CHARS): Remove. * config/sparc/linux.h (MULTIBYTE_CHARS): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69009 138bc75d-0d04-0410-961f-82ee72b054a4
* * cpplib.h (CPP_AT_NAME, CPP_OBJC_STRING): New token types.zack2003-07-051-119/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (struct cpp_options): Add narrow_charset, wide_charset, bytes_big_endian fields. Remove EBCDIC field. (cpp_init_iconv, cpp_interpret_string): New external interfaces. * cpphash.h: Include <iconv.h> if we have it, otherwise provide a dummy definition of iconv_t. (struct cpp_reader): Add narrow_cset_desc and wide_cset_desc fields. (_cpp_valid_ucn): Update prototype. (_cpp_destroy_iconv): New prototype. * doc/cpp.texi: Document character set handling. * doc/cppopts.texi: Document -fexec-charset= and -fexec-wide-charset=. * doc/extend.texi: Delete entire section on multiline strings. Rewrite section on __FUNCTION__ etc now that these are variables in C. * cppucnid.tab, cppucnid.pl: New files. * cppucnid.h: New generated file. * cppcharset.c: Include cppucnid.h. Lots of commentary added. (iconv_open, iconv, iconv_close): Provide dummy definitions if !HAVE_ICONV. (SOURCE_CHARSET, struct strbuf, init_iconv_desc, cpp_init_iconv, _cpp_destroy_iconv, convert_cset, width_to_mask, convert_ucn, emit_numeric_escape, convert_hex, convert_oct, convert_escape, cpp_interpret_string, narrow_str_to_charconst, wide_str_to_charconst): New. (ucn_valid_in_identifier): Use a binary search through the ucnranges table defined in cppucnid.h, not a long chain of if statements. (_cpp_valid_ucn): Add a limit pointer. Downgrade "universal character names are only valid in C++ and C99" to a warning. Issue the "meaning of \[uU] is different in traditional C" warning here. Take care not to let iconv see an invalid UCS value if we get a malformed UCN. Issue an error if we don't have iconv. (cpp_interpret_charconst): Moved here from cpplex.c. Use cpp_interpret_string to do the heavy lifting. * cppinit.c (cpp_create_reader): Initialize bytes_big_endian, narrow_charset, wide_charset fields of options structure. (cpp_destroy): Call _cpp_destroy_iconv. * cpplex.c (forms_identifier_p): Adjust call to _cpp_valid_ucn. (maybe_read_ucn, hex_digit_value, cpp_parse_escape): Delete. (cpp_interpret_charconst): Moved to cppcharset.c. * cpplib.c (dequote_string): Delete. (interpret_string_notranslate): New. (do_line, do_linemarker): Use interpret_string_notranslate. * Makefile.in (cppcharset.o): Depend on cppucnid.h. * c-common.c (fname_string, combine_strings): Delete. * c-common.h (fname_string, combine_strings): Delete prototypes. * c-lex.c (ignore_escape_flag): Delete. (cb_ident): Use cpp_interpret_string, not lex_string. (get_nonpadding_token): New function. (c_lex): Handle Objective-C @-prefixed identifiers and strings here. Adjust calls to lex_string. Don't write *value twice. (lex_string): Now handles string constant concatenation. Most of the work handed off to cpp_interpret_string. Call fix_string_type here. * c-parse.in (STRING_FUNC_NAME, VAR_FUNC_NAME): Replace with FUNC_NAME, throughout. (OBJC_STRING): New token type. (primary:STRING): No need to call fix_string_type here. (primary:objc_string): Make that OBJC_STRING. (objc_string nonterminal): Delete. (yylexname): Delete code to handle fake string constants. (yylexstring): Delete entirely. (_yylex): Handle CPP_AT_NAME and CPP_OBJC_STRING. No need to handle CPP_ATSIGN. * c.opt (-fexec-charset=, -fwide-exec-charset=): New options. * c-opts.c (missing_arg, c_common_handle_option): Handle OPT_fexec_charset_ and OPT_fwide_exec_charset_. (c_common_init): Set cpp_opts->bytes_big_endian, not cpp_opts->EBCDIC. Call cpp_init_iconv. (print_help): Document -fexec-charset= and -fexec-wide-charset=. (TARGET_EBCDIC): Delete default definition. * objc/objc-act.c (build_objc_string_object): No need to handle string constant concatenation. cp: * parser.c (cp_lexer_read_token): No need to handle string constant concatenation. testsuite: * gcc.c-torture/execute/wchar_t-1.x: New file; XFAIL wchar_t-1.c everywhere. * gcc.dg/concat.c: Concatenation of string constants with __FUNCTION__ / __PRETTY_FUNCTION__ is now a hard error. * gcc.dg/wtr-strcat-1.c: Loosen dg-warning regexp. * gcc.dg/cpp/escape-2.c: Use wide character constants where necessary to avoid multi-character character constant warning. * gcc.dg/cpp/escape.c: Likewise. * gcc.dg/cpp/ucs.c: Likewise. Remove backslashes from dg-bogus comments, as they confuse Tcl. Fix a typo. libstdc++-v3: * testsuite/22_locale/collate/compare/wchar_t/2.cc * testsuite/22_locale/collate/compare/wchar_t/wrapped_env.cc * testsuite/22_locale/collate/compare/wchar_t/wrapped_locale.cc * testsuite/22_locale/collate/hash/wchar_t/2.cc * testsuite/22_locale/collate/hash/wchar_t/wrapped_env.cc * testsuite/22_locale/collate/hash/wchar_t/wrapped_locale.cc * testsuite/22_locale/collate/transform/wchar_t/2.cc * testsuite/22_locale/collate/transform/wchar_t/wrapped_env.cc * testsuite/22_locale/collate/transform/wchar_t/wrapped_locale.cc: XFAIL on all targets. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68952 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-tree.h (define_label): Replace filename and lineno argumentsnathan2003-07-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | with a location_t. * c-decl.c (poplevel): Adjust define_label call. (pop_label_level): Likewise. (define_label): Replace filename and lineno arguments with a location_t. (store_parm_decls): Use DECL_SOURCE_LOCATION. * c-parse.in (label): Adjust define_label call. * cp/cp-tree.h (define_label): Replace filename and lineno arguments with a location_t. * cp/decl.c (pop_label): Adjust define_label call. (define_label): Replace filename and lineno arguments with a location_t. * cp/semantics.c (finish_label): Adjust define_label call. * java/decl.c (poplevel): Adjust define_label call. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68766 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c (enum c_language_kind, flag_objc): Remove.neil2003-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (fix_string_type, check_case_value, c_common_nodes_and_builtins, c_add_case_label, finish_label_addr_expr, boolean_increment): Use c_dialect_ macros. * c-common.h (enum c_language_kind): Extend. (c_dialect_cxx, c_dialect_objc): New. (flag_objc): Remove. (c_common_init_options): Update prototype. * c-cppbuiltin.c (define__GNUC__, c_cpp_builtins): Use c_dialect_ macros. * c-decl.c (finsih_decl, grokfield, finish_struct): Use c_dialect_ macros. * c-format.c (C_STD_VER, C_STD_NAME): Similarly. * c-lang.c (c_init_options): Remove. (c_language): Define. (LANG_HOOKS_INIT_OPTIONS): Use common hook. * c-lex.c (lex_charconst): Use c_dialect_cxx(). * c-opts.c (lang_flags): Make function-local. (c_common_init_options): Use c_dialect_ macros. Handle C++ diagnostic requirements. (c_common_handle_option, c_common_post_options): Use flag_cxx. * c-parse.in (init_reswords): Use c_dialect_objc (). * c-pch.c (get_ident): Use c_language. * c-pretty-print.c (pp_c_bool_literal): Use c_dialect_ macros. * c-typeck.c (comptypes, build_c_cast): Similarly. * objc/objc-lang.c (c_language): Define. (LANG_HOOKS_INIT_OPTIONS): Use common hook. (objc_init_options): Remove. cp: * Make-lang.in: Update. * cp-lang.c (c_language): Define. (LANG_HOOKS_INIT_OPTIONS): Use common hook. * cp-tree.h (cxx_init_options): Remove. * lex.c: Don't include diagnostic.h. (cxx_init_options): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68734 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-parse.in (yylexstring): Use a location_t.nathan2003-06-281-6/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68645 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-parse.in (%union): Replace filename & lineno with location.nathan2003-06-281-39/+27
| | | | | | | | | | | (save_filename, save_lineno): Remove. (save_location): New. (fndef, old_style_parm_decls_1, lineno_datadecl, lineno_decl, nested_function, notype_nested_function, if_prefix, lineno_stmt, lineno_label, label): Adjust. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68636 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-tree.h (grokfield): Remove unused filename and line parameters.nathan2003-06-271-22/+26
| | | | | | | | | | | | | | | | | | | * c-decl.c (grokfield): Remove unused filename and line parameters. * c-parse.in (component_decl): Adjust field grokking rules, adjust grokfield calls. (component_declarator): Likewise. (component_notype_declarator): Likewise. * objc/objc-act.c (build_module_descriptor): Adjust grokfield calls. (build_protocol_template, build_method_prototype_list_template, build_method_prototype_template, build_category_template, build_selector_template, build_class_template, build_super_template, build_ivar_template, build_ivar_list_template, build_method_list_template, build_method_template, add_instance_variable): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68560 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-parse.in (fndef): Set DECL_SOURCE_LINE and FILE earlier.nathan2003-05-211-28/+30
| | | | | | | | | | | | (nested_function): Likewise. (notype_nested_function): Likewise. cp: * pt.c (register_specialization): Update the decl's location, if necessary. (check_explicit_specialization): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67063 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.h (enum rid): Remove RID_BOUNDED, RID_UNBOUNDED.nathan2003-05-211-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | * c-parse.in (reswords): Remove __bounded__ and __unbounded__. (rid_to_yy): Remove RID_BOUNDED, RID_UNBOUNDED slots. * print-tree.c (print_node): Remove ambient-boundedness. * tree.h (tree_common): Remove bounded_flag. (BOUNDED_INDIRECT_YPE_P, BOUNDED_POINTER_TYPE_P, BOUNDED_REFERENCE_TYPE_P, MAYBE_BOUNDED_INDIRECT_TYPE_P, MAYBE_BOUNDED_POINTER_TYPE_P, MAYBE_BOUNDED_REFERENCE_TYPE_P, TREE_BOUNDED, TYPE_MAIN_VARIANTS_PHYSICALLY_EQUAL_P, TYPE_MAIN_PHYSICAL_VARIANT, TYPE_BOUNDED, TYPE_QUAL_BOUNDED): Remove. (TYPE_QUALS): Remove BOUNDED. (TREE_EXPR_QUALS, TREE_FUNC_QUALS): Remove. (TYPE_BOUNDED_VALUE, TYPE_BOUNDED_BASE, TYPE_BOUNDED_EXTENT, TYPE_BOUNDED_SUBTYPE, TYPE_UNBOUNDED_VARIANT, TYPE_POINTER_DEPTH, TYPE_AMBIENT_BOUNDEDNESS, MAX_POINTER_DEPT, VA_LIST_POINTER_DEPTH): Remove. (struct tree_type): Remove pointer_depth. treelang: * treetree.c (reswords): Remove __bounded__, __unbounded__. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67058 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c/10675rth2003-05-121-14/+26
| | | | | | | | | | | | | | | | * c-decl.c: Include hashtab.h. (detect_field_duplicates): New. (finish_struct): Use it. * Makefile.in (c-decl.o): Update. * c-parse.in (structsp_attr): Nreverse component_decl_list results. (component_decl_list, component_decl_list2, components, components_notype): Build list in reverse order. (enumlist): Clarify docs. Use TREE_CHAIN not chainon. * tree.c (chainon): Special case op2 null as well. Reorg for clarity. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66710 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-parse.in (if_stmt_locus): New object.gdr2003-05-091-7/+7
| | | | | | | | | | | | | (if_prefix rule): Use it. Don't use warning_with_file_and_line. (select_or_iter_stmt rule): Likewise. (if_stmt_file): Remove. (if_stmt_line): Likewise. * jump.c: include "diagnostic.h" (never_reached_warning): Don't use warning_with_file_and_line. * Makefile.in (jump.o): Add dependce on diagnostic.h git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66627 138bc75d-0d04-0410-961f-82ee72b054a4
* * input.h (lineno): Rename to ...nathan2003-05-011-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (input_line): ... here. * tree.h (lineno): Rename to ... (input_line): ... here. * scan.h (lineno): Rename to ... (input_line): ... here. * toplev.c (lineno): Rename to ... (input_line): ... here. (push_srcloc, pop_srcloc): Rename lineno to input_line. * c-common.c (c_expand_start_cond, fname_decl): Likewise. * c-decl.c (poplevel, pop_label_level, lookup_label, lookup_tag, store_parm_decls, c_expand_body_1): Likewise. * c-errors.c (pedwarn_c99): Likewise. * c-format.c (status_warning): Likewise. * c-lex.c (fe_file_change, cb_def_pragma, c_lex): Likewise. * c-opts.c (c_common_post_options, c_common_parse_file): Likewise. * c-parse.in (save_filename, maybe_type_qual, ifc): Likwise. * c-semantics.c (finish_stmt_tree, build_stmt, emit_local_var, gentrtl_goto_stmt, genrtl_expr_stmt_value, genrtl_decl_stmt, genrtl_if_stmt, genrtl_while_stmt, genrtl_do_stmt, genrtl_return_stmt, genrtl_for_stmt, build_break_stmt, build_continue_stmt, genrtl_switch_stmt, genrtl_asm_stmt, prep_stmt, find_reachable_label, expand_unreachable_stmt): Likewise. * coverage.c (create_coverage): Likewise. * diagnostic.c (pedwarn, sorry, error, fatal_error, internal_error, warning, diagnostic_report_current_module, inform): Likewise. * expr.c (expand_expr): Likewise. * integrate.c (expand_inline_function, output_inline_function): Likewise. * rtl-error.c (file_and_line_for_asm): Likewise. * tree-inline.c (find_alloca_call, find_builtin_longjmp_call, walk_tree): Likewise. * tree.c (make_node): Likewise. * ada, cp, f, java, objc, treelang: Likewise. ada * trans.c (build_unit_elab, set_lineno): Rename lineno to input_line. * utils.c (pushdecl, create_label_decl, begin_subprog_body, end_subprog_body): Likewise. * utils2.c (build_call_raise): Likewise. cp * class.c (finish_struct): Rename lineno to input_line. * decl.c (push_binding_level, pop_binding_level, suspend_binding_level, resume_binding_level, make_label_decl, use_label, start_function): Likewise. * decl2.c (warn_if_unknown_interface, start_static_initialization_or_destruction, generate_ctor_or_dtor_function, finish_file): Likewise. * error.c (cp_line_of, print_instantiation_full_context, print_instantiation_context): Likewise. * except.c (check_handlers_1, check_handlers): Likewise. * init.c (create_temporary_var): Likewise. * method.c (use_thunk, synthesize_method): Likewise. * parser.c (cp_lexer_set_source_position_from_token, cp_lexer_get_preprocessor_token): Likewise. * pt.c (push_tinst_level, pop_tinst_level, tsubst_friend_function, instantiate_class_template, tsubst_decl, tsubst, tsubst_expr, instantiate_decl): Likewise. * semantics.c (genrtl_try_block, finish_label_stmt, begin_class_definition, expand_body, genrtl_finish_function): Likewise. * tree.c (build_min_nt, build_min): Likewise. f * ansify.c (die_unless): Rename lineno to input_line. * com.c (ffecom_subscript_check_, ffecom_do_entry_, ffecom_gen_sfuncdef_, ffecom_start_progunit_, ffecom_sym_transform_, ffecom_sym_transform_assign_, bison_rule_pushlevel_, bison_rule_compstmt_, finish_function, store_parm_decls): Likewise. * intrin.c (ffeintrin_fulfill_generic): Likewise. * lex.c (ffelex_hash_, ffelex_include_, ffelex_next_line_, ffelex_file_fixed, ffelex_file_free): Likewise. * std.c (ffestd_exec_end): Likewise. * ste.c (ffeste_emit_line_note_, ffeste_start_block_, ffeste_start_stmt_): Likewise. * ste.h (ffeste_filelinenum, ffeste_set_line): Likewise. java * lex.h (lineno): Rename to ... (input_line): ... here * parse-scan.y (lineno): Rename to ... (input_line): ... here. (reset_report): Rename lineno to input_line. * check-init.c (check_init): Likewise. * class.c (push_class): Likewise. * decl.c (complete_start_java_method, end_java_method): Likewise. * expr.c (expand_byte_code): Likewise. * jcf-parse.c (give_name_to_class, parse_class_file): Likewise. * jcf-write.c (generate_bytecode_insns): Likewise. * lex.c (java_init_lex, java_allocate_new_line, do_java_lex): Likewise. * parse.h (YYNOT_TWICE): Likewise. * parse.y (empty_statement, expression_statement, java_pop_parser_context, java_parser_context_save_global, yyerror, register_fields, method_header, safe_layout_class, find_in_imports_on_demand, create_artificial_method, source_end_java_method, start_complete_expand_method, build_thisn_assign, java_complete_lhs, maybe_absorb_scoping_block): Likewise. objc * objc-act.c (objc_init): Rename lineno to input_line. (build_module_descriptor, build_selector_translation_table, build_protocol_template, build_method_prototype_list_template, build_category_template, build_selector_table, build_class_template, build_super_template, build_ivar_template, build_ivar_list_template, build_method_list_template, build_method_template, add_instance_variable): Likewise. treelang * tree1.c (treelang_init): Rename lineno to input_line. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66333 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-parse.in: Remove '%expect 32' directive in objc modegdr2003-01-281-3/+0
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61940 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge from pch-branch.geoffk2003-01-101-4/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61136 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-parse.in (yyprint): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX foraj2002-12-281-24/+10
| | | | | | | correct format. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60570 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge basic-improvements-branch to trunkzack2002-12-161-0/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60174 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-tree.h (skip_evaluation): Move declaration...aoliva2002-08-151-4/+8
| | | | | | | | | | | | * c-common.h: ... here. * c-typeck.c (build_external_ref): Don't assemble_external nor mark a tree as used if skip_evaluation is set. * c-parse.in (typeof): New non-terminal to set skip_evaluation around TYPEOF. (typespec_nonreserved_nonattr): Use it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56358 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-08-09 Ziemowit Laski <zlaski@apple.com>zlaski2002-08-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.c (flag_objc): New. * c-common.h (c_language_kind): Get rid of clk_objective_c enum value. (flag_objc): New extern declaration. * c-decl.c (implicitly_declare): Call objc_check_decl instead of maybe_objc_check_decl. (finish_decl): Likewise. (grokfield): Likewise. (finish_struct): Likewise. * c-lang.c (maybe_objc_check_decl): Rename to objc_check_decl. (maybe_objc_comptypes): Rename to objc_comptypes. (maybe_building_objc_message_expr): Rename to objc_message_selector. * c-lex.c (lex_charconst): Remove uses of clk_objective_c, replace with flag_objc as needed. * c-opts.c (c_common_init_options): Likewise. (c_common_decode_option): Likewise. * c-parse.in (init_reswords): Likewise. * c-tree.h (maybe_objc_check_decl): Rename to objc_check_decl. (maybe_objc_comptypes): Rename to objc_comptypes. (maybe_building_objc_message_expr): Rename to objc_message_selector. * c-typeck.c (comptypes): Call objc_comptypes instead of maybe_objc_comptypes, and/or objc_message_selector instead of (comp_target_types): Likewise. (convert_for_assignment): Likewise. (warn_for_assignment): Likewise. * cppinit.c (init_builtins): Set __OBJC__ manifest constant independently of those for other languages. * objc/objc-act.c (maybe_objc_comptypes): Delete. (maybe_objc_check_decl): Delete. (maybe_building_objc_message_expr): Rename to objc_message_selector. * objc/objc-lang.c (objc_init_options): Use clk_c instead of clk_objective_c; set flag_objc flag. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56173 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.h (RID_AND, RID_AND_EQ, RID_NOT, RID_NOT_EQ,neil2002-07-261-13/+0
| | | | | | | | | | | | | | | | | | | RID_OR, RID_OR_EQ, RID_XOR, RID_XOR_EQ, RID_BITAND, RID_BITOR, RID_COMPL): Remove. * c-parse.in (rid_to_yy): Similarly. cp: * cp-tree.h (flag_operator_names): Remove. * decl2.c (flag_operator_names): Remove. (lang_f_options): Remove operator-names. * lex.c (D_OPNAME): Remove. (reswords): Remove operator names. (rid_to_yy): Remove operator names. (init_reswords): No need to handle D_OPNAME. * spew.c (read_process_identifier): There are no operator names. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55777 138bc75d-0d04-0410-961f-82ee72b054a4
* * ginclude/varargs.h: Replace with stub which issues #error.zack2002-07-161-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ginclude/stdarg.h: __builtin_stdarg_start is renamed __builtin_va_start. * builtins.def (BUILT_IN_VARARGS_START): Delete. (BUILT_IN_VA_START): New. * builtins.c (expand_builtin_va_start): Eliminate first argument and code to implement pre-ISO varargs. (std_expand_builtin_va_start): Ignore first argument; it is always 1. (expand_builtin): Handle BUILT_IN_VA_START and BUILT_IN_STDARG_START identically. Delete BUILT_IN_VARARGS_START case. * function.c (assign_parms): Delete hide_last_arg and all its uses. (mark_varargs): Delete function. * function.h (struct function): Delete 'varargs' bit. (current_function_varargs): Delete macro. * tree.h: Don't declare mark_varargs. * c-decl.c (c_function_varargs, c_mark_varargs): Delete. (c_expand_body): Don't call mark_varargs. * c-objc-common.c: Handle BUILT_IN_VA_START and BUILT_IN_STDARG_START identically. Delete BUILT_IN_VARARGS_START case. * c-tree.h: Don't declare c_mark_varargs. * c-parse.in: Remove grammar rules for '&...' (which has been commented out since before 2.7.2) and for '...' in K+R argument declarations. * builtins.c, function.c, integrate.c, sibcall.c, config/alpha/unicosmk.h, config/arc/arc.c, config/arc/arc.h, config/avr/avr.c, config/cris/cris.c, config/fr30/fr30.c, config/i960/i960.c, config/i960/i960.md, config/m32r/m32r.c, config/m32r/m32r.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mips/mips.c, config/mmix/mmix.c, config/mmix/mmix.h, config/mn10300/mn10300.c, config/pa/som.h, config/s390/s390.c, config/sh/sh.c, config/sh/sh.h, config/sparc/sparc.h, config/stormy16/stormy16.c: Delete all references to current_function_varargs, and code predicated on that flag. * config/alpha/alpha.c (alpha_va_start), config/arc/arc.c (arc_va_start), config/i386/i386.c (ix86_va_start), config/mips/mips.c (mips_va_start), config/mn10300/mn10300.c (mn10300_va_start), config/rs6000/rs6000.c (rs6000_va_start), config/s390/s390.c (s390_va_start), config/sh/sh.c (sh_va_start), Ignore first argument; it is always 1. * config/c4x/c4x-protos.h, config/c4x/c4x.c: Delete c4x_va_start. * config/ia64/ia64-protos.h, config/ia64/ia64.c: Delete ia64_va_start. * config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c: Delete m68hc11_va_start. * config/c4x/c4x.h, config/ia64/ia64.h, config/m68hc11/m68hc11.h: No need to define EXPAND_BUILTIN_VA_START. * doc/invoke.texi, doc/sourcebuild.texi, doc/tm.texi, doc/trouble.texi: Remove references to GCC-provided <varargs.h>. testsuite: * c-torture/execute/991216-3.c, c-torture/execute/strct-varg-1.c, c-torture/execute/va-arg-7.c, c-torture/execute/va-arg-8.c, c-torture/execute/va-arg-15.c, c-torture/execute/va-arg-16.c, c-torture/execute/va-arg-17.c, c-torture/execute/va-arg-19.c: Convert to use <stdarg.h>. * c-torture/execute/va-arg-3.c, c-torture/execute/va-arg-3.x: Delete. * gcc.dg/va-arg-2.c: New. * lib/gcc.exp, lib/objc.exp: Remove code to set -DNO_VARARGS. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55472 138bc75d-0d04-0410-961f-82ee72b054a4
* copyright date updatednathan2002-07-051-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55260 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-parse.in (extdef): Append ';'.nathan2002-07-051-0/+2
| | | | | | | (old_style_parm_decls): Append ';'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55258 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc:ghazi2002-07-031-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-parse.in (parsing_iso_function_signature): New variable. (extdef_1): New, copied from... (extdef): ... here. Reset parsing_iso_function_signature. (old_style_parm_decls): Reset parsing_iso_function_signature. (old_style_parm_decls_1): New, copied from old_style_parm_decls. Warn about ISO C style function definitions. (nested_function, notype_nested_function): Reset parsing_iso_function_signature. (parmlist_2): Set parsing_iso_function_signature. * doc/invoke.texi (-Wtraditional): Document new behavior. gcc/testsuite: * gcc.dg/cpp/tr-warn2.c: Use traditional C style function definitions. * gcc.dg/wtr-aggr-init-1.c: Likewise. * gcc.dg/wtr-conversion-1.c: Likewise. * gcc.dg/wtr-escape-1.c: Likewise. * gcc.dg/wtr-int-type-1.c: Likewise. * gcc.dg/wtr-label-1.c: Likewise. * gcc.dg/wtr-static-1.c: Likewise. * gcc.dg/wtr-strcat-1.c: Likewise. * gcc.dg/wtr-suffix-1.c: Likewise. * gcc.dg/wtr-switch-1.c: Likewise. * gcc.dg/wtr-unary-plus-1.c: Likewise. * gcc.dg/wtr-union-init-1.c: Likewise. * gcc.dg/wtr-union-init-2.c: Likewise. * gcc.dg/wtr-union-init-3.c: Likewise. * gcc.dg/wtr-func-def-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55201 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-07-02 Ziemowit Laski <zlaski@apple.com>shebs2002-07-021-14/+3
| | | | | | | | | | | | | | | | * c-parse.in (designator): Enable designated initializers if ObjC. (objcmessageexpr): Remove references to objc_receiver_context. * objc/objc-act.h (objc_receiver_context): Remove decl. * objc/objc-act.c (objc_receiver_context): Remove. (lookup_objc_ivar): Test objc_method_context instead of objc_receiver_context. 2002-07-02 Ziemowit Laski <zlaski@apple.com> * objc.dg/desig-init-1.m: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55192 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-06-19 Akim Demaille <akim@epita.fr>zack2002-06-201-41/+44
| | | | | | | | | | | | | | | | | | | * c-parse.in (initelt: identifier ':' initval): Add an empty action to fix a type clash. (aliasdecl, classdef): Add the missing closing `;'. Whitespace changes. * gengtype-yacc.y (typedef_struct): Add an empty action to preevnt $$ = $1 type clashes. cp: * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with decl.h's TYPENAME. * spew.c, lex.c: Adjust. * parse.y (explicit_instantiation): Add empty action to override the default $$ = $1 where it introduces a type clash. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54811 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c (flag_ms_extensions): Move from c++ front end.rth2002-06-161-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.h (flag_ms_extensions): Declare. * c-decl.c (c_decode_option): Add -fms-extensions. (grokfield): Don't accept anonymous structures in ISO C mode; accept only unnamed anonymous structures in GNU C mode; accept Plan 9 extensions in MS mode. * c-parse.in (SAVE_EXT_FLAGS, RESTORE_EXT_FLAGS): Rename from SAVE/RESTORE_WARN_FLAGS; add flag_iso frobbing; update all callers. (extension): Clear flag_iso. * doc/invoke.texi (C Dialect Options): Add -fms-extensions. * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common. * g++.dg/ext/anon-struct1.C: New. * g++.dg/ext/anon-struct2.C: New. * g++.dg/ext/anon-struct3.C: New. * gcc.dg/anon-struct-1.c: New. * gcc.dg/anon-struct-2.c: New. * gcc.dg/anon-struct-3.c: New. * gcc.dg/20011008-1.c: Adjust warning text. * gcc.dg/20020527-1.c: Add -fms-extensions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54670 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge from pch-branch up to tag pch-commit-20020603.geoffk2002-06-041-12/+7
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54232 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (C_COMMON_H): Fix.neil2002-05-251-23/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update other targets. * c-common.c: Don't include c-lex.h. (builtin_define_with_value): Make static and prototype. (builtin_define_std): Move from c-lex.h. * c-common.h (init_c_lex): Move from c-lex.h. * c-decl.c: Don't include c-lex.h. (make_pointer_declarator): Move from c-parse.in. * c-lex.c: Don't include c-lex.h. * c-lex.h: Remove. * c-parse.in: Don't include c-lex.h; include c-pragma.h. (make_pointer_declarator): Move to c-decl.c. * c-pragma.c: Don't include c-lex.h. * c-pragma.h (yydebug, YYDEBUG, parse_in, c_lex): Move from c-lex.h. * c-tree.h (make_pointer_declarator): New. cp: * lex.c: Don't include c-lex.h. * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h. doc: * passes.texi, tm.texi: Update. objc: * Make-lang.in: Update and correct. * objc-act.c: Don't include c-lex.h or cpplib.h. treelang: * treetree.c: Don't include c-lex.h. config: * darwin-c.c: Don't include c-lex.h. * c4x/c4x-c.c: Don't include c-lex.h. * c4x/t-c4x: Update. * i370/i370-c.c: Don't include c-lex.h. * i370/t-i370: Update. * i960/i960-c.c: Don't include c-lex.h. * i960/i960.c: Don't include cpplib.h, c-lex.h or c-pragma.h. * i960/t-960bare: Update. * i960/t-vxworks: Update. * rs6000/rs6000-c.c: Don't include c-lex.h; include c-pragma.h. * rs6000/t-darwin: Update. * rs6000/t-rs6000-c-rule: Update. * v850/v850-c.c: Don't include c-lex.h. * v850/v850.c: Don't include c-lex.h or cpplib.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53876 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.h (enum rid): Add RID_THREAD.rth2002-05-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-decl.c (start_decl): Do not set DECL_COMMON for tls variables. (grokdeclarator): Grok __thread. * c-parse.in (reswords): Add __thread. (rid_to_yy): Add RID_THREAD. * cp/lex.c (rid_to_yy): Add RID_THREAD. * tree.h (DECL_THREAD_LOCAL): New. (struct tree_decl): Add thread_local_flag. * print-tree.c (print_node): Dump DECL_THREAD_LOCAL. * tree.c (staticp): TLS variables are not static. * target-def.h (TARGET_HAVE_TLS): New. * target.h (have_tls): New. * output.h (SECTION_TLS): New. * varasm.c (assemble_variable): TLS variables can't be common for now. (default_section_type_flags): Handle .tdata and .tbss. (default_elf_asm_named_section): Handle SECTION_TLS. (categorize_decl_for_section): Handle DECL_THREAD_LOCAL. * flags.h (flag_tls_default): Declare. * toplev.c (flag_tls_default): Define. (display_help): Display help for it. (decode_f_option): Set it. * doc/extend.texi (Thread-Local): New node describing language-level thread-local storage. * doc/invoke.texi (-ftls-model): Document. * fixinc/inclhack.def (thread_keyword): New. * fixinc/fixincl.x: Rebuild. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53715 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-parse.in (malloced_yyss, malloced_yyvs): New.rth2002-04-271-0/+55
| | | | | | | | | | | | | | (yyoverflow): Re-add. Set them. (free_parser_stacks): New. * c-common.h: Declare it. * c-lex.c (c_common_parse_file): Call it. * parse.y (malloced_yyss, malloced_yyvs): New. (yyoverflow): Re-add. Set them. (free_parser_stacks): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52827 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-parse.in (yyoverflow): Revert.rth2002-04-261-35/+0
| | | | | | | * parse.y (yyoverflow): Revert. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52794 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c (fix_string_type): Split out of ...rth2002-04-261-36/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | (combine_strings): ... here. Take a varray, not a tree list. (c_expand_builtin_printf): Use fix_string_type. * c-common.h: Update decls. * c-parse.in (string): Remove. Update all uses to use STRING instead, and not call combine_strings. (yylexstring): New. (_yylex): Use it. * c-typeck.c (simple_asm_stmt): Don't call combine_strings. (build_asm_stmt): Likewise. * objc/objc-act.c (my_build_string): Use fix_string_type. (build_objc_string_object): Build varray for combine_strings. * parse.y (string): Remove. Update all uses to use STRING instead, and not call combine_strings. * rtti.c (tinfo_name): Use fix_string_type. * semantics.c (finish_asm_stmt): Don't call combine_strings. * spew.c (yylexstring): New. (read_token): Use it. * g++.dg/parse/concat1.C: New. * gcc.dg/concat2.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52790 138bc75d-0d04-0410-961f-82ee72b054a4