Jason Merrill [Tue, 9 Oct 2001 15:42:44 +0000 (11:42 -0400)]
call.c (standard_conversion): Add bad conversion between integers and pointers.
* call.c (standard_conversion): Add bad conversion between
integers and pointers.
(convert_like_real): Don't use convert_for_initialization for bad
conversions; complain here and use cp_convert.
(build_over_call): Don't handle bad conversions specially.
(perform_implicit_conversion): Allow bad conversions.
(can_convert_arg_bad): New fn.
* cp-tree.h: Declare it.
* typeck.c (convert_for_assignment): Use it.
(ptr_reasonably_similar): Any target type is similar to void.
John Hornkvist [Tue, 9 Oct 2001 05:32:16 +0000 (05:32 +0000)]
Implement Darwin PowerPC ABI.
2001-10-09 John Hornkvist <john@toastedmarshmallow.com>
Implement Darwin PowerPC ABI.
* configure.in: Handle powerpc-*-darwin*.
* Makefile.am: Set source files for POWERPC_DARWIN.
* configure: Rebuilt.
* Makefile.in: Rebuilt.
* include/ffi.h.in: Define FFI_DARWIN and FFI_DEFAULT_ABI for
POWERPC_DARWIN.
* src/powerpc/darwin.S: New file.
* src/powerpc/ffi_darwin.c: New file.
Alexandre Oliva [Mon, 8 Oct 2001 20:54:07 +0000 (20:54 +0000)]
langhooks.h: New file.
* langhooks.h: New file.
* Makefile.in (OBJS): Added langhooks.o.
(c-lang.o): Depend on langhooks.h.
(c-common.o): Don't depend on tree-inline.h.
(tree-inline.o): Depend on toplev.h.
(langhooks.o): New rule.
* c-common.c: Don't include tree-inline.h.
(c_mark_lang_decl): Mark argument c as unused.
(c_common_lang_init): Don't initialize hooks here.
* c-lang.c: Include langhooks.h, then override some macros.
(lang_hooks): Initialize with macros in langhooks.h.
(c_init): Don't initialize hooks here.
* toplev.c (struct lang_hooks_for_tree_inlining): New struct.
(struct lang_hooks): Add tree_inlining. Refer to langhooks.h.
* tree-inline.c: Include toplev.h. Don't define hook variables.
* tree-inline.h: Don't define hook types nor declare hook
variables. Move macros to...
* langhooks.c: ... new file, as functions. Adjust all callers.
Jeffrey A Law [Mon, 8 Oct 2001 20:24:55 +0000 (20:24 +0000)]
sibcall.c (optimize_sibling_and_tail_recursive_calls): Call purge_mem_unchanging_flag on all instructions...
* sibcall.c (optimize_sibling_and_tail_recursive_calls): Call
purge_mem_unchanging_flag on all instructions, not just on those
before NOTE_INSN_FUNCTION_BEG.
DJ Delorie [Mon, 8 Oct 2001 19:44:53 +0000 (15:44 -0400)]
c-decl.c (grokfield): Make sure the only unnamed fields we're allowing are either structs or unions.
* c-decl.c (grokfield): Make sure the only unnamed fields
we're allowing are either structs or unions.
* doc/extend.texi: Add documentation for the unnamed field
extension.
Zack Weinberg [Mon, 8 Oct 2001 17:58:31 +0000 (17:58 +0000)]
aclocal.m4 (gcc_AC_PROG_GNAT): New.
top:
* aclocal.m4 (gcc_AC_PROG_GNAT): New.
* configure.in: Use it.
* configure: Regenerated.
* config/pa/t-linux, config/pa/t-pa, config/pa/t-pa64,
config/pa/t-pro: Set T_ADAFLAGS, not ADA_CFLAGS.
ada:
* Make-lang.in (ADAFLAGS): Add -W -Wall.
(ADA_FLAGS_TO_PASS): Set ADA_CFLAGS=$(CFLAGS) also.
(gnat1): Also depend on attribs.o.
(gnatlib, gnatlib-shared): Set CC and ADAC in recursive make.
* Makefile.in (X_ADAFLAGS, T_ADAFLAGS): New.
(ADAC): Set to @ADAC@ in stage1, $(CC) later.
(ADAFLAGS): Add -W -Wall.
(ALL_ADAFLAGS, MOST_ADAFLAGS): Add X_ADAFLAGS and T_ADAFLAGS;
take out CFLAGS.
(.adb.o, .ads.o, a-numaux.o, a-teioed.o, s-interr.o,
s-taskin.o, sdefault.o, s-tasdeb.o, s-vaflop.o, a-except.o,
s-assert.o, s-stalib.o, s-memory.o, memtrack.o, mlib-tgt.o):
Use $(ADAC), not $(CC), as compilation command.
(gnattools): Depend directly on tools to build, don't use
recursive make.
(gnatlib): Set ADA_CFLAGS=$(GNATLIBCFLAGS) in recursive make.
Neil Booth [Mon, 8 Oct 2001 06:15:14 +0000 (06:15 +0000)]
cppmacro.c (funlike_invocation_p): Move some logic to caller in enter_macro_context.
* cppmacro.c (funlike_invocation_p): Move some logic to caller
in enter_macro_context. Create a padding token in its own context
if necessary when the search for '(' fails.
(enter_macro_context): Update.
Joseph Myers [Sun, 7 Oct 2001 18:02:46 +0000 (19:02 +0100)]
acinclude.m4: Fix spelling error of "separate" as "seperate".
config:
* acinclude.m4: Fix spelling error of "separate" as "seperate".
gcc:
* ChangeLog.2, c-decl.c, config/i386/i386.md, doc/gcc.texi, gcc.c,
genmultilib, toplev.c: Fix spelling errors of "separate" as
"seperate", and corresponding spelling errors of related words.
gcc/ada:
* 5oosinte.adb: Fix spelling error of "separate" as "seperate".
gcc/testsuite:
* gcc.c-torture/unsorted/unsorted.exp, lib/file-format.exp: Fix
spelling errors of "separate" as "seperate".
libffi:
* src/x86/ffi.c: Fix spelling error of "separate" as "seperate".
libjava:
* defineclass.cc, java/awt/image/ColorModel.java,
java/awt/image/SampleModel.java, java/lang/Package.java,
java/security/cert/X509Extension.java: Fix spelling errors of
"separate" as "seperate", and corresponding spelling errors of
related words.
libstdc++-v3:
* docs/html/22_locale/locale.html, docs/html/faq/index.html: Fix
spelling errors of "separate" as "seperate", and corresponding
spelling errors of related words.
* docs/html/faq/index.txt: Regenerate.
Zack Weinberg [Sat, 6 Oct 2001 23:11:27 +0000 (23:11 +0000)]
cpplex.c (enum spell_type): Add SPELL_NUMBER.
* cpplex.c (enum spell_type): Add SPELL_NUMBER.
(cpp_token_len, cpp_spell_token, cpp_output_token,
_cpp_equiv_tokens): Handle it.
* cpplib.h (TTYPE_TABLE): Use SPELL_NUMBER for CPP_NUMBER and
CPP_COMMENT, SPELL_NONE for CPP_PADDING and CPP_EOF.
* cppexp.c (_cpp_parse_expr): Use the correct operator code in
error messages.
Catherine Moore [Fri, 5 Oct 2001 20:33:09 +0000 (20:33 +0000)]
stormy-abi: Document abi changes.
* config/stormy16/stormy-abi: Document abi changes.
* config/stormy16/stormy16.h (REG_ALLOC_ORDER): Redefine.
(ICALL_REGS): New register class.
(NUM_ARGUMENT_REGISTERS): Now 6.
(DEFAULT_PCC_STRUCT_RETURN): Don't try to return structs
in registers.
(REG_CLASS_FROM_LETTER): Map 'z' to ICALL_REGS.
* config/stormy16.md (call_internal, call_value_internal,
indirect_jump): Use new 'z' constraint.
Alexandre Oliva [Fri, 5 Oct 2001 04:20:27 +0000 (04:20 +0000)]
Makefile.in (c-decl.o): Depend on tree-inline.h.
* Makefile.in (c-decl.o): Depend on tree-inline.h.
(c-lang.o): Likewise, as well as insn-config.h and integrate.h.
* c-decl.c: Include tree-inline.h.
(c_expand_body): Call optimize_inline_calls. Determine whether
a function is inlinable upfront, and only clear
DECL_SAVED_TREE, DECL_INITIAL and DECL_ARGUMENTS if it isn't.
* c-lang.c: Include tree-inline.h, insn-config.h and integrate.h.
(c_disregard_inline_limits): New function.
(inline_forbidden_p, c_cannot_inline_tree_fn): Likewise.
(c_post_options): Enable tree inlining if inlining is enabled.
Don't inline trees when instrumenting functions.
(c_init): Initialize lang_disregard_inline_limits and
lang_cannot_inline_tree_fn.
* tree-inline.c (initialize_inlined_parameters): Handle calls
with fewer arguments than declared parameters, and fewer
parameters than passed arguments. Don't assume value is a
DECL.
(declare_return_variable): Convert return value back to the
original type, if it was promoted.
(tree_inlinable_function_p): New function.
(inlinable_function_p): Don't look at DECL_INLINE if we're
inlining all functions. Make it work with a NULL id.
Re-check DECL_UNINLINABLE after language-specific checks.
(varargs_function_p): Move back to cp/tree.c.
* tree-inline.h (tree_inlinable_function_p): Declare it.
(varargs_function_p): Removed declaration.
* integrate.h (function_attribute_inlinable_p): Declare it.
* integrate.c (function_attribute_inlinable_p): Export it.
(save_for_inline): Don't bother to prepare argvec when not
inlining.
* cse.c (check_for_label_ref): Don't check deleted labels.
Alexandre Oliva [Fri, 5 Oct 2001 03:48:18 +0000 (03:48 +0000)]
Makefile.in (tree-inline.o): Depend on newly-included headers.
* Makefile.in (tree-inline.o): Depend on newly-included headers.
* tree-inline.c: Include headers needed for the functions moved in.
(struct inline_data, INSNS_PER_STMT): Moved from cp/optimize.c.
(remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
(copy_body, initialize_inlined_parameters): Likewise.
(declare_return_variable, inlinable_function_p): Likewise.
(expand_call_inline, expand_calls_inline): Likewise.
(optimize_inline_calls, clone_body): Likewise.
(walk_tree, walk_tree_without_duplicates): Moved from cp/tree.c.
(copy_tree_r, remap_save_expr): Likewise.
Alexandre Oliva [Fri, 5 Oct 2001 02:49:16 +0000 (02:49 +0000)]
Makefile.in (OBJS): Added tree-inline.o.
* Makefile.in (OBJS): Added tree-inline.o.
(c-common.o): Depend on tree-inline.h.
(tree-inline.o): New target.
* c-common.c: Include tree-inline.h.
(c_mark_lang_decl): Don't mark saved_tree.
(c_common_lang_init): Set lang_anon_aggr_type_p.
* c-common.h (walk_tree_fn, DECL_SAVED_TREE): Moved to tree.h.
(struct c_lang_decl): Moved saved_tree to tree_decl.
* ggc-common.c: Mark saved_tree and inlined_fns of FUNCTION_DECLs.
* integrate.h (function_attribute_inlinable_p): Declare it.
* integrate.c (function_attribute_inlinable_p): Export it.
* tree-inline.c: New file. Define variables declared in...
* tree-inline.h: New file. Declare functions to be moved to
tree-inline.c. Define macros and declare types and hooks for
language-specific tree inlining.
(flag_inline_trees): Moved definition from cp/decl2.c.
* tree.h (walk_tree_fn, DECL_SAVED_TREE): Moved from c-common.h.
(TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved from cp/cp-tree.h.
(struct tree_decl): Moved saved_tree from c_lang_decl and
inlined_fns from C++'s lang_decl.
Alexandre Oliva [Fri, 5 Oct 2001 02:48:47 +0000 (02:48 +0000)]
Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
* Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
(cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
* cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
(TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
(flag_inline_trees): Moved declaration to ../tree-inline.h.
(walk_tree): Moved declaration to ../tree-inline.h.
(walk_tree_without_duplicates, copy_tree_r): Likewise.
(remap_save_expr): Likewise.
* decl.c: Include tree-inline.h.
(lang_mark_tree): Don't mark inlined_fns.
* decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
* optimize.c: Include tree-inline.h.
(optimize_inline_calls): Move declaration to ../tree.h, as
non-static.
(remap_decl): Use language-independent constructs and hooks.
(remap_block, copy_body_r, declare_return_variable): Likewise.
(inlinable_function_p): Likewise. Don't test for
DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
no longer language-specific.
(optimize_inline_calls): Likewise. Make it non-static. Moved
call of dump_function to...
(optimize_function): Here...
(clone_body): New function, extracted from...
(maybe_clone_body): ... here. Build decl_map locally and pass
it on to clone_body.
* pt.c, semantics.c: Include tree-inline.h.
* tree.c: Likewise.
(cp_walk_subtrees): New language-specific hook for tree inlining.
(cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
cp_is_overload_p, cp_auto_var_in_fn_p,
cp_copy_res_decl_for_inlining): Likewise.
(walk_tree): Move language-specific constructs into...
(cp_walk_subtrees): this new function.
(copy_tree_r): Use language-independent constructs and hooks.
(init_tree): Initialize tree inlining hooks.
(remap_save_expr): Adjust prototype so that the declaration
does not require the definition of splay_tree.