1. 08 Aug, 2010 2 commits
    • c-tree.h (build_arg_info): Declare. · b3399d18
      	* c-tree.h (build_arg_info): Declare.
      	* c-decl.c (build_arg_info): Define.
      	(get_parm_info): Call it.  Delete initialization code.
      	* c-parser.c (c_parser_parms_declarator): Likewise.
      	(c_parser_parms_list_declaractor): Likewise.
      
      From-SVN: r163014
      Nathan Froyd committed
    • c-tree.h (c_arg_tag): Define. · e60bf9d4
      	* c-tree.h (c_arg_tag): Define.  Define a VEC containing it.
      	(struct c_arg_info): Change type of tags field.
      	* c-decl.c (grokdeclarator): Update for changed type of tags field.
      	(get_parm_info): Likewise.
      	(store_parm_decls_newstyle): Likewise.
      
      From-SVN: r163013
      Nathan Froyd committed
  2. 08 Jul, 2010 1 commit
    • toplev.h: Do not include diagnostic-core.h. · 718f9c0f
      2010-07-08  Manuel López-Ibáñez  <manu@gcc.gnu.org>
      
      	* toplev.h: Do not include diagnostic-core.h.
      	Include diagnostic-core.h in every file that includes toplev.h.
      	* c-tree.h: Do not include toplev.h.
      	* pretty-print.h: Update comment.
      	* Makefile.in: Update dependencies.
      	* alias.c: Include diagnostic-core.h in every file that includes
      	toplev.h.
      	* attribs.c: Likewise.
      	* auto-inc-dec.c: Likewise.
      	* bb-reorder.c: Likewise.
      	* bt-load.c: Likewise.
      	* caller-save.c: Likewise.
      	* calls.c: Likewise.
      	* cfg.c: Likewise.
      	* cfganal.c: Likewise.
      	* cfgbuild.c: Likewise.
      	* cfgcleanup.c: Likewise.
      	* cfghooks.c: Likewise.
      	* cfgloop.c: Likewise.
      	* combine.c: Likewise.
      	* config/alpha/alpha.c: Likewise.
      	* config/arc/arc.c: Likewise.
      	* config/arm/arm.c: Likewise.
      	* config/arm/pe.c: Likewise.
      	* config/avr/avr.c: Likewise.
      	* config/bfin/bfin.c: Likewise.
      	* config/cris/cris.c: Likewise.
      	* config/crx/crx.c: Likewise.
      	* config/darwin-c.c: Likewise.
      	* config/darwin.c: Likewise.
      	* config/fr30/fr30.c: Likewise.
      	* config/frv/frv.c: Likewise.
      	* config/h8300/h8300.c: Likewise.
      	* config/host-darwin.c: Likewise.
      	* config/i386/i386.c: Likewise.
      	* config/i386/netware.c: Likewise.
      	* config/i386/nwld.c: Likewise.
      	* config/i386/winnt-cxx.c: Likewise.
      	* config/i386/winnt-stubs.c: Likewise.
      	* config/i386/winnt.c: Likewise.
      	* config/ia64/ia64-c.c: Likewise.
      	* config/ia64/ia64.c: Likewise.
      	* config/iq2000/iq2000.c: Likewise.
      	* config/lm32/lm32.c: Likewise.
      	* config/m32c/m32c-pragma.c: Likewise.
      	* config/m32c/m32c.c: Likewise.
      	* config/m32r/m32r.c: Likewise.
      	* config/m68hc11/m68hc11.c: Likewise.
      	* config/m68k/m68k.c: Likewise.
      	* config/mcore/mcore.c: Likewise.
      	* config/mep/mep-pragma.c: Likewise.
      	* config/mep/mep.c: Likewise.
      	* config/mmix/mmix.c: Likewise.
      	* config/mn10300/mn10300.c: Likewise.
      	* config/moxie/moxie.c: Likewise.
      	* config/pa/pa.c: Likewise.
      	* config/pdp11/pdp11.c: Likewise.
      	* config/picochip/picochip.c: Likewise.
      	* config/rs6000/rs6000-c.c: Likewise.
      	* config/rs6000/rs6000.c: Likewise.
      	* config/rx/rx.c: Likewise.
      	* config/s390/s390.c: Likewise.
      	* config/score/score.c: Likewise.
      	* config/score/score3.c: Likewise.
      	* config/score/score7.c: Likewise.
      	* config/sh/sh.c: Likewise.
      	* config/sh/symbian-base.c: Likewise.
      	* config/sh/symbian-c.c: Likewise.
      	* config/sh/symbian-cxx.c: Likewise.
      	* config/sol2-c.c: Likewise.
      	* config/sol2.c: Likewise.
      	* config/sparc/sparc.c: Likewise.
      	* config/spu/spu.c: Likewise.
      	* config/stormy16/stormy16.c: Likewise.
      	* config/v850/v850-c.c: Likewise.
      	* config/v850/v850.c: Likewise.
      	* config/vax/vax.c: Likewise.
      	* config/vxworks.c: Likewise.
      	* config/xtensa/xtensa.c: Likewise.
      	* convert.c: Likewise.
      	* cse.c: Likewise.
      	* cselib.c: Likewise.
      	* dbgcnt.c: Likewise.
      	* dbxout.c: Likewise.
      	* ddg.c: Likewise.
      	* dominance.c: Likewise.
      	* emit-rtl.c: Likewise.
      	* explow.c: Likewise.
      	* expmed.c: Likewise.
      	* fixed-value.c: Likewise.
      	* fold-const.c: Likewise.
      	* fwprop.c: Likewise.
      	* gcse.c: Likewise.
      	* ggc-common.c: Likewise.
      	* ggc-page.c: Likewise.
      	* ggc-zone.c: Likewise.
      	* gimple-low.c: Likewise.
      	* gimplify.c: Likewise.
      	* graph.c: Likewise.
      	* haifa-sched.c: Likewise.
      	* ifcvt.c: Likewise.
      	* implicit-zee.c: Likewise.
      	* integrate.c: Likewise.
      	* ira-build.c: Likewise.
      	* ira-color.c: Likewise.
      	* ira-conflicts.c: Likewise.
      	* ira-costs.c: Likewise.
      	* ira-lives.c: Likewise.
      	* ira.c: Likewise.
      	* lists.c: Likewise.
      	* loop-doloop.c: Likewise.
      	* loop-iv.c: Likewise.
      	* lto-opts.c: Likewise.
      	* lto-symtab.c: Likewise.
      	* main.c: Likewise.
      	* modulo-sched.c: Likewise.
      	* optabs.c: Likewise.
      	* params.c: Likewise.
      	* plugin.c: Likewise.
      	* postreload-gcse.c: Likewise.
      	* postreload.c: Likewise.
      	* predict.c: Likewise.
      	* profile.c: Likewise.
      	* real.c: Likewise.
      	* regcprop.c: Likewise.
      	* reginfo.c: Likewise.
      	* regmove.c: Likewise.
      	* reorg.c: Likewise.
      	* resource.c: Likewise.
      	* rtl.c: Likewise.
      	* rtlanal.c: Likewise.
      	* sched-deps.c: Likewise.
      	* sched-ebb.c: Likewise.
      	* sched-rgn.c: Likewise.
      	* sdbout.c: Likewise.
      	* sel-sched-dump.c: Likewise.
      	* sel-sched-ir.c: Likewise.
      	* simplify-rtx.c: Likewise.
      	* stmt.c: Likewise.
      	* stor-layout.c: Likewise.
      	* store-motion.c: Likewise.
      	* targhooks.c: Likewise.
      	* tree-cfg.c: Likewise.
      	* tree-cfgcleanup.c: Likewise.
      	* tree-dump.c: Likewise.
      	* tree-eh.c: Likewise.
      	* tree-inline.c: Likewise.
      	* tree-nomudflap.c: Likewise.
      	* tree-object-size.c: Likewise.
      	* tree-optimize.c: Likewise.
      	* tree-outof-ssa.c: Likewise.
      	* tree-phinodes.c: Likewise.
      	* tree-profile.c: Likewise.
      	* tree-ssa-ccp.c: Likewise.
      	* tree-ssa-coalesce.c: Likewise.
      	* tree-ssa-live.c: Likewise.
      	* tree-ssa-loop-niter.c: Likewise.
      	* tree-ssa-loop-prefetch.c: Likewise.
      	* tree-ssa-loop.c: Likewise.
      	* tree-ssa-structalias.c: Likewise.
      	* tree-ssa-uninit.c: Likewise.
      	* tree-ssa.c: Likewise.
      	* tree-vect-data-refs.c: Likewise.
      	* tree-vect-loop-manip.c: Likewise.
      	* tree-vect-loop.c: Likewise.
      	* tree-vect-patterns.c: Likewise.
      	* tree-vect-stmts.c: Likewise.
      	* tree-vrp.c: Likewise.
      	* varasm.c: Likewise.
      	* vec.c: Likewise.
      	* web.c: Likewise.
      	* xcoffout.c: Likewise.
      
      c-family/
      	* c-common.h: Include diagnostic-core.h. Error if already
      	included.
      	* c-semantics.c: Do not define GCC_DIAG_STYLE here.
      cp/
      	* cp-tree.h: Do not include toplev.h.
      	
      java/
      	* boehm.c: Include diagnostic-core.h in every file that includes
      	toplev.h.
      	* class.c: Likewise.
      	* constants.c: Likewise.
      	* decl.c: Likewise.
      	* except.c: Likewise.
      	* expr.c: Likewise.
      	* jcf-parse.c: Likewise.
      	* mangle.c: Likewise.
      	* mangle_name.c: Likewise.
      	* resource.c: Likewise.
      	* typeck.c: Likewise.
      	* verify-glue.c: Likewise.
      ada/
      	* gcc-interface/utils.c: Include diagnostic-core.h in every file
      	that includes toplev.h.
      lto/
      	* lto-coff.c: Include diagnostic-core.h in every file that
      	includes toplev.h.
      	* lto-elf.c: Likewise.
      	* lto-lang.c: Likewise.
      	* lto-macho.c: Likewise.
      
      From-SVN: r161943
      Manuel López-Ibáñez committed
  3. 05 Jun, 2010 2 commits
    • c-common.c: Move to c-family/. · 39dabefd
      gcc/ChangeLog:
      	* c-common.c: Move to c-family/.
      	* c-common.def: Likewise.
      	* c-common.h: Likewise.
      	* c-cppbuiltin.c: Likewise.
      	* c-dump.c: Likewise.
      	* c-format.c: Likewise.
      	* c-format.h : Likewise.
      	* c-gimplify.c: Likewise.
      	* c-lex.c: Likewise.
      	* c-omp.c: Likewise.
      	* c.opt: Likewise.
      	* c-opts.c: Likewise.
      	* c-pch.c: Likewise.
      	* c-ppoutput.c: Likewise.
      	* c-pragma.c: Likewise.
      	* c-pragma.h: Likewise.
      	* c-pretty-print.c: Likewise.
      	* c-pretty-print.h: Likewise.
      	* c-semantics.c: Likewise.
      	* stub-objc.c: Likewise.
      
      	* gengtype.c (get_file_langdir): Special-case files in c-family/.
      	(get_output_file_with_visibility): Fix name for c-common.h.
      	* c-config-lang.in: Update paths in gtfiles for files in c-family/.
      
      	* c-tree.h: Update include path for moved files.
      	* c-lang.c: Likewise.
      	* c-lang.h: Likewise.
      	* c-parser.c: Likewise.
      	* c-convert.c: Likewise.
      	* c-decl.c: Likewise.
      	* c-objc-common.c: Likewise.
      	* configure.ac: Make sure c-family/ exists in the build directory.
      	* configure: Regenerate.
      	* Makefile.in: Update paths for moved files.  Regroup files per
      	location and update dependencies.  Move generated_files down after
      	ALL_GTFILES_H.
      
      	* config/spu/spu-c.c: Update paths for moved files.
      	* config/mep/mep-pragma.c: Likewise.
      	* config/darwin-c.c: Likewise.
      	* config/i386/msformat-c.c: Likewise.
      	* config/i386/i386-c.c: Likewise.
      	* config/avr/avr-c.c: Likewise.
      	* config/sol2-c.c: Likewise.
      	* config/ia64/ia64-c.c: Likewise.
      	* config/rs6000/rs6000-c.c: Likewise.
      	* config/arm/arm.c: Likewise.
      	* config/arm/arm-c.c: Likewise.
      	* config/h8300/h8300.c: Likewise.
      	* config/v850/v850-c.c: Likewise.
      
      	* config/t-darwin: Fix dependencies for moved files.
      	* config/t-sol2: Fix dependencies for moved files.
      	* config/mep/t-mep: Fix dependencies for moved files.
      	* config/ia64/t-ia64: Fix dependencies for moved files.
      	* config/rs6000/t-rs6000: Fix dependencies for moved files.
      	* config/v850/t-v850: Fix dependencies for moved files.
      	* config/v850/t-v850e: Fix dependencies for moved files.
      
      	* config/m32c/m32c-pragma.c
      
      	* po/exgettext: Look in c-family/ also.
      
      c-family/ChangeLog:
      	* c-common.c: Include gt-c-family-c-common.h.
      	* c-pragma.c: Include gt-c-family-c-pragma.h.
      
      objc/ChangeLog:
      	* objc-act.c: Update include path for moved files.
      	* objc-lang.c: Likewise.
      	* config-lang.in: Update paths in gtfiles for files in c-family/.
      
      objcp/ChangeLog:
      	* objcp-lang.c: Update include path for moved files.
      	* config-lang.in: Update paths in gtfiles for files in c-family/.
      
      cp/ChangeLog:
      	* typeck.c: Update include path for moved files.
      	* decl.c: Likewise.
      	* rtti.c: Likewise.
      	* cp-gimplify.c: Likewise.
      	* cp-lang.c: Likewise.
      	* pt.c: Likewise.
      	* semantics.c: Likewise.
      	* cxx-pretty-print.h: Likewise.
      	* decl2.c: Likewise.
      	* parser.c: Likewise.
      	* cp-objcp-common.c: Likewise.
      	* cp-tree.h: Likewise.
      	* name-lookup.c: Likewise.
      	* lex.c: Likewise.
      	* name-lookup.h: Likewise.
      	* config-lang.in: Update paths in gtfiles for files in c-family/.
      	* Make-lang.in: Likewise.
      
      From-SVN: r160330
      Steven Bosscher committed
    • re PR c/44322 (Bogus warning when assigning pointer-to-array with both "const" and "restrict") · f2c1da78
      	PR c/44322
      	* c-typeck.c (build_unary_op): Merge qualifiers into pointer
      	target type for ADDR_EXPR; require no changes to qualifiers except
      	for function types.
      	* c-tree.h (c_build_type_variant): Remove.
      
      testsuite:
      	* gcc.dg/c99-restrict-4.c: New test.
      
      From-SVN: r160312
      Joseph Myers committed
  4. 28 May, 2010 1 commit
    • c-common.h (GCC_DIAG_STYLE): Define earlier in the file, before including diagnostic-core.h. · 59cc9210
      gcc/ChangeLog:
      	* c-common.h (GCC_DIAG_STYLE): Define earlier in the file,
      	before including diagnostic-core.h.
      	(c_cpp_error): New prototype moved from c-tree.h.
      	Use ATTRIBUTE_GCC_DIAG instead of ATTRIBUTE_GCC_CDIAG.
      	* c-tree.h (ATTRIBUTE_GCC_CDIAG): Remove define.
      	(pedwarn_c90, perwarn_c99): Use ATTRIBUTE_GCC_DIAG instead.
      	(c_cpp_error): Prototype moved to c-common.h.
      	* Makefile.in: Update dependency for C_COMMON_H.
      
      cp/ChangeLog:
      	* cp-tree.h (ATTRIBUTE_GCC_CXXDIAG): Remove.  Require that
      	this file is included before c-common.h.  Define GCC_DIAG_STYLE
      	before including diagnostic-core.h and toplev.h.
      	(pedwarn_cxx98): Use ATTRIBUTE_GCC_DIAG.
      	* pt.c: Include cp-tree.h before c-common.h.
      
      From-SVN: r160007
      Steven Bosscher committed
  5. 26 May, 2010 1 commit
    • demangle-expected: Add tests for __int128 and unsigned __int128 types. · a6766312
      libiberty/
      
      2010-05-26  Kai Tietz  <kai.tietz@onevision.com>
      
              * testsuite/demangle-expected: Add tests for __int128
              and unsigned __int128 types.
      
      gcc/testsuite
      2010-05-26  Kai Tietz  <kai.tietz@onevision.com>
      
      	* lib/target-supports.exp (check_effective_target_int128): New
      	function to check if __int128 types are available for target.
      	* testsuite/c-c++-common/int128-types-1.c: New.
      	* testsuite/c-c++-common/int128-1.c: New.
      	* testsuite/c-c++-common/int128-2.c: New.
      	* g++.dg/abi/mangle43.C: New.
      	* g++.dg/init/enum1.C: Handle __int128 case and add -Wno-overflow.
      	* g++.dg/cpp0x/nullptr04.C: Use __SIZE_TYPE__ for getting
      	pointer-wide scalar.
      	* g++.dg/other/pr25632.C: Likewise.
      	* g++.dg/other/large-size-array.C (DIM): Use ULLONG_MAX for win64 case.
      	* g++.dg/warn/pr13358-2.C: Add llp64 for check of special
      	overflow warnings.
      	* g++.dg/warn/pr13358-4.C: Likewise.
      	* g++.dg/warn/Wconversion-null-2.C:  Add 'long long' case.
      	* g++.dg/warn/Wconversion-null.C: Likewise.
      
      gcc/
      2010-05-26  Kai Tietz  <kai.tietz@onevision.com>
      
      	* builtin-types.def (BT_INT128): New primitive type.
      	(BT_UINT128): Likewise.
      	* c-common.c (c_common_r): Add __int128 keyword.
      	(c_common_type_for_size): Handle __int128.
      	(c_common_type_for_mode): Likewise.
      	(c_common_signed_or_unsigned_type): Likewise.
      	(c_common_nodes_and_builtins): Add builtin type
      	if target supports 128-bit integer scalar.
      	* c-common.h (enum rid): Add RID_INT128.
      	* c-cppbuiltin.c (c_cpp_builtins): Define __SIZEOF_INT128__
      	if target supports 128-bit integer scalar.
      	* c-decl.c (declspecs_add_type): Handle new keyword
      	__int128.
      	(finish_declspecs): Likewise.
      	* c-parser.c (c_token_starts_typename): Handle RID_INT128.
      	(c_token_starts_declspecs): Likewise.
      	(c_parser_declspecs): Likewise.
      	(c_parser_attributes): Likewise.
      	(c_parser_objc_selector): Likewise.
      	* c-pretty-print.c (pp_c_integer_constant): Handle __int128.
      	* c-tree.h (enum c_typespec_keyword): Add cts_int128.
      	* gimple.c (gimple_signed_or_unsigned_type): Handle int128 types.
      	* tree.c (make_or_reuse_type): Likewise.
      	(make_unsigned_type): Likewise.
      	(build_common_tree_nodes_2): Likewise.
      	* tree.h (enum integer_type_kind): Add itk_int128 and
      	itk_unsigned_int128.
      	(int128_integer_type_node): New define..
      	(int128_unsigned_type_node): New define.
      	* cp/cp-tree.h (cp_decl_specifier_seq): Add new bifield
      	explicit_int128_p.
      	* cp/decl.c (grokdeclarator): Handle __int128.
      	* cp/parser.c (cp_lexer_next_token_is_decl_specifier_ke): Likewise.
      	(cp_parser_simple_type_specifier): Likewise.
      	* cp/rtti.c (emit_support_tinfos): Add int128 nodes for rtti.
      	* cp/typeck.c (cp_common_type): Handle __int128.
      	* cp/mangle.c (integer_type_codes): Add itk_int128 and
      	itk_unsigned_int128.
      	* doc/extend.texi: Add documentation about __int128 type.
      
      From-SVN: r159879
      Kai Tietz committed
  6. 23 May, 2010 1 commit
    • c-decl.c (diagnose_mismatched_decls): Give error for duplicate typedefs with… · dc5027f4
      c-decl.c (diagnose_mismatched_decls): Give error for duplicate typedefs with different but compatible types.
      
      	* c-decl.c (diagnose_mismatched_decls): Give error for duplicate
      	typedefs with different but compatible types.  Allow duplicate
      	typedefs with the same type except for pedantic non-C1X, but give
      	warning for variably modified types.
      	* c-typeck.c (tagged_types_tu_compatible_p,
      	function_types_compatible_p, type_lists_compatible_p,
      	comptypes_internal): Add parameter different_types_p; set
      	*different_types_p for different but compatible types.  All
      	callers changed.
      	(comptypes_check_different_types): New.
      	* c-tree.h (comptypes_check_different_types): Declare.
      
      testsuite:
      	* gcc.dg/c1x-typedef-1.c, gcc.dg/c1x-typedef-2.c,
      	gcc.dg/c90-typedef-1.c, gcc.dg/c99-typedef-1.c: New tests.
      	* gcc.dg/decl-8.c: Use -std=gnu89 -pedantic-errors.
      
      From-SVN: r159767
      Joseph Myers committed
  7. 05 May, 2010 1 commit
  8. 26 Apr, 2010 1 commit
  9. 22 Apr, 2010 1 commit
    • 2010-04-22 Laurynas Biveinis <laurynas.biveinis@gmail.com> · a1e3b3d9
      	* c-tree.h (push_init_level, pop_init_level, set_init_index)
      	(process_init_element): New argument of type struct obstack *.
      
      	* c-typeck.c (push_init_level, pop_init_level, set_designator)
      	(set_init_index, set_init_label, set_nonincremental_init)
      	(set_nonincremental_init_from_string, find_init_member)
      	(output_init_element, output_pending_init_elements)
      	(process_init_element): New argument braced_init_obstack.  Pass it
      	down.
      	(push_range_stack, add_pending_init): New argument
      	braced_init_obstack.  Use obstack allocation.
      
      	* c-parser.c (c_parser_initelt, c_parser_initval): New argument
      	braced_init_obstack.  Pass it down.
      	(c_parser_braced_init): New variables ret, braced_init_obstack.
      	Initialize obstack, pass it down and finally free it.
      
      From-SVN: r158634
      Laurynas Biveinis committed
  10. 07 Apr, 2010 2 commits
    • re PR c/18624 (GCC does not detect local variable set but never used) · ebfbbdc5
      	PR c/18624
      	* tree.h (DECL_READ_P): Define.
      	(struct tree_decl_common): Add decl_read_flag.
      	* c-decl.c (pop_scope): If TREE_USED but !DECL_READ_P, issue
      	a set but not used warning.
      	(merge_decls): Merge DECL_READ_P flag.
      	(finish_decl, build_compound_literal): Set DECL_READ_P flag.
      	(finish_function): Issue -Wunused-but-set-parameter diagnostics.
      	* c-common.c (handle_used_attribute, handle_unused_attribute):
      	Likewise.
      	* c-tree.h (default_function_array_read_conversion, mark_exp_read):
      	New prototypes.
      	* c-typeck.c (default_function_array_read_conversion, mark_exp_read):
      	New functions.
      	(default_conversion, c_process_expr_stmt): Call mark_exp_read.
      	* c-parser.c (c_parser_initializer, c_parser_expr_no_commas,
      	c_parser_binary_expression, c_parser_cast_expression,
      	c_parser_expr_list, c_parser_omp_atomic, c_parser_omp_for_loop):
      	Call default_function_array_read_conversion instead of
      	default_function_array_conversion where needed.
      	(c_parser_unary_expression, c_parser_conditional_expression,
      	c_parser_postfix_expression_after_primary, c_parser_initelt):
      	Likewise.  Call mark_exp_read where needed.
      	(c_parser_statement_after_labels, c_parser_asm_operands,
      	c_parser_typeof_specifier, c_parser_sizeof_expression,
      	c_parser_alignof_expression, c_parser_initval): Call mark_exp_read
      	where needed.
      	* common.opt (Wunused-but-set-variable, Wunused-but-set-parameter):
      	New.
      	* toplev.c (warn_unused_but_set_variable): Default to warn_unused.
      	(warn_unused_but_set_parameter): Default to warn_unused
      	&& extra_warnings.
      	* doc/invoke.texi: Document -Wunused-but-set-variable and
      	-Wunused-but-set-parameter.
      
      	* objc-act.c (finish_var_decl, objc_begin_catch_clause,
      	really_start_method, get_super_receiver, handle_class_ref): Set
      	DECL_READ_P in addition to TREE_USED.
      
      	* gcc.dg/Wunused-var-1.c: New test.
      	* gcc.dg/Wunused-var-2.c: New test.
      	* gcc.dg/Wunused-var-3.c: New test.
      	* gcc.dg/Wunused-var-4.c: New test.
      	* gcc.dg/Wunused-var-5.c: New test.
      	* gcc.dg/Wunused-var-6.c: New test.
      	* gcc.dg/Wunused-parm-1.c: New test.
      
      From-SVN: r158086
      Jakub Jelinek committed
    • diagnostic.h (diagnostic_override_option_index): New macro to set a diagnostic's option_index. · 87cf0651
      	* diagnostic.h (diagnostic_override_option_index): New macro to
      	set a diagnostic's option_index.
      	* c-tree.h (c_cpp_error): Add warning reason argument.
      	* opts.c (_warning_as_error_callback): New.
      	(register_warning_as_error_callback): Store callback for
      	warnings enabled via enable_warning_as_error.
      	(enable_warning_as_error): Call callback, minor code tidy.
      	* opts.h (register_warning_as_error_callback): Declare.
      	* c-opts.c (warning_as_error_callback): New, set cpp_opts flag in
      	response to -Werror=.
      	(c_common_init_options): Register warning_as_error_callback in opts.c.
      	* common.opt: Add -Wno-cpp option.
      	* c-common.c (struct reason_option_codes_t): Map cpp warning
      	reason codes to gcc option indexes.
      	* (c_option_controlling_cpp_error): New function, lookup the gcc
      	option index for a cpp warning reason code.
      	* (c_cpp_error): Add warning reason argument, call
      	c_option_controlling_cpp_error for diagnostic_override_option_index.
      	* doc/invoke.texi: Document -Wno-cpp.
      
      	* cpp.c (cb_cpp_error): Add warning reason argument, set a value
      	for diagnostic_override_option_index if CPP_W_WARNING_DIRECTIVE.
      
      	* directives.c (do_diagnostic): Add warning reason argument,
      	call appropriate error reporting function for code.
      	(directive_diagnostics): Call specific warning functions with
      	warning reason where appropriate.
      	(do_error, do_warning, do_pragma_dependency): Add warning reason
      	argument to do_diagnostic calls.
      	* macro.c (_cpp_warn_if_unused_macro, enter_macro_context,
      	_cpp_create_definition): Call specific warning functions with
              warning reason where appropriate.
      	* Makefile.in: Add new diagnostic functions to gettext translations.
      	* include/cpplib.h (struct cpp_callbacks): Add warning reason code
      	to error callback.
      	(CPP_DL_WARNING, CPP_DL_WARNING_SYSHDR, CPP_DL_PEDWARN, CPP_DL_ERROR,
      	CPP_DL_ICE, CPP_DL_NOTE, CPP_DL_FATAL): Replace macros with enums.
      	(CPP_W_NONE, CPP_W_DEPRECATED, CPP_W_COMMENTS,
      	CPP_W_MISSING_INCLUDE_DIRS, CPP_W_TRIGRAPHS, CPP_W_MULTICHAR,
      	CPP_W_TRADITIONAL, CPP_W_LONG_LONG, CPP_W_ENDIF_LABELS,
      	CPP_W_NUM_SIGN_CHANGE, CPP_W_VARIADIC_MACROS,
      	CPP_W_BUILTIN_MACRO_REDEFINED, CPP_W_DOLLARS, CPP_W_UNDEF,
      	CPP_W_UNUSED_MACROS, CPP_W_CXX_OPERATOR_NAMES, CPP_W_NORMALIZE,
      	CPP_W_INVALID_PCH, CPP_W_WARNING_DIRECTIVE): New enums for cpp
      	warning reason codes.
      	(cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
      	cpp_warning_with_line, cpp_pedwarning_with_line,
      	cpp_warning_with_line_syshdr): New specific error reporting functions.
      	* pch.c (cpp_valid_state): Call specific warning functions with
              warning reason where appropriate.
      	* errors.c (cpp_diagnostic, cpp_diagnostic_with_line): New central
      	diagnostic handlers.
      	(cpp_warning, cpp_pedwarning, cpp_warning_syshdr,
      	cpp_warning_with_line, cpp_pedwarning_with_line,
      	cpp_warning_with_line_syshdr): New specific error reporting functions.
      	* expr.c (cpp_classify_number, eval_token, num_unary_op): Call
      	specific warning functions with warning reason where appropriate.
      	* lex.c (_cpp_process_line_notes, _cpp_skip_block_comment,
      	warn_about_normalization, lex_identifier_intern, lex_identifier,
      	_cpp_lex_direct): Ditto.
      	* charset.c (_cpp_valid_ucn, convert_hex, convert_escape,
      	narrow_str_to_charconst): Ditto.
      
      	* gcc.dg/cpp/warn-undef-2.c: New.
      	* gcc.dg/cpp/warn-traditional-2.c: New.
      	* gcc.dg/cpp/warn-comments-2.c: New.
      	* gcc.dg/cpp/warning-directive-1.c: New.
      	* gcc.dg/cpp/warn-long-long.c: New.
      	* gcc.dg/cpp/warn-traditional.c: New.
      	* gcc.dg/cpp/warn-variadic-2.c: New.
      	* gcc.dg/cpp/warn-undef.c: New.
      	* gcc.dg/cpp/warn-normalized-1.c: New.
      	* gcc.dg/cpp/warning-directive-2.c: New.
      	* gcc.dg/cpp/warn-long-long-2.c: New.
      	* gcc.dg/cpp/warn-variadic.c: New.
      	* gcc.dg/cpp/warn-normalized-2.c: New.
      	* gcc.dg/cpp/warning-directive-3.c: New.
      	* gcc.dg/cpp/warn-deprecated-2.c: New.
      	* gcc.dg/cpp/warn-trigraphs-1.c: New.
      	* gcc.dg/cpp/warn-multichar-2.c: New.
      	* gcc.dg/cpp/warn-normalized-3.c: New.
      	* gcc.dg/cpp/warning-directive-4.c: New.
      	* gcc.dg/cpp/warn-unused-macros.c: New.
      	* gcc.dg/cpp/warn-trigraphs-2.c: New.
      	* gcc.dg/cpp/warn-cxx-compat-2.c: New.
      	* gcc.dg/cpp/warn-cxx-compat.c: New.
      	* gcc.dg/cpp/warn-redefined.c: New.
      	* gcc.dg/cpp/warn-trigraphs-3.c: New.
      	* gcc.dg/cpp/warn-unused-macros-2.c: New.
      	* gcc.dg/cpp/warn-deprecated.c: New.
      	* gcc.dg/cpp/warn-trigraphs-4.c: New.
      	* gcc.dg/cpp/warn-redefined-2.c: New.
      	* gcc.dg/cpp/warn-comments.c: New.
      	* gcc.dg/cpp/warn-multichar.c: New.
      	* g++.dg/cpp/warning-directive-1.C: New.
      	* g++.dg/cpp/warning-directive-2.C: New.
      	* g++.dg/cpp/warning-directive-3.C: New.
      	* g++.dg/cpp/warning-directive-4.C: New.
      	* gfortran.dg/warning-directive-1.F90: New.
      	* gfortran.dg/warning-directive-3.F90: New.
      	* gfortran.dg/warning-directive-2.F90: New.
      	* gfortran.dg/warning-directive-4.F90: New.
      
      From-SVN: r158079
      Simon Baldwin committed
  11. 25 Nov, 2009 1 commit
    • Remove trailing white spaces. · b8698a0f
      2009-11-25  H.J. Lu  <hongjiu.lu@intel.com>
      
      	* alias.c: Remove trailing white spaces.
      	* alloc-pool.c: Likewise.
      	* alloc-pool.h: Likewise.
      	* attribs.c: Likewise.
      	* auto-inc-dec.c: Likewise.
      	* basic-block.h: Likewise.
      	* bb-reorder.c: Likewise.
      	* bt-load.c: Likewise.
      	* builtins.c: Likewise.
      	* builtins.def: Likewise.
      	* c-common.c: Likewise.
      	* c-common.h: Likewise.
      	* c-cppbuiltin.c: Likewise.
      	* c-decl.c: Likewise.
      	* c-format.c: Likewise.
      	* c-lex.c: Likewise.
      	* c-omp.c: Likewise.
      	* c-opts.c: Likewise.
      	* c-parser.c: Likewise.
      	* c-pretty-print.c: Likewise.
      	* c-tree.h: Likewise.
      	* c-typeck.c: Likewise.
      	* caller-save.c: Likewise.
      	* calls.c: Likewise.
      	* cfg.c: Likewise.
      	* cfganal.c: Likewise.
      	* cfgexpand.c: Likewise.
      	* cfghooks.c: Likewise.
      	* cfghooks.h: Likewise.
      	* cfglayout.c: Likewise.
      	* cfgloop.c: Likewise.
      	* cfgloop.h: Likewise.
      	* cfgloopmanip.c: Likewise.
      	* cfgrtl.c: Likewise.
      	* cgraph.c: Likewise.
      	* cgraph.h: Likewise.
      	* cgraphbuild.c: Likewise.
      	* cgraphunit.c: Likewise.
      	* cif-code.def: Likewise.
      	* collect2.c: Likewise.
      	* combine.c: Likewise.
      	* convert.c: Likewise.
      	* coverage.c: Likewise.
      	* crtstuff.c: Likewise.
      	* cse.c: Likewise.
      	* cselib.c: Likewise.
      	* dbgcnt.c: Likewise.
      	* dbgcnt.def: Likewise.
      	* dbgcnt.h: Likewise.
      	* dbxout.c: Likewise.
      	* dce.c: Likewise.
      	* ddg.c: Likewise.
      	* ddg.h: Likewise.
      	* defaults.h: Likewise.
      	* df-byte-scan.c: Likewise.
      	* df-core.c: Likewise.
      	* df-problems.c: Likewise.
      	* df-scan.c: Likewise.
      	* df.h: Likewise.
      	* dfp.c: Likewise.
      	* diagnostic.c: Likewise.
      	* diagnostic.h: Likewise.
      	* dominance.c: Likewise.
      	* domwalk.c: Likewise.
      	* double-int.c: Likewise.
      	* double-int.h: Likewise.
      	* dse.c: Likewise.
      	* dwarf2asm.c: Likewise.
      	* dwarf2asm.h: Likewise.
      	* dwarf2out.c: Likewise.
      	* ebitmap.c: Likewise.
      	* ebitmap.h: Likewise.
      	* emit-rtl.c: Likewise.
      	* et-forest.c: Likewise.
      	* except.c: Likewise.
      	* except.h: Likewise.
      	* expmed.c: Likewise.
      	* expr.c: Likewise.
      	* expr.h: Likewise.
      	* final.c: Likewise.
      	* flags.h: Likewise.
      	* fold-const.c: Likewise.
      	* function.c: Likewise.
      	* function.h: Likewise.
      	* fwprop.c: Likewise.
      	* gcc.c: Likewise.
      	* gcov-dump.c: Likewise.
      	* gcov-io.c: Likewise.
      	* gcov-io.h: Likewise.
      	* gcov.c: Likewise.
      	* gcse.c: Likewise.
      	* genattr.c: Likewise.
      	* genattrtab.c: Likewise.
      	* genautomata.c: Likewise.
      	* genchecksum.c: Likewise.
      	* genconfig.c: Likewise.
      	* genflags.c: Likewise.
      	* gengtype-parse.c: Likewise.
      	* gengtype.c: Likewise.
      	* gengtype.h: Likewise.
      	* genmddeps.c: Likewise.
      	* genmodes.c: Likewise.
      	* genopinit.c: Likewise.
      	* genpreds.c: Likewise.
      	* gensupport.c: Likewise.
      	* ggc-common.c: Likewise.
      	* ggc-page.c: Likewise.
      	* ggc-zone.c: Likewise.
      	* ggc.h: Likewise.
      	* gimple-iterator.c: Likewise.
      	* gimple-low.c: Likewise.
      	* gimple-pretty-print.c: Likewise.
      	* gimple.c: Likewise.
      	* gimple.def: Likewise.
      	* gimple.h: Likewise.
      	* gimplify.c: Likewise.
      	* graphds.c: Likewise.
      	* graphite-clast-to-gimple.c: Likewise.
      	* gthr-nks.h: Likewise.
      	* gthr-posix.c: Likewise.
      	* gthr-posix.h: Likewise.
      	* gthr-posix95.h: Likewise.
      	* gthr-single.h: Likewise.
      	* gthr-tpf.h: Likewise.
      	* gthr-vxworks.h: Likewise.
      	* gthr.h: Likewise.
      	* haifa-sched.c: Likewise.
      	* hard-reg-set.h: Likewise.
      	* hooks.c: Likewise.
      	* hooks.h: Likewise.
      	* hosthooks.h: Likewise.
      	* hwint.h: Likewise.
      	* ifcvt.c: Likewise.
      	* incpath.c: Likewise.
      	* init-regs.c: Likewise.
      	* integrate.c: Likewise.
      	* ipa-cp.c: Likewise.
      	* ipa-inline.c: Likewise.
      	* ipa-prop.c: Likewise.
      	* ipa-pure-const.c: Likewise.
      	* ipa-reference.c: Likewise.
      	* ipa-struct-reorg.c: Likewise.
      	* ipa-struct-reorg.h: Likewise.
      	* ipa-type-escape.c: Likewise.
      	* ipa-type-escape.h: Likewise.
      	* ipa-utils.c: Likewise.
      	* ipa-utils.h: Likewise.
      	* ipa.c: Likewise.
      	* ira-build.c: Likewise.
      	* ira-color.c: Likewise.
      	* ira-conflicts.c: Likewise.
      	* ira-costs.c: Likewise.
      	* ira-emit.c: Likewise.
      	* ira-int.h: Likewise.
      	* ira-lives.c: Likewise.
      	* ira.c: Likewise.
      	* jump.c: Likewise.
      	* lambda-code.c: Likewise.
      	* lambda-mat.c: Likewise.
      	* lambda-trans.c: Likewise.
      	* lambda.h: Likewise.
      	* langhooks.c: Likewise.
      	* lcm.c: Likewise.
      	* libgcov.c: Likewise.
      	* lists.c: Likewise.
      	* loop-doloop.c: Likewise.
      	* loop-init.c: Likewise.
      	* loop-invariant.c: Likewise.
      	* loop-iv.c: Likewise.
      	* loop-unroll.c: Likewise.
      	* lower-subreg.c: Likewise.
      	* lto-cgraph.c: Likewise.
      	* lto-compress.c: Likewise.
      	* lto-opts.c: Likewise.
      	* lto-section-in.c: Likewise.
      	* lto-section-out.c: Likewise.
      	* lto-streamer-in.c: Likewise.
      	* lto-streamer-out.c: Likewise.
      	* lto-streamer.c: Likewise.
      	* lto-streamer.h: Likewise.
      	* lto-symtab.c: Likewise.
      	* lto-wpa-fixup.c: Likewise.
      	* matrix-reorg.c: Likewise.
      	* mcf.c: Likewise.
      	* mode-switching.c: Likewise.
      	* modulo-sched.c: Likewise.
      	* omega.c: Likewise.
      	* omega.h: Likewise.
      	* omp-low.c: Likewise.
      	* optabs.c: Likewise.
      	* optabs.h: Likewise.
      	* opts-common.c: Likewise.
      	* opts.c: Likewise.
      	* params.def: Likewise.
      	* params.h: Likewise.
      	* passes.c: Likewise.
      	* plugin.c: Likewise.
      	* postreload-gcse.c: Likewise.
      	* postreload.c: Likewise.
      	* predict.c: Likewise.
      	* predict.def: Likewise.
      	* pretty-print.c: Likewise.
      	* pretty-print.h: Likewise.
      	* print-rtl.c: Likewise.
      	* print-tree.c: Likewise.
      	* profile.c: Likewise.
      	* read-rtl.c: Likewise.
      	* real.c: Likewise.
      	* recog.c: Likewise.
      	* reg-stack.c: Likewise.
      	* regcprop.c: Likewise.
      	* reginfo.c: Likewise.
      	* regmove.c: Likewise.
      	* regrename.c: Likewise.
      	* regs.h: Likewise.
      	* regstat.c: Likewise.
      	* reload.c: Likewise.
      	* reload1.c: Likewise.
      	* resource.c: Likewise.
      	* rtl.c: Likewise.
      	* rtl.def: Likewise.
      	* rtl.h: Likewise.
      	* rtlanal.c: Likewise.
      	* sbitmap.c: Likewise.
      	* sched-deps.c: Likewise.
      	* sched-ebb.c: Likewise.
      	* sched-int.h: Likewise.
      	* sched-rgn.c: Likewise.
      	* sched-vis.c: Likewise.
      	* sdbout.c: Likewise.
      	* sel-sched-dump.c: Likewise.
      	* sel-sched-dump.h: Likewise.
      	* sel-sched-ir.c: Likewise.
      	* sel-sched-ir.h: Likewise.
      	* sel-sched.c: Likewise.
      	* sel-sched.h: Likewise.
      	* sese.c: Likewise.
      	* sese.h: Likewise.
      	* simplify-rtx.c: Likewise.
      	* stack-ptr-mod.c: Likewise.
      	* stmt.c: Likewise.
      	* stor-layout.c: Likewise.
      	* store-motion.c: Likewise.
      	* stringpool.c: Likewise.
      	* stub-objc.c: Likewise.
      	* sync-builtins.def: Likewise.
      	* target-def.h: Likewise.
      	* target.h: Likewise.
      	* targhooks.c: Likewise.
      	* targhooks.h: Likewise.
      	* timevar.c: Likewise.
      	* tlink.c: Likewise.
      	* toplev.c: Likewise.
      	* toplev.h: Likewise.
      	* tracer.c: Likewise.
      	* tree-affine.c: Likewise.
      	* tree-affine.h: Likewise.
      	* tree-browser.def: Likewise.
      	* tree-call-cdce.c: Likewise.
      	* tree-cfg.c: Likewise.
      	* tree-cfgcleanup.c: Likewise.
      	* tree-chrec.c: Likewise.
      	* tree-chrec.h: Likewise.
      	* tree-complex.c: Likewise.
      	* tree-data-ref.c: Likewise.
      	* tree-data-ref.h: Likewise.
      	* tree-dfa.c: Likewise.
      	* tree-dump.c: Likewise.
      	* tree-dump.h: Likewise.
      	* tree-eh.c: Likewise.
      	* tree-flow-inline.h: Likewise.
      	* tree-flow.h: Likewise.
      	* tree-if-conv.c: Likewise.
      	* tree-inline.c: Likewise.
      	* tree-into-ssa.c: Likewise.
      	* tree-loop-distribution.c: Likewise.
      	* tree-loop-linear.c: Likewise.
      	* tree-mudflap.c: Likewise.
      	* tree-nested.c: Likewise.
      	* tree-nomudflap.c: Likewise.
      	* tree-nrv.c: Likewise.
      	* tree-object-size.c: Likewise.
      	* tree-optimize.c: Likewise.
      	* tree-outof-ssa.c: Likewise.
      	* tree-parloops.c: Likewise.
      	* tree-pass.h: Likewise.
      	* tree-phinodes.c: Likewise.
      	* tree-predcom.c: Likewise.
      	* tree-pretty-print.c: Likewise.
      	* tree-profile.c: Likewise.
      	* tree-scalar-evolution.c: Likewise.
      	* tree-ssa-address.c: Likewise.
      	* tree-ssa-alias.c: Likewise.
      	* tree-ssa-ccp.c: Likewise.
      	* tree-ssa-coalesce.c: Likewise.
      	* tree-ssa-copy.c: Likewise.
      	* tree-ssa-copyrename.c: Likewise.
      	* tree-ssa-dce.c: Likewise.
      	* tree-ssa-dom.c: Likewise.
      	* tree-ssa-dse.c: Likewise.
      	* tree-ssa-forwprop.c: Likewise.
      	* tree-ssa-ifcombine.c: Likewise.
      	* tree-ssa-live.c: Likewise.
      	* tree-ssa-live.h: Likewise.
      	* tree-ssa-loop-ch.c: Likewise.
      	* tree-ssa-loop-im.c: Likewise.
      	* tree-ssa-loop-ivcanon.c: Likewise.
      	* tree-ssa-loop-ivopts.c: Likewise.
      	* tree-ssa-loop-manip.c: Likewise.
      	* tree-ssa-loop-niter.c: Likewise.
      	* tree-ssa-loop-prefetch.c: Likewise.
      	* tree-ssa-loop-unswitch.c: Likewise.
      	* tree-ssa-loop.c: Likewise.
      	* tree-ssa-math-opts.c: Likewise.
      	* tree-ssa-operands.c: Likewise.
      	* tree-ssa-operands.h: Likewise.
      	* tree-ssa-phiopt.c: Likewise.
      	* tree-ssa-phiprop.c: Likewise.
      	* tree-ssa-pre.c: Likewise.
      	* tree-ssa-propagate.c: Likewise.
      	* tree-ssa-reassoc.c: Likewise.
      	* tree-ssa-sccvn.c: Likewise.
      	* tree-ssa-sink.c: Likewise.
      	* tree-ssa-structalias.c: Likewise.
      	* tree-ssa-ter.c: Likewise.
      	* tree-ssa-threadedge.c: Likewise.
      	* tree-ssa-threadupdate.c: Likewise.
      	* tree-ssa-uncprop.c: Likewise.
      	* tree-ssa.c: Likewise.
      	* tree-ssanames.c: Likewise.
      	* tree-switch-conversion.c: Likewise.
      	* tree-tailcall.c: Likewise.
      	* tree-vect-data-refs.c: Likewise.
      	* tree-vect-generic.c: Likewise.
      	* tree-vect-loop-manip.c: Likewise.
      	* tree-vect-loop.c: Likewise.
      	* tree-vect-patterns.c: Likewise.
      	* tree-vect-slp.c: Likewise.
      	* tree-vect-stmts.c: Likewise.
      	* tree-vectorizer.c: Likewise.
      	* tree-vectorizer.h: Likewise.
      	* tree-vrp.c: Likewise.
      	* tree.c: Likewise.
      	* tree.def: Likewise.
      	* tree.h: Likewise.
      	* treestruct.def: Likewise.
      	* unwind-compat.c: Likewise.
      	* unwind-dw2-fde-glibc.c: Likewise.
      	* unwind-dw2.c: Likewise.
      	* value-prof.c: Likewise.
      	* value-prof.h: Likewise.
      	* var-tracking.c: Likewise.
      	* varasm.c: Likewise.
      	* varpool.c: Likewise.
      	* vec.c: Likewise.
      	* vec.h: Likewise.
      	* vmsdbgout.c: Likewise.
      	* web.c: Likewise.
      	* xcoffout.c: Likewise.
      
      From-SVN: r154645
      H.J. Lu committed
  12. 26 Oct, 2009 1 commit
    • tm.texi (TARGET_ADDR_SPACE_KEYWORDS): Document. · 36c5e70a
      2009-10-26  Ben Elliston  <bje@au.ibm.com>
      	    Michael Meissner  <meissner@linux.vnet.ibm.com>
      	    Ulrich Weigand  <uweigand@de.ibm.com>
      
      	* doc/tm.texi (TARGET_ADDR_SPACE_KEYWORDS): Document.
      
      	* c-common.c (c_common_reswords): If TARGET_ADDR_SPACE_KEYWORDS is
      	defined, add the named address space keywords.
      	(c_addr_space_name): New function.
      	(complete_array_type): Preserve named address space.
      	(handle_mode_attribute): Use targetm.addr_space.valid_pointer_mode
      	instead of targetm.valid_pointer_mode.
      
      	* c-common.h (enum rid): Add RID_ADDR_SPACE_0 .. RID_ADDR_SPACE_15,
      	RID_FIRST_ADDR_SPACE and RID_LAST_ADDR_SPACE.
      	(ADDR_SPACE_KEYWORD): New macro.
      	(c_addr_space_name): Add prototype.
      
      	* c-tree.h (struct c_declspecs): Add address_space member.
      	(declspecs_add_addrspace): Add prototype.
      
      	* c-pretty-print.c (pp_c_type_qualifier_list): Handle address spaces.
      
      	* c-parser.c (c_parse_init): Add assertion.
      	(typedef enum c_id_kind): Add C_ID_ADDRSPACE.
      	(c_lex_one_token): Handle address space keywords.
      	(c_token_starts_typename): Likewise.
      	(c_token_starts_declspecs): Likewise.
      	(c_parser_declspecs): Likewise.
      	(c_parser_postfix_expression_after_paren_type): Diagnose compound
      	literal within function qualified with named address space.
      
      	* c-decl.c (diagnose_mismatched_decls): Diagnose conflicting named
      	address space qualifiers.
      	(shadow_tag_warned): Warn about useless address space qualifiers.
      	(quals_from_declspecs): Handle address space qualifiers.
      	(grokdeclarator): Likewise.
      	(build_null_declspecs): Likewise.
      	(declspecs_add_addrspace): New function.
      
      	* c-typeck.c (addr_space_superset): New function.
      	(qualify_type): Handle named address spaces.
      	(composite_type): Likewise.
      	(common_pointer_type): Likewise.
      	(comp_target_types): Likewise.
      	(build_conditional_expr): Likewise.
      	(handle_warn_cast_qual): Likewise.
      	(build_c_cast): Likewise.
      	(convert_for_assignment): Likewise.
      	(build_binary_op): Likewise.
      	(pointer_diff): Handle named address spaces.  Use intermediate
      	integer type of sufficient size if required.
      
      Co-Authored-By: Michael Meissner <meissner@linux.vnet.ibm.com>
      Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com>
      
      From-SVN: r153574
      Ben Elliston committed
  13. 14 Sep, 2009 1 commit
    • builtins.c (expand_builtin_synchronize): Use gimple_build_asm_vec. · 1c384bf1
      	* builtins.c (expand_builtin_synchronize): Use gimple_build_asm_vec.
      	* cfgbuild.c (make_edges): Handle asm goto.
      	* cfglayout.c (fixup_reorder_chain): Likewise.
      	* cfgrtl.c (patch_jump_insn): Likewise.
      	* gimple-pretty-print.c (dump_gimple_asm): Likewise.
      	* gimple.c (gimple_build_asm_1): Add and use nlabels parameter.
      	(gimple_build_asm_vec): Add and use labels parameter.
      	(gimple_build_asm): Remove.
      	(walk_gimple_asm): Walk labels too.
      	* gimple.def (GIMPLE_ASM): Update docs.
      	* gimple.h: Update decls.
      	(struct gimple_statement_asm): Change nc to use unsigned char;
      	add nl member.
      	(gimple_asm_nlabels): New.
      	(gimple_asm_label_op, gimple_asm_set_label_op): New.
      	* gimplify.c (gimplify_asm_expr): Copy labels from ASM_EXPR
      	into gimple_build_asm_vec.
      	* jump.c (mark_jump_label_asm): New.
      	(mark_jump_label): Use it.
      	(redirect_jump_1): Handle asm goto.
      	(invert_jump_1): Soft fail if X is null.
      	* recog.c (extract_asm_operands): New.
      	(asm_noperands): Use it; handle asm labels.
      	(decode_asm_operands): Use extract_asm_operands.
      	(asm_operand_ok): Properly handle empty string.
      	* reg-stack.c (get_asm_operands_in_out): Rename from
      	get_asm_operand_n_inputs; use extract_asm_operands; return both
      	inputs and outputs by reference; update all callers.
      	* rtl.def (ASM_OPERANDS): Add label vector as operand 6.
      	* rtl.h (ASM_OPERANDS_LABEL_VEC): New.
      	(ASM_OPERANDS_LABEL_LENGTH, ASM_OPERANDS_LABEL): New.
      	(ASM_OPERANDS_SOURCE_LOCATION): Renumber.
      	(extract_asm_operands): Declare.
      	* stmt.c (expand_asm_operands): Add and use labels parameter.
      	(check_unique_operand_names): Likewise.
      	(resolve_asm_operand_names, resolve_operand_name_1): Likewise.
      	(expand_asm_stmt): Handle asm labels.
      	* tree-cfg.c (make_gimple_asm_edges): New.
      	(make_edges): Use it.
      	(cleanup_dead_labels): Handle asm labels.
      	(is_ctrl_altering_stmt): Likewise.
      	(gimple_redirect_edge_and_branch): Likewise.
      	* tree.def (ASM_EXPR): Add 5th operand.
      	* tree.h (ASM_LABELS): New.
      	(resolve_asm_operand_names): Update decl.
      
      	* c-parser.c (c_parser_asm_statement): Parse asm goto.
      	(c_parser_asm_goto_operands): New.
      	* c-tree.h (build_asm_expr): Update decl.
      	* c-typeck.c (build_asm_expr): Add and use labels parameter.
      	* doc/extend.texi: Document asm goto.
      
      gcc/ada/
      	* gcc-interface/trans.c (Pragma_to_gnu): Use build5 for ASM_EXPR.
      
      gcc/cp/
      	* cp-tree.h (finish_asm_stmt): Update decl.
      	* parser.c (cp_parser_asm_definition): Parse asm goto.
      	(cp_parser_asm_label_list): New.
      	* pt.c (tsubst_copy_asm_operands): Don't recurse on labels.
      	(tsubst_expr): Handle asm labels.
      	* semantics.c (finish_asm_stmt): Add and use labels parameter.
      
      gcc/testsuite/
      	* c-c++-common/asmgoto-1.c, c-c++-common/asmgoto-2.c,
      	c-c++-common/asmgoto-3.c, gcc.c-torture/compile/asmgoto-1.c,
      	gcc.dg/tree-ssa/asmgoto-1.c: New files.
      
      Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
      
      From-SVN: r151701
      Richard Henderson committed
  14. 13 Sep, 2009 1 commit
    • langhooks-def.h (LANG_HOOKS_EH_RUNTIME_TYPE): Define. · f9417da1
      2009-09-13  Richard Guenther  <rguenther@suse.de>
      	Rafael Avila de Espindola  <espindola@google.com>
      
      	* langhooks-def.h (LANG_HOOKS_EH_RUNTIME_TYPE): Define.
      	(LANG_HOOKS_EH_PERSONALITY): Likewise.
      	(LANG_HOOKS_INITIALIZER): Adjust.
      	(lhd_pass_through_t): Declare.
      	* langhooks.h (struct lang_hooks): Add eh_runtime_type and
      	eh_personality.
      	* langhooks.c (lhd_pass_through_t): New function.
      
              * dwarf2out.c (output_call_frame_info, dwarf2out_do_cfi_startproc,
      	dwarf2out_begin_prologue): Use personality from current_function_decl.
              * expr.h (get_personality_function): Declare.
      	* expr.c (get_personality_function): New function.
      	(build_personality_function): Likewise.
              * libfuncs.h (libfunc_index): Remove LTI_eh_personality.
              (eh_personality_libfunc): Remove.
              * optabs.c (build_libfunc_function): New function split out from ...
      	(init_one_libfunc): ... here.
              * tree.h (DECL_FUNCTION_PERSONALITY): New.
              (tree_function_decl): Add personality.
      	(lhd_gcc_personality): Declare.
      	(build_personality_function): Likewise.
      	* tree.c (gcc_eh_personality_decl): New.
      	(lhd_gcc_personality): New function.
      	* except.h (lang_eh_runtime_type): Remove.
      	(enum eh_personality_kind): New.
      	(build_personality_function): Declare.
      	(function_needs_eh_personality): Declare.
              * except.c (lang_eh_runtime_type): Remove.
      	(function_needs_eh_personality): New function.
      	(add_type_for_runtime): Call lang_hooks.type_for_runtime instead.
              (sjlj_emit_function_enter, output_function_exception_table):
              Use personality from current_function_decl.
      	* tree-eh.c (lower_eh_constructs): Set DECL_FUNCTION_PERSONALITY.
      	* tree-inline.c (tree_can_inline_p): Do not inline across different
      	EH personalities.
      	(expand_call_inline): Likewise.  Adjust the callers EH personality.
      	(tree_function_versioning): Copy DECL_FUNCTION_PERSONALITY.
      	* cgraph.c (cgraph_add_new_function): Set DECL_FUNCTION_PERSONALITY.
      	* Makefile.in (cgraph.o): Add $(EXCEPT_H) dependency.
      	(c-parser.o): Likewise
      
      	* c-tree.h (c_eh_initialized_p): Remove.
      	(c_maybe_initialize_eh): Likewise.
      	* c-decl.c (finish_decl): Don't call c_maybe_initialize_eh.
      	(finish_decl): Don't call c_maybe_initialize_eh.
      	(c_eh_initialized_p): Remove.
      	(c_maybe_initialize_eh): Likewise.
              * c-parser.c (c_parser_omp_construct): Likewise.
      	(c_parse_file): Initialize exception handling.
      
      	objc/
      	* objc-act.c (objc_eh_runtime_type): Export.
      	(objc_init_exceptions): Remove.  Move warning code ...
      	(objc_begin_try_stmt): ... here
      	(objc_build_throw_stmt): ... and here.
      	(objc_eh_personality_decl): New.
      	(objc_eh_personality): New function.
      	* objc-act.h (objc_eh_runtime_type): Declare.
      	(objc_eh_personality): Likewise.
      	* objc-lang.c (LANG_HOOKS_EH_RUNTIME_TYPE): Define.
      	(LANG_HOOKS_EH_PERSONALITY): Likewise.
      
      	cp/
      	* except.c (init_exception_processing): Do not set
      	lang_eh_runtime_type.
      	(choose_personality_routine): Do not set eh_personality_decl,
      	set pragma_java_exceptions.
      	* cp-lang.c (LANG_HOOKS_EH_RUNTIME_TYPE): Define.
      	(LANG_HOOKS_EH_PERSONALITY): Likewise.
      	(cp_eh_personality_decl): New.
      	(cp_eh_personality): Likewise.
      	* Make-lang.in (cp-lang.o): Add $(EXPR_H) and $(EXCEPT_H)
      	dependencies.
      
      	java/
      	* decl.c (do_nothing): Remove.
      	(java_init_decl_processing): Do not set lang_eh_runtime_type.
      	* Make-lang.in (lang.o): Add $(EXCEPT_H) dependency.
      	* lang.c (java_eh_personality): New.
      	(java_eh_personality_decl): Likewise.
      	(LANG_HOOKS_EH_PERSONALITY): Define.
      
      	ada/
      	* gcc-interface/misc.c (gnat_init_gcc_eh): Do not set
      	lang_eh_runtime_type.
      	(LANG_HOOKS_EH_PERSONALITY): Define.
      	(gnat_eh_personality_decl): New.
      	(gnat_eh_personality): Likewise.
      	* Make-lang.in (misc.o): Add gt-ada-misc.h dependency.
      	* config-lang.in (gtfiles): Add misc.c.
      
      	fortran/
      	* f95-lang.c (gfc_maybe_initialize_eh): Do not init
      	eh_personality_libfunc.
      
      Co-Authored-By: Rafael Avila de Espindola <espindola@google.com>
      
      From-SVN: r151676
      Richard Guenther committed
  15. 20 Aug, 2009 1 commit
    • c-objc-common.h (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Do not define. · 29cc57cf
      2009-08-20  Richard Guenther  <rguenther@suse.de>
      
      	* c-objc-common.h (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Do not
      	define.
      	* c-tree.h (c_dup_lang_specific_decl): Remove.
      	(struct lang_decl, struct lang_type): Move definitions ...
      	* c-lang.h: ... here.  New file.
      	* c-decl.c: Include c-lang.h.
      	(c_dup_lang_specific_decl): Remove.
      	* c-typeck.c: Include c-lang.h.
      	* Makefile.in (c-decl.o): Add c-lang.h dependency.
      	(c-typeck.o): Likewise.
      	* c-config-lang.in (gtfiles): Add c-lang.h.
      	* gengtype.c (get_output_file_with_visibility): Handle c-lang.h
      	like c-tree.h.
      
      	objc/
      	* objc-act.c: Include c-lang.h
      	* Make-lang.in (objc/objc-act.o): Add c-lang.h dependency.
      
      From-SVN: r150966
      Richard Guenther committed
  16. 19 Jun, 2009 2 commits
    • tree-cfg.c (gimple_redirect_edge_and_branch): Change ERROR_MARK to GIMPLE_ERROR_MARK. · d130ae11
      ./:	* tree-cfg.c (gimple_redirect_edge_and_branch): Change ERROR_MARK
      	to GIMPLE_ERROR_MARK.
      
      	* c-typeck.c (build_conditional_expr): Add op1_original_type and
      	op2_original_type parameters.  Warn about using different enum
      	types.
      	* c-parser.c (c_parser_conditional_expression): Pass original
      	types to build_conditional_expr.
      	* c-tree.h (build_conditional_expr): Update declaration.
      testsuite/:
      	* gcc.dg/Wcxx-compat-18.c: New testcase.
      
      From-SVN: r148727
      Ian Lance Taylor committed
    • dse.c (struct store_info): Rename bitmap field to bmap. · dc491a25
      ./:	* dse.c (struct store_info): Rename bitmap field to bmap.  Change
      	all uses.
      
      	* c-decl.c (in_struct, struct_types): Remove.
      	(struct c_binding): Add in_struct field.
      	(c_binding_ptr): Define type, along with VEC.
      	(struct c_struct_parse_info): Define.
      	(struct_parse_info): New static variable.
      	(bind): Initialize in_struct field.
      	(start_struct): Remove enclosing_in_struct and
      	enclosing_struct_types parameters.  Add
      	enclosing_struct_parse_info parameter.  Change all callers.  Set
      	struct_parse_info rather than in_struct and struct_types.
      	(grokfield): If -Wc++-compat and there is a symbol binding for the
      	field name, set the in_struct flag and push it on the
      	struct_parse_info->fields vector.
      	(warn_cxx_compat_finish_struct): New static function.
      	(finish_struct): Remove enclosing_in_struct and
      	enclosing_struct_types parameters.  Add
      	enclosing_struct_parse_info parameter.  Change all callers.  Don't
      	set C_TYPE_DEFINED_IN_STRUCT here.  Call
      	warn_cxx_compat_finish_struct.  Free struct_parse_info and set to
      	parameter.  Only push on struct_types if warn_cxx_compat.
      	(finish_enum): Only push on struct_types if warn_cxx_compat.
      	(declspecs_add_type): Add loc parameter.  Change all callers.
      	Change all error calls to error_at.  Pass loc, not input_location,
      	to pedwarn calls.  Warn if -Wc++-compat and a typedef name is
      	defined in a struct.  If -Wc++-compat and parsing a struct, record
      	that a typedef name was used.
      	* c-parser.c (c_parser_declspecs): Get location to pass to
      	declspecs_add_type.
      	(c_parser_struct_or_union_specifier): Update calls to start_struct
      	and finish_struct.
      	* c-tree.h (struct c_struct_parse_info): Declare.
      	(finish_struct, start_struct): Update declarations.
      	(declspecs_add_type): Update declaration.
      objc/:
      	* objc-act.c (objc_in_struct, objc_struct_types): Remove.
      	(objc_struct_info): New static variable.
      	(objc_start_struct): Pass &objc_struct_info, not &objc_in_struct
      	and &objc_struct_types, to start_struct.
      	(objc_finish_struct): Likewise for finish_struct.
      objcp/:
      	* objcp-decl.h (start_struct): Remove in_struct and struct_types
      	parameters.  Add struct_info parameter.
      	(finish_struct): Likewise.
      testsuite/:
      	* gcc.dg/Wcxx-compat-15.c: New testcase.
      
      From-SVN: r148709
      Ian Lance Taylor committed
  17. 16 Jun, 2009 1 commit
    • df-problems.c (df_simulate_one_insn_forwards): Fix braces in switch. · e1b7793c
      ./:	* df-problems.c (df_simulate_one_insn_forwards): Fix braces in
      	switch.
      	* gcov.c (read_count_file): Add braces around variables declared
      	before label.
      
      	* c.opt (Wjump-misses-init): New warning.
      	* c-opts.c (c_common_handle_option): Set warn_jump_misses_init for
      	-Wall and -Wc++-compat if not already set.
      	(c_common_post_options): Clear warn_jump_misses_init if it was not
      	set.
      	* c-decl.c (struct c_binding): Change type field to a union with
      	new label field.  Make it the first field in the struct.  Update
      	references to type to use u.type instead.
      	(struct c_spot_bindings): Define.
      	(struct c_goto_bindings): Define.
      	(c_goto_bindings_p): Define, along with VECs.
      	(struct c_label_vars): Define.
      	(struct c_scope): Add has_label_bindings field.
      	(bind_label, set_spot_bindings): New static functions.
      	(decl_jump_unsafe, update_spot_bindings): New static functions.
      	(update_label_decls): New static function.
      	(pop_scope): Call update_label_decls.  Don't call c_end_vm_scope.
      	Update binding u.label field to shadowed field.
      	(c_binding_start_stmt_expr): New function.
      	(c_binding_end_stmt_expr): New function.
      	(pushdecl): Don't call c_begin_vm_scope.
      	(make_label): Add defining and p_label_vars parameters.  Change
      	all callers.
      	(lookup_label): Correct test for whether a label has not yet been
      	defined.  Call bind_label rather than bind.
      	(warn_about_goto): New static function.
      	(lookup_label_for_goto): New function.
      	(declare_label): Call bind_label rather than bind.
      	(check_earlier_gotos): New static function.
      	(define_label): Don't give errors about jumping into statement
      	expressions or scopes of variably modified types.  Call
      	set_spot_bindings and check_earlier_gotos.  Call bind_label
      	instead of bind.  Don't set label_context_stack_se or
      	label_context_stack_vm.
      	(c_get_switch_bindings): New function.
      	(c_release_switch_bindings): New function.
      	(c_check_switch_jump_warnings): New function.
      	(start_function): Don't set label_context_stack_se or
      	label_context_stack_vm.
      	(finish_function): Likewise.
      	* c-typeck.c (label_context_stack_se): Don't define.
      	(label_context_stack_vm): Don't define.
      	(c_finish_goto_label): Call lookup_label_for_goto rather than
      	lookup_label.  Don't give errors about jumping into a statement
      	expression or the scope of a variably modified type.  Don't set
      	label_context_stack_se or label_context_stack_vm.
      	(struct c_switch): Remove blocked_stmt_expr and blocked_vm
      	fields.  Add bindings field.
      	(c_start_case): Don't set deleted fields.  Set bindings field.
      	(do_case): Rework order of tests.  Don't check blocked_stmt_expr
      	or blocked_vm.  Call c_check_switch_jump_warnings.
      	(c_finish_case): Don't test blocked_stmt_expr field.  Call
      	c_release_switch_bindings.
      	(c_begin_stmt_expr): Don't increment blocked_stmt_expr in
      	c_switch_stack.  Don't walk label_context_stack_se labels.  Don't
      	set label_context_stack_se.  Call c_bindings_start_stmt_expr.
      	(c_finish_stmt_expr): Don't decrement blocked_stmt_expr in
      	c_switch_stack.  Don't walk label_context_stack_se labels.  Don't
      	set label_context_stack_se.  Call c_bindings_end_stmt_expr.
      	(c_begin_vm_scope, c_end_vm_scope): Don't define.
      	* c-tree.h (C_DECL_UNJUMPABLE_STMT_EXPR): Don't define.
      	(C_DECL_UNDEFINABLE_STMT_EXPR): Don't define.
      	(C_DECL_UNJUMPABLE_VM): Don't define.
      	(C_DECL_UNDEFINABLE_VM): Don't define.
      	(struct c_label_list): Don't define.
      	(struct c_label_context_se): Don't define.
      	(struct c_label_context_vm): Don't define.
      	(struct c_spot_bindings): Declare.
      	(c_bindings_start_stmt_expr): Declare.
      	(c_bindings_end_stmt_expr): Declare.
      	(lookup_label_for_goto): Declare.
      	(c_get_switch_bindings, c_release_switch_bindings): Declare.
      	(c_check_switch_jump_warnings): Declare.
      	(label_context_stack_se, label_context_stack_vm): Don't declare.
      	(c_finish_goto_label): Update declaration.
      	(c_begin_vm_scope, c_end_vm_scope): Don't declare.
      	* doc/invoke.texi (Option Summary): Mention -Wjump-misses-init.
      	(Warning Options): Document -Wjump-misses-init.
      cp/:
      	* parser.c (cp_parser_direct_declarator): Add braces around
      	variables declared before label.
      objc/:
      	* objc-act.c (objc_start_function): Don't set
      	label_context_stack_se or label_context_stack_vm.
      testsuite/:
      	* gcc.dg/Wjump-misses-init-1.c: New testcase.
      	* gcc.dg/Wjump-misses-init-2.c: New testcase.
      	* gcc.dg/c99-vla-jump-5.c: Adjust expected error messages.
      	Recognize new notes.
      	* gcc.dg/stmt-expr-label-2.c: Likewise.
      	* gcc.dg/c99-vla-jump-1.c: Recognize new notes.  Fix column
      	numbers.
      	* gcc.dg/c99-vla-jump-2.c: Recognize new notes.
      	* gcc.dg/c99-vla-jump-3.c: Recognize new notes.
      	* gcc.dg/c99-vla-jump-4.c: Likewise.
      	* gcc.dg/stmt-expr-label-1.c: Likewise.
      	* gcc.dg/stmt-expr-label-3.c: Likewise.
      	* gcc.dg/vla-8.c: Likewise.  Move error message to different
      	line.
      
      From-SVN: r148512
      Ian Lance Taylor committed
  18. 12 Jun, 2009 1 commit
    • java-gimplify.c (java_gimplify_block): New argument to build_empty_stmt. · c2255bc4
      gcc/java/
      	* java-gimplify.c (java_gimplify_block): New argument to
      	build_empty_stmt.
      	* expr.c (force_evaluation_order): Same.
      	* typeck.c: Add location to build_decl or PUSH_FIELD calls.
      	* class.c: Same.
      	* decl.c: Same.
      	* jcf-parse.c: Same.
      	* constants.c: Same.
      	* resource.c: Same.
      	* except.c: Same.
      	* builtins.c: Same.
      	* expr.c: Same.
      	* java-tree.h (PUSH_FIELD): Add location field.
      gcc/objc/
      	* objc-act.c (finish_var_decl): Pass location to finish_decl.
      	(objc_get_parm_info): Same.
      	(get_super_receiver): Same.
      	* objc-act.c (objc_build_component_ref): Pass location to
      	build_compound_ref.
      	(build_module_initializer_routine): Pass location to
      	c_end_compound_stmt.
      	(objc_generate_static_init_call): Pass location to build_stmt.
      	(build_typed_selector_reference): New location argument.
      	(build_selector_reference): Same.
      	(objc_substitute_decl): Pass location to build_array_ref.
      	(next_sjlj_build_try_catch_finally): Pass location to build_stmt.
      	(objc_begin_catch_clause): Same.
      	(objc_finish_try_stmt): Same.
      	(objc_finish_catch_clause): Pass location to c_end_compound_stmt.
      	(objc_build_throw_stmt): New argument.
      	(generate_shared_structures): Pass location to build_c_cast.
      	(objc_build_message_expr): Use local location.
      	(objc_finish_message_expr): Use input_location.
      	(build_objc_method_call): New argument.
      	(objc_build_selector_expr): Same.
      	(get_super_receiver): Pass location to build_c_cast,
      	build_modify_expr, build_compound_expr.
      	* objc-act.c: Add location to all calls to start_struct, build_decl,
      	finish_struct.
      gcc/
      	* tree-pretty-print.c (dump_generic_node): Dump column numbers.
      	* gimple-pretty-print.c (dump_gimple_stmt): Same.
      	* gimplify.c (gimplify_modify_expr): Set location for GIMPLE_ASSIGNs
      	created.
      	* c-parser.c (c_parser_binary_expression): Use current column while
      	building binary operations.
      	* common.opt (fshow-column): Enable by default.
      	* tree-vrp.c (check_array_ref): Use warning_at.
      	(check_array_bounds): Use location from call back if expr has no
      	location.
      	* tree.h: Add location argument to maybe_fold_*.
      	* tree-ssa-ccp.c (ccp_fold): Pass location to maybe_fold_*.
      	(maybe_fold_offset_to_array_ref): Add location argument and use it.
      	(maybe_fold_offset_to_component_ref): Same.
      	(maybe_fold_offset_to_reference): Same.
      	(maybe_fold_offset_to_address): Same.
      	(maybe_fold_stmt_indirect): Same.
      	(maybe_fold_stmt_addition): Same.
      	(fold_stmt_r): Pass location to maybe_fold_*.
      	(fold_gimple_assign): Same.
      	* c-tree.h: Add location argument to finish_decl,
      	default_function_array_conversion, store_init_value.
      	* c-decl.c (define_label): Use error_at.
      	(c_make_fname_decl): Pass location to finish_decl.
      	(finish_decl): New location argument.
      	(build_compound_literal): Pass location to store_init_value.
      	(grokdeclarator): Pass location to finish_decl.
      	(grokfield): Same.
      	* c-typeck.c (array_to_pointer_conversion): New location argument.
      	(function_to_pointer_conversion): Same.
      	(default_function_array_conversion): Same.
      	(parser_build_unary_op): Pass location to overflow_warning.
      	(parser_build_binary_op): Same.  Use warning_at.
      	(build_unary_op): Pass location to array_to_pointer_conversion.
      	(build_c_cast): Pass location to digest_init.
      	(build_modify_expr): New location argument.
      	(convert_for_assignment): Same.
      	(store_init_value): Same.
      	(digest_init): Same.
      	(output_init_element): Pass location to digest_init and
      	array_to_pointer_conversion.
      	(c_finish_return): Pass location to convert_for_assignment.
      	* gimplify.c (gimplify_conversion): Pass location to
      	maybe_fold_offset_to_address.
      	* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Pass location
      	to maybe_fold_stmt_addition.
      	* c-omp.c (c_finish_omp_atomic): Pass new location to
      	build_modify_expr.
      	(c_finish_omp_for): Same.
      	* c-common.c (overflow_warning): New argument.
      	* c-common.h: New argument to build_modify_expr, overflow_warning.
      	* c-parser.c (c_parser_declaration_or_fndef): Pass location to
      	finish_decl.
      	(c_parser_initializer): Pass location to
      	default_function_array_conversion.
      	(c_parser_initelt): Same.
      	(c_parser_initval): Same.
      	(c_parser_asm_operands): Same.
      	(c_parser_expr_no_commas): Same.  Pass location to build_modify_expr.
      	(c_parser_conditional_expression): Same.
      	(c_parser_binary_expression): Add location info to stack.  Use it.
      	(c_parser_unary_expression): Pass location to
      	default_function_array_conversion, parser_build_unary_op,
      	build_indirect_ref, c_parser_postfix_expression_after_primary.
      	(c_parser_postfix_expression_after_primary): New location argument.
      	Use it.
      	(c_parser_expression_conv): Pass location to
      	default_function_array_conversion.
      	(c_parser_expr_list): Same.
      	(c_parser_omp_atomic): Same.
      	(c_parser_omp_for_loop): Same.
      	* c-tree.h: (struct c_declarator): Add comment to id_loc.
      	(build_array_declarator): New argument.
      	* c-decl.c (build_array_declarator): Add location argument.
      	(grokdeclarator): Set id_loc for cdk_array.
      	* c-parser.c (c_parser_direct_declarator_inner): Pass location to
      	build_array_declarator.
      	* tree.c (build_omp_clause): Add location argument.
      	* tree.h (OMP_CLAUSE_HAS_LOCATION): New macro.
      	(OMP_CLAUSE_LOCATION): New macro.
      	(struct tree_omp_clause): Add location field.
      	(build_omp_clause): Add argument.
      	* testsuite/gcc.dg/gomp/for-1.c: Fix column.
      	* cp/pt.c (tsubst_omp_for_iterator): Pass location to
      	build_omp_clause.
      	* cp/parser.c (cp_parser_omp_var_list_no_open): Same.
      	(cp_parser_omp_clause_collapse): Same.
      	(cp_parser_omp_clause_default): Same.
      	(cp_parser_omp_clause_if): Same.
      	(cp_parser_omp_clause_nowait): Same.
      	(cp_parser_omp_clause_num_threads): Same.
      	(cp_parser_omp_clause_ordered): Same.
      	(cp_parser_omp_clause_schedule): Same.
      	(cp_parser_omp_clause_untied): Same.
      	(cp_parser_omp_for_loop): Same.
      	(cp_parser_omp_parallel): Pass location to c_split_parallel_clauses.
      	* c-tree.h (c_start_case): Add location argument.
      	(c_process_expr_stmt): Same.
      	(c_finish_goto_*): Same.
      	* tree-parloops.c (initialize_reductions): Pass location to
      	build_omp_clause.
      	(create_parallel_loop): Same.
      	* fortran/trans-openmp.c (gfc_trans_omp_variable_list): Same.
      	(gfc_trans_omp_reduction_list): Same.
      	(gfc_trans_omp_clauses): Same.
      	(gfc_trans_omp_do): Same.
      	* c-typeck.c (c_finish_goto_label): Same.
      	(c_finish_goto_ptr): New location argument.
      	(c_start_case): Same.
      	(emit_side_effect_warnings): Same.
      	(c_process_expr_stmt): Same.
      	(c_finish_stmt_expr): Same.
      	(c_finish_omp_clauses): Use error_at instead of error.
      	* gimplify.c (gimplify_adjust_omp_clauses_1): Pass location to
      	build_omp_clause.
      	* c-omp.c (c_split_parallel_clauses): New location argument.
      	* tree-nested.c (convert_nonlocal_reference_stmt): Pass location
      	to build_omp_clause.
      	(convert_local_reference_stmt): Same.
      	(convert_gimple_call): Same.
      	* c-common.h (c_split_parallel_clauses): New argument.
      	* c-parser.c (c_parser_statement_after_labels): Pass location to
      	c_finish_goto_label.
      	(c_parser_switch_statement): Pass location to c_start_case.
      	(c_parser_for_statement): Pass location to c_finish_expr_stmt,
      	and c_process_expr_stmt.
      	(c_parser_omp_variable_list): Add location argument.
      	(c_parser_omp_clause_collapse): Pass location to
      	build_omp_clause.
      	(c_parser_omp_clause_default): Same.
      	(c_parser_omp_clause_if): Same.
      	(c_parser_omp_clause_num_threads): Same.
      	(-c_parser_omp_clause_ordered): Same.
      	(c_parser_omp_clause_reduction): Pass location to
      	c_parser_omp_variable_list.
      	(c_parser_omp_clause_schedule): Pass location to build_omp_clause.
      	(c_parser_omp_clause_untied): Same.
      	(c_parser_omp_for_loop): Pass location to c_process_expr_stmt.
      	(c_parser_omp_parallel): Pass location to
      	c_split_parallel_clauses.
      	* c-tree.h (check_for_loop_decls, undeclared_variable,
      	build_component_ref, build_array_ref, build_external_ref,
      	c_expr_sizeof_expr, c_expr_sizeof_type, parser_build_unary_op,
      	build_conditional_expr, build_compound_expr, c_cast_expr,
      	build_c_cast, build_asm_expr, c_end_compound_stmt, c_finish_stmt_expr,
      	c_finish_return, c_finish_omp_parallel, c_finish_omp_task): New
      	argument.
      	* c-semantics.c (build_stmt): Same.
      	(build_case_label): Same.
      	* c-decl.c (c_finish_incomplete_decl): Pass location on down.
      	(undeclared_variable): New argument.
      	(make_label): Same.
      	(lookup_label): Pass location on down.
      	(define_label): Same.
      	(finish_decl): Same.
      	(build_compound_literal): Same.
      	(finish_struct): Same.
      	(finish_function): Do not set location here.
      	(check_for_loop_decls): New argument.
      	* tree.c (save_expr): Set location.
      	(build_empty_stmt): New argument.
      	* tree.h (build_empty_stmt): New argument to build_empty_stmt.
      	(CAN_HAVE_LOCATION_P): Make sure we have a non empty node.
      	* builtins.c (gimplify_va_arg_expr): Use locations.
      	(expand_builtin_sync_operation): Same.
      	* c-typeck.c (build_component_ref): New argument.
      	(build_array_ref): Same.
      	(build_external_ref): Same.
      	(c_expr_sizeof_expr): Same.
      	(c_expr_sizeof_type): Same.
      	(parser_build_unary_op): Same.
      	(build_conditional_expr): Same.
      	(build_compound_expr): Pass location on down.
      	(build_compound_expr): New argument.
      	(build_c_cast): Same.
      	(c_cast_expr): Same.
      	(build_asm_expr): Same.
      	(c_finish_return): Same.
      	(c_process_expr_stmt): Pass location on down.
      	(c_finish_stmt_expr): New argument.
      	(push_clenaup): Same.
      	(c_finish_omp_parallel): Same.
      	(c_finish_omp_task): Same.
      	* gimplify.c (gimplify_call_expr): Pass location on down.
      	* c-omp.c (c_finish_omp_master): New argument.
      	(c_finish_omp_critical): Same.
      	(c_finish_omp_ordered): Same.
      	(c_finish_omp_barrier): Same.
      	(-c_finish_omp_taskwait): Same.
      	(c_finish_omp_atomic): Same.
      	(c_finish_omp_flush): Same.
      	* tree-inline.c (copy_tree_body_r): Pass location on down.
      	(inline_forbidden_p): Remove use of input_location.
      	* c-gimplify.c (c_build_bind_expr): New argument.
      	* c-common.c (c_common_truthvalue_conversion): Pass location on down.
      	(c_sizeof_or_alignof_type): New argument.
      	(c_alignof_expr): Same.
      	(build_va_arg): Same.
      	(c_add_case_label): Same.
      	* c-common.h (c_sizeof_or_alignof_type, c_alignof_expr,
      	c_sizeof, c_alignof, build_va_arg, build_stmt, build_case_label,
      	c_build_bind_expr, objc_build_selector_expr, objc_build_throw_stmt,
      	c_finish_omp_master, c_finish_omp_critical, c_finish_omp_ordered,
      	c_finish_omp_barrier, c_finish_omp_atomic, c_finish_omp_flush,
      	c_finish_omp_taskwait, c_finish_omp_for, c_split_parallel_clauses):
      	New argument.
      	* stub-objc.c (objc_build_selector_expr): Same.
      	(objc_build_throw_stmt): Same.
      	* c-parser.c (c_parser_declaration_or_fndef): Pass location on down.
      	(c_parser_initelt): Same.
      	(c_parser_compound_statement): Same.
      	(c_parser_compound_statement_nostart): Same.
      	(c_parser_label): Same.
      	(c_parser_statement_after_labels): Same.
      	(c_parser_if_body): Same.
      	(c_parser_else_body): Same.
      	(c_parser_if_statement): Same.
      	(c_parser_switch_statement): Same.
      	(c_parser_while_statement): Same.
      	(c_parser_do_statement): Same.
      	(c_parser_for_statement): Same.
      	(c_parser_asm_statement): Same.
      	(c_parser_conditional_expression): Same.
      	(c_parser_binary_expression): Same.
      	(c_parser_cast_expression): Same.
      	(c_parser_unary_expression): Same.
      	(c_parser_sizeof_expression): Same.
      	(c_parser_alignof_expression): Same.
      	(c_parser_postfix_expression): Same.
      	(c_parser_expression): Same.
      	(c_parser_objc_receiver): Same.
      	(c_parser_omp_variable_list): Same.
      	(c_parser_omp_structured_block): Same.
      	(c_parser_omp_atomic): New argument.
      	(c_parser_omp_barrier): Same.
      	(c_parser_omp_critical): Same.
      	(c_parser_omp_flush): Pass location on down.
      	(c_parser_omp_for_loop): New argument.
      	(c_parser_omp_for): Same.
      	(c_parser_omp_master): Same.
      	(c_parser_omp_ordered): Same.
      	(c_parser_omp_sections_scope): Same.
      	(c_parser_omp_sections): Same.
      	(c_parser_omp_parallel): Same.
      	(c_parser_omp_single): Same.
      	(c_parser_omp_task): Same.
      	(c_parser_omp_taskwait): Pass location on down.
      	(c_parser_omp_construct): Same.
      	(c_parser_omp_threadprivate): Same.
      	* dwarf2asm.c, targhooks.c, optabs.c, tree.c, tree.h, target.h,
      	builtins.c, omp-low.c, cgraphunit.c, tree-call-cdce.c,
      	tree-ssa-alias.c, gimple-low.c, c-tree.h, expr.c, tree-parloops.c,
      	c-decl.c, tree-eh.c, langhooks.c, function.c, stor-layout.c,
      	c-typeck.c, gimplify.c, c-pragma.c, expmed.c, except.c, coverage.c,
      	emit-rtl.c, cfgexpand.c, tree-mudflap.c, varasm.c, tree-nested.c,
      	rtl.h, tree-inline.c, tree-profile.c, c-common.c, c-common.h,
      	tree-switch-conversion.c, tree-cfg.c, ipa-struct-reorg.c, c-parser.c,
      	config/i386/i386.c, stmt.c:
      	Add location argument to the following function definitions and/or
      	function calls: build_decl, objcp_start_struct, objcp_finish_struct,
      	start_struct, finish_struct, PUSH_FIELD, create_artificial_label,
      	cp_make_fname_decl, pushtag, implicitly_declare, c_make_fname_decl,
      	build_compound_literal, parser_xref_tag, resolve_overloaded_builtin,
      	do_case, c_finish_bc_stmt, build_compound_literal,
      	build_function_call.
      	* c-decl.c (build_compound_literal): Add location argument.
      	Make all diagnostic calls use location.
      	(start_struct): Same.
      	(finish_struct): Same.
      	(start_enum): Same.
      	(build_enumerator): Same.
      	(start_function): Same.
      	(grokdeclarator): Make all diagnostic calls use location.
      	(store_parm_decls_oldstyle): Same.
      	* c-typeck.c (build_function_call): Add location argument.
      	Make all diagnostic calls use location.
      	(do_case): Same.
      	(c_finish_bc_stmt): Same.
      	* tree-nested.c (get_trampoline_type): Add argument.
      	Pass location to build_decl.
      	(lookup_tramp_for_decl): Pass location to get_trampoline_type.
      	* rtl.h (RTL_LOCATION): New.
      	* c-common.c (c_add_case_label): Add location argument.
      	Make all diagnostic calls use location.
      	* c-common.h: Add location argument to make_fname_decl, do_case,
      	c_add_case_label, build_function_call, resolve_overloaded_builtin.
      	* c-parser.c (c_parser_enum_specifier): Rename ident_loc to enum_loc.
      	Set it appropriately for every case.  Pass enum_loc to start_enum
      	call.  Pass value_loc first to build_enumerator.  Pass enum_loc to
      	parser_xref_tag.
      	(c_parser_struct_or_union_specifier): Save location.  Use it for
      	start_struct, finish_struct, and parser_xref_tag.
      gcc/testsuite/
      	* gcc.dg/old-style-prom-3.c: Add column info.
      	* gcc.dg/overflow-warn-1.c
      	* gcc.dg/gomp/pr27415.c
      	* gcc.dg/gomp/for-1.c: Same.
      	* gcc.dg/enum-compat-1.c: Same.
      	* gcc.dg/c99-tag-3.c: Same.
      	* gcc.dg/Wredundant-decls-2.c: Same.
      	* gcc.dg/func-ptr-conv-1.c: Same.
      	* gcc.dg/asm-wide-1.c: Same.
      	* gcc.dg/nofixed-point-2.c: Same.
      	* gcc.dg/cpp/line3.c: Same.
      	* gcc.dg/array-10.c: Same.
      	* gcc.dg/c99-vla-jump-1.c: Same.
      	* gcc.dg/pr20368-1.c: Same.
      	* gcc.dg/Wshadow-3.c: Same.
      	* gcc.dg/c90-const-expr-8.c: Same.
      	* gcc.dg/label-decl-2.c: Same.
      	* gcc.dg/dremf-type-compat-2.c: Same.
      	* gcc.dg/c90-const-expr-5.c: Same.
      	* gcc.dg/builtins-30.c: Same.
      	* gcc.dg/Warray-bounds.c: Same.
      	* gcc.dg/Wcxx-compat-2.c: Same.
      	* gcc.dg/tree-ssa/col-1.c: Same.
      	* gcc.dg/old-style-prom-2.c: Same.
      	* gcc.dg/cast-function-1.c: Same.
      	* gcc.dg/pr15698-1.c: Same.
      	* gcc.dg/dremf-type-compat-3.c: Same.
      	* gcc.dg/vla-8.c: Same.
      	* gcc.dg/gomp/pr27415.c: Move firstprivate diagnostics to correct
      	line.
      	* gcc.dg/label-decl-2.c: Move label diagnostic to correct line.
      	* gcc.dg/old-style-prom-3.c: Check for error on the correct line.
      	* gcc.dg/enum-compat-1.c: Same.
      	* gcc.dg/dremf-type-compat-2.c: Same.
      	* gcc.dg/old-style-prom-2.c: Same.
      	* gcc.dg/pr15698-1.c: Same.
      	* gcc.dg/pr20368-1.c: Same.
      	* gcc.dg/dremf-type-compat-3.c: Same.
      	* gcc.dg/builtins-30.c: Same.  Test for columns.
      gcc/objcp/
      	* objcp-decl.h (c_end_compound_stmt): New argument.
      	* objcp-decl.c (objcp_start_struct): Add argument.
      	(objcp_finish_struct): Same.
      gcc/cp/
      	* typeck.c (cp_build_binary_op): Pass location to overflow_warning.
      	(build_modify_expr): New arg.
      	* semantics.c (finish_unary_op_expr): Pass location to
      	overflow_warning.
      	(handle_omp_for_class_iterator): Pass location to build_modify_expr.
      	* typeck.c (cxx_sizeof_or_alignof_type): Pass location to
      	c_sizeof_or_alignof_type.
      	(build_array_ref): New argument.
      	(build_compound_expr): Same.
      	(build_const_cast): Same.
      	(build_ptrmemfunc): Pass location to build_c_cast.
      	* init.c (avoid_placement_new_aliasing): Pass location to
      	build_stmt.
      	(build_vec_delete_1): Pass location to cp_build_modify_expr,
      	build_compound_expr.
      	* class.c (build_vtbl_ref_1): Pass location to build_array_ref.
      	* decl.c (poplevel): Pass location to c_build_bind_expr.
      	(finish_case_label): Pass location to build_case_label.
      	(finish_constructor_body): Same.
      	(finish_destructor_body): Pass location to build_stmt.
      	(cxx_maybe_build_cleanup): Same, but to build_compound_expr.
      	* call.c (build_new_op): Pass location to build_array_ref.
      	(build_x_va_arg): Pass location to build_va_arg.
      	* except.c (expand_end_catch_block): Pass location to
      	build_stmt.
      	* cp-tree.h (build_array_ref): New argument.
      	(build_compound_expr): Same.
      	(build_c_cast): Same.
      	* cp-gimplify.c (gimplify_if_stmt): Pass location on down.
      	(gimplify_switch_stmt): Same.
      	* typeck2.c (split_nonconstant_init_1): Same.
      	* pt.c (tsubst_copy): Same.
      	* semantics.c (add_decl_expr): Same.
      	(do_poplevel): Same.
      	(push_cleanup): Same.
      	(finish_goto_stmt): Same.
      	(finish_expr_stmt): Same.
      	(begin_if_stmt): Same.
      	(begin_while_stmt): Same.
      	(begin_do_stmt): Same.
      	(finish_return_stmt): Same.
      	(begin_for_stmt): Same.
      	(finish_break_stmt): Same.
      	(finish_continue_stmt): Same.
      	(begin_switch_stmt): Same.
      	(begin_try_block): Same.
      	(begin_handler): Same.
      	(finish_asm_stmt): Same.
      	(finish_label_stmt): Same.
      	(finish_stmt_expr_expr): Same.
      	(finalize_nrv_r): Same.
      	(finish_omp_atomic): Same.
      	* name-lookup.c (do_using_directive): Same.
      	* decl2.c (grok_array_decl): Same.
      	* parser.c (cp_parser_cast_expression): Same.
      	(cp_parser_selection_statement): Same.
      	(cp_parser_implicitly_scoped_statement): Same.
      	(cp_parser_objc_selector_expression): Same.
      	(cp_parser_objc_synchronized_statement): Same.
      	(cp_parser_objc_throw_statement): Same.
      	(cp_parser_omp_critical): Same.
      	(cp_parser_omp_master): Same.
      	* typeck.c (build_function_call): Add location argument.
      	* init.c: Add location argument to all build_decl calls.
      	* class.c: Same.
      	* method.c: Same.
      	* rtti.c: Same.
      	* tree.c: Same.
      	* pt.c: Same.
      	* semantics.c: Same.
      	* lex.c: Same.
      	* decl2.c: Same.
      	* cp-gimplify.c: Same.
      	* decl.c: Same.
      	(cp_make_fname_decl): Add location argument.  Pass location ot
      	build_decl.
      	(finish_case_label): Same.
      	* cp-tree.h (finish_case_label): Add location argument.
      	* parser.c (cp_parser_label_for_labeled_statement): Pass location to
      	finish_case_label.
      gcc/fortran/
      	* trans-array.c (gfc_trans_allocate_array_storage): Pass
      	location on down.
      	(gfc_trans_array_constructor_value): Same.
      	(gfc_trans_scalarized_loop_end): Same.
      	(gfc_conv_ss_startstride): Same.
      	(gfc_trans_g77_array): Same.
      	(gfc_trans_dummy_array_bias): Same.
      	(gfc_conv_array_parameter): Same.
      	(structure_alloc_comps): Same.
      	* trans-expr.c (gfc_conv_function_call): Same.
      	(fill_with_spaces): Same.
      	(gfc_trans_string_copy): Same.
      	(gfc_trans_scalar_assign): Same.
      	* trans-stmt.c (gfc_trans_goto): Same.
      	(gfc_trans_if_1): Same.
      	(gfc_trans_simple_do): Same.
      	(gfc_trans_do): Same.
      	(gfc_trans_do_while): Same.
      	(gfc_trans_logical_select): Same.
      	(gfc_trans_select): Same.
      	(gfc_trans_forall_loop): Same.
      	(gfc_trans_nested_forall_loop): Same.
      	(generate_loop_for_temp_to_lhs): Same.
      	(generate_loop_for_rhs_to_temp): Same.
      	(gfc_trans_forall_1): Same.
      	(gfc_trans_where_assign): Same.
      	(gfc_trans_where_3): Same.
      	(gfc_trans_allocate): Same.
      	* trans.c (gfc_finish_block): Same.
      	(gfc_trans_runtime_check): Same.
      	(gfc_call_malloc): Same.
      	(gfc_allocate_with_status): Same.
      	(gfc_call_free): Same.
      	(gfc_deallocate_with_status): Same.
      	(gfc_call_realloc): Same.
      	(gfc_trans_code): Same.
      	* trans-decl.c (gfc_init_default_dt): Same.
      	(gfc_generate_constructors): Same.
      	* trans-io.c (gfc_trans_io_runtime_check): Same.
      	* trans-intrinsic.c (gfc_conv_intrinsic_ctime): Same.
      	(gfc_conv_intrinsic_fdate): Same.
      	(gfc_conv_intrinsic_ttynam): Same.
      	(gfc_conv_intrinsic_minmax): Same.
      	(gfc_conv_intrinsic_minmax_char): Same.
      	(gfc_conv_intrinsic_anyall): Same.
      	(gfc_conv_intrinsic_count): Same.
      	(gfc_conv_intrinsic_arith): Same.
      	(gfc_conv_intrinsic_minmaxloc): Same.
      	(gfc_conv_intrinsic_minmaxval): Same.
      	(gfc_conv_intrinsic_rrspacing): Same.
      	(gfc_conv_intrinsic_array_transfer): Same.
      	(gfc_conv_intrinsic_trim): Same.
      	(gfc_conv_intrinsic_repeat): Same.
      
      From-SVN: r148442
      Aldy Hernandez committed
  19. 09 Jun, 2009 1 commit
    • targhooks.c (default_builtin_vectorized_function): Change fn parameter to unsigned int. · 744aa42f
      ./:	* targhooks.c (default_builtin_vectorized_function): Change fn
      	parameter to unsigned int.
      	(default_builtin_vectorized_conversion): Change code parameter to
      	unsigned int.
      	(default_builtin_reciprocal): Change fn parameter to unsigned int.
      	* targhooks.h: Update declarations.
      	* config/rs6000/rs6000.c (rs6000_builtin_conversion): Change code
      	parameter to unsigned int.
      
      	* c-typeck.c (comptypes_check_enum_int): New static function.
      	(comptypes_internal): Add enum_and_int_p parameter.  Change all
      	callers.
      	(comp_target_types): Add location parameter.  Change all callers.
      	(tagged_types_tu_compatible_p): Add enum_and_int_p parameter.
      	Change all callers.
      	(function_types_compatible_p, type_lists_compatible_p): Likewise.
      	(build_conditional_expr): Add colon_loc parameter.  Change all
      	callers.
      	(convert_for_assignment): Add location parameter.  Change all
      	callers.
      	* c-parser.c (c_parser_conditional_expression): Pass location of
      	colon to build_conditional_expr.
      	* c-tree.h (build_conditional_expr): Update declaration.
      objc/:
      	* objc-act.c (objc_gimplify_expr): Change return type to int.
      	* objc-act.h: Update declaration.
      testsuite/:
      	* gcc.dg/Wcxx-compat-12.c: New testcase.
      
      From-SVN: r148325
      Ian Lance Taylor committed
  20. 29 May, 2009 1 commit
    • builtins.c (validate_gimple_arglist): Don't use va_arg with enum type. · 72b5577d
      ./:	* builtins.c (validate_gimple_arglist): Don't use va_arg with
      	enum type.
      	* calls.c (emit_library_call_value_1): Likewise.
      
      	* c-typeck.c (c_build_va_arg): New function.
      	* c-tree.h (c_build_va_arg): Declare.
      	* c-parser.c (c_parser_postfix_expression): Call c_build_va_arg
      	instead of build_va_arg.
      cp/:
      	* error.c (cp_printer): Don't use va_arg with enum type.
      testsuite/:
      	* gcc.dg/Wcxx-compat-11.c: New testcase.
      
      From-SVN: r147989
      Ian Lance Taylor committed
  21. 11 May, 2009 1 commit
    • basic-block.h (enum profile_status): Break out of struct control_flow_graph. · 24b97832
      ./:	* basic-block.h (enum profile_status): Break out of struct
      	control_flow_graph.
      	* cgraph.h (struct inline_summary): Break out of struct
      	cgraph_local_info.
      	* cgraphunit.c (enum cgraph_order_sort_kind): New enum, broken out
      	of struct cgraph_order_sort.
      	* combine.c (enum undo_kind): New enum, broken out of struct
      	undo.
      	* cse.c (struct branch_path): Break out of struct
      	cse_basic_block_data.
      	* except.h (enum eh_region_type): Break out of struct eh_region.
      	* gcc.c (enum add_del): Break out of struct modify_target.
      	* genrecog.c (enum decision_type): Break out of struct
      	decision_test.
      	* ggc-page.c (struct ggc_pch_ondisk): Break out of struct
      	ggc_pch_data.
      	* matrix-reorg.c (struct free_info): Break out of struct
      	matrix_info.
      	* regmove.c (enum match_use): New enum, broken out of struct
      	match.
      	* sched-int.h (enum post_call_group): New enum, broken out of
      	struct deps.
      	(struct deps_reg): Break out of struct deps.
      	* target.h (struct asm_int_op): Break out of struct gcc_target.
      	* tree-eh.c (struct goto_queue_node): Break out of struct
      	leh_tf_state.
      	* tree-inline.h (enum copy_body_cge_which): Break out of
      	copy_body_data.
      	* tree-pass.h (enum opt_pass_type): Break out of struct opt_pass.
      
      	* c-decl.c (in_struct, struct_types): New static variables.
      	(pushtag): Add loc parameter.  Change all callers.
      	(lookup_tag): Add ploc parameter.  Change all callers.
      	(check_compound_literal_type): New function.
      	(parser_xref_tag): Add loc parameter.  Change all callers.  If
      	-Wc++-compat, warn about struct/union/enum types defined within a
      	struct or union.
      	(start_struct): Add enclosing_in_struct, enclosing_struct_types,
      	and loc parameters.  Change all callers.  Change error calls to
      	error_at, using loc.  For a redefinition, if the location of the
      	original definition is known, report it.  Set in_struct and
      	struct_types.  If -Wc++-compat warn if in sizeof, typeof, or
      	alignof.
      	(finish_struct): Add new parameters enclosing_in_struct and
      	enclosing_struct_types.  Change all callers.  Set
      	C_TYPE_DEFINED_IN_STRUCT for all struct/union/enum types defined
      	in the struct.  If in a struct, add this struct to struct_types.
      	(start_enum): Add loc parameter.  Change all callers.  Use
      	error_at for errors, using loc.  For a redefinition, if the
      	location of the original definition is known, report it.  If in a
      	struct, add this enum type to struct_types.  If -Wc++-compat warn
      	if in sizeof, typeof, or alignof.
      	* c-parser.c (disable_extension_diagnostics): Disable
      	-Wc++-compat.
      	(enable_extension_diagnostics): Reenable -Wc++-compat if
      	appropriate.
      	(c_parser_enum_specifier): Get enum location for start_enum.
      	(c_parser_struct_or_union_specifier): Get struct location for
      	start_struct.  Save in_struct and struct_types status between
      	start_struct and finish_struct.
      	(c_parser_cast_expression): Get location of cast.
      	(c_parser_alignof_expression): Get location of type.
      	(c_parser_postfix_expression): Likewise.
      	(c_parser_postfix_expression_after_paren_type): Add type_loc
      	parameter.  Change all callers.  Call
      	check_compound_literal_type.  Use type_loc for error about
      	variable size type.
      	* c-typeck.c (build_external_ref): If -Wc++-compat, warn about a
      	use of an enum constant from an enum type defined in a struct or
      	union.
      	(c_cast_expr): Add loc parameter.  Change all callers.  If
      	-Wc++-compat, warn about defining a type in a cast.
      	* c-tree.h (C_TYPE_DEFINED_IN_STRUCT): Define.
      	(start_enum, start_struct, finish_struct): Update declarations.
      	(parser_xref_tag, c_cast_expr): Update declarations.
      	(check_compound_literal_type): Declare.
      fortran/:
      	* gfortran.h (enum gfc_omp_sched_kind): New enum, broken out of
      	gfc_omp_clauses.
      	(enum gfc_omp_default_sharing): Likewise.
      	* module.c (enum gfc_rsym_state): New enum, broken out of
      	pointer_info.
      	(enum gfc_wsym_state): Likewise.
      	* parse.c (enum state_order): New enum, broken out of st_state.
      objc/:
      	* objc-act.c (objc_building_struct): New static variable.
      	(objc_in_struct, objc_struct_types): New static variables.
      	(objc_start_struct, objc_finish_struct): New static functions.
      	(generate_struct_by_value_array): Call objc_start_struct instead
      	of start_struct, and call objc_finish_struct instead of
      	finish_struct.
      	(objc_build_struct, build_objc_symtab_template): Likewise.
      	(build_module_descriptor): Likewise.
      	(build_next_objc_exception_stuff): Likewise.
      	(build_protocol_template): Likewise.
      	(build_method_prototype_list_template): Likewise.
      	(build_method_prototype_template): Likewise.
      	(build_category_template, build_selector_template): Likewise.
      	(build_class_template, build_super_template): Likewise.
      	(build_ivar_template, build_ivar_list_template): Likewise.
      	(build_method_list_template): Likewise.
      	(build_method_template): Likewise.
      objcp/:
      	* objcp-decl.h (start_struct): Add three new, ignored, macro
      	parameters.
      	(finish_struct): Add two new, ignored, macro parameters.
      testsuite/:
      	* gcc.dg/Wcxx-compat-7.c: New testcase.
      	* gcc.dg/Wcxx-compat-8.c: New testcase.
      	* gcc.dg/c99-tag-1.c: Recognize new "originally defined here"
      	notes
      	* gcc.dg/pr17188-1.c: Likewise.
      	* gcc.dg/pr39084.c: Likewise.
      
      From-SVN: r147358
      Ian Lance Taylor committed
  22. 26 Apr, 2009 1 commit
    • re PR c/39556 (statics in C99 inline functions later declared extern) · 991d6621
      	PR c/39556
      	* c-tree.h (enum c_inline_static_type): New.
      	(record_inline_static): Declare.
      	* c-decl.c (struct c_inline_static, c_inline_statics,
      	record_inline_static, check_inline_statics): New.
      	(pop_file_scope): Call check_inline_statics.
      	(start_decl): Call record_inline_static instead of pedwarning
      	directly for static in inline function.
      	* c-typeck.c (build_external_ref): Call record_inline_static
      	instead of pedwarning directly for static referenced in inline
      	function.
      
      testsuite:
      	* gcc.dg/inline-34.c: New test.
      
      From-SVN: r146800
      Joseph Myers committed
  23. 22 Apr, 2009 1 commit
    • hashtab.h: Update GTY annotations to new syntax · d1b38208
      2009-04-21  Taras Glek <tglek@mozilla.com>
      
      	* include/hashtab.h: Update GTY annotations to new syntax
      	* include/splay-tree.h: Likewise
      
      
      gcc/ChangeLog
      
      2009-04-21  Taras Glek <tglek@mozilla.com>
      
      	* alias.c: Update GTY annotations to new syntax
      	* basic-block.h: Likewise
      	* bitmap.h: Likewise
      	* c-common.h: Likewise
      	* c-decl.c: Likewise
      	* c-parser.c: Likewise
      	* c-pragma.c: Likewise
      	* c-tree.h: Likewise
      	* cfgloop.h: Likewise
      	* cgraph.h: Likewise
      	* config/alpha/alpha.c: Likewise
      	* config/arm/arm.h: Likewise
      	* config/avr/avr.h: Likewise
      	* config/bfin/bfin.c: Likewise
      	* config/cris/cris.c: Likewise
      	* config/darwin.c: Likewise
      	* config/frv/frv.c: Likewise
      	* config/i386/i386.c: Likewise
      	* config/i386/i386.h: Likewise
      	* config/i386/winnt.c: Likewise
      	* config/ia64/ia64.h: Likewise
      	* config/iq2000/iq2000.c: Likewise
      	* config/mips/mips.c: Likewise
      	* config/mmix/mmix.h: Likewise
      	* config/pa/pa.c: Likewise
      	* config/pa/pa.h: Likewise
      	* config/rs6000/rs6000.c: Likewise
      	* config/s390/s390.c: Likewise
      	* config/sparc/sparc.c: Likewise
      	* config/xtensa/xtensa.c: Likewise
      	* cselib.h: Likewise
      	* dbxout.c: Likewise
      	* dwarf2out.c: Likewise
      	* except.c: Likewise
      	* except.h: Likewise
      	* fixed-value.h: Likewise
      	* function.c: Likewise
      	* function.h: Likewise
      	* gimple.h: Likewise
      	* integrate.c: Likewise
      	* optabs.c: Likewise
      	* output.h: Likewise
      	* real.h: Likewise
      	* rtl.h: Likewise
      	* stringpool.c: Likewise
      	* tree-data-ref.c: Likewise
      	* tree-flow.h: Likewise
      	* tree-scalar-evolution.c: Likewise
      	* tree-ssa-address.c: Likewise
      	* tree-ssa-alias.h: Likewise
      	* tree-ssa-operands.h: Likewise
      	* tree.c: Likewise
      	* tree.h: Likewise
      	* varasm.c: Likewise
      	* varray.h: Likewise
      	* vec.h: Likewise
      	* coretypes.h: Do not define GTY macro if it is already defined
      	* doc/gty.texi: Update GTY documentation to new syntax
      	* gengtype-lex.l: Enforce attribute-like syntax for GTY annotations on structs
      	* gengtype-parse.c: Likewise
      
      
      gcc/ada/ChangeLog
      
      2009-04-21  Taras Glek <tglek@mozilla.com>
      
      	* gcc-interface/ada-tree.h: Update GTY annotations to new syntax
      	* gcc-interface/trans.c: Likewise
      	* gcc-interface/utils.c: Likewise
      
      
      gcc/cp/ChangeLog
      
      2009-04-21  Taras Glek <tglek@mozilla.com>
      
      	* cp-tree.h: Update GTY annotations to new syntax
      	* decl.c: Likewise
      	* mangle.c: Likewise
      	* name-lookup.c: Likewise
      	* name-lookup.h: Likewise
      	* parser.c: Likewise
      	* pt.c: Likewise
      	* rtti.c: Likewise
      	* semantics.c: Likewise
      	* typeck2.c: Likewise
      
      
      gcc/fortran/ChangeLog
      
      2009-04-21  Taras Glek <tglek@mozilla.com>
      
      	* f95-lang.c: Update GTY annotations to new syntax
      	* trans-intrinsic.c: Likewise
      	* trans-io.c: Likewise
      	* trans.h: Likewise
      
      
      gcc/java/ChangeLog
      
      2009-04-21  Taras Glek <tglek@mozilla.com>
      
      	* builtins.c: Update GTY annotations to new syntax
      	* decl.c: Likewise
      	* java-tree.h: Likewise
      	* jcf.h: Likewise
      	* lang.c: Likewise
      
      
      gcc/objc/ChangeLog
      
      2009-04-21  Taras Glek <tglek@mozilla.com>
      
      	* objc-act.c: Update GTY annotations to new syntax
      	* objc-act.h: Likewise
      
      
      libcpp/ChangeLog
      
      2009-04-21  Taras Glek <tglek@mozilla.com>
      
      	* include/cpp-id-data.h: Update GTY annotations to new syntax
      	* include/cpplib.h: Likewise
      	* include/line-map.h: Likewise
      	* include/symtab.h: Likewise
      
      From-SVN: r146607
      Taras Glek committed
  24. 20 Apr, 2009 1 commit
    • Fix enum conversions which are invalid in C++: · bbbbb16a
      gcc/:
      	Fix enum conversions which are invalid in C++:
      	* auto-inc-dec.c (attempt_change): Change 0 to SET in function
      	call.
      	* calls.c (store_one_arg): Change 0 to EXPAND_NORMAL in function
      	call.
      	* cse.c (hash_rtx_cb): Change 0 to VOIDmode in function call.
      	* dbgcnt.c (dbg_cnt_set_limit_by_name): Add cast to enum type.
      	* dbxout.c (dbxout_symbol): Change 0 to VOIDmode in function
      	call.
      	(dbxout_parms): Likewise.
      	* df-core.c (df_set_flags): Change changeable_flags parameter to
      	int.
      	(df_clear_flags): Likewise.
      	* df-problems.c (df_rd_bb_local_compute_process_def): Change
      	top_flag parameter to int.
      	(df_chain_create_bb_process_use): Likewise.
      	(df_chain_add_problem): Change chain_flags parameter to unsigned
      	int.  Remove cast.
      	* df-scan.c (df_ref_create): Change ref_flags parameter to int.
      	(df_ref_create_structure, df_def_record_1): Likewise.
      	(df_defs_record, df_uses_record, df_get_call_refs): Likewise.
      	(df_notes_rescan): Change 0 to VOIDmode in function call.
      	(df_get_call_refs, df_insn_refs_collect): Likewise.
      	(df_bb_regs_collect): Likewise.
      	(df_entry_block_defs_collect): Likewise.
      	(df_exit_block_uses_collect): Likewise.
      	* df.h: Update declarations.
      	* double-int.c (double_int_divmod): Add cast to enum type.
      	* dse.c (replace_inc_dec): Reverse parameters to gen_int_mode.
      	* dwarf2out.c (new_reg_loc_descr): Add casts to enum type.
      	(based_loc_descr): Likewise.
      	(loc_descriptor_from_tree_1): Change first_op and second_op to
      	enum dwarf_location_atom.  Add cast to enum type.
      	* expmed.c (init_expmed): Change 0 to SET in function call.
      	* expr.c (init_expr_target): Change 0 to VOIDmode in function
      	call.
      	(expand_expr_real_1): Change 0 to EXPAND_NORMAL in function call.
      	(do_store_flag): Likewise.
      	* fixed-value.h (struct fixed_value): Change mode to enum
      	machine_mode.
      	* function.c (assign_parms): Change 0 to VOIDmode in function
      	call.
      	* genautomata.c (insert_automaton_decl): Change 1 to INSERT in
      	function call.
      	(insert_insn_decl, insert_decl, insert_state): Likewise.
      	(automata_list_finish): Likewise.
      	* genrecog.c (process_define_predicate): Add cast to enum type.
      	* gensupport.c (init_predicate_table): Add cast to enum type.
      	* gimple.c (gimple_build_return): Change 0 to ERROR_MARK in
      	function call.
      	(gimple_build_call_1, gimple_build_label): Likewise.
      	(gimple_build_goto, gimple_build_asm_1): Likewise.
      	(gimple_build_switch_1, gimple_build_cdt): Likewise.
      	* gimple.h (GIMPLE_CHECK): Change 0 to ERROR_MARK in function
      	call.
      	(enum fallback): Rename from enum fallback_t.
      	(fallback_t): Typedef as int.
      	* gimple-low.c (lower_builtin_setjmp): Change TSI_SAME_STMT to
      	GSI_SAME_STMT in function call.
      	* ira.c (setup_class_subset_and_memory_move_costs): Add casts to
      	enum type.
      	(setup_reg_class_relations): Likewise.
      	(setup_reg_class_nregs): Change cl to int.  Add casts to enum
      	type.
      	(setup_prohibited_class_mode_regs): Add cast to enum type.
      	(setup_prohibited_mode_move_regs): Likewise.
      	* ira-costs.c (record_reg_classes): Change rclass to enum
      	reg_class.
      	(record_address_regs): Change i to enum reg_class.
      	* lists.c (alloc_EXPR_LIST): Add cast to enum type.
      	* machmode.h (GET_MODE_CLASS): Cast value to enum mode_class.
      	(GET_MODE_WIDER_MODE): Cast value to enum machine_mode.
      	(GET_MODE_2XWIDER_MODE): Likewise.
      	(GET_CLASS_NARROWEST_MODE): Likewise.
      	* omp-low.c (expand_omp_for): Add cast to enum type.
      	* optabs.c (debug_optab_libfuncs): Add casts to enum type.
      	* opts.c (enable_warning_as_error): Change kind to diagostic_t.
      	* postreload.c (reload_cse_simplify_operands): Change rclass local
      	to enum reg_class.
      	* predict.c (combine_predictions_for_insn): Change best_predictor
      	and predictor to enum br_predictor.
      	(combine_predictions_for_bb): Likewise.
      	(build_predict_expr): Change assignment to PREDICT_EXPR_OUTCOME to
      	use SET_PREDICT_EXPR_OUTCOME.
      	* real.c (real_arithmetic): Change icode to code in function
      	call.
      	* reginfo.c (init_move_cost): Add casts to enum type.
      	(init_reg_sets_1, init_fake_stack_mems): Likewise.
      	* regmove.c (regclass_compatible_p): Change class0 and class1 to
      	enum reg_class.
      	* reload.c (find_valid_class): Add casts to enum type.
      	(push_reload): Change 0 to NO_REGS in function call.
      	(find_reloads): Change this_alternative to array of enum
      	reg_class.  Remove some now-unnecessary casts.
      	(make_memloc): Change 0 to VOIDmode in function call.
      	* reload1.c (reload): Change 0 to VOIDmode in function call.
      	(eliminate_regs_1, elimination_effects): Likewise.
      	(eliminate_regs_in_insn): Likewise.
      	(emit_input_reload_insns): Add cast to enum type.
      	(delete_output_reload): Change 0 to VOIDmode in function call.
      	* reorg.c (insn_sets_resource_p): Convert include_delayed_effects
      	to enum type in function call.
      	* tree.h (PREDICT_EXPR_OUTCOME): Add cast to enum type.
      	(SET_PREDICT_EXPR_OUTCOME): Define.
      	* tree-dump.c (get_dump_file_info): Change phase parameter to
      	int.
      	(get_dump_file_name, dump_begin, dump_enabled_p): Likewise.
      	(dump_initialized_p, dump_flag_name, dump_end): Likewise.
      	(dump_function): Likewise.
      	* tree-dump.h: Update declarations.
      	* tree-pass.h: Update declarations.
      	* varasm.c (assemble_integer): Change mclass to enum mode_class.
      	* config/arm/arm.c (thumb_legitimize_reload_address): Add cast to
      	enum type.
      	(arm_rtx_costs_1): Correct parenthesization.
      	(arm_rtx_costs): Add casts to enum type.
      	(adjacent_mem_locations): Reverse arguments to const_ok_for_op.
      	(vfp_emit_fstmd): Use add_rg_note.
      	(emit_multi_reg_push, emit_sfm): Likewise.
      	(thumb_set_frame_pointer): Likewise.
      	(arm_expand_prologue): Likewise.
      	(arm_regno_class): Change return type to enum reg_class.
      	(thumb1_expand_prologue): Use add_reg_note.
      	* config/arm/arm-protos.h (arm_regno_class): Update declaration.
      	* config/arm/arm.h (INITIALIZE_TRAMPOLINE): Change 0 to LCT_NORMAL
      	in function call.
      	* config/arm/gentune.sh: Add cast to enum type.
      	* config/arm/arm-tune.md: Rebuild.
      	* config/i386/i386.c (ix86_expand_prologue): Use add_reg_note.
      	(ix86_split_fp_branch, predict_jump): Likewise.
      	(ix86_expand_multi_arg_builtin): Change sub_code from enum
      	insn_code to enum rtx_code.
      	(ix86_builtin_vectorized_function): Add cast to enum type.
      	* config/i386/i386.md (truncdfsf2): Change slot to enum
      	ix86_stack_slot.
      	(truncxf<mode>2, isinf<mode>2): Likewise.
      	* config/i386/i386-c.c (ix86_pragma_target_parse): Add cast to
      	enum type.
      	* config/ia64/ia64.c (ia64_split_tmode_move): Use add_reg_note.
      	(spill_restore_mem, do_spill, ia64_expand_prologue): Likewise.
      	(insert_bundle_state): Change 1 to INSERT in function call.
      	(ia64_add_bundle_selector_before): Likewise.
      	* config/ia64/ia64.md (cpu attr): Add cast to enum type.
      	(save_stack_nonlocal): Change 0 to LCT_NORMAL in function call.
      	(restore_stack_nonlocal): Likewise.
      	* config/mips/mips.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in
      	function call.
      	* config/mips/mips.c (mips_binary_cost): Change 0 to SET in
      	function call.
      	(mips_rtx_costs): Likewise.
      	(mips_override_options): Add casts to enum type.
      	* config/mips/sdemtk.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL
      	in function call.
      	* config/pa/pa.c (legitimize_pic_address): Use add_reg_note.
      	(store_reg, set_reg_plus_d): Likewise.
      	(hppa_expand_prologue, hppa_profile_hook): Likewise.
      	* config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Add
      	cast to enum type.
      	(altivec_expand_vec_set_builtin): Change 0 to EXPAND_NORMAL in
      	function call.
      	(emit_unlikely_jump): Use add_reg_note.
      	(rs6000_emit_allocate_stack): Likewise.
      	(rs6000_frame_related, rs6000_emit_prologue): Likewise.
      	(output_toc): Change 1 to INSERT in function call.
      	(output_profile_hook): Change 0 to LCT_NORMAL in function call.
      	(rs6000_initialize_trampoline): Likewise.
      	(rs6000_init_dwarf_reg_sizes_extra): Change 0 to EXPAND_NORMAL in
      	function call.
      	* config/s390/s390.c (s390_rtx_costs): Add cast to enum type.
      	(s390_expand_movmem): Change 0 to OPTAB_DIRECT in function call.
      	(s390_expand_setmem, s390_expand_cmpmem): Likewise.
      	(save_gprs): Use add_reg_note.
      	(s390_emit_prologue): Likewise.
      	(s390_expand_builtin): Change 0 to EXPAND_NORMAL in function
      	call.
      	* config/sparc/sparc.c (sparc_expand_prologue): Use add_reg_note.
      	(sparc_fold_builtin): Add cast to enum type.
      	* config/spu/spu.c (spu_emit_branch_or_set): Change ior_code to
      	enum insn_code.
      	(spu_expand_prologue): Use add_reg_note.
      	(expand_builtin_args): Change 0 to EXPAND_NORMAL in function
      	call.
      
      	* c-parser.c (c_parser_attributes): Change VEC back to tree list.
      	(c_parser_postfix_expression_after_primary): Get VEC for list of
      	arguments.  Get original types of arguments.  Call
      	build_function_call_vec.
      	(cached_expr_list_1, cached_expr_list_2): New static variables.
      	(c_parser_expr_list): Change return type to VEC *.  Add
      	p_orig_types parameter.  Change all callers.
      	(c_parser_release_expr): New static function.
      	(c_parser_vec_to_tree_list): New static function.
      	* c-typeck.c (build_function_call): Rewrite to build a VEC and
      	call build_function_call_vec.
      	(build_function_call_vec): New function, based on old
      	build_function_call.
      	(convert_arguments): Remove nargs and argarray parameters.  Change
      	values to a VEC.  Add origtypes parameter.
      	(build_modify_expr): Add rhs_origtype parameter.  Change all
      	callers.
      	(convert_for_assignment): Add origtype parameter.  Change all
      	callers.  If warn_cxx_compat, check for conversion to an enum
      	type when calling a function.
      	(store_init_value): Add origtype parameter.  Change all callers.
      	(digest_init): Likewise.
      	(struct init_node): Add origtype field.
      	(add_pending_init): Add origtype parameter.  Change all callers.
      	(output_init_element): Likewise.
      	(output_pending_init_elements): Pass origtype from init_node to
      	output_init_element.
      	(process_init_elemnt): Pass origtype from c_expr to
      	output_init_element.
      	(c_finish_return): Add origtype parameter.  Change all callers.
      	* c-common.c (sync_resolve_size): Change params to VEC *.  Change
      	caller.
      	(sync_resolve_params): Likewise.
      	(sync_resolve_return): Change params to first_param.  Change
      	caller.
      	(resolve_overloaded_builtins): Change params to VEC *.  Change
      	callers.   Save first parameter around call to
      	build_function_call_vec.
      	* c-decl.c (finish_decl): Add origtype parameter.  Change all
      	callers.  Call build_function_call_vec rather than
      	build_function_call for cleanup.
      	* c-tree.h: Update declarations.
      	* c-common.h: Update declarations.
      	* stub-objc.c (objc_rewrite_function_call): Change parameter from
      	params to first_param.
      	* target.h (struct gcc_target): Change resolve_overloaded_builtin
      	params parameter from tree to void *.
      	* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
      	Change arglist parameter to have type void *, and to be a pointer
      	to a VEC.
      	* config/rs6000/rs6000-protos.h
      	(altivec_resolve_overloaded_builtin): Update declaration.
      	* config/spu/spu-c.c (spu_resolved_overloaded_builtin): Change
      	fnargs parameter to have type void *, and to be a pointer to a
      	VEC.  Call build_function_call_vec instead of
      	build_function_call.
      	* config/spu/spu-protos.h (spu_expand_builtin): Update
      	declaration.
      
      gcc/cp/:
      	* typeck.c (build_function_call_vec): New function.
      	(cp_build_function_call): Only pass first parameter to
      	objc_rewrite_function_call.
      	(build_modify_expr): Add rhs_origtype parameter.  Change all
      	callers.
      	* decl.c (finish_decl): Add origtype parameter.  Change all
      	callers.
      	* semantics.c (finish_call_expr): Pass VEC to
      	resolve_overloaded_builtin.
      
      gcc/objc:
      	* objc-act.c (objc_rewrite_function_call): Change parameter from
      	params to first_param.  Change all callers.
      
      gcc/testsuite:
      	* gcc.dg/Wcxx-compat-3.c: New testcase.
      
      From-SVN: r146451
      Ian Lance Taylor committed
  25. 15 Apr, 2009 1 commit
    • c.opt (Wenum-compare): Enable for C and Objc. · 6866c6e8
      gcc/:
      	* c.opt (Wenum-compare): Enable for C and Objc.  Initialize to -1.
      	* c-opts.c (c_common_handle_option): For C, set warn_enum_compare
      	for -Wall and for -Wc++-compat.
      	(c_common_post_options): For C++, set warn_enum_compare if not
      	already set.
      	* c-tree.h (struct c_expr): Add field original_type.
      	(build_external_ref): Update declaration.
      	* c-parser.c (c_parser_braced_init): Set original_type.
      	(c_parser_initelt): Likewise.
      	(c_parser_expr_no_commas): Likewise.
      	(c_parser_conditional_expression): Likewise.
      	(c_parser_cast_expression): Likewise.
      	(c_parser_unary_expression): Likewise.  Pull setting of
      	original_code to top of function.
      	(c_parser_sizeof_expression): Set original_type.
      	(c_parser_alignof_expression): Likewise.
      	(c_parser_postfix_expression): Likewise.  Pull setting of
      	original_code to top of function.
      	(c_parser_postfix_expression_after_paren_type): Set
      	original_type.
      	(c_parser_postfix_expression_after_primary): Likewise.
      	(c_parser_expression): Likewise.
      	* c-typeck.c (build_external_ref): Add type parameter.  Change all
      	callers.
      	(c_expr_sizeof_expr): Set original_type field.
      	(parser_build_unary_op): Likewise.
      	(parser_build_binary_op): Likewise.  Optionally warn about
      	comparisons of enums of different types.
      	(digest_init): Set original_type field.
      	(really_start_incremental_init): Likewise.
      	(push_init_level, pop_init_level): Likewise.
      	* doc/invoke.texi (Warning Options): -Wenum-compare now
      	supported in C.
      gcc/testsuite/:
      	* gcc.dg/Wenum-compare-1.c: New testcase.
      
      From-SVN: r146127
      Ian Lance Taylor committed
  26. 29 Mar, 2009 2 commits
    • re PR preprocessor/34695 (Preprocessor warning->error conversion from -Werror is silent) · 148e4216
      	PR preprocessor/34695
      
      gcc:
      	* Makefile.in (c-opts.o): Depend on c-tree.h.
      	* c-common.c: Move down include of diagnostic.h.
      	(done_lexing, c_cpp_error): New.
      	* c-common.h (done_lexing): Declare.
      	* c-decl.c (c_write_global_declarations): Don't check cpp_errors
      	(parse_in).
      	* c-opts.c: Include c-tree.h.
      	(c_common_init_options): Set preprocessor error callback.
      	(c_common_handle_option): Do not set preprocessor
      	inhibit_warnings, warnings_are_errors, warn_system_headers,
      	pedantic_errors or inhibit_warnings flags.
      	(c_common_post_options): Do not check cpp_errors (parse_in).
      	(c_common_finish): Do not output dependencies if there were
      	errors.  Do not check return value of cpp_finish.
      	* c-ppoutput.c (pp_file_change): Set input_location.
      	* c-tree.h (c_cpp_error): Declare.
      	* diagnostic.c (diagnostic_set_info_translated): Also initialize
      	override_column.
      	(diagnostic_build_prefix): Check override_column.
      	* diagnostic.h (diagnostic_info): Add override_column field.
      	(diagnostic_override_column): Define.
      
      gcc/cp:
      	* cp-tree.h (cp_cpp_error): Remove.
      	* error.c (cp_cpp_error): Remove.
      	* parser.c (cp_lexer_new_main): Set done_lexing instead of
      	client_diagnostic and error callback.
      
      gcc/fortran:
      	* cpp.c (cb_cpp_error): New.
      	(gfc_cpp_post_options): Don't set cpp_option->inhibit_warnings.
      	Don't check cpp_errors (cpp_in).
      	(gfc_cpp_init_0): Set cb->error.
      
      gcc/testsuite:
      	* gcc.dg/builtin-redefine.c, gcc.dg/cpp/redef2.c,
      	gcc.dg/cpp/redef3.c, gcc.dg/cpp/trad/redef2.c: Use dg-message
      	instead of dg-warning for "previous definition" messages.
      	* gcc.dg/cpp/Wvariadic-1.c, gcc.dg/cpp/Wvariadic-3.c: Expect
      	"warnings being treated as errors" message.
      	* gcc.dg/fltconst-1.c: Use -fshow-column.
      
      libcpp:
      	* makedepend.c: Remove.
      	* Makefile.in (makedepend_OBJS, makedepend$(EXEEXT)): Remove.
      	(all, clean, TAGS_SOURCES, include): Remove makedepend handling.
      	* directives.c (cpp_errors): Remove.
      	* errors.c (print_location, _cpp_begin_message, v_message):
      	Remove.
      	(cpp_error, cpp_error_with_line): Always use error callback.
      	(cpp_error, cpp_error_with_line, cpp_errno): Return bool.
      	* include/cpplib.h (cpp_options): Remove pedantic_errors,
      	inhibit_warnings, warn_system_headers, inhibit_errors,
      	warnings_are_errors, client_diagnostic.
      	(cpp_callbacks): Add extra arguments to error callback; make it
      	return bool.
      	(cpp_finish): Return void.
      	(cpp_destroy): Remove inaccurate comment about return value.
      	(cpp_errors, CPP_DL_EXTRACT, CPP_DL_WARNING_P): Remove.
      	(CPP_DL_NOTE): Define.
      	* include/line-map.h (linemap_print_containing_files): Remove.
      	* init.c (cpp_finish): Do not check for or return number of
      	errors.
      	* internal.h (cpp_reader): Remove errors field.
      	* line-map.c (linemap_print_containing_files): Remove.
      	* macro.c (_cpp_create_definition): Use CPP_DL_NOTE for message
      	about previous definition.  Only emit it if previous diagnostic
      	was emitted.
      
      From-SVN: r145263
      Joseph Myers committed
    • re PR c/456 (constant expressions constraints (gcc.dg/c90-const-expr-1)) · 928c19bb
      	PR c/456
      	PR c/5675
      	PR c/19976
      	PR c/29116
      	PR c/31871
      	PR c/35198
      
      fixincludes:
      	* inclhack.def (glibc_tgmath): New fix.
      	* fixincl.x: Regenerate.
      	* tests/base/tgmath.h: New.
      
      gcc:
      	* builtins.c (fold_builtin_sincos): Build COMPOUND_EXPR in
      	void_type_node.
      	(fold_call_expr): Return a NOP_EXPR from folding rather than the
      	contained expression.
      	* c-common.c (c_fully_fold, c_fully_fold_internal, c_save_expr):
      	New.
      	(c_common_truthvalue_conversion): Use c_save_expr.  Do not fold
      	conditional expressions for C.
      	(decl_constant_value_for_optimization): Move from
      	decl_constant_value_for_broken_optimization in c-typeck.c.  Check
      	whether optimizing and that the expression is a VAR_DECL not of
      	array type instead of doing such checks in the caller.  Do not
      	check pedantic.  Call gcc_unreachable for C++.
      	* c-common.def (C_MAYBE_CONST_EXPR): New.
      	* c-common.h (c_fully_fold, c_save_expr,
      	decl_constant_value_for_optimization): New prototypes.
      	(C_MAYBE_CONST_EXPR_PRE, C_MAYBE_CONST_EXPR_EXPR,
      	C_MAYBE_CONST_EXPR_INT_OPERANDS, C_MAYBE_CONST_EXPR_NON_CONST,
      	EXPR_INT_CONST_OPERANDS): Define.
      	* c-convert.c (convert): Strip nops from expression.
      	* c-decl.c (groktypename): Take extra parameters expr and
      	expr_const_operands.  Update call to grokdeclarator.
      	(start_decl): Update call to grokdeclarator.  Add statement for
      	expressions used in type of decl.
      	(grokparm): Update call to grokdeclarator.
      	(push_parm_decl): Update call to grokdeclarator.
      	(build_compound_literal): Add parameter non_const and build a
      	C_MAYBE_COSNT_EXPR if applicable.
      	(grokdeclarator): Take extra parameters expr and
      	expr_const_operands.  Track expressions used in declaration
      	specifiers and declarators.  Fold array sizes and track whether
      	they are constant expressions and whether they are integer
      	constant expressions.
      	(parser_xref_tag): Set expr and expr_const_operands fields in
      	return value.
      	(grokfield): Update call to grokdeclarator.
      	(start_function): Update call to grokdeclarator.
      	(build_null_declspecs): Set expr and expr_const_operands fields in
      	return value.
      	(declspecs_add_type): Handle expressions in typeof specifiers.
      	* c-parser.c (c_parser_declspecs): Set expr and
      	expr_const_operands fields for declaration specifiers.
      	(c_parser_enum_specifier): Likewise.
      	(c_parser_struct_or_union_specifier): Likewise.
      	(c_parser_typeof_specifier): Likewise.  Update call to
      	groktypename.  Fold expression as needed.  Return expressions with
      	type instead of adding statements.
      	(c_parser_attributes): Update calls to c_parser_expr_list.
      	(c_parser_statement_after_labels): Fold expression before passing
      	to objc_build_throw_stmt.
      	(c_parser_condition): Fold expression.
      	(c_parser_asm_operands): Fold expression.
      	(c_parser_conditional_expression): Use c_save_expr.  Update call
      	to build_conditional_expr.
      	(c_parser_alignof_expression): Update call to groktypename.
      	(c_parser_postfix_expression): Preserve C_MAYBE_CONST_EXPR as
      	original_code.  Fold expression argument of va_arg.  Create
      	C_MAYBE_CONST_EXPR to preserve side effects of expressions in type
      	argument to va_arg.  Update calls to groktypename.  Fold array
      	index for offsetof.  Verify that first argument to
      	__builtin_choose_expr has integer type.
      	(c_parser_postfix_expression_after_paren_type): Update calls to
      	groktypename and build_compound_literal.  Handle expressions with
      	side effects in type name.
      	(c_parser_postfix_expression_after_primary): Update call to
      	c_parser_expr_list.  Set original_code for calls to
      	__builtin_constant_p.
      	(c_parser_expr_list): Take extra parameter fold_p.  Fold
      	expressions if requested.
      	(c_parser_objc_type_name): Update call to groktypename.
      	(c_parser_objc_synchronized_statement): Fold expression.
      	(c_parser_objc_receiver): Fold expression.
      	(c_parser_objc_keywordexpr): Update call to c_parser_expr_list.
      	(c_parser_omp_clause_num_threads, c_parser_omp_clause_schedule,
      	c_parser_omp_atomic, c_parser_omp_for_loop): Fold expressions.
      	* c-tree.h (CONSTRUCTOR_NON_CONST): Define.
      	(struct c_typespec): Add elements expr and expr_const_operands.
      	(struct c_declspecs): Add elements expr and expr_const_operands.
      	(groktypename, build_conditional_expr, build_compound_literal):
      	Update prototypes.
      	(in_late_binary_op): Declare.
      	* c-typeck.c (note_integer_operands): New function.
      	(in_late_binary_op): New variable.
      	(decl_constant_value_for_broken_optimization): Move to c-common.c
      	and rename to decl_constant_value_for_optimization.
      	(default_function_array_conversion): Do not strip nops.
      	(default_conversion): Do not call
      	decl_constant_value_for_broken_optimization.
      	(build_array_ref): Do not fold result.
      	(c_expr_sizeof_expr): Fold operand.  Use C_MAYBE_CONST_EXPR for
      	result when operand is a VLA.
      	(c_expr_sizeof_type): Update call to groktypename.  Handle
      	expressions included in type name.  Use C_MAYBE_CONST_EXPR for
      	result when operand names a VLA type.
      	(build_function_call): Update call to build_compound_literal.
      	Only fold result for calls to __builtin_* functions.  Strip
      	NOP_EXPR from INTEGER_CST returned from such functions.  Fold
      	the function designator.
      	(convert_arguments): Fold arguments.  Update call to
      	convert_for_assignment.
      	(build_unary_op): Handle increment and decrement of
      	C_MAYBE_CONST_EXPR.  Move lvalue checks for increment and
      	decrement earlier.  Fold operand of increment and decrement.
      	Handle address of C_MAYBE_CONST_EXPR.  Only fold expression being
      	built for integer operand.  Wrap returns that are INTEGER_CSTs
      	without being integer constant expressions or that have integer
      	constant operands without being INTEGER_CSTs.
      	(lvalue_p): Handle C_MAYBE_CONST_EXPR.
      	(build_conditional_expr): Add operand ifexp_bcp.  Track whether
      	result is an integer constant expression or can be used in
      	unevaluated parts of one and avoid folding and wrap as
      	appropriate.  Fold operands before possibly doing -Wsign-compare
      	warnings.
      	(build_compound_expr): Wrap result for C99 if operands can be used
      	in integer constant expressions.
      	(build_c_cast): Update call to digest_init.  Do not ignore
      	overflow from casting floating-point constants to integers.  Wrap
      	results that could be confused with integer constant expressions,
      	null pointer constants or floating-point constants.
      	(c_cast_expr): Update call to groktypename.  Handle expressions
      	included in type name.
      	(build_modify_expr): Handle modifying a C_MAYBE_CONST_EXPR.  Fold
      	lhs inside possible SAVE_EXPR.  Fold RHS before assignment.
      	Update calls to convert_for_assignment.
      	(convert_for_assignment): Take new parameter
      	null_pointer_constant.  Do not strip nops or call
      	decl_constant_value_for_broken_optimization.  Set
      	in_late_binary_op for conversions to boolean.
      	(store_init_value): Update call to digest_init.
      	(digest_init): Take new parameter null_pointer_constant.  Do not
      	call decl_constant_value_for_broken_optimization.  pedwarn for
      	initializers not constant expressions.  Update calls to
      	convert_for_assignment.
      	(constructor_nonconst): New.
      	(struct constructor_stack): Add nonconst element.
      	(really_start_incremental_init, push_init_level, pop_init_level):
      	Handle constructor_nonconst and nonconst element.
      	(set_init_index): Call constant_expression_warning for array
      	designators.
      	(output_init_element): Fold value.  Set constructor_nonconst as
      	applicable.  pedwarn for initializers not constant expressions.
      	Update call to digest_init.  Call constant_expression_warning
      	where constant initializers are required.
      	(process_init_element): Use c_save_expr.
      	(c_finish_goto_ptr): Fold expression.
      	(c_finish_return): Fold return value.  Update call to
      	convert_for_assignment.
      	(c_start_case): Fold switch expression.
      	(c_process_expr_stmt): Fold expression.
      	(c_finish_stmt_expr): Create C_MAYBE_CONST_EXPR as needed to
      	ensure statement expression is not evaluated in constant
      	expression.
      	(build_binary_op): Track whether results are integer constant
      	expressions or may occur in such, disable folding and wrap results
      	as applicable.  Fold operands for -Wsign-compare warnings unless
      	in_late_binary_op.
      	(c_objc_common_truthvalue_conversion): Handle results folded to
      	integer constants that are not integer constant expressions.
      	* doc/extend.texi: Document when typeof operands are evaluated,
      	that condition of __builtin_choose_expr is an integer constant
      	expression, and more about use of __builtin_constant_p in
      	initializers.
      
      gcc/objc:
      	* objc-act.c (objc_finish_try_stmt): Set in_late_binary_op.
      
      gcc/testsuite:
      	* gcc.c-torture/compile/20081108-1.c,
      	gcc.c-torture/compile/20081108-2.c,
      	gcc.c-torture/compile/20081108-3.c, gcc.dg/bconstp-2.c,
      	gcc.dg/bconstp-3.c, gcc.dg/bconstp-4.c, gcc.dg/c90-const-expr-6.c,
      	gcc.dg/c90-const-expr-7.c, gcc.dg/c90-const-expr-8.c,
      	gcc.dg/c90-const-expr-9.c, gcc.dg/c90-const-expr-10.c,
      	gcc.dg/c90-const-expr-11.c, gcc.dg/c99-const-expr-6.c,
      	gcc.dg/c99-const-expr-7.c, gcc.dg/c99-const-expr-8.c,
      	gcc.dg/c99-const-expr-9.c, gcc.dg/c99-const-expr-10.c,
      	gcc.dg/c99-const-expr-11.c, gcc.dg/c99-const-expr-12.c,
      	gcc.dg/c99-const-expr-13.c, gcc.dg/compare10.c,
      	gcc.dg/gnu89-const-expr-1.c, gcc.dg/gnu89-const-expr-2.c,
      	gcc.dg/gnu99-const-expr-1.c, gcc.dg/gnu99-const-expr-2.c,
      	gcc.dg/gnu99-const-expr-3.c, gcc.dg/vla-12.c, gcc.dg/vla-13.c,
      	gcc.dg/vla-14.c, gcc.dg/vla-15.c, gcc.dg/vla-16.c: New tests.
      	* gcc.dg/c90-const-expr-1.c, gcc.dg/c90-const-expr-2.c,
      	gcc.dg/c90-const-expr-3.c, gcc.dg/c99-const-expr-2.c,
      	gcc.dg/c99-const-expr-3.c, gcc.dg/c99-static-1.c: Remove XFAILs.
      	* gcc.dg/c90-const-expr-2.c: Use ZERO in place of 0 in another
      	case.
      	* gcc.dg/overflow-warn-1.c, gcc.dg/overflow-warn-2.c,
      	gcc.dg/overflow-warn-3.c, gcc.dg/overflow-warn-4.c: Remove
      	XFAILs.  Update expected messages.
      	* gcc.dg/pr14649-1.c, gcc.dg/pr19984.c, gcc.dg/pr25682.c: Update
      	expected messages.
      	* gcc.dg/real-const-1.c: Replace with test from original PR.
      	* gcc.dg/vect/pr32230.c: Use intermediate cast to __PTRDIFF_TYPE__
      	when casting from non-constant integer to pointer.
      
      From-SVN: r145254
      Joseph Myers committed
  27. 20 Feb, 2009 1 commit
  28. 01 Jan, 2009 1 commit
    • re PR c/36489 (Warning "initialized field overwritten" wrongly triggers with… · b295aee2
      re PR c/36489 (Warning "initialized field overwritten" wrongly triggers with multidimensional arrays)
      
      	PR c/36489
      	* c-typeck.c (add_pending_init): Add IMPLICIT argument.  Only
      	warn about overwriting initializer with side-effects or
      	-Woverride-init if !IMPLICIT.
      	(output_init_element): Likewise.  Pass IMPLICIT down to
      	add_pending_init.
      	(process_init_element): Add IMPLICIT argument.  Pass it down
      	to output_init_element.
      	(push_init_element, pop_init_level, set_designator): Adjust
      	process_init_element callers.
      	(set_nonincremental_init, set_nonincremental_init_from_string):
      	Adjust add_pending_init callers.
      	(output_pending_init_elements): Adjust output_init_element callers.
      	* c-tree.h (process_init_element): Adjust prototype.
      	* c-parser.c (c_parser_initelt, c_parser_initval): Adjust
      	process_init_element callers.
      
      	* gcc.dg/pr36489.c: New test.
      
      From-SVN: r142998
      Jakub Jelinek committed
  29. 24 Oct, 2008 1 commit
    • re PR c/7543 (no warning for always-false "if (!a & 0x4)" bitwise and on boolean value) · 100d537d
      2008-10-24  Manuel López-Ibáñez  <manu@gcc.gnu.org>
      
      	PR c/7543
      	* value-prof.c (gimple_stringop_fixed_value): Use parentheses
      	around bit operation.
      	* profile.c (is_edge_inconsistent): Likewise.
      	* fold-const.c (truth_value_p): Move from here...
      	* tree.h (truth_value_p): ... to here.
      	* c-tree.h (c_expr): Update description of original_code.
      	* c-typeck.c (parser_build_unary_op): Set original_code.
      	(parser_build_binary_op): Update call to warn_about_parentheses.
      	* c-common.c (warn_about_parentheses): Take two additional
      	arguments of the operands. Use a switch. Quote operators
      	appropriately. Define macro APPEARS_TO_BE_BOOLEAN_EXPR_P.
      	Add warning about !x | y and !x & y.
      	* c-common.h (warn_about_parentheses): Update declaration.
      cp/	
      	* typeck.c (build_x_binary_op): Update call to
      	warn_about_parentheses.
      	* parser.c (cp_parser_binary_expression): Add note about passing
      	the correct code for unary expressions.
      testsuite/
      	* gcc.dg/Wparentheses-11.c: New.
      	* g++.dg/warn/Wparentheses-25.C: New. XFAILED.
      
      From-SVN: r141340
      Manuel López-Ibáñez committed
  30. 23 Sep, 2008 1 commit
    • c-tree.h: Add argument to c_objc_common_truthvalue_conversion, parser_build_binary_op. · ba47d38d
              * c-tree.h: Add argument to c_objc_common_truthvalue_conversion,
              parser_build_binary_op.
              * c-decl.c (build_enumerator): Pass location to build_binary_op.
              * c-typeck.c (build_array_ref): Same.
              (parser_build_unary_op): New location argument.
              (pointer_diff): Pass location to build_binary_op,
              c_objc_common_truthvalue_conversion.
              (build_modify_expr): Same.
              (build_unary_op): New location argument.
              (build_binary_op): New location argument.
              (c_objc_common_truthvalue_conversion): Pass location to
              c_*common_truthvalue_conversion.
              * c-convert.c (convert): Same.
              * c-common.c (binary_op_error): New location argument.
              (pointer_int_sum): Pass location to build_binary_op.
              (c_common_truthvalue_conversion): New location argument.
              (warn_for_sign_compare): Same.
              * c-common.h: Add location argument to c_common_truthvalue_conversion,
              binary_op_error, build_binary_op, warn_for_sign_compare.
              * c-parser.c (c_parser_condition): Pass location to
              c_*common_truthvalue_conversion.
              (c_parser_conditional_expression): Save condition's location and pass
              it on down.
              (c_parser_binary_expression): Same, but for the binary operator's
              location.
              (c_parser_omp_for_loop): Pass location to
              c_objc_common_truthvalue_conversion.
      objc/
              * objc-act.c (next_sjlj_build_enter_and_setjmp): Call
              c_common_truthvalue_conversion with location.
              (next_sjlj_build_catch_list): Same.
              (next_sjlj_build_try_catch_finally): Same.
      testsuite/
              * gcc.dg/Walways-true-1.c: Test column numbers.
              * gcc.dg/c90-const-expr-5.c: Same.
              * gcc.dg/compare4.c: Same.
              * gcc.dg/Werror-1.c: Same.
      cp/
              * typeck.c (build_array_ref): Pass location to cp_build_binary_op.
              (get_member_function_from_ptrfunc): Same.
              (build_x_binary_op): Same.
              (build_binary_op): Same.
              (cp_build_binary_op): New location argument.
              (pointer_diff): Pass location to cp_build_binary_op.
              (cp_truthvalue_conversion): Pass location to build_binary_op.
              (convert_ptrmem): Pass location to cp_build_binary_op.
              (cp_build_modify_expr): Same.
              (build_ptrmemfunc): Same.
              * init.c (expand_cleanup_for_base): Pass location to
              c_common_truthvalue_conversion.
              (build_new_1): Pass location to cp_build_binary_op.
              (build_vec_delete_1): Pass location to *build_binary_op,
              c_common_truthvalue_conversion.
              (build_vec_init): Same.
              (build_delete): Same.
              * decl.c (compute_array_index_type): Same.
              * call.c (build_new_op): Same.
              * rtti.c (build_dynamic_cast_1): Same.
              * cp-tree.h: Add argument to cp_build_binary_op.
              * semantics.c (handle_omp_for_class_iterator): Pass location to
              *build_binary_op, c_common_truthvalue_conversion.
              * decl2.c (get_guard_cond): Same.
      
      From-SVN: r140598
      Aldy Hernandez committed
  31. 01 Sep, 2008 1 commit
    • tree.c (protected_set_expr_location): New. · 6a3799eb
              * tree.c (protected_set_expr_location): New.
              * tree.h (protected_set_expr_location): New prototype.
              * c-tree.h (build_array_ref): Add argument.
              (parser_build_unary_op): Same.
              * c-typeck.c (build_indirect_ref): Handle new location argument.
              (build_array_ref): Same.
              (parser_build_unary_op): Same.
              * gimplify.c (gimplify_asm_expr): Set input_location before calling
              error.
              * c-omp.c (c_finish_omp_atomic): Pass location when calling
              build_indirect_ref.
              * c-common.c (finish_label_address_expr): Handle new location
              argument.
              * c-common.h (build_indirect_ref): Add argument.
              (finish_label_address_expr): Same.
              * c-parser.c (c_parser_unary_expression): Pass location to build
              functions.
              (c_parser_postfix_expression): Same.
      objc/
              * objc-act.c (build_typed_selector_reference): Pass input_location to
              build_unary_op calls.
              (build_selector_reference): Same, but to build_array_ref.
              (objc_substitute_decl): Same.
              (build_ivar_reference): Same, but to build_indirect_ref.
              (get_super_receiver): Same.
      testsuite/
              * gcc.dg/20010516-1.c: Test for columns.
      cp/
              * typeck.c (build_x_indirect_ref): Add location argument.
              * class.c (build_base_path): Pass location to build_indirect_ref.
              * pt.c (tsubst_copy_and_build): Pass location to
              finish_label_address_expr.
              * parser.c (cp_parser_unary_expression): Same.
      
      From-SVN: r139867
      Aldy Hernandez committed
  32. 30 Aug, 2008 1 commit
  33. 21 Aug, 2008 2 commits
    • c-tree.h (grokfield): New argument. · 3d10ed6c
              * c-tree.h (grokfield): New argument.
              * c-decl.c (grokfield): Handle new location argument.
              * c-parser.c (c_parser_struct_declaration): Pass location to
              grokfield.
      testsuite/
              * gcc.dg/20011008-1.c: Test column.
              * gcc.dg/20080820.c: New.
              * gcc.dg/fltconst-1.c: Test column.
              * gcc.dg/cpp/cpp.exp: Add -fno-show-column.
              * gcc.dg/cpp/trad/trad.exp: Same.
              * lib/gcc.exp (gcc_target_compile): Remove -fno-show-column.
              * lib/gcc-dg.exp (process-message): Handle columns.
      
      From-SVN: r139403
      Aldy Hernandez committed
    • diagnostic.c (pedwarn_at): Rename as pedwarn. · 509c9d60
      2008-08-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
      
      	* diagnostic.c (pedwarn_at): Rename as pedwarn.
      	(pedwarn): Delete.
      	* toplev.h (pedwarn_at): Likewise.
      	* builtins.c: Update all calls to pedwarn.
      	* c-lex.c: Likewise.
      	* toplev.c: Likewise.
      	* c-tree.h: Likewise.
      	* c-decl.c: Likewise.
      	* c-errors.c: Likewise.
      	* c-typeck.c: Likewise.
      	* c-common.c: Likewise.
      	* c-parser.c: Likewise.
      cp/
      	* typeck.c: Update all calls to pedwarn.
      	* decl.c: Likewise.
      	* call.c: Likewise.
      	* error.c: Likewise.
      	* pt.c: Likewise.
      	* name-lookup.c: Likewise.
      	* parser.c: Likewise.
      fortran/	
      	* f95-lang.c: Update all calls to pedwarn.
      
      From-SVN: r139373
      Manuel López-Ibáñez committed
  34. 13 Aug, 2008 1 commit
    • re PR c/15236 (pedantic switch modifies treatment of non-ISO compliant enumerations) · 85790e66
      2008-08-13  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
      
      	PR c/15236
      	* diagnostic.c (pedwarn_at): New.
      	* toplev.h (pedwarn_at): Declare.
      	* c-tree.h (build_enumerator): Update declaration.
      	* c-decl.c (finish_enum): Update comment.
      	(build_enumerator): Take a location parameter. Give a pedwarn but do
      	not perform any conversion.
      	* c-parser.c (c_parser_enum_specifier): Set correct location for
      	enumerator.
      testsuite/
      	* gcc.dg/pr15236.c: New.
      	* gcc.dg/torture/pr25183.c: Update.
      
      From-SVN: r139050
      Manuel López-Ibáñez committed