Zack Weinberg [Fri, 8 Dec 2000 03:00:26 +0000 (03:00 +0000)]
safe-ctype.h: New file.
include:
* safe-ctype.h: New file.
libiberty:
* safe-ctype.c: New file.
* Makefile.in (CFILES): Add safe-ctype.c.
(REQUIRED_OFILES): Add safe-ctype.o.
* argv.c: Define ISBLANK and use it, not isspace.
* basename.c, cplus-dem.c, fnmatch.c, pexecute.c, strtod.c,
strtol.c, strtoul.c: Include safe-ctype.h, not ctype.h. Use
uppercase ctype macros. Don't test ISUPPER(c)/ISLOWER(c)
before calling TOLOWER(c)/TOUPPER(c).
gcc:
* Makefile.in (HOST_RTL): Add safe-ctype.o.
(safe-ctype.o): New rule.
* system.h: Include safe-ctype.h, not ctype.h. No need to
wrap ctype macros.
* cpphash.h: Zap IStable and related macros. Define is_* in
terms of safe-ctype.h macros.
* cppinit.c: Delete the IStable and all related code.
* tradcpp.c: Delete is_idchar, is_idstart, is_hor_space, and
is_space arrays. Delete initialize_char_syntax. Change all
references to the above arrays to use macros instead.
* tradcpp.h: Define is_idchar, is_idstart, is_space, and
is_nvspace in terms of safe_ctype.h's macros.
* tradcif.y: is_idchar, is_idstart are macros not arrays.
* config/i370/i370.c, config/winnt/dirent.c,
config/winnt/fixinc-nt.c, config/winnt/ld.c:
Use uppercase ctype macros. If we included ctype.h,
include safe-ctype.h instead.
* fixinc/fixfixes.c: Use uppercase ctype macros. Don't test
ISLOWER(c) before calling TOUPPER(c).
* fixinc/fixincl.c (extract_quoted_files): Simplify out some gunk.
* fixinc/gnu-regex.c: Include safe-ctype.h, not ctype.h. No need to
wrap ctype macros. Don't test ISUPPER(x) before calling TOLOWER(x).
gcc/ch:
* lex.c: Don't bother checking whether ISUPPER(c) before
calling TOLOWER(c). Don't bother checking whether isascii(c)
before testing ISSPACE(c); ISSPACE(c) includes '\n'.
gcc/f:
* Make-lang.in: Link f/fini with safe-ctype.o.
* bad.c: Don't test ISUPPER(c) || ISLOWER(c) before calling TOUPPER(c).
* com.c: Use TOUPPER, not ffesrc_toupper.
* fini.c: Don't test ISALPHA(c) before calling TOUPPER(c)/TOLOWER(c).
* intrin.c: Don't test IN_CTYPE_DOMAIN(c).
* src.c: Delete ffesrc_toupper_ and ffesrc_tolower_ and their
initializing code; use TOUPPER and TOLOWER instead of
ffesrc_toupper and ffesrc_tolower.
* src.h: Don't declare ffesrc_toupper_ or ffesrc_tolower_.
Don't define ffesrc_toupper or ffesrc_tolower.
gcc/java:
* jvgenmain.c: Use ISPRINT not isascii.
Neil Booth [Thu, 7 Dec 2000 23:17:56 +0000 (23:17 +0000)]
cppfiles.c (struct include_file): Move from cpphash.h.
* cppfiles.c (struct include_file): Move from cpphash.h.
(_cpp_never_reread): New function.
(open_file, read_include_file): Use it.
(stack_include_file): Set the buffer's sysp according to the
path in which the file was found.
(find_include_file): Don't set sysp.
(cpp_make_system_header, actual_directory): Update.
(_cpp_execute_include): Do #include_next lookup handling here,
not in cpplib.c. Use _cpp_never_reread.
* cpphash.h (struct_include_file): Remove.
(struct cpp_buffer): New member sysp.
(CPP_IN_SYSTEM_HEADER, _cpp_execute_include): Update.
(_cpp_never_reread): New.
* cpplib.c (read_line_number): Rename read_flag. Rework slightly.
(end_directive): Clear line_extension flag.
(_cpp_handle_directive): Set line_extension flag for #number.
(do_include_next): Handle path lookup in _cpp_execute_include.
(do_line): Cleanup to use read_flag. Don't allow flags in #line.
(_cpp_do_file_change): Update.
(do_pragma_once): Use cpp_never_reread. Clean up.
* cpplib.h (struct lexer_state): New member line_extension.
Zack Weinberg [Thu, 7 Dec 2000 22:11:12 +0000 (22:11 +0000)]
texi2pod.pl: If multiple @c man sections with the same tag appear...
* texi2pod.pl: If multiple @c man sections with the same tag
appear, concatenate them in the final output. When skipping,
ignore block commands that can't cause skipping, and honor
those that can. Ensure that verbatim blocks are separate
paragraphs.
Nathan Sidwell [Thu, 7 Dec 2000 14:17:53 +0000 (14:17 +0000)]
cp-tree.h (sufficient_parms_p): Declare new function.
* cp-tree.h (sufficient_parms_p): Declare new function.
* call.c (sufficient_parms_p): New function, broken out of ...
(add_function_candidate): ... here. Use it.
(add_conv_candidate): Use it.
* decl.c (grok_ctor_properties): Use it.
Joseph Myers [Thu, 7 Dec 2000 07:56:44 +0000 (07:56 +0000)]
c-common.c (warn_format_security): New variable.
* c-common.c (warn_format_security): New variable.
(check_format_info): Warn about non-literal formats with no format
arguments if either -Wformat-nonliteral or -Wformat-security is
specified.
(set_Wformat): Set warn_format_security for settings other than 1.
* c-common.h (warn_format_security): Declare.
* c-decl.c (c_decode_option): Decode -Wformat-security and
-Wno-format-security.
* invoke.texi: Document -Wformat-security.
* toplev.c (documented_lang_options): Include -Wformat-security
and -Wno-format-security.
Joseph Myers [Thu, 7 Dec 2000 07:52:20 +0000 (07:52 +0000)]
c-common.c (check_format_info): Warn for non-constant format strings with strftime formats if -Wformat-nonliteral.
* c-common.c (check_format_info): Warn for non-constant format
strings with strftime formats if -Wformat-nonliteral. Where the
format can convert arguments, if the format is not a string
literal and there are no arguments to the format, give a different
warning message from the general non-string-literal case.
* c-common.c (format_wanted_type): Add reading_from_flag.
(print_char_table): Mark %s and %S formats with flag "R".
(check_format_info_main): Set up reading_from_flag appropriately.
If aflag, always set writing_in_flag rather than relying on the
format used being a scanf format and so having it set.
(check_format_types): Check for formats reading through null
pointers.
testsuite:
* gcc.dg/c90-printf-1.c: Add test for printf formats reading
through a null pointer.
* pt.c (verify_class_unification): New function.
(get_class_bindings): Use it.
(try_class_unification): Tidy.
(unify): Handle when argument of a template-id is not
template parameter dependent.
(template_args_equal): Handle when TREE_CODE's do not match.
* g++.old-deja/g++.oliva/partspec1.C: Remove XFAIL.
* g++.old-deja/g++.pt/partial4.C: New test.
Neil Booth [Thu, 7 Dec 2000 07:14:42 +0000 (07:14 +0000)]
c-common.c (parse_in): Make a cpp_reader *.
* c-common.c (parse_in): Make a cpp_reader *.
* cppfiles.c (_cpp_fake_include): Remove.
* cpphash.h: Similarly.
* cpplib.c (do_line): Don't call _cpp_fake_include. A valid
#line always creates a callback; FC_RENAME if there are no
#line flags.
* fix-header.c (read_scan_file): cpp_push_buffer cannot fail.
The first EOF must be our get_char buffer.
* config/os/generic/bits/ctype_inline.h (ctype<char>::is):
Implement in a generic way, with only "C" functionality and no
knowlege of the target os.
* config/os/generic/bits/os_defines.h: Change comments to C++ style.
* testsuite/22_locale/ctype_char_members.cc (test01): Add tests.
* include/bits/codecvt.h (ctype_byname): Remove specializations,
as not required.
* include/bits/localefwd.h (codecvt_byname): And here.
* src/codecvt.cc: Remove codecvt_byname specializations.
* include/c/bits/std_cstdio.h: Include c++config.h.
Mark Kettenis [Thu, 7 Dec 2000 02:35:41 +0000 (02:35 +0000)]
config.gcc: Reorganize handling of *-*-gnu*, to share target specific make details with Linux.
* config.gcc: Reorganize handling of *-*-gnu*, to share target
specific make details with Linux. Update comments to clarify
the distinction between GNU/Linux and GNU/Hurd.
Tom Tromey [Wed, 6 Dec 2000 21:14:14 +0000 (21:14 +0000)]
Collator.java (decomposeCharacter, [...]): Now package-private, not protected.
* java/text/Collator.java (decomposeCharacter, decmp, strength):
Now package-private, not protected.
* java/text/DateFormatSymbols.java (equals): Now private.
* java/text/DecimalFormatSymbols.java (safeGetChar): Now private.
* java/util/BitSet.java: Class no longer final.
* java/util/Set.java (toArray(Object[])): New method.
* jcf-write.c (OP1): Update `last_bc'.
(struct jcf_block): Fixed indentation and typo in comments. New
field `last_bc'.
(generate_bytecode_insns): Insert `nop' if `jsr' immediately
follows `monitorenter'.
* parse.y (patch_synchronized_statement): New local `tmp'. Call
`patch_string'.
Fixes gcj/232.
* check-init.c (check_init): Fixed leading comment. Use
LOCAL_FINAL_P.
* decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
(give_name_to_locals): Likewise.
(lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
fields in lang_decl_var.
* java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
(FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
(FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
(LOCAL_FINAL): Rewritten.
(LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
(struct lang_decl): Fixed comments. Added `synthetic_ctor' and
`init_final' fields.
(struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
`final_uid', `final_liic', `final_ierr' and `local_final' fields.
(TYPE_HAS_FINAL_VARIABLE): New macro.
(struct lang_type): Added `afv' field.
* parse.y (check_static_final_variable_assignment_flag): New function.
(reset_static_final_variable_assignment_flag): Likewise.
(check_final_variable_local_assignment_flag): Likewise.
(reset_final_variable_local_assignment_flag): Likewise.
(check_final_variable_indirect_assignment): Likewise.
(check_final_variable_global_assignment_flag): Likewise.
(add_inner_class_fields): Use LOCAL_FINAL_P.
(register_fields): Handle local finals and final variables.
(craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
(declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
(source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
on local finals.
(java_complete_expand_methods): Loop to set
TYPE_HAS_FINAL_VARIABLE. Call
`reset_final_variable_local_assignment_flag' and
`check_final_variable_local_assignment_flag' accordingly before
and after constructor expansion. Call
`reset_static_final_variable_assignment_flag'
before expanding <clinit> and after call
`check_static_final_variable_assignment_flag' if the
current_class isn't an interface. After all methods have been
expanded, call `check_final_variable_global_assignment_flag' and
`check_static_final_variable_assignment_flag' if the current class
is an interface.
(maybe_yank_clinit): Fixed typo in comment.
(build_outer_field_access_methods): Removed old sanity check. Use
FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
Don't create access methods for finals.
(resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
(java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
existing DECL_INIT has been processed.
(java_complete_lhs): Likewise.
(check_final_assignment): Filter input on `lvalue''s TREE_CODE.
Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
logic.
(patch_assignment): Use LOCAL_FINAL_P.
(fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
DECL_INITIAL is nullified.
Fixes gcj/163.
* parse.y (pop_current_osb): New function.
(array_type:): Use `dims:', changed actions
accordingly. Suggested by Anthony Green.
(array_creation_expression:): Used pop_current_osb.
(cast_expression:): Likewise.
(search_applicable_method_list): Fixed indentation.
2000-10-08 Anthony Green <green@redhat.com>
* parse.y (array_type_literal): Remove production.
(type_literals): Refer to array_type, not array_type_literal.
Joseph Myers [Wed, 6 Dec 2000 18:50:49 +0000 (18:50 +0000)]
invoke.texi: Use @table @samp instead of @itemize @minus for table of language standards.
* invoke.texi: Use @table @samp instead of @itemize @minus for
table of language standards. Fix use of @pxref. From Zack
Weinberg. Also exclude specs documentation from generated
manpage, and create separate ENVIRONMENT section.
Alexandre Oliva [Wed, 6 Dec 2000 17:19:32 +0000 (17:19 +0000)]
lang-specs.h (c++): When invoking the stand-alone preprocessor for -save-temps...
* lang-specs.h (c++): When invoking the stand-alone preprocessor
for -save-temps, pass all relevant -Defines to it, and then don't
pass them to cc1plus.
Jeffrey A Law [Wed, 6 Dec 2000 03:23:34 +0000 (03:23 +0000)]
configure.target (hpux): Set os_include_dir.
* configure.target (hpux): Set os_include_dir.
* config/os/hpux/bits/ctype_base.h: New file
* config/os/hpux/bits/ctype_inline.h: New file
* config/os/hpux/bits/ctype_noinline.h: New file
* config/os/hpux/bits/os_defines.h: New file
Neil Booth [Tue, 5 Dec 2000 23:42:43 +0000 (23:42 +0000)]
cppfiles.c (stack_include_file): Push zero-length buffers in case of failure.
* cppfiles.c (stack_include_file): Push zero-length buffers
in case of failure. Return void, as we don't fail any more.
(read_include_file): Check for files we shouldn't re-read.
Don't return an error code; errors are implied by marking the
file NEVER_REREAD.
(_cpp_execute_include): Move the recursion and in-macro checks
here. Update for stack_include_file not failing.
* cpplib.c (cpp_push_buffer): Always succeed, since
_cpp_execute_include performs the recursion check. Tidy up.
* cpplib.h (cpp_push_buffer): Update prototype.
Alexandre Oliva [Tue, 5 Dec 2000 22:53:33 +0000 (22:53 +0000)]
sched-vis.c (visual_tbl_line_length): New variable.
* sched-vis.c (visual_tbl_line_length): New variable.
(get_visual_tbl_length): Set it.
(visualize_stall_cycles): Don't let stalls overrun
visual_tbl_line_length.
Zack Weinberg [Tue, 5 Dec 2000 22:12:42 +0000 (22:12 +0000)]
texi2pod.pl: Restructure for comprehensibility, add comments.
* texi2pod.pl: Restructure for comprehensibility, add
comments. Merge handling of @ignore and @ifxxx. Handle a
whole bunch more Texinfo commands. Use consistent formatting
style.
Benjamin Kosnik [Tue, 5 Dec 2000 22:03:19 +0000 (22:03 +0000)]
acinclude.m4 (GLIBCPP_ENABLE_LONG_LONG): Check for lldiv_t.
2000-12-05 Benjamin Kosnik <bkoz@haight.redhat.com>
* acinclude.m4 (GLIBCPP_ENABLE_LONG_LONG): Check for
lldiv_t. Allow the use of os-specific defines while checking for
long-long functions by the inclusion of os_defines.h.
* aclocal.m4: Regenerate.
* configure.in: Add comments.
* configure: Regenerate.
* acconfig.h: Add _GLIBCPP_HAVE_LLDIV_T.
* config.h.in: Regenerate.
* config/os/gnu-linux/bits/os_defines.h: Fix typos and
duplications in comments.
mkfixinc.sh (*-gnu*): activate fixinc for GNU/Hurd and GNU/Linux.
* fixinc/mkfixinc.sh(*-gnu*): activate fixinc for GNU/Hurd and
GNU/Linux.
* fixinc/mkfixinc.sh: Run fixinc on netbsd.
* fixinc/inclhack.def (machine/ansi.h): Run this rule on all files,
to cope with aliased copies.
* fixinc/fixincl.x: Regenerate.
Nathan Sidwell [Tue, 5 Dec 2000 15:50:06 +0000 (15:50 +0000)]
cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
cp:
* cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
(get_matching_virtual): Remove.
(look_for_overrides): Declare new function.
* decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
DECL_VINDEX here.
* class.c (check_for_override): Move base class iteration code
to look_for_overrides.
* search.c (next_baselink): Remove.
(get_virtuals_named_this): Remove.
(get_virtual_destructor): Remove.
(tree_has_any_destructors_p): Remove.
(struct gvnt_info): Remove.
(check_final_overrider): Remove `virtual' from error messages.
(get_matching_virtuals): Remove. Move functionality to ...
(look_for_overrides): ... here, and ...
(look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
to be overriding.
testsuite:
* g++.old-deja/g++.h/spec6.C: Remove some of the XFAILS.
* g++.old-deja/g++.other/virtual10.C: New test.
Nathan Sidwell [Tue, 5 Dec 2000 15:35:59 +0000 (15:35 +0000)]
typeck.c (get_delta_difference): If via a virtual base, return zero.
cp:
* typeck.c (get_delta_difference): If via a virtual base,
return zero.
* cvt.c (cp_convert_to_pointer): If via a virtual base, do no
adjustment.
testsuite:
* g++.old-deja/g++.mike/pmf5.C: Remove test.
* aclocal.m4: Add test for NetBSD's ctype support.
* configure: Regenerate.
* configure.target: Support NetBSD.
* config/os/netbsd/bits/ctype_base.h: New file.
* config/os/netbsd/bits/ctype_inline.h: New file.
* config/os/netbsd/bits/ctype_noinline.h: New file.
* config/os/netbsd/bits/os_defines.h: New file.
flow.c (calculate_global_regs_live): Only force stack pointer live before reload.
* flow.c (calculate_global_regs_live): Only force stack pointer
live before reload. Force pic register live before reload.
(insn_dead_p): Don't protect pic references from deletion.
Joseph Myers [Mon, 4 Dec 2000 23:03:07 +0000 (23:03 +0000)]
ONEWS: New file with the current contents of NEWS up to EGCS 1.1.
gcc:
* ONEWS: New file with the current contents of NEWS up to EGCS
1.1.
* NEWS: Generate automatically from online release notes from EGCS
1.0 to GCC 2.95.2, using ../contrib/gennews.