1 2004-01-29 Mark Mitchell <mark@codesourcery.com>
4 * mangle.c (write_encoding): Correct encoding of member template
7 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
9 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
10 template name as it was `<::' (digraph typo).
11 (cp_parser_nth_token_starts_template_argument_list_p): New function.
12 (cp_parser_id_expression): Use it.
13 (cp_parser_nested_name_specifier_opt): Likewise.
14 (cp_parser_template_name): Likewise.
15 (cp_parser_class_name): Likewise.
16 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
18 2004-01-28 Mark Mitchell <mark@codesourcery.com>
21 * typeck.c (merge_types): Do not merge attributes into
25 * parser.c (cp_parser_direct_declarator): Do not prevent
26 backtracking inside a parenthesized declarator.
27 (cp_parser_parameter_declaration): Fix typo in comment.
29 2004-01-28 Jan Hubicka <jh@suse.cz>
31 * semantics.c (expand_body) Do emit_associated_thunks before
34 2004-01-27 Devang Patel <dpatel@apple.com>
36 * name-lookup.c: Include "debug.h"
37 (do_namespace_alias): Invoke debug_hooks to emit debug info
39 (do_local_using_decl): Invoke debug_hooks to emit debug info
41 (do_class_using_decl): Same.
42 (do_toplevel_using_decl): Same.
43 (do_using_directive): Same.
44 (cp_emit_debug_info_for_using): New function.
45 * Make-lang.in (cp/parser.o): Depend on debug.h
46 (cp/name-lookup.o): Same.
48 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
50 * cp-tree.h (language_function, lang_type_header): Use
52 * name-lookup.h (cp_binding_level): Likewise.
54 2004-01-26 Mark Mitchell <mark@codesourcery.com>
57 * semantics.c (finish_for_expr): Check for unresolved overloaded
60 * class.c (add_method): Just check processing_template_decl to
61 determine whether or not we are within a template.
62 * decl2.c (maybe_retrofit_in_chrg): Likewise.
63 * init.c (decl_constant_value): Check the type of the declaration,
65 * name-lookup.c (maybe_push_to_top_level): Rename to ...
66 (push_to_top_level): ... this.
67 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
68 * pt.c (push_template_decl_real): Reorder condition for speed.
69 (convert_template_argument): Use dependency-checking functions in
70 place of uses_template_parms.
71 (lookup_template_class): Avoid calling uses_template_parms more
73 (uses_template_parms): Reimplement, using dependency-checking
75 (instantiate_class_template): Use push_to_top_level, not
76 maybe_push_to_top_level.
77 (type_unification_real): Simplify.
78 (type_dependent_expression_p): Handle OFFSET_REFs and
80 (any_dependent_template_arguments_p): Handle multiple levels of
82 * semantics.c (expand_or_defer_fn): Do not check
83 uses_template_parms for template instantiations.
84 * typeck.c (comptypes): Avoid calling cp_type_quals.
86 2004-01-25 Mark Mitchell <mark@codesourcery.com>
89 * call.c (build_over_call): Do not convert arguments when
90 processing a template.
91 * pt.c (build_non_dependent_expr): Do not build a
92 NON_DEPENDENT_EXPR for arithmetic constants.
94 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
97 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
98 returns a TYPE_DECL. no further lookup is required.
99 * semantics.c (check_template_template_default_arg): A TYPE_DECL
100 is invalid. Rework to give better diagnostics.
102 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
105 * pt.c (instantiate_class_template): Add an error_mark_node
107 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
109 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
112 * decl.c (finish_function): Move the call to
113 finish_fname_decls below the call to
114 finish_eh_spec_block.
116 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
118 * optimize.c, typeck2.c: Update copyright.
120 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
122 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
123 init.c, mangle.c, typeck.c: Update copyright.
125 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
127 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
129 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
131 * Make-lang.in: Replace $(docdir) with doc.
132 (c++.info, c++.srcinfo): Dummy entry.
133 (c++.man, c++.srcman): New rules.
134 (c++.install-man): Revamp rule.
136 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
138 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
139 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
140 immediate $(shell) instead of deferred backquote.
142 2004-01-19 Mark Mitchell <mark@codesourcery.com>
145 * parser.c (cp_parser_postfix_expression): When encountering
146 incomplete type on left-hand side of "->" or ".", treat the entire
147 expression as erroneous.
150 * call.c (build_field_call): Remove.
151 (n_build_method_call): Likewise.
152 (build_method_call): Likewise.
153 (build_new_method_call): Do not call build_field_call.
154 * class.c (n_build_method_call): Remove.
155 (print_class_statistics): Do not print it.
156 * cp-tree.h (build_method_call): Remove declaration.
157 (finish_object_call_expr): Likewise.
158 (build_new_1): Do not use build_method_call.
159 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
160 when the function appearing on the right-hand-side of "." or "->"
161 is not actually a function.
162 * pt.c (tsubst_copy_and_build): Likewise.
163 * semantics.c (finish_object_call_expr): Remove.
165 2004-01-18 Mark Mitchell <mark@codesourcery.com>
168 * pt.c (tsubst): Use finish_typeof.
170 2004-01-16 Jason Merrill <jason@redhat.com>
173 * except.c (build_throw): In a template, set
174 current_function_returns_abnormally.
176 2004-01-17 Fred Fish <fnf@intrinsity.com>
179 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
180 except don't call array_type_nelts() with a VECTOR_TYPE.
182 2004-01-16 Jan Hubicka <jh@suse.cz>
184 * mangle.c (write_mangled_name): Remove inline modifier.
186 2004-01-16 Mark Mitchell <mark@codesourcery.com>
189 * decl.c (compute_array_index_type): Fix grammar in comment.
190 * init.c (build_zero_init): Handle zero-sized arrays correctly.
193 * call.c (name_as_c_string): Print conversion operator names
197 * call.c (initialize_reference): Pass -1 for inner parameter to
200 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
203 * parser.c (cp_parser_base_specifier): Check for an invalid
204 keyword `typename' and emit an user-friendly error message.
206 2004-01-15 Geoffrey Keating <geoffk@apple.com>
209 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
210 (handle_pragma_implementation): Likewise.
212 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
215 * typeck.c (build_class_member_access_expr): Allow to access members
216 of the currently open class.
217 (finish_class_member_access_expr): Likewise.
219 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
222 * name-lookup.c (validate_nonmember_using_decl): Take scope and
223 name by value, instead of computing them.
224 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
225 arguments. Pass them to validate_nonmember_using_decl.
226 * name-lookup.h (do_local_using_decl): Adjust.
227 (do_toplevel_using_decl): Likewise.
228 * parser.c (cp_parser_using_declaration): Likewise.
229 * pt.c (tsubst_expr): Likewise.
231 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
235 * name-lookup.c (qualified_lookup_using_namespace): Search
236 strongly-associated namespaces first, and only then try other
239 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
241 * Make-lang.in (c++.srcextra): Dummy entry.
243 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
246 * parser.c (cp_parser_template_name): Don't try to parse a
247 conversion-function-id, as it cannot be a template-name.
248 (cp_parser_simple_type_specifier): Check for invalid template-ids
249 even after a built-in type.
251 2004-01-14 Jan Hubicka <jh@suse.cz>
254 * pt.c (instantiate_decl): Do not increase function_depth.
256 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
260 * parser.c (cp_parser_elaborated_type_specifier): Warn about
261 attributes and discard.
262 * decl.c (xref_tag): Don't overwite existing attributes with
265 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
268 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
269 is no destructor while looking up a BIT_NOT_EXPR.
271 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
273 * cxxfilt.c: Remove unused file.
275 2004-01-14 Jan Hubicka <jh@suse.cz>
277 Partial fix to PR c++/12850
278 * decl2.c (mark_used): Do not proactively instantiate templates
279 when compiling in unit-at-a-time or not optimizing.
280 * optimize.c (maybe_clone_body): Do not increase function depth.
282 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
285 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
287 2003-01-12 Steven Bosscher <stevenb@suse.de>
290 * parser.c (cp_parser_member_declaration): Any non-type is also
291 not a class or a function.
293 2004-01-12 Jason Merrill <jason@redhat.com>
296 * class.c (build_base_path): Do not mark vtable references as
298 (build_vtbl_ref_1): Likewise.
300 2004-01-12 Richard Henderson <rth@redhat.com>
303 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
304 (store_init_value): Use it.
305 * decl.c (check_initializer): Expect full initialization code
306 from store_init_value.
307 * init.c (expand_aggr_init_1): Likewise.
308 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
310 2004-01-12 Mark Mitchell <mark@codesourcery.com>
312 * class.c (layout_class_type): For non-POD class types, also copy
313 the DECL_SIZE and DECL_MODE of fields to the base class type.
315 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
318 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
319 calling regenerate_decl_from_template.
321 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
324 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
325 decl-specifier occurring along with a class definition.
327 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
329 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
330 clauses to comments describing declares_class_or_enum.
331 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
334 2004-01-12 Jan Hubicka <jh@suse.cz>
336 * pt.c (for_each_template_parm): Do not check for duplicates.
337 (for_each_template_parm): Use walk_tree duplicate checking code.
339 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
342 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
343 is error_mark_node, don't add any more decl_specs.
344 (cp_parser_init_declarator): After committing to a declaration, if
345 the decl_specifiers start with error_mark_node, issue an error and
346 change the type to "int".
348 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
351 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
353 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
357 * pt.c (tsubst): Substitution must fail if we are attempting to
358 create an array with element type that is an abstract class type.
359 * decl.c (cp_finish_decl): Strip pointers and array types recursively
360 before calling abstract_virtuals_error.
362 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
364 * name-lookup.c (qualified_lookup_using_namespace): Consider
365 strong using directives even if we've already found a binding.
367 2004-01-09 Mark Mitchell <mark@codesourcery.com>
369 * cp-tree.h (cxx_expand_expr): Change prototype.
370 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
372 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
375 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
376 looking into them recursively. They can be there because of the
377 new __offsetof__ extension.
379 2004-01-07 Zack Weinberg <zack@codesourcery.com>
381 * parser.c (cp_parser_save_member_function_body): Mark the
384 2004-01-05 Mark Mitchell <mark@codesourcery.com>
387 * class.c (build_clone): Copy type attributes from the original
388 function to the clone.
391 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
392 references as constant.
395 * parser.c (cp_parser_explicit_instantiation): Improve error
397 (cp_parser_require): Improve indication of the error location.
400 * parser.c (cp_parser_class_head): Reorder logic to check for
401 invalid qualification.
403 2004-01-04 Mark Mitchell <mark@codesourcery.com>
406 * name-lookup.c (lookup_using_namespace): Remove spacesp
408 (unqualified_namespace_lookup): Likewise.
409 (lookup_qualified_name): Adjust accordingly.
410 (lookup_name_real): Likewise.
411 (lookup_arg_dependent): Do not eliminate the namespace of the
412 functions found by unqualified name lookup unless that is the
415 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
417 * semantics.c (push_deferring_access_checks): Fix format.
418 (resume_deferring_access_checks): Likewise.
419 (stop_deferring_access_checks): Likewise.
420 (pop_deferring_access_checks): Likewise.
421 (get_deferred_access_checks): Likewise.
422 (pop_to_parent_deferring_access_checks): Likewise.
423 (perform_deferred_access_checks): Likewise.
424 (perform_or_defer_access_check): Likewise.
426 2004-01-04 Richard Henderson <rth@redhat.com>
428 * call.c (build_over_call): Don't create a save_expr of an
429 aggregate, but rather its address.
431 2004-01-04 Mark Mitchell <mark@codesourcery.com>
434 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
435 an offsetof expression.
437 * parser.c (cp_parser_parameter_declaration): Fix comment.
440 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
441 (reference_binding): Set it when appropriate.
442 (build_temp): New function, split out from ...
443 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
444 (initialize_reference): Likewise.
447 * parser.c (cp_parser): Add in_type_id_in_expr_p.
448 (cp_parser_new): Initialize it.
449 (cp_parser_postfix_expression): Set it.
450 (cp_parser_sizeof_operand): Likewise.
451 (cp_parser_parameteR_declaration): Do not commit early to tenative
452 parsers when in_type_id_in_expr_p is set.
454 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
457 * parser.c (cp_parser_template_argument): Don't call
458 make_unbound_class_template directly.
459 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
460 UNBOUND_CLASS_TEMPLATE tree node.
462 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
465 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
467 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
470 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
471 (DECL_FUNCTION_TEMPLATE_P): Use it.
472 (DECL_CLASS_TEMPLATE_P): Likewise.
473 * parser.c (cp_parser_lookup_name): Add is_template parameter.
474 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
475 (cp_parser_template_name): Likewise.
476 (cp_parser_elaborated_type_specifier): Likewise.
477 (cp_parser_namespace_name): Likewise.
478 (cp_parser_class_name): Likewise.
479 (cp_parser_lookup_name_simple): Likewise.
481 See ChangeLog.3 for earlier changes.