1 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
3 * class.c: Fix comment typos.
11 2004-01-30 Richard Henderson <rth@redhat.com>
14 * method.c (use_thunk): Don't force_target_expr for void thunks.
15 * tree.c (build_target_expr_with_type): Assert non-void type.
16 (force_target_expr): Likewise.
18 2004-01-30 Michael Matz <matz@suse.de>
20 * parser.c (cp_parser_labeled_statement): Accept case ranges.
22 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
26 * decl.c (grokdeclarator): Check immediatly type completeness for
29 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
32 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
33 a sizeof expression.block
35 2004-01-29 Mark Mitchell <mark@codesourcery.com>
38 * mangle.c (write_encoding): Correct encoding of member template
41 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
43 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
44 template name as it was `<::' (digraph typo).
45 (cp_parser_nth_token_starts_template_argument_list_p): New function.
46 (cp_parser_id_expression): Use it.
47 (cp_parser_nested_name_specifier_opt): Likewise.
48 (cp_parser_template_name): Likewise.
49 (cp_parser_class_name): Likewise.
50 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
52 2004-01-28 Mark Mitchell <mark@codesourcery.com>
55 * typeck.c (merge_types): Do not merge attributes into
59 * parser.c (cp_parser_direct_declarator): Do not prevent
60 backtracking inside a parenthesized declarator.
61 (cp_parser_parameter_declaration): Fix typo in comment.
63 2004-01-28 Jan Hubicka <jh@suse.cz>
65 * semantics.c (expand_body) Do emit_associated_thunks before
68 2004-01-27 Devang Patel <dpatel@apple.com>
70 * name-lookup.c: Include "debug.h"
71 (do_namespace_alias): Invoke debug_hooks to emit debug info
73 (do_local_using_decl): Invoke debug_hooks to emit debug info
75 (do_class_using_decl): Same.
76 (do_toplevel_using_decl): Same.
77 (do_using_directive): Same.
78 (cp_emit_debug_info_for_using): New function.
79 * Make-lang.in (cp/parser.o): Depend on debug.h
80 (cp/name-lookup.o): Same.
82 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
84 * cp-tree.h (language_function, lang_type_header): Use
86 * name-lookup.h (cp_binding_level): Likewise.
88 2004-01-26 Mark Mitchell <mark@codesourcery.com>
91 * semantics.c (finish_for_expr): Check for unresolved overloaded
94 * class.c (add_method): Just check processing_template_decl to
95 determine whether or not we are within a template.
96 * decl2.c (maybe_retrofit_in_chrg): Likewise.
97 * init.c (decl_constant_value): Check the type of the declaration,
99 * name-lookup.c (maybe_push_to_top_level): Rename to ...
100 (push_to_top_level): ... this.
101 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
102 * pt.c (push_template_decl_real): Reorder condition for speed.
103 (convert_template_argument): Use dependency-checking functions in
104 place of uses_template_parms.
105 (lookup_template_class): Avoid calling uses_template_parms more
107 (uses_template_parms): Reimplement, using dependency-checking
109 (instantiate_class_template): Use push_to_top_level, not
110 maybe_push_to_top_level.
111 (type_unification_real): Simplify.
112 (type_dependent_expression_p): Handle OFFSET_REFs and
114 (any_dependent_template_arguments_p): Handle multiple levels of
116 * semantics.c (expand_or_defer_fn): Do not check
117 uses_template_parms for template instantiations.
118 * typeck.c (comptypes): Avoid calling cp_type_quals.
120 2004-01-25 Mark Mitchell <mark@codesourcery.com>
123 * call.c (build_over_call): Do not convert arguments when
124 processing a template.
125 * pt.c (build_non_dependent_expr): Do not build a
126 NON_DEPENDENT_EXPR for arithmetic constants.
128 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
131 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
132 returns a TYPE_DECL. no further lookup is required.
133 * semantics.c (check_template_template_default_arg): A TYPE_DECL
134 is invalid. Rework to give better diagnostics.
136 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
139 * pt.c (instantiate_class_template): Add an error_mark_node
141 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
143 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
146 * decl.c (finish_function): Move the call to
147 finish_fname_decls below the call to
148 finish_eh_spec_block.
150 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
152 * optimize.c, typeck2.c: Update copyright.
154 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
156 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
157 init.c, mangle.c, typeck.c: Update copyright.
159 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
161 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
163 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
165 * Make-lang.in: Replace $(docdir) with doc.
166 (c++.info, c++.srcinfo): Dummy entry.
167 (c++.man, c++.srcman): New rules.
168 (c++.install-man): Revamp rule.
170 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
172 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
173 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
174 immediate $(shell) instead of deferred backquote.
176 2004-01-19 Mark Mitchell <mark@codesourcery.com>
179 * parser.c (cp_parser_postfix_expression): When encountering
180 incomplete type on left-hand side of "->" or ".", treat the entire
181 expression as erroneous.
184 * call.c (build_field_call): Remove.
185 (n_build_method_call): Likewise.
186 (build_method_call): Likewise.
187 (build_new_method_call): Do not call build_field_call.
188 * class.c (n_build_method_call): Remove.
189 (print_class_statistics): Do not print it.
190 * cp-tree.h (build_method_call): Remove declaration.
191 (finish_object_call_expr): Likewise.
192 (build_new_1): Do not use build_method_call.
193 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
194 when the function appearing on the right-hand-side of "." or "->"
195 is not actually a function.
196 * pt.c (tsubst_copy_and_build): Likewise.
197 * semantics.c (finish_object_call_expr): Remove.
199 2004-01-18 Mark Mitchell <mark@codesourcery.com>
202 * pt.c (tsubst): Use finish_typeof.
204 2004-01-16 Jason Merrill <jason@redhat.com>
207 * except.c (build_throw): In a template, set
208 current_function_returns_abnormally.
210 2004-01-17 Fred Fish <fnf@intrinsity.com>
213 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
214 except don't call array_type_nelts() with a VECTOR_TYPE.
216 2004-01-16 Jan Hubicka <jh@suse.cz>
218 * mangle.c (write_mangled_name): Remove inline modifier.
220 2004-01-16 Mark Mitchell <mark@codesourcery.com>
223 * decl.c (compute_array_index_type): Fix grammar in comment.
224 * init.c (build_zero_init): Handle zero-sized arrays correctly.
227 * call.c (name_as_c_string): Print conversion operator names
231 * call.c (initialize_reference): Pass -1 for inner parameter to
234 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
237 * parser.c (cp_parser_base_specifier): Check for an invalid
238 keyword `typename' and emit an user-friendly error message.
240 2004-01-15 Geoffrey Keating <geoffk@apple.com>
243 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
244 (handle_pragma_implementation): Likewise.
246 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
249 * typeck.c (build_class_member_access_expr): Allow to access members
250 of the currently open class.
251 (finish_class_member_access_expr): Likewise.
253 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
256 * name-lookup.c (validate_nonmember_using_decl): Take scope and
257 name by value, instead of computing them.
258 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
259 arguments. Pass them to validate_nonmember_using_decl.
260 * name-lookup.h (do_local_using_decl): Adjust.
261 (do_toplevel_using_decl): Likewise.
262 * parser.c (cp_parser_using_declaration): Likewise.
263 * pt.c (tsubst_expr): Likewise.
265 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
269 * name-lookup.c (qualified_lookup_using_namespace): Search
270 strongly-associated namespaces first, and only then try other
273 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
275 * Make-lang.in (c++.srcextra): Dummy entry.
277 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
280 * parser.c (cp_parser_template_name): Don't try to parse a
281 conversion-function-id, as it cannot be a template-name.
282 (cp_parser_simple_type_specifier): Check for invalid template-ids
283 even after a built-in type.
285 2004-01-14 Jan Hubicka <jh@suse.cz>
288 * pt.c (instantiate_decl): Do not increase function_depth.
290 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
294 * parser.c (cp_parser_elaborated_type_specifier): Warn about
295 attributes and discard.
296 * decl.c (xref_tag): Don't overwite existing attributes with
299 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
302 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
303 is no destructor while looking up a BIT_NOT_EXPR.
305 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
307 * cxxfilt.c: Remove unused file.
309 2004-01-14 Jan Hubicka <jh@suse.cz>
311 Partial fix to PR c++/12850
312 * decl2.c (mark_used): Do not proactively instantiate templates
313 when compiling in unit-at-a-time or not optimizing.
314 * optimize.c (maybe_clone_body): Do not increase function depth.
316 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
319 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
321 2003-01-12 Steven Bosscher <stevenb@suse.de>
324 * parser.c (cp_parser_member_declaration): Any non-type is also
325 not a class or a function.
327 2004-01-12 Jason Merrill <jason@redhat.com>
330 * class.c (build_base_path): Do not mark vtable references as
332 (build_vtbl_ref_1): Likewise.
334 2004-01-12 Richard Henderson <rth@redhat.com>
337 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
338 (store_init_value): Use it.
339 * decl.c (check_initializer): Expect full initialization code
340 from store_init_value.
341 * init.c (expand_aggr_init_1): Likewise.
342 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
344 2004-01-12 Mark Mitchell <mark@codesourcery.com>
346 * class.c (layout_class_type): For non-POD class types, also copy
347 the DECL_SIZE and DECL_MODE of fields to the base class type.
349 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
352 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
353 calling regenerate_decl_from_template.
355 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
358 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
359 decl-specifier occurring along with a class definition.
361 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
363 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
364 clauses to comments describing declares_class_or_enum.
365 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
368 2004-01-12 Jan Hubicka <jh@suse.cz>
370 * pt.c (for_each_template_parm): Do not check for duplicates.
371 (for_each_template_parm): Use walk_tree duplicate checking code.
373 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
376 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
377 is error_mark_node, don't add any more decl_specs.
378 (cp_parser_init_declarator): After committing to a declaration, if
379 the decl_specifiers start with error_mark_node, issue an error and
380 change the type to "int".
382 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
385 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
387 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
391 * pt.c (tsubst): Substitution must fail if we are attempting to
392 create an array with element type that is an abstract class type.
393 * decl.c (cp_finish_decl): Strip pointers and array types recursively
394 before calling abstract_virtuals_error.
396 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
398 * name-lookup.c (qualified_lookup_using_namespace): Consider
399 strong using directives even if we've already found a binding.
401 2004-01-09 Mark Mitchell <mark@codesourcery.com>
403 * cp-tree.h (cxx_expand_expr): Change prototype.
404 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
406 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
409 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
410 looking into them recursively. They can be there because of the
411 new __offsetof__ extension.
413 2004-01-07 Zack Weinberg <zack@codesourcery.com>
415 * parser.c (cp_parser_save_member_function_body): Mark the
418 2004-01-05 Mark Mitchell <mark@codesourcery.com>
421 * class.c (build_clone): Copy type attributes from the original
422 function to the clone.
425 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
426 references as constant.
429 * parser.c (cp_parser_explicit_instantiation): Improve error
431 (cp_parser_require): Improve indication of the error location.
434 * parser.c (cp_parser_class_head): Reorder logic to check for
435 invalid qualification.
437 2004-01-04 Mark Mitchell <mark@codesourcery.com>
440 * name-lookup.c (lookup_using_namespace): Remove spacesp
442 (unqualified_namespace_lookup): Likewise.
443 (lookup_qualified_name): Adjust accordingly.
444 (lookup_name_real): Likewise.
445 (lookup_arg_dependent): Do not eliminate the namespace of the
446 functions found by unqualified name lookup unless that is the
449 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
451 * semantics.c (push_deferring_access_checks): Fix format.
452 (resume_deferring_access_checks): Likewise.
453 (stop_deferring_access_checks): Likewise.
454 (pop_deferring_access_checks): Likewise.
455 (get_deferred_access_checks): Likewise.
456 (pop_to_parent_deferring_access_checks): Likewise.
457 (perform_deferred_access_checks): Likewise.
458 (perform_or_defer_access_check): Likewise.
460 2004-01-04 Richard Henderson <rth@redhat.com>
462 * call.c (build_over_call): Don't create a save_expr of an
463 aggregate, but rather its address.
465 2004-01-04 Mark Mitchell <mark@codesourcery.com>
468 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
469 an offsetof expression.
471 * parser.c (cp_parser_parameter_declaration): Fix comment.
474 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
475 (reference_binding): Set it when appropriate.
476 (build_temp): New function, split out from ...
477 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
478 (initialize_reference): Likewise.
481 * parser.c (cp_parser): Add in_type_id_in_expr_p.
482 (cp_parser_new): Initialize it.
483 (cp_parser_postfix_expression): Set it.
484 (cp_parser_sizeof_operand): Likewise.
485 (cp_parser_parameteR_declaration): Do not commit early to tenative
486 parsers when in_type_id_in_expr_p is set.
488 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
491 * parser.c (cp_parser_template_argument): Don't call
492 make_unbound_class_template directly.
493 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
494 UNBOUND_CLASS_TEMPLATE tree node.
496 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
499 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
501 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
504 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
505 (DECL_FUNCTION_TEMPLATE_P): Use it.
506 (DECL_CLASS_TEMPLATE_P): Likewise.
507 * parser.c (cp_parser_lookup_name): Add is_template parameter.
508 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
509 (cp_parser_template_name): Likewise.
510 (cp_parser_elaborated_type_specifier): Likewise.
511 (cp_parser_namespace_name): Likewise.
512 (cp_parser_class_name): Likewise.
513 (cp_parser_lookup_name_simple): Likewise.
515 See ChangeLog.3 for earlier changes.