1. 15 May, 2010 1 commit
    • vecir.h: New file with VEC primitives for tree, gimple, and rtl. · f4ce02c5
      gcc/ChangeLog
      	* vecir.h: New file with VEC primitives for tree, gimple, and rtl.
      	* Makefile.in: Add it.
      	Fix all other Makefile dependencies for changes below.
      	* tree.h: Include it instead of defining VEC primitives here.
      	* gimple.h: Likewise.
      	* rtl.h: Likewise.
      	* tree-inline.h: Inlclude vecir.h instead of gimple.h.
      	* except.h: Include vecir.h, break dependence on tree.h.
      
      	* gimplify.c (append_to_statement_list_1, append_to_statement_list):
      	Move from here...
      	* tree-iterator.c: ...to here.
      	* tree-iterator.h: Fix file introduction comment.  Add extern markers.
      
      	* c-lex.c: Include fixed-value.h instead of rtl.h.  Do not include
      	tm_p.h.
      	* c-cppbuiltin.c: Explain why debug.h and tm_p.h are included.
      	* c-objc-common.h: Do not include tm.h, rtl.h, insn-config.h,
      	integrate.h, function.h, toplev.h, tree-inline.h, ggc.h,
      	tree-mudflap.h, and target.h.
      	* c-semantics.c: Do not include except.h, ggc.h, rtl.h, timevar.h,
      	predict.h, tree-inline.h, gimple.h, and langhooks.h.
      	* c-decl.c: Do not include expr.h, ggc.h, libfuncs.h, except.h.
      	Add FIXME for why gimple.h is still included (should be unnecessary
      	since GCC 4.5 gimplification unit-at-a-time).
      	* c-typeck.c: Do not include rtl.h, tm_p.h, ggc.h, and gimple.h.
      	* c-pragma.c: Add FIXME for why function.h needs to be included just
      	for cfun, at front-end level.
      	Add note that REGISTER_TARGET_PRAGMAS should probably be a target hook.
      	Do not include ggc.h, but include vecprim.h for VEC(char).
      	* c-opts.c: Do not include tm.h, tree-inline.h, and tm_p.h.
      	Explain why target.h is included.
      	* c-omp.h: Do not include tm.h, function.h, and bitmap.h.
      	Explain why gimple.h is included.
      	* c-ppoutput.c: Do not include tm.h.
      	* c-common.c: Do not include gimple.h.  Explain why expr.h is included.
      	* c-parses.c: Explain why rtl.h is included, and that this (and only
      	this) is also why tm.h must be included.
      	Do not include except.h.
      	* c-lang.c: Do not include ggc.h.
      
      cp/ChangeLog
      	* decl.c: Include tree-iterator.h, as fixup for tree-inline.h changes.
      	* Make-lang.in: Fix dependencies accordingly.
      
      From-SVN: r159442
      Steven Bosscher committed
  2. 11 May, 2010 1 commit
    • re PR c++/44062 ((void)var; doesn't prevent 'set but not used' warning) · 056928b2
      	PR c++/44062
      	* c-parser.c (c_parser_expression): Mark LHS of a comma
      	expression as read if it is a decl, handled component or
      	COMPOUND_EXPR with that on the RHS.
      	* c-typeck.c (c_process_expr_stmt): Mark RHS of COMPOUND_EXPR
      	if it is a decl or handled component.
      
      	* semantics.c (finish_expr_stmt): Don't call mark_exp_read here...
      	* cvt.c (convert_to_void): ... but here.  If expr is a COMPOUND_EXPR,
      	look at its second operand.
      
      	* c-c++-common/Wunused-var-7.c: New test.
      	* g++.dg/warn/Wunused-var-9.C: New test.
      
      From-SVN: r159286
      Jakub Jelinek committed
  3. 09 May, 2010 1 commit
    • re PR c/10676 (Using unnamed fields in initializers) · 0fb96aa4
      	PR c/10676
      	* c-typeck.c (lookup_field): Take a type directly.  Update
      	recursive calls.
      	(build_component_ref): Update call to lookup_field.
      	(set_init_label): Use lookup_field to find initialized field.
      	Handle returned list of fields like a sequence of designators.
      
      testsuite:
      	* gcc.dg/anon-struct-10.c: New test.
      
      From-SVN: r159206
      Joseph Myers committed
  4. 07 May, 2010 1 commit
    • c-typeck.c (build_binary_op): Warn ordered comparison of pointer with null… · d42ba3b8
      c-typeck.c (build_binary_op): Warn ordered comparison of pointer with null pointer and also warn about...
      
      gcc/
      2010-05-07  Shujing Zhao  <pearly.zhao@oracle.com>
      
              * c-typeck.c (build_binary_op): Warn ordered comparison of pointer
              with null pointer and also warn about ordered comparison of zero
              with pointer if -Wextra.
      
      gcc/testsuite/
      2010-05-07  Shujing Zhao  <pearly.zhao@oracle.com>
      
              * gcc.dg/ordered-comparison-1.c: New test.
              * gcc.dg/ordered-comparison-2.c: New test.
              * gcc.dg/ordered-comparison-3.c: New test.
              * gcc.dg/ordered-comparison-4.c: New test.
      
      From-SVN: r159145
      Shujing Zhao committed
  5. 27 Apr, 2010 1 commit
    • re PR c/32207 (missing warnings about address of 'x'.) · 637f1455
      gcc/
      2010-04-27  Shujing Zhao  <pearly.zhao@oracle.com>
      
              PR c/32207
              * c-typeck.c (build_binary_op): Move forward check for comparison
              pointer with null pointer constant and adjust the diagnostic message.
      
      gcc/testsuite/
      2010-04-27  Shujing Zhao  <pearly.zhao@oracle.com>
      
              PR c/32207
              * gcc.dg/pr32207.c: New test.
              * gcc.dg/misc-column.c: Adjust expected warning.
              * gcc.dg/Walways-true-1.c: Likewise.
              * gcc.dg/Walways-true-2.c: Likewise.
              * gcc.dg/warn-addr-cmp.c: Likewise.
      
      From-SVN: r158765
      Shujing Zhao committed
  6. 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
  7. 12 Apr, 2010 1 commit
  8. 07 Apr, 2010 1 commit
    • 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
  9. 02 Apr, 2010 1 commit
    • Make-lang.in, [...]: Update copyright years. · c75c517d
      	* ada/gcc-interface/Make-lang.in, alias.c, attribs.c, auto-inc-dec.c, 
      	basic-block.h, bb-reorder.c, calls.c, c-common.c, cgraph.h,
      	collect2.h, config/alpha/alpha.c, config/alpha/alpha.md,
      	config/alpha/predicates.md, config/arm/arm.md,
      	config/arm/lib1funcs.asm, config/arm/neon-schedgen.ml,
      	config/avr/avr.c, config/avr/avr.md, config/bfin/bfin.c,
      	config/darwin9.h, config/darwin.c, config/darwin.h,
      	config/h8300/h8300.c, config/i386/cpuid.h, config/i386/cygming.h,
      	config/i386/cygwin.h, config/i386/mingw32.h, config/i386/msformat-c.c,
      	config/i386/sol2-10.h, config/i386/xopintrin.h, config/ia64/ia64.c,
      	config/ia64/ia64.md, config/ia64/sync.md, config/mep/mep.c,
      	config/mips/mips.md, config/mn10300/mn10300.c,
      	config/mn10300/mn10300.h, config/pa/pa.c, config/pa/pa.md,
      	config/rs6000/aix.h, config/rs6000/dfp.md,
      	config/rs6000/rs6000-builtin.def, config/rs6000/rs6000-c.c,
      	config/rs6000/vector.md, config/rtems.h, config/rx/rx.md,
      	config/s390/s390.md, config/sol2-c.c, config/sparc/sol2-bi.h,
      	config/sparc/sol2-gas.h, config/sparc/sparc.h, config/sparc/sparc.md,
      	config/sparc/sparc-protos.h, config/spu/spu.c, config/spu/spu-c.c,
      	config/t-darwin, convert.c, c.opt, c-opts.c, cp/Make-lang.in,
      	c-pretty-print.c, c-typeck.c, df-core.c, df-scan.c, diagnostic.c,
      	diagnostic.h, doc/cppopts.texi, doc/cpp.texi, doc/extend.texi,
      	doc/gimple.texi, doc/languages.texi, doc/plugins.texi, doc/rtl.texi,
      	doc/standards.texi, doc/tree-ssa.texi, doc/trouble.texi, dominance.c,
      	fold-const.c, fortran/Make-lang.in, fwprop.c, gcc-plugin.h,
      	gensupport.c, gimple.h, gimple-iterator.c, graphite.c,
      	graphite-clast-to-gimple.c, graphite-clast-to-gimple.h,
      	graphite-dependences.c, graphite-poly.c, graphite-poly.h,
      	graphite-ppl.c, graphite-ppl.h, graphite-scop-detection.c,
      	graphite-sese-to-poly.c, graphite-sese-to-poly.h, ifcvt.c, intl.c,
      	intl.h, ipa.c, ipa-cp.c, ipa-inline.c, ipa-prop.c, ipa-prop.h,
      	ipa-pure-const.c, ipa-reference.c, ipa-type-escape.c, ira-color.c,
      	ira-conflicts.c, ira-lives.c, java/Make-lang.in, lambda-code.c,
      	loop-invariant.c, lto/Make-lang.in, lto-streamer.h, lto-streamer-in.c,
      	objc/Make-lang.in, objcp/Make-lang.in, omp-low.c, optc-gen.awk,
      	opt-functions.awk, opth-gen.awk, params.def, passes.c,
      	postreload-gcse.c, print-tree.c, recog.c, regrename.c, reload.h,
      	rtl.def, sched-int.h, sched-rgn.c, sel-sched-dump.c, sese.c, sese.h,
      	store-motion.c, stor-layout.c, tree-cfgcleanup.c, tree-chrec.c,
      	tree-complex.c, tree-data-ref.c, tree.def, tree-eh.c, tree-flow.h,
      	tree-flow-inline.h, tree.h, tree-loop-distribution.c, tree-outof-ssa.c,
      	tree-parloops.c, tree-pass.h, tree-predcom.c, tree-profile.c,
      	tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-alias.c,
      	tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-dce.c, tree-ssa-dom.c,
      	tree-ssa-dse.c, tree-ssa-loop-im.c, tree-ssa-loop-ivcanon.c,
      	tree-ssa-loop-manip.c, tree-ssa-math-opts.c, tree-ssa-operands.c,
      	tree-ssa-pre.c, tree-ssa-sccvn.c, tree-ssa-structalias.c,
      	tree-ssa-uncprop.c, tree-tailcall.c, tree-vect-data-refs.c,
      	tree-vect-loop.c, tree-vectorizer.h, tree-vect-slp.c, tree-vrp.c,
      	unwind-dw2-fde-darwin.c, varpool.c: Update copyright years.
      
      From-SVN: r157950
      Steven Bosscher committed
  10. 24 Feb, 2010 1 commit
  11. 22 Feb, 2010 1 commit
    • re PR c++/43126 ("at this point in file" warnings are upside down) · a98c2819
      2010-02-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>
      
      	PR c++/43126
      	* c-typeck.c (convert_arguments): Print declaration location.
      	* c-common.c (validate_nargs): Rename as
      	builtin_function_validate_nargs.
      	(check_builtin_function_arguments): Update.
      cp/
      	* typeck.c (convert_arguments): Update error message.
      	
      testsuite/
      	* gcc.dg/cleanup-1.c: Update.
      	* gcc.dg/func-args-1.c: Update.
      	* gcc.dg/format/sentinel-1.c: Update.
      	* g++.old-deja/g++.jason/scoping10.C: Update.
      	* g++.old-deja/g++.ns/lookup5.C: Update.
      	* g++.dg/ext/cleanup-1.C: Update.
      	* g++.dg/parse/varmod1.C: Update.
      	* g++.dg/parse/error33.C: Update.
      	* g++.dg/expr/call3.C: Update.
      	* g++.dg/func-args-1.C: New.
      
      From-SVN: r156979
      Manuel López-Ibáñez committed
  12. 21 Jan, 2010 1 commit
    • tree.h (TYPE_TRANSPARENT_UNION): Replace with ... · ebf0bf7f
      	* tree.h (TYPE_TRANSPARENT_UNION): Replace with ...
      	(TYPE_TRANSPARENT_AGGR): this, for union and record.
      	* calls.c (initialize argument_information): Handle it.
      	* c-common.c (handle_transparent_union_attribute): Use new name.
      	* c-decl.c (finish_struct): Ditto.
      	* c-typeck.c (type_lists_compatible_p): Ditto.
      	(convert_for_assignment): Use new name and also handle record.
      	* function.c (aggregate_value_p): Handle it.
      	(pass_by_reference): Ditto.
      	(assign_parm_data_types): Ditto.
      	* print-tree.c (print_node): Ditto.
      	* lto-streamer-in.c (unpack_ts_type_value_fields): Ditto.
      	* lto-streamer-out.c (pack_ts_type_value_fields): Ditto.
      	* tree.c (first_field): New fn.
      
      gcc/cp/
      	* mangle.c (write_type): Mangle transparent record as member type.
      	* semantics.c (begin_class_definition): Recognize decimal classes
      	and set TYPE_TRANSPARENT_AGGR.
      
      Co-Authored-By: Jason Merrill <jason@redhat.com>
      
      From-SVN: r156106
      Janis Johnson committed
  13. 12 Jan, 2010 1 commit
  14. 17 Dec, 2009 1 commit
    • re PR c/40885 (build_indirect_ref i18n problems) · dd865ef6
      2009-12-17  Shujing Zhao  <pearly.zhao@oracle.com>
      
      	PR c/40885
      	* c-common.h (ref_operator): New type.
      	(build_indirect_ref): Adjust prototype with new argument.
      	* c-typeck.c (build_indirect_ref): Accept ref_operator as argument and
      	emit the diagnostics for easy translation.
      	(build_array_ref): Update calls to build_indirect_ref.
      	* c-omp.c (c_finish_omp_atomic): Likewise.
      	* c-parser.c (c_parser_unary_expression,
      	c_parser_postfix_expression_after_primary): Likewise.
      
      cp/
      2009-12-17  Shujing Zhao  <pearly.zhao@oracle.com>
      
      	* typeck.c (build_indirect_ref): Update the argument.
      	(build_x_indirect_ref): Likewise.
      	(cp_build_indirect_ref): Update the argument and emit the diagnostics
      	for easy translation.
      	(build_class_member_access_expr, build_array_ref,
      	get_member_function_from_ptrfunc): Update calls.
      	* cp-tree.h (build_x_indirect_ref, cp_build_indirect_ref): Update
      	prototypes.
      	* call.c (build_new_op, convert_like_real, build_x_va_arg,
      	build_over_call): Update calls.
      	* class.c (build_base_path, build_simple_base_path, build_vfn_ref):
      	Likewise.
      	* decl.c (start_preparsed_function): Likewise.
      	* except.c (expand_start_catch_block, build_throw): Likewise.
      	* init.c (emit_mem_initializers, expand_virtual_init,
      	expand_virtual_init, build_new_1, build_vec_init, build_delete,
      	build_vec_delete): Likewise.
      	* parser.c (cp_parser_unary_expression): Likewise.
      	* pt.c (tsubst_copy_and_build): Likewise.
      	* rtti.c (build_headof, get_tinfo_decl_dynamic, get_typeid): Likewise.
      	* semantics.c (finish_non_static_data_member, thisify_lambda_field):
      	Likewise.
      	* tree.c (build_dummy_object, stabilize_expr): Likewise.
      	* typeck2.c (build_x_arrow): Likewise.
      
      testsuite/
      2009-12-17  Shujing Zhao  <pearly.zhao@oracle.com>
      
      	* g++.old-deja/g++.mike/net31.C: Make expected dg-error strings
      	explicit.
      	* g++.old-deja/g++.bugs/900213_02.C: Likewise.
      	* g++.old-deja/g++.bugs/900215_02.C: Likewise.
      
      From-SVN: r155302
      Shujing Zhao committed
  15. 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
  16. 27 Oct, 2009 1 commit
  17. 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
  18. 24 Oct, 2009 1 commit
  19. 08 Oct, 2009 1 commit
    • re PR c/41182 (Revision 145254 caused ICE: tree check: expected integer_cst,… · e5a94231
      re PR c/41182 (Revision 145254 caused ICE: tree check: expected integer_cst, have nop_expr in tree_int_cst_lt, at tree.c:5259)
      
      	PR c/41182
      	* c-common.c (c_fully_fold_internal): Strip nops from the result
      	of recursive calls to c_fully_fold_internal.
      	(c_wrap_maybe_const): New.
      	(c_save_expr): Use c_wrap_maybe_const.
      	* c-common.h (c_wrap_maybe_const): Declare.
      	* c-typeck.c (build_conditional_expr, c_finish_stmt_expr,
      	build_binary_op): Use c_wrap_maybe_const.
      
      testsuite:
      	* gcc.c-torture/compile/pr41182-1.c: New.
      
      From-SVN: r152548
      Joseph Myers committed
  20. 27 Sep, 2009 1 commit
  21. 23 Sep, 2009 1 commit
  22. 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
  23. 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
  24. 09 Aug, 2009 1 commit
    • c-common.c (c_fully_fold_internal): Issue a warning if a binary operation overflows. · f5178456
      gcc/
      	* c-common.c (c_fully_fold_internal): Issue a warning if a binary
      	operation overflows.  Likewise non-cast unary arithmetic.
      	If one arm of a conditional expression is always taken,
      	inhibit evaluation warnings for the other arm.  Likewise inhibit
      	evaluation warnings for the second && or || operand if the first
      	operand is enough to determine the result.
      	* c-typeck.c (build_conditional_expr): Apply the same inhibition
      	rules here.
      	(build_binary_op): Prevent duplicate evaluation warnings.
      
      gcc/testsuite/
      	* gcc.dg/overflow-warn-8.c: New test.
      
      From-SVN: r150594
      Richard Sandiford committed
  25. 16 Jul, 2009 1 commit
    • re PR c/40435 (Revision 148442 caused many regressions on trunk) · db3927fb
      2009-07-17  Aldy Hernandez  <aldyh@redhat.com>
      	    Manuel López-Ibáñez  <manu@gcc.gnu.org>
      
      	PR 40435 
      	* tree-complex.c, tree-loop-distribution.c,
      	tree.c, tree.h, builtins.c, fold-const.c, omp-low.c,
      	cgraphunit.c, tree-ssa-ccp.c, tree-ssa-dom.c,
      	gimple-low.c, expr.c, tree-ssa-ifcombine.c, c-decl.c,
      	stor-layout.c, tree-if-conv.c, c-typeck.c,
      	gimplify.c, calls.c, tree-sra.c, tree-mudflap.c,
      	tree-ssa-copy.c, tree-ssa-forwprop.c, c-convert.c, c-omp.c,
      	varasm.c, tree-inline.c, c-common.c,
      	c-common.h, gimple.c, tree-switch-conversion.c, gimple.h,
      	tree-cfg.c, c-parser.c, convert.c: Add location
      	argument to fold_{unary,binary,ternary}, fold_build[123],
      	build_call_expr, build_size_arg, build_fold_addr_expr,
      	build_call_array, non_lvalue, size_diffop,
      	fold_build1_initializer, fold_build2_initializer,
      	fold_build3_initializer, fold_build_call_array,
      	fold_build_call_array_initializer, fold_single_bit_test,
      	omit_one_operand, omit_two_operands, invert_truthvalue,
      	fold_truth_not_expr, build_fold_indirect_ref, fold_indirect_ref,
      	combine_comparisons, fold_builtin_*, fold_call_expr,
      	build_range_check, maybe_fold_offset_to_address, round_up,
      	round_down.
      objc/
      	* objc-act.c: Add location argument to all calls to
      	build_fold_addr_expr.
      testsuite/
      	* gcc.dg/pr36902.c: Add column info.
      	* g++.dg/gcov/gcov-2.C: Change count for definition.
      cp/
      	* typeck.c, init.c, class.c, method.c, rtti.c, except.c, error.c,
      	tree.c, cp-gimplify.c, cxx-pretty-print.c, pt.c, semantics.c,
      	call.c, cvt.c, mangle.c: Add location argument to
      	fold_{unary,binary,ternary}, fold_build[123], build_call_expr,
      	build_size_arg, build_fold_addr_expr, build_call_array,
      	non_lvalue, size_diffop, fold_build1_initializer,
      	fold_build2_initializer, fold_build3_initializer,
      	fold_build_call_array, fold_build_call_array_initializer,
      	fold_single_bit_test, omit_one_operand, omit_two_operands,
      	invert_truthvalue, fold_truth_not_expr, build_fold_indirect_ref,
      	fold_indirect_ref, combine_comparisons, fold_builtin_*,
      	fold_call_expr, build_range_check, maybe_fold_offset_to_address,
      	round_up, round_down.
      fortran/
      	* trans-expr.c, trans-array.c, trans-openmp.c, trans-stmt.c,
      	trans.c, trans-io.c, trans-decl.c, trans-intrinsic.c: Add location
      	argument to fold_{unary,binary,ternary}, fold_build[123],
      	build_call_expr, build_size_arg, build_fold_addr_expr,
      	build_call_array, non_lvalue, size_diffop,
      	fold_build1_initializer, fold_build2_initializer,
      	fold_build3_initializer, fold_build_call_array,
      	fold_build_call_array_initializer, fold_single_bit_test,
      	omit_one_operand, omit_two_operands, invert_truthvalue,
      	fold_truth_not_expr, build_fold_indirect_ref, fold_indirect_ref,
      	combine_comparisons, fold_builtin_*, fold_call_expr,
      	build_range_check, maybe_fold_offset_to_address, round_up,
      	round_down.
      
      Co-Authored-By: Manuel López-Ibáñez <manu@gcc.gnu.org>
      
      From-SVN: r149722
      Aldy Hernandez committed
  26. 07 Jul, 2009 2 commits
    • tree.c (set_expr_locus): Remove. · 5e278028
      2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
      
      	* tree.c (set_expr_locus): Remove.
      	* tree.h (EXPR_LOCUS,SET_EXPR_LOCUS,set_expr_locus): Remove.
      	* c-typeck.c (c_finish_stmt_expr):  Replace EXPR_LOCUS by
      	EXPR_LOCATION.
      	* gimplify.c (internal_get_tmp_var): Likewise.
      	(gimplify_call_expr): Likewise.
      	(gimplify_one_sizepos): Likewise.
      objc/
      	* objc-act.c (next_sjlj_build_catch_list): Replace EXPR_LOCUS by
      	EXPR_LOCATION.
      cp/	
      	* semantics.c (finalize_nrv_r): Replace EXPR_LOCUS by
      	EXPR_LOCATION.
      ada/
      	* gcc-interface/trans.c (gnat_gimplify_expr):  Replace EXPR_LOCUS by
      	EXPR_LOCATION.
      
      From-SVN: r149350
      Manuel López-Ibáñez committed
    • c-lex.c: Replace %H by an explicit location. · fab922b1
      2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
      
      	* c-lex.c: Replace %H by an explicit location. Update all calls.
      	* c-common.c: Likewise.
      	* c-decl.c: Likewise.
      	* c-typeck.c: Likewise.
      	* fold-const.c: Likewise.
      	* gimplify.c: Likewise.
      	* stmt.c: Likewise.
      	* tree-cfg.c: Likewise.
      	* tree-ssa-loop-niter.c: Likewise.
      	* tree-vrp.c: Likewise.
      	* value-prof.c: Likewise.
      java/
      	* jcf-parse.c: Replace %H by an explicit location. Update all calls.
      objc/
      	* objc-act.c: Replace %H by an explicit location. Update all calls.
      testsuite/
      	* gcc.dg/plugin/selfassign.c: Replace %H by an explicit
      	location. Update all calls.
      	* g++.dg/plugin/selfassign.c: Likewise.
      
      From-SVN: r149310
      Manuel López-Ibáñez committed
  27. 19 Jun, 2009 1 commit
    • 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
  28. 17 Jun, 2009 1 commit
    • c-pch.c (get_ident): Don't set size of templ array. · 5eb4df45
      ./:	* c-pch.c (get_ident): Don't set size of templ array.
      	(pch_init): Don't set size of partial_pch array.
      
      	* c-typeck.c (digest_init): If -Wc++-compat, warn about using a
      	string constant to intialize an array whose size is the length of
      	the string.
      testsuite/:
      	* gcc.dg/Wcxx-compat-14.c: New testcase.
      
      From-SVN: r148611
      Ian Lance Taylor committed
  29. 16 Jun, 2009 2 commits
    • c-common.c (skip_evaluation): Don't define. · 7d882b83
      ./:	* c-common.c (skip_evaluation): Don't define.
      	(c_inhibit_evaluation_warnings): Define global variable.
      	(overflow_warning): Check c_inhibit_evaluation_warnings rather
      	than skip_evaluation.
      	(convert_and_check, warn_for_div_by_zero): Likewise.
      	* c-common.h (skip_evaluation): Don't declare.
      	(c_inhibit_evaluation_warnings): Declare.
      	* c-parser.c (c_parser_typeof_specifier): Set
      	c_inhibit_evaluation_warnings rather than skip_evaluation.
      	(c_parser_conditional_expression): Likewise.
      	(c_parser_binary_expression): Likewise.
      	(c_parser_sizeof_expression): Likewise.
      	(c_parser_alignof_expression): Likewise.
      	* c-typeck.c (build_indirect_ref): Check
      	c_inhibit_evaluation_warnings rather than skip_evaluation.
      	(build_conditional_expr, build_binary_op): Likewise.
      cp/:
      	* parser.c (cp_unevaluated_operand): Define global variable.
      	(cp_parser_question_colon_clause): Increment
      	c_inhibit_evaluation_warnings when evaluating an expression which
      	will never be executed.
      	(cp_parser_decltype): Increment cp_unevaluated_operand and
      	c_inhibit_evaluation_warnings, not skip_evaluation.
      	(cp_parser_sizeof_operand): Likewise.
      	(cp_parser_enclosed_template_argument_list): Save
      	cp_unevaluated_operand and c_inhibit_evaluation_warnings, not
      	skip_evaluation.
      	* cp-tree.h (struct saved_scope): Remove skip_evaluation field.
      	Add unevaluated_operand and inhibit_evaluation_warnings fields.
      	(cp_unevaluated_operand): Declare.
      	* name-lookup.c (push_to_top_level): Save cp_unevaluated_operand
      	and c_inhibit_evaluation_warnings rather than skip_evaluation.
      	(pop_from_top_level): Restore cp_unevaluated_operand and
      	c_inhibit_evaluation_warnings rather than skip_evaluation.
      	* class.c (build_base_path): Check cp_unevaluated_operand rather
      	than skip_evaluation.
      	* typeck.c (build_class_member_access_expr): Likewise.
      	(cp_build_binary_op): Don't warn about bad shift counts if
      	c_inhibit_evaluation_warnings is non-zero.
      	* pt.c (coerce_template_parms): Save state of
      	cp_unevaluated_operand and c_inhibit_evaluation_warnings, not
      	skip_evaluation.
      	(tsubst_aggr_type): Likewise.
      	(tsubst_pack_expansion): Check cp_unevaluated_operand rather than
      	skip_evaluation.
      	(tsubst_copy): Likewise.
      	(tsubst): Set cp_unevaluated_operand and
      	c_inhibit_evaluation_warnings, not skip_evaluation.
      	(tsubst_copy_and_build): Likewise.
      	* call.c (convert_arg_to_ellipsis): Check cp_unevaluated_operand
      	rather than skip_evaluation.
      	* decl2.c (mark_used): Likewise.
      	* semantics.c (finish_non_static_data_member): Likewise.
      	* cvt.c (cp_convert_and_check): Check
      	c_inhibit_evaluation_warnings rather than skip_evaluation.
      	* mangle.c (write_type): Set cp_unevaluated_operand rather than
      	skip_evaluation.
      testsuite/:
      	* g++.dg/warn/skip-1.C: New testcase.
      
      From-SVN: r148535
      Ian Lance Taylor committed
    • 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
  30. 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
  31. 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
  32. 01 Jun, 2009 1 commit
    • attribs.c (register_attribute): Use CONST_CAST. · 67165eb3
      ./:	* attribs.c (register_attribute): Use CONST_CAST.
      	* collect2.c (main): Use CONST_CAST2.
      	(scan_prog_file): Likewise.
      	* gcc.c (process_command, main): Likewise.
      	* toplev.c (toplev_main): Likewise.
      
      	* c-typeck.c (handle_warn_cast_qual): New static function,
      	partially broken out of build_c_cast.
      	(build_c_cast): Call handle_warn_cast_qual.
      	* doc/invoke.texi (Warning Options): Document new effect of
      	-Wcast-qual.
      ./java:	* jcf-io.c (find_class): Use CONST_CAST.
      ./testsuite:	* gcc.dg/cast-qual-3.c: New testcase.
      	* g++.dg/warn/Wcast-qual2.C: New testcase.
      
      From-SVN: r148053
      Ian Lance Taylor committed
  33. 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
  34. 21 May, 2009 1 commit
    • tm.texi (Misc): Document TARGET_INVALID_PARAMETER_TYPE... · 40449a90
      2009-05-20  Sandra Loosemore  <sandra@codesourcery.com>
      
      	gcc/
      	* doc/tm.texi (Misc): Document TARGET_INVALID_PARAMETER_TYPE,
      	TARGET_INVALID_RETURN_TYPE, TARGET_PROMOTED_TYPE, and
      	TARGET_CONVERT_TO_TYPE.
      	* hooks.c (hook_tree_const_tree_null): Define.
      	* hooks.h (hook_tree_const_tree_null): Declare.
      	* target.h (struct gcc_target):  Add invalid_parameter_type,
      	invalid_return_type, promoted_type, and convert_to_type fields.
      	* target-def.h: (TARGET_INVALID_PARAMETER_TYPE): Define.
      	(TARGET_INVALID_RETURN_TYPE): Define.
      	(TARGET_PROMOTED_TYPE): Define.
      	(TARGET_CONVERT_TO_TYPE): Define.
      	(TARGET_INITIALIZER): Update for new fields.
      	* c-decl.c (grokdeclarator): Check targetm.invalid_return_type.
      	(grokparms): Check targetm.invalid_parameter_type.
      	* c-typeck.c (default_conversion): Check targetm.promoted_type.
      	* c-convert.c (convert): Check targetm.convert_to_type.
      
      	gcc/cp/
      	* typeck.c (default_conversion): Check targetm.promoted_type.
      	* decl.c (grokdeclarator): Check targetm.invalid_return_type.
      	(grokparms): Check targetm.invalid_parameter_type.
      	* cvt.c (ocp_convert): Check targetm.convert_to_type.
      	(build_expr_type_conversion): Check targetm.promoted_type.
      
      From-SVN: r147758
      Sandra Loosemore committed
  35. 19 May, 2009 1 commit
    • c-typeck.c (build_binary_op): Allow % on integal vectors. · 5cfd5d9b
      2009-05-19  Andrew Pinski  <andrew_pinski@playstation.sony.com>
      
              * c-typeck.c (build_binary_op): Allow % on integal vectors.
              * doc/extend.texi (Vector Extension): Document that % is allowed too.
      
      009-05-19  Andrew Pinski  <andrew_pinski@playstation.sony.com>
      
              * typeck.c (build_binary_op): Allow % on integal vectors.
      
      2009-05-19  Andrew Pinski  <andrew_pinski@playstation.sony.com>
      
              * gcc.dg/vector-4.c: New testcase.
              * gcc.dg/simd-1b.c: % is now allowed for integer vectors.
              * g++.dg/ext/vector16.C: New testcase.
      
      From-SVN: r147722
      Andrew Pinski committed
  36. 15 May, 2009 1 commit
    • re PR c/16302 (gcc fails to warn about some common logic errors) · a243fb4a
      2009-05-15  Manuel López-Ibáñez  <manu@gcc.gnu.org>
      
      	PR 16302
      	* fold-const.c (make_range,build_range_check,merge_ranges): Move
      	declaration to...
      	(merge_ranges): Returns bool. 
      	* tree.h (make_range): .. to here.
      	(build_range_check): Likewise.
      	(merge_ranges): Likewise. Renamed from merge_ranges.
      	* c-typeck.c (parser_build_binary_op): Update calls to
      	warn_logical_operator.
      	* c-common.c (warn_logical_operator): Add new warning.
      	* c-common.h (warn_logical_operator): Update declaration.
      cp/
      	* call.c (build_new_op): Update calls to warn_logical_operator.
      	
      testsuite/
      	* gcc.dg/pr16302.c: New.
      	* g++.dg/warn/pr16302.C: New.
      
      From-SVN: r147596
      Manuel López-Ibáñez committed
  37. 14 May, 2009 1 commit
    • passes.c (finish_optimization_passes): Change i to int. · 09639a83
      ./:	* passes.c (finish_optimization_passes): Change i to int.
      	* plugin.c (plugins_active_p): Change event to int.
      	(dump_active_plugins): Likewise.
      	* reginfo.c (invalid_mode_change_p): Change to to unsigned int.
      	Add cast.
      	* tree.c (tree_range_check_failed): Change c to unsigned int.
      	(omp_clause_range_check_failed): Likewise.
      	(build_common_builtin_nodes): Change mode to int.  Add cast.
      	* config/ia64/ia64.c (is_emitted): Change r to unsigned int.
      	(ia64_hard_regno_rename_ok, ia64_eh_uses): Likewise.
      
      	* c-typeck.c (build_unary_op): If -Wc++-compat, warn about using
      	++ or -- with a variable of enum type.
      cp/:
      	* class.c (layout_class_type): Change itk to unsigned int.
      	* decl.c (finish_enum): Change itk to unsigned int.
      	* parser.c (cp_parser_check_decl_spec): Change ds to int.  Remove
      	casts.
      fortran/:
      	* decl.c (match_attr_spec): Change d to unsigned int.
      	* dump-parse-tree.c (show_namespace): Change op to int.  Add cast.
      	* interface.c (gfc_check_interfaces): Change i to int.  Add casts.
      	* module.c (read_module): Change i to int.  Add cast.
      	(write_module): Change i to int.
      	* symbol.c (gfc_get_namespace): Change in to int.
      	(gfc_free_namespace): Change i to int.
      	* trans-io.c (gfc_build_io_library_fndecls): Change ptype to
      	unsigned int.  Add cast.
      	* trans-types.c (gfc_init_kinds): Change mode to unsigned int.
      	Add casts.
      testsuite/:
      	* gcc.dg/Wcxx-compat-9.c: New testcase.
      
      From-SVN: r147544
      Ian Lance Taylor committed
  38. 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