1. 24 Jan, 2003 1 commit
    • Rename -W to -Wextra. · 65ca2d60
      2003-01-24  Phil Edwards  <pme@gcc.gnu.org>
      
      	Rename -W to -Wextra.
      	* c-decl.c:  Update comments.
      	* c-typeck.c:  Likewise.
      	* flags.h:  Likewise.
      	* function.c:  Likewise.
      	* stmt.c:  Likewise.
      	* toplev.c:  Update comments.
      	(W_options):  Add 'extra'.
      	(display_help):  Remove '-W'.
      	(decode_W_option):  Special warn_uninitialized treatment in the case
      	of -Wextra.
      	* doc/invoke.texi:  Update with new entries.
      
      From-SVN: r61696
      Phil Edwards committed
  2. 18 Jan, 2003 1 commit
    • alias.c: Fix comment typos. · 95bd1dd7
      	* alias.c: Fix comment typos.
      	* basic-block.h: Likewise.
      	* c-common.c: Likewise.
      	* c-common.h: Likewise.
      	* c-decl.c: Likewise.
      	* c-opts.c: Likewise.
      	* c-pragma.c: Likewise.
      	* c-pretty-print.h: Likewise.
      	* cfg.c: Likewise.
      	* cfganal.c: Likewise.
      	* cfgbuild.c: Likewise.
      	* cfgcleanup.c: Likewise.
      	* cfglayout.c: Likewise.
      	* cfgrtl.c: Likewise.
      	* convert.c: Likewise.
      	* cpphash.h: Likewise.
      	* cpplex.c: Likewise.
      	* cpplib.h: Likewise.
      	* df.h: Likewise.
      	* diagnostic.c: Likewise.
      	* diagnostic.h: Likewise.
      	* dwarf2.h: Likewise.
      
      From-SVN: r61462
      Kazu Hirata committed
  3. 10 Jan, 2003 1 commit
  4. 03 Jan, 2003 1 commit
  5. 16 Dec, 2002 1 commit
  6. 13 Dec, 2002 1 commit
    • c-decl.c: Fix a comment typo. · 09da1532
      	* c-decl.c: Fix a comment typo.
      	* 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.
      
      From-SVN: r60085
      Kazu Hirata committed
  7. 26 Nov, 2002 1 commit
  8. 20 Nov, 2002 1 commit
  9. 10 Nov, 2002 1 commit
  10. 19 Oct, 2002 1 commit
  11. 09 Oct, 2002 1 commit
    • c-decl.c (start_decl): Unconditionally issue error for 'typedef foo = bar'. · 95f79357
      gcc:
      	* 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.
      
      From-SVN: r57995
      Zack Weinberg committed
  12. 22 Sep, 2002 1 commit
    • ChangeLog: Follow spelling conventions. · da7d8304
      	* ChangeLog: Follow spelling conventions.
      	* 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.
      
      From-SVN: r57398
      Kazu Hirata committed
  13. 21 Aug, 2002 1 commit
  14. 17 Aug, 2002 1 commit
    • c-decl.c (flexible_array_type_p): New function. · 2984fe64
      	* c-decl.c (flexible_array_type_p): New function.
      	(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.
      
      From-SVN: r56411
      Joseph Myers committed
  15. 10 Aug, 2002 1 commit
    • c-common.c (flag_objc): New. · 0f7866e7
      2002-08-09  Ziemowit Laski  <zlaski@apple.com>
      
              * 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.
      
      From-SVN: r56173
      Ziemowit Laski committed
  16. 07 Aug, 2002 2 commits
    • Makefile.in (c-opts.o, [...]): Update. · 0b6f2917
      	* Makefile.in (c-opts.o, c-common.o, C_AND_OBJC_OBJS): Update.
      	* 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.
      
      From-SVN: r56105
      Neil Booth committed
    • c-decl.c (duplicate_decls): Error out for incompatible TLS declarations. · 1ae0ccb6
              * c-decl.c (duplicate_decls): Error out for incompatible TLS
              declarations.
      
              * testsuite/gcc.dg/tls/diag-3.c: New.
      
      From-SVN: r56084
      Aldy Hernandez committed
  17. 01 Aug, 2002 1 commit
    • c-common.c: Define all C/ObjC/C++ warning and flag variables. · 4078b403
      	* c-common.c: Define all C/ObjC/C++ warning and flag variables.
      	* 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.
      
      From-SVN: r55923
      Neil Booth committed
  18. 28 Jul, 2002 1 commit
    • builtins.def [...]: Require an explicit ATTRS argument. · c2ef6d34
      	* builtins.def [DEF_GCC_BUILTIN]: Require an explicit ATTRS
      	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.
      
      From-SVN: r55805
      Roger Sayle committed
  19. 25 Jul, 2002 1 commit
  20. 22 Jul, 2002 2 commits
  21. 21 Jul, 2002 1 commit
    • c-decl.c (build_array_declarator): Say 'ISO C90', not 'ISO C89'. · 56508306
      2002-07-21  Gabriel Dos Reis  <gdr@nerim.net>
      
              * 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.
      
      From-SVN: r55629
      Gabriel Dos Reis committed
  22. 16 Jul, 2002 1 commit
    • varargs.h: Replace with stub which issues #error. · 6c535c69
      	* ginclude/varargs.h: Replace with stub which issues #error.
      	* 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.
      
      From-SVN: r55472
      Zack Weinberg committed
  23. 11 Jul, 2002 1 commit
  24. 01 Jul, 2002 1 commit
    • tree.h: Modify builtin_function interface to take an extra argument ATTRS... · 6a2dd09a
      	* tree.h:  Modify builtin_function interface to take an extra
      	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.
      
      From-SVN: r55161
      Roger Sayle committed
  25. 20 Jun, 2002 1 commit
  26. 16 Jun, 2002 1 commit
    • c-common.c (flag_ms_extensions): Move from c++ front end. · 750491fc
              * c-common.c (flag_ms_extensions): Move from c++ front end.
              * 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.
      
      From-SVN: r54670
      Richard Henderson committed
  27. 10 Jun, 2002 1 commit
  28. 07 Jun, 2002 1 commit
    • cppinit.c (COMMAND_LINE_OPTIONS): Give all relevant -W options their own entries. · 09e77dee
      	* cppinit.c (COMMAND_LINE_OPTIONS): Give all relevant -W
      	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.
      
      From-SVN: r54352
      Zack Weinberg committed
  29. 04 Jun, 2002 1 commit
  30. 31 May, 2002 1 commit
    • c-decl.c (struct binding_level): Change int field n_incomplete to tree list incomplete_list. · 8b496ceb
      2002-05-31  Stan Shebs  <shebs@apple.com>
                  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.
      
      Co-Authored-By: Turly O'Connor <turly@apple.com>
      
      From-SVN: r54116
      Stan Shebs committed
  31. 25 May, 2002 1 commit
    • Makefile.in (C_COMMON_H): Fix. · 81a75f0f
      	* Makefile.in (C_COMMON_H): Fix.
      	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.
      
      From-SVN: r53876
      Neil Booth committed
  32. 23 May, 2002 1 commit
    • c-common.c (warn_nonnull): Declare. · b34c7881
      * c-common.c (warn_nonnull): Declare.
      (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.
      
      From-SVN: r53790
      Jason Thorpe committed
  33. 22 May, 2002 1 commit
    • c-common.h (enum rid): Add RID_THREAD. · 3d78f2e9
              * c-common.h (enum rid): Add RID_THREAD.
              * 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.
      
      From-SVN: r53715
      Richard Henderson committed
  34. 18 May, 2002 1 commit
    • c-common.c (c_common_post_options): Warn if -Wformat-zero-length is used without -Wformat. · e964a556
      * c-common.c (c_common_post_options): Warn if -Wformat-zero-length
      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.
      
      From-SVN: r53592
      Jason Thorpe committed
  35. 09 May, 2002 1 commit
    • Makefile.in: Update. · 3df89291
      	* Makefile.in: Update.
      	* 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.
      
      From-SVN: r53349
      Neil Booth committed
  36. 06 May, 2002 1 commit
    • c-common.c (warn_multichar): New. · a5a49440
      	* c-common.c (warn_multichar): New.
      	(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.
      
      From-SVN: r53240
      Neil Booth committed
  37. 03 May, 2002 1 commit
  38. 28 Apr, 2002 1 commit
    • re PR c/6343 (attribute((weak)) not working on second declaration) · 45806a3f
      	2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
      
      	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.
      
      From-SVN: r52844
      Franz Sirl committed