1 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
4 Rename DECL_STMT to DECL_EXPR.
5 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
6 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
7 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
9 2004-06-26 Jan Hubicka <jh@suse.cz>
12 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
13 reachability analysis.
15 2004-06-25 Mark Mitchell <mark@codesourcery.com>
17 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
20 2004-06-25 Paul Brook <paul@codesourcery.com>
22 * decl2.c (get_guard): Call targetm.cxx.guard_type.
23 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
25 2004-06-24 Mark Mitchell <mark@codesourcery.com>
27 * decl.c (grokdeclarator): Restore error messages about __thread.
28 * parser.c (cp_parser_decl_specifier_seq): Likewise.
30 2004-06-24 Jason Merrill <jason@redhat.com>
33 * decl.c (grokparms): Give the PARM_DECL reference type if the
34 parameter is passed by invisible reference.
36 2004-06-24 Andreas Schwab <schwab@suse.de>
38 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
40 2004-06-23 Mark Mitchell <mark@codesourcery.com>
42 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
43 (cp/decl.o): Likewise.
44 (cp/decl2.o): Likewise.
46 (cp/semantics.o): Likewise.
47 * config-lang.in (gtfiles): Do not reference cp/lex.h.
48 * class.c: Do not include lex.h.
49 (add_implicitly_declared_members): Do not use
50 adding_implicit_members.
51 (check_bases_and_members): Do not talk about grok_x_components.
52 * cp/cp-tree.h (adding_implicit_members): Remove.
53 (cp_storage_class): New type.
54 (cp_decl_spec): Likewise.
55 (cp_decl_specifier_seq): Likewise.
56 (cp_parameter_declarator): Use it for the decl_specifiers field.
57 (check_tag_decl): Adjust prototype.
58 (shadow_tag): Likewise.
59 (groktypename): Likewise.
60 (start_decl): Likewise.
61 (start_function): Likewise.
62 (start_method): Likewise.
63 (grok_x_components): Remove.
64 (grokfield): Adjust prototype.
65 (grokbitfield): Likewise.
66 (finish_member_class_template): Remove.
67 * decl.c: Do not include lex.h.
68 (adding_implicit_members): Do not define.
69 (check_tag_decl): Do not use trees to represent decl-specifiers.
70 (shadow_tag): Likewise.
71 (groktypename): Likewise.
72 (start_decl): Likewise.
73 (grokvardecl): Likewise.
74 (grokdeclarator): Likewise.
75 (grokparms): Likewise.
76 (start_function): Likewise.
77 (start_method): Likewise.
78 * decl.h (grokdeclarator): Adjust prototype.
79 * decl2.c: Do not include lex.h.
80 (grok_x_components): Remove.
81 (grokfield): Do not use trees to represent decl-specifiers.
82 (grokbitfield): Likewise.
83 * lex.c: Do not include lex.h.
85 * parser.c: Include target.h.
86 (clear_decl_specs): New function.
87 (cp_parser_translation_unit): Do not use trees to represent
89 (cp_parser_postfix_expression): Likewise.
90 (cp_parser_new_type_id): Likewise.
91 (cp_parser_condition): Likewise.
92 (cp_parser_simple_declaration): Likewise.
93 (cp_parser_decl_specifier_seq): Likewise.
94 (cp_parser_function_specifier_opt): Likewise.
95 (cp_parser_conversion_type_id): Likewise.
96 (cp_parser_template_parameter): Likewise.
97 (cp_parser_explicit_instantiation): Likewise.
98 (cp_parser_type_specifier): Likewise.
99 (cp_parser_simple_type_specifier): Likewise.
100 (cp_parser_init_declarator): Likewise.
101 (cp_parser_type_id): Likewise.
102 (cp_parser_type_specifier_seq): Likewise.
103 (cp_parser_parameter_declaration): Likewise.
104 (cp_parser_member_declaration): Likewise.
105 (cp_parser_exception_declaration): Likewise.
106 (cp_parser_function_definition_from_specifiers_and_declarator):
108 (cp_parser_single_declaration): Likewise.
109 (cp_parser_save_member_function_body): Likewise.
110 (cp_parser_friend_p): Likewise.
111 (cp_parser_set_storage_class): New function.
112 (cp_parser_set_decl_spec_type): Likewise.
113 * pt.c: Do not include lex.h.
114 * semantics.c: Likewise.
115 (finish_member_class_template): Remove.
117 2004-06-23 Roger Sayle <roger@eyesopen.com>
119 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
120 longer take both "args" and "convert_args" as arguments.
121 (build_op_delete_call): Update call to build_cxx_call.
122 (build_over_call): Likewise, update call to build_cxx_call.
123 * cp-tree.h (build_cxx_call): Update funtion prototype.
124 * typeck.c (build_function_call): Don't call expand_tree_builtin.
125 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
126 (throw_bad_typeid): Likewise.
127 (build_dynamic_cast_1): Likewise.
129 2004-06-22 Richard Henderson <rth@redhat.com>
131 * class.c (build_vfn_ref): Take a pointer not object. Build
133 (cp_fold_obj_type_ref): New.
134 * call.c (build_over_call): Update build_vfn_ref call.
135 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
136 * cp-tree.h (cp_fold_obj_type_ref): Declare.
138 2004-06-21 Jason Merrill <jason@redhat.com>
141 * cp-gimplify.c (cp_gimplify_init_expr): Look through
144 2004-06-21 Mark Mitchell <mark@codesourcery.com>
146 * cp-tree.def (NEW_EXPR): Add a fourth slot.
147 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
148 (TREE_PARMLIST): Likewise.
149 (CALL_DECLARATOR_PARMS): Likewise.
150 (CALL_DECLARATOR_QUALS): Likewise.
151 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
152 (cp_declarator_kind): New type.
153 (cp_parameter_declarator): Likewise.
154 (cp_declarator): Likewise.
155 (cp_error_declarator): Likewise.
156 (no_parameters): Likewise.
157 (groktypename): Change prototype.
158 (start_decl): Likewise.
159 (start_handler_parms): Likewise.
160 (get_scope_of_declarator): Likewise.
161 (start_function): Likewise.
162 (start_preparsed_function): New function.
163 (start_function): Change prototype.
164 (start_method): Likewise.
165 (grokfield): Likewise.
166 (grokbitfield): Likewise.
167 (build_new): Likewise.
168 (make_pointer_declarator): Remove.
169 (make_reference_declarator): Likewise.
170 (make_call_declarator): Likewise.
171 (set_quals_and_spec): Likewise.
172 (process_template_parm): Change prototype.
173 (begin_function_definition): Remove.
174 (finish_parmlist): Remove.
175 * decl.c (groktypename): Do not use trees to represent
177 (start_decl): Likewise.
178 (start_handler_parms): Remove.
179 (get_scope_of_declarator): Reimplement.
180 (grokdeclarator): Do not use trees to represent declarators.
181 (grokparms): Likewise.
182 (start_function): Likewise.
183 (start_method): Likewise.
184 (build_void_list_mode): Do not use TREE_PARMLIST.
185 * decl.h (grokdeclarator): Change prototype.
186 * decl2.c (grok_method_quals): Robustify.
187 (grok_x_components): Do not use trees to represent declarators.
188 (grokfield): Likewise.
189 (grokbitfield): Likewise.
190 (start_objects): Build FUNCTION_DECLs, not declarators.
191 (start_static_storage_duration_function): Likewise.
192 * init.c (build_new): Simplify.
193 * lex.c (make_pointer_declarator): Remove.
194 (make_reference_declarator): Likewise.
195 (make_call_declarator): Likewise.
196 (set_quals_and_spec): Likewise.
197 * method.c (use_thunk): Use start_preparsed_function.
198 (synthesize_method): Likewise.
199 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
200 * optimize.c (maybe_clone_body): Use start_preparsed_function.
201 * parser.c (cp_error_declarator): New variable.
202 (declarator_obstack): Likewise.
203 (alloc_declarator): New function.
204 (make_declarator): Likewise.
205 (make_id_declarator): Likewise.
206 (make_pointer_declarator): Likewise.
207 (make_reference_declarator): Likewise.
208 (make_ptrmem_declarator): Likewise.
209 (make_call_declarator): Likewise.
210 (make_array_declarator): Likewise.
211 (no_parameters): New variable.
212 (make_parameter_declarator): Likewise.
213 (cp_parser_check_for_definition_in_return_type): Do not use trees
214 to represent declarators.
215 (cp_parser_translation_unit): Likewise.
216 (cp_parser_new_expression): Likewise.
217 (cp_parser_new_type_id): Likewise.
218 (cp_parser_new_declarator_opt): Likewise.
219 (cp_parser_direct_new_declarator): Likewise.
220 (cp_parser_condition): Likewise.
221 (cp_parser_declaration_statement): Likewise.
222 (cp_parser_declaration): Likewise.
223 (cp_parser_conversion_type_id): Likewise.
224 (cp_parser_conversion_declarator_opt): Likewise.
225 (cp_parser_template_parameter_list): Likewise.
226 (cp_parser_template_parameter): Likewise.
227 (cp_parser_explicit_instantiation): Likewise.
228 (cp_parser_init_declarator): Likewise.
229 (cp_parser_declarator): Likewise.
230 (cp_parser_direct_declarator): Likewise.
231 (cp_parser_type_id): Likewise.
232 (cp_parser_parameter_declaration_clause): Likewise.
233 (cp_parser_parameter_declaration_list): Likewise.
234 (cp_parser_parameter_declaration): Likewise.
235 (cp_parser_member_declaration): Likewise.
236 (cp_parser_exception_declaration): Likewise.
237 (cp_parser_check_declarator_template_parameters): Likewise.
238 (cp_parser_function_definition_from_specifiers_and_declarator):
240 (cp_parser_save_member_function_body): Likewise.
241 * pt.c (process_template_parm): Add is_non_type parameter.
242 (convert_template_argument): Adjust call to groktypename.
243 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
244 (tsubst): Do not expect declarators.
245 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
247 (instantiate_decl): Use start_preparsed_function.
248 * semantics.c (begin_function_definition): Remove.
249 (finish_parmlist): Remove.
250 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
253 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
255 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
256 (build_new_method_call): Likewise.
257 * decl.c (local_variable_p_walkfn): Don't walk into types.
258 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
259 (build_anon_union_vars): Add new operand for COMPONENT_REF.
260 * init.c (buld_new): Add new operand for ARRAY_REF.
261 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
262 (do_build_assign_ref): Likewise.
263 * parser.c (cp_parser_direct_new_declarator): Add new operands
265 (cp_parser_direct_declarator): Likewise.
266 * pt.c (tsubst): Likewise.
267 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
269 * semantics.c (finish_non_static_data_member): Add new operand
271 * typeck.c (build_class_member_access_expr): Likewise.
272 (build_class_member_access_expr, finish_class_member_access_expr):
274 (build_ptrmemfunc_access_expr): Likewise.
275 (build_array_ref): Add new operands for ARRAY_REF.
276 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
277 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
279 2004-06-21 Richard Henderson <rth@redhat.com>
281 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
282 * parser.c (cp_parser_jump_statement): Update commentary.
283 * pt.c (tsubst_expr): Use RETURN_EXPR.
284 * semantics.c (finish_return_stmt): Likewise.
285 (finalize_nrv_r): Likewise.
286 * typeck.c, typeck2.c: Update file start commentary.
288 2004-06-21 Richard Henderson <rth@redhat.com>
290 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
292 2004-06-20 Richard Henderson <rth@redhat.com>
294 * cp-tree.h (add_decl_stmt): Declare.
295 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
296 * semantics.c (maybe_cleanup_point_expr): New.
297 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
298 finish_for_expr, finish_switch_cond): Use it.
299 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
301 2004-06-20 Richard Henderson <rth@redhat.com>
303 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
304 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
305 (cp_gimplify_expr): Call it.
306 (gimplify_cleanup_stmt): Move from c-gimplify.c.
307 (cp_genericize): New.
308 * decl.c (finish_function): Call it.
309 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
310 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
311 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
312 (cp_genericize): Declare.
313 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
314 * dump.c (cp_dump_tree): Likewise.
315 * semantics.c (push_cleanup): Move from c-semantics.c.
317 2004-06-20 Zack Weinberg <zack@codesourcery.com>
319 * cp-lang.c (has_c_linkage): Implement.
321 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
322 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
323 (builtin_function_1): Don't call make_decl_rtl.
324 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
325 (grokvardecl): Don't call mangle_decl.
326 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
328 * method.c (set_mangled_name_for_decl): Delete.
329 * name-lookup.c (pushdecl): When a local extern shadows a
330 file-scope declaration of the same object, give both DECLs the
332 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
333 on DECL_ASSEMBLER_NAME.
335 2004-06-19 Richard Henderson <rth@redhat.com>
337 * cp-gimplify.c: Remove unnecessary prototypes.
338 (cp_gimplify_stmt): Merge into ...
339 (cp_gimplify_expr): ... here. Move to end of file. Handle
340 stmts_are_full_exprs_p frobbing.
341 * cp-tree.h (cp_gimplify_stmt): Remove.
342 * pt.c (tsubst_expr): Merge prep_stmt and unify.
343 * tree.c (init_tree): Don't set lang_gimplify_stmt.
345 2004-06-18 Richard Henderson <rth@redhat.com>
348 * semantics.c (begin_cond): New.
349 (finish_cond): Rewrite to handle template DECL_STMTs specially.
350 Assume that non-template decls go land before the conditional.
351 (simplify_loop_decl_cond): Likewise.
352 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
353 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
354 begin_switch_stmt, finish_switch_cond): Update to match.
356 2004-06-17 Jason Merrill <jason@redhat.com>
359 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
360 (finish_stmt_expr_expr): Update type after conversions.
361 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
362 Handle void initializer.
363 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
365 2004-06-17 Geoffrey Keating <geoffk@apple.com>
367 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
368 * cp-tree.h (defer_fn): Delete.
369 * decl2.c (defer_fn): Delete.
370 (finish_file): Simplify deferred_fns loops; check that
371 only used inline functions get into deferred_fns.
372 (mark_used): Inline previous contents of defer_fn.
374 2004-06-16 Richard Henderson <rth@redhat.com>
376 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
377 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
378 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
379 of CTOR_INITIALIZER ...
380 (pp_cxx_statement): ... here.
381 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
382 (finish_function): Use alloc_stmt_list to zap entire function.
383 * parser.c (cp_parser_compound_statement): Update commentary.
384 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
385 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
386 (finish_stmt_expr): Don't look through COMPOUND_STMT.
388 2004-06-16 Geoffrey Keating <geoffk@apple.com>
390 * pt.c (mark_decl_instantiated): Don't call defer_fn.
392 2004-06-16 Richard Henderson <rth@redhat.com>
394 * parser.c (cp_parser_labeled_statement): Update commentary.
395 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
396 * tree.c (mark_local_for_remap_r): Likewise.
398 2004-06-16 Richard Henderson <rth@redhat.com>
400 * parser.c (cp_parser_asm_definition): Update commentary.
401 * pt.c (tsubst_expr): Use ASM_EXPR.
402 * semantics.c (finish_asm_stmt): Likewise.
404 2004-06-16 Richard Henderson <rth@redhat.com>
406 * decl.c (finish_destructor_body): Use LABEL_EXPR.
407 * parser.c (cp_parser_statement): Update commentary.
408 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
409 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
410 * tree.c (mark_local_for_remap_r): Likewise.
412 2004-06-16 Richard Henderson <rth@redhat.com>
415 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
416 statement in FOR_INIT_STMT for templates.
418 2004-06-15 Richard Henderson <rth@redhat.com>
420 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
421 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
422 (genericize_try_block): Use gimplify_stmt.
423 (genericize_catch_block, genericize_eh_spec_block): Likewise.
424 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
425 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
426 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
427 (cp_tree_chain_matters_p): Remove.
428 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
429 (COMPOUND_STMT_BODY_BLOCK): New.
430 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
431 (EXPR_STMT_STMT_EXPR_RESULT): New.
432 (building_stmt_tree): Check cur_stmt_list.
433 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
434 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
435 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
436 (cp_finish_decl): Use push_cleanup.
437 (start_function, finish_function): Use statement lists.
438 (finish_stmt): Do nothing.
439 * except.c (begin_eh_spec_block): Use statement lists.
440 (check_handlers_1, check_handlers): Likewise.
441 * init.c (construct_virtual_base): Don't add extra compound stmts.
442 (build_vec_init): Likewise.
443 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
444 * name-lookup.h (struct cp_binding_level): Add statement_list.
445 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
446 (cp_parser_labeled_statement, cp_parser_expression_statement,
447 cp_parser_statement_seq_opt): Likewise.
448 (cp_parser_compound_statement): Likewise. Take bool for try block.
449 (cp_parser_selection_statement): Tidy if processing.
450 (cp_parser_already_scoped_statement): Rewrite to do what it says.
451 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
452 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
453 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
454 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
455 (finish_cond): New, rewritten from FINISH_COND.
456 (simplify_loop_decl_cond): New.
457 (finish_expr_stmt): Avoid nested EXPR_STMTs.
458 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
459 begin_else_clause, finish_else_clause, finish_if_stmt,
460 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
461 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
462 finish_for_cond, finish_for_stmt, begin_switch_stmt,
463 finish_switch_cond, finish_switch_stmt, begin_try_block,
464 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
465 finish_handler_sequence, finish_function_handler_sequence,
466 begin_handler, finish_handler_parms, finish_handler,
467 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
468 using statement lists.
469 (begin_compound_stmt): Replace has_no_scope argument with flags.
470 Update all callers. Use statement lists.
471 (finish_compound_stmt): Likewise.
472 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
473 (current_scope_stmt_stack): Remove.
474 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
475 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
476 Rewrite with statement lists.
478 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
480 * parser.c: Change all assignments of c_lex_string_translate
481 to true and false to 1 and 0.
482 (cp_lexer_read_token): Convert type of the translated string.
483 (cp_parser_skip_to_closing_parentheses): Preserve original
484 value of c_lex_string_translate, and set it to -1 while
486 (cp_parser_cache_group): Likewise.
487 (cp_parser_cache_group_1): Renamed.
488 (cp_parser_asm_operand_list): Remove redundant setting of
489 c_lex_string_translate.
490 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
491 Handle chained strings.
493 2004-06-12 Andrew Pinski <apinski@apple.com>
497 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
499 * cp-tree.h: Fix typo.
501 * cp-tree.h: Include cgraph.h
502 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
503 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
505 2004-06-12 Jason Merrill <jason@redhat.com>
507 PR tree-optimization/14107
508 * decl.c (finish_function): Warn about no return in all functions.
510 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
512 * cp-tree.h (struct language_function): Remove cannot_inline.
513 * decl.c (save_function_data): cannot_inline is no more.
514 (cxx_push_function_context): Likewise.
515 * decl2.c (start_objects, start_static_storage_duration_function):
516 Reset DECL_INLINE, set DECL_UNINLINABLE.
518 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
521 * search.c (lookup_field): Propagate the ambiguity list.
522 (lookup_fnfields): Likewise.
524 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
527 * parser.c (cp_parser_template_name): Ctors/dtors never need a
528 template keyword to disambiguate.
530 2004-06-14 Mark Mitchell <mark@codesourcery.com>
533 * decl.c (grokdeclarator): Ignore pointer-to-members when
534 computing template depth.
537 * name-lookup.c (pushtag): Do not try to put class declarations in
538 explicit specialization scopes.
540 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
542 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
544 2004-06-11 Mark Mitchell <mark@codesourcery.com>
547 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
548 bindings for undeclared built-ins.
550 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
552 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
553 appear at the correct location.
555 2004-06-10 Jason Merrill <jason@redhat.com>
559 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
560 * init.c (build_offset_ref): Build SCOPE_REF with non-null
561 TREE_TYPE for non-dependent names.
562 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
563 unknown_type_node as its TREE_TYPE.
564 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
565 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
566 (dump_expr) <SCOPE_REF case>: Likewise.
568 2004-06-10 Mark Mitchell <mark@codesourcery.com>
571 * parser.c (cp_parser_direct_declarator): Robustify.
574 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
575 constants in non-dependent contexts.
579 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
582 2004-06-10 Jakub Jelinek <jakub@redhat.com>
585 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
588 2004-06-09 Mark Mitchell <mark@codesourcery.com>
592 2004-06-07 Mark Mitchell <mark@codesourcery.com>
593 * lex.c (handle_pragma_interface): Deprecate.
594 (handle_pragma_implementation): Likewise.
596 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
598 * g++spec.c (lang_specific_driver): Remove check for -lm
599 and -lmath when check it see if it was the math library.
601 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
604 * parser.c (cp_parser_direct_declarator): Reject constructor named
605 as qualified template-id.
607 2004-06-07 Mark Mitchell <mark@codesourcery.com>
610 * lex.c (handle_pragma_interface): Deprecate.
611 (handle_pragma_implementation): Likewise.
613 2004-06-07 Mark Mitchell <mark@codesourcery.com>
616 * parser.c (cp_parser_iteration_statement): Fix typo in error
620 * pt.c (tsubst_default_argument): Do not defer access checks
621 while substituting into the default argument.
624 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
625 constant in a non-dependent context.
628 * except.c (build_throw): Ensure that temp_expr has been
631 2004-06-06 Roger Sayle <roger@eyesopen.com>
633 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
635 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
638 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
639 'typename', and accept 'template'.
641 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
642 Jan Hubicka <jh@suse.cz>
645 * method.c (use_think): Do not mark thunk as referenced.
647 2004-06-03 Matt Austern <austern@apple.com>
650 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
651 is nonzero, and if we see a noninline definition of a key method,
652 make the vtables nonweak.
654 2004-06-02 Matt Austern <austern@apple.com>
656 * cp-tree.h (instantiate_decl): new boolean parameter,
657 undefined_ok. Current behavior is equivalent to its being 0.
658 * decl2.c (mark_used): Add new argument when calling instantiate_decl
659 * pt.c (mark_decl_instantiated): Unconditionally make
660 instantiations explicit unconditionally
661 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
662 since mark_decl_instantiated now does it.
663 (instantiate_class_member): New. Instantiate a member of an
664 explicitly instantiated class template.
665 (do_type_instantiation): Explicitly instantiate members of an
666 explicitly instantiated class template.
667 (instantiate_decl): if undefined_ok is nonzero, and if we're
668 trying to explicitly instantiated a template with no definition,
669 change it to an implicit instantiation.
670 (instantiate_pending_templates): Add new argument to instantiate_decl.
671 * tree.c (cp_cannot_inline_tree_fn): Likewise.
673 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
675 * cp-tree.h: Fix typo.
677 * cp-tree.h: Include cgraph.h
678 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
679 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
681 2004-06-01 Jason Merrill <jason@redhat.com>
684 * call.c (call_builtin_trap): Remove type parm.
685 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
686 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
688 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
691 * init.c (build_offset_ref): Build SCOPE_REF with non-null
692 TREE_TYPE for non-dependent names.
693 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
694 unknown_type_node as its TREE_TYPE.
695 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
696 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
697 (dump_expr) <SCOPE_REF case>: Likewise.
699 2004-06-01 Richard Henderson <rth@redhat.com>
700 Andrew Pinski <pinskia@physics.uc.edu>
702 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
703 * parser.c (struct cp_parser): Remove in_offsetof.
704 (cp_parser_new): Don't set it.
705 (cp_parser_unary_expression): Don't check it.
706 (cp_parser_postfix_open_square_expression): Split out from ...
707 (cp_parser_postfix_expression): ... here.
708 (cp_parser_postfix_dot_deref_expression): Likewise.
709 (cp_parser_builtin_offsetof): New.
710 (cp_parser_primary_expression): Use it.
712 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
715 * parser.c (cp_parser_postfix_expression): Allow subscript
716 operator in offsetof.
718 2004-05-31 Mark Mitchell <mark@codesourcery.com>
721 * friend.c (add_friend): Do not try to perform access checks for
722 functions from dependent classes.
724 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
726 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
727 (pp_cxx_begin_template_argument_list): Turn into a function.
728 (pp_cxx_end_template_argument_list): Likewise.
729 (pp_cxx_separate_with): Define.
730 (pp_cxx_unqualified_id): Tidy.
731 (pp_cxx_primary_expression): Likewise.
732 (pp_cxx_postfix_expression): Likewise.
733 (pp_cxx_expression): Likewise.
734 (pp_cxx_simple_type_specifier): Likewise.
735 (pp_cxx_type_specifier_seq): Likewise.
736 (pp_cxx_parameter_declaration_clause): Likewise.
737 (pp_cxx_exception_specification): Likewise.
738 (pp_cxx_direct_declarator): Likewise.
739 (pp_cxx_type_id): Likewise.
740 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
742 (pp_cxx_left_paren): Likewise.
743 (pp_cxx_right_paren): Likewise.
744 (pp_cxx_left_brace): Likewise.
745 (pp_cxx_right_brace): Likewise.
746 (pp_cxx_left_bracket): Likewise.
747 (pp_cxx_right_bracket): Likewise.
748 (pp_cxx_dot): Likewise.
749 (pp_cxx_identifier): Likewise.
750 (pp_cxx_tree_identifier): Likewise.
751 (pp_cxx_ampersand): New macro.
752 (pp_cxx_star): Likewise.
753 (pp_cxx_arrow): Likewise.
754 (pp_cxx_semicolon): Likewise.
755 (pp_cxx_complement): Likewise.
756 (pp_cxx_begin_template_argument_list): Declaree.
757 (pp_cxx_end_template_argument_list): Likewise.
758 (pp_cxx_colon_colon): likewise.
760 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
762 * parser.c (cp_parser_simple_type_specifier): Explicitly test
765 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
767 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
768 typeck.c: Fix comment formatting.
770 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
772 * cp-lang.c (cp_expand_decl): Remove.
773 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
775 2004-05-30 Andreas Jaeger <aj@suse.de>
777 * lang-specs.h: Add missing initializers for .ii.
779 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
781 * decl.c (cp_make_fname_decl): Free return value from
784 2004-05-28 Mark Mitchell <mark@codesourcery.com>
787 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
789 * init.c (build_new): Likewise.
792 * name-lookup.c (arg_assoc): Robustify.
795 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
796 when determining the scope to use for a pointer to member.
797 (lookup_anon_field): Give it external linkage.
798 * cp-tree.h (lookup_anon_field): Declare it.
799 * expr.c (cplus_expand_constant): Use it.
801 2004-05-28 Mark Mitchell <mark@codesourcery.com>
804 * parser.c (cp_parser_simple_type_specifier): Call
805 maybe_note_name_used_in_class.
807 2004-05-28 Tom Marshall <tmarshall@real.com>
810 * class.c (finish_struct_1): Warn only if the dtor is non-private or
811 the class has friends.
813 2004-05-27 Adam Nemet <anemet@lnxw.com>
816 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
817 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
819 2004-05-24 Geoffrey Keating <geoffk@apple.com>
821 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
822 if it might be needed.
823 * pt.c (mark_decl_instantiated): Only call defer_fn if
824 the function actually needs processing in finish_file.
825 * decl2.c (finish_file): Add check that elements in
826 deferred_fns_used are really needed there. Remove unnecessary
827 test of DECL_SAVED_TREE.
829 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
831 * Make-lang.in: No need to specify $(LIBCPP).
833 2004-05-23 Mark Mitchell <mark@codesourcery.com>
836 * parser.c (cp_parser_class_head): Robustify.
839 * parser.c (cp_parser_decl_specifier_seq): Correct error in
841 (cp_parser_constructor_declarator_p): Treat attributes
845 * typeck.c (build_unary_op): Do not attempt to resolve casts to
846 base classes in templates.
848 2004-05-23 Mark Mitchell <mark@codesourcery.com>
851 * pt.c (instantiate_template): Robustify.
853 2004-05-23 Mark Mitchell <mark@codesourcery.com>
856 * decl.c (xref_tag): Issue errors about redeclaring template
857 classes as non-template classes.
859 2004-05-23 Mark Mitchell <mark@codesourcery.com>
862 * name-lookup.c (supplement_binding): Allow redefinitions of
866 * parser.c (cp_parser_template_argument): Robustify.
868 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
870 * class.c (alter_access): Use %E format specifier to print an
871 identifier node. Avoid looking at the IDENTIFIER_POINTER.
872 (push_lang_context): Likewise.
873 * decl.c (lookup_label): Likewise.
874 (grokdeclarator): Likewise.
875 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
876 * pt.c (do_type_instantiation): Likewise.
877 * tree.c (handle_java_interface_attribute): Likewise.
878 (handle_com_interface_attribute): Likewise.
879 (handle_init_priority_attribute): Likewise.
881 2004-05-22 Mark Mitchell <mark@codesourcery.com>
885 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
886 recognized as overloaded functions.
888 2004-05-22 Mark Mitchell <mark@codesourcery.com>
891 * class.c (layout_nonempty_base_or_field): Do not try to avoid
892 layout conflicts for unions.
895 * typeck.c (build_x_unary_op): Instantiate template class
896 specializations before looking for "operator &".
899 * typeck.c (complete_type): Layout non-dependent array types, even
903 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
906 2004-05-22 Roger Sayle <roger@eyesopen.com>
908 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
909 returning when TREE_TYPE is error_mark_node.
910 * typeck.c (require_complete_type): Return error_mark_node if
911 value's type is an error_mark_node.
913 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
915 * optimize.c (calls_setjmp_r): Remove.
916 (calls_setjmp_p): Remove.
917 * cp-tree.c (calls_setjmp_p): Remove.
918 * decl.c (finish_function): Do not call calls_setjmp_p.
920 2004-05-18 Zack Weinberg <zack@codesourcery.com>
922 * decl.c (cp_finish_decl): Use mark_decl_referenced.
923 * decl2.c (maybe_make_one_only): Likewise.
924 * method.c (use_thunk): Likewise.
926 2004-05-18 Jason Merrill <jason@redhat.com>
928 * class.c (build_base_path): Tidy a bit.
930 2004-05-14 Geoffrey Keating <geoffk@apple.com>
932 * name-lookup.c (struct scope_binding): New.
933 (EMPTY_SCOPE_BINDING): New.
934 (lookup_using_namespace): Take a scope_binding instead of a
936 (qualified_lookup_using_namespace): Likewise.
937 (cxx_binding_clear): Delete.
938 (do_nonmember_using_decl): Use a scope_binding instead of a
940 (lookup_tag): Don't call select_decl.
941 (ambiguous_decl): Don't return anything (and change callers to match).
942 Take a scope_binding as the second parameter.
943 (lookup_namespace_name): Use a scope_binding instead of a
945 (unqualified_namespace_lookup): Likewise.
946 (lookup_qualified_name): Likewise.
947 (select_decl): Take a scope_binding instead of a cxx_binding.
948 Use macros rather than hand-coding tests for type-ness.
950 2004-05-13 Diego Novillo <dnovillo@redhat.com>
952 * cp-gimplify.c: Rename from cp-simplify.c.
953 * Make-lang.in, optimize.c: Update.
955 2004-05-13 Diego Novillo <dnovillo@redhat.com>
957 Merge from tree-ssa-20020619-branch. See
958 ChangeLog.tree-ssa for details.
960 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
961 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
962 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
963 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
965 * cp-mudflap.c: New file.
966 * cp-simplify.c:: New file.
968 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
971 * decl2.c (check_classfn): For member templates, compare also the
972 template parameters to match the declaration.
973 * cp-tree.h: Adjust declaration of check_classfn.
974 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
975 * friend.c (do_friend): Likewise.
976 * pt.c (tsubst_friend_function): Likewise.
978 2004-05-01 Zack Weinberg <zack@codesourcery.com>
980 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
981 Instead, dig into the representation type to find the array bound.
983 2004-04-30 Jason Merrill <jason@redhat.com>
985 Refer to base members using COMPONENT_REFs where possible.
986 * class.c (build_simple_base_path): New fn.
987 (build_base_path): Use it for non-virtual base references.
988 (layout_class_type): Change base fields to their real type
989 after layout is done.
990 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
991 * cp-lang.c (cxx_get_alias_set): Use it.
993 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
995 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
998 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1001 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
1002 used in integral constant expressions.
1004 2004-04-22 Mark Mitchell <mark@codesourcery.com>
1006 * init.c (build_aggr_init): Fix accidental use of C99 construct in
1009 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
1011 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
1012 * decl.c (reshape_init): Use it.
1013 * init.c (perform_member_init): Remove redundant condition.
1014 (build_aggr_init): Adjust to handle brace-enclosed initializers
1016 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1018 * parser.c (cp_parser_initializer_clause): Do not set
1019 TREE_HAS_CONSTRUCTOR on the initializer.
1020 * rtti.c (tinfo_base_init): Likewise.
1021 (generic_initializer): Likewise.
1022 (ptr_initializer): Likewise.
1023 (ptm_initializer): Likewise.
1024 (class_initializer): Likewise.
1025 (get_pseudo_ti_init): Likewise.
1026 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1028 2004-04-22 Alan Modra <amodra@bigpond.net.au>
1030 * name-lookup.c (anonymous_namespace_name): Make static.
1032 2004-04-19 Roger Sayle <roger@eyesopen.com>
1035 * class.c (build_base_path): Call fold whilst building the NULL
1036 pointer check expression trees.
1038 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
1040 * init.c (build_new_1): Don't use type size argument for Java
1041 _Jv_AllocObject call.
1043 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
1045 * method.c (make_alias_for_thunk): Remove preprocessor guard on
1046 declaration and definition.
1048 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
1051 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
1052 than ASM_OUTPUT_DEF.
1054 2004-04-08 Jakub Jelinek <jakub@redhat.com>
1056 * decl2.c (mark_used): Don't segfault if cfun != NULL but
1057 current_function_decl == NULL.
1059 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
1062 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
1065 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1067 * init.c (decl_constant_value): Don't look at DECL_INITIAL
1069 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
1070 or TREE_SIDE_EFFECTS of a type.
1072 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
1075 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
1076 cv-qualifier unification.
1077 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
1079 2004-04-02 Jan Hubicka <jh@suse.cz>
1081 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
1082 * cp-tree.h (cp_update_decl_after_saving): Declare.
1083 * tree.c (cp_update_decl_after_saving): Define.
1085 2004-04-01 Mark Mitchell <mark@codesourcery.com>
1088 * typeck.c (get_delta_difference): Call fold before returning the
1091 2004-04-01 Richard Henderson <rth@redhat.com>
1094 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
1095 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
1097 2004-04-01 Mark Mitchell <mark@codesourcery.com>
1100 * name-lookup.c (maybe_push_cleanup_level): Robustify.
1102 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1104 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
1106 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1108 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
1109 * class.c (check_bitfield_decl): Likewise.
1110 * cvt.c (type_promotes_to): Likewise.
1111 * decl.c (finish_enum): Likewise.
1112 * mangle.c (write_builtin_type): Likewise.
1113 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
1114 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
1115 (build_binary_op): Likewise.
1117 2004-03-31 Jan Hubicka <jh@suse.cz>
1119 * tree.h (optimize_function): Kill prototype.
1120 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
1121 * semantics.c (expand_body): Kill.
1123 2004-03-30 Mark Mitchell <mark@codesourcery.com>
1126 * decl.c (start_decl_1): Do not decide whether or not to create a
1127 new cleanup level until after the type has been completed.
1130 * pt.c (tsubst_default_argument): Clear current_function_decl.
1132 2004-03-30 Zack Weinberg <zack@codesourcery.com>
1134 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
1136 2004-03-29 Zack Weinberg <zack@codesourcery.com>
1138 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
1139 is null, just print the literal name and return.
1141 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
1143 * cxx-pretty-print.c: Fix comment typos.
1145 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
1147 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
1150 2004-03-23 Ziemowit Laski <zlaski@apple.com>
1152 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
1153 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
1156 2004-03-23 Zack Weinberg <zack@codesourcery.com>
1158 PR 12267, 12391, 12560, 13129, 14114, 14133
1159 * cp-lang.c (c_reset_state): Delete.
1160 (push_file_scope, pop_file_scope): New stubs.
1161 * parser.c (c_parse_file): Call sorry() here if called more than once.
1163 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1165 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
1168 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1170 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
1172 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1174 * error.c (enum pad): Remove.
1175 (dump_qualifiers): Likewise.
1176 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
1177 (dump_aggr_type): Likewise.
1178 (dump_type_suffix): Likewise.
1179 (dump_simple_decl): Likewise.
1180 (dump_function_decl): Likewise.
1181 (cv_to_string): Likewise.
1182 (dump_type_prefix): Likewise. Adjust return void.
1183 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
1185 (pp_cxx_template_keyword_if_needed): Document.
1186 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
1187 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
1188 MUST_NOT_THROW_EXPR.
1190 2004-03-21 Mark Mitchell <mark@codesourcery.com>
1193 * decl.c (cp_finish_decl): Compute the size of arrays declared in
1194 templates, if their type is non-dependent.
1196 2004-03-19 Mark Mitchell <mark@codesourcery.com>
1198 * call.c (build_op_delete_call): Do not forget the placement
1199 arguments when iterating through mutiple delete operators.
1201 * cp-tree.h (svaed_scope): Remove last_parms.
1202 (NEW_DELETE_OPNAME_P): New macro.
1203 (last_function_parms): Remove.
1204 (do_friend): Adjust prototype.
1205 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
1206 using last_function_parms.
1207 (grokfndecl): Take the PARM_DECLs as an argument, rather than
1208 using last_function_parms.
1209 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
1210 for class-specific operator new and operator delete.
1211 (grok_op_properties): Do not look for allocation functions with
1213 (start_function): Use DECL_ARGUMENTS instead of
1214 last_function_parms.
1215 * decl.h (last_function_parms): Do not declare.
1216 * decl2.c (grokclassfn): Do not use last_function_parms.
1217 * friend.c (do_friend): Remove parmdecls parameter.
1218 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
1219 (pop_from_top_level): Do not restore it.
1220 * pt.c (check_explicit_specialization): Do not adjust
1221 last_function_parms.
1223 * name-lookup.c (do_local_using_decl): Create a local binding for
1224 types brought in via using declarations.
1226 * name-lookup.c (lookup_arg_dependent): Handle block-scope
1227 function declarations correctly.
1229 * semantics.c (finish_id_expression): Correct handling of
1230 conversion operators to dependent types.
1232 * typeck.c (lookup_destructor): Allow the use of destructors from
1235 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1237 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
1238 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
1239 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
1240 the field is named TEMPLATE_TYPE_PARM_INDEX.
1242 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1245 * parser.c (cp_parser_functional_cast): A cast to anything
1246 but integral or enumaration type is not an integral constant
1248 * pt.c (value_dependent_expression_p): Handle cast expressions
1249 without operands (such as "int()").
1251 2004-03-18 Mark Mitchell <mark@codesourcery.com>
1253 * semantics.c (finish_pseudo_destructor_expr): Allow differing
1254 cv-qualification between the type named by the
1255 pseudo-destructor-name and the object-type.
1257 * search.c (accessible_base_p): Handle non-proper bases.
1259 * name-lookup.c (do_nonmember_using_decl): If a using declaration
1260 refers to a single overloaded function, set the type of the
1262 * tree.c (lvalue_type): Simplify.
1263 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
1265 (build_unary_op): Handle OVERLOADs with known types.
1267 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
1270 * parser.c (cp_parser_postfix_expression): Handle the use of
1271 "typename" in non-dependent contexts. Convert appropriately when
1272 when using a qualified name after "->" or ".".
1274 * call.c (conditional_conversion): Honor the requirement that some
1275 conversions refer to the original object.
1277 2004-03-18 Mark Mitchell <mark@codesourcery.com>
1279 * call.c (build_conditional_expr): Do not call force_rvalue for
1280 operands of void_type when the conditional expression itself has
1282 * name-lookup.c (pushdecl): Don't consider a declaration of a
1283 function named "main" to be an overload of a type named "main".
1284 * parser.c (cp_parser_template_name): Perform name lookup when the
1285 template name is proceeded by "template" if the qualifying scope
1287 * typeck.c (composite_pointer_type_r): Correctly handle
1288 pointer-to-member types.
1289 (build_const_cast): Likewise.
1291 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1293 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
1294 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
1295 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
1296 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
1297 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
1298 (TYPEOF_TYPE_EXPR): New macro.
1299 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
1300 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
1301 * pt.c (tsubst): Likewise.
1302 * semantics.c (finish_typeof): Likewise.
1303 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
1304 and TEMPLATE_TYPE_PARM.
1305 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
1306 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
1308 2004-03-16 Mark Mitchell <mark@codesourcery.com>
1311 * cp-tree.h (build_new_op): Change prototype.
1312 (build_x_binary_op): Likewise.
1313 * call.c (build_new_op): Add overloaded_p parameter.
1314 * decl2.c (grok_array_decl): Adjust call to build_new_op.
1315 * parser.c (cp_parser_binary_expression): Note that uses of
1316 overloaded operators prevents an expression from being considered
1317 an integral constant.
1318 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
1320 * semantics.c (finish_call_expr): Likewise.
1321 * typeck.c (rationalize_conditional_expr): Likewise.
1322 (build_x_indirect_ref): Likewise.
1323 (build_x_binary_op): Likewise.
1324 (build_x_unary_op): Likewise.
1325 (build_x_compound_expr): Likewise.
1326 (build_modify_expr): Likewise.
1327 * typeck2.c (build_x_arrow): Likewise.
1329 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
1331 * cp-lang.c, ptree.c: Update copyright.
1333 2004-03-13 Mark Mitchell <mark@codesourcery.com>
1336 * parser.c (cp_parser_non_integral_constant_expression): Encode
1337 more of the idiom that surrounded calls to this function within
1339 (cp_parser_primary_expression): Adjust accordingly.
1340 (cp_parser_postfix_expression): Likewise.
1341 (cp_parser_unary_expression): Likewise.
1342 (cp_parser_cast_expression): Likewise.
1343 (cp_parser_assignment_expression): Likewise.
1344 (cp_parser_expression): Likewise.
1345 (cp_parser_new_expression): Note that new-expressions are not
1346 allowed in integral constant expressions.
1347 (cp_parser_delete_expression): Likewise.
1349 2004-03-12 Matt Austern <austern@apple.com>
1351 * decl2.c (maybe_make_one_only): Look at
1352 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
1353 to make an explicit instantiation weak.
1354 * method.c (use_thunk): Make sure we call comdat_linkage
1356 * pt.c (do_type_instantiation): On systems where weak symbols
1357 don't go in a static archive's TOC, explicit instantiation of a
1358 class must imply *explicit* instantiation of its memeber.
1360 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
1362 * call.c, cp-tree.h, pt.c: Fix comment typos.
1364 2004-03-10 Mark Mitchell <mark@codesourcery.com>
1367 * decl.c (xref_tag): Disregard non-type declarations when
1368 looking up a tagged type.
1370 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
1373 * call.c (convert_like_real): Build a const qualified temporary,
1374 when testing ctor access.
1376 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1378 * call.c (initialize_reference): Fix typo.
1380 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1383 * pt.c (determine_specialization): For member templates, match also
1387 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
1389 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
1391 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1394 * call.c (initialize_reference): Handle initializers that are
1395 class-member access expressions applies to rvalues.
1397 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1400 * name-lookup.c (supplement_binding): Ignore functions that are
1401 marked DECL_ANTICIPATED.
1403 2004-03-08 Mark Mitchell <mark@codesourcery.com>
1406 * class.c (check_field_decls): Complain about non-static data
1407 members of reference type in unions. Propagate
1408 CLASSTYPE_REF_FIELDS_NEED_INIT and
1409 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
1411 * init.c (perform_member_init): Complain about mbmers with const
1412 type that are not explicitly initialized.
1414 2004-03-08 Mark Mitchell <mark@codesourcery.com>
1416 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
1417 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
1418 (lang_identifier): Remove implicit_decl and error_locus.
1419 (IDENTIFIER_IMPLICIT_DECL): Remove.
1420 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
1421 (IDENTIFIER_ERROR_LOCUS): Likewise.
1422 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
1423 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
1424 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
1425 (implicitly_declare): Remove.
1426 * decl.c (warn_extern_redeclared_static): Remove check of
1427 IDENTIFIER_IMPLICIT_DECL.
1428 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
1429 (implicitly_declare): Remove.
1430 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
1431 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
1432 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
1433 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
1434 in the innermost scope, rather than at namespace scope.
1435 * name-lookup.c (push_local_binding): Give it external linkage.
1436 (pushdecl): Remove dead code.
1437 * name-lookup.h (push_local_binding): Declare it.
1438 * ptree.c (cxx_print_identifier): Don't print
1439 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
1440 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
1441 not IDENTIFIER_ERROR_LOCUS.
1442 * typeck.c (build_function_call): Remove dead code.
1444 2004-03-08 Jason Merrill <jason@redhat.com>
1447 * decl.c (xref_tag): Remove attribute handling.
1448 * cp-tree.h: Adjust prototype.
1449 * decl.c, parser.c, rtti.c: Adjust callers.
1450 * parser.c (cp_parser_class_head): Pass back attributes in the
1452 (cp_parser_class_specifier): Adjust.
1454 2004-03-08 Matt Austern <austern@apple.com>
1457 * name-lookup.c (add_decl_to_level): Add extern variables, as well
1458 as static, to static_decls array.
1460 2004-03-05 Jason Merrill <jason@redhat.com>
1462 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
1464 2004-03-04 Geoffrey Keating <geoffk@apple.com>
1466 * decl.c (grokfndecl): Update old incorrect comment.
1467 (grokvardecl): Diagnose C++ variables of type with no linkage.
1469 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1472 * pt.c (build_non_dependent_expr): Do not create a
1473 NON_DEPENDENT_EXPR for a THROW_EXPR.
1475 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
1478 * error.c (dump_expr): Handle THROW_EXPR.
1480 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1483 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
1484 lookup if ordinary name-lookup finds a non-function.
1485 * pt.c (tsubst_copy_and_build): Likewise.
1488 * parser.c (cp_parser_late_parsing_default_args): Check that there
1489 are no extra tokens after the end of the default-argument
1492 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1495 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
1496 having C++ linkage for name-mangling purposes.
1499 * parser.c (cp_parser_direct_declarator): Recognize constructor
1500 declarators that use a template-id to name the class being
1504 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
1505 (tsubst_expr): Do not call tsubst_copy, even when
1506 processing_template_decl.
1508 2004-03-01 Jeff Law <law@redhat.com>
1510 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
1513 2004-02-29 Mark Mitchell <mark@codesourcery.com>
1516 * name-lookup.h (push_scope): Change prototype.
1517 * name-lookup.c (push_scope): Do not reenter the current class
1519 * decl.c (grokfndecl): Check return code from push_scope before
1521 * decl2.c (check_classfn): Likewise.
1522 * parser.c (cp_parser_conversion_function_id): Likewise.
1523 (cp_parser_init_declarator): Likewise.
1524 (cp_parser_direct_declarator): Likewise.
1525 (cp_parser_class_specifier): Likewise.
1526 (cp_parser_class_head): Likewise.
1527 (cp_parser_lookup_name): Likewise.
1528 (cp_parser_constructor_declarator_p): Likewise.
1529 * pt.c (instantiate_class_template): Likewise.
1530 (resolve_typename_type): Likewise.
1532 2004-02-29 Mark Mitchell <mark@codesourcery.com>
1535 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
1539 * class.c (update_vtable_entry_for_fn): Do not go through
1540 covariance machinery if the type returned by an overrider is the
1541 same as the original.
1543 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
1545 * call.c: Fix a comment typo.
1547 2004-02-27 Ziemowit Laski <zlaski@apple.com>
1549 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
1551 2004-02-26 Mark Mitchell <mark@codesourcery.com>
1554 * parser.c (cp_parser_parameter_declaration_list): Commit
1555 to fewer tentative parses.
1557 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1560 * pt.c (dependent_type_p_r): A template template parameter is a
1563 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1566 * mangle.c (write_template_arg_literal): Don't rely on identity for
1569 2004-02-24 Jason Merrill <jason@redhat.com>
1571 * tree.c (build_exception_variant): Use check_qualified_type.
1573 2004-02-23 Zack Weinberg <zack@codesourcery.com>
1574 Kazu Hirata <kazu@cs.umass.edu>
1576 * decl.c (cxx_init_decl_processing): Don't check
1577 flag_writable_strings.
1579 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
1582 * typeck.c (maybe_warn_about_returning_address_of_location):
1583 Change check for VAR_DECL to use DECL_P instead.
1585 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1588 * cvt.c (build_expr_type_conversion): Type must be complete before
1589 looking up for conversions.
1591 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1594 * name-lookup.c (arg_assoc_class): Don't look into template
1595 arguments if it is not a primary template.
1597 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1600 * method.c (use_thunk): Always clone function argument tree.
1602 2004-02-20 Mark Mitchell <mark@codesourcery.com>
1605 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
1608 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
1609 for all type variants.
1611 2004-02-19 Mark Mitchell <mark@codesourcery.com>
1614 * decl.c (duplicate_decls): Return error_mark_node for invalid
1616 * name-lookup.c (push_namespace): Ignore the return value from
1618 * pt.c (push_template_decl_real): Robustify.
1621 * name-lookup.c (push_class_level_binding): Do not complain about
1622 adding a binding for a member whose name is the same as the
1623 enclosing class if the member is located in a base class of the
1626 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1629 * parser.c (cp_parser_new_expression): Parse an ill-formed
1630 direct-new-declarator after a parenthesized type-id to emit good
1633 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
1635 * cp-tree.def, cvt.c: Update copyright.
1637 2004-02-17 Mark Mitchell <mark@codesourcery.com>
1640 * cp-tree.h (abi_version_at_least): Remove.
1641 * mangle.c: Include flags.h.
1643 2004-02-15 Mark Mitchell <mark@codesourcery.com>
1646 * call.c (build_conditional_expr): Handle conversions between
1647 class types which result in differently cv-qualified type
1651 * class.c (delete_duplicate_fields_1): Remove.
1652 (delete_duplicate_fields): Likewise.
1653 (finish_struct_anon): Remove check for members with the same name
1654 as their enclosing class.
1655 (check_field_decls): Do not call duplicate_fields.
1656 * decl.c (grokdeclarator): Remove check for static data members
1657 with the same name as their enclosing class.
1658 * name-lookup.c (push_class_level_binding): Check for members with
1659 the same name as their enclosing class.
1661 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
1664 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
1666 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1669 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
1670 has full set of arguments.
1672 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1675 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
1677 2004-02-13 Mark Mitchell <mark@codesourcery.com>
1680 * cp-tree.h (delete_sanity): Change prototype.
1681 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
1682 Remove dead code. Adjust code to warn about deleting an array.
1683 * typekc.c (decay_conversion): Use build_address and build_nop.
1686 * search.c (accessible_p): Do not check access in thunks.
1689 * call.c (build_conditional_expr): Call force_rvalue on the
1690 non-void operand in the case that one result is a throw-expression
1691 and the other is not.
1693 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
1696 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
1697 the type name and look ahead for ::~, and bail out early with a
1698 better error message if the parse is going to fail.
1700 2004-02-12 Mark Mitchell <mark@codesourcery.com>
1702 * call.c (conversion_kind): New type.
1703 (conversion_rank): Likewise.
1704 (conversion): Likewise.
1705 (CONVERSION_RANK): New macro.
1706 (conversion_obstack): New variable.
1707 (obstack_initialized): Likewise.
1708 (z_candidate): Change type of convs and second_conv.
1709 (candidate_warning): New type.
1710 (IDENTITY_RANK): Remove.
1711 (EXACT_RANK): Likewise.
1712 (PROMO_RANK): Likewise.
1713 (STD_RANK): Likewise.
1714 (PBOOL_RANK): Likewise.
1715 (USER_RANK): Likewise.
1716 (ELLIPSIS_RANK): Likewise.
1717 (BAD_RANK): Likewise.
1718 (ICS_RANK): Likewise.
1719 (ICS_STD_RANK): Likewise.
1720 (ICS_USER_FLAG): Likewise.
1721 (ICS_ELLIPSIS_FLAG): Likewise.
1722 (ICS_THIS_FLAG): Likewise.
1723 (ICS_BAD_FLAG): Likewise.
1724 (NEED_TEMPORARY_P): Likewise.
1725 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
1726 (USER_CONV_CAND): Likewise.
1727 (USER_CONV_FN): Likewise.
1728 (conversion_obstack_alloc): New function.
1729 (alloc_conversion): Likewise.
1730 (validate_conversion_obstack): Likewise.
1731 (alloc_conversions): Likewise.
1732 (build_conv): Adjust to deal with new conversion data structures.
1733 (build_identity_conv): New function.
1734 (build_ambiguous_conv): Likewise.
1735 (standard_conversion): Adjust to deal with new conversion data
1737 (convert_class_to_reference): Likewise.
1738 (direct_reference_binding): Likewise.
1739 (reference_binding): Likewise.
1740 (implicit_conversion): Likewise.
1741 (add_candidate): Likewise.
1742 (add_function_candidate): Likewise.
1743 (add_conv_candidate): Likewise.
1744 (build_builtin_candidate): Likewise.
1745 (print_z_candidate): Likewise.
1746 (merge_conversion_sequences): Likewise.
1747 (build_user_type_conversion_1): Likewise.
1748 (build_user_type_conversion): Likewise.
1749 (build_new_function_call): Likewise.
1750 (build_object_call): Likewise.
1751 (conditional_conversion): Likewise.
1752 (build_conditional_expr): Likewise.
1753 (build_new_op): Likewise.
1754 (build_op_delete_call): Likewise.
1755 (convert_like_real): Likewise.
1756 (build_over_call): Likewise.
1757 (build_new_method_call): Likewise.
1758 (is_subseq): Likewise.
1759 (maybe_handle_implicit_object): Likewise.
1760 (maybe_handle_ref_bind): Likewise.
1761 (compare_ics): Likewise.
1762 (source_type): Likewise.
1763 (add_warning): Likewise.
1765 (can_convert_arg): Likewise.
1766 (can_convert_arg_bad): Likewise.
1767 (perform_implicit_conversion): Likewise.
1768 (perform_direct_initialization_if_possible): Likewise.
1769 (initialize_reference): Likewise.
1770 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
1771 * cp-tree.def (WRAPPER): Likewise.
1772 (IDENTITY_CONV): Remove.
1773 (LVALUE_CONV): Likewise.
1774 (QUAL_CONV): Likewise.
1775 (STD_CONV): Likewise.
1776 (PTR_CONV): Likewise.
1777 (PMEM_CONV): Likewise.
1778 (BASE_CONV): Likewise.
1779 (REF_BIND): Likewise.
1780 (USER_CONV): Likewise.
1781 (AMBIG_CONV): Likewise.
1782 (RVALUE_CONV): Likewise.
1783 * cp-tree.h (tree_wrapper): Remove.
1784 (WRAPPER_ZC): Remove.
1785 (lang_tree_node): Remove wrapper.
1786 (LOOKUP_SPECULATIVELY): Remove.
1787 (build_op_delete_call): Adjust prototype.
1788 (validate_conversion_obstack): Declare.
1789 (build_zc_wrapper): Remove.
1790 * cvt.c (convert_to_reference): Remove dead code.
1791 (ocp_convert): Likewise.
1792 * decl.c (redeclaration_error_message): Correct handling of
1794 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
1795 (cp_tree_node_structure): Remove WRAPPER case.
1796 * decl2.c (finish_file): Call validate_conversion_obstack.
1797 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
1798 (build_op_delete_call): Likewise.
1799 (build_x_delete): Likewise.
1800 (build_delete): Adjust call to build_op_delete_call.
1801 * pt.c (tsubst_friend_declaration): Adjust code to determine
1802 whether or not a friend template is a definition.
1803 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
1804 * tree.c (build_zc_wrapper): Remove.
1806 2004-02-12 Zack Weinberg <zack@codesourcery.com>
1808 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
1809 * cp-tree.h: Don't declare cxx_builtin_type_decls.
1810 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
1811 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
1813 2004-02-10 Mark Mitchell <mark@codesourcery.com>
1815 * typeck.c (lookup_destructor): Fix typo in error message.
1817 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
1819 * call.c, parser.c, tree.c: Fix comment typos.
1821 2004-02-07 Zack Weinberg <zack@codesourcery.com>
1824 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
1825 * decl.c (duplicate_decls, start_function): Likewise.
1827 2004-02-07 Zack Weinberg <zack@codesourcery.com>
1829 * name-lookup.c (pushdecl): Issue shadow warnings directly.
1830 * parser.c (free_parser_stacks): Delete.
1832 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
1834 * rtti.c: Update copyright.
1836 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1839 * decl.c (require_complete_types_for_parms): Do not insert
1840 error_mark_node in the parameter list.
1842 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1845 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
1846 error when terminator can not be found.
1848 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
1850 Make-lang.in (po-generated): Delete.
1852 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
1854 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
1855 targetm.calls.promote_prototypes.
1857 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1861 2004-01-15 Geoffrey Keating <geoffk@apple.com>
1863 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
1864 (handle_pragma_implementation): Likewise.
1866 2004-02-05 Mark Mitchell <mark@codesourcery.com>
1869 * typeck.c (lookup_destructor): Tweak error message.
1871 2004-02-05 Jan Hubicka <jh@suse.cz>
1873 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
1876 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1879 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
1880 code, only emits the diagnostic now. Added lookup of the identifier
1881 and support for qualified ids.
1882 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
1883 Parse an (invalid) type name as id-expression within a declarator.
1884 (cp_parser_simple_declaration): Use it.
1885 (cp_parser_member_declaration): Likewise.
1886 (cp_parser_make_typename_type): New function. Handle errors through
1887 cp_parser_diagnose_invalid_typename.
1888 (cp_parser_elaborated_type_specifier): Use it.
1890 2004-02-04 Mark Mitchell <mark@codesourcery.com>
1893 * call.c (convert_like_real): Use "converting" rather than
1894 "argument" as the descriptive keyword to
1895 dubious_conversion_warnings.
1896 * typeck.c (convert_for_assignment): Do not call
1897 dubious_conversion_warnings.
1899 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1902 * init.c (build_delete): Emit a more informative error message in
1903 case of an incomplete type, and on the correct source line.
1905 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
1907 * error.c, search.c: Update copyright.
1909 2004-02-04 Mark Mitchell <mark@codesourcery.com>
1912 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
1913 linkage for the typeinfo name string.
1915 2004-02-04 Mark Mitchell <mark@codesourcery.com>
1918 * cp-tree.h (fold_non_dependent_expr): New function.
1919 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
1920 (cp_parser_template_argument): Use fold_non_dependent_expr.
1921 (cp_parser_direct_declarator): Likewise.
1922 * pt.c (fold_non_dependent_expr): New function.
1923 (convert_nontype_argument): Use it.
1924 (tsubst_qualified_id): Simplify.
1925 (tsubst_copy_and_build): Likewise.
1927 2004-02-04 Mark Mitchell <mark@codesourcery.com>
1929 * decl.c (cxx_push_function_context): Do not set
1930 current_function_is_thunk.
1931 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
1934 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1937 * pt.c (more_specialized_class): Increase processing_template_decl
1938 while partial ordering.
1940 2004-02-03 Mark Mitchell <mark@codesourcery.com>
1943 * decl.c (start_function): Do not call pushdecl for any
1944 instantiation or specialization of a primary template.
1946 2004-02-03 Mark Mitchell <mark@codesourcery.com>
1949 * parser.c (cp_parser_class_name): Robustify.
1952 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
1955 * semantics.c (finish_id_expression): Do not return an
1956 IDENTIFIER_NODE when lookup finds a PARM_DECL.
1958 2004-02-03 Mark Mitchell <mark@codesourcery.com>
1961 * pt.c (build_non_dependent_expr): Do not build
1962 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
1965 * semantics.c (finish_id_expression): Do not return an
1966 IDENTIFIER_NODE when lookup finds a VAR_DECL.
1969 * parser.c (cp_parser_simple_declaration): When skipping to the
1970 end of the statement swallow the terminating semicolon.
1972 2004-02-02 Mark Mitchell <mark@codesourcery.com>
1975 * init.c (build_offset_ref): Improve error recovery for invalid
1976 uses of non-static member functions.
1979 * cp-tree.h (cp_build_type_attribute_variant): New function.
1980 * class.c (build_clone): Use cp_build_type_attribute_variant.
1981 * decl.c (duplicate_decls): Likewise.
1982 * pt.c (copy_default_args_to_explicit_spec): Likewise.
1983 (tsubst_function_type): Likewise.
1984 * tree.c (build_exception_variant): Check attributes before
1985 concluding that two types are the same.
1986 (cp_build_type-attribute_variant): New method.
1987 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
1990 * call.c (convert_class_to_reference): Keep better track of
1991 pedantically invalid user-defined conversions.
1993 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1996 * pt.c (tsubst_qualified_id): Improved error message when a type
1997 is expected but not found.
1999 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
2001 * class.c: Fix comment typos.
2003 * error.c: Likewise.
2004 * parser.c: Likewise.
2006 * search.c: Likewise.
2007 * typeck.c: Likewise.
2009 2004-01-30 Richard Henderson <rth@redhat.com>
2012 * method.c (use_thunk): Don't force_target_expr for void thunks.
2013 * tree.c (build_target_expr_with_type): Assert non-void type.
2014 (force_target_expr): Likewise.
2016 2004-01-30 Michael Matz <matz@suse.de>
2018 * parser.c (cp_parser_labeled_statement): Accept case ranges.
2020 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2024 * decl.c (grokdeclarator): Check immediatly type completeness for
2025 non-dependent types.
2027 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2030 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
2031 a sizeof expression.block
2033 2004-01-29 Mark Mitchell <mark@codesourcery.com>
2036 * mangle.c (write_encoding): Correct encoding of member template
2039 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2041 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
2042 template name as it was `<::' (digraph typo).
2043 (cp_parser_nth_token_starts_template_argument_list_p): New function.
2044 (cp_parser_id_expression): Use it.
2045 (cp_parser_nested_name_specifier_opt): Likewise.
2046 (cp_parser_template_name): Likewise.
2047 (cp_parser_class_name): Likewise.
2048 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
2050 2004-01-28 Mark Mitchell <mark@codesourcery.com>
2053 * typeck.c (merge_types): Do not merge attributes into
2057 * parser.c (cp_parser_direct_declarator): Do not prevent
2058 backtracking inside a parenthesized declarator.
2059 (cp_parser_parameter_declaration): Fix typo in comment.
2061 2004-01-28 Jan Hubicka <jh@suse.cz>
2063 * semantics.c (expand_body) Do emit_associated_thunks before
2066 2004-01-27 Devang Patel <dpatel@apple.com>
2068 * name-lookup.c: Include "debug.h"
2069 (do_namespace_alias): Invoke debug_hooks to emit debug info
2070 for namespace alias.
2071 (do_local_using_decl): Invoke debug_hooks to emit debug info
2073 (do_class_using_decl): Same.
2074 (do_toplevel_using_decl): Same.
2075 (do_using_directive): Same.
2076 (cp_emit_debug_info_for_using): New function.
2077 * Make-lang.in (cp/parser.o): Depend on debug.h
2078 (cp/name-lookup.o): Same.
2080 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2082 * cp-tree.h (language_function, lang_type_header): Use
2084 * name-lookup.h (cp_binding_level): Likewise.
2086 2004-01-26 Mark Mitchell <mark@codesourcery.com>
2089 * semantics.c (finish_for_expr): Check for unresolved overloaded
2092 * class.c (add_method): Just check processing_template_decl to
2093 determine whether or not we are within a template.
2094 * decl2.c (maybe_retrofit_in_chrg): Likewise.
2095 * init.c (decl_constant_value): Check the type of the declaration,
2097 * name-lookup.c (maybe_push_to_top_level): Rename to ...
2098 (push_to_top_level): ... this.
2099 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
2100 * pt.c (push_template_decl_real): Reorder condition for speed.
2101 (convert_template_argument): Use dependency-checking functions in
2102 place of uses_template_parms.
2103 (lookup_template_class): Avoid calling uses_template_parms more
2105 (uses_template_parms): Reimplement, using dependency-checking
2107 (instantiate_class_template): Use push_to_top_level, not
2108 maybe_push_to_top_level.
2109 (type_unification_real): Simplify.
2110 (type_dependent_expression_p): Handle OFFSET_REFs and
2112 (any_dependent_template_arguments_p): Handle multiple levels of
2114 * semantics.c (expand_or_defer_fn): Do not check
2115 uses_template_parms for template instantiations.
2116 * typeck.c (comptypes): Avoid calling cp_type_quals.
2118 2004-01-25 Mark Mitchell <mark@codesourcery.com>
2121 * call.c (build_over_call): Do not convert arguments when
2122 processing a template.
2123 * pt.c (build_non_dependent_expr): Do not build a
2124 NON_DEPENDENT_EXPR for arithmetic constants.
2126 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2129 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
2130 returns a TYPE_DECL. no further lookup is required.
2131 * semantics.c (check_template_template_default_arg): A TYPE_DECL
2132 is invalid. Rework to give better diagnostics.
2134 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2137 * pt.c (instantiate_class_template): Add an error_mark_node
2139 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
2141 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
2144 * decl.c (finish_function): Move the call to
2145 finish_fname_decls below the call to
2146 finish_eh_spec_block.
2148 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
2150 * optimize.c, typeck2.c: Update copyright.
2152 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
2154 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
2155 init.c, mangle.c, typeck.c: Update copyright.
2157 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
2159 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
2161 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2163 * Make-lang.in: Replace $(docdir) with doc.
2164 (c++.info, c++.srcinfo): Dummy entry.
2165 (c++.man, c++.srcman): New rules.
2166 (c++.install-man): Revamp rule.
2168 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2170 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
2171 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
2172 immediate $(shell) instead of deferred backquote.
2174 2004-01-19 Mark Mitchell <mark@codesourcery.com>
2177 * parser.c (cp_parser_postfix_expression): When encountering
2178 incomplete type on left-hand side of "->" or ".", treat the entire
2179 expression as erroneous.
2182 * call.c (build_field_call): Remove.
2183 (n_build_method_call): Likewise.
2184 (build_method_call): Likewise.
2185 (build_new_method_call): Do not call build_field_call.
2186 * class.c (n_build_method_call): Remove.
2187 (print_class_statistics): Do not print it.
2188 * cp-tree.h (build_method_call): Remove declaration.
2189 (finish_object_call_expr): Likewise.
2190 (build_new_1): Do not use build_method_call.
2191 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
2192 when the function appearing on the right-hand-side of "." or "->"
2193 is not actually a function.
2194 * pt.c (tsubst_copy_and_build): Likewise.
2195 * semantics.c (finish_object_call_expr): Remove.
2197 2004-01-18 Mark Mitchell <mark@codesourcery.com>
2200 * pt.c (tsubst): Use finish_typeof.
2202 2004-01-18 Jason Merrill <jason@redhat.com>
2205 * except.c (build_throw): In a template, set
2206 current_function_returns_abnormally.
2208 2004-01-17 Fred Fish <fnf@intrinsity.com>
2211 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
2212 except don't call array_type_nelts() with a VECTOR_TYPE.
2214 2004-01-16 Jan Hubicka <jh@suse.cz>
2216 * mangle.c (write_mangled_name): Remove inline modifier.
2218 2004-01-16 Mark Mitchell <mark@codesourcery.com>
2221 * decl.c (compute_array_index_type): Fix grammar in comment.
2222 * init.c (build_zero_init): Handle zero-sized arrays correctly.
2225 * call.c (name_as_c_string): Print conversion operator names
2229 * call.c (initialize_reference): Pass -1 for inner parameter to
2232 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2235 * parser.c (cp_parser_base_specifier): Check for an invalid
2236 keyword `typename' and emit an user-friendly error message.
2238 2004-01-15 Geoffrey Keating <geoffk@apple.com>
2241 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2242 (handle_pragma_implementation): Likewise.
2244 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2247 * typeck.c (build_class_member_access_expr): Allow to access members
2248 of the currently open class.
2249 (finish_class_member_access_expr): Likewise.
2251 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
2254 * name-lookup.c (validate_nonmember_using_decl): Take scope and
2255 name by value, instead of computing them.
2256 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
2257 arguments. Pass them to validate_nonmember_using_decl.
2258 * name-lookup.h (do_local_using_decl): Adjust.
2259 (do_toplevel_using_decl): Likewise.
2260 * parser.c (cp_parser_using_declaration): Likewise.
2261 * pt.c (tsubst_expr): Likewise.
2263 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
2267 * name-lookup.c (qualified_lookup_using_namespace): Search
2268 strongly-associated namespaces first, and only then try other
2271 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
2273 * Make-lang.in (c++.srcextra): Dummy entry.
2275 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2278 * parser.c (cp_parser_template_name): Don't try to parse a
2279 conversion-function-id, as it cannot be a template-name.
2280 (cp_parser_simple_type_specifier): Check for invalid template-ids
2281 even after a built-in type.
2283 2004-01-14 Jan Hubicka <jh@suse.cz>
2286 * pt.c (instantiate_decl): Do not increase function_depth.
2288 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
2292 * parser.c (cp_parser_elaborated_type_specifier): Warn about
2293 attributes and discard.
2294 * decl.c (xref_tag): Don't overwite existing attributes with
2297 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2300 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
2301 is no destructor while looking up a BIT_NOT_EXPR.
2303 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
2305 * cxxfilt.c: Remove unused file.
2307 2004-01-14 Jan Hubicka <jh@suse.cz>
2309 Partial fix to PR c++/12850
2310 * decl2.c (mark_used): Do not proactively instantiate templates
2311 when compiling in unit-at-a-time or not optimizing.
2312 * optimize.c (maybe_clone_body): Do not increase function depth.
2314 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2317 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
2319 2004-01-12 Steven Bosscher <stevenb@suse.de>
2322 * parser.c (cp_parser_member_declaration): Any non-type is also
2323 not a class or a function.
2325 2004-01-12 Jason Merrill <jason@redhat.com>
2328 * class.c (build_base_path): Do not mark vtable references as
2330 (build_vtbl_ref_1): Likewise.
2332 2004-01-12 Richard Henderson <rth@redhat.com>
2335 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
2336 (store_init_value): Use it.
2337 * decl.c (check_initializer): Expect full initialization code
2338 from store_init_value.
2339 * init.c (expand_aggr_init_1): Likewise.
2340 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
2342 2004-01-12 Mark Mitchell <mark@codesourcery.com>
2344 * class.c (layout_class_type): For non-POD class types, also copy
2345 the DECL_SIZE and DECL_MODE of fields to the base class type.
2347 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2350 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
2351 calling regenerate_decl_from_template.
2353 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
2356 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
2357 decl-specifier occurring along with a class definition.
2359 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
2361 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
2362 clauses to comments describing declares_class_or_enum.
2363 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
2366 2004-01-12 Jan Hubicka <jh@suse.cz>
2368 * pt.c (for_each_template_parm): Do not check for duplicates.
2369 (for_each_template_parm): Use walk_tree duplicate checking code.
2371 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
2374 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
2375 is error_mark_node, don't add any more decl_specs.
2376 (cp_parser_init_declarator): After committing to a declaration, if
2377 the decl_specifiers start with error_mark_node, issue an error and
2378 change the type to "int".
2380 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
2383 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
2385 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2389 * pt.c (tsubst): Substitution must fail if we are attempting to
2390 create an array with element type that is an abstract class type.
2391 * decl.c (cp_finish_decl): Strip pointers and array types recursively
2392 before calling abstract_virtuals_error.
2394 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
2396 * name-lookup.c (qualified_lookup_using_namespace): Consider
2397 strong using directives even if we've already found a binding.
2399 2004-01-09 Mark Mitchell <mark@codesourcery.com>
2401 * cp-tree.h (cxx_expand_expr): Change prototype.
2402 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
2404 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2407 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
2408 looking into them recursively. They can be there because of the
2409 new __offsetof__ extension.
2411 2004-01-07 Zack Weinberg <zack@codesourcery.com>
2413 * parser.c (cp_parser_save_member_function_body): Mark the
2416 2004-01-05 Mark Mitchell <mark@codesourcery.com>
2419 * class.c (build_clone): Copy type attributes from the original
2420 function to the clone.
2423 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
2424 references as constant.
2427 * parser.c (cp_parser_explicit_instantiation): Improve error
2429 (cp_parser_require): Improve indication of the error location.
2432 * parser.c (cp_parser_class_head): Reorder logic to check for
2433 invalid qualification.
2435 2004-01-04 Mark Mitchell <mark@codesourcery.com>
2438 * name-lookup.c (lookup_using_namespace): Remove spacesp
2440 (unqualified_namespace_lookup): Likewise.
2441 (lookup_qualified_name): Adjust accordingly.
2442 (lookup_name_real): Likewise.
2443 (lookup_arg_dependent): Do not eliminate the namespace of the
2444 functions found by unqualified name lookup unless that is the
2447 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
2449 * semantics.c (push_deferring_access_checks): Fix format.
2450 (resume_deferring_access_checks): Likewise.
2451 (stop_deferring_access_checks): Likewise.
2452 (pop_deferring_access_checks): Likewise.
2453 (get_deferred_access_checks): Likewise.
2454 (pop_to_parent_deferring_access_checks): Likewise.
2455 (perform_deferred_access_checks): Likewise.
2456 (perform_or_defer_access_check): Likewise.
2458 2004-01-04 Richard Henderson <rth@redhat.com>
2460 * call.c (build_over_call): Don't create a save_expr of an
2461 aggregate, but rather its address.
2463 2004-01-04 Mark Mitchell <mark@codesourcery.com>
2466 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
2467 an offsetof expression.
2469 * parser.c (cp_parser_parameter_declaration): Fix comment.
2472 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
2473 (reference_binding): Set it when appropriate.
2474 (build_temp): New function, split out from ...
2475 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
2476 (initialize_reference): Likewise.
2479 * parser.c (cp_parser): Add in_type_id_in_expr_p.
2480 (cp_parser_new): Initialize it.
2481 (cp_parser_postfix_expression): Set it.
2482 (cp_parser_sizeof_operand): Likewise.
2483 (cp_parser_parameteR_declaration): Do not commit early to tenative
2484 parsers when in_type_id_in_expr_p is set.
2486 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2489 * parser.c (cp_parser_template_argument): Don't call
2490 make_unbound_class_template directly.
2491 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
2492 UNBOUND_CLASS_TEMPLATE tree node.
2494 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
2497 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
2499 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2502 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
2503 (DECL_FUNCTION_TEMPLATE_P): Use it.
2504 (DECL_CLASS_TEMPLATE_P): Likewise.
2505 * parser.c (cp_parser_lookup_name): Add is_template parameter.
2506 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
2507 (cp_parser_template_name): Likewise.
2508 (cp_parser_elaborated_type_specifier): Likewise.
2509 (cp_parser_namespace_name): Likewise.
2510 (cp_parser_class_name): Likewise.
2511 (cp_parser_lookup_name_simple): Likewise.
2513 See ChangeLog.3 for earlier changes.