summaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
Commit message (Collapse)AuthorAgeFilesLines
* 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-decl.c: Fix a comment typo.kazu2002-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cfg.c: Likewise. * cfgcleanup.c: Likewise. * cfglayout.c: Likewise. * cfgrtl.c: Likewise. * c-typeck.c: Likewise. * dominance.c: Likewise. * dwarf2asm.c: Likewise. * dwarfout.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * flow.c: Likewise. * function.c: Likewise. * gcc.c: Likewise. * genautomata.c: Likewise. * integrate.c: Likewise. * loop.c: Likewise. * loop.h: Likewise. * output.h: Likewise. * profile.c: Likewise. * ra.h: Likewise. * reload1.c: Likewise. * reload.c: Likewise. * sched-rgn.c: Likewise. * stmt.c: Likewise. * tree.h: Likewise. * vmsdbgout.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60085 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-decl.c: (start_struct): Commonize flag setting.nathan2002-11-261-12/+9
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59527 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c/8518ebotcazou2002-11-201-2/+3
| | | | | | | | * c-decl.c (duplicate_decls): Outline the second definition of an extern inline function in all cases. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59302 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-decl.c (grokdeclarator): Make error for duplicate typejsm282002-11-101-1/+9
| | | | | | | | | | qualifiers into a pedwarn, disabled for C99. testsuite: * gcc.dg/c90-idem-qual-2.c, gcc.dg/c99-idem-qual-2.c: New tests. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58983 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-decl.c, cp/decl.c (start_decl): Point users of the old initialized-zack2002-10-191-1/+1
| | | | | | | typedef extension at __typeof__. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58297 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc:zack2002-10-091-19/+4
| | | | | | | | | | | | | | | | | | | | | | | | * c-decl.c (start_decl): Unconditionally issue error for 'typedef foo = bar'. (finish_decl): Remove special case for TYPE_DECL with initializer. * doc/extend.texi: Delete "Naming Types" section. Change all cross-references to that section to refer to "Typeof" instead. Add the useful safe-max()-macro example from "Naming Types" to "Typeof", rewritten using that extension. gcc/cp: * decl.c (start_decl): Unconditionally issue error for 'typedef foo = bar'. (cp_finish_decl): Remove special case for TYPE_DECL with initializer. (grokdeclarator): Remove redundant error for 'typedef foo = bar'. gcc/testsuite: * g++.dg/ext/typedef-init.C: New test. * gcc.dg/typedef-init.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57995 138bc75d-0d04-0410-961f-82ee72b054a4
* * ChangeLog: Follow spelling conventions.kazu2002-09-221-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ChangeLog.0: Likewise. * ChangeLog.1: Likewise. * ChangeLog.2: Likewise. * ChangeLog.3: Likewise. * ChangeLog.4: Likewise. * ChangeLog.5: Likewise. * ChangeLog.6: Likewise. * FSFChangeLog.10: Likewise. * FSFChangeLog.11: Likewise. * alias.c: Likewise. * basic-block.h: Likewise. * c-aux-info.c: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-semantics.c: Likewise. * c-typeck.c: Likewise. * calls.c: Likewise. * cfganal.c: Likewise. * cfgloop.c: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * conflict.c: Likewise. * cppexp.c: Likewise. * cppfiles.c: Likewise. * cpphash.h: Likewise. * cppinit.c: Likewise. * cpplex.c: Likewise. * cpplib.c: Likewise. * cpplib.h: Likewise. * cppmacro.c: Likewise. * cse.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57398 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-decl.c (grokdeclarator): Make invalid combinations with long,jsm282002-08-211-6/+5
| | | | | | | | | | | | short, signed or unsigned into hard errors. Fixes PR c/4319. Also make duplicate modifiers such as "short short" into hard errors. testsuite: * gcc.dg/typespec-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56492 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-decl.c (flexible_array_type_p): New function.jsm282002-08-171-0/+43
| | | | | | | | | | | | | (grokdeclarator, finish_struct): Use it. * doc/extend.texi: Document constraints on use of structures with flexible array members. testsuite: * gcc.dg/c90-flex-array-1.c, gcc.dg/c99-flex-array-3.c, gcc.dg/c99-flex-array-4.c: New tests. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56411 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-08-09 Ziemowit Laski <zlaski@apple.com>zlaski2002-08-101-10/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* * Makefile.in (c-opts.o, c-common.o, C_AND_OBJC_OBJS): Update.neil2002-08-071-262/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.c: Don't include tree-inline.h. (c_common_init_options, c_common_post_options): Move to c-opts.c. * c-common.h (c_common_decode_option): New. * c-decl.c (c_decode_option): Remove. * c-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option. * c-opts.c: New file. * c-tree.h (c_decode_option): Remove. * doc/passes.texi: Update. * objc/objc-act.c (objc_decode_option): Remove. * objc/objc-act.h (objc_decode_option): Remove. * objc/ojbc-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option. cp: * Make-lang.in (CXX_C_OBJS): Update. * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option. * cp-tree.h (cxx_decode_option): Remove. * decl2.c (compare_options, lang_f_options, unsupported_options, cxx_decode_option): Remove. testsuite: * objc.dg/const-str-2.m: Update. * gcc.dg/cpp/c++98.c: Change to C extension. * gcc.dg/cpp/c++98-pedantic.c: Similarly. * gcc.dg/cpp/cpp.exp: Process .C extensions too. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56105 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-decl.c (duplicate_decls): Error out for incompatible TLSaldyh2002-08-071-0/+14
| | | | | | | | | declarations. * testsuite/gcc.dg/tls/diag-3.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56084 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c: Define all C/ObjC/C++ warning and flag variables.neil2002-08-011-144/+0
| | | | | | | | | | | | | | | | | | * c-common.h: Declare all C/ObjC/C++ warning and flag variables. * c-decl.c: Move all warning and flag variables to c-common.c. * c-format.c: Move all warning variables to c-common.c. * c-tree.h: Move all warning and flag declarations to c-common.h. * objc/objc-act.c: Move all warning variables to c-common.c. (flag_warn_protocol): Rename warn_protocol. cp: * cp-tree.h: Move all warning and flag declarations to c-common.h. * decl.c: Move all warning and flag variables to c-common.c. * decl2.c: Move all warning and flag variables to c-common.c. * lex.c (flag_digraphs): Remove. (warn_traditional): Now in c-common.c. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55923 138bc75d-0d04-0410-961f-82ee72b054a4
* * builtins.def [DEF_GCC_BUILTIN]: Require an explicit ATTRSsayle2002-07-281-4/+0
| | | | | | | | | | | | | | | | argument. Mark BUILT_IN_RETURN, BUILT_IN_EH_RETURN, BUILT_IN_LONGJMP and BUILT_IN_TRAP as noreturn, the ISO C99 floating point unordered comparisons (e.g. __builtin_isgreater) as const, and leave the remaining GCC_BUILTINs unchanged. * c-decl.c (builtin_function): No need to explicitly mark BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn. * cp/decl.c (builtin_function_1): No need to explicitly mark BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55805 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-decl.c (c_decode_option): No need to handle switchesneil2002-07-251-8/+1
| | | | | | | | | cpplib handles. cp: * decl2.c (cxx_decode_option): Similarly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55737 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-decl.c (build_compound_literal): Set decl TREE_READONLY from TYPE.jakub2002-07-221-0/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55646 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-decl.c (build_compound_literal): Defer compound literal declsjakub2002-07-221-5/+11
| | | | | | | | | until until file end to emit them only if they are actually used. * gcc.dg/gnu89-init-2.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55645 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-07-21 Gabriel Dos Reis <gdr@nerim.net>gdr2002-07-211-7/+7
| | | | | | | | | | | | | | | | | | * c-decl.c (build_array_declarator): Say 'ISO C90', not 'ISO C89'. (grokdeclarator): Likewise. * c-format.c (C_STD_NAME): Likewise. * c-lex.c (interpret_integer): Likewise. * c-typeck.c (build_array_ref): Likewise. * cpplex.c (_cpp_lex_direct): Likewise. * toplev.c (documented_lang_options): Likewise. testsuite/ 2002-07-21 Gabriel Dos Reis <gdr@nerim.net> * gcc.dg/c90-arraydecl-1.c: Change C89 too C90. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55629 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
* * c-decl.c (duplicate_decls): Preserve the noreturn attribute onsayle2002-07-111-5/+0
| | | | | | | | | non-ANSI builtin functions. * gcc.c-torture/execute/builtin-noret-1.c: Test non-ANSI functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55396 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree.h: Modify builtin_function interface to take an extrasayle2002-07-011-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | argument ATTRS, which is a tree representing an attribute list. * c-decl.c (builtin_function): Accept additional parameter. * objc/objc-act.c (builtin_function): Likewise. * f/com.c (builtin_function): Likewise. * java/decl.c (builtin_function): Likewise. * ada/utils.c (builtin_function): Likewise. * cp/decl.c (builtin_function): Likewise. (builtin_function_1): Likewise. * c-common.c (c_common_nodes_and_builtins): Pass an additional NULL_TREE argument to builtin_function. (builtin_function_2): Likewise. * cp/call.c (build_java_interface_fn_ref): Likewise. * objc/objc-act.c (synth_module_prologue): Likewise. * java/decl.c (java_init_decl_processing): Likewise. * f/com.c (ffe_com_init_0): Likewise. * config/alpha/alpha.c (alpha_init_builtins): Pass an additional NULL_TREE argument builtin_function. * config/arm/arm.c (def_builtin): Likewise. * config/c4x/c4x.c (c4x_init_builtins): Likewise. * config/i386/i386.c (def_builtin): Likewise. * config/ia64/ia64.c (def_builtin): Likewise. * config/rs6000/rs6000.c (def_builtin): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55161 138bc75d-0d04-0410-961f-82ee72b054a4
* ada:ghazi2002-06-201-1/+1
| | | | | | | | | | | | | | | | | | * utils.c (init_gigi_decls): Use ARRAY_SIZE in lieu of explicit array size calculation. gcc: * c-decl.c (c_decode_option): Use ARRAY_SIZE in lieu of explicit array size calculation. * gengtype.c (NUM_BASE_FILES, create_file, write_gc_root): Likewise. cp: * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit array size calculation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54842 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c (flag_ms_extensions): Move from c++ front end.rth2002-06-161-5/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* PR c/6660jakub2002-06-101-2/+5
| | | | | | | | | | * c-decl.c (grokfield): Allow user defined types if they declare structs or unions for unnamed fields. * gcc.dg/20020527-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54466 138bc75d-0d04-0410-961f-82ee72b054a4
* * cppinit.c (COMMAND_LINE_OPTIONS): Give all relevant -Wzack2002-06-071-1/+1
| | | | | | | | | | | | | | options their own entries. (parse_option): Clarify comment. (cpp_handle_option): Remove 'ignore' parameter and OPT_W special case. Replace if/strcmp chain for -W options with use of new OPT_* entries for them. (cpp_handle_options): Update to match. * cpplib.h: Remove last parameter to cpp_handle_option from prototype. * c-decl.c, cp/decl2.c: Update call to cpp_handle_option. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54352 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge from pch-branch up to tag pch-commit-20020603.geoffk2002-06-041-133/+47
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54232 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-05-31 Stan Shebs <shebs@apple.com>shebs2002-05-311-14/+24
| | | | | | | | | | | | | | | Turly O'Connor <turly@apple.com> * c-decl.c (struct binding_level): Change int field n_incomplete to tree list incomplete_list. (clear_binding_level): Init field with NULL. (pushdecl): Add incomplete type to list. (mark_binding_level): Mark the incomplete list. (finish_struct): Scan the incomplete list for types instead of all decls in the current binding level. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54116 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (C_COMMON_H): Fix.neil2002-05-251-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.c (warn_nonnull): Declare.thorpej2002-05-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | (c_common_attribute_table): Add "nonnull" attribute. (handle_nonnull_attribute, check_function_nonnull, nonnull_check_p, check_nonnull_arg, get_nonnull_operand, check_function_arguments, check_function_arguments_recurse): New functions. * c-common.h (warn_nonnull): Declare extern. (check_function_arguments, check_function_arguments_recurse): New prototypes. * c-decl.c (c_decode_option): Add -Wnonnull option. * c-format.c (set_Wformat): Set warn_nonnull if enabling format checking. (format_check_context): New structure. (check_format_info_recurse): Remove recursion and rename to... (check_format_arg): ...this. Update comment. (check_format_info): Use check_function_arguments_recurse. * c-typeck.c (build_function_call): Call check_function_arguments instead of check_function_format. * doc/extend.texi: Document "nonnull" attribute. * doc/invoke.texi: Docuemnt -Wnonnull option. * testsuite/gcc.dg/nonnull-1.c: New test. * testsuite/gcc.dg/nonnull-2.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53790 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.h (enum rid): Add RID_THREAD.rth2002-05-221-18/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-common.c (c_common_post_options): Warn if -Wformat-zero-lengththorpej2002-05-181-0/+1
| | | | | | | | | | | | | | | | is used without -Wformat. * c-common.h (warn_format_zero_length): Declare extern. * c-decl.c (warn_options): Add "format-zero-length". * c-format.c (warn_format_zero_length): Declare. (set_Wformat): Set warn_format_zero_length for -Wformat. (check_format_info): Only warn about zero-length formats if warn_format_zero_length is true. Include the format type name in the warning message. * doc/invoke.texi: Document -Wformat-zero-length. * testsuite/gcc.dg/format/zero-length-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53592 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in: Update.neil2002-05-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.c (flag_iso, flag_undef, cb_register_builtins, builtin_define_std): New. (c_common_init): Register CPP builtins callback. * c-common.h (flag_iso, flag_undef): New. * c-decl.c (c_decode_option): Set flag_iso and flag_undef. * c-lex.c: Don't include target.h. (cb_register_builtins): Move to c-common.c. (init_c_lex): Don't register hook here. * c-lex.h (builtin_define, builtin_assert, builtin_define_std): New. (cpp_define, cpp_assert): Remove. * gcc.c (cc1_options): Pass -undef to front end. * target-def.h (TARGET_REGISTER_CPP_BUILTINS): Remove. (TARGET_INITIALIZER): Update. * target.h (struct cpp_reader): Don't predeclare. (struct gcc_target): Remove cpp builtin hook. * tree.c (default_register_cpp_builtins): Remove. cp: * cp-tree.h (flag_ansi): Remove. * decl2.c (flag_ansi): Remove. (cxx_decode_option): Set flag_iso and flag_undef. doc: * tm.texi: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53349 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c (warn_multichar): New.neil2002-05-061-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | (c_common_init): Set CPP's warn_multichar. * c-common.h (warn_multichar): New. * c-decl.c (warn_multichar): Remove. * c-lex.c (lex_charconst): Update. * c-tree.h (warn_multichar): Remove. * cppexp.c (eval_token): Sign-extend charconst value. * cppinit.c (cpp_create_reader): Set warn_multichar. * cpplex.c (cpp_interpret_charconst): Don't sign-extend each character. Update prototype. Sign-extend the result. * cpplib.h: Fix conditions. (struct cpp_options): Add new warning flag. (cpp_interpret_charconst): Update prototype. cp: * Make-lang.in (decl2.o): Update. * cp-tree.h (warn_multichar): Remove. * decl2.c: Include c-common.h. (warn_multichar): Remove. doc: * cpp.texi: Update documentation. testsuite: * gcc.dg/cpp/charconst-3.c: Correct tests accordingly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53240 138bc75d-0d04-0410-961f-82ee72b054a4
* * defaults.h (BOOL_TYPE_SIZE): Move default here from cp/decl.c.jason2002-05-031-2/+1
| | | | | | | | | | * c-decl.c (c_init_decl_processing): Use it. * config/rs6000/darwin.h (BOOL_TYPE_SIZE): Define to INT_TYPE_SIZE. * config/i960/i960.h (BOOL_TYPE_SIZE): Don't define. * config/mcore/mcore.h (BOOL_TYPE_SIZE): Don't define. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53089 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>sirl2002-04-281-1/+2
| | | | | | | | | | | | | | | | | | | PR c/6343 * c-decl.c (duplicate_decls): Call merge_weak. * c-pragma.c (apply_pragma_weak): Warn about misuse. * output.h (merge_weak): Prototype merge_weak. * varasm.c (merge_weak): New function. (declare_weak): Make sure we don't give an error on VAR_DECLs. Mark RTL with SYMBOL_REF_WEAK. cp: * decl.c (duplicate_decls): Call merge_weak. testsuite: * gcc.dg/weak-[2-7].c: New tests. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52844 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-decl.c (grokdeclarator): Remove outdated ??? noterth2002-04-261-4/+0
| | | | | | | on invalid declaration of flexible array members. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52772 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-decl.c (grokdeclarator): Don't pedwarn variable sized arraysrth2002-04-241-1/+1
| | | | | | | | | for c99. * gcc.dg/c90-vla-1.c, gcc.dg/c99-vla-1.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52738 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in: Update.neil2002-04-201-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * decl.c (push_c_function_context, pop_c_function_context, mark_c_function_context): Rename for consistency. * c-objc-common.c (c_objc_common_init): Langhooks set elsewhere. * c-tree.h (push_c_function_context, pop_c_function_context, mark_c_function_context): Rename for consistency. * c-lang.c (LANG_HOOKS_FUNCTION_ENTER_NESTED, LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_FUNCTION_MARK): Redefine. * function.c (init_lang_status, save_lang_status, restore_lang_status, mark_lang_status, free_lang_status): Move to langhooks.h. (push_function_context_to, pop_function_context_from, free_after_parsing, prepare_function_start, ggc_mark_struct_function): Update. * function.h (init_lang_status, save_lang_status, restore_lang_status, mark_lang_status, free_lang_status): Move to langhooks.h. * langhooks-def.h (LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_ENTER_NESTED, LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_FUNCTION_MARK, LANG_HOOKS_FUNCTION_INITIALIZER): New. (LANG_HOOKS_INITIALIZER): Update. (lhd_do_nothing_f): New. * langhooks.h (struct lang_hooks_for_functions): New. (struct lang_hooks): New hooks. * langhooks.c (lhd_do_nothing_f): New. cp: * cp-lang.c (LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine. * cp-tree.h (cxx_push_function_context, cxx_pop_function_context, cxx_mark_function_context): New. * decl.c (push_cp_function_context, pop_cp_function_context, mark_cp_function_context): Rename for consistency. (cxx_init_decl_processing): Don't set old hooks. objc: * objc-lang.c (LANG_HOOKS_FUNCTION_ENTER_NESTED, LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_FUNCTION_MARK): Redefine. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52551 138bc75d-0d04-0410-961f-82ee72b054a4
* * builtins.c: Include langhooks.h.neil2002-04-191-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (lang_type_promotes_to): Remove. (expand_builtin_va_arg): Use new hook. * c-common.c (c_common_nodes_and_builtins): Don't set hook. (simple_type_promotes_to): Move to c-typeck.c. * c-common.h (simple_type_promotes_to): Remove. * c-decl.c (duplicate_decls, grokdeclarator): Update. * c-format.c: Include langhooks.h. (check_format_types): Update. * c-tree.h (c_type_promotes_to): New. * c-typeck.c (c_type_promotes_to): Move from c-common.c. (type_lists_compatible_p): Update. * langhooks-def.h (lhd_type_promotes_to): New. (LANG_HOOKS_TYPE_PROMOTES_TO): New. (LANG_HOOKS_FOR_TYPES_INITIALIZER): Update. * langhooks.c (lhd_type_promotes_to): New. * langhooks.h (struct lang_hooks_for_types): New hook. * tree.h (lang_type_promotes_to): Remove. cp: * call.c (convert_type_from_ellipsis): Rename, update. * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine. * cp-tree.h (convert_type_from_ellipsis): Rename. * decl.c (cxx_init_decl_processing): Don't set hook. objc: * objc-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52512 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-04-10 Toon Moene <toon@moene.indiv.nluug.nl>toon2002-04-101-49/+0
| | | | | | | | | * c-decl.c (c_init_decl_processing): Move generation of decls for g77_integer_type_node and friends from here ... * c-common.c (c_common_nodes_and_builtins): ... to here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52141 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-decl.c (grokdeclarator): Update.neil2002-04-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine. * c-tree.h (c_mark_addressable): New. * c-typeck.c (default_function_array_conversion, build_unary_op, build_array_ref, convert_for_assignment): Update. (mark_addressable): Rename. * calls.c (try_to_integrate, expand_call): Use langhook. * expr.c (expand_expr): Use langhook. * langhooks-def.h (LANG_HOOKS_INITIALIZER): Update. * langhooks.h (struct lang_hooks): New hook. * stmt.c (expand_asm_operands): Use langhook. * tree.h (mark_addressable): Remove. ada: * decl.c (gnat_to_gnu_entity): Update. * gigi.h (mark_addressable): Rename. * misc.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine. * trans.c (tree_transform): Update. * utils.c (create_var_decl): Update. * util2.c (build_binary_op, build_unary_op, fill_vms_descriptor): Update. (mark_addressable): Rename, update. cp: * call.c (build_addr_func): Update. * class.c (resolve_address_of_overloaded_function): Update. * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine. * cp-tree.h (cxx_mark_addressable): New. * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update. * decl2.c (build_cleanup): Update. * except.c (build_throw): Update. * init.c (resolve_offset_ref): Update. * pt.c (convert_nontype_argument): Update. * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update. * typeck.c (decay_conversion, build_array_ref, build_unary_op, unary_complex_lvalue): Update. (mark_addressable): Rename. f: * com.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine. (mark_addressable): Rename. (ffecom_arrayref_, ffecom_1): Update. java: * java-tree.h (java_mark_addressable): New. * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine. * typeck.c (mark_addressable): Rename, update. objc: * objc-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51705 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c (unsigned_conversion_warning, convert_and_check,neil2002-04-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unsigned_type, signed_type, shorten_compare, c_common_get_alias_set, c_common_nodes_and_builtins): Use new hooks. (unsigned_type, signed_type, signed_or_unsigned_type): Rename. * c-common.h (unsigned_type, signed_type, signed_or_unsigned_type): New. * c-decl.c (grokdeclarator): Update. * c-format.c (check_format_types): Update. * c-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. * c-typeck.c (build_binary_op, convert_for_assignment): Update. * convert.c (convert_to_integer): Use new hooks. * expmed.c (make_tree): Use new hooks. * expr.c (store_expr): Use new hooks. * fold-const.c (operand_equal_for_comparison_p, build_range_check, all_ones_mask_p, unextend, fold): Use new hooks. * langhooks.h (struct lang_hooks_for_types): New hooks. * tree.h (signed_or_unsigned_type, signed_type, unsigned_type): Remove. ada: * gigi.h (unsigned_type, signed_type, signed_or_unsigned_type): Rename. * misc.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. * trans.c (tree_transform, convert_with_check): Update. * utils.c (unsigned_type, signed_type, signed_or_unsigned_type): Rename. cp: * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. * decl.c (grokdeclarator): Update. * mangle.c (write_integer_cst): Update. * typeck.c (build_binary_op): Update. f: * com.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. (unsigned_type, signed_type, signed_or_unsigned_type): Rename. java: * expr.c (build_java_binop): Update. * java-tree.h (java_signed_type, java_unsigned_type, java_signed_or_unsigned_type): Update. * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. * parse.y (patch_binop): Update. * typeck.c (signed_or_unsigned_type, unsigned_type, signed_type): Update. objc: * objc-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51684 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c (c_unsafe_for_reeval): Rename.neil2002-03-311-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.h (c_unsafe_for_reeval): Rename. * c-decl.c (finish_incomplete_decl): Rename. (c_init_decl_processing): Don't set langhook. * c-lang.c (LANG_HOOKS_FINISH_INCOMPLETE_DECL, LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine. * c-objc-common.c (c_objc_common_init): Don't set langhook. * c-tree.h (finish_incomplete_decl): Rename. * langhooks-def.h (lhd_unsafe_for_reeval): New. (LANG_HOOKS_FINISH_INCOMPLETE_DECL, LANG_HOOKS_UNSAFE_FOR_REEVAL): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.c (lhd_unsafe_For_reeval): New. * langhooks.h (struct langhooks): New hooks. * toplev.c (incomplete_decl_finalize_hook): Remove. (wrapup_global_declarations): Update. * tree.c (lang_unsafe_for_reeval): Remove. (unsafe_for_reeval): Update. * tree.h (lang_unsafe_for_reeval, incomplete_decl_finalize_hook): Remove. ada: * gigi.h (finish_incomplete_decl): Rename. * misc.c (LANG_HOOKS_FINISH_INCOMPLETE_DECL): Redefine. * utils.c (gnat_init_decl_processing): Don't set hook. (finish_incomplete_decl): Rename. cp: * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine. * lex.c (cxx_init): Don't set hook. objc: * objc-lang.c (LANG_HOOKS_FINISH_INCOMPLETE_DECL, LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51673 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (convert.o, calls.o, expmed.o): Update.neil2002-03-291-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * attribs.c (handle_mode_attribute, handle_vector_size_attribute): Use new hooks. * builtin-types.def (BT_PTRMODE): Update. * c-common.c (type_for_size): Rename c_common_type_for_size. (type_for_mode): Similarly. (shorten_compare, pointer_int_sum, c_common_nodes_and_builtins): Use new hook. * c-bommon.h (c_common_type_for_size, c_common_type_for_mode): New. * c-decl.c (finish_enum, build_enumerator): Use new hooks. * c-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): Redefine. * c-typeck.c (common_type, comptypes, default_conversion): Use new hooks. * calls.c: Include langhooks.h. (emit_library_call_value_1): Use new hooks. Avoid redundant calls. * convert.c: Include langhooks.h (convert_to_pointer, convert_to_integer): Use new hooks. * except.c (init_eh): Similarly. * expmed.c: Include langhooks.h. (expand_mult_add): Use new hooks. * expr.c (store_expr, store_constructor, expand_expr, do_jump, try_casesi): Similarly. * fold-const.c (optimize_bit_field_compare, make_range, decode_field_reference, fold_truthop, fold): Similarly. * function.c (assign_stack_local_1, assign_stack_temp_for_type, put_var_into_stack): Similarly. * langhooks-def.h (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): New. (LANG_HOOKS_TYPES_INITIALIZER): Update. * langhooks.h (lang_hooks_for_types): New hooks. * stmt.c (expand_decl_cleanup, emit_case_nodes): Use new hooks. * tree.c (get_unwidened, get_narrower): Similarly. * tree.h (type_for_mode, type_for_size): Remove. * varasm.c (force_const_mem): Use new hooks. ada: * gigi.h (type_for_size, type_for_mode): Rename. * misc.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): Redefine. * trans.c (tree_transform): Update. * utils.c (gnat_init_decl_processing, init_gigi_decls, builtin_function, float_type_for_size, signed_or_unsigned_type, build_vms_descriptor, unchecked_convert): Update. (type_for_mode, type_for_size): Rename. * utils2.c (nonbinary_modular_operation): Update. cp: * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): Redefine. * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks. * decl.c (finish_enum): Similarly. * error.c (dump_type): Similarly. * lex.c (cxx_init): Similarly. * mangle.c (write_builtin_type): Similarly. * typeck.c (comptypes): Similarly. f: * com.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): Redefine. (type_for_mode, type_for_size): Rename. (signed_or_unsigned_type, signed_type, truthvalue_conversion, unsigned_type): Use new hooks. java: * Make-lang.in (builtins.o): Update. * boehm.c (get_boehm_type_descriptor): Update. * builtins.c: Include langhooks.h. * decl.c (java_init_decl_processing): Update. * java-tree.h (java_type_for_mode, java_type_for_size): New. * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE): Redefine. * typeck.c (type_for_mode, type_for_size): Update. objc: * objc-act.c (handle_impent): Update. * objc-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE): Redefine. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51571 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-decl.c (finish_function): New arg can_defer_p. Pass itrth2002-03-281-3/+5
| | | | | | | | | on to c_expand_body. * c-tree.h (finish_function): Update decl. * c-objc-common.c, c-parse.in, objc/objc-act.c: Update calls. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51518 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (attribs.o): Update.neil2002-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | * attribs.c: Include langhooks.h. (decl_attributes): Use langhook. * c-decl.c (insert_default_attributes): Rename. * c-tree.h (c_insert_default_attributes): New. * langhooks-def.h (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES):New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.h (struct lang_hooks): New hook. * tree.h (insert_default_attributes): Remove. ada: * misc.c (insert_default_attributes): Remove. cp: * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine. * cp-tree.h (cxx_insert_default_attributes): New. * decl.c (insert_default_attributes): Rename. objc: * objc-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51488 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (ggc-common.o): Update.neil2002-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-decl.c (lang_mark_tree): Rename c_mark_tree. * c-lang.c (LANG_HOOKS_MARK_TREE): Redefine. * c-tree.h (c_mark_tree): New. * ggc-common.c: Include langhooks.h. (gcc_mark_trees): Use new langhook. * ggc-callbacks.c: Delete file. * ggc.h (lang_mark_tree): Remove. * langhooks-def.h (LANG_HOOKS_MARK_TREE): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.h (struct lang_hooks): New hook. ada: * misc.c (LANG_HOOKS_MARK_TREE): Redefine. (lang_mark_tree): Make static, rename. cp: * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine. * cp-tree.h (cxx_mark_tree): New. * decl.c (lang_mark_tree): Rename cxx_mark_tree. f: * com.c (LANG_HOOKS_MARK_TREE): Redefine. (lang_mark_tree): Rename ffe_mark_tree, make static. java: * decl.c (lang_mark_tree): Rename java_mark_tree. * java-tree.h (java_mark_tree): New. * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine. objc: * objc-lang.c (LANG_HOOKS_MARK_TREE): Redefine. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51369 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-decl.c (maybe_build_cleanup): Remove.neil2002-03-251-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | * expr.c (expand_expr): Use langhook. * langhooks-def.h (lhd_return_null_tree, LANG_HOOKS_MAYBE_BUILD_CLEANUP): New. (LANGHOOKS_INITIALIZER): Update. * langhooks.c (lhd_return_null_tree): New. * langhooks.h (struct lang_hooks): New hook. * tree-inline.c (initialize_inlined_parameters): Use langhook. * tree.h (maybe_build_cleanup): Remove. ada: * misc.c (maybe_build_cleanup): Remove. cp: * cp-tree.h (cxx_maybe_build_cleanup): New. * decl.c (destroy_local_var, hack_incomplete_structures): Update. (maybe_build_cleanup): Rename cxx_maybe_build_cleanup. * tree.c (build_target_expr): Update. f: * com.c (maybe_build_cleanup): Remove. java: * decl.c (maybe_build_cleanup): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51324 138bc75d-0d04-0410-961f-82ee72b054a4
* Removal of separate preprocessor cpp0.neil2002-03-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (GCC_PASSES, STAGESTUFF, LIBCPP_OBJS, cpp0, install-common): Update. * c-common.c (flag_preprocess_only): New. (c_common_init): Preprocess for -E. * c-common.h (flag_preprocess_only): New. * c-decl.c (c_decode_option): Handle -E, and -std=c++98. * c-objc-common.c (c_init_decl_processing): Exit quickly for NULL return from c_common_init. * cpplib.h (cpp_preprocess_file): New. * cppmain.c (main, general_init, pfile, progname): Remove. (do_preprocessing): Rename cpp_preprocess_file, don't call cpp_finish. Don't close stdout here. (setup_callbacks): Update prototype. * gcc.c (trad_capable_cpp, cpp_unique_options, default_compilers): Update. * tradcpp.c (main): Ignore -quiet. cp: * decl2.c (cxx_decode_option): Handle -E. * lang-specs.h (default_compilers): Preprocess with cc1plus. * lex.c (cxx_init): Exit quickly if c_common_init returns NULL. objc: * lang-specs.h (default_compilers): Preprocess with cc1obj. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51256 138bc75d-0d04-0410-961f-82ee72b054a4