1 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
5 a sizeof expression.block
7 2004-01-29 Mark Mitchell <mark@codesourcery.com>
10 * mangle.c (write_encoding): Correct encoding of member template
13 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
15 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
16 template name as it was `<::' (digraph typo).
17 (cp_parser_nth_token_starts_template_argument_list_p): New function.
18 (cp_parser_id_expression): Use it.
19 (cp_parser_nested_name_specifier_opt): Likewise.
20 (cp_parser_template_name): Likewise.
21 (cp_parser_class_name): Likewise.
22 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
24 2004-01-28 Mark Mitchell <mark@codesourcery.com>
27 * typeck.c (merge_types): Do not merge attributes into
31 * parser.c (cp_parser_direct_declarator): Do not prevent
32 backtracking inside a parenthesized declarator.
33 (cp_parser_parameter_declaration): Fix typo in comment.
35 2004-01-28 Jan Hubicka <jh@suse.cz>
37 * semantics.c (expand_body) Do emit_associated_thunks before
40 2004-01-27 Devang Patel <dpatel@apple.com>
42 * name-lookup.c: Include "debug.h"
43 (do_namespace_alias): Invoke debug_hooks to emit debug info
45 (do_local_using_decl): Invoke debug_hooks to emit debug info
47 (do_class_using_decl): Same.
48 (do_toplevel_using_decl): Same.
49 (do_using_directive): Same.
50 (cp_emit_debug_info_for_using): New function.
51 * Make-lang.in (cp/parser.o): Depend on debug.h
52 (cp/name-lookup.o): Same.
54 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
56 * cp-tree.h (language_function, lang_type_header): Use
58 * name-lookup.h (cp_binding_level): Likewise.
60 2004-01-26 Mark Mitchell <mark@codesourcery.com>
63 * semantics.c (finish_for_expr): Check for unresolved overloaded
66 * class.c (add_method): Just check processing_template_decl to
67 determine whether or not we are within a template.
68 * decl2.c (maybe_retrofit_in_chrg): Likewise.
69 * init.c (decl_constant_value): Check the type of the declaration,
71 * name-lookup.c (maybe_push_to_top_level): Rename to ...
72 (push_to_top_level): ... this.
73 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
74 * pt.c (push_template_decl_real): Reorder condition for speed.
75 (convert_template_argument): Use dependency-checking functions in
76 place of uses_template_parms.
77 (lookup_template_class): Avoid calling uses_template_parms more
79 (uses_template_parms): Reimplement, using dependency-checking
81 (instantiate_class_template): Use push_to_top_level, not
82 maybe_push_to_top_level.
83 (type_unification_real): Simplify.
84 (type_dependent_expression_p): Handle OFFSET_REFs and
86 (any_dependent_template_arguments_p): Handle multiple levels of
88 * semantics.c (expand_or_defer_fn): Do not check
89 uses_template_parms for template instantiations.
90 * typeck.c (comptypes): Avoid calling cp_type_quals.
92 2004-01-25 Mark Mitchell <mark@codesourcery.com>
95 * call.c (build_over_call): Do not convert arguments when
96 processing a template.
97 * pt.c (build_non_dependent_expr): Do not build a
98 NON_DEPENDENT_EXPR for arithmetic constants.
100 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
103 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
104 returns a TYPE_DECL. no further lookup is required.
105 * semantics.c (check_template_template_default_arg): A TYPE_DECL
106 is invalid. Rework to give better diagnostics.
108 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
111 * pt.c (instantiate_class_template): Add an error_mark_node
113 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
115 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
118 * decl.c (finish_function): Move the call to
119 finish_fname_decls below the call to
120 finish_eh_spec_block.
122 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
124 * optimize.c, typeck2.c: Update copyright.
126 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
128 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
129 init.c, mangle.c, typeck.c: Update copyright.
131 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
133 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
135 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
137 * Make-lang.in: Replace $(docdir) with doc.
138 (c++.info, c++.srcinfo): Dummy entry.
139 (c++.man, c++.srcman): New rules.
140 (c++.install-man): Revamp rule.
142 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
144 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
145 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
146 immediate $(shell) instead of deferred backquote.
148 2004-01-19 Mark Mitchell <mark@codesourcery.com>
151 * parser.c (cp_parser_postfix_expression): When encountering
152 incomplete type on left-hand side of "->" or ".", treat the entire
153 expression as erroneous.
156 * call.c (build_field_call): Remove.
157 (n_build_method_call): Likewise.
158 (build_method_call): Likewise.
159 (build_new_method_call): Do not call build_field_call.
160 * class.c (n_build_method_call): Remove.
161 (print_class_statistics): Do not print it.
162 * cp-tree.h (build_method_call): Remove declaration.
163 (finish_object_call_expr): Likewise.
164 (build_new_1): Do not use build_method_call.
165 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
166 when the function appearing on the right-hand-side of "." or "->"
167 is not actually a function.
168 * pt.c (tsubst_copy_and_build): Likewise.
169 * semantics.c (finish_object_call_expr): Remove.
171 2004-01-18 Mark Mitchell <mark@codesourcery.com>
174 * pt.c (tsubst): Use finish_typeof.
176 2004-01-16 Jason Merrill <jason@redhat.com>
179 * except.c (build_throw): In a template, set
180 current_function_returns_abnormally.
182 2004-01-17 Fred Fish <fnf@intrinsity.com>
185 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
186 except don't call array_type_nelts() with a VECTOR_TYPE.
188 2004-01-16 Jan Hubicka <jh@suse.cz>
190 * mangle.c (write_mangled_name): Remove inline modifier.
192 2004-01-16 Mark Mitchell <mark@codesourcery.com>
195 * decl.c (compute_array_index_type): Fix grammar in comment.
196 * init.c (build_zero_init): Handle zero-sized arrays correctly.
199 * call.c (name_as_c_string): Print conversion operator names
203 * call.c (initialize_reference): Pass -1 for inner parameter to
206 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
209 * parser.c (cp_parser_base_specifier): Check for an invalid
210 keyword `typename' and emit an user-friendly error message.
212 2004-01-15 Geoffrey Keating <geoffk@apple.com>
215 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
216 (handle_pragma_implementation): Likewise.
218 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
221 * typeck.c (build_class_member_access_expr): Allow to access members
222 of the currently open class.
223 (finish_class_member_access_expr): Likewise.
225 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
228 * name-lookup.c (validate_nonmember_using_decl): Take scope and
229 name by value, instead of computing them.
230 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
231 arguments. Pass them to validate_nonmember_using_decl.
232 * name-lookup.h (do_local_using_decl): Adjust.
233 (do_toplevel_using_decl): Likewise.
234 * parser.c (cp_parser_using_declaration): Likewise.
235 * pt.c (tsubst_expr): Likewise.
237 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
241 * name-lookup.c (qualified_lookup_using_namespace): Search
242 strongly-associated namespaces first, and only then try other
245 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
247 * Make-lang.in (c++.srcextra): Dummy entry.
249 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
252 * parser.c (cp_parser_template_name): Don't try to parse a
253 conversion-function-id, as it cannot be a template-name.
254 (cp_parser_simple_type_specifier): Check for invalid template-ids
255 even after a built-in type.
257 2004-01-14 Jan Hubicka <jh@suse.cz>
260 * pt.c (instantiate_decl): Do not increase function_depth.
262 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
266 * parser.c (cp_parser_elaborated_type_specifier): Warn about
267 attributes and discard.
268 * decl.c (xref_tag): Don't overwite existing attributes with
271 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
274 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
275 is no destructor while looking up a BIT_NOT_EXPR.
277 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
279 * cxxfilt.c: Remove unused file.
281 2004-01-14 Jan Hubicka <jh@suse.cz>
283 Partial fix to PR c++/12850
284 * decl2.c (mark_used): Do not proactively instantiate templates
285 when compiling in unit-at-a-time or not optimizing.
286 * optimize.c (maybe_clone_body): Do not increase function depth.
288 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
291 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
293 2003-01-12 Steven Bosscher <stevenb@suse.de>
296 * parser.c (cp_parser_member_declaration): Any non-type is also
297 not a class or a function.
299 2004-01-12 Jason Merrill <jason@redhat.com>
302 * class.c (build_base_path): Do not mark vtable references as
304 (build_vtbl_ref_1): Likewise.
306 2004-01-12 Richard Henderson <rth@redhat.com>
309 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
310 (store_init_value): Use it.
311 * decl.c (check_initializer): Expect full initialization code
312 from store_init_value.
313 * init.c (expand_aggr_init_1): Likewise.
314 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
316 2004-01-12 Mark Mitchell <mark@codesourcery.com>
318 * class.c (layout_class_type): For non-POD class types, also copy
319 the DECL_SIZE and DECL_MODE of fields to the base class type.
321 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
324 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
325 calling regenerate_decl_from_template.
327 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
330 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
331 decl-specifier occurring along with a class definition.
333 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
335 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
336 clauses to comments describing declares_class_or_enum.
337 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
340 2004-01-12 Jan Hubicka <jh@suse.cz>
342 * pt.c (for_each_template_parm): Do not check for duplicates.
343 (for_each_template_parm): Use walk_tree duplicate checking code.
345 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
348 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
349 is error_mark_node, don't add any more decl_specs.
350 (cp_parser_init_declarator): After committing to a declaration, if
351 the decl_specifiers start with error_mark_node, issue an error and
352 change the type to "int".
354 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
357 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
359 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
363 * pt.c (tsubst): Substitution must fail if we are attempting to
364 create an array with element type that is an abstract class type.
365 * decl.c (cp_finish_decl): Strip pointers and array types recursively
366 before calling abstract_virtuals_error.
368 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
370 * name-lookup.c (qualified_lookup_using_namespace): Consider
371 strong using directives even if we've already found a binding.
373 2004-01-09 Mark Mitchell <mark@codesourcery.com>
375 * cp-tree.h (cxx_expand_expr): Change prototype.
376 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
378 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
381 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
382 looking into them recursively. They can be there because of the
383 new __offsetof__ extension.
385 2004-01-07 Zack Weinberg <zack@codesourcery.com>
387 * parser.c (cp_parser_save_member_function_body): Mark the
390 2004-01-05 Mark Mitchell <mark@codesourcery.com>
393 * class.c (build_clone): Copy type attributes from the original
394 function to the clone.
397 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
398 references as constant.
401 * parser.c (cp_parser_explicit_instantiation): Improve error
403 (cp_parser_require): Improve indication of the error location.
406 * parser.c (cp_parser_class_head): Reorder logic to check for
407 invalid qualification.
409 2004-01-04 Mark Mitchell <mark@codesourcery.com>
412 * name-lookup.c (lookup_using_namespace): Remove spacesp
414 (unqualified_namespace_lookup): Likewise.
415 (lookup_qualified_name): Adjust accordingly.
416 (lookup_name_real): Likewise.
417 (lookup_arg_dependent): Do not eliminate the namespace of the
418 functions found by unqualified name lookup unless that is the
421 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
423 * semantics.c (push_deferring_access_checks): Fix format.
424 (resume_deferring_access_checks): Likewise.
425 (stop_deferring_access_checks): Likewise.
426 (pop_deferring_access_checks): Likewise.
427 (get_deferred_access_checks): Likewise.
428 (pop_to_parent_deferring_access_checks): Likewise.
429 (perform_deferred_access_checks): Likewise.
430 (perform_or_defer_access_check): Likewise.
432 2004-01-04 Richard Henderson <rth@redhat.com>
434 * call.c (build_over_call): Don't create a save_expr of an
435 aggregate, but rather its address.
437 2004-01-04 Mark Mitchell <mark@codesourcery.com>
440 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
441 an offsetof expression.
443 * parser.c (cp_parser_parameter_declaration): Fix comment.
446 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
447 (reference_binding): Set it when appropriate.
448 (build_temp): New function, split out from ...
449 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
450 (initialize_reference): Likewise.
453 * parser.c (cp_parser): Add in_type_id_in_expr_p.
454 (cp_parser_new): Initialize it.
455 (cp_parser_postfix_expression): Set it.
456 (cp_parser_sizeof_operand): Likewise.
457 (cp_parser_parameteR_declaration): Do not commit early to tenative
458 parsers when in_type_id_in_expr_p is set.
460 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
463 * parser.c (cp_parser_template_argument): Don't call
464 make_unbound_class_template directly.
465 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
466 UNBOUND_CLASS_TEMPLATE tree node.
468 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
471 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
473 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
476 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
477 (DECL_FUNCTION_TEMPLATE_P): Use it.
478 (DECL_CLASS_TEMPLATE_P): Likewise.
479 * parser.c (cp_parser_lookup_name): Add is_template parameter.
480 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
481 (cp_parser_template_name): Likewise.
482 (cp_parser_elaborated_type_specifier): Likewise.
483 (cp_parser_namespace_name): Likewise.
484 (cp_parser_class_name): Likewise.
485 (cp_parser_lookup_name_simple): Likewise.
487 See ChangeLog.3 for earlier changes.