1 2004-06-23 Roger Sayle <roger@eyesopen.com>
3 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
4 longer take both "args" and "convert_args" as arguments.
5 (build_op_delete_call): Update call to build_cxx_call.
6 (build_over_call): Likewise, update call to build_cxx_call.
7 * cp-tree.h (build_cxx_call): Update funtion prototype.
8 * typeck.c (build_function_call): Don't call expand_tree_builtin.
9 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
10 (throw_bad_typeid): Likewise.
11 (build_dynamic_cast_1): Likewise.
13 2004-06-22 Richard Henderson <rth@redhat.com>
15 * class.c (build_vfn_ref): Take a pointer not object. Build
17 (cp_fold_obj_type_ref): New.
18 * call.c (build_over_call): Update build_vfn_ref call.
19 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
20 * cp-tree.h (cp_fold_obj_type_ref): Declare.
22 2004-06-21 Jason Merrill <jason@redhat.com>
25 * cp-gimplify.c (cp_gimplify_init_expr): Look through
28 2004-06-21 Mark Mitchell <mark@codesourcery.com>
30 * cp-tree.def (NEW_EXPR): Add a fourth slot.
31 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
32 (TREE_PARMLIST): Likewise.
33 (CALL_DECLARATOR_PARMS): Likewise.
34 (CALL_DECLARATOR_QUALS): Likewise.
35 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
36 (cp_declarator_kind): New type.
37 (cp_parameter_declarator): Likewise.
38 (cp_declarator): Likewise.
39 (cp_error_declarator): Likewise.
40 (no_parameters): Likewise.
41 (groktypename): Change prototype.
42 (start_decl): Likewise.
43 (start_handler_parms): Likewise.
44 (get_scope_of_declarator): Likewise.
45 (start_function): Likewise.
46 (start_preparsed_function): New function.
47 (start_function): Change prototype.
48 (start_method): Likewise.
49 (grokfield): Likewise.
50 (grokbitfield): Likewise.
51 (build_new): Likewise.
52 (make_pointer_declarator): Remove.
53 (make_reference_declarator): Likewise.
54 (make_call_declarator): Likewise.
55 (set_quals_and_spec): Likewise.
56 (process_template_parm): Change prototype.
57 (begin_function_definition): Remove.
58 (finish_parmlist): Remove.
59 * decl.c (groktypename): Do not use trees to represent
61 (start_decl): Likewise.
62 (start_handler_parms): Remove.
63 (get_scope_of_declarator): Reimplement.
64 (grokdeclarator): Do not use trees to represent declarators.
65 (grokparms): Likewise.
66 (start_function): Likewise.
67 (start_method): Likewise.
68 (build_void_list_mode): Do not use TREE_PARMLIST.
69 * decl.h (grokdeclarator): Change prototype.
70 * decl2.c (grok_method_quals): Robustify.
71 (grok_x_components): Do not use trees to represent declarators.
72 (grokfield): Likewise.
73 (grokbitfield): Likewise.
74 (start_objects): Build FUNCTION_DECLs, not declarators.
75 (start_static_storage_duration_function): Likewise.
76 * init.c (build_new): Simplify.
77 * lex.c (make_pointer_declarator): Remove.
78 (make_reference_declarator): Likewise.
79 (make_call_declarator): Likewise.
80 (set_quals_and_spec): Likewise.
81 * method.c (use_thunk): Use start_preparsed_function.
82 (synthesize_method): Likewise.
83 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
84 * optimize.c (maybe_clone_body): Use start_preparsed_function.
85 * parser.c (cp_error_declarator): New variable.
86 (declarator_obstack): Likewise.
87 (alloc_declarator): New function.
88 (make_declarator): Likewise.
89 (make_id_declarator): Likewise.
90 (make_pointer_declarator): Likewise.
91 (make_reference_declarator): Likewise.
92 (make_ptrmem_declarator): Likewise.
93 (make_call_declarator): Likewise.
94 (make_array_declarator): Likewise.
95 (no_parameters): New variable.
96 (make_parameter_declarator): Likewise.
97 (cp_parser_check_for_definition_in_return_type): Do not use trees
98 to represent declarators.
99 (cp_parser_translation_unit): Likewise.
100 (cp_parser_new_expression): Likewise.
101 (cp_parser_new_type_id): Likewise.
102 (cp_parser_new_declarator_opt): Likewise.
103 (cp_parser_direct_new_declarator): Likewise.
104 (cp_parser_condition): Likewise.
105 (cp_parser_declaration_statement): Likewise.
106 (cp_parser_declaration): Likewise.
107 (cp_parser_conversion_type_id): Likewise.
108 (cp_parser_conversion_declarator_opt): Likewise.
109 (cp_parser_template_parameter_list): Likewise.
110 (cp_parser_template_parameter): Likewise.
111 (cp_parser_explicit_instantiation): Likewise.
112 (cp_parser_init_declarator): Likewise.
113 (cp_parser_declarator): Likewise.
114 (cp_parser_direct_declarator): Likewise.
115 (cp_parser_type_id): Likewise.
116 (cp_parser_parameter_declaration_clause): Likewise.
117 (cp_parser_parameter_declaration_list): Likewise.
118 (cp_parser_parameter_declaration): Likewise.
119 (cp_parser_member_declaration): Likewise.
120 (cp_parser_exception_declaration): Likewise.
121 (cp_parser_check_declarator_template_parameters): Likewise.
122 (cp_parser_function_definition_from_specifiers_and_declarator):
124 (cp_parser_save_member_function_body): Likewise.
125 * pt.c (process_template_parm): Add is_non_type parameter.
126 (convert_template_argument): Adjust call to groktypename.
127 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
128 (tsubst): Do not expect declarators.
129 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
131 (instantiate_decl): Use start_preparsed_function.
132 * semantics.c (begin_function_definition): Remove.
133 (finish_parmlist): Remove.
134 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
137 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
139 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
140 (build_new_method_call): Likewise.
141 * decl.c (local_variable_p_walkfn): Don't walk into types.
142 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
143 (build_anon_union_vars): Add new operand for COMPONENT_REF.
144 * init.c (buld_new): Add new operand for ARRAY_REF.
145 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
146 (do_build_assign_ref): Likewise.
147 * parser.c (cp_parser_direct_new_declarator): Add new operands
149 (cp_parser_direct_declarator): Likewise.
150 * pt.c (tsubst): Likewise.
151 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
153 * semantics.c (finish_non_static_data_member): Add new operand
155 * typeck.c (build_class_member_access_expr): Likewise.
156 (build_class_member_access_expr, finish_class_member_access_expr):
158 (build_ptrmemfunc_access_expr): Likewise.
159 (build_array_ref): Add new operands for ARRAY_REF.
160 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
161 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
163 2004-06-21 Richard Henderson <rth@redhat.com>
165 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
166 * parser.c (cp_parser_jump_statement): Update commentary.
167 * pt.c (tsubst_expr): Use RETURN_EXPR.
168 * semantics.c (finish_return_stmt): Likewise.
169 (finalize_nrv_r): Likewise.
170 * typeck.c, typeck2.c: Update file start commentary.
172 2004-06-21 Richard Henderson <rth@redhat.com>
174 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
176 2004-06-20 Richard Henderson <rth@redhat.com>
178 * cp-tree.h (add_decl_stmt): Declare.
179 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
180 * semantics.c (maybe_cleanup_point_expr): New.
181 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
182 finish_for_expr, finish_switch_cond): Use it.
183 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
185 2004-06-20 Richard Henderson <rth@redhat.com>
187 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
188 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
189 (cp_gimplify_expr): Call it.
190 (gimplify_cleanup_stmt): Move from c-gimplify.c.
191 (cp_genericize): New.
192 * decl.c (finish_function): Call it.
193 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
194 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
195 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
196 (cp_genericize): Declare.
197 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
198 * dump.c (cp_dump_tree): Likewise.
199 * semantics.c (push_cleanup): Move from c-semantics.c.
201 2004-06-20 Zack Weinberg <zack@codesourcery.com>
203 * cp-lang.c (has_c_linkage): Implement.
205 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
206 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
207 (builtin_function_1): Don't call make_decl_rtl.
208 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
209 (grokvardecl): Don't call mangle_decl.
210 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
212 * method.c (set_mangled_name_for_decl): Delete.
213 * name-lookup.c (pushdecl): When a local extern shadows a
214 file-scope declaration of the same object, give both DECLs the
216 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
217 on DECL_ASSEMBLER_NAME.
219 2004-06-19 Richard Henderson <rth@redhat.com>
221 * cp-gimplify.c: Remove unnecessary prototypes.
222 (cp_gimplify_stmt): Merge into ...
223 (cp_gimplify_expr): ... here. Move to end of file. Handle
224 stmts_are_full_exprs_p frobbing.
225 * cp-tree.h (cp_gimplify_stmt): Remove.
226 * pt.c (tsubst_expr): Merge prep_stmt and unify.
227 * tree.c (init_tree): Don't set lang_gimplify_stmt.
229 2004-06-18 Richard Henderson <rth@redhat.com>
232 * semantics.c (begin_cond): New.
233 (finish_cond): Rewrite to handle template DECL_STMTs specially.
234 Assume that non-template decls go land before the conditional.
235 (simplify_loop_decl_cond): Likewise.
236 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
237 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
238 begin_switch_stmt, finish_switch_cond): Update to match.
240 2004-06-17 Jason Merrill <jason@redhat.com>
243 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
244 (finish_stmt_expr_expr): Update type after conversions.
245 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
246 Handle void initializer.
247 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
249 2004-06-17 Geoffrey Keating <geoffk@apple.com>
251 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
252 * cp-tree.h (defer_fn): Delete.
253 * decl2.c (defer_fn): Delete.
254 (finish_file): Simplify deferred_fns loops; check that
255 only used inline functions get into deferred_fns.
256 (mark_used): Inline previous contents of defer_fn.
258 2004-06-16 Richard Henderson <rth@redhat.com>
260 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
261 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
262 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
263 of CTOR_INITIALIZER ...
264 (pp_cxx_statement): ... here.
265 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
266 (finish_function): Use alloc_stmt_list to zap entire function.
267 * parser.c (cp_parser_compound_statement): Update commentary.
268 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
269 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
270 (finish_stmt_expr): Don't look through COMPOUND_STMT.
272 2004-06-16 Geoffrey Keating <geoffk@apple.com>
274 * pt.c (mark_decl_instantiated): Don't call defer_fn.
276 2004-06-16 Richard Henderson <rth@redhat.com>
278 * parser.c (cp_parser_labeled_statement): Update commentary.
279 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
280 * tree.c (mark_local_for_remap_r): Likewise.
282 2004-06-16 Richard Henderson <rth@redhat.com>
284 * parser.c (cp_parser_asm_definition): Update commentary.
285 * pt.c (tsubst_expr): Use ASM_EXPR.
286 * semantics.c (finish_asm_stmt): Likewise.
288 2004-06-16 Richard Henderson <rth@redhat.com>
290 * decl.c (finish_destructor_body): Use LABEL_EXPR.
291 * parser.c (cp_parser_statement): Update commentary.
292 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
293 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
294 * tree.c (mark_local_for_remap_r): Likewise.
296 2004-06-16 Richard Henderson <rth@redhat.com>
299 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
300 statement in FOR_INIT_STMT for templates.
302 2004-06-15 Richard Henderson <rth@redhat.com>
304 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
305 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
306 (genericize_try_block): Use gimplify_stmt.
307 (genericize_catch_block, genericize_eh_spec_block): Likewise.
308 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
309 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
310 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
311 (cp_tree_chain_matters_p): Remove.
312 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
313 (COMPOUND_STMT_BODY_BLOCK): New.
314 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
315 (EXPR_STMT_STMT_EXPR_RESULT): New.
316 (building_stmt_tree): Check cur_stmt_list.
317 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
318 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
319 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
320 (cp_finish_decl): Use push_cleanup.
321 (start_function, finish_function): Use statement lists.
322 (finish_stmt): Do nothing.
323 * except.c (begin_eh_spec_block): Use statement lists.
324 (check_handlers_1, check_handlers): Likewise.
325 * init.c (construct_virtual_base): Don't add extra compound stmts.
326 (build_vec_init): Likewise.
327 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
328 * name-lookup.h (struct cp_binding_level): Add statement_list.
329 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
330 (cp_parser_labeled_statement, cp_parser_expression_statement,
331 cp_parser_statement_seq_opt): Likewise.
332 (cp_parser_compound_statement): Likewise. Take bool for try block.
333 (cp_parser_selection_statement): Tidy if processing.
334 (cp_parser_already_scoped_statement): Rewrite to do what it says.
335 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
336 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
337 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
338 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
339 (finish_cond): New, rewritten from FINISH_COND.
340 (simplify_loop_decl_cond): New.
341 (finish_expr_stmt): Avoid nested EXPR_STMTs.
342 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
343 begin_else_clause, finish_else_clause, finish_if_stmt,
344 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
345 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
346 finish_for_cond, finish_for_stmt, begin_switch_stmt,
347 finish_switch_cond, finish_switch_stmt, begin_try_block,
348 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
349 finish_handler_sequence, finish_function_handler_sequence,
350 begin_handler, finish_handler_parms, finish_handler,
351 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
352 using statement lists.
353 (begin_compound_stmt): Replace has_no_scope argument with flags.
354 Update all callers. Use statement lists.
355 (finish_compound_stmt): Likewise.
356 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
357 (current_scope_stmt_stack): Remove.
358 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
359 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
360 Rewrite with statement lists.
362 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
364 * parser.c: Change all assignments of c_lex_string_translate
365 to true and false to 1 and 0.
366 (cp_lexer_read_token): Convert type of the translated string.
367 (cp_parser_skip_to_closing_parentheses): Preserve original
368 value of c_lex_string_translate, and set it to -1 while
370 (cp_parser_cache_group): Likewise.
371 (cp_parser_cache_group_1): Renamed.
372 (cp_parser_asm_operand_list): Remove redundant setting of
373 c_lex_string_translate.
374 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
375 Handle chained strings.
377 2004-06-12 Andrew Pinski <apinski@apple.com>
381 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
383 * cp-tree.h: Fix typo.
385 * cp-tree.h: Include cgraph.h
386 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
387 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
389 2004-06-12 Jason Merrill <jason@redhat.com>
391 PR tree-optimization/14107
392 * decl.c (finish_function): Warn about no return in all functions.
394 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
396 * cp-tree.h (struct language_function): Remove cannot_inline.
397 * decl.c (save_function_data): cannot_inline is no more.
398 (cxx_push_function_context): Likewise.
399 * decl2.c (start_objects, start_static_storage_duration_function):
400 Reset DECL_INLINE, set DECL_UNINLINABLE.
402 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
405 * search.c (lookup_field): Propagate the ambiguity list.
406 (lookup_fnfields): Likewise.
408 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
411 * parser.c (cp_parser_template_name): Ctors/dtors never need a
412 template keyword to disambiguate.
414 2004-06-14 Mark Mitchell <mark@codesourcery.com>
417 * decl.c (grokdeclarator): Ignore pointer-to-members when
418 computing template depth.
421 * name-lookup.c (pushtag): Do not try to put class declarations in
422 explicit specialization scopes.
424 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
426 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
428 2004-06-11 Mark Mitchell <mark@codesourcery.com>
431 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
432 bindings for undeclared built-ins.
434 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
436 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
437 appear at the correct location.
439 2004-06-10 Jason Merrill <jason@redhat.com>
443 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
444 * init.c (build_offset_ref): Build SCOPE_REF with non-null
445 TREE_TYPE for non-dependent names.
446 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
447 unknown_type_node as its TREE_TYPE.
448 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
449 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
450 (dump_expr) <SCOPE_REF case>: Likewise.
452 2004-06-10 Mark Mitchell <mark@codesourcery.com>
455 * parser.c (cp_parser_direct_declarator): Robustify.
458 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
459 constants in non-dependent contexts.
463 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
466 2004-06-10 Jakub Jelinek <jakub@redhat.com>
469 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
472 2004-06-09 Mark Mitchell <mark@codesourcery.com>
476 2004-06-07 Mark Mitchell <mark@codesourcery.com>
477 * lex.c (handle_pragma_interface): Deprecate.
478 (handle_pragma_implementation): Likewise.
480 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
482 * g++spec.c (lang_specific_driver): Remove check for -lm
483 and -lmath when check it see if it was the math library.
485 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
488 * parser.c (cp_parser_direct_declarator): Reject constructor named
489 as qualified template-id.
491 2004-06-07 Mark Mitchell <mark@codesourcery.com>
494 * lex.c (handle_pragma_interface): Deprecate.
495 (handle_pragma_implementation): Likewise.
497 2004-06-07 Mark Mitchell <mark@codesourcery.com>
500 * parser.c (cp_parser_iteration_statement): Fix typo in error
504 * pt.c (tsubst_default_argument): Do not defer access checks
505 while substituting into the default argument.
508 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
509 constant in a non-dependent context.
512 * except.c (build_throw): Ensure that temp_expr has been
515 2004-06-06 Roger Sayle <roger@eyesopen.com>
517 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
519 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
522 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
523 'typename', and accept 'template'.
525 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
526 Jan Hubicka <jh@suse.cz>
529 * method.c (use_think): Do not mark thunk as referenced.
531 2004-06-03 Matt Austern <austern@apple.com>
534 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
535 is nonzero, and if we see a noninline definition of a key method,
536 make the vtables nonweak.
538 2004-06-02 Matt Austern <austern@apple.com>
540 * cp-tree.h (instantiate_decl): new boolean parameter,
541 undefined_ok. Current behavior is equivalent to its being 0.
542 * decl2.c (mark_used): Add new argument when calling instantiate_decl
543 * pt.c (mark_decl_instantiated): Unconditionally make
544 instantiations explicit unconditionally
545 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
546 since mark_decl_instantiated now does it.
547 (instantiate_class_member): New. Instantiate a member of an
548 explicitly instantiated class template.
549 (do_type_instantiation): Explicitly instantiate members of an
550 explicitly instantiated class template.
551 (instantiate_decl): if undefined_ok is nonzero, and if we're
552 trying to explicitly instantiated a template with no definition,
553 change it to an implicit instantiation.
554 (instantiate_pending_templates): Add new argument to instantiate_decl.
555 * tree.c (cp_cannot_inline_tree_fn): Likewise.
557 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
559 * cp-tree.h: Fix typo.
561 * cp-tree.h: Include cgraph.h
562 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
563 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
565 2004-06-01 Jason Merrill <jason@redhat.com>
568 * call.c (call_builtin_trap): Remove type parm.
569 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
570 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
572 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
575 * init.c (build_offset_ref): Build SCOPE_REF with non-null
576 TREE_TYPE for non-dependent names.
577 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
578 unknown_type_node as its TREE_TYPE.
579 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
580 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
581 (dump_expr) <SCOPE_REF case>: Likewise.
583 2004-06-01 Richard Henderson <rth@redhat.com>
584 Andrew Pinski <pinskia@physics.uc.edu>
586 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
587 * parser.c (struct cp_parser): Remove in_offsetof.
588 (cp_parser_new): Don't set it.
589 (cp_parser_unary_expression): Don't check it.
590 (cp_parser_postfix_open_square_expression): Split out from ...
591 (cp_parser_postfix_expression): ... here.
592 (cp_parser_postfix_dot_deref_expression): Likewise.
593 (cp_parser_builtin_offsetof): New.
594 (cp_parser_primary_expression): Use it.
596 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
599 * parser.c (cp_parser_postfix_expression): Allow subscript
600 operator in offsetof.
602 2004-05-31 Mark Mitchell <mark@codesourcery.com>
605 * friend.c (add_friend): Do not try to perform access checks for
606 functions from dependent classes.
608 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
610 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
611 (pp_cxx_begin_template_argument_list): Turn into a function.
612 (pp_cxx_end_template_argument_list): Likewise.
613 (pp_cxx_separate_with): Define.
614 (pp_cxx_unqualified_id): Tidy.
615 (pp_cxx_primary_expression): Likewise.
616 (pp_cxx_postfix_expression): Likewise.
617 (pp_cxx_expression): Likewise.
618 (pp_cxx_simple_type_specifier): Likewise.
619 (pp_cxx_type_specifier_seq): Likewise.
620 (pp_cxx_parameter_declaration_clause): Likewise.
621 (pp_cxx_exception_specification): Likewise.
622 (pp_cxx_direct_declarator): Likewise.
623 (pp_cxx_type_id): Likewise.
624 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
626 (pp_cxx_left_paren): Likewise.
627 (pp_cxx_right_paren): Likewise.
628 (pp_cxx_left_brace): Likewise.
629 (pp_cxx_right_brace): Likewise.
630 (pp_cxx_left_bracket): Likewise.
631 (pp_cxx_right_bracket): Likewise.
632 (pp_cxx_dot): Likewise.
633 (pp_cxx_identifier): Likewise.
634 (pp_cxx_tree_identifier): Likewise.
635 (pp_cxx_ampersand): New macro.
636 (pp_cxx_star): Likewise.
637 (pp_cxx_arrow): Likewise.
638 (pp_cxx_semicolon): Likewise.
639 (pp_cxx_complement): Likewise.
640 (pp_cxx_begin_template_argument_list): Declaree.
641 (pp_cxx_end_template_argument_list): Likewise.
642 (pp_cxx_colon_colon): likewise.
644 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
646 * parser.c (cp_parser_simple_type_specifier): Explicitly test
649 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
651 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
652 typeck.c: Fix comment formatting.
654 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
656 * cp-lang.c (cp_expand_decl): Remove.
657 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
659 2004-05-30 Andreas Jaeger <aj@suse.de>
661 * lang-specs.h: Add missing initializers for .ii.
663 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
665 * decl.c (cp_make_fname_decl): Free return value from
668 2004-05-28 Mark Mitchell <mark@codesourcery.com>
671 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
673 * init.c (build_new): Likewise.
676 * name-lookup.c (arg_assoc): Robustify.
679 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
680 when determining the scope to use for a pointer to member.
681 (lookup_anon_field): Give it external linkage.
682 * cp-tree.h (lookup_anon_field): Declare it.
683 * expr.c (cplus_expand_constant): Use it.
685 2004-05-28 Mark Mitchell <mark@codesourcery.com>
688 * parser.c (cp_parser_simple_type_specifier): Call
689 maybe_note_name_used_in_class.
691 2004-05-28 Tom Marshall <tmarshall@real.com>
694 * class.c (finish_struct_1): Warn only if the dtor is non-private or
695 the class has friends.
697 2004-05-27 Adam Nemet <anemet@lnxw.com>
700 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
701 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
703 2004-05-24 Geoffrey Keating <geoffk@apple.com>
705 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
706 if it might be needed.
707 * pt.c (mark_decl_instantiated): Only call defer_fn if
708 the function actually needs processing in finish_file.
709 * decl2.c (finish_file): Add check that elements in
710 deferred_fns_used are really needed there. Remove unnecessary
711 test of DECL_SAVED_TREE.
713 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
715 * Make-lang.in: No need to specify $(LIBCPP).
717 2004-05-23 Mark Mitchell <mark@codesourcery.com>
720 * parser.c (cp_parser_class_head): Robustify.
723 * parser.c (cp_parser_decl_specifier_seq): Correct error in
725 (cp_parser_constructor_declarator_p): Treat attributes
729 * typeck.c (build_unary_op): Do not attempt to resolve casts to
730 base classes in templates.
732 2004-05-23 Mark Mitchell <mark@codesourcery.com>
735 * pt.c (instantiate_template): Robustify.
737 2004-05-23 Mark Mitchell <mark@codesourcery.com>
740 * decl.c (xref_tag): Issue errors about redeclaring template
741 classes as non-template classes.
743 2004-05-23 Mark Mitchell <mark@codesourcery.com>
746 * name-lookup.c (supplement_binding): Allow redefinitions of
750 * parser.c (cp_parser_template_argument): Robustify.
752 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
754 * class.c (alter_access): Use %E format specifier to print an
755 identifier node. Avoid looking at the IDENTIFIER_POINTER.
756 (push_lang_context): Likewise.
757 * decl.c (lookup_label): Likewise.
758 (grokdeclarator): Likewise.
759 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
760 * pt.c (do_type_instantiation): Likewise.
761 * tree.c (handle_java_interface_attribute): Likewise.
762 (handle_com_interface_attribute): Likewise.
763 (handle_init_priority_attribute): Likewise.
765 2004-05-22 Mark Mitchell <mark@codesourcery.com>
769 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
770 recognized as overloaded functions.
772 2004-05-22 Mark Mitchell <mark@codesourcery.com>
775 * class.c (layout_nonempty_base_or_field): Do not try to avoid
776 layout conflicts for unions.
779 * typeck.c (build_x_unary_op): Instantiate template class
780 specializations before looking for "operator &".
783 * typeck.c (complete_type): Layout non-dependent array types, even
787 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
790 2004-05-22 Roger Sayle <roger@eyesopen.com>
792 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
793 returning when TREE_TYPE is error_mark_node.
794 * typeck.c (require_complete_type): Return error_mark_node if
795 value's type is an error_mark_node.
797 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
799 * optimize.c (calls_setjmp_r): Remove.
800 (calls_setjmp_p): Remove.
801 * cp-tree.c (calls_setjmp_p): Remove.
802 * decl.c (finish_function): Do not call calls_setjmp_p.
804 2004-05-18 Zack Weinberg <zack@codesourcery.com>
806 * decl.c (cp_finish_decl): Use mark_decl_referenced.
807 * decl2.c (maybe_make_one_only): Likewise.
808 * method.c (use_thunk): Likewise.
810 2004-05-18 Jason Merrill <jason@redhat.com>
812 * class.c (build_base_path): Tidy a bit.
814 2004-05-14 Geoffrey Keating <geoffk@apple.com>
816 * name-lookup.c (struct scope_binding): New.
817 (EMPTY_SCOPE_BINDING): New.
818 (lookup_using_namespace): Take a scope_binding instead of a
820 (qualified_lookup_using_namespace): Likewise.
821 (cxx_binding_clear): Delete.
822 (do_nonmember_using_decl): Use a scope_binding instead of a
824 (lookup_tag): Don't call select_decl.
825 (ambiguous_decl): Don't return anything (and change callers to match).
826 Take a scope_binding as the second parameter.
827 (lookup_namespace_name): Use a scope_binding instead of a
829 (unqualified_namespace_lookup): Likewise.
830 (lookup_qualified_name): Likewise.
831 (select_decl): Take a scope_binding instead of a cxx_binding.
832 Use macros rather than hand-coding tests for type-ness.
834 2004-05-13 Diego Novillo <dnovillo@redhat.com>
836 * cp-gimplify.c: Rename from cp-simplify.c.
837 * Make-lang.in, optimize.c: Update.
839 2004-05-13 Diego Novillo <dnovillo@redhat.com>
841 Merge from tree-ssa-20020619-branch. See
842 ChangeLog.tree-ssa for details.
844 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
845 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
846 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
847 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
849 * cp-mudflap.c: New file.
850 * cp-simplify.c:: New file.
852 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
855 * decl2.c (check_classfn): For member templates, compare also the
856 template parameters to match the declaration.
857 * cp-tree.h: Adjust declaration of check_classfn.
858 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
859 * friend.c (do_friend): Likewise.
860 * pt.c (tsubst_friend_function): Likewise.
862 2004-05-01 Zack Weinberg <zack@codesourcery.com>
864 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
865 Instead, dig into the representation type to find the array bound.
867 2004-04-30 Jason Merrill <jason@redhat.com>
869 Refer to base members using COMPONENT_REFs where possible.
870 * class.c (build_simple_base_path): New fn.
871 (build_base_path): Use it for non-virtual base references.
872 (layout_class_type): Change base fields to their real type
873 after layout is done.
874 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
875 * cp-lang.c (cxx_get_alias_set): Use it.
877 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
879 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
882 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
885 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
886 used in integral constant expressions.
888 2004-04-22 Mark Mitchell <mark@codesourcery.com>
890 * init.c (build_aggr_init): Fix accidental use of C99 construct in
893 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
895 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
896 * decl.c (reshape_init): Use it.
897 * init.c (perform_member_init): Remove redundant condition.
898 (build_aggr_init): Adjust to handle brace-enclosed initializers
900 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
902 * parser.c (cp_parser_initializer_clause): Do not set
903 TREE_HAS_CONSTRUCTOR on the initializer.
904 * rtti.c (tinfo_base_init): Likewise.
905 (generic_initializer): Likewise.
906 (ptr_initializer): Likewise.
907 (ptm_initializer): Likewise.
908 (class_initializer): Likewise.
909 (get_pseudo_ti_init): Likewise.
910 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
912 2004-04-22 Alan Modra <amodra@bigpond.net.au>
914 * name-lookup.c (anonymous_namespace_name): Make static.
916 2004-04-19 Roger Sayle <roger@eyesopen.com>
919 * class.c (build_base_path): Call fold whilst building the NULL
920 pointer check expression trees.
922 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
924 * init.c (build_new_1): Don't use type size argument for Java
925 _Jv_AllocObject call.
927 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
929 * method.c (make_alias_for_thunk): Remove preprocessor guard on
930 declaration and definition.
932 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
935 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
938 2004-04-08 Jakub Jelinek <jakub@redhat.com>
940 * decl2.c (mark_used): Don't segfault if cfun != NULL but
941 current_function_decl == NULL.
943 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
946 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
949 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
951 * init.c (decl_constant_value): Don't look at DECL_INITIAL
953 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
954 or TREE_SIDE_EFFECTS of a type.
956 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
959 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
960 cv-qualifier unification.
961 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
963 2004-04-02 Jan Hubicka <jh@suse.cz>
965 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
966 * cp-tree.h (cp_update_decl_after_saving): Declare.
967 * tree.c (cp_update_decl_after_saving): Define.
969 2004-04-01 Mark Mitchell <mark@codesourcery.com>
972 * typeck.c (get_delta_difference): Call fold before returning the
975 2004-04-01 Richard Henderson <rth@redhat.com>
978 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
979 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
981 2004-04-01 Mark Mitchell <mark@codesourcery.com>
984 * name-lookup.c (maybe_push_cleanup_level): Robustify.
986 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
988 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
990 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
992 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
993 * class.c (check_bitfield_decl): Likewise.
994 * cvt.c (type_promotes_to): Likewise.
995 * decl.c (finish_enum): Likewise.
996 * mangle.c (write_builtin_type): Likewise.
997 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
998 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
999 (build_binary_op): Likewise.
1001 2004-03-31 Jan Hubicka <jh@suse.cz>
1003 * tree.h (optimize_function): Kill prototype.
1004 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
1005 * semantics.c (expand_body): Kill.
1007 2004-03-30 Mark Mitchell <mark@codesourcery.com>
1010 * decl.c (start_decl_1): Do not decide whether or not to create a
1011 new cleanup level until after the type has been completed.
1014 * pt.c (tsubst_default_argument): Clear current_function_decl.
1016 2004-03-30 Zack Weinberg <zack@codesourcery.com>
1018 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
1020 2004-03-29 Zack Weinberg <zack@codesourcery.com>
1022 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
1023 is null, just print the literal name and return.
1025 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
1027 * cxx-pretty-print.c: Fix comment typos.
1029 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
1031 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
1034 2004-03-23 Ziemowit Laski <zlaski@apple.com>
1036 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
1037 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
1040 2004-03-23 Zack Weinberg <zack@codesourcery.com>
1042 PR 12267, 12391, 12560, 13129, 14114, 14133
1043 * cp-lang.c (c_reset_state): Delete.
1044 (push_file_scope, pop_file_scope): New stubs.
1045 * parser.c (c_parse_file): Call sorry() here if called more than once.
1047 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1049 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
1052 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1054 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
1056 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1058 * error.c (enum pad): Remove.
1059 (dump_qualifiers): Likewise.
1060 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
1061 (dump_aggr_type): Likewise.
1062 (dump_type_suffix): Likewise.
1063 (dump_simple_decl): Likewise.
1064 (dump_function_decl): Likewise.
1065 (cv_to_string): Likewise.
1066 (dump_type_prefix): Likewise. Adjust return void.
1067 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
1069 (pp_cxx_template_keyword_if_needed): Document.
1070 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
1071 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
1072 MUST_NOT_THROW_EXPR.
1074 2004-03-21 Mark Mitchell <mark@codesourcery.com>
1077 * decl.c (cp_finish_decl): Compute the size of arrays declared in
1078 templates, if their type is non-dependent.
1080 2004-03-19 Mark Mitchell <mark@codesourcery.com>
1082 * call.c (build_op_delete_call): Do not forget the placement
1083 arguments when iterating through mutiple delete operators.
1085 * cp-tree.h (svaed_scope): Remove last_parms.
1086 (NEW_DELETE_OPNAME_P): New macro.
1087 (last_function_parms): Remove.
1088 (do_friend): Adjust prototype.
1089 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
1090 using last_function_parms.
1091 (grokfndecl): Take the PARM_DECLs as an argument, rather than
1092 using last_function_parms.
1093 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
1094 for class-specific operator new and operator delete.
1095 (grok_op_properties): Do not look for allocation functions with
1097 (start_function): Use DECL_ARGUMENTS instead of
1098 last_function_parms.
1099 * decl.h (last_function_parms): Do not declare.
1100 * decl2.c (grokclassfn): Do not use last_function_parms.
1101 * friend.c (do_friend): Remove parmdecls parameter.
1102 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
1103 (pop_from_top_level): Do not restore it.
1104 * pt.c (check_explicit_specialization): Do not adjust
1105 last_function_parms.
1107 * name-lookup.c (do_local_using_decl): Create a local binding for
1108 types brought in via using declarations.
1110 * name-lookup.c (lookup_arg_dependent): Handle block-scope
1111 function declarations correctly.
1113 * semantics.c (finish_id_expression): Correct handling of
1114 conversion operators to dependent types.
1116 * typeck.c (lookup_destructor): Allow the use of destructors from
1119 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1121 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
1122 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
1123 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
1124 the field is named TEMPLATE_TYPE_PARM_INDEX.
1126 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1129 * parser.c (cp_parser_functional_cast): A cast to anything
1130 but integral or enumaration type is not an integral constant
1132 * pt.c (value_dependent_expression_p): Handle cast expressions
1133 without operands (such as "int()").
1135 2004-03-18 Mark Mitchell <mark@codesourcery.com>
1137 * semantics.c (finish_pseudo_destructor_expr): Allow differing
1138 cv-qualification between the type named by the
1139 pseudo-destructor-name and the object-type.
1141 * search.c (accessible_base_p): Handle non-proper bases.
1143 * name-lookup.c (do_nonmember_using_decl): If a using declaration
1144 refers to a single overloaded function, set the type of the
1146 * tree.c (lvalue_type): Simplify.
1147 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
1149 (build_unary_op): Handle OVERLOADs with known types.
1151 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
1154 * parser.c (cp_parser_postfix_expression): Handle the use of
1155 "typename" in non-dependent contexts. Convert appropriately when
1156 when using a qualified name after "->" or ".".
1158 * call.c (conditional_conversion): Honor the requirement that some
1159 conversions refer to the original object.
1161 2004-03-18 Mark Mitchell <mark@codesourcery.com>
1163 * call.c (build_conditional_expr): Do not call force_rvalue for
1164 operands of void_type when the conditional expression itself has
1166 * name-lookup.c (pushdecl): Don't consider a declaration of a
1167 function named "main" to be an overload of a type named "main".
1168 * parser.c (cp_parser_template_name): Perform name lookup when the
1169 template name is proceeded by "template" if the qualifying scope
1171 * typeck.c (composite_pointer_type_r): Correctly handle
1172 pointer-to-member types.
1173 (build_const_cast): Likewise.
1175 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1177 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
1178 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
1179 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
1180 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
1181 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
1182 (TYPEOF_TYPE_EXPR): New macro.
1183 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
1184 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
1185 * pt.c (tsubst): Likewise.
1186 * semantics.c (finish_typeof): Likewise.
1187 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
1188 and TEMPLATE_TYPE_PARM.
1189 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
1190 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
1192 2004-03-16 Mark Mitchell <mark@codesourcery.com>
1195 * cp-tree.h (build_new_op): Change prototype.
1196 (build_x_binary_op): Likewise.
1197 * call.c (build_new_op): Add overloaded_p parameter.
1198 * decl2.c (grok_array_decl): Adjust call to build_new_op.
1199 * parser.c (cp_parser_binary_expression): Note that uses of
1200 overloaded operators prevents an expression from being considered
1201 an integral constant.
1202 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
1204 * semantics.c (finish_call_expr): Likewise.
1205 * typeck.c (rationalize_conditional_expr): Likewise.
1206 (build_x_indirect_ref): Likewise.
1207 (build_x_binary_op): Likewise.
1208 (build_x_unary_op): Likewise.
1209 (build_x_compound_expr): Likewise.
1210 (build_modify_expr): Likewise.
1211 * typeck2.c (build_x_arrow): Likewise.
1213 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
1215 * cp-lang.c, ptree.c: Update copyright.
1217 2004-03-13 Mark Mitchell <mark@codesourcery.com>
1220 * parser.c (cp_parser_non_integral_constant_expression): Encode
1221 more of the idiom that surrounded calls to this function within
1223 (cp_parser_primary_expression): Adjust accordingly.
1224 (cp_parser_postfix_expression): Likewise.
1225 (cp_parser_unary_expression): Likewise.
1226 (cp_parser_cast_expression): Likewise.
1227 (cp_parser_assignment_expression): Likewise.
1228 (cp_parser_expression): Likewise.
1229 (cp_parser_new_expression): Note that new-expressions are not
1230 allowed in integral constant expressions.
1231 (cp_parser_delete_expression): Likewise.
1233 2004-03-12 Matt Austern <austern@apple.com>
1235 * decl2.c (maybe_make_one_only): Look at
1236 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
1237 to make an explicit instantiation weak.
1238 * method.c (use_thunk): Make sure we call comdat_linkage
1240 * pt.c (do_type_instantiation): On systems where weak symbols
1241 don't go in a static archive's TOC, explicit instantiation of a
1242 class must imply *explicit* instantiation of its memeber.
1244 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
1246 * call.c, cp-tree.h, pt.c: Fix comment typos.
1248 2004-03-10 Mark Mitchell <mark@codesourcery.com>
1251 * decl.c (xref_tag): Disregard non-type declarations when
1252 looking up a tagged type.
1254 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
1257 * call.c (convert_like_real): Build a const qualified temporary,
1258 when testing ctor access.
1260 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1262 * call.c (initialize_reference): Fix typo.
1264 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1267 * pt.c (determine_specialization): For member templates, match also
1271 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
1273 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
1275 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1278 * call.c (initialize_reference): Handle initializers that are
1279 class-member access expressions applies to rvalues.
1281 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1284 * name-lookup.c (supplement_binding): Ignore functions that are
1285 marked DECL_ANTICIPATED.
1287 2004-03-08 Mark Mitchell <mark@codesourcery.com>
1290 * class.c (check_field_decls): Complain about non-static data
1291 members of reference type in unions. Propagate
1292 CLASSTYPE_REF_FIELDS_NEED_INIT and
1293 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
1295 * init.c (perform_member_init): Complain about mbmers with const
1296 type that are not explicitly initialized.
1298 2004-03-08 Mark Mitchell <mark@codesourcery.com>
1300 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
1301 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
1302 (lang_identifier): Remove implicit_decl and error_locus.
1303 (IDENTIFIER_IMPLICIT_DECL): Remove.
1304 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
1305 (IDENTIFIER_ERROR_LOCUS): Likewise.
1306 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
1307 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
1308 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
1309 (implicitly_declare): Remove.
1310 * decl.c (warn_extern_redeclared_static): Remove check of
1311 IDENTIFIER_IMPLICIT_DECL.
1312 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
1313 (implicitly_declare): Remove.
1314 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
1315 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
1316 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
1317 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
1318 in the innermost scope, rather than at namespace scope.
1319 * name-lookup.c (push_local_binding): Give it external linkage.
1320 (pushdecl): Remove dead code.
1321 * name-lookup.h (push_local_binding): Declare it.
1322 * ptree.c (cxx_print_identifier): Don't print
1323 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
1324 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
1325 not IDENTIFIER_ERROR_LOCUS.
1326 * typeck.c (build_function_call): Remove dead code.
1328 2004-03-08 Jason Merrill <jason@redhat.com>
1331 * decl.c (xref_tag): Remove attribute handling.
1332 * cp-tree.h: Adjust prototype.
1333 * decl.c, parser.c, rtti.c: Adjust callers.
1334 * parser.c (cp_parser_class_head): Pass back attributes in the
1336 (cp_parser_class_specifier): Adjust.
1338 2004-03-08 Matt Austern <austern@apple.com>
1341 * name-lookup.c (add_decl_to_level): Add extern variables, as well
1342 as static, to static_decls array.
1344 2004-03-05 Jason Merrill <jason@redhat.com>
1346 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
1348 2004-03-04 Geoffrey Keating <geoffk@apple.com>
1350 * decl.c (grokfndecl): Update old incorrect comment.
1351 (grokvardecl): Diagnose C++ variables of type with no linkage.
1353 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1356 * pt.c (build_non_dependent_expr): Do not create a
1357 NON_DEPENDENT_EXPR for a THROW_EXPR.
1359 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
1362 * error.c (dump_expr): Handle THROW_EXPR.
1364 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1367 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
1368 lookup if ordinary name-lookup finds a non-function.
1369 * pt.c (tsubst_copy_and_build): Likewise.
1372 * parser.c (cp_parser_late_parsing_default_args): Check that there
1373 are no extra tokens after the end of the default-argument
1376 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1379 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
1380 having C++ linkage for name-mangling purposes.
1383 * parser.c (cp_parser_direct_declarator): Recognize constructor
1384 declarators that use a template-id to name the class being
1388 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
1389 (tsubst_expr): Do not call tsubst_copy, even when
1390 processing_template_decl.
1392 2004-03-01 Jeff Law <law@redhat.com>
1394 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
1397 2004-02-29 Mark Mitchell <mark@codesourcery.com>
1400 * name-lookup.h (push_scope): Change prototype.
1401 * name-lookup.c (push_scope): Do not reenter the current class
1403 * decl.c (grokfndecl): Check return code from push_scope before
1405 * decl2.c (check_classfn): Likewise.
1406 * parser.c (cp_parser_conversion_function_id): Likewise.
1407 (cp_parser_init_declarator): Likewise.
1408 (cp_parser_direct_declarator): Likewise.
1409 (cp_parser_class_specifier): Likewise.
1410 (cp_parser_class_head): Likewise.
1411 (cp_parser_lookup_name): Likewise.
1412 (cp_parser_constructor_declarator_p): Likewise.
1413 * pt.c (instantiate_class_template): Likewise.
1414 (resolve_typename_type): Likewise.
1416 2004-02-29 Mark Mitchell <mark@codesourcery.com>
1419 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
1423 * class.c (update_vtable_entry_for_fn): Do not go through
1424 covariance machinery if the type returned by an overrider is the
1425 same as the original.
1427 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
1429 * call.c: Fix a comment typo.
1431 2004-02-27 Ziemowit Laski <zlaski@apple.com>
1433 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
1435 2004-02-26 Mark Mitchell <mark@codesourcery.com>
1438 * parser.c (cp_parser_parameter_declaration_list): Commit
1439 to fewer tentative parses.
1441 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1444 * pt.c (dependent_type_p_r): A template template parameter is a
1447 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1450 * mangle.c (write_template_arg_literal): Don't rely on identity for
1453 2004-02-24 Jason Merrill <jason@redhat.com>
1455 * tree.c (build_exception_variant): Use check_qualified_type.
1457 2004-02-23 Zack Weinberg <zack@codesourcery.com>
1458 Kazu Hirata <kazu@cs.umass.edu>
1460 * decl.c (cxx_init_decl_processing): Don't check
1461 flag_writable_strings.
1463 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
1466 * typeck.c (maybe_warn_about_returning_address_of_location):
1467 Change check for VAR_DECL to use DECL_P instead.
1469 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1472 * cvt.c (build_expr_type_conversion): Type must be complete before
1473 looking up for conversions.
1475 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1478 * name-lookup.c (arg_assoc_class): Don't look into template
1479 arguments if it is not a primary template.
1481 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1484 * method.c (use_thunk): Always clone function argument tree.
1486 2004-02-20 Mark Mitchell <mark@codesourcery.com>
1489 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
1492 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
1493 for all type variants.
1495 2004-02-19 Mark Mitchell <mark@codesourcery.com>
1498 * decl.c (duplicate_decls): Return error_mark_node for invalid
1500 * name-lookup.c (push_namespace): Ignore the return value from
1502 * pt.c (push_template_decl_real): Robustify.
1505 * name-lookup.c (push_class_level_binding): Do not complain about
1506 adding a binding for a member whose name is the same as the
1507 enclosing class if the member is located in a base class of the
1510 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1513 * parser.c (cp_parser_new_expression): Parse an ill-formed
1514 direct-new-declarator after a parenthesized type-id to emit good
1517 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
1519 * cp-tree.def, cvt.c: Update copyright.
1521 2004-02-17 Mark Mitchell <mark@codesourcery.com>
1524 * cp-tree.h (abi_version_at_least): Remove.
1525 * mangle.c: Include flags.h.
1527 2004-02-15 Mark Mitchell <mark@codesourcery.com>
1530 * call.c (build_conditional_expr): Handle conversions between
1531 class types which result in differently cv-qualified type
1535 * class.c (delete_duplicate_fields_1): Remove.
1536 (delete_duplicate_fields): Likewise.
1537 (finish_struct_anon): Remove check for members with the same name
1538 as their enclosing class.
1539 (check_field_decls): Do not call duplicate_fields.
1540 * decl.c (grokdeclarator): Remove check for static data members
1541 with the same name as their enclosing class.
1542 * name-lookup.c (push_class_level_binding): Check for members with
1543 the same name as their enclosing class.
1545 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
1548 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
1550 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1553 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
1554 has full set of arguments.
1556 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1559 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
1561 2004-02-13 Mark Mitchell <mark@codesourcery.com>
1564 * cp-tree.h (delete_sanity): Change prototype.
1565 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
1566 Remove dead code. Adjust code to warn about deleting an array.
1567 * typekc.c (decay_conversion): Use build_address and build_nop.
1570 * search.c (accessible_p): Do not check access in thunks.
1573 * call.c (build_conditional_expr): Call force_rvalue on the
1574 non-void operand in the case that one result is a throw-expression
1575 and the other is not.
1577 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
1580 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
1581 the type name and look ahead for ::~, and bail out early with a
1582 better error message if the parse is going to fail.
1584 2004-02-12 Mark Mitchell <mark@codesourcery.com>
1586 * call.c (conversion_kind): New type.
1587 (conversion_rank): Likewise.
1588 (conversion): Likewise.
1589 (CONVERSION_RANK): New macro.
1590 (conversion_obstack): New variable.
1591 (obstack_initialized): Likewise.
1592 (z_candidate): Change type of convs and second_conv.
1593 (candidate_warning): New type.
1594 (IDENTITY_RANK): Remove.
1595 (EXACT_RANK): Likewise.
1596 (PROMO_RANK): Likewise.
1597 (STD_RANK): Likewise.
1598 (PBOOL_RANK): Likewise.
1599 (USER_RANK): Likewise.
1600 (ELLIPSIS_RANK): Likewise.
1601 (BAD_RANK): Likewise.
1602 (ICS_RANK): Likewise.
1603 (ICS_STD_RANK): Likewise.
1604 (ICS_USER_FLAG): Likewise.
1605 (ICS_ELLIPSIS_FLAG): Likewise.
1606 (ICS_THIS_FLAG): Likewise.
1607 (ICS_BAD_FLAG): Likewise.
1608 (NEED_TEMPORARY_P): Likewise.
1609 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
1610 (USER_CONV_CAND): Likewise.
1611 (USER_CONV_FN): Likewise.
1612 (conversion_obstack_alloc): New function.
1613 (alloc_conversion): Likewise.
1614 (validate_conversion_obstack): Likewise.
1615 (alloc_conversions): Likewise.
1616 (build_conv): Adjust to deal with new conversion data structures.
1617 (build_identity_conv): New function.
1618 (build_ambiguous_conv): Likewise.
1619 (standard_conversion): Adjust to deal with new conversion data
1621 (convert_class_to_reference): Likewise.
1622 (direct_reference_binding): Likewise.
1623 (reference_binding): Likewise.
1624 (implicit_conversion): Likewise.
1625 (add_candidate): Likewise.
1626 (add_function_candidate): Likewise.
1627 (add_conv_candidate): Likewise.
1628 (build_builtin_candidate): Likewise.
1629 (print_z_candidate): Likewise.
1630 (merge_conversion_sequences): Likewise.
1631 (build_user_type_conversion_1): Likewise.
1632 (build_user_type_conversion): Likewise.
1633 (build_new_function_call): Likewise.
1634 (build_object_call): Likewise.
1635 (conditional_conversion): Likewise.
1636 (build_conditional_expr): Likewise.
1637 (build_new_op): Likewise.
1638 (build_op_delete_call): Likewise.
1639 (convert_like_real): Likewise.
1640 (build_over_call): Likewise.
1641 (build_new_method_call): Likewise.
1642 (is_subseq): Likewise.
1643 (maybe_handle_implicit_object): Likewise.
1644 (maybe_handle_ref_bind): Likewise.
1645 (compare_ics): Likewise.
1646 (source_type): Likewise.
1647 (add_warning): Likewise.
1649 (can_convert_arg): Likewise.
1650 (can_convert_arg_bad): Likewise.
1651 (perform_implicit_conversion): Likewise.
1652 (perform_direct_initialization_if_possible): Likewise.
1653 (initialize_reference): Likewise.
1654 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
1655 * cp-tree.def (WRAPPER): Likewise.
1656 (IDENTITY_CONV): Remove.
1657 (LVALUE_CONV): Likewise.
1658 (QUAL_CONV): Likewise.
1659 (STD_CONV): Likewise.
1660 (PTR_CONV): Likewise.
1661 (PMEM_CONV): Likewise.
1662 (BASE_CONV): Likewise.
1663 (REF_BIND): Likewise.
1664 (USER_CONV): Likewise.
1665 (AMBIG_CONV): Likewise.
1666 (RVALUE_CONV): Likewise.
1667 * cp-tree.h (tree_wrapper): Remove.
1668 (WRAPPER_ZC): Remove.
1669 (lang_tree_node): Remove wrapper.
1670 (LOOKUP_SPECULATIVELY): Remove.
1671 (build_op_delete_call): Adjust prototype.
1672 (validate_conversion_obstack): Declare.
1673 (build_zc_wrapper): Remove.
1674 * cvt.c (convert_to_reference): Remove dead code.
1675 (ocp_convert): Likewise.
1676 * decl.c (redeclaration_error_message): Correct handling of
1678 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
1679 (cp_tree_node_structure): Remove WRAPPER case.
1680 * decl2.c (finish_file): Call validate_conversion_obstack.
1681 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
1682 (build_op_delete_call): Likewise.
1683 (build_x_delete): Likewise.
1684 (build_delete): Adjust call to build_op_delete_call.
1685 * pt.c (tsubst_friend_declaration): Adjust code to determine
1686 whether or not a friend template is a definition.
1687 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
1688 * tree.c (build_zc_wrapper): Remove.
1690 2004-02-12 Zack Weinberg <zack@codesourcery.com>
1692 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
1693 * cp-tree.h: Don't declare cxx_builtin_type_decls.
1694 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
1695 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
1697 2004-02-10 Mark Mitchell <mark@codesourcery.com>
1699 * typeck.c (lookup_destructor): Fix typo in error message.
1701 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
1703 * call.c, parser.c, tree.c: Fix comment typos.
1705 2004-02-07 Zack Weinberg <zack@codesourcery.com>
1708 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
1709 * decl.c (duplicate_decls, start_function): Likewise.
1711 2004-02-07 Zack Weinberg <zack@codesourcery.com>
1713 * name-lookup.c (pushdecl): Issue shadow warnings directly.
1714 * parser.c (free_parser_stacks): Delete.
1716 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
1718 * rtti.c: Update copyright.
1720 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1723 * decl.c (require_complete_types_for_parms): Do not insert
1724 error_mark_node in the parameter list.
1726 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1729 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
1730 error when terminator can not be found.
1732 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
1734 Make-lang.in (po-generated): Delete.
1736 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
1738 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
1739 targetm.calls.promote_prototypes.
1741 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1745 2004-01-15 Geoffrey Keating <geoffk@apple.com>
1747 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
1748 (handle_pragma_implementation): Likewise.
1750 2004-02-05 Mark Mitchell <mark@codesourcery.com>
1753 * typeck.c (lookup_destructor): Tweak error message.
1755 2004-02-05 Jan Hubicka <jh@suse.cz>
1757 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
1760 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1763 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
1764 code, only emits the diagnostic now. Added lookup of the identifier
1765 and support for qualified ids.
1766 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
1767 Parse an (invalid) type name as id-expression within a declarator.
1768 (cp_parser_simple_declaration): Use it.
1769 (cp_parser_member_declaration): Likewise.
1770 (cp_parser_make_typename_type): New function. Handle errors through
1771 cp_parser_diagnose_invalid_typename.
1772 (cp_parser_elaborated_type_specifier): Use it.
1774 2004-02-04 Mark Mitchell <mark@codesourcery.com>
1777 * call.c (convert_like_real): Use "converting" rather than
1778 "argument" as the descriptive keyword to
1779 dubious_conversion_warnings.
1780 * typeck.c (convert_for_assignment): Do not call
1781 dubious_conversion_warnings.
1783 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1786 * init.c (build_delete): Emit a more informative error message in
1787 case of an incomplete type, and on the correct source line.
1789 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
1791 * error.c, search.c: Update copyright.
1793 2004-02-04 Mark Mitchell <mark@codesourcery.com>
1796 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
1797 linkage for the typeinfo name string.
1799 2004-02-04 Mark Mitchell <mark@codesourcery.com>
1802 * cp-tree.h (fold_non_dependent_expr): New function.
1803 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
1804 (cp_parser_template_argument): Use fold_non_dependent_expr.
1805 (cp_parser_direct_declarator): Likewise.
1806 * pt.c (fold_non_dependent_expr): New function.
1807 (convert_nontype_argument): Use it.
1808 (tsubst_qualified_id): Simplify.
1809 (tsubst_copy_and_build): Likewise.
1811 2004-02-04 Mark Mitchell <mark@codesourcery.com>
1813 * decl.c (cxx_push_function_context): Do not set
1814 current_function_is_thunk.
1815 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
1818 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1821 * pt.c (more_specialized_class): Increase processing_template_decl
1822 while partial ordering.
1824 2004-02-03 Mark Mitchell <mark@codesourcery.com>
1827 * decl.c (start_function): Do not call pushdecl for any
1828 instantiation or specialization of a primary template.
1830 2004-02-03 Mark Mitchell <mark@codesourcery.com>
1833 * parser.c (cp_parser_class_name): Robustify.
1836 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
1839 * semantics.c (finish_id_expression): Do not return an
1840 IDENTIFIER_NODE when lookup finds a PARM_DECL.
1842 2004-02-03 Mark Mitchell <mark@codesourcery.com>
1845 * pt.c (build_non_dependent_expr): Do not build
1846 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
1849 * semantics.c (finish_id_expression): Do not return an
1850 IDENTIFIER_NODE when lookup finds a VAR_DECL.
1853 * parser.c (cp_parser_simple_declaration): When skipping to the
1854 end of the statement swallow the terminating semicolon.
1856 2004-02-02 Mark Mitchell <mark@codesourcery.com>
1859 * init.c (build_offset_ref): Improve error recovery for invalid
1860 uses of non-static member functions.
1863 * cp-tree.h (cp_build_type_attribute_variant): New function.
1864 * class.c (build_clone): Use cp_build_type_attribute_variant.
1865 * decl.c (duplicate_decls): Likewise.
1866 * pt.c (copy_default_args_to_explicit_spec): Likewise.
1867 (tsubst_function_type): Likewise.
1868 * tree.c (build_exception_variant): Check attributes before
1869 concluding that two types are the same.
1870 (cp_build_type-attribute_variant): New method.
1871 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
1874 * call.c (convert_class_to_reference): Keep better track of
1875 pedantically invalid user-defined conversions.
1877 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1880 * pt.c (tsubst_qualified_id): Improved error message when a type
1881 is expected but not found.
1883 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
1885 * class.c: Fix comment typos.
1887 * error.c: Likewise.
1888 * parser.c: Likewise.
1890 * search.c: Likewise.
1891 * typeck.c: Likewise.
1893 2004-01-30 Richard Henderson <rth@redhat.com>
1896 * method.c (use_thunk): Don't force_target_expr for void thunks.
1897 * tree.c (build_target_expr_with_type): Assert non-void type.
1898 (force_target_expr): Likewise.
1900 2004-01-30 Michael Matz <matz@suse.de>
1902 * parser.c (cp_parser_labeled_statement): Accept case ranges.
1904 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1908 * decl.c (grokdeclarator): Check immediatly type completeness for
1909 non-dependent types.
1911 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1914 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
1915 a sizeof expression.block
1917 2004-01-29 Mark Mitchell <mark@codesourcery.com>
1920 * mangle.c (write_encoding): Correct encoding of member template
1923 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1925 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
1926 template name as it was `<::' (digraph typo).
1927 (cp_parser_nth_token_starts_template_argument_list_p): New function.
1928 (cp_parser_id_expression): Use it.
1929 (cp_parser_nested_name_specifier_opt): Likewise.
1930 (cp_parser_template_name): Likewise.
1931 (cp_parser_class_name): Likewise.
1932 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
1934 2004-01-28 Mark Mitchell <mark@codesourcery.com>
1937 * typeck.c (merge_types): Do not merge attributes into
1941 * parser.c (cp_parser_direct_declarator): Do not prevent
1942 backtracking inside a parenthesized declarator.
1943 (cp_parser_parameter_declaration): Fix typo in comment.
1945 2004-01-28 Jan Hubicka <jh@suse.cz>
1947 * semantics.c (expand_body) Do emit_associated_thunks before
1950 2004-01-27 Devang Patel <dpatel@apple.com>
1952 * name-lookup.c: Include "debug.h"
1953 (do_namespace_alias): Invoke debug_hooks to emit debug info
1954 for namespace alias.
1955 (do_local_using_decl): Invoke debug_hooks to emit debug info
1957 (do_class_using_decl): Same.
1958 (do_toplevel_using_decl): Same.
1959 (do_using_directive): Same.
1960 (cp_emit_debug_info_for_using): New function.
1961 * Make-lang.in (cp/parser.o): Depend on debug.h
1962 (cp/name-lookup.o): Same.
1964 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1966 * cp-tree.h (language_function, lang_type_header): Use
1968 * name-lookup.h (cp_binding_level): Likewise.
1970 2004-01-26 Mark Mitchell <mark@codesourcery.com>
1973 * semantics.c (finish_for_expr): Check for unresolved overloaded
1976 * class.c (add_method): Just check processing_template_decl to
1977 determine whether or not we are within a template.
1978 * decl2.c (maybe_retrofit_in_chrg): Likewise.
1979 * init.c (decl_constant_value): Check the type of the declaration,
1981 * name-lookup.c (maybe_push_to_top_level): Rename to ...
1982 (push_to_top_level): ... this.
1983 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
1984 * pt.c (push_template_decl_real): Reorder condition for speed.
1985 (convert_template_argument): Use dependency-checking functions in
1986 place of uses_template_parms.
1987 (lookup_template_class): Avoid calling uses_template_parms more
1989 (uses_template_parms): Reimplement, using dependency-checking
1991 (instantiate_class_template): Use push_to_top_level, not
1992 maybe_push_to_top_level.
1993 (type_unification_real): Simplify.
1994 (type_dependent_expression_p): Handle OFFSET_REFs and
1996 (any_dependent_template_arguments_p): Handle multiple levels of
1998 * semantics.c (expand_or_defer_fn): Do not check
1999 uses_template_parms for template instantiations.
2000 * typeck.c (comptypes): Avoid calling cp_type_quals.
2002 2004-01-25 Mark Mitchell <mark@codesourcery.com>
2005 * call.c (build_over_call): Do not convert arguments when
2006 processing a template.
2007 * pt.c (build_non_dependent_expr): Do not build a
2008 NON_DEPENDENT_EXPR for arithmetic constants.
2010 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2013 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
2014 returns a TYPE_DECL. no further lookup is required.
2015 * semantics.c (check_template_template_default_arg): A TYPE_DECL
2016 is invalid. Rework to give better diagnostics.
2018 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2021 * pt.c (instantiate_class_template): Add an error_mark_node
2023 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
2025 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
2028 * decl.c (finish_function): Move the call to
2029 finish_fname_decls below the call to
2030 finish_eh_spec_block.
2032 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
2034 * optimize.c, typeck2.c: Update copyright.
2036 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
2038 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
2039 init.c, mangle.c, typeck.c: Update copyright.
2041 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
2043 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
2045 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2047 * Make-lang.in: Replace $(docdir) with doc.
2048 (c++.info, c++.srcinfo): Dummy entry.
2049 (c++.man, c++.srcman): New rules.
2050 (c++.install-man): Revamp rule.
2052 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2054 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
2055 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
2056 immediate $(shell) instead of deferred backquote.
2058 2004-01-19 Mark Mitchell <mark@codesourcery.com>
2061 * parser.c (cp_parser_postfix_expression): When encountering
2062 incomplete type on left-hand side of "->" or ".", treat the entire
2063 expression as erroneous.
2066 * call.c (build_field_call): Remove.
2067 (n_build_method_call): Likewise.
2068 (build_method_call): Likewise.
2069 (build_new_method_call): Do not call build_field_call.
2070 * class.c (n_build_method_call): Remove.
2071 (print_class_statistics): Do not print it.
2072 * cp-tree.h (build_method_call): Remove declaration.
2073 (finish_object_call_expr): Likewise.
2074 (build_new_1): Do not use build_method_call.
2075 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
2076 when the function appearing on the right-hand-side of "." or "->"
2077 is not actually a function.
2078 * pt.c (tsubst_copy_and_build): Likewise.
2079 * semantics.c (finish_object_call_expr): Remove.
2081 2004-01-18 Mark Mitchell <mark@codesourcery.com>
2084 * pt.c (tsubst): Use finish_typeof.
2086 2004-01-18 Jason Merrill <jason@redhat.com>
2089 * except.c (build_throw): In a template, set
2090 current_function_returns_abnormally.
2092 2004-01-17 Fred Fish <fnf@intrinsity.com>
2095 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
2096 except don't call array_type_nelts() with a VECTOR_TYPE.
2098 2004-01-16 Jan Hubicka <jh@suse.cz>
2100 * mangle.c (write_mangled_name): Remove inline modifier.
2102 2004-01-16 Mark Mitchell <mark@codesourcery.com>
2105 * decl.c (compute_array_index_type): Fix grammar in comment.
2106 * init.c (build_zero_init): Handle zero-sized arrays correctly.
2109 * call.c (name_as_c_string): Print conversion operator names
2113 * call.c (initialize_reference): Pass -1 for inner parameter to
2116 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2119 * parser.c (cp_parser_base_specifier): Check for an invalid
2120 keyword `typename' and emit an user-friendly error message.
2122 2004-01-15 Geoffrey Keating <geoffk@apple.com>
2125 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2126 (handle_pragma_implementation): Likewise.
2128 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2131 * typeck.c (build_class_member_access_expr): Allow to access members
2132 of the currently open class.
2133 (finish_class_member_access_expr): Likewise.
2135 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
2138 * name-lookup.c (validate_nonmember_using_decl): Take scope and
2139 name by value, instead of computing them.
2140 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
2141 arguments. Pass them to validate_nonmember_using_decl.
2142 * name-lookup.h (do_local_using_decl): Adjust.
2143 (do_toplevel_using_decl): Likewise.
2144 * parser.c (cp_parser_using_declaration): Likewise.
2145 * pt.c (tsubst_expr): Likewise.
2147 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
2151 * name-lookup.c (qualified_lookup_using_namespace): Search
2152 strongly-associated namespaces first, and only then try other
2155 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
2157 * Make-lang.in (c++.srcextra): Dummy entry.
2159 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2162 * parser.c (cp_parser_template_name): Don't try to parse a
2163 conversion-function-id, as it cannot be a template-name.
2164 (cp_parser_simple_type_specifier): Check for invalid template-ids
2165 even after a built-in type.
2167 2004-01-14 Jan Hubicka <jh@suse.cz>
2170 * pt.c (instantiate_decl): Do not increase function_depth.
2172 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
2176 * parser.c (cp_parser_elaborated_type_specifier): Warn about
2177 attributes and discard.
2178 * decl.c (xref_tag): Don't overwite existing attributes with
2181 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2184 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
2185 is no destructor while looking up a BIT_NOT_EXPR.
2187 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
2189 * cxxfilt.c: Remove unused file.
2191 2004-01-14 Jan Hubicka <jh@suse.cz>
2193 Partial fix to PR c++/12850
2194 * decl2.c (mark_used): Do not proactively instantiate templates
2195 when compiling in unit-at-a-time or not optimizing.
2196 * optimize.c (maybe_clone_body): Do not increase function depth.
2198 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2201 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
2203 2004-01-12 Steven Bosscher <stevenb@suse.de>
2206 * parser.c (cp_parser_member_declaration): Any non-type is also
2207 not a class or a function.
2209 2004-01-12 Jason Merrill <jason@redhat.com>
2212 * class.c (build_base_path): Do not mark vtable references as
2214 (build_vtbl_ref_1): Likewise.
2216 2004-01-12 Richard Henderson <rth@redhat.com>
2219 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
2220 (store_init_value): Use it.
2221 * decl.c (check_initializer): Expect full initialization code
2222 from store_init_value.
2223 * init.c (expand_aggr_init_1): Likewise.
2224 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
2226 2004-01-12 Mark Mitchell <mark@codesourcery.com>
2228 * class.c (layout_class_type): For non-POD class types, also copy
2229 the DECL_SIZE and DECL_MODE of fields to the base class type.
2231 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2234 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
2235 calling regenerate_decl_from_template.
2237 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
2240 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
2241 decl-specifier occurring along with a class definition.
2243 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
2245 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
2246 clauses to comments describing declares_class_or_enum.
2247 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
2250 2004-01-12 Jan Hubicka <jh@suse.cz>
2252 * pt.c (for_each_template_parm): Do not check for duplicates.
2253 (for_each_template_parm): Use walk_tree duplicate checking code.
2255 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
2258 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
2259 is error_mark_node, don't add any more decl_specs.
2260 (cp_parser_init_declarator): After committing to a declaration, if
2261 the decl_specifiers start with error_mark_node, issue an error and
2262 change the type to "int".
2264 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
2267 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
2269 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2273 * pt.c (tsubst): Substitution must fail if we are attempting to
2274 create an array with element type that is an abstract class type.
2275 * decl.c (cp_finish_decl): Strip pointers and array types recursively
2276 before calling abstract_virtuals_error.
2278 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
2280 * name-lookup.c (qualified_lookup_using_namespace): Consider
2281 strong using directives even if we've already found a binding.
2283 2004-01-09 Mark Mitchell <mark@codesourcery.com>
2285 * cp-tree.h (cxx_expand_expr): Change prototype.
2286 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
2288 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2291 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
2292 looking into them recursively. They can be there because of the
2293 new __offsetof__ extension.
2295 2004-01-07 Zack Weinberg <zack@codesourcery.com>
2297 * parser.c (cp_parser_save_member_function_body): Mark the
2300 2004-01-05 Mark Mitchell <mark@codesourcery.com>
2303 * class.c (build_clone): Copy type attributes from the original
2304 function to the clone.
2307 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
2308 references as constant.
2311 * parser.c (cp_parser_explicit_instantiation): Improve error
2313 (cp_parser_require): Improve indication of the error location.
2316 * parser.c (cp_parser_class_head): Reorder logic to check for
2317 invalid qualification.
2319 2004-01-04 Mark Mitchell <mark@codesourcery.com>
2322 * name-lookup.c (lookup_using_namespace): Remove spacesp
2324 (unqualified_namespace_lookup): Likewise.
2325 (lookup_qualified_name): Adjust accordingly.
2326 (lookup_name_real): Likewise.
2327 (lookup_arg_dependent): Do not eliminate the namespace of the
2328 functions found by unqualified name lookup unless that is the
2331 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
2333 * semantics.c (push_deferring_access_checks): Fix format.
2334 (resume_deferring_access_checks): Likewise.
2335 (stop_deferring_access_checks): Likewise.
2336 (pop_deferring_access_checks): Likewise.
2337 (get_deferred_access_checks): Likewise.
2338 (pop_to_parent_deferring_access_checks): Likewise.
2339 (perform_deferred_access_checks): Likewise.
2340 (perform_or_defer_access_check): Likewise.
2342 2004-01-04 Richard Henderson <rth@redhat.com>
2344 * call.c (build_over_call): Don't create a save_expr of an
2345 aggregate, but rather its address.
2347 2004-01-04 Mark Mitchell <mark@codesourcery.com>
2350 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
2351 an offsetof expression.
2353 * parser.c (cp_parser_parameter_declaration): Fix comment.
2356 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
2357 (reference_binding): Set it when appropriate.
2358 (build_temp): New function, split out from ...
2359 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
2360 (initialize_reference): Likewise.
2363 * parser.c (cp_parser): Add in_type_id_in_expr_p.
2364 (cp_parser_new): Initialize it.
2365 (cp_parser_postfix_expression): Set it.
2366 (cp_parser_sizeof_operand): Likewise.
2367 (cp_parser_parameteR_declaration): Do not commit early to tenative
2368 parsers when in_type_id_in_expr_p is set.
2370 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2373 * parser.c (cp_parser_template_argument): Don't call
2374 make_unbound_class_template directly.
2375 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
2376 UNBOUND_CLASS_TEMPLATE tree node.
2378 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
2381 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
2383 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2386 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
2387 (DECL_FUNCTION_TEMPLATE_P): Use it.
2388 (DECL_CLASS_TEMPLATE_P): Likewise.
2389 * parser.c (cp_parser_lookup_name): Add is_template parameter.
2390 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
2391 (cp_parser_template_name): Likewise.
2392 (cp_parser_elaborated_type_specifier): Likewise.
2393 (cp_parser_namespace_name): Likewise.
2394 (cp_parser_class_name): Likewise.
2395 (cp_parser_lookup_name_simple): Likewise.
2397 See ChangeLog.3 for earlier changes.