PR c++/8442
* decl2.c (handle_class_head): Verify if the looked up name is a
type or template.
* pt.c (convert_template_argument): Fix type or template template
parameter decision logic.
* g++.dg/template/type2.C: New test.
* g++.dg/template/ttp3.C: Change expected error message.
pa.h (BIGGEST_ALIGNMENT): Change 32-bit value to 64 bits.
* pa.h (BIGGEST_ALIGNMENT): Change 32-bit value to 64 bits.
(MAX_PARM_BOUNDARY, STACK_BOUNDARY): Express in terms of
BIGGEST_ALIGNMENT.
(PREFERRED_STACK_BOUNDARY): Express in terms of STACK_BOUNDARY.
(FUNCTION_BOUNDARY): Express in terms of BITS_PER_WORD.
Mark Mitchell [Tue, 10 Dec 2002 07:16:06 +0000 (07:16 +0000)]
re PR c++/8153 (ICE with static const member in class)
PR c++/8153
PR c++/8036
* NEWS: Document removal of in-class initialization extension for
static data members of non-arithmetic, non-enumeration type.
* decl.c (check_static_variable_definition): Do not allow that
extension.
* decl2.c (grokfield): Do not call digest_init when processing
templates.
PR c++/8153
PR c++/8036
* g++.dg/template/static1.C: New test.
* g++.dg/template/static2.C: New test.
* g++.old-deja/g++.ext/memconst.C: New test.
Benjamin Kosnik [Thu, 5 Dec 2002 23:48:57 +0000 (23:48 +0000)]
[multiple changes]
2002-12-05 Benjamin Kosnik <bkoz@redhat.com>
* config/linker-map.gnu: Put _S_force_new into GLIBCPP_3.2.2.
* testsuite/abi_check.cc: Add GLIBCPP_3.2.2.
2002-12-05 Benjamin Kosnik <bkoz@redhat.com>
Gabriel Dos Reis <gdr@integrable-solutions.net>
PR libstdc++/8230
* include/bits/stl_alloc.h: Use builtin_expect for the most
obvious limit checks.
(__default_alloc_template::allocate): Check for null, throw
bad_alloc.
* testsuite/20_util/allocator_members.cc (test02): Add.
* testsuite/23_containers/vector_capacity.cc (test03): Add.
2002-12-05 Loren J. Rittle <ljrittle@acm.org>
Brad Spencer <spencer@infointeractive.com>
(provided alternate patch and improvements)
PR libstdc++/8708
* docs/html/23_containers/howto.html (GLIBCPP_FORCE_NEW): Document
new environment variable which replaces all uses of __USE_MALLOC
macro.
* docs/html/ext/howto.html (GLIBCPP_FORCE_NEW): Likewise.
(__mem_interface): Remove all references to old internal typedef.
* include/backward/alloc.h (__USE_MALLOC): Remove it and all
guarded code.
* include/bits/c++config (__USE_MALLOC): Update related error
message and comment.
* include/bits/stl_alloc.h (__USE_MALLOC): Remove it and all
guarded code. Update all related comments.
(__mem_interface): Unconditionally replace it with __new_alloc.
However, leave the typedef around in case anyone used it.
(__default_alloc_template<>::_S_force_new): New class static.
(__default_alloc_template<>::allocate, deallocate): Add
run-time controlled feature similar to what __USE_MALLOC code
path had provided.
* src/stl-inst.cc (__USE_MALLOC): Remove it and all
guarded code.
* testsuite/21_strings/capacity.cc: Remove reference to __USE_MALLOC.
Add documentation on GLIBCPP_FORCE_NEW environment variable.
* testsuite/ext/allocators.cc: Likewise.
Paolo Carlini [Mon, 2 Dec 2002 22:05:21 +0000 (22:05 +0000)]
revert: [multiple changes]
2002-12-02 Benjamin Kosnik <bkoz@redhat.com>
Jonathan Lennox <lennox@cs.columbia.edu>
* include/bits/streambuf.tcc (__copy_streambufs):
Revert previous fix for the interactive half of
libstdc++/6745, use _M_buf_size_opt to set dynamically
the correct buffer size.
2002-12-02 Jonathan Lennox <lennox@cs.columbia.edu>
PR libstdc++/6745 (continued)
* include/bits/streambuf.tcc (__copy_streambufs):
Deal with interactive input by using isatty as in the
fix for libstdc++/8399.
* src/ios.cc [_GLIBCPP_HAVE_UNISTD_H]: Include unistd.h.
2002-12-02 Paolo Carlini <pcarlini@unitus.it>
Loren J. Rittle <ljrittle@acm.org>
PR libstdc++/8399
* acinclude.m4
(GLIBCPP_CHECK_UNISTD_DECL_AND_LINKAGE_1): New macro to
check for unistd.h functions.
(GLIBCPP_CHECK_UNISTD_SUPPORT): New macro, check for isatty
in unistd.h.
* configure.in: Call here.
* src/ios.cc (ios_base::Init::_S_ios_create(bool)):
Use _GLIBCPP_HAVE_ISATTY: ifdef, in case of interactive
input __in_size = 1 even when sync_with_stdio is false;
otherwise fall back to __in_size = 1.
* aclocal.m4: Regenerate.
* config.h.in: Regenerate.
* configure: Regenerate.
* builtin-types.def (BT_SIZE): Use size_type_node.
* builtins.c (fold_builtin): Make the builtin strlen returns a
size_t, not a sizetype.
* c-common.c (c_alignof): Use size_type_node, not c_size_type_node.
(c_alignof_expr): Likewise.
(c_common_nodes_and_builtins): Likewise.
* c-common.h (CTI_C_SIZE_TYPE): Remove.
(c_size_type_node): Likewise.
* c-format.c (T_ST): Use size_type_node, not c_size_type_node.
* tree.h (TI_SIZE_TYPE): New enumeral.
(size_type_node): Likewise.
PR c++/8332
PR c++/8493
* g++.dg/template/strlen1.C: New test.
Neil Booth [Tue, 26 Nov 2002 20:40:46 +0000 (20:40 +0000)]
re PR preprocessor/8524 (_Pragma within macros is improperly expanded)
PR preprocessor/8524
* cpplib.c (run_directive): Remove previous kludge to _Pragma.
Add a new one in its place, which hopefully works.
(skip_rest_of_line): Change test for bottom-of-context-stack.
testsuite:
* gcc.dg/cpp/_Pragma5.c: New test.
David Edelsohn [Tue, 26 Nov 2002 15:59:58 +0000 (15:59 +0000)]
re PR middle-end/8362 (hard reg not substituted for all pseudos on PowerPC)
* config/rs6000/rs6000.c (rs6000_flag_pic): New variable.
(rs6000_override_options): Save original flag_pic value.
(rs6000_encode_section_info): More accurate test for "local" symbol.
PR 8362
* config/rs6000/rs6000.c (rs6000_outout_load_multiple): New function.
* config/rs6000/rs6000.md (ldmsi[3-8]): New patterns.
Toon Moene [Sat, 23 Nov 2002 00:12:02 +0000 (01:12 +0100)]
c-decl.c (c_init_decl_processing): Move generation of decls for g77_integer_type_node and friends from here ...
2002-11-22 Toon Moene <toon@moene.indiv.nluug.nl>
* c-decl.c (c_init_decl_processing): Move generation of
decls for g77_integer_type_node and friends from here ...
* c-common.c (c_common_nodes_and_builtins): ... to here.