1. 27 Feb, 2013 1 commit
    • opts.h: Include obstack.h. · dc357798
      	* opts.h: Include obstack.h.
      	(opts_concat): New prototype.
      	(opts_obstack): New declaration.
      	* opts.c (opts_concat): New function.
      	(opts_obstack): New variable.
      	(init_options_struct): Call gcc_init_obstack on opts_obstack.
      	(finish_options): Use opts_concat instead of concat
      	and XOBNEWVEC instead of XNEWVEC.
      	* opts-common.c (generate_canonical_option, decode_cmdline_option,
      	generate_option): Likewise.
      	* Makefile.in (OPTS_H): Depend on $(OBSTACK_H).
      	* lto-wrapper.c (main): Call gcc_init_obstack on opts_obstack.
      
      From-SVN: r196305
      Jakub Jelinek committed
  2. 10 Jan, 2013 1 commit
  3. 04 Jan, 2013 1 commit
  4. 18 Nov, 2012 1 commit
    • This patch rewrites the old VEC macro-based interface into a new one based on… · 9771b263
      This patch rewrites the old VEC macro-based interface into a new one based on the template class 'vec'.
      
      This patch rewrites the old VEC macro-based interface into a new one
      based on the template class 'vec'.  The user-visible changes are
      described in http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec.
      
      I have tested the patch pretty extensively:
      
      - Regular bootstraps on x86_64, ppc, ia64, sparc and hppa.
      - Bootstraps with --enable-checking=release
      - Bootstraps with --enable-checking=gc,gcac
      - Basic builds on all targets (using contrib/config-list.mk).
      
      We no longer access the vectors via VEC_* macros.  The pattern is
      "VEC_operation (T, A, V, args)" becomes "V.operation (args)".
      
      The only thing I could not do is create proper ctors and dtors for the
      vec class.  Since these vectors are stored in unions, we
      have to keep them as PODs (C++03 does not allow non-PODs in unions).
      
      This means that creation and destruction must be explicit.  There is a
      new method vec<type, allocation, layout>::create() and another vec<type,
      allocation, layout>::destroy() to allocate the internal vector.
      
      For vectors that must be pointers, there is a family of free functions
      that implement the operations that need to tolerate NULL vectors.
      These functions all start with the prefix 'vec_safe_'.  See the wiki
      page for details.
      
      The gengtype change removes the special handling for VEC() that used
      to exist in gengtype. Additionally, it allows gengtype to recognize
      templates of more than one argument and introduces the concept of an
      undefined type (useful for template arguments that may or may not be
      types).
      
      When a TYPE_UNDEFINED is reached, gengtype will ignore it if it
      happens inside a type marked with GTY((user)).  Otherwise, it will
      emit an error.
      
      Finally, gengtype rejects root types marked GTY((user)) that are not
      first class pointers.
      
      2012-11-16  Diego Novillo  <dnovillo@google.com>
      
      	VEC API overhaul (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
      
      	* vec.c (register_overhead): Convert it into
      	member function of vec_prefix.
      	(release_overhead): Likewise.
      	(calculate_allocation): Likewise.
      	(vec_heap_free): Remove.
      	(vec_gc_o_reserve_1): Remove.
      	(vec_heap_o_reserve_1): Remove.
      	(vec_stack_o_reserve_1): Remove.
      	(vec_stack_o_reserve_exact): Remove.
      	(register_stack_vec): New.
      	(stack_vec_register_index): New.
      	(unregister_stack_vec): New.
      	(vec_assert_fail): Remove.
      	* vec.h: Conditionally include ggc.h.  Document conditional
      	hackery.
      	Update top-level documentation.
      	(ALONE_VEC_CHECK_INFO): Remove.
      	(VEC_CHECK_INFO): Remove.
      	(ALONE_VEC_CHECK_DECL): Remove.
      	(VEC_CHECK_DECL): Remove.
      	(ALONE_VEC_CHECK_PASS): Remove.
      	(VEC_CHECK_PASS): Remove.
      	(VEC_ASSERT): Remove.
      	(vec_prefix): Add friends va_gc, va_gc_atomic, va_heap and
      	va_stack.
      	Mark fields alloc_ and num_ as protected.
      	(struct vec_t): Remove.  Remove all function members.
      	(struct vl_embed): Declare.
      	(struct vl_ptr): Declare.
      	(free): Remove.
      	(reserve_exact): Remove.
      	(reserve): Remove.
      	(safe_splice): Remove.
      	(safe_push): Remove.
      	(safe_grow): Remove.
      	(safe_grow_cleared): Remove.
      	(safe_insert): Remove.
      	(DEF_VEC_I): Remove.
      	(DEF_VEC_ALLOC_I): Remove.
      	(DEF_VEC_P): Remove.
      	(DEF_VEC_ALLOC_P): Remove.
      	(DEF_VEC_O): Remove.
      	(DEF_VEC_ALLOC_O): Remove.
      	(DEF_VEC_ALLOC_P_STACK): Remove.
      	(DEF_VEC_ALLOC_O_STACK): Remove.
      	(DEF_VEC_ALLOC_I_STACK): Remove.
      	(DEF_VEC_A): Remove.
      	(DEF_VEC_ALLOC_A): Remove.
      	(vec_stack_p_reserve_exact_1): Remove.
      	(vec_stack_o_reserve): Remove.
      	(vec_stack_o_reserve_exact): Remove.
      	(VEC_length): Remove.
      	(VEC_empty): Remove.
      	(VEC_address): Remove.
      	(vec_address): Remove.
      	(VEC_last): Remove.
      	(VEC_index): Remove.
      	(VEC_iterate): Remove.
      	(VEC_embedded_size): Remove.
      	(VEC_embedded_init): Remove.
      	(VEC_free): Remove.
      	(VEC_copy): Remove.
      	(VEC_space): Remove.
      	(VEC_reserve): Remove.
      	(VEC_reserve_exact): Remove.
      	(VEC_splice): Remove.
      	(VEC_safe_splice): Remove.
      	(VEC_quick_push): Remove.
      	(VEC_safe_push): Remove.
      	(VEC_pop): Remove.
      	(VEC_truncate): Remove.
      	(VEC_safe_grow): Remove.
      	(VEC_replace): Remove.
      	(VEC_quick_insert): Remove.
      	(VEC_safe_insert): Remove.
      	(VEC_ordered_remove): Remove.
      	(VEC_unordered_remove): Remove.
      	(VEC_block_remove): Remove.
      	(VEC_lower_bound): Remove.
      	(VEC_alloc): Remove.
      	(VEC_qsort): Remove.
      
      	(va_heap): Declare.
      	(va_heap::default_layout): New typedef to vl_ptr.
      	(va_heap::reserve): New.
      	(va_heap::release): New.
      	(va_gc): Declare.
      	(va_gc::default_layout): New typedef to vl_embed.
      	(va_gc::reserve): New.
      	(va_gc::release): New.
      	(va_gc_atomic): Declare.  Inherit from va_gc.
      	(va_stack): Declare.
      	(va_stack::default_layout): New typedef to vl_ptr.
      	(va_stack::alloc): New.
      	(va_stack::reserve): New.
      	(va_stack::release): New.
      	(register_stack_vec): Declare.
      	(stack_vec_register_index): Declare.
      	(unregister_stack_vec): Declare.
      
      	(vec<T, A = va_heap, L = typename A::default_layout>): Declare
      	empty vec template.
      	(vec<T, A, vl_embed>): Partial specialization for embedded
      	layout.
      	(vec<T, A, vl_embed>::allocated): New.
      	(vec<T, A, vl_embed>::length): New.
      	(vec<T, A, vl_embed>::is_empty): New.
      	(vec<T, A, vl_embed>::address): New.
      	(vec<T, A, vl_embed>::operator[]): New.
      	(vec<T, A, vl_embed>::last New.
      	(vec<T, A, vl_embed>::space): New.
      	(vec<T, A, vl_embed>::iterate): New.
      	(vec<T, A, vl_embed>::iterate): New.
      	(vec<T, A, vl_embed>::copy): New.
      	(vec<T, A, vl_embed>::splice): New.
      	(vec<T, A, vl_embed>::quick_push New.
      	(vec<T, A, vl_embed>::pop New.
      	(vec<T, A, vl_embed>::truncate): New.
      	(vec<T, A, vl_embed>::quick_insert): New.
      	(vec<T, A, vl_embed>::ordered_remove): New.
      	(vec<T, A, vl_embed>::unordered_remove): New.
      	(vec<T, A, vl_embed>::block_remove): New.
      	(vec<T, A, vl_embed>::qsort): New.
      	(vec<T, A, vl_embed>::lower_bound): New.
      	(vec<T, A, vl_embed>::embedded_size): New.
      	(vec<T, A, vl_embed>::embedded_init): New.
      	(vec<T, A, vl_embed>::quick_grow): New.
      	(vec<T, A, vl_embed>::quick_grow_cleared): New.
      	(vec_safe_space): New.
      	(vec_safe_length): New.
      	(vec_safe_address): New.
      	(vec_safe_is_empty): New.
      	(vec_safe_reserve): New.
      	(vec_safe_reserve_exact): New.
      	(vec_alloc): New.
      	(vec_free): New.
      	(vec_safe_grow): New.
      	(vec_safe_grow_cleared): New.
      	(vec_safe_iterate): New.
      	(vec_safe_push): New.
      	(vec_safe_insert): New.
      	(vec_safe_truncate): New.
      	(vec_safe_copy): New.
      	(vec_safe_splice): New.
      
      	(vec<T, A, vl_ptr>): New partial specialization for the space
      	efficient layout.
      	(vec<T, A, vl_ptr>::exists): New.
      	(vec<T, A, vl_ptr>::is_empty): New.
      	(vec<T, A, vl_ptr>::length): New.
      	(vec<T, A, vl_ptr>::address): New.
      	(vec<T, A, vl_ptr>::operator[]): New.
      	(vec<T, A, vl_ptr>::operator!=): New.
      	(vec<T, A, vl_ptr>::operator==): New.
      	(vec<T, A, vl_ptr>::last): New.
      	(vec<T, A, vl_ptr>::space): New.
      	(vec<T, A, vl_ptr>::iterate): New.
      	(vec<T, A, vl_ptr>::copy): New.
      	(vec<T, A, vl_ptr>::reserve): New.
      	(vec<T, A, vl_ptr>::reserve_exact): New.
      	(vec<T, A, vl_ptr>::splice): New.
      	(vec<T, A, vl_ptr>::safe_splice): New.
      	(vec<T, A, vl_ptr>::quick_push): New.
      	(vec<T, A, vl_ptr>::safe_push): New.
      	(vec<T, A, vl_ptr>::pop): New.
      	(vec<T, A, vl_ptr>::truncate): New.
      	(vec<T, A, vl_ptr>::safe_grow): New.
      	(vec<T, A, vl_ptr>::safe_grow_cleared): New.
      	(vec<T, A, vl_ptr>::quick_grow): New.
      	(vec<T, A, vl_ptr>::quick_grow_cleared): New.
      	(vec<T, A, vl_ptr>::quick_insert): New.
      	(vec<T, A, vl_ptr>::safe_insert): New.
      	(vec<T, A, vl_ptr>::ordered_remove): New.
      	(vec<T, A, vl_ptr>::unordered_remove): New.
      	(vec<T, A, vl_ptr>::block_remove): New.
      	(vec<T, A, vl_ptr>::qsort): New.
      	(vec<T, A, vl_ptr>::lower_bound): New.
      	(vec_stack_alloc): Define.
      	(FOR_EACH_VEC_SAFE_ELT): Define.
      	* vecir.h: Remove.  Update all users.
      	* vecprim.h: Remove.  Update all users.
      	Move uchar to coretypes.h.
      
      	* Makefile.in (VEC_H): Add $(GGC_H).
      	Remove vecir.h and vecprim.h dependencies everywhere.
      
      2012-11-16  Diego Novillo  <dnovillo@google.com>
      
      	* gengtype-lex.l (VEC): Remove.
      	Add characters in the set [\!\>\.-].
      	* gengtype-parse.c (token_names): Remove "VEC".
      	(require_template_declaration): Remove handling of VEC_TOKEN.
      	(type): Likewise.
      	Call create_user_defined_type when parsing GTY((user)).
      	* gengtype-state.c (type_lineloc): handle TYPE_UNDEFINED.
      	(write_state_undefined_type): New.
      	(write_state_type): Call write_state_undefined_type for
      	TYPE_UNDEFINED.
      	(read_state_type): Call read_state_undefined_type for
      	TYPE_UNDEFINED.
      	* gengtype.c (dbgprint_count_type_at): Handle TYPE_UNDEFINED.
      	(create_user_defined_type): Make extern.
      	(type_for_name): Factor out of resolve_typedef.
      	(create_undefined_type): New
      	(resolve_typedef): Call it when we cannot find a previous
      	typedef and the type is not a template.
      	(find_structure): Accept TYPE_UNDEFINED.
      	(set_gc_used_type): Add argument ALLOWED_UNDEFINED_TYPES,
      	default to false.
      	Emit an error for TYPE_UNDEFINED unless LEVEL is GC_UNUSED or
      	ALLOWED_UNDEFINED_TYPES is set.
      	Set ALLOWED_UNDEFINED_TYPES to true for TYPE_USER_STRUCT.
      	(filter_type_name): Accept templates with more than one
      	argument.
      	(output_mangled_typename): Handle TYPE_UNDEFINED
      	(walk_type): Likewise.
      	(write_types_process_field): Likewise.
      	(write_func_for_structure): If CHAIN_NEXT is set, ORIG_S
      	should not be a user-defined type.
      	(write_types_local_user_process_field): Handle TYPE_ARRAY,
      	TYPE_NONE and TYPE_UNDEFINED.
      	(write_types_local_process_field): Likewise.
      	(contains_scalar_p): Return 0 for TYPE_USER_STRUCT.
      	(write_root): Reject user-defined types that are not pointers.
      	Handle TYPE_NONE, TYPE_UNDEFINED, TYPE_UNION, TYPE_LANG_STRUCT
      	and TYPE_PARAM_STRUCT.
      	(output_typename): Handle TYPE_NONE, TYPE_UNDEFINED, and
      	TYPE_ARRAY.
      	(dump_typekind): Handle TYPE_UNDEFINED.
      	* gengtype.h (enum typekind): Add TYPE_UNDEFINED.
      	(create_user_defined_type): Declare.
      	(enum gty_token): Remove VEC_TOKEN.
      
      2012-11-16  Diego Novillo  <dnovillo@google.com>
      
      	Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
      
      	* coretypes.h (uchar): Define.
      	* alias.c: Use new vec API in vec.h.
      	* asan.c: Likewise.
      	* attribs.c: Likewise.
      	* basic-block.h: Likewise.
      	* bb-reorder.c: Likewise.
      	* builtins.c: Likewise.
      	* calls.c: Likewise.
      	* cfg.c: Likewise.
      	* cfganal.c: Likewise.
      	* cfgcleanup.c: Likewise.
      	* cfgexpand.c: Likewise.
      	* cfghooks.c: Likewise.
      	* cfghooks.h: Likewise.
      	* cfgloop.c: Likewise.
      	* cfgloop.h: Likewise.
      	* cfgloopanal.c: Likewise.
      	* cfgloopmanip.c: Likewise.
      	* cfgrtl.c: Likewise.
      	* cgraph.c: Likewise.
      	* cgraph.h: Likewise.
      	* cgraphclones.c: Likewise.
      	* cgraphunit.c: Likewise.
      	* combine.c: Likewise.
      	* compare-elim.c: Likewise.
      	* coverage.c: Likewise.
      	* cprop.c: Likewise.
      	* data-streamer.h: Likewise.
      	* dbxout.c: Likewise.
      	* dce.c: Likewise.
      	* df-core.c: Likewise.
      	* df-problems.c: Likewise.
      	* df-scan.c: Likewise.
      	* dominance.c: Likewise.
      	* domwalk.c: Likewise.
      	* domwalk.h: Likewise.
      	* dse.c: Likewise.
      	* dwarf2cfi.c: Likewise.
      	* dwarf2out.c: Likewise.
      	* dwarf2out.h: Likewise.
      	* emit-rtl.c: Likewise.
      	* except.c: Likewise.
      	* except.h: Likewise.
      	* expr.c: Likewise.
      	* expr.h: Likewise.
      	* final.c: Likewise.
      	* fold-const.c: Likewise.
      	* function.c: Likewise.
      	* function.h: Likewise.
      	* fwprop.c: Likewise.
      	* gcc.c: Likewise.
      	* gcse.c: Likewise.
      	* genattr.c: Likewise.
      	* genattrtab.c: Likewise.
      	* genautomata.c: Likewise.
      	* genextract.c: Likewise.
      	* genopinit.c: Likewise
      	* ggc-common.c: Likewise.
      	* ggc.h: Likewise.
      	* gimple-low.c: Likewise.
      	* gimple-ssa-strength-reduction.c: Likewise.
      	* gimple-streamer-in.c: Likewise.
      	* gimple.c: Likewise.
      	* gimple.h: Likewise.
      	* gimplify.c: Likewise.
      	* graph.c: Likewise.
      	* graphds.c: Likewise.
      	* graphds.h: Likewise.
      	* graphite-blocking.c: Likewise.
      	* graphite-clast-to-gimple.c: Likewise.
      	* graphite-dependences.c: Likewise.
      	* graphite-interchange.c: Likewise.
      	* graphite-optimize-isl.c: Likewise.
      	* graphite-poly.c: Likewise.
      	* graphite-poly.h: Likewise.
      	* graphite-scop-detection.c: Likewise.
      	* graphite-scop-detection.h: Likewise.
      	* graphite-sese-to-poly.c: Likewise.
      	* graphite.c: Likewise.
      	* godump.c: Likewise.
      	* haifa-sched.c: Likewise.
      	* hw-doloop.c: Likewise.
      	* hw-doloop.h: Likewise.
      	* ifcvt.c: Likewise.
      	* insn-addr.h: Likewise.
      	* ipa-cp.c: Likewise.
      	* ipa-inline-analysis.c: Likewise.
      	* ipa-inline-transform.c: Likewise.
      	* ipa-inline.c: Likewise.
      	* ipa-inline.h: Likewise.
      	* ipa-prop.c: Likewise.
      	* ipa-prop.h: Likewise.
      	* ipa-pure-const.c: Likewise.
      	* ipa-ref-inline.h: Likewise.
      	* ipa-ref.c: Likewise.
      	* ipa-ref.h: Likewise.
      	* ipa-reference.c: Likewise.
      	* ipa-split.c: Likewise.
      	* ipa-utils.c: Likewise.
      	* ipa-utils.h: Likewise.
      	* ipa.c: Likewise.
      	* ira-build.c: Likewise.
      	* ira-color.c: Likewise.
      	* ira-emit.c: Likewise.
      	* ira-int.h: Likewise.
      	* ira.c: Likewise.
      	* loop-invariant.c: Likewise.
      	* loop-unroll.c: Likewise.
      	* lower-subreg.c: Likewise.
      	* lra-lives.c: Likewise.
      	* lra.c: Likewise.
      	* lto-cgraph.c: Likewise.
      	* lto-section-out.c: Likewise.
      	* lto-streamer-in.c: Likewise.
      	* lto-streamer-out.c: Likewise.
      	* lto-streamer.h: Likewise.
      	* lto-symtab.c: Likewise.
      	* mcf.c: Likewise.
      	* modulo-sched.c: Likewise.
      	* omp-low.c: Likewise.
      	* opts-common.c: Likewise.
      	* opts-global.c: Likewise.
      	* opts.c: Likewise.
      	* opts.h: Likewise.
      	* passes.c: Likewise.
      	* predict.c: Likewise.
      	* print-tree.c: Likewise.
      	* profile.c: Likewise.
      	* profile.h: Likewise.
      	* read-rtl.c: Likewise.
      	* ree.c: Likewise.
      	* reg-stack.c: Likewise.
      	* regrename.c: Likewise.
      	* regrename.h: Likewise.
      	* reload.c: Likewise.
      	* reload.h: Likewise.
      	* reload1.c: Likewise.
      	* rtl.h: Likewise.
      	* sched-deps.c: Likewise.
      	* sched-int.h: Likewise.
      	* sdbout.c: Likewise.
      	* sel-sched-dump.c: Likewise.
      	* sel-sched-ir.c: Likewise.
      	* sel-sched-ir.h: Likewise.
      	* sel-sched.c: Likewise.
      	* sese.c: Likewise.
      	* sese.h: Likewise.
      	* statistics.h: Likewise.
      	* stmt.c: Likewise.
      	* stor-layout.c: Likewise.
      	* store-motion.c: Likewise.
      	* tlink.c: Likewise.
      	* toplev.c: Likewise.
      	* trans-mem.c: Likewise.
      	* tree-browser.c: 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-diagnostic.c: Likewise.
      	* tree-dump.c: Likewise.
      	* tree-eh.c: Likewise.
      	* tree-emutls.c: Likewise.
      	* tree-flow.h: Likewise.
      	* tree-if-conv.c: Likewise.
      	* tree-inline.c: Likewise.
      	* tree-inline.h: Likewise.
      	* tree-into-ssa.c: Likewise.
      	* tree-iterator.c: Likewise.
      	* tree-loop-distribution.c: Likewise.
      	* tree-mudflap.c: Likewise.
      	* tree-optimize.c: Likewise.
      	* tree-outof-ssa.c: Likewise.
      	* tree-parloops.c: Likewise.
      	* tree-phinodes.c: Likewise.
      	* tree-predcom.c: Likewise.
      	* tree-pretty-print.c: Likewise.
      	* tree-scalar-evolution.c: Likewise.
      	* tree-sra.c: Likewise.
      	* tree-ssa-address.c: Likewise.
      	* tree-ssa-alias.c: Likewise.
      	* tree-ssa-ccp.c: Likewise.
      	* tree-ssa-coalesce.c: Likewise.
      	* tree-ssa-dce.c: Likewise.
      	* tree-ssa-dom.c: Likewise.
      	* tree-ssa-forwprop.c: Likewise.
      	* tree-ssa-live.c: Likewise.
      	* tree-ssa-live.h: 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-math-opts.c: Likewise.
      	* tree-ssa-operands.c: 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-sccvn.h: Likewise.
      	* tree-ssa-strlen.c: Likewise.
      	* tree-ssa-structalias.c: Likewise.
      	* tree-ssa-tail-merge.c: Likewise.
      	* tree-ssa-threadedge.c: Likewise.
      	* tree-ssa-threadupdate.c: Likewise.
      	* tree-ssa-uncprop.c: Likewise.
      	* tree-ssa-uninit.c: Likewise.
      	* tree-ssa.c: Likewise.
      	* tree-ssanames.c: Likewise.
      	* tree-stdarg.c: Likewise.
      	* tree-streamer-in.c: Likewise.
      	* tree-streamer-out.c: Likewise.
      	* tree-streamer.c: Likewise.
      	* tree-streamer.h: Likewise.
      	* tree-switch-conversion.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.h: Likewise.
      	* value-prof.c: Likewise.
      	* value-prof.h: Likewise.
      	* var-tracking.c: Likewise.
      	* varasm.c: Likewise.
      	* varpool.c: Likewise.
      	* vmsdbgout.c: Likewise.
      	* config/bfin/bfin.c: Likewise.
      	* config/c6x/c6x.c: Likewise.
      	* config/darwin.c: Likewise.
      	* config/i386/i386.c: Likewise.
      	* config/ia64/ia64.c: Likewise.
      	* config/mep/mep.c: Likewise.
      	* config/mips/mips.c: Likewise.
      	* config/pa/pa.c: Likewise.
      	* config/rs6000/rs6000-c.c: Likewise.
      	* config/rs6000/rs6000.c: Likewise.
      	* config/rx/rx.c: Likewise.
      	* config/spu/spu-c.c: Likewise.
      	* config/vms/vms.c: Likewise.
      	* config/vxworks.c: Likewise.
      	* config/epiphany/resolve-sw-modes.c: Likewise.
      
      From-SVN: r193595
      Diego Novillo committed
  5. 24 Aug, 2012 1 commit
  6. 03 Nov, 2011 1 commit
    • re PR lto/44965 (lto option code breaks file format with each added option) · 52a35ef7
      2011-11-03  Richard Guenther  <rguenther@suse.de>
      
      	PR lto/44965
      	* lto-opts.c: Re-implement.
      	* lto-streamer.h (lto_register_user_option): Remove.
      	(lto_read_file_options): Likewise.
      	(lto_reissue_options): Likewise.
      	(lto_clear_user_options): Likewise.
      	(lto_clear_file_options): Likewise.
      	* opts-global.c (post_handling_callback): Remove.
      	(set_default_handlers): Do not set post_handling_callback.
      	(decode_options): Remove LTO specific code.
      	* lto-wrapper.c (merge_and_complain): New function.
      	(run_gcc): Read all input file options and
      	prepend a merged set before the linker driver options.
      	* gcc.c (driver_post_handling_callback): Remove.
      	(set_option_handlers): Do not set post_handling_callback.
      	* opts-common.c (handle_option): Do not call post_handling_callback.
      	* opts.h (struct cl_option_handlers): Remove post_handling_callback.
      
      	lto/
      	* lto-lang.c (lto_post_options): Do not read file options.
      	* lto.c (lto_read_all_file_options): Remove.
      	(lto_init): Call lto_set_in_hooks here.
      
      From-SVN: r180827
      Richard Guenther committed
  7. 02 Sep, 2011 1 commit
    • opts.c (print_specific_help): Fix off-by-one compare in assertion check. · 58265ea6
      2011-09-02  Gary Funck <gary@intrepid.com>
      
      	* opts.c (print_specific_help): Fix off-by-one compare in
      	assertion check.
      	* opts.h (CL_PARAMS, CL_WARNING, CL_OPTIMIZATION, CL_DRIVER,
      	CL_TARGET, CL_COMMON, CL_JOINED, CL_SEPARATE, CL_UNDOCUMENTED):
      	Increase by +5 to allow for more languages.
      	* optc-gen.awk: Generate #if that ensures that the number of
      	languages is within the implementation-defined limit.
      
      From-SVN: r178491
      Gary Funck committed
  8. 18 Aug, 2011 1 commit
    • Allow HOST_WIDE_INT for option variable. · 99114bbf
      2011-08-18  H.J. Lu  <hongjiu.lu@intel.com>
      	    Igor Zamyatin <igor.zamyatin@intel.com>
      
      	* hwint.h (HOST_WIDE_INT_1): New.
      
      	* opt-functions.awk (switch_bit_fields): Initialize the
      	host_wide_int field.
      	(host_wide_int_var_name): New.
      	(var_type_struct): Check and return HOST_WIDE_INT.
      
      	* opt-read.awk: Handle HOST_WIDE_INT for "Variable".
      
      	* optc-save-gen.awk: Support HOST_WIDE_INT on var_target_other.
      
      	* opth-gen.awk: Use HOST_WIDE_INT_1 on HOST_WIDE_INT.  Properly
      	check masks for HOST_WIDE_INT.
      
      	* opts-common.c (set_option): Support HOST_WIDE_INT flag_var.
      	(option_enabled): Likewise.
      	(get_option_state): Likewise.
      
      	* opts.h (cl_option): Add cl_host_wide_int.  Change var_value
      	to HOST_WIDE_INT.
      
      Co-Authored-By: Igor Zamyatin <igor.zamyatin@intel.com>
      
      From-SVN: r177864
      H.J. Lu committed
  9. 16 May, 2011 1 commit
    • opts-common.c (opt_enum_arg_to_value): New. · 8023568e
      	* opts-common.c (opt_enum_arg_to_value): New.
      	* opts.h (opt_enum_arg_to_value): Declare.
      	* config/i386/i386.opt (fpmath): Remove.
      	(mfpmath=): Use Enum, Init and Save.
      	(fpmath_unit): New Enum and EnumValue entries.
      	* config/i386/i386-c.c (ix86_pragma_target_parse): Update field
      	name for function fpmath state.
      	* config/i386/i386-opts.h (enum fpmath_unit): Move from i386.h.
      	* config/i386/i386.c: Include diagnostic.h.
      	(ix86_fpmath, IX86_FUNCTION_SPECIFIC_FPMATH): Remove.
      	(ix86_target_string): Take enum fpmath_unit value instead of
      	string.
      	(ix86_debug_options): Update call to ix86_target_string.
      	(ix86_option_override_internal): Don't process fpmath strings
      	here.
      	(x86_function_specific_save, ix86_function_specific_restore):
      	Don't handle fpmath state specially.
      	(ix86_function_specific_print): Pass fpmath state to
      	ix86_target_string instead of printing in this function.
      	(ix86_valid_target_attribute_inner_p): Take gcc_options pointer.
      	Handle enum attributes.
      	(IX86_ATTR_ENUM, ix86_opt_enum): New.
      	(ix86_valid_target_attribute_tree): Update option_strings
      	handling.  Handle fpmath as enum option.
      	(ix86_can_inline_p): Update field names for function fpmath state.
      	(ix86_expand_builtin): Update call to ix86_target_string.
      	* config/i386/i386.h (enum fpmath_unit): Move to i386-opts.h.
      	(ix86_fpmath): Remove.
      	* config/i386/t-i386 (i386.o): Update dependencies.
      
      From-SVN: r173809
      Joseph Myers committed
  10. 04 Apr, 2011 1 commit
    • options.texi (ToLower): Document. · 413519ae
      	* doc/options.texi (ToLower): Document.
      	* opt-functions.awk (switch_bit_fields): Initialize cl_tolower
      	field.
      	* opts-common.c (decode_cmdline_option): Handle cl_tolower.
      	* opts.h (cl_option): Add cl_tolower field.
      	* config/rx/rx.c (rx_handle_option): Use strcmp of -mcpu=
      	arguments with lowercase strings.
      	* config/rx/rx.opt (mcpu=): Add ToLower.
      	* config/rx/t-rx (MULTILIB_MATCHES): Don't handle uppercase -mcpu=
      	argument.
      
      From-SVN: r171932
      Joseph Myers committed
  11. 31 Mar, 2011 1 commit
    • opts.h (cl_option): Add comments to fields. · 300d83d9
      	* opts.h (cl_option): Add comments to fields.  Add bit-fields for
      	various flags.
      	(CL_SEPARATE_NARGS_SHIFT, CL_SEPARATE_NARGS_MASK,
      	CL_SEPARATE_ALIAS, CL_NO_DRIVER_ARG, CL_REJECT_DRIVER, CL_SAVE,
      	CL_DISABLED, CL_REPOR, CL_REJECT_NEGATIVE, CL_MISSING_OK,
      	CL_UINTEGER, CL_NEGATIVE_ALIAS): Remove.
      	(CL_JOINED, CL_SEPARATE, CL_UNDOCUMENTED): Update bit positions.
      	* opt-functions.awk (flag_init, switch_bit_fields): New.
      	(switch_flags): Don't handle flags moved to bit-fields.  Don't
      	generate CL_MISSING_OK or CL_SAVE.
      	* optc-gen.awk: Update to generate bit-field output as well as
      	flags field.
      	* gcc.c (driver_wrong_lang_callback): Use cl_reject_driver
      	bit-field instead of CL_REJECT_DRIVER flag.
      	* opts-common.c (generate_canonical_option,
      	decode_cmdline_option): Use bit-fields instead of CL_* flags.
      	* opts.c (maybe_default_option): Use cl_reject_negative bit-field
      	instead of CL_REJECT_NEGATIVE flag.
      	* toplev.c (print_switch_values): Use cl_report bit-field instead
      	of CL_REPORT flag.
      
      From-SVN: r171804
      Joseph Myers committed
  12. 30 Mar, 2011 1 commit
    • options.texi (NegativeAlias): Document. · 666a21a2
      	* doc/options.texi (NegativeAlias): Document.
      	(Alias): Mention NegativeAlias.
      	* opt-functions.awk: Handle NegativeAlias.
      	* optc-gen.awk: Disallow NegativeAlias with multiple Alias
      	arguments.
      	* opts-common.c (decode_cmdline_option): Handle CL_NEGATIVE_ALIAS.
      	* opts.h (CL_NEGATIVE_ALIAS): Define.
      	* config/rs6000/rs6000.c (rs6000_parse_yes_no_option): Remove.
      	(rs6000_handle_option): Don't handle OPT_mvrsave_, OPT_misel_ and
      	OPT_mspe_.
      	* config/rs6000/rs6000.opt (mvrsave=, misel=, mspe=): Replace with
      	Alias entries.
      	* config/rs6000/t-spe (MULTILIB_OPTIONS, MULTILIB_EXCEPTIONS): Use
      	mno-spe and mno-isel instead of mspe=no and -misel=no.
      
      From-SVN: r171745
      Joseph Myers committed
  13. 29 Mar, 2011 1 commit
    • lto-opts.c (register_user_option_p, [...]): Make type argument unsigned. · eb50f63a
      	* lto-opts.c (register_user_option_p, lto_register_user_option):
      	Make type argument unsigned.
      	* lto-streamer.h (lto_register_user_option): Make type argument
      	unsigned.
      	* opth-gen.awk: Make CL_* macros unsigned.
      	* opts-common.c (find_opt): Make lang_mask argument unsigned.
      	* opts.h (CL_PARAMS, CL_WARNING, CL_OPTIMIZATION, CL_DRIVER,
      	CL_TARGET, CL_COMMON, CL_SEPARATE_NARGS_MASK, CL_SEPARATE_ALIAS,
      	CL_NO_DRIVER_ARG, CL_REJECT_DRIVER, CL_SAVE, CL_DISABLED,
      	CL_REPORT, CL_JOINED, CL_SEPARATE, CL_REJECT_NEGATIVE,
      	CL_MISSING_OK, CL_UINTEGER, CL_UNDOCUMENTED): Make unsigned.
      	(find_opt): Make lang_mask argument unsigned.
      
      From-SVN: r171701
      Joseph Myers committed
  14. 26 Nov, 2010 1 commit
    • options.texi (Enum, EnumValue): Document new record types. · e6d4b984
      	* doc/options.texi (Enum, EnumValue): Document new record types.
      	(Enum): Document new option flag.
      	* opt-functions.awk
      	* optc-gen.awk: Handle enumerated option arguments.
      	* opth-gen.awk: Handle enumerated option arguments.
      	* opts-common.c (enum_arg_ok_for_language, enum_arg_to_value,
      	enum_value_to_arg): New.
      	(decode_cmdline_option): Handle enumerated arguments.
      	(read_cmdline_option): Handle CL_ERR_ENUM_ARG.
      	(set_option, option_enabled, get_option_state): Handle CLVC_ENUM.
      	* opts.c (print_filtered_help, print_specific_help): Take
      	lang_mask arguments.
      	(print_filtered_help): Handle printing values of enumerated
      	options.  Print possible arguments for enumerated options.
      	(print_specific_help): Update call to print_filtered_help.
      	(common_handle_option): Update calls to print_specific_help.  Use
      	value rather than arg for OPT_fdiagnostics_show_location_.  Don't
      	handle OPT_ffp_contract_, OPT_fexcess_precision_,
      	OPT_fvisibility_, OPT_ftls_model_, OPT_fira_algorithm_ or
      	OPT_fira_region_ here.
      	* opts.h (enum cl_var_type): Add CLVC_ENUM.
      	(struct cl_option): Add var_enum.
      	(CL_ENUM_CANONICAL, CL_ENUM_DRIVER_ONLY, struct cl_enum_arg,
      	struct cl_enum, cl_enums, cl_enums_count): New.
      	(CL_ERR_ENUM_ARG): Define.
      	(CL_ERR_NEGATIVE): Update value.
      	(enum_value_to_arg): Declare.
      	* common.opt (flag_ira_algorithm, flag_ira_region,
      	flag_fp_contract_mode, flag_excess_precision_cmdline,
      	default_visibility, flag_tls_default): Remove Variable entries.
      	(help_enum_printed): New Variable.
      	(fdiagnostics-show-location=): Use Enum.  Add associated
      	SourceInclude, Enum and EnumValue entries.
      	(fexcess-precision=, ffp-contract=, fira-algorithm=, fira-region=,
      	ftls-model=, fvisibility=): Use Enum, Var and Init.  Add
      	associated Enum and EnumValue entries.
      
      po:
      	* exgettext: Handle UnknownError.
      
      From-SVN: r167190
      Joseph Myers committed
  15. 24 Nov, 2010 2 commits
    • common.opt (initial_max_fld_align, [...]): New Variable entries. · 299404a1
      	* common.opt (initial_max_fld_align, flag_debug_asm,
      	flag_dump_rtl_in_asm, flag_dump_all_passed, rtl_dump_and_exit,
      	flag_print_asm_name, graph_dump_format, help_printed,
      	help_columns, flag_opts_finished): New Variable entries.
      	(fdbg-cnt-list, fdbg-cnt=, fdebug-prefix-map=, frandom-seed,
      	frandom-seed=): Mark deferred.
      	(fsched-verbose=): Use UInteger and Var.
      	* flags.h (set_struct_debug_option, flag_print_asm_name,
      	rtl_dump_and_exit, flag_debug_asm, flag_dump_rtl_in_asm,
      	graph_dump_format): Don't declare here.
      	* haifa-sched.c (sched_verbose_param, fix_sched_param): Remove.
      	* opts-global.c: Include dbgcnt.h and debug.h.
      	(decode_options): Pass location to finish_options.
      	(handle_common_deferred_options): Check flag_dump_all_passed.
      	Handle OPT_fdbg_cnt_, OPT_fdbg_cnt_list, OPT_fdebug_prefix_map_,
      	OPT_frandom_seed and OPT_frandom_seed_.  Don't assert on
      	OPT_fstack_limit.
      	* opts.c: Don't include toplev.h, dbgcnt.h or debug.h.
      	(set_struct_debug_option): Add location_t parameter.  Update
      	recursive call.  Use error_at.
      	(default_options_optimization): Use error_at.
      	(finish_options): Add location_t parameter.  Use
      	opts->x_flag_opts_finished instead of first_time_p.  Use
      	opts->x_optimize instead of optimize.  Use error_at.  Pass
      	location to inform.
      	(print_filtered_help): Use opts->x_help_printed to track what
      	options have been printed.
      	(print_specific_help): Use opts->x_help_columns to track number of
      	columns.
      	(common_handle_option): Pass locations and gcc_options pointers to
      	more functions.  Use warning_at instead of fnotice and warning.
      	Don't handle OPT_fdbg_cnt_, OPT_fdbg_cnt_list or
      	OPT_fdebug_prefix_map_.  Use error_at.  Set
      	opts->x_initial_max_fld_align; don't set maximum_field_alignment.
      	Don't handle OPT_frandom_seed or OPT_frandom_seed_.  Don't handle
      	OPT_fsched_verbose_.
      	(handle_param): Add location_r parameter.  Use error_at.
      	(set_debug_level): Add location_r parameter.  Use error_at and
      	warning_at.
      	(setup_core_dumping): Add diagnostic_context parameter.
      	(decode_d_option): Add gcc_options, location_t and
      	diagnostic_context parameters and use them instead of global
      	state.  Use warning_at.
      	(enable_warning_as_error): Use error_at.
      	* opts.h (finish_options): Update prototype.
      	(set_struct_debug_option): Declare here.
      	* rtl.h (fix_sched_param): Remove.
      	* stor-layout.c (initial_max_fld_align): Remove.
      	* toplev.c (rtl_dump_and_exit, flag_print_asm_name,
      	graph_dump_format, flag_debug_asm, flag_dump_rtl_in_asm): Remove.
      	(process_options): Set maximum_field_alignment.
      	* tree.h (initial_max_fld_align) Don't declare here.
      	* Makefile.in (opts.o, opts-global.o): Update dependencies.
      
      c-family:
      	* c-opts.c (c_common_handle_option): Pass location to
      	set_struct_debug_option.
      
      testsuite:
      	* gcc.dg/opts-5.c: New test.
      
      From-SVN: r167106
      Joseph Myers committed
    • flag-types.h (struct visibility_flags): Don't declare here. · c98cd5bf
      	* flag-types.h (struct visibility_flags): Don't declare here.
      	* flags.h (strip_off_ending, fast_math_flags_set_p,
      	fast_math_flags_struct_set_p): Declare here.
      	(visibility_options): Don't declare here.
      	* opts-common.c (option_enabled, get_option_state): Move from
      	opts.c.
      	* opts-global.c: Include diagnostic.h instead of
      	diagnostic-core.h.  Include tree.h, langhooks.h, lto-streamer.h
      	and toplev.h.
      	(const_char_p, ignored_options, in_fnames, num_in_fnames,
      	write_langs, complain_wrong_lang, postpone_unknown_option_warning,
      	print_ignored_options, unknown_option_callback,
      	post_handling_callback, lang_handle_option, add_input_filename,
      	read_cmdline_options, initial_lang_mask, init_options_once,
      	decode_cmdline_options_to_array_default_mask,
      	set_default_handlers, decode_options): Move from opts.c.
      	(print_ignored_options): Use warning_at instead of saving and
      	restoring input_location.
      	* opts.c: Include <signal.h> and <sys/resource.h>.  Include rtl.h
      	instead of expr.h.  Don't include langhooks.h, except.h or
      	lto-streamer.h.  Add more comments on includes.
      	(strip_off_ending, setup_core_dumping, decode_d_option): Move from
      	toplev.c.
      	(visibility_options): Move to c-family/c-common.c.
      	(const_char_p, ignored_options, in_fnames, num_in_fnames,
      	write_langs, complain_wrong_lang, postpone_unknown_option_warning,
      	print_ignored_options, unknown_option_callback,
      	post_handling_callback, lang_handle_option, add_input_filename,
      	read_cmdline_options, initial_lang_mask, init_options_once,
      	decode_cmdline_options_to_array_default_mask,
      	set_default_handlers, decode_options): Move to opts-global.c.
      	(target_handle_option, default_options_optimization,
      	finish_options, common_handle_option): Remove static.
      	(option_enabled, get_option_state): Move to opts-common.c.
      	* opts.h (common_handle_option, target_handle_option,
      	finish_options, default_options_optimization): Declare.
      	* toplev.c: Don't include <signal.h> or <sys/resource.h>.
      	(setup_core_dumping, strip_off_ending, decode_d_option): Move to
      	opts.c.
      	* toplev.h (strip_off_ending, decode_d_option,
      	fast_math_flags_set_p, fast_math_flags_struct_set_p): Don't
      	declare here.
      	* Makefile.in (opts.o, opts-global.o): Update dependencies.
      
      c-family:
      	* c-common.c (visibility_options): Move from ../opts.c.
      	* c-common.h (struct visibility_flags, visibility_options):
      	Declare here.
      	* c-opts.c (finish_options): Rename to c_finish_options.
      	(c_common_init): Update call to finish_options.
      
      From-SVN: r167105
      Joseph Myers committed
  16. 19 Nov, 2010 1 commit
    • options.texi (Var): Document effects of Defer. · 21bf1558
      	* doc/options.texi (Var): Document effects of Defer.
      	(Defer): Document.
      	* opt-functions.awk (var_type, var_set): Handle deferred options.
      	* opts-common.c (set_option): Handle CLVC_DEFER.
      	* common.opt (fcall-saved-, fcall-used-, fdump-, ffixed-,
      	fplugin=, fplugin-arg-, fstack-limit, fstack-limit-register=,
      	fstack-limit-symbol=): Mark as deferred.
      	* opts.c: Don't include rtl.h, ggc.h, output.h, tree-pass.h or
      	plugin.h.
      	(print_filtered_help): Don't report state of CLVC_DEFER options.
      	(common_handle_option): Move code for OPT_fcall_used_,
      	OPT_fcall_saved_, OPT_fdump_, OPT_ffixed_, OPT_fplugin_,
      	OPT_fplugin_arg_, OPT_fstack_limit, OPT_fstack_limit_register_ and
      	OPT_fstack_limit_symbol_ to opts-global.c.
      	(option_enabled, get_option_state): Handle CLVC_DEFER.
      	* opts.h: Include vec.h.
      	(enum cl_var_type): Add CLVC_DEFER.
      	(cl_deferred_option): Define type and vectors.
      	(handle_common_deferred_options): Declare.
      	* opts-global.c: New.
      	* toplev.c (toplev_main): Call handle_common_deferred_options
      	* Makefile.in (OPTS_H): Include $(VEC_H).
      	(OBJS-common): Include opts-global.o.
      	(opts.o): Update dependencies.
      	(opts-global.o): Add dependencies.
      
      From-SVN: r166942
      Joseph Myers committed
  17. 12 Nov, 2010 2 commits
    • opts-common.c (control_warning_option): New. · c5fa0890
      	* opts-common.c (control_warning_option): New.
      	* opts.c (set_default_handlers): New.
      	(decode_options): Use set_default_handlers and
      	control_warning_option.
      	(common_handle_option): Update call to enable_warning_as_error.
      	(enable_warning_as_error): Take gcc_options parameters.  Use
      	control_warning_option.
      	* opts.h (set_default_handlers, control_warning_option): Declare.
      
      c-family:
      	* c-common.h (c_family_lang_mask): Declare.
      	* c-opts.c (c_family_lang_mask): Make extern.
      	* c-pragma.c (handle_pragma_diagnostic): Use
      	control_warning_option.
      
      testsuite:
      	* gcc.dg/pragma-diag-2.c: New test.
      
      From-SVN: r166689
      Joseph Myers committed
    • Makefile.in (OPTS_H): Define. · a4d8c676
      	* Makefile.in (OPTS_H): Define.
      	(c-decl.o, c-family/c-common.o, c-family/c-opts.o,
      	c-family/c-pch.o, c-family/c-pragma.o, gcc.o, gccspec.o,
      	cppspec.o, options.o, gcc-options.o, lto-opts.o, opts.o,
      	opts-common.o, toplev.o, passes.o, matrix-reorg.o,
      	ipa-struct-reorg.o, PLUGIN_HEADERS): Use $(OPTS_H).
      	* gcc.c (driver_handle_option): Take location_t parameter.
      	(process_command, do_self_spec): Update calls to
      	read_cmdline_option.
      	* langhooks-def.h (lhd_handle_option): Take location_t parameter.
      	* langhooks.c (lhd_handle_option): Take location_t parameter.
      	* langhooks.h (handle_option): Take location_t parameter.
      	* lto-opts.c (lto_reissue_options): Update call to set_option.
      	* opts-common.c (handle_option): Make static.  Take location_t
      	parameter and pass it to other functions.
      	(handle_generated_option): Take location_t parameter and pass it
      	to other functions.
      	(read_cmdline_option): Take location_t parameter and pass it to
      	other functions.  Use warning_at and error_at.
      	(set_option): Take location_t parameter and pass it to other
      	functions.
      	* opts.c (common_handle_option): Take location_t parameter and
      	pass it to other functions.
      	(enable_warning_as_error): Make static.  Take location_t parameter
      	and pass it to other functions.
      	(lang_handle_option): Take location_t parameter and pass it to
      	other functions.
      	(target_handle_option): Take location_t parameter.
      	(read_cmdline_options, maybe_default_option,
      	maybe_default_options, default_options_optimization,
      	decode_options): Take location_t parameter and pass it to other
      	functions.
      	* opts.h: Include input.h.
      	(struct cl_option_handler_func, decode_options, set_option,
      	handle_generated_option, read_cmdline_option): Take location_t
      	parameters.
      	(handle_option, enable_warning_as_error): Remove.
      	* toplev.c (toplev_main): Update call to decode_options.
      
      ada:
      	* gcc-interface/Make-lang.in (ada/misc.o): Use $(OPTS_H).
      	* gcc-interface/misc.c (gnat_handle_option): Take location_t
      	parameter.
      
      c-family:
      	* c-common.c (parse_optimize_options): Update call to
      	decode_options.
      	* c-common.h (c_common_handle_option): Update prototype.
      	* c-opts.c (c_common_handle_option): Take location_t parameter and
      	pass it to other functions.
      
      cp:
      	* Make-lang.in (g++spec.o): Use $(OPTS_H).
      
      fortran:
      	* Make-lang.in (gfortranspec.o): Use $(OPTS_H).
      	* gfortran.h (gfc_handle_option): Take location_t parameter.
      	* options.c (gfc_handle_option): Take location_t parameter.
      
      java:
      	* Make-lang.in (jvspec.o, java/lang.o): Use $(OPTS_H).
      	* lang.c (java_handle_option): Take location_t parameter.
      
      lto:
      	* Make-lang.in (lto/lto.o): Use $(OPTS_H).
      	* lto-lang.c (lto_handle_option): Take location_t parameter.
      
      From-SVN: r166688
      Joseph Myers committed
  18. 11 Nov, 2010 1 commit
    • opts.c (warning_as_error_callback, [...]): Remove. · f954bd2c
      	* opts.c (warning_as_error_callback,
      	register_warning_as_error_callback): Remove.
      	(enable_warning_as_error): Don't use warning_as_error_callback.
      	* opts.h (register_warning_as_error_callback): Remove.
      
      c-family:
      	* c-opts.c (warning_as_error_callback): Remove.
      	(c_common_initialize_diagnostics): Don't call
      	register_warning_as_error_callback.
      	(c_common_handle_option): Handle -Werror=normalized= here.
      
      testsuite:
      	* gcc.dg/cpp/warn-normalized-3.c: Update expected note text.
      
      From-SVN: r166606
      Joseph Myers committed
  19. 10 Nov, 2010 1 commit
    • common.opt (flag_excess_precision_cmdline, [...]): New Variable declarations. · d5478783
      	* common.opt (flag_excess_precision_cmdline, flag_generate_lto,
      	warn_larger_than, larger_than_size, warn_frame_larger_than,
      	frame_larger_than_size, flag_gen_aux_info, flag_shlib,
      	default_visibility, flag_tls_default): New Variable declarations.
      	(aux-info, auxbase, dumpbase, dumpdir, falign-functions=,
      	falign-jumps=, falign-labels=, falign-loops=, o, v): Use Var.
      	(v): Declare as Common and document here.
      	* flags.h (default_visibility, flag_generate_lto,
      	warn_larger_than, larger_than_size, warn_frame_larger_than,
      	frame_larger_than_size, flag_gen_aux_info, flag_pedantic_errors,
      	flag_shlib, flag_excess_precision_cmdline): Remove.
      	(set_Wstrict_aliasing): Update prototype.
      	* gcc.c (verbose_flag): Remove.
      	(driver_handle_option): Add diagnostic_context parameter.  Don't
      	handle OPT_v explicitly here.  Set verbose_flag to 1 rather than
      	incrementing it.
      	* opts-common.c (handle_option): Pass dc to handler.
      	* opts.c (warn_larger_than, larger_than_size,
      	warn_frame_larger_than, frame_larger_than_size,
      	default_visibility): Remove.
      	(common_handle_option): Add diagnostic_context parameter.
      	(set_fast_math_flags, set_unsafe_math_optimizations_flags): Add
      	gcc_options parameters.
      	(lang_handle_option, target_handle_option, read_cmdline_options,
      	decode_options): Add diagnostic_context parameters.
      	(finish_options): Access option state through opts pointer where
      	possible.
      	(common_handle_option): Access option state through opts pointer
      	where possible.  Do not set local static variable verbose.  Do not
      	explicitly handle OPT_v, OPT_Wstrict_aliasing_,
      	OPT_Wstrict_overflow_, OPT_Wunused, OPT_auxbase, OPT_dumpbase,
      	OPT_dumpdir, OPT_falign_functions_, OPT_falign_jumps_,
      	OPT_falign_labels_, OPT_falign_loops_, OPT_fira_verbose_, OPT_o or
      	OPT_fwhopr_.  Do not explicitly set .opt file variables for
      	OPT_aux_info or OPT_pedantic_errors.  Use dc for diagnostic
      	context.
      	(set_Wstrict_aliasing): Add gcc_options parameter.
      	* opts.h (struct cl_option_handler_func): Add diagnostic_context
      	parameter to handler.
      	(decode_options): Add diagnostic_context parameter.
      	* toplev.c (dump_base_name, dump_dir_name, aux_base_name,
      	asm_file_name, flag_generate_lto, flag_gen_aux_info,
      	aux_info_file_name, flag_shlib, flag_tls_default,
      	flag_excess_precision_cmdline, flag_pedantic_errors): Remove.
      	(toplev_main): Pass global_dc to decode_options.
      	* toplev.h (dump_base_name, dump_dir_name, aux_base_name,
      	aux_info_file_name, asm_file_name): Remove.
      	* tree.h (flag_tls_default): Remove.
      
      c-family:
      	* c-common.c (parse_optimize_options): Pass global_dc to
      	decode_options.
      	* c-opts.c (c_common_handle_option): Pass &global_options to
      	set_Wstrict_aliasing.
      	* c.opt (v): Don't mark Common or document here.
      
      fortran:
      	* cpp.c (asm_file_name): Don't declare here.
      
      objc:
      	* objc-act.c (dump_base_name): Don't declare here.
      
      From-SVN: r166565
      Joseph Myers committed
  20. 05 Nov, 2010 1 commit
    • defaults.h (DEFAULT_WORD_SWITCH_TAKES_ARG, [...]): Remove. · c243beb0
      	* defaults.h (DEFAULT_WORD_SWITCH_TAKES_ARG,
      	WORD_SWITCH_TAKES_ARG): Remove.
      	* doc/options.texi (Args): Document.
      	* doc/tm.texi.in (WORD_SWITCH_TAKES_ARG): Remove.
      	* doc/tm.texi: Regenerate.
      	* opt-functions.awk (switch_flags): Handle Args.
      	* opts-common.c: Update comment on tm.h include.
      	(decode_cmdline_option): Handle options with multiple arguments.
      	Don't check WORD_SWITCH_TAKES_ARG for unknown options.
      	* opts.h (CL_SEPARATE_NARGS_SHIFT, CL_SEPARATE_NARGS_MASK):
      	Define.
      	(CL_PARAMS, CL_WARNING, CL_OPTIMIZATION, CL_DRIVER, CL_TARGET,
      	CL_COMMON): Update values.
      	* system.h (WORD_SWITCH_TAKES_ARG): Poison.
      	* config/darwin.h (WORD_SWITCH_TAKES_ARG): Remove.
      	* config/darwin.opt (Zsegaddr, sectalign, sectcreate,
      	sectobjectsymbols, sectorder, segcreate, segprot): New.
      
      From-SVN: r166359
      Joseph Myers committed
  21. 08 Oct, 2010 1 commit
    • Makefile.in (TM_H): Include $(FLAGS_H) instead of options.h. · a75bfaa6
      	* Makefile.in (TM_H): Include $(FLAGS_H) instead of options.h.
      	(TREE_H): Include $(FLAGS_H) instead of options.h.
      	(opts-common.o): Depend on $(FLAGS_H) instead of options.h.
      	* c-objc-common.h (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
      	* common.opt (flag_complex_method, flag_evaluation_order,
      	flag_ira_algorithm, flag_ira_region, flag_warn_unused_result): New
      	Variable declarations.
      	* configure.ac (tm_include_list): Include flags.h instead of
      	options.h.
      	* configure: Regenerate.
      	* flags.h: Condition out contents for target libraries.  Include
      	options.h at end of file.
      	(flag_complex_method, flag_ira_algorithm, flag_ira_region,
      	flag_evaluation_order, flag_warn_unused_result): Remove.
      	* gcc.c (main): Intialize global_options with global_options_init.
      	* langhooks-def.h (lhd_init_options_struct): Declare.
      	(LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
      	(LANG_HOOKS_INITIALIZER): Include LANG_HOOKS_INIT_OPTIONS_STRUCT.
      	* langhooks.c (lhd_init_options_struct): New.
      	* langhooks.h (struct lang_hooks): Add init_options_struct.
      	Update comment on init_options.
      	* optc-gen.awk: Generate initializer for global_options_init, not
      	global_options.
      	* opth-gen.awk: Condition out structure declarations for target
      	libraries.  Declare global_options_init.
      	* opts-common.c: Include flags.h instead of options.h.
      	* opts.c (flag_warn_unused_result): Remove.
      	(read_cmdline_options): Take gcc_options parameters.  Pass them to
      	read_cmdline_option.
      	(initial_lang_mask, initial_min_crossjump_insns,
      	initial_max_fields_for_field_sensitive,
      	initial_loop_invariant_max_bbs_in_loop): Define at file scope.
      	(init_options_once): New.  Split out of decode_options.
      	(init_options_struct): New.  Split out of decode_options.
      	(decode_cmdline_options_to_array_default_mask): New.
      	(default_options_optimization): New.  Split out of decode_options.
      	(decode_options): Move most code to other functions.  Update call
      	to read_cmdline_options.
      	(finish_options): New.  Split out of decode_options.
      	* opts.h (decode_options): Add gcc_options parameters.
      	(init_options_once, init_options_struct,
      	decode_cmdline_options_to_array_default_mask): New.
      	* toplev.c (flag_complex_method, flag_ira_algorithm,
      	flag_ira_region, flag_evaluation_order): Remove.
      	(general_init): Use global_options_init for initial flag values
      	for global_dc.
      	(toplev_main): Call init_options_once, init_options_struct,
      	lang_hooks.init_options_struct,
      	decode_cmdline_options_to_array_default_mask and
      	lang_hooks.init_option before decode_options.  Update arguments to
      	decode_options.
      	* tree.h: Include flags.h instead of options.h.
      
      ada:
      	* gcc-interface/misc.c (gnat_init_options_struct): New.  Split out
      	from gnat_init_options.
      	(LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
      
      c-family:
      	* c-common.c (parse_optimize_options): Call
      	decode_cmdline_options_to_array_default_mask before
      	decode_options.  Update arguments to decode_options.
      	* c-common.h (c_common_init_options_struct): Declare.
      	* c-opts.c (c_common_init_options_struct): New.  Split out from
      	c_common_init_options.
      
      cp:
      	* cp-objcp-common.h (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
      
      fortran:
      	* f95-lang.c (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
      	* gfortran.h (gfc_init_options_struct): Declare.
      	* options.c (gfc_init_options_struct): New.  Split out from
      	gfc_init_options.
      
      java:
      	* lang.c (java_init_options_struct): New.  Split out from
      	java_init_options.
      	(LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
      
      lto:
      	* lto-lang.c (lto_init_options): Change to
      	lto_init_options_struct.  Update parameters.
      	(LANG_HOOKS_INIT_OPTIONS): Don't define.
      	(LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
      
      From-SVN: r165189
      Joseph Myers committed
  22. 05 Oct, 2010 1 commit
    • opts-common.c (handle_option, [...]): Add diagnostic_context parameter. · 1ebe4b4f
      	* opts-common.c (handle_option, handle_generated_option,
      	read_cmdline_option, set_option): Add diagnostic_context
      	parameter.  Update calls among these functions.
      	(set_option): Don't use global_dc.
      	* opts.c (read_cmdline_options): Pass global_dc to
      	read_cmdline_option.
      	(decode_options): Pass global_dc to enable_warning_as_error.
      	(common_handle_option): Pass global_dc to enable_warning_as_error.
      	(enable_warning_as_error): Add diagnostic_context parameter.
      	Document parameters.  Don't use global_dc.  Pass
      	diagnostic_context parameter to handle_generated_option.
      	* opts.h (set_option, handle_option, handle_generated_option,
      	read_cmdline_option, enable_warning_as_error): Add
      	diagnostic_context parameter.
      	* Makefile.in (lto-opts.o): Update dependencies.
      	* coretypes.h (struct diagnostic_context, diagnostic_context):
      	Declare here.
      	* diagnostic.h (diagnostic_context): Don't declare typedef here.
      	* gcc.c (process_command): Pass global_dc to read_cmdline_option.
      	* langhooks-def.h (struct diagnostic_context): Don't declare here.
      	(lhd_print_error_function, lhd_initialize_diagnostics): Declare
      	using diagnostic_context typedef.
      	* langhooks.c (lhd_initialize_diagnostics): Declare using
      	diagnostic_context typedef.
      	* langhooks.h (struct diagnostic_context): Don't declare here.
      	(initialize_diagnostics, print_error_function): Declare using
      	diagnostic_context typedef.
      	* lto-opts.c: Include diagnostic.h.
      	(lto_reissue_options): Pass global_dc to set_option.  Pass
      	DK_UNSPECIFIED not 0.
      	* plugin.c (plugins_internal_error_function): Declare using
      	diagnostic_context typedef.
      	* plugin.h (struct diagnostic_context): Don't declare here.
      	(plugins_internal_error_function): Declare using
      	diagnostic_context typedef.
      
      c-family:
      	* c-common.h (struct diagnostic_context): Don't declare here.
      	(c_common_initialize_diagnostics): Declare using
      	diagnostic_context typedef.
      	* c-opts.c (c_common_handle_option): Pass global_dc to
      	handle_generated_option.
      
      cp:
      	* cp-tree.h (cxx_print_error_function,
      	cxx_initialize_diagnostics): Declare using diagnostic_context
      	typedef.
      
      From-SVN: r164991
      Joseph Myers committed
  23. 04 Oct, 2010 1 commit
    • optc-gen.awk: Define global_options_set. · d4d24ba4
      	* optc-gen.awk: Define global_options_set.  Don't define
      	target_flags_explicit.
      	* opth-gen.awk: Declare global_options_set.  Define
      	target_flags_explicit as macro.
      	* opts-common.c (handle_option): Take opts_set and generated_p
      	parameters.
      	(handle_generated_option, read_cmdline_option, set_option): Take
      	opts_set parameter.
      	(set_option): Use opts_set instead of hardcoding target_flags and
      	target_flags_explicit.
      	* opts.c (sel_sched_switch_set, profile_arc_flag_set,
      	flag_profile_values_set, flag_unroll_loops_set, flag_tracer_set,
      	flag_value_profile_transformations_set, flag_peel_loops_set,
      	flag_branch_probabilities_set, flag_inline_functions_set,
      	flag_ipa_cp_set, flag_ipa_cp_clone_set,
      	flag_predictive_commoning_set, flag_unswitch_loops_set,
      	flag_gcse_after_reload_set): Remove.
      	(common_handle_option, lang_handle_option, target_handle_option):
      	Take opts_set parameter.  Assert that it is &global_options_set.
      	(common_handle_option): Don't set _set variables.  Check opts_set
      	instead of such variables.
      	(enable_warning_as_error): Pass &global_options_set to
      	handle_generated_option.
      	* opts.h (cl_option_handler_func.handler, set_option,
      	handle_option, handle_generated_option, read_cmdline_option): Add
      	opts_set parameters.
      	(handle_option): Add generated_p parameter.
      	* config/i386/i386.c (ix86_function_specific_save,
      	ix86_function_specific_restore): Updat for renaming of
      	target_flags_explicit field.
      	* config/i386/i386.opt (target_flags_explicit): Rename to
      	ix86_target_flags_explicit.
      	* config/ia64/ia64.c (ia64_override_options_after_change): Check
      	global_options_set.x_flag_selective_scheduling and
      	global_options_set.x_flag_selective_scheduling2, not
      	sel_sched_switch_set.
      	* flags.h (sel_sched_switch_set,
      	flag_speculative_prefetching_set): Remove.
      	* gcc.c (driver_handle_option): Take opts_set parameter.  Assert
      	that it is &global_options_set.
      	(process_command): Pass &global_options_set to
      	read_cmdline_option.
      	* lto-opts.c (lto_reissue_options): Pass &global_options_set to
      	set_option.
      	* toplev.c (target_flags_explicit): Remove.
      
      c-family:
      	* c-opts.c (c_common_handle_option): Pass &global_options_set to
      	handle_generated_option.
      
      From-SVN: r164932
      Joseph Myers committed
  24. 30 Sep, 2010 1 commit
    • opt-functions.awk (static_var): Update comment. · 46625112
      	* opt-functions.awk (static_var): Update comment.
      	(var_ref): Return offsetof expression or -1, not variable address.
      	* optc-gen.awk: Generate structure field initializers instead of
      	static variables.  Expect -1 for missing variables instead of null
      	pointer.  Add gcc_options parameters to generated functions.
      	* opth-gen.awk: Generate structure fields for static variables.
      	Add gcc_options parameters to generated functions.
      	* common.opt (optimize, optimize_size): Add variables.
      	* config/i386/i386-c.c (ix86_pragma_target_parse): Pass
      	&global_options to cl_target_option_restore.
      	* config/i386/i386.c (ix86_valid_target_attribute_p): Pass
      	&global_options to cl_optimization_restore, cl_target_option_save
      	and cl_target_option_restore.
      	(ix86_set_current_function): Pass &global_options to
      	cl_target_option_restore.
      	* config/pdp11/pdp11.h (optimize): Remove.
      	* config/rs6000/rs6000.h (optimize): Remove.
      	* config/sh/sh.h (optimize): Remove.
      	* config/xtensa/xtensa.h (optimize): Remove.
      	* coretypes.h (struct gcc_options): Declare.
      	* diagnostic.c (diagnostic_initialize): Initialize
      	context->option_state.
      	(diagnostic_report_diagnostic): Pass option_state to
      	option_enabled hook.
      	* diagnostic.h (diagnostic_context.option_enabled): Add void *
      	parameter.
      	(diagnostic_context.option_state): New field.
      	* final.c (final_start_function, final, final_scan_insn): Rename
      	optimize parameter to optimize_p.
      	* flags.h (optimize, optimize_size): Remove.
      	* function.c (invoke_set_current_function_hook): Pass
      	&global_options to cl_optimization_restore.
      	* gcc.c (driver_handle_option): Take gcc_options parameter.
      	Assert that it is &global_options.
      	(process_command): Pass &global_options to read_cmdline_option.
      	* ipa-pure-const.c (suggest_attribute): Pass &global_options to
      	option_enabled.
      	* lto-opts.c (lto_reissue_options): Use option_flag_var.  Pass
      	&global_options to set_option.
      	* opts-common.c (handle_option, handle_generated_option,
      	read_cmdline_option, set_option): Take explicit gcc_options
      	parameters.  Use option_flag_var.
      	(option_flag_var): New.
      	* opts.c (common_handle_option, lang_handle_option,
      	target_handle_option): Take gcc_options parameter.  Assert that it
      	is &global_options.
      	(read_cmdline_options): Pass &global_options to
      	read_cmdline_option.
      	(print_filtered_help): Use option_flag_var.  Pass &global_options
      	to option_enabled.
      	(common_handle_option): Use option_flag_var.
      	(option_enabled): Take opts parameter.  Use option_flag_var.
      	(get_option_state): Take gcc_options parameter.  Use
      	option_flag_var.  Pass gcc_options parameter to option_enabled.
      	(enable_warning_as_error): Pass &global_options to
      	handle_generated_option.
      	* opts.h (struct cl_option): Change flag_var to flag_var_offset.
      	(cl_option_handler_func.handler): Take gcc_options parameter.
      	(option_enabled, get_option_state, set_option, handle_option,
      	handle_generated_option, read_cmdline_option): Take gcc_options
      	parameters.
      	* toplev.c (optimize, optimize_size): Remove.
      	(print_switch_values): Pass &global_options to option_enabled.
      	(option_affects_pch_p): Use option_flag_var.  Pass &global_options
      	to get_option_state.
      	(general_init): Initialize global_dc->option_state.
      	* tree.c (build_optimization_node): Pass &global_options to
      	cl_optimization_save.
      	(build_target_option_node): Pass &global_options to
      	cl_target_option_save.
      
      c-family:
      	* c-common.c (handle_optimize_attribute): Pass &global_options to
      	cl_optimization_save and cl_optimization_restore.
      	* c-opts.c (c_common_handle_option): Pass &global_options to
      	handle_generated_option.
      	* c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
      	(handle_pragma_pop_options, handle_pragma_reset_options): Pass
      	&global_options to cl_optimization_restore.
      
      From-SVN: r164751
      Joseph Myers committed
  25. 22 Sep, 2010 1 commit
    • opts-common.c (prune_options): Make static. · 60cf253a
      	* opts-common.c (prune_options): Make static.  Work with decoded
      	options.
      	(decode_cmdline_options_to_array): Call prune_options.  Don't
      	resize option array here.
      	* opts.h (prune_options): Remove prototype.
      	* gcc.c (process_command): Take decoded options; don't call
      	decode_cmdline_options_to_array here.  Use decoded options for
      	argv[0].
      	(main): Call decode_cmdline_options_to_array here instead of
      	prune_options.  Update call to process_command.
      	* config/darwin-driver.c: Include opts.h.
      	(darwin_default_min_version): Work with decoded options.  Don't
      	handle -b or -V here.
      	* config/darwin.h (darwin_default_min_version): Update prototype.
      	(GCC_DRIVER_HOST_INITIALIZATION): Update call to
      	darwin_default_min_version.
      	* config/i386/cygwin.h (mingw_scan): Update prototype.
      	(GCC_DRIVER_HOST_INITIALIZATION): Update call to mingw_scan.
      	* config/i386/cygwin1.c: Include opts.h.
      	(mingw_scan): Work with decoded options.
      	* config/i386/t-cygwin (cygwin1.o): Update dependencies.
      	* config/t-darwin (darwin-driver.o): Update dependencies.
      
      From-SVN: r164532
      Joseph Myers committed
  26. 03 Sep, 2010 1 commit
    • options.texi (SeparateAlias): Document. · d1583032
      	* doc/options.texi (SeparateAlias): Document.
      	* opt-functions.awk (switch_flags): Handle SeparateAlias.
      	* opth-gen.awk: Generate enumeration names for options marked
      	SeparateAlias, but not for those marked Ignore.
      	* opts-common.c (generate_canonical_option): Don't output separate
      	argument for options marked CL_SEPARATE_ALIAS.
      	(decode_cmdline_option): Handle CL_SEPARATE_ALIAS.
      	* opts.h (CL_SEPARATE_ALIAS): New.
      	(CL_PARAMS, CL_WARNING, CL_OPTIMIZATION, CL_DRIVER, CL_TARGET,
      	CL_COMMON): Adjust definitions.
      	* config/i386/darwin.opt, config/mips/sde.opt: New.
      	* common.opt (fdump-final-insns): New.
      	* config.gcc (i[34567]86-*-darwin*, x86_64-*-darwin*): Add
      	i386/darwin.opt.
      	(mips*-sde-elf*): Add mips/sde.opt.
      	* config/mips/sde.h (DRIVER_SELF_SPECS): Don't handle
      	-mno-data-in-code and -mcode-xonly here.
      	* defaults.h (DEFAULT_SWITCH_TAKES_ARG): Add 'd'.
      	* gcc.c (option_map): Add "j" to --dump entry.
      	(translate_options): Don't translate -d to -foutput-class-dir=
      	here.
      
      java:
      	* lang.opt (d): New.
      
      testsuite:
      	* gcc.dg/opts-4.c: New test.
      
      From-SVN: r163844
      Joseph Myers committed
  27. 02 Sep, 2010 2 commits
    • opts.h (struct cl_option): Add warn_message field. · 2d2bd949
      	* opts.h (struct cl_option): Add warn_message field.
      	(struct cl_decoded_option): Add warn_message field.
      	* doc/options.texi (Ignore, Warn): Document.
      	* opt-functions.awk (needs_state_p): Don't consider aliases or
      	ignored options to need state saved.
      	* optc-gen.awk: Handle Warn and Ignore.
      	* opth-gen.awk: Output OPT_SPECIAL_ignore.
      	* opts-common.c (decode_cmdline_option): Set warn_message field.
      	Handle ignored options.
      	(decode_cmdline_options_to_array, generate_option,
      	generate_option_input_file): Set warn_message field.
      	(read_cmdline_option): Generate warnings from warn_message field.
      	Handle ignored options.
      	* common.opt (Wunreachable-code, fargument-alias,
      	fargument-noalias, fargument-noalias-global,
      	fargument-noalias-anything, fcse-skip-blocks, fforce-addr,
      	floop-optimize, frerun-loop-opt, fsched2-use-traces, fsee,
      	fstrength-reduce, ftree-store-ccp, ftree-store-copy-prop,
      	ftree-salias): Mark Ignore.
      	* config/i386/i386.h (CC1_CPU_SPEC_1): Don't handle -mcpu,
      	-mintel-syntax and -mno-intel-syntax here.
      	* config/i386/i386.opt (mcpu=, mintel-syntax): Define as aliases
      	using Warn.
      	* opts.c (common_handle_option): Don't handle options marked as
      	ignored.
      	(enable_warning_as_error): Handle ignored options.
      
      c-family:
      	* c.opt (Wimport, fall-virtual, falt-external-templates,
      	fdefault-inline, fenum-int-equiv, fexternal-templates,
      	fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
      	fname-mangling-version-, fnew-abi, fnonnull-objects,
      	foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
      	fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
      	applicable.
      	(fhandle-exceptions): Mark with Alias and Warn.
      	* c-opts.c (c_common_handle_option): Don't handle options marked
      	as ignored.
      
      po:
      	* exgettext: Handle {} in operand of MissingArgError.  Handle
      	Warn.
      
      From-SVN: r163771
      Joseph Myers committed
    • re PR driver/44076 (-MT <target> behaves different as -MT<target> (w/o space)) · 5de8299c
      	PR driver/44076
      	* opts.h (struct cl_option): Add alias_arg, neg_alias_arg and
      	alias_target fields.
      	* opt-functions.awk (opt_sanitized_name): Don't handle
      	finline-limit=, Wlarger-than= and ftemplate-depth= specially.
      	* optc-gen.awk: Generate alias fields.
      	* opth-gen.awk: Explicitly give values for OPT_* enum constants.
      	Don't generate such constants for aliases.
      	* opts-common.c (generate_canonical_option): New.
      	(decode_cmdline_option): Handle aliases.  Use
      	generate_canonical_option for known options instead of copying the
      	input option text.
      	* doc/options.texi (Alias): Document.
      	* common.opt (W, Wlarger-than-, aux-info=, finline-limit-,
      	fstack-check, specs): Mark as aliases.
      	* gcc.c (driver_handle_option): Canonicalize -L options to joined
      	arguments.
      	(driver_handle_option): Don't handle OPT_specs.
      	* opts.c (common_handle_option): Don't handle options marked as
      	aliases.
      	(enable_warning_as_error): Handle aliases.
      	* stor-layout.c (layout_decl): Use OPT_Wlarger_than_ instead of
      	OPT_Wlarger_than_eq.
      	* tree-optimize.c (tree_rest_of_compilation): Use
      	OPT_Wlarger_than_ instead of OPT_Wlarger_than_eq.
      
      c-family:
      	* c.opt (Wcomments, Werror-implicit-function-declaration,
      	ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
      	std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
      	aliases.
      	* c-common.c (option_codes): Use OPT_Wcomment instead of
      	OPT_Wcomments.
      	* c-opts.c (warning_as_error_callback, c_common_handle_option):
      	Don't handle options marked as aliases.
      
      java:
      	* lang.opt (CLASSPATH, bootclasspath, classpath, encoding,
      	fCLASSPATH=): Mark as Java options and as aliases.
      	* jvspec.c (jvgenmain_spec): Don't handle -fCLASSPATH*.
      	(lang_specific_driver): Don't handle options marked as aliases.
      	* lang.c (java_handle_option): Don't handle OPT_fCLASSPATH_.
      
      testsuite:
      	* gcc.dg/cpp/warn-comments-3.c: New.  Based on warn-comments-2.c
      	but using -Werror=comment.
      	* gcc.dg/cpp/warn-comments.c, gcc.dg/cpp/warn-comments-2.c: Adjust
      	expected error messages.
      
      From-SVN: r163770
      Joseph Myers committed
  28. 30 Aug, 2010 1 commit
    • opts.h (CL_ERR_NEGATIVE): Define. · 184eb658
      	* opts.h (CL_ERR_NEGATIVE): Define.
      	* opts.c (unknown_option_callback): Don't postpone warnings for
      	options marked with CL_ERR_NEGATIVE.
      	* opts-common.c (decode_cmdline_option): Set CL_ERR_NEGATIVE error
      	for negative versions of CL_REJECT_NEGATIVE options.
      
      testsuite:
      	* gcc.dg/opts-1.c: Expect errors, not warnings.
      
      From-SVN: r163637
      Joseph Myers committed
  29. 22 Aug, 2010 1 commit
    • Makefile.in (gccspec.o, cppspec.o): Update dependencies. · d9d16a19
      	* Makefile.in (gccspec.o, cppspec.o): Update dependencies.
      	* common.opt (L, nodefaultlibs, nostdlib, pg, static): New
      	options.
      	* config/avr/avr.h (LIBSTDCXX): Remove initial "-l".
      	* config/freebsd.h (MATH_LIBRARY_PROFILE): Remove initial "-l".
      	* config/i386/djgpp.h (LIBSTDCXX): Remove initial "-l".
      	* config/rs6000/aix.h (LIBSTDCXX_STATIC): Remove initial "-l".
      	* config/s390/tpf.h (MATH_LIBRARY, LIBSTDCXX): Remove initial
      	"-l".
      	* cppspec.c: Include opts.h.
      	(lang_specific_driver): Use cl_decoded_option structures.
      	* doc/tm.texi.in (MATH_LIBRARY): Update documentation.
      	* doc/tm.texi: Regenerate.
      	* gcc.c (translate_options): Translate -d to -foutput-class-dir=.
      	(driver_handle_option): Allow driver options needing no special
      	processing.
      	(process_command): Decode options before call to
      	lang_specific_driver.  Pass decoded options to
      	lang_specific_driver.
      	* gcc.h (lang_specific_driver): Update prototype.
      	* gccspec.c: Include opts.h.
      	(lang_specific_driver): Use cl_decoded_option structures.
      	* opts-common.c (option_ok_for_language, generate_option,
      	generate_option_input_file): New.
      	(decode_cmdline_option): Use option_ok_for_language.
      	(decode_cmdline_options_to_array): Use generate_option_input_file.
      	(handle_generated_option): Use generate_option.
      	* opts.h (generate_option, generate_option_input_file): Declare.
      
      cp:
      	* Make-lang.in (g++spec.o): Update dependencies.
      	* g++spec.c: Include opts.h
      	(MATH_LIBRARY, LIBSTDCXX): Remove initial "-l".
      	(lang_specific_driver): Use cl_decoded_option structures.
      
      fortran:
      	* Make-lang.in (gfortranspec.o): Update dependencies.
      	* gfortranspec.c: Include coretypes.h before gcc.h.  Include
      	opts.h.
      	(MATH_LIBRARY, FORTRAN_LIBRARY): Remove initial "-l".
      	(ADD_ARG_LIBGFORTRAN, Option, lookup_option): Remove.
      	(g77_xargc): Make unsigned.
      	(g77_xargv): Change to g77_x_decoded_options.
      	(g77_newargc): Make unsigned.
      	(g77_newargv): Change to g77_new_decoded_options.
      	(strings_same, options_same): New.
      	(append_arg): Use cl_decoded_option structures.
      	(append_option): New.
      	(add_arg_libgfortran): New.
      	(lang_specific_driver): Use cl_decoded_option structures.
      
      java:
      	* Make-lang.in (jvspec.o): Update dependencies.
      	* jvspec.c: Include opts.h.
      	(PARAM_ARG): Remove.
      	(find_spec_file): Do not add leading -specs=.
      	(lang_specific_driver): Use cl_decoded_option structures.
      	* lang.opt (C, CLASSPATH, D, bootclasspath, classpath, encoding,
      	extdirs, fmain=, s-bc-abi): New options.
      
      From-SVN: r163459
      Joseph Myers committed
  30. 16 Aug, 2010 2 commits
    • options.texi (NoDriverArg): Document. · c878765b
      	* doc/options.texi (NoDriverArg): Document.
      	* gcc.c (cpp_unique_options): Generate -MD and -MMD instead of
      	-MDX and -MMDX.
      	* opt-functions.awk (switch_flags): Handle NoDriverArg.
      	* opts-common.c (decode_cmdline_option): Ignore CL_SEPARATE
      	marking for CL_NO_DRIVER_ARG options when in the driver.
      	* opts.h (CL_NO_DRIVER_ARG): Define.
      	(CL_PARAMS, CL_WARNING, CL_OPTIMIZATION, CL_DRIVER, CL_TARGET,
      	CL_COMMON): Update values.
      
      c-family:
      	* c.opt (MDX): Change back to MD.  Mark NoDriverArg instead of
      	RejectDriver.
      	(MMDX): Change back to MMD.  Mark NoDriverArg instead of
      	RejectDriver.
      	* c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
      	instead of OPT_MDX and OPT_MMDX.
      
      fortran:
      	* lang.opt (MDX): Change back to MD.  Mark NoDriverArg instead of
      	RejectDriver.
      	(MMDX): Change back to MMD.  Mark NoDriverArg instead of
      	RejectDriver.
      	* cpp.c (gfc_cpp_handle_option): Use OPT_MD and OPT_MMD instead of
      	OPT_MDX and OPT_MMDX.
      
      From-SVN: r163280
      Joseph Myers committed
    • common.opt: Add driver options. · 603349bf
      	* common.opt: Add driver options.
      	(auxbase, auxbase-strip, quiet, version): Mark RejectDriver.
      	* doc/options.texi (Driver, RejectDriver): Document.
      	* gcc.c (pass_exit_codes, print_search_dirs, print_file_name,
      	print_prog_name, print_multi_directory, print_sysroot,
      	print_multi_os_directory, print_multi_lib,
      	print_sysroot_headers_suffix, report_times, combine_flag,
      	use_pipes, wrapper_string): Remove.
      	(save_switch, driver_unknown_option_callback,
      	driver_wrong_lang_callback, driver_post_handling_callback,
      	driver_handle_option): New.
      	(spec_lang, last_language_n_infiles): Make file-scope static
      	instead of local to process_command.
      	(process_command): Use decode_cmdline_options_to_array and
      	read_cmdline_option for option processing.  Compute have_c in
      	prescan of decoded options.
      	* opt-functions.awk (switch_flags): Handle Driver and
      	RejectDriver.
      	(var_type, var_type_struct): Handle Separate options as generating
      	const char * variables.
      	* opts-common.c (decode_cmdline_option): Expect CL_COMMON and
      	CL_TARGET to be passed by caller if required.
      	(decode_cmdline_options_to_array): Update comment.
      	* opts.c (complain_wrong_lang): Handle options only valid for the
      	driver.
      	(decode_options): Update call to decode_cmdline_options_to_array.
      	(print_filtered_help): Ignore driver-only options.
      	(print_specific_help): Ignore CL_DRIVER.
      	(common_handle_option): Don't call print_specific_help for
      	CL_DRIVER.
      	* opts.h (CL_DRIVER, CL_REJECT_DRIVER): Define.
      	(CL_PARAMS, CL_WARNING, CL_OPTIMIZATION, CL_TARGET, CL_COMMON):
      	Update values.
      
      c-family:
      	* c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
      
      fortran:
      	* lang.opt (MDX, MMDX): Mark RejectDriver.
      
      java:
      	* lang.opt (MD_, MMD_, version): Mark RejectDriver.
      
      From-SVN: r163279
      Joseph Myers committed
  31. 11 Aug, 2010 1 commit
    • opts.h (struct cl_option_handler_func): Make handler take cl_decoded_option… · 481e1176
      opts.h (struct cl_option_handler_func): Make handler take cl_decoded_option structure as parameter, not individual elements.
      
      	* opts.h (struct cl_option_handler_func): Make handler take
      	cl_decoded_option structure as parameter, not individual elements.
      	(struct cl_option_handlers): Make callbacks take cl_decoded_option
      	structure as parameter, not individual elements.
      	(handle_option): Take cl_decoded_option structure as parameter,
      	not individual elements.
      	(handle_generated_option): Declare.
      	* opts-common.c (handle_option): Take cl_decoded_option structure
      	as parameter, not individual elements.  Update calls to callback
      	and handler functions.
      	(handle_generated_option): New.
      	(read_cmdline_option): Update calls to callback functions and
      	handle_option.
      	* opts.c (common_handle_option, complain_wrong_lang,
      	unknown_option_callback, post_handling_callback,
      	lang_handle_option, target_handle_option): Take cl_decoded_option
      	structure as parameter, not individual elements.
      	(lang_handle_option, target_handle_option, common_handle_option):
      	Assert option has at most one argument.
      	(enable_warning_as_error): Call handle_generated_option instead of
      	handle_option.  Do not pass -Werror argument as argument of
      	generated option.
      
      c-family:
      	* c-opts.c (c_common_handle_option): Call handle_generated_option
      	instead of handle_option.
      
      From-SVN: r163095
      Joseph Myers committed
  32. 28 Jul, 2010 1 commit
    • darwin-driver.c (SWITCH_TAKES_ARG, [...]): Remove. · eea13ead
      	* config/darwin-driver.c (SWITCH_TAKES_ARG,
      	WORD_SWITCH_TAKES_ARG): Remove.
      	* cppspec.c (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG): Remove.
      	* defaults.h (DEFAULT_SWITCH_TAKES_ARG,
      	DEFAULT_WORD_SWITCH_TAKES_ARG): Move from gcc.h.
      	(SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG): Move default
      	definitions from gcc.c.
      	* gcc.c (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG): Move to
      	defaults.h.
      	* gcc.h (DEFAULT_SWITCH_TAKES_ARG, DEFAULT_WORD_SWITCH_TAKES_ARG):
      	Move to defaults.h.
      	* opts-common.c: Include tm.h.
      	(decode_cmdline_option): Use SWITCH_TAKES_ARG and
      	WORD_SWITCH_TAKES_ARG to count arguments to unknown options.
      	Handle more than one argument.  Set canonical_option_num_elements.
      	(decode_cmdline_options_to_array): Set
      	canonical_option_num_elements and trailing elements of
      	canonical_option.
      	* opts.h (struct cl_decoded_option): Allow four elements in
      	canonical_option.  Add field canonical_option_num_elements.
      	* Makefile.in (opts-common.o): Update dependencies.
      
      ada:
      	* gcc-interface/misc.c (gnat_init_options): Ignore erroneous
      	options.  Check canonical_option_num_elements on options copied.
      
      fortran:
      	* gfortranspec.c (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG):
      	Remove.
      
      From-SVN: r162620
      Joseph Myers committed
  33. 27 Jul, 2010 3 commits
    • coretypes.h (struct cl_option_handlers): Declare. · 5f20c657
      	* coretypes.h (struct cl_option_handlers): Declare.
      	* hooks.c (hook_int_size_t_constcharptr_int_0): Remove.
      	* hooks.h (hook_int_size_t_constcharptr_int_0): Remove.
      	* langhooks-def.h (lhd_handle_option): Declare.
      	(LANG_HOOKS_HANDLE_OPTION): Use lhd_handle_option.
      	* langhooks.c (lhd_handle_option): New.
      	* langhooks.h (struct lang_hooks): Update prototype and return
      	value type of handle_option hook.
      	* optc-gen.awk: Generate target_flags_explicit definition for the
      	driver.
      	* opts-common.c: Include diagnostic.h.
      	(handle_option): Move from opts.c.  Update prototype and return
      	value type.  Use handlers structure.
      	(read_cmdline_option): Move from opts.c.  Update prototype.  Use
      	handlers structure.
      	(set_option): Move from opts.c.
      	* opts.c (common_handle_option): Update prototype and return value
      	type.  Update calls to handle_option and enable_warning_as_error.
      	(unknown_option_callback, post_handling_callback,
      	lang_handle_option, target_handle_option): New.
      	(handle_option, read_cmdline_option): Move to opts-common.c.
      	(read_cmdline_options): Update prototype.  Update call to
      	read_cmdline_option.
      	(decode_options): Initialize and use handlers structure.
      	(set_option): Move to opts-common.c.
      	(enable_warning_as_error): Update prototype.  Update call to
      	handle_option.
      	* opts.h (struct cl_option_handler_func, struct
      	cl_option_handlers): New.
      	(handle_option, enable_warning_as_error): Update prototypes.
      	(read_cmdline_option): Declare.
      	* Makefile.in (opts-common.o): Update dependencies.
      
      ada:
      	* gcc-interface/misc.c (gnat_handle_option): Update prototype and
      	return value type.  Don't check for missing arguments here.
      
      c-family:
      	* c-common.h (c_common_handle_option): Update prototype and return
      	value type.
      	* c-opts.c (c_common_handle_option): Update prototype and return
      	value type.  Update calls to handle_option and
      	enable_warning_as_error.
      
      fortran:
      	* gfortran.h (gfc_handle_option): Update prototype and return
      	value type.
      	* options.c (gfc_handle_option): Update prototype and return value
      	type.
      
      java:
      	* lang.c (java_handle_option): Update prototype and return value
      	type.
      
      lto:
      	* lto-lang.c (lto_handle_option): Update prototype and return
      	value type.  Remove duplicate assignment to result.
      
      From-SVN: r162601
      Joseph Myers committed
    • common.opt (o): Add MissingArgError. · 61ff2bdc
      	* common.opt (o): Add MissingArgError.
      	* doc/options.texi (MissingArgError): Document.
      	* hooks.c (hook_bool_constcharptr_size_t_false): Remove.
      	* hooks.h (hook_bool_constcharptr_size_t_false): Remove.
      	* langhooks-def.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
      	(LANG_HOOKS_INITIALIZER): Remove missing_argument hook
      	initializer.
      	* langhooks.h (struct lang_hooks): Remove missing_argument.
      	* optc-gen.awk: Handle MissingArgError and output new structure
      	field initializers.
      	* opts.c (read_cmdline_option): Use missing_argument_error field
      	instead of missing_argument langhook.
      	* opts.h (struct cl_option): Add missing_argument_error field.
      	* system.h (LANG_HOOKS_MISSING_ARGUMENT): Poison.
      
      c-family:
      	* c-common.h (c_common_missing_argument): Remove.
      	* c-opts.c (c_common_missing_argument): Remove.
      	* c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
      	idirafter, imacros, include, isysroot, isystem, iquote): Add
      	MissingArgError.
      	* c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
      
      cp:
      	* cp-objcp-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
      
      po:
      	* exgettext: Also extract MissingArgError texts from .opt files.
      
      From-SVN: r162571
      Joseph Myers committed
    • langhooks-def.h (lhd_init_options, [...]): New. · 7a9bf9a4
      	* langhooks-def.h (lhd_init_options, LANG_HOOKS_OPTION_LANG_MASK,
      	LANG_HOOKS_COMPLAIN_WRONG_LANG_P): New.
      	(LANG_HOOKS_INIT_OPTIONS): Update default definition.
      	(LANG_HOOKS_INITIALIZER): Add new hooks.
      	* langhooks.c (lhd_init_options, lhd_complain_wrong_lang_p): New.
      	* langhooks.h (struct lang_hooks): Add new hooks option_lang_mask
      	and complain_wrong_lang_p.  Update init_options prototype.
      	* c-objc-common.c (c_initialize_diagnostics): First call
      	c_common_initialize_diagnostics.
      	* c-objc-common.h (LANG_HOOKS_OPTION_LANG_MASK,
      	LANG_HOOKS_COMPLAIN_WRONG_LANG_P): Define.
      	* coretypes.h (struct cl_option, struct cl_decoded_option):
      	Declare.
      	* hooks.c (hook_uint_uint_constcharptrptr_0): Remove.
      	(hook_uint_void_0): New.
      	* hooks.h (hook_uint_uint_constcharptrptr_0): Remove.
      	(hook_uint_void_0): New.
      	* opts-common.c (decode_cmdline_option,
      	decode_cmdline_options_to_array): Also fill in canonical_option
      	field.
      	* opts.c (complain_wrong_lang): Use langhook to determine whether
      	to complain instead of special-casing LTO.
      	(decode_options): Separate lang_mask determination with
      	option_lang_mask hook from call of init_options hook.
      	* opts.h (struct cl_decoded_option): Add canonical_option.
      
      ada:
      	* gcc-interface/misc.c (gnat_option_lang_mask): New.
      	(gnat_init_options): Update prototype.  Reconstruct argv array
      	from decoded options.
      
      c-family:
      	* c-common.h (c_common_option_lang_mask,
      	c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
      	New.
      	(c_common_init_options): Update prototype.
      	* c-opts.c (c_common_option_lang_mask): New.
      	(c_common_initialize_diagnostics): Split out of
      	c_common_init_options.
      	(accept_all_c_family_options, c_common_complain_wrong_lang_p):
      	New.
      	(c_common_init_options): Update prototype.  Use decoded options in
      	search for -lang-asm.
      
      cp:
      	* cp-objcp-common.c (cxx_initialize_diagnostics): First call
      	c_common_initialize_diagnostics.
      	* cp-objcp-common.h (LANG_HOOKS_OPTION_LANG_MASK,
      	LANG_HOOKS_COMPLAIN_WRONG_LANG_P): Define.
      
      fortran:
      	* cpp.c (gfc_cpp_init_options): Update prototype.  Use number of
      	decoded options in allocating deferred_opt.
      	* cpp.h (gfc_cpp_init_options): Update prototype.
      	* f95-lang.c (LANG_HOOKS_OPTION_LANG_MASK): Define.
      	* gfortran.h (gfc_option_lang_mask): New.
      	(gfc_init_options): Update prototype.
      	* options.c (gfc_option_lang_mask): New.
      	(gfc_init_options): Update prototype.  Pass new arguments to
      	gfc_cpp_init_options.
      
      java:
      	* lang.c (java_option_lang_mask): New.
      	(java_init_options): Update prototype.
      	(LANG_HOOKS_OPTION_LANG_MASK): Define.
      
      lto:
      	* lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
      	New.
      	(lto_init_options): Update prototype.
      	(LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
      	Define.
      
      From-SVN: r162560
      Joseph Myers committed
  34. 20 Jun, 2010 1 commit
    • re PR other/32998 (-frecord-gcc-switches issues) · 6e2f1956
      	PR other/32998
      	* opth-gen.awk: Generate definitions of OPT_SPECIAL_unknown,
      	OPT_SPECIAL_program_name and OPT_SPECIAL_input_file.
      	* opts-common.c (find_opt): Return OPT_SPECIAL_unknown on failure.
      	(decode_cmdline_option): Update for this return value.  Set
      	orig_option_with_args_text field.  Set arg field for unknown
      	options.  Make static.
      	(decode_cmdline_options_to_array): New.
      	(prune_options): Update handling of find_opt return value.
      	* opts.c (read_cmdline_option): Take decoded option.  Return void.
      	(read_cmdline_options): Take decoded options.
      	(decode_options): Add parameters for decoded options.  Use
      	decode_cmdline_options_to_array.  Use decoded options for -O
      	scan.  Use integral_argument for -O parameters.  Update call to
      	read_cmdline_options.
      	(enable_warning_as_error): Update handling of find_opt return
      	value.
      	* opts.h: Update comment on unknown options.
      	(struct cl_decoded_option): Update comments on opt_index and arg.
      	Add orig_option_with_args_text.
      	(decode_cmdline_option): Remove.
      	(decode_cmdline_options_to_array): Declare.
      	(decode_options): Update prototype.
      	* toplev.c (save_argv): Remove.
      	(save_decoded_options, save_decoded_options_count): New.
      	(read_integral_parameter): Remove.
      	(print_switch_values): Use decoded options.
      	(toplev_main): Don't set save_argv.  Update call to
      	decode_options.
      	* toplev.h (read_integral_parameter): Remove.
      	* varasm.c (elf_record_gcc_switches): Don't handle holding back
      	names.
      
      c-family:
      	* c-common.c (parse_optimize_options): Update call to
      	decode_options.
      
      fortran:
      	* options.c (gfc_handle_option): Don't handle N_OPTS.
      
      testsuite:
      	* gcc.dg/opts-2.c: New test.
      
      From-SVN: r161053
      Joseph Myers committed