* pt.c (instantiate_class_template): Set up the DECL_INITIAL of
member constants.
g++.ns/template6.C
* init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
a ctor initializer.
g++.other/typedef6.C
From-SVN: r24875
1999-01-26 12:11 -0500 Zack Weinberg <zack@midnite.ec.rhno.columbia.edu>
* cppfiles.c (safe_read): Deleted.
(read_and_prescan): New function, replaces safe_read, converts
and/or warns about trigraphs, silently converts odd line
terminators (\r, \n\r, \r\n). Warns about no newline at EOF.
(finclude): Use read_and_prescan; turn off nonblocking mode on
the input descriptor; remove file-size-examination and
no-newline-at-EOF gunk which is longer necessary; be more
careful about checking that we've been handed a legitimate
file to read (only real files, pipes, and ttys are acceptable).
* cpplib.h (cpp_options): Rename no_trigraphs flag to
`trigraphs' and invert its sense.
(trigraph_table): Declare.
(cpp_warning_with_line): Prototype.
* cpplib.c: Remove all references to trigraph_pcp. Define
trigraph_table; initialize it in initialize_char_syntax. Open
files in nonblocking mode. s/no_trigraphs/trigraphs/
throughout, and invert sense. Put cpp_warning_with_line back
in and export it.
From-SVN: r24870
Tue Jan 26 23:21:49 1999 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
* config/c4x/c4x.h (COUNTER_REGS): New register class.
* config/c4x/c4x.md (*rptb_init): Change constraints.
(rptb_end): Emit alternate looping instructions if
RC register not allocated for loop counter.
(decrement_and_branch_on_count): Allow other registers
for loop counter.
From-SVN: r24868
* class.c (resolve_address_of_overloaded_function): Mark the
chosen function used.
* call.c (build_call): Make sure that a function coming in has
been marked used already.
* decl.c (expand_static_init): Call mark_used instead of
assemble_external.
* except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
alloc_eh_object, expand_throw): Likewise.
* init.c (build_builtin_delete_call): Likewise.
* rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
expand_generic_desc): Likewise.
From-SVN: r24862
1999-01-25 14:26 -0500 Zack Weinberg <zack@rabi.columbia.edu>
* cppexp.c:
(struct arglist): Removed.
(parse_number): Use HOST_WIDE_INT for the accumulator.
Allow two `l' suffixes unless C89. Clean up. Make
static.
(parse_charconst): New function broken out of cpp_lex.
Code cleaned up drastically. Don't use a token_buffer.
(token_buffer): Removed.
(cpp_lex): Don't call parse_number on a constant string.
Use parse_charconst.
(cpp_parse_expr): Properly handle an ERROR op returned by
cpp_lex.
From-SVN: r24859
1999-01-25 14:10 -0500 Zack Weinberg <zack@rabi.phys.columbia.edu>
* cpplib.c: Don't include signal.h, sys/times.h, or
sys/resource.h. Don't declare localtime.
(macroexpand): Handle special symbols here.
(push_macro_expansion): Chop off the trailing '@ ' if possible
here.
(cpp_get_token): Don't do either of the above two things here.
Move `string' label just after case '"' so that wide strings
don't crash the preprocessor.
From-SVN: r24858
Mon Jan 25 17:39:19 1999 Andrew Haley <aph@cygnus.com>
* except.c, java-except.h (expand_resume_after_catch): new
function.
* expr.c (java_lang_expand_expr): call expand_resume_after_catch
to branch back to main flow of control after a catch block.
From-SVN: r24857
1999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de>
* decl.c (decls_match): Return 1 if old and new are identical.
(push_overloaded_decl): Set OVL_USED when PUSH_USING.
From-SVN: r24849
Convert all direct memory references to use LO_SUM and remove machdep
hack that used to do this.
Sun Jan 24 21:24:43 1999 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
* config/c4x/c4x.c (c4x_emit_move_sequence, c4x_encode_section_info):
New functions.
(c4x_check_legit_addr): Remove USE and PLUS, allow
LO_SUM, and disable SYMBOL_REF, LABEL_REF, and CONST cases.
(c4x_legitimize_address): Penalise SYMBOL_REF, LABEL_REF, and
CONST cases. Add LO_SUM.
(c4x_print_operand): Modified 'C' and 'R' cases for calls.
Added 'U' case. Remove dependence on SYMBOL_REF_FLAG.
(c4x_print_operand_address): Handle LO_SUM.
(c4x_scan_for_ldp): Delete. Hooray!
(c4x_process_after_reload): Remove call to c4x_scan_for_ldp.
Split all insns.
(c4x_immed_int_constant): Renamed from c4x_int_constant. All callers
changed.
(c4x_immed_float_constant): Renamed from c4x_float_constant. All
callers changed.
(c4x_T_constraint): Allow LO_SUM, disable SYMBOL_REF, LABEL_REF,
and CONST.
(c4x_U_constraint, symbolic_operand): New functions.
(src_operand): Allow 'I' constants in HImode. Allow LO_SUM,
disable SYMBOL_REF, LABEL_REF, and CONST.
(lsrc_operand, tsrc_operand): Call src_operand instead of
general_operand.
(c4x_operand_subword): Update comments.
* config/c4x/c4x.c (TARGET_LOAD_ADDRESS): New macro.
(LEGITIMATE_CONSTANT_P): Allow SYMBOL_REF, LABEL_REF, CONST,
plus HIGH and LO_SUM for the C40.
(ENCODE_SECTION_INFO): Define macro.
(symbolic_operand, c4x_U_constraint, c4x_emit_move_sequence): New
prototypes.
(PREDICATE_CODES): Add symbolic_operand.
* config/c4x/c4x.md (movqi, movgqf, movhi, movhi): Call
c4x_emit_move_sequence.
(floatunsqiqf2, fixuns_truncqfqi2): Rework emitted RTL
to avoid symbol references.
(all patterns with g constraint): Replace 'g' constraint with 'rIm'.
(set_high): Renamed from set_high_use.
(set_lo_sum): Renamed from set_ior_lo_use.
(all call patterns): Make MEM explicit in call address operands.
Modified output templates to use 'U' modifier.
From-SVN: r24842
* decl.c (start_function): Make member functions one_only on windows.
* decl2.c (import_export_decl): Likewise.
* decl.c (grokdeclarator): Don't complain about implicit int in
a system header. Change same-name field check to not complain in
a system header instead of within extern "C".
From-SVN: r24839
* Makefile.in (parse.o): Depend on $(CONFIG_H) and
$(srcdir)/../system.h.
(class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
(jcf-parse.o): Depend on $(srcdir)/../toplev.h.
(jcf-write.o): Likewise.
(jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
(mangle.o): Depend on $(srcdir)/../toplev.h.
(parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
(zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
* class.c: Include output.h and parse.h.
(mangled_classname): Add the `const' keyword to a char*.
(find_named_method): Hide unused function definition.
(build_utf8_ref): Change type of variable `c' to unsigned char.
Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
(build_class_ref): Add the `const' keyword to a char*.
(layout_class_method): Remove unused variable `buf'.
* decl.c (find_local_variable): Remove unused variable `rtl'.
(pushdecl): Likewise for variables `different_binding_level' and
`oldglobal'.
(pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
(maybe_build_cleanup): Likewise for parameter `decl'.
* except.c (expand_start_java_handler): Mark parameter `range'
with ATTRIBUTE_UNUSED.
* expr.c: Include except.h.
(pop_type): Remove unused variable `i'.
(pop_value): Likewise for variables `n_words' and `i'.
(expand_java_arrayload): Likewise for variable `convert'.
(java_lang_expand_expr): Likewise for variables `op0', `type',
`mode', `unsignedp', `node' and `elements'.
(expand_byte_code): Likewise for variables `prev_eh_ranges' and
`eh_ranges'.
(process_jvm_instruction): Add a `const' qualifier to a char*.
* gjavah.c (output_directory): Add the `const' keyword to a char*.
(temp_directory): Likewise.
(print_c_decl): Likewise.
(print_method_info): Likewise.
(decode_signature_piece): Likewise.
(print_mangled_classname): Likewise.
* java-except.h: Provide prototypes for maybe_start_try,
maybe_end_try and add_handler.
* java-tree.h (mangled_classname): Add the `const' keyword to a char*.
(parse_error_context): Likewise. Also add ATTRIBUTE_PRINTF_2.
(pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
init_expr_processing, push_super_field, init_class_processing,
can_widen_reference_to, class_depth, verify_jvm_instructions,
maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
set_local_type, merge_type_state, push_type, load_type_state,
add_interface, find_in_current_zip, append_gpp_mangled_classtype,
emit_unicode_mangled_name): Add prototypes.
* jcf-dump.c (print_constant): Add the `const' keyword to a char*.
(print_signature_type): Use ISDIGIT, not isdigit.
(print_signature): Remove unused variable `j'.
* jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
int when comparing against one.
* jcf-parse.c: Include toplev.h.
* jcf-write.c: Likewise. Don't include <string.h> or <sys/stat.h>.
(localvar_free): Remove unused variable `i'.
(generate_bytecode_conditional): Likewise for variable `kind'.
* jv-scan.c: Include config.h and system.h. Remove redundant
OS header and gansidecl.h includes.
(warning): Add the `const' keyword to a char*. Also add
ATTRIBUTE_PRINTF_1 to the prototype. Check ANSI_PROTOTYPES, not
__STDC__, when determining whether to use ANSI-isms.
(fatal): Likewise. Also add ATTRIBUTE_UNUSED.
(xmalloc): Don't redundantly prototype here.
(main): Remove unused parameter `envp'. Also fix the arguments
passed to function `fatal' to match the format specifier.
* lang.c (java_tree_code_name): Add the `const' keyword to a char*.
* mangle.c: Include toplev.h.
(emit_unicode_mangled_name): Declare parameter `len'.
* parse.y (parse_warning_context): Add the `const' keyword to a
char*. Also add ATTRIBUTE_PRINTF_2 to the prototype. Check
`ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
(issue_warning_error_from_context): Add the `const' keyword to
a char*.
(parse_error_context): Likewise. Also check `ANSI_PROTOTYPES'
not `__STDC__' for whether to use ANSI-isms.
* typeck.c (incomplete_type_error): Mark parameters `value' and
`type' with ATTRIBUTE_UNUSED.
(parse_signature_type): Use ISDIGIT, not isdigit.
* verify.c (check_pending_block): Add the `const' keyword to a char*.
(verify_jvm_instructions): Likewise. Remove unused variables
`field_name' and `default_val'.
* zextract.c: Include config.h and system.h. Remove redundant
OS header includes.
* zipfile.h: Prototype `read_zip_archive'.
From-SVN: r24835
* configure.in (gcc_tooldir): Handle case where exec_prefix has
not been explicitly set.
* configure: Rebuilt.
Check it in now that it's tested.
From-SVN: r24831
* cpp-if1.c: New test - torture test of preprocessor's number conversion
in #if directives.
* cpp-if2.c: New test - torture test of preprocessor's character constant
conversion in #if directives.
Both these tests are entirely my own invention.
From-SVN: r24822
* Makefile.in (gcc_tooldir): Move before first reference.
Let autoconf substitute in a value.
* configure.in (gcc_tooldir): Only use a relative path to the
tool directory if $exec_prefix == $prefix.
* configure: Rebuilt.
From-SVN: r24820