re PR c++/16193 (Bootstrap failure in libstdc++-v3)
[gcc.git] / gcc / cp / ChangeLog
1 2004-06-27 Mark Mitchell <mark@codesourcery.com>
2
3 PR c++/16193
4 * parser.c (cp_parser_set_decl_spec_type): Refine test for
5 redefinition of built-in types.
6
7 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
8
9 * error.c (pp_template_argument_list_start): Remove.
10 (pp_template_argument_list_end): Likewise.
11 (pp_separate_with_comma): Use pp_cxx_separate_with.
12 (reinit_global_formatting_buffer): Remove.
13 (pp_non_consecutive_character): Likewise.
14 (dump_scope): Use pp_cxx_colon_colon.
15 (dump_template_parameter): Use pp_cxx_identifier,
16 pp_cxx_tree_identifier and pp_cxx_whitespace.
17 (dump_templat_bindings): Replace use of pp_string with sequence
18 of pp_cxx_whitespace and pp_equal.
19 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
20 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
21 padding here.
22 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
23 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
24 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
25 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
26 pp_cxx_right_bracket, pp_cxx_identifier throughout,
27 (dump_decl): Likewise.
28 (dump_template_decl): Likewise.
29 (dump_function_decl): Likewise. Set padding as appropriate.
30 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
31 pp_cxx_right_paren.
32 (dump_exception_spec): Likewise.
33 (dump_function_name): Use pp_cxx_tree_identifier and
34 pp_cxx_identifier.
35 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
36 pp_cxx_end_template_argument_list.
37 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
38 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
39 pp_cxx_whitespace throughout.
40 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
41 pp_cxx_right_paren.
42 (dump_unary_op): Likewise.
43 (reinit_cxx_pp): New function.
44 (type_as_string); Use it.
45 (expr_as_string): Likewise.
46 (decl_as_string); Likewise.
47 (context_as_string): Likewise.
48 (lang_decl_name): Likewise.
49 (decl_to_string): Likewise.
50 (expr_to_string): Likewise.
51 (parm_to_string): Likewise.
52 (type_to_string): Likewise.
53 (args_to_string): Likewise.
54 (cv_to_string): Likewise.
55
56 2004-06-26 Mark Mitchell <mark@codesourcery.com>
57
58 * cp-tree.h (cp_cv_quals): New type.
59 (cp_declarator): Use it instead of "tree" as appropriate.
60 (grok_method_quals): Adjust prototype.
61 (grokclassfn): Likewise.
62 (do_friend): Likewise.
63 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
64 (grokdeclarator): Likewise.
65 * decl2.c (grok_method_quals): Likewise.
66 (grokclassfn): Likewise.
67 * friend.c (do_friend): Likewise.
68 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
69 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
70 (make_pointer_declarator): Likewise.
71 (make_reference_declarator): Likewise.
72 (make_ptrmem_declarator): Likewise.
73 (cp_parser_ptr_operator): Likewise.
74 (cp_parser_cv_qualifier_seq_opt): Likewise.
75 (cp_parser_cv_qualifier_opt): Remove.
76 (cp_parser_new_declarator_opt): Adjust call to
77 cp_parser_ptr_operator.
78 (cp_parser_conversion_declaration_opt): Likewise.
79 (cp_parser_declarator): Use cp_cv_quals, not tree.
80 (cp_parser_direct_declarator): Likewise.
81
82 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
83
84 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
85 Rename DECL_STMT to DECL_EXPR.
86 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
87 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
88 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
89
90 2004-06-26 Jan Hubicka <jh@suse.cz>
91
92 PR C++/14865
93 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
94 reachability analysis.
95
96 2004-06-25 Mark Mitchell <mark@codesourcery.com>
97
98 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
99 2004-06-23 change.
100
101 2004-06-25 Paul Brook <paul@codesourcery.com>
102
103 * decl2.c (get_guard): Call targetm.cxx.guard_type.
104 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
105
106 2004-06-24 Mark Mitchell <mark@codesourcery.com>
107
108 * decl.c (grokdeclarator): Restore error messages about __thread.
109 * parser.c (cp_parser_decl_specifier_seq): Likewise.
110
111 2004-06-24 Jason Merrill <jason@redhat.com>
112
113 PR c++/16115
114 * decl.c (grokparms): Give the PARM_DECL reference type if the
115 parameter is passed by invisible reference.
116
117 2004-06-24 Andreas Schwab <schwab@suse.de>
118
119 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
120
121 2004-06-23 Mark Mitchell <mark@codesourcery.com>
122
123 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
124 (cp/decl.o): Likewise.
125 (cp/decl2.o): Likewise.
126 (cp/pt.o): Likewise.
127 (cp/semantics.o): Likewise.
128 * config-lang.in (gtfiles): Do not reference cp/lex.h.
129 * class.c: Do not include lex.h.
130 (add_implicitly_declared_members): Do not use
131 adding_implicit_members.
132 (check_bases_and_members): Do not talk about grok_x_components.
133 * cp/cp-tree.h (adding_implicit_members): Remove.
134 (cp_storage_class): New type.
135 (cp_decl_spec): Likewise.
136 (cp_decl_specifier_seq): Likewise.
137 (cp_parameter_declarator): Use it for the decl_specifiers field.
138 (check_tag_decl): Adjust prototype.
139 (shadow_tag): Likewise.
140 (groktypename): Likewise.
141 (start_decl): Likewise.
142 (start_function): Likewise.
143 (start_method): Likewise.
144 (grok_x_components): Remove.
145 (grokfield): Adjust prototype.
146 (grokbitfield): Likewise.
147 (finish_member_class_template): Remove.
148 * decl.c: Do not include lex.h.
149 (adding_implicit_members): Do not define.
150 (check_tag_decl): Do not use trees to represent decl-specifiers.
151 (shadow_tag): Likewise.
152 (groktypename): Likewise.
153 (start_decl): Likewise.
154 (grokvardecl): Likewise.
155 (grokdeclarator): Likewise.
156 (grokparms): Likewise.
157 (start_function): Likewise.
158 (start_method): Likewise.
159 * decl.h (grokdeclarator): Adjust prototype.
160 * decl2.c: Do not include lex.h.
161 (grok_x_components): Remove.
162 (grokfield): Do not use trees to represent decl-specifiers.
163 (grokbitfield): Likewise.
164 * lex.c: Do not include lex.h.
165 * lex.h: Remove.
166 * parser.c: Include target.h.
167 (clear_decl_specs): New function.
168 (cp_parser_translation_unit): Do not use trees to represent
169 decl-specifiers.
170 (cp_parser_postfix_expression): Likewise.
171 (cp_parser_new_type_id): Likewise.
172 (cp_parser_condition): Likewise.
173 (cp_parser_simple_declaration): Likewise.
174 (cp_parser_decl_specifier_seq): Likewise.
175 (cp_parser_function_specifier_opt): Likewise.
176 (cp_parser_conversion_type_id): Likewise.
177 (cp_parser_template_parameter): Likewise.
178 (cp_parser_explicit_instantiation): Likewise.
179 (cp_parser_type_specifier): Likewise.
180 (cp_parser_simple_type_specifier): Likewise.
181 (cp_parser_init_declarator): Likewise.
182 (cp_parser_type_id): Likewise.
183 (cp_parser_type_specifier_seq): Likewise.
184 (cp_parser_parameter_declaration): Likewise.
185 (cp_parser_member_declaration): Likewise.
186 (cp_parser_exception_declaration): Likewise.
187 (cp_parser_function_definition_from_specifiers_and_declarator):
188 Likewise.
189 (cp_parser_single_declaration): Likewise.
190 (cp_parser_save_member_function_body): Likewise.
191 (cp_parser_friend_p): Likewise.
192 (cp_parser_set_storage_class): New function.
193 (cp_parser_set_decl_spec_type): Likewise.
194 * pt.c: Do not include lex.h.
195 * semantics.c: Likewise.
196 (finish_member_class_template): Remove.
197
198 2004-06-23 Roger Sayle <roger@eyesopen.com>
199
200 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
201 longer take both "args" and "convert_args" as arguments.
202 (build_op_delete_call): Update call to build_cxx_call.
203 (build_over_call): Likewise, update call to build_cxx_call.
204 * cp-tree.h (build_cxx_call): Update funtion prototype.
205 * typeck.c (build_function_call): Don't call expand_tree_builtin.
206 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
207 (throw_bad_typeid): Likewise.
208 (build_dynamic_cast_1): Likewise.
209
210 2004-06-22 Richard Henderson <rth@redhat.com>
211
212 * class.c (build_vfn_ref): Take a pointer not object. Build
213 an OBJ_TYPE_REF.
214 (cp_fold_obj_type_ref): New.
215 * call.c (build_over_call): Update build_vfn_ref call.
216 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
217 * cp-tree.h (cp_fold_obj_type_ref): Declare.
218
219 2004-06-21 Jason Merrill <jason@redhat.com>
220
221 PR c++/16112
222 * cp-gimplify.c (cp_gimplify_init_expr): Look through
223 CLEANUP_POINT_EXPR.
224
225 2004-06-21 Mark Mitchell <mark@codesourcery.com>
226
227 * cp-tree.def (NEW_EXPR): Add a fourth slot.
228 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
229 (TREE_PARMLIST): Likewise.
230 (CALL_DECLARATOR_PARMS): Likewise.
231 (CALL_DECLARATOR_QUALS): Likewise.
232 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
233 (cp_declarator_kind): New type.
234 (cp_parameter_declarator): Likewise.
235 (cp_declarator): Likewise.
236 (cp_error_declarator): Likewise.
237 (no_parameters): Likewise.
238 (groktypename): Change prototype.
239 (start_decl): Likewise.
240 (start_handler_parms): Likewise.
241 (get_scope_of_declarator): Likewise.
242 (start_function): Likewise.
243 (start_preparsed_function): New function.
244 (start_function): Change prototype.
245 (start_method): Likewise.
246 (grokfield): Likewise.
247 (grokbitfield): Likewise.
248 (build_new): Likewise.
249 (make_pointer_declarator): Remove.
250 (make_reference_declarator): Likewise.
251 (make_call_declarator): Likewise.
252 (set_quals_and_spec): Likewise.
253 (process_template_parm): Change prototype.
254 (begin_function_definition): Remove.
255 (finish_parmlist): Remove.
256 * decl.c (groktypename): Do not use trees to represent
257 declarators.
258 (start_decl): Likewise.
259 (start_handler_parms): Remove.
260 (get_scope_of_declarator): Reimplement.
261 (grokdeclarator): Do not use trees to represent declarators.
262 (grokparms): Likewise.
263 (start_function): Likewise.
264 (start_method): Likewise.
265 (build_void_list_mode): Do not use TREE_PARMLIST.
266 * decl.h (grokdeclarator): Change prototype.
267 * decl2.c (grok_method_quals): Robustify.
268 (grok_x_components): Do not use trees to represent declarators.
269 (grokfield): Likewise.
270 (grokbitfield): Likewise.
271 (start_objects): Build FUNCTION_DECLs, not declarators.
272 (start_static_storage_duration_function): Likewise.
273 * init.c (build_new): Simplify.
274 * lex.c (make_pointer_declarator): Remove.
275 (make_reference_declarator): Likewise.
276 (make_call_declarator): Likewise.
277 (set_quals_and_spec): Likewise.
278 * method.c (use_thunk): Use start_preparsed_function.
279 (synthesize_method): Likewise.
280 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
281 * optimize.c (maybe_clone_body): Use start_preparsed_function.
282 * parser.c (cp_error_declarator): New variable.
283 (declarator_obstack): Likewise.
284 (alloc_declarator): New function.
285 (make_declarator): Likewise.
286 (make_id_declarator): Likewise.
287 (make_pointer_declarator): Likewise.
288 (make_reference_declarator): Likewise.
289 (make_ptrmem_declarator): Likewise.
290 (make_call_declarator): Likewise.
291 (make_array_declarator): Likewise.
292 (no_parameters): New variable.
293 (make_parameter_declarator): Likewise.
294 (cp_parser_check_for_definition_in_return_type): Do not use trees
295 to represent declarators.
296 (cp_parser_translation_unit): Likewise.
297 (cp_parser_new_expression): Likewise.
298 (cp_parser_new_type_id): Likewise.
299 (cp_parser_new_declarator_opt): Likewise.
300 (cp_parser_direct_new_declarator): Likewise.
301 (cp_parser_condition): Likewise.
302 (cp_parser_declaration_statement): Likewise.
303 (cp_parser_declaration): Likewise.
304 (cp_parser_conversion_type_id): Likewise.
305 (cp_parser_conversion_declarator_opt): Likewise.
306 (cp_parser_template_parameter_list): Likewise.
307 (cp_parser_template_parameter): Likewise.
308 (cp_parser_explicit_instantiation): Likewise.
309 (cp_parser_init_declarator): Likewise.
310 (cp_parser_declarator): Likewise.
311 (cp_parser_direct_declarator): Likewise.
312 (cp_parser_type_id): Likewise.
313 (cp_parser_parameter_declaration_clause): Likewise.
314 (cp_parser_parameter_declaration_list): Likewise.
315 (cp_parser_parameter_declaration): Likewise.
316 (cp_parser_member_declaration): Likewise.
317 (cp_parser_exception_declaration): Likewise.
318 (cp_parser_check_declarator_template_parameters): Likewise.
319 (cp_parser_function_definition_from_specifiers_and_declarator):
320 Likewise.
321 (cp_parser_save_member_function_body): Likewise.
322 * pt.c (process_template_parm): Add is_non_type parameter.
323 (convert_template_argument): Adjust call to groktypename.
324 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
325 (tsubst): Do not expect declarators.
326 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
327 argument.
328 (instantiate_decl): Use start_preparsed_function.
329 * semantics.c (begin_function_definition): Remove.
330 (finish_parmlist): Remove.
331 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
332 declarators.
333
334 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
335
336 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
337 (build_new_method_call): Likewise.
338 * decl.c (local_variable_p_walkfn): Don't walk into types.
339 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
340 (build_anon_union_vars): Add new operand for COMPONENT_REF.
341 * init.c (buld_new): Add new operand for ARRAY_REF.
342 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
343 (do_build_assign_ref): Likewise.
344 * parser.c (cp_parser_direct_new_declarator): Add new operands
345 for ARRAY_REF.
346 (cp_parser_direct_declarator): Likewise.
347 * pt.c (tsubst): Likewise.
348 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
349 for COMPONENT_REF.
350 * semantics.c (finish_non_static_data_member): Add new operand
351 for COMPONENT_REF.
352 * typeck.c (build_class_member_access_expr): Likewise.
353 (build_class_member_access_expr, finish_class_member_access_expr):
354 Likewise.
355 (build_ptrmemfunc_access_expr): Likewise.
356 (build_array_ref): Add new operands for ARRAY_REF.
357 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
358 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
359
360 2004-06-21 Richard Henderson <rth@redhat.com>
361
362 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
363 * parser.c (cp_parser_jump_statement): Update commentary.
364 * pt.c (tsubst_expr): Use RETURN_EXPR.
365 * semantics.c (finish_return_stmt): Likewise.
366 (finalize_nrv_r): Likewise.
367 * typeck.c, typeck2.c: Update file start commentary.
368
369 2004-06-21 Richard Henderson <rth@redhat.com>
370
371 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
372
373 2004-06-20 Richard Henderson <rth@redhat.com>
374
375 * cp-tree.h (add_decl_stmt): Declare.
376 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
377 * semantics.c (maybe_cleanup_point_expr): New.
378 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
379 finish_for_expr, finish_switch_cond): Use it.
380 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
381
382 2004-06-20 Richard Henderson <rth@redhat.com>
383
384 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
385 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
386 (cp_gimplify_expr): Call it.
387 (gimplify_cleanup_stmt): Move from c-gimplify.c.
388 (cp_genericize): New.
389 * decl.c (finish_function): Call it.
390 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
391 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
392 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
393 (cp_genericize): Declare.
394 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
395 * dump.c (cp_dump_tree): Likewise.
396 * semantics.c (push_cleanup): Move from c-semantics.c.
397
398 2004-06-20 Zack Weinberg <zack@codesourcery.com>
399
400 * cp-lang.c (has_c_linkage): Implement.
401
402 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
403 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
404 (builtin_function_1): Don't call make_decl_rtl.
405 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
406 (grokvardecl): Don't call mangle_decl.
407 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
408 DECL_ASSEMBLER_NAME.
409 * method.c (set_mangled_name_for_decl): Delete.
410 * name-lookup.c (pushdecl): When a local extern shadows a
411 file-scope declaration of the same object, give both DECLs the
412 same DECL_UID.
413 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
414 on DECL_ASSEMBLER_NAME.
415
416 2004-06-19 Richard Henderson <rth@redhat.com>
417
418 * cp-gimplify.c: Remove unnecessary prototypes.
419 (cp_gimplify_stmt): Merge into ...
420 (cp_gimplify_expr): ... here. Move to end of file. Handle
421 stmts_are_full_exprs_p frobbing.
422 * cp-tree.h (cp_gimplify_stmt): Remove.
423 * pt.c (tsubst_expr): Merge prep_stmt and unify.
424 * tree.c (init_tree): Don't set lang_gimplify_stmt.
425
426 2004-06-18 Richard Henderson <rth@redhat.com>
427
428 PR c++/16034
429 * semantics.c (begin_cond): New.
430 (finish_cond): Rewrite to handle template DECL_STMTs specially.
431 Assume that non-template decls go land before the conditional.
432 (simplify_loop_decl_cond): Likewise.
433 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
434 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
435 begin_switch_stmt, finish_switch_cond): Update to match.
436
437 2004-06-17 Jason Merrill <jason@redhat.com>
438
439 PR c++/16015
440 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
441 (finish_stmt_expr_expr): Update type after conversions.
442 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
443 Handle void initializer.
444 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
445
446 2004-06-17 Geoffrey Keating <geoffk@apple.com>
447
448 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
449 * cp-tree.h (defer_fn): Delete.
450 * decl2.c (defer_fn): Delete.
451 (finish_file): Simplify deferred_fns loops; check that
452 only used inline functions get into deferred_fns.
453 (mark_used): Inline previous contents of defer_fn.
454
455 2004-06-16 Richard Henderson <rth@redhat.com>
456
457 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
458 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
459 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
460 of CTOR_INITIALIZER ...
461 (pp_cxx_statement): ... here.
462 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
463 (finish_function): Use alloc_stmt_list to zap entire function.
464 * parser.c (cp_parser_compound_statement): Update commentary.
465 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
466 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
467 (finish_stmt_expr): Don't look through COMPOUND_STMT.
468
469 2004-06-16 Geoffrey Keating <geoffk@apple.com>
470
471 * pt.c (mark_decl_instantiated): Don't call defer_fn.
472
473 2004-06-16 Richard Henderson <rth@redhat.com>
474
475 * parser.c (cp_parser_labeled_statement): Update commentary.
476 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
477 * tree.c (mark_local_for_remap_r): Likewise.
478
479 2004-06-16 Richard Henderson <rth@redhat.com>
480
481 * parser.c (cp_parser_asm_definition): Update commentary.
482 * pt.c (tsubst_expr): Use ASM_EXPR.
483 * semantics.c (finish_asm_stmt): Likewise.
484
485 2004-06-16 Richard Henderson <rth@redhat.com>
486
487 * decl.c (finish_destructor_body): Use LABEL_EXPR.
488 * parser.c (cp_parser_statement): Update commentary.
489 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
490 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
491 * tree.c (mark_local_for_remap_r): Likewise.
492
493 2004-06-16 Richard Henderson <rth@redhat.com>
494
495 PR c++/16012
496 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
497 statement in FOR_INIT_STMT for templates.
498
499 2004-06-15 Richard Henderson <rth@redhat.com>
500
501 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
502 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
503 (genericize_try_block): Use gimplify_stmt.
504 (genericize_catch_block, genericize_eh_spec_block): Likewise.
505 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
506 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
507 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
508 (cp_tree_chain_matters_p): Remove.
509 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
510 (COMPOUND_STMT_BODY_BLOCK): New.
511 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
512 (EXPR_STMT_STMT_EXPR_RESULT): New.
513 (building_stmt_tree): Check cur_stmt_list.
514 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
515 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
516 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
517 (cp_finish_decl): Use push_cleanup.
518 (start_function, finish_function): Use statement lists.
519 (finish_stmt): Do nothing.
520 * except.c (begin_eh_spec_block): Use statement lists.
521 (check_handlers_1, check_handlers): Likewise.
522 * init.c (construct_virtual_base): Don't add extra compound stmts.
523 (build_vec_init): Likewise.
524 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
525 * name-lookup.h (struct cp_binding_level): Add statement_list.
526 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
527 (cp_parser_labeled_statement, cp_parser_expression_statement,
528 cp_parser_statement_seq_opt): Likewise.
529 (cp_parser_compound_statement): Likewise. Take bool for try block.
530 (cp_parser_selection_statement): Tidy if processing.
531 (cp_parser_already_scoped_statement): Rewrite to do what it says.
532 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
533 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
534 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
535 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
536 (finish_cond): New, rewritten from FINISH_COND.
537 (simplify_loop_decl_cond): New.
538 (finish_expr_stmt): Avoid nested EXPR_STMTs.
539 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
540 begin_else_clause, finish_else_clause, finish_if_stmt,
541 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
542 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
543 finish_for_cond, finish_for_stmt, begin_switch_stmt,
544 finish_switch_cond, finish_switch_stmt, begin_try_block,
545 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
546 finish_handler_sequence, finish_function_handler_sequence,
547 begin_handler, finish_handler_parms, finish_handler,
548 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
549 using statement lists.
550 (begin_compound_stmt): Replace has_no_scope argument with flags.
551 Update all callers. Use statement lists.
552 (finish_compound_stmt): Likewise.
553 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
554 (current_scope_stmt_stack): Remove.
555 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
556 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
557 Rewrite with statement lists.
558
559 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
560
561 * parser.c: Change all assignments of c_lex_string_translate
562 to true and false to 1 and 0.
563 (cp_lexer_read_token): Convert type of the translated string.
564 (cp_parser_skip_to_closing_parentheses): Preserve original
565 value of c_lex_string_translate, and set it to -1 while
566 running.
567 (cp_parser_cache_group): Likewise.
568 (cp_parser_cache_group_1): Renamed.
569 (cp_parser_asm_operand_list): Remove redundant setting of
570 c_lex_string_translate.
571 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
572 Handle chained strings.
573
574 2004-06-12 Andrew Pinski <apinski@apple.com>
575
576 PR c++/14639
577 Revert:
578 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
579
580 * cp-tree.h: Fix typo.
581
582 * cp-tree.h: Include cgraph.h
583 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
584 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
585
586 2004-06-12 Jason Merrill <jason@redhat.com>
587
588 PR tree-optimization/14107
589 * decl.c (finish_function): Warn about no return in all functions.
590
591 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
592
593 * cp-tree.h (struct language_function): Remove cannot_inline.
594 * decl.c (save_function_data): cannot_inline is no more.
595 (cxx_push_function_context): Likewise.
596 * decl2.c (start_objects, start_static_storage_duration_function):
597 Reset DECL_INLINE, set DECL_UNINLINABLE.
598
599 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
600
601 PR c++/15967
602 * search.c (lookup_field): Propagate the ambiguity list.
603 (lookup_fnfields): Likewise.
604
605 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
606
607 PR c++/15947
608 * parser.c (cp_parser_template_name): Ctors/dtors never need a
609 template keyword to disambiguate.
610
611 2004-06-14 Mark Mitchell <mark@codesourcery.com>
612
613 PR c++/15096
614 * decl.c (grokdeclarator): Ignore pointer-to-members when
615 computing template depth.
616
617 PR c++/14930
618 * name-lookup.c (pushtag): Do not try to put class declarations in
619 explicit specialization scopes.
620
621 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
622
623 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
624
625 2004-06-11 Mark Mitchell <mark@codesourcery.com>
626
627 PR c++/15862
628 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
629 bindings for undeclared built-ins.
630
631 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
632
633 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
634 appear at the correct location.
635
636 2004-06-10 Jason Merrill <jason@redhat.com>
637
638 PR c++/15875
639 Revert:
640 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
641 * init.c (build_offset_ref): Build SCOPE_REF with non-null
642 TREE_TYPE for non-dependent names.
643 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
644 unknown_type_node as its TREE_TYPE.
645 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
646 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
647 (dump_expr) <SCOPE_REF case>: Likewise.
648
649 2004-06-10 Mark Mitchell <mark@codesourcery.com>
650
651 PR c++/15227
652 * parser.c (cp_parser_direct_declarator): Robustify.
653
654 PR c++/15877
655 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
656 constants in non-dependent contexts.
657
658 PR c++/14211
659 PR c++/15076
660 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
661 necessary.
662
663 2004-06-10 Jakub Jelinek <jakub@redhat.com>
664
665 PR c++/14791
666 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
667 specially.
668
669 2004-06-09 Mark Mitchell <mark@codesourcery.com>
670
671 Revert:
672 PR c++/15815
673 2004-06-07 Mark Mitchell <mark@codesourcery.com>
674 * lex.c (handle_pragma_interface): Deprecate.
675 (handle_pragma_implementation): Likewise.
676
677 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
678
679 * g++spec.c (lang_specific_driver): Remove check for -lm
680 and -lmath when check it see if it was the math library.
681
682 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
683
684 PR c++/7841
685 * parser.c (cp_parser_direct_declarator): Reject constructor named
686 as qualified template-id.
687
688 2004-06-07 Mark Mitchell <mark@codesourcery.com>
689
690 PR c++/15815
691 * lex.c (handle_pragma_interface): Deprecate.
692 (handle_pragma_implementation): Likewise.
693
694 2004-06-07 Mark Mitchell <mark@codesourcery.com>
695
696 PR c++/15766
697 * parser.c (cp_parser_iteration_statement): Fix typo in error
698 message.
699
700 PR c++/14777
701 * pt.c (tsubst_default_argument): Do not defer access checks
702 while substituting into the default argument.
703
704 PR c++/15554
705 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
706 constant in a non-dependent context.
707
708 PR c++/15057
709 * except.c (build_throw): Ensure that temp_expr has been
710 initialized.
711
712 2004-06-06 Roger Sayle <roger@eyesopen.com>
713
714 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
715
716 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
717
718 PR c++/15503
719 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
720 'typename', and accept 'template'.
721
722 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
723 Jan Hubicka <jh@suse.cz>
724
725 PR c++/14639
726 * method.c (use_think): Do not mark thunk as referenced.
727
728 2004-06-03 Matt Austern <austern@apple.com>
729
730 PR c++/15428
731 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
732 is nonzero, and if we see a noninline definition of a key method,
733 make the vtables nonweak.
734
735 2004-06-02 Matt Austern <austern@apple.com>
736
737 * cp-tree.h (instantiate_decl): new boolean parameter,
738 undefined_ok. Current behavior is equivalent to its being 0.
739 * decl2.c (mark_used): Add new argument when calling instantiate_decl
740 * pt.c (mark_decl_instantiated): Unconditionally make
741 instantiations explicit unconditionally
742 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
743 since mark_decl_instantiated now does it.
744 (instantiate_class_member): New. Instantiate a member of an
745 explicitly instantiated class template.
746 (do_type_instantiation): Explicitly instantiate members of an
747 explicitly instantiated class template.
748 (instantiate_decl): if undefined_ok is nonzero, and if we're
749 trying to explicitly instantiated a template with no definition,
750 change it to an implicit instantiation.
751 (instantiate_pending_templates): Add new argument to instantiate_decl.
752 * tree.c (cp_cannot_inline_tree_fn): Likewise.
753
754 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
755
756 * cp-tree.h: Fix typo.
757
758 * cp-tree.h: Include cgraph.h
759 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
760 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
761
762 2004-06-01 Jason Merrill <jason@redhat.com>
763
764 PR c++/15142
765 * call.c (call_builtin_trap): Remove type parm.
766 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
767 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
768
769 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
770
771 PR c++/13092
772 * init.c (build_offset_ref): Build SCOPE_REF with non-null
773 TREE_TYPE for non-dependent names.
774 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
775 unknown_type_node as its TREE_TYPE.
776 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
777 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
778 (dump_expr) <SCOPE_REF case>: Likewise.
779
780 2004-06-01 Richard Henderson <rth@redhat.com>
781 Andrew Pinski <pinskia@physics.uc.edu>
782
783 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
784 * parser.c (struct cp_parser): Remove in_offsetof.
785 (cp_parser_new): Don't set it.
786 (cp_parser_unary_expression): Don't check it.
787 (cp_parser_postfix_open_square_expression): Split out from ...
788 (cp_parser_postfix_expression): ... here.
789 (cp_parser_postfix_dot_deref_expression): Likewise.
790 (cp_parser_builtin_offsetof): New.
791 (cp_parser_primary_expression): Use it.
792
793 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
794
795 PR c++/14932
796 * parser.c (cp_parser_postfix_expression): Allow subscript
797 operator in offsetof.
798
799 2004-05-31 Mark Mitchell <mark@codesourcery.com>
800
801 PR c++/15701
802 * friend.c (add_friend): Do not try to perform access checks for
803 functions from dependent classes.
804
805 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
806
807 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
808 (pp_cxx_begin_template_argument_list): Turn into a function.
809 (pp_cxx_end_template_argument_list): Likewise.
810 (pp_cxx_separate_with): Define.
811 (pp_cxx_unqualified_id): Tidy.
812 (pp_cxx_primary_expression): Likewise.
813 (pp_cxx_postfix_expression): Likewise.
814 (pp_cxx_expression): Likewise.
815 (pp_cxx_simple_type_specifier): Likewise.
816 (pp_cxx_type_specifier_seq): Likewise.
817 (pp_cxx_parameter_declaration_clause): Likewise.
818 (pp_cxx_exception_specification): Likewise.
819 (pp_cxx_direct_declarator): Likewise.
820 (pp_cxx_type_id): Likewise.
821 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
822 cxx-pretty-print.c.
823 (pp_cxx_left_paren): Likewise.
824 (pp_cxx_right_paren): Likewise.
825 (pp_cxx_left_brace): Likewise.
826 (pp_cxx_right_brace): Likewise.
827 (pp_cxx_left_bracket): Likewise.
828 (pp_cxx_right_bracket): Likewise.
829 (pp_cxx_dot): Likewise.
830 (pp_cxx_identifier): Likewise.
831 (pp_cxx_tree_identifier): Likewise.
832 (pp_cxx_ampersand): New macro.
833 (pp_cxx_star): Likewise.
834 (pp_cxx_arrow): Likewise.
835 (pp_cxx_semicolon): Likewise.
836 (pp_cxx_complement): Likewise.
837 (pp_cxx_begin_template_argument_list): Declaree.
838 (pp_cxx_end_template_argument_list): Likewise.
839 (pp_cxx_colon_colon): likewise.
840
841 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
842
843 * parser.c (cp_parser_simple_type_specifier): Explicitly test
844 against NULL_TREE.
845
846 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
847
848 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
849 typeck.c: Fix comment formatting.
850
851 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
852
853 * cp-lang.c (cp_expand_decl): Remove.
854 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
855
856 2004-05-30 Andreas Jaeger <aj@suse.de>
857
858 * lang-specs.h: Add missing initializers for .ii.
859
860 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
861
862 * decl.c (cp_make_fname_decl): Free return value from
863 fname_as_string.
864
865 2004-05-28 Mark Mitchell <mark@codesourcery.com>
866
867 PR c++/15083
868 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
869 even in a templat.e
870 * init.c (build_new): Likewise.
871
872 PR c++/15640
873 * name-lookup.c (arg_assoc): Robustify.
874
875 PR c++/15471
876 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
877 when determining the scope to use for a pointer to member.
878 (lookup_anon_field): Give it external linkage.
879 * cp-tree.h (lookup_anon_field): Declare it.
880 * expr.c (cplus_expand_constant): Use it.
881
882 2004-05-28 Mark Mitchell <mark@codesourcery.com>
883
884 PR c++/14668
885 * parser.c (cp_parser_simple_type_specifier): Call
886 maybe_note_name_used_in_class.
887
888 2004-05-28 Tom Marshall <tmarshall@real.com>
889
890 PR c++/15214
891 * class.c (finish_struct_1): Warn only if the dtor is non-private or
892 the class has friends.
893
894 2004-05-27 Adam Nemet <anemet@lnxw.com>
895
896 PR c++/12883
897 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
898 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
899
900 2004-05-24 Geoffrey Keating <geoffk@apple.com>
901
902 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
903 if it might be needed.
904 * pt.c (mark_decl_instantiated): Only call defer_fn if
905 the function actually needs processing in finish_file.
906 * decl2.c (finish_file): Add check that elements in
907 deferred_fns_used are really needed there. Remove unnecessary
908 test of DECL_SAVED_TREE.
909
910 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
911
912 * Make-lang.in: No need to specify $(LIBCPP).
913
914 2004-05-23 Mark Mitchell <mark@codesourcery.com>
915
916 PR c++/15044
917 * parser.c (cp_parser_class_head): Robustify.
918
919 PR c++/15317
920 * parser.c (cp_parser_decl_specifier_seq): Correct error in
921 comment.
922 (cp_parser_constructor_declarator_p): Treat attributes
923 as decl-specifiers.
924
925 PR c++/15329
926 * typeck.c (build_unary_op): Do not attempt to resolve casts to
927 base classes in templates.
928
929 2004-05-23 Mark Mitchell <mark@codesourcery.com>
930
931 PR c++/15165
932 * pt.c (instantiate_template): Robustify.
933
934 2004-05-23 Mark Mitchell <mark@codesourcery.com>
935
936 PR c++/15025
937 * decl.c (xref_tag): Issue errors about redeclaring template
938 classes as non-template classes.
939
940 2004-05-23 Mark Mitchell <mark@codesourcery.com>
941
942 PR c++/14821
943 * name-lookup.c (supplement_binding): Allow redefinitions of
944 namespace aliases.
945
946 PR c++/14883
947 * parser.c (cp_parser_template_argument): Robustify.
948
949 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
950
951 * class.c (alter_access): Use %E format specifier to print an
952 identifier node. Avoid looking at the IDENTIFIER_POINTER.
953 (push_lang_context): Likewise.
954 * decl.c (lookup_label): Likewise.
955 (grokdeclarator): Likewise.
956 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
957 * pt.c (do_type_instantiation): Likewise.
958 * tree.c (handle_java_interface_attribute): Likewise.
959 (handle_com_interface_attribute): Likewise.
960 (handle_init_priority_attribute): Likewise.
961
962 2004-05-22 Mark Mitchell <mark@codesourcery.com>
963
964 PR c++/15285
965 PR c++/15299
966 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
967 recognized as overloaded functions.
968
969 2004-05-22 Mark Mitchell <mark@codesourcery.com>
970
971 PR c++/15507
972 * class.c (layout_nonempty_base_or_field): Do not try to avoid
973 layout conflicts for unions.
974
975 PR c++/15542
976 * typeck.c (build_x_unary_op): Instantiate template class
977 specializations before looking for "operator &".
978
979 PR c++/15427
980 * typeck.c (complete_type): Layout non-dependent array types, even
981 in templates.
982
983 PR c++/15287
984 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
985 template.
986
987 2004-05-22 Roger Sayle <roger@eyesopen.com>
988
989 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
990 returning when TREE_TYPE is error_mark_node.
991 * typeck.c (require_complete_type): Return error_mark_node if
992 value's type is an error_mark_node.
993
994 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
995
996 * optimize.c (calls_setjmp_r): Remove.
997 (calls_setjmp_p): Remove.
998 * cp-tree.c (calls_setjmp_p): Remove.
999 * decl.c (finish_function): Do not call calls_setjmp_p.
1000
1001 2004-05-18 Zack Weinberg <zack@codesourcery.com>
1002
1003 * decl.c (cp_finish_decl): Use mark_decl_referenced.
1004 * decl2.c (maybe_make_one_only): Likewise.
1005 * method.c (use_thunk): Likewise.
1006
1007 2004-05-18 Jason Merrill <jason@redhat.com>
1008
1009 * class.c (build_base_path): Tidy a bit.
1010
1011 2004-05-14 Geoffrey Keating <geoffk@apple.com>
1012
1013 * name-lookup.c (struct scope_binding): New.
1014 (EMPTY_SCOPE_BINDING): New.
1015 (lookup_using_namespace): Take a scope_binding instead of a
1016 cxx_binding.
1017 (qualified_lookup_using_namespace): Likewise.
1018 (cxx_binding_clear): Delete.
1019 (do_nonmember_using_decl): Use a scope_binding instead of a
1020 cxx_binding.
1021 (lookup_tag): Don't call select_decl.
1022 (ambiguous_decl): Don't return anything (and change callers to match).
1023 Take a scope_binding as the second parameter.
1024 (lookup_namespace_name): Use a scope_binding instead of a
1025 cxx_binding.
1026 (unqualified_namespace_lookup): Likewise.
1027 (lookup_qualified_name): Likewise.
1028 (select_decl): Take a scope_binding instead of a cxx_binding.
1029 Use macros rather than hand-coding tests for type-ness.
1030
1031 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1032
1033 * cp-gimplify.c: Rename from cp-simplify.c.
1034 * Make-lang.in, optimize.c: Update.
1035
1036 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1037
1038 Merge from tree-ssa-20020619-branch. See
1039 ChangeLog.tree-ssa for details.
1040
1041 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
1042 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
1043 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
1044 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
1045 Merged.
1046 * cp-mudflap.c: New file.
1047 * cp-simplify.c:: New file.
1048
1049 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1050
1051 PR c++/14389
1052 * decl2.c (check_classfn): For member templates, compare also the
1053 template parameters to match the declaration.
1054 * cp-tree.h: Adjust declaration of check_classfn.
1055 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
1056 * friend.c (do_friend): Likewise.
1057 * pt.c (tsubst_friend_function): Likewise.
1058
1059 2004-05-01 Zack Weinberg <zack@codesourcery.com>
1060
1061 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
1062 Instead, dig into the representation type to find the array bound.
1063
1064 2004-04-30 Jason Merrill <jason@redhat.com>
1065
1066 Refer to base members using COMPONENT_REFs where possible.
1067 * class.c (build_simple_base_path): New fn.
1068 (build_base_path): Use it for non-virtual base references.
1069 (layout_class_type): Change base fields to their real type
1070 after layout is done.
1071 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
1072 * cp-lang.c (cxx_get_alias_set): Use it.
1073
1074 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
1075
1076 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
1077 comment typos.
1078
1079 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1080
1081 PR c++/15064
1082 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
1083 used in integral constant expressions.
1084
1085 2004-04-22 Mark Mitchell <mark@codesourcery.com>
1086
1087 * init.c (build_aggr_init): Fix accidental use of C99 construct in
1088 previous change.
1089
1090 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
1091 braced initializer.
1092 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
1093 * decl.c (reshape_init): Use it.
1094 * init.c (perform_member_init): Remove redundant condition.
1095 (build_aggr_init): Adjust to handle brace-enclosed initializers
1096 correctly.
1097 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1098
1099 * parser.c (cp_parser_initializer_clause): Do not set
1100 TREE_HAS_CONSTRUCTOR on the initializer.
1101 * rtti.c (tinfo_base_init): Likewise.
1102 (generic_initializer): Likewise.
1103 (ptr_initializer): Likewise.
1104 (ptm_initializer): Likewise.
1105 (class_initializer): Likewise.
1106 (get_pseudo_ti_init): Likewise.
1107 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1108
1109 2004-04-22 Alan Modra <amodra@bigpond.net.au>
1110
1111 * name-lookup.c (anonymous_namespace_name): Make static.
1112
1113 2004-04-19 Roger Sayle <roger@eyesopen.com>
1114
1115 PR middle-end/14531
1116 * class.c (build_base_path): Call fold whilst building the NULL
1117 pointer check expression trees.
1118
1119 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
1120
1121 * init.c (build_new_1): Don't use type size argument for Java
1122 _Jv_AllocObject call.
1123
1124 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
1125
1126 * method.c (make_alias_for_thunk): Remove preprocessor guard on
1127 declaration and definition.
1128
1129 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
1130
1131 PR c++/14808
1132 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
1133 than ASM_OUTPUT_DEF.
1134
1135 2004-04-08 Jakub Jelinek <jakub@redhat.com>
1136
1137 * decl2.c (mark_used): Don't segfault if cfun != NULL but
1138 current_function_decl == NULL.
1139
1140 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
1141
1142 PR c++/3518
1143 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
1144 level.
1145
1146 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1147
1148 * init.c (decl_constant_value): Don't look at DECL_INITIAL
1149 of PARM_DECL.
1150 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
1151 or TREE_SIDE_EFFECTS of a type.
1152
1153 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
1154
1155 PR c++/14007
1156 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
1157 cv-qualifier unification.
1158 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
1159
1160 2004-04-02 Jan Hubicka <jh@suse.cz>
1161
1162 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
1163 * cp-tree.h (cp_update_decl_after_saving): Declare.
1164 * tree.c (cp_update_decl_after_saving): Define.
1165
1166 2004-04-01 Mark Mitchell <mark@codesourcery.com>
1167
1168 PR c++/14803
1169 * typeck.c (get_delta_difference): Call fold before returning the
1170 value.
1171
1172 2004-04-01 Richard Henderson <rth@redhat.com>
1173
1174 PR c++/14804
1175 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
1176 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
1177
1178 2004-04-01 Mark Mitchell <mark@codesourcery.com>
1179
1180 PR c++/14810
1181 * name-lookup.c (maybe_push_cleanup_level): Robustify.
1182
1183 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1184
1185 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
1186
1187 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1188
1189 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
1190 * class.c (check_bitfield_decl): Likewise.
1191 * cvt.c (type_promotes_to): Likewise.
1192 * decl.c (finish_enum): Likewise.
1193 * mangle.c (write_builtin_type): Likewise.
1194 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
1195 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
1196 (build_binary_op): Likewise.
1197
1198 2004-03-31 Jan Hubicka <jh@suse.cz>
1199
1200 * tree.h (optimize_function): Kill prototype.
1201 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
1202 * semantics.c (expand_body): Kill.
1203
1204 2004-03-30 Mark Mitchell <mark@codesourcery.com>
1205
1206 PR c++/14724
1207 * decl.c (start_decl_1): Do not decide whether or not to create a
1208 new cleanup level until after the type has been completed.
1209
1210 PR c++/14763
1211 * pt.c (tsubst_default_argument): Clear current_function_decl.
1212
1213 2004-03-30 Zack Weinberg <zack@codesourcery.com>
1214
1215 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
1216
1217 2004-03-29 Zack Weinberg <zack@codesourcery.com>
1218
1219 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
1220 is null, just print the literal name and return.
1221
1222 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
1223
1224 * cxx-pretty-print.c: Fix comment typos.
1225
1226 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
1227
1228 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
1229 Update copyright.
1230
1231 2004-03-23 Ziemowit Laski <zlaski@apple.com>
1232
1233 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
1234 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
1235 target hook.
1236
1237 2004-03-23 Zack Weinberg <zack@codesourcery.com>
1238
1239 PR 12267, 12391, 12560, 13129, 14114, 14133
1240 * cp-lang.c (c_reset_state): Delete.
1241 (push_file_scope, pop_file_scope): New stubs.
1242 * parser.c (c_parse_file): Call sorry() here if called more than once.
1243
1244 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1245
1246 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
1247 for INTEGER_CST.
1248
1249 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1250
1251 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
1252
1253 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1254
1255 * error.c (enum pad): Remove.
1256 (dump_qualifiers): Likewise.
1257 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
1258 (dump_aggr_type): Likewise.
1259 (dump_type_suffix): Likewise.
1260 (dump_simple_decl): Likewise.
1261 (dump_function_decl): Likewise.
1262 (cv_to_string): Likewise.
1263 (dump_type_prefix): Likewise. Adjust return void.
1264 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
1265 cxx_pretty_print.h.
1266 (pp_cxx_template_keyword_if_needed): Document.
1267 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
1268 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
1269 MUST_NOT_THROW_EXPR.
1270
1271 2004-03-21 Mark Mitchell <mark@codesourcery.com>
1272
1273 PR c++/14616
1274 * decl.c (cp_finish_decl): Compute the size of arrays declared in
1275 templates, if their type is non-dependent.
1276
1277 2004-03-19 Mark Mitchell <mark@codesourcery.com>
1278
1279 * call.c (build_op_delete_call): Do not forget the placement
1280 arguments when iterating through mutiple delete operators.
1281
1282 * cp-tree.h (svaed_scope): Remove last_parms.
1283 (NEW_DELETE_OPNAME_P): New macro.
1284 (last_function_parms): Remove.
1285 (do_friend): Adjust prototype.
1286 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
1287 using last_function_parms.
1288 (grokfndecl): Take the PARM_DECLs as an argument, rather than
1289 using last_function_parms.
1290 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
1291 for class-specific operator new and operator delete.
1292 (grok_op_properties): Do not look for allocation functions with
1293 METHOD_TYPEs.
1294 (start_function): Use DECL_ARGUMENTS instead of
1295 last_function_parms.
1296 * decl.h (last_function_parms): Do not declare.
1297 * decl2.c (grokclassfn): Do not use last_function_parms.
1298 * friend.c (do_friend): Remove parmdecls parameter.
1299 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
1300 (pop_from_top_level): Do not restore it.
1301 * pt.c (check_explicit_specialization): Do not adjust
1302 last_function_parms.
1303
1304 * name-lookup.c (do_local_using_decl): Create a local binding for
1305 types brought in via using declarations.
1306
1307 * name-lookup.c (lookup_arg_dependent): Handle block-scope
1308 function declarations correctly.
1309
1310 * semantics.c (finish_id_expression): Correct handling of
1311 conversion operators to dependent types.
1312
1313 * typeck.c (lookup_destructor): Allow the use of destructors from
1314 base classes.
1315
1316 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1317
1318 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
1319 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
1320 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
1321 the field is named TEMPLATE_TYPE_PARM_INDEX.
1322
1323 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1324
1325 PR c++/14545
1326 * parser.c (cp_parser_functional_cast): A cast to anything
1327 but integral or enumaration type is not an integral constant
1328 expression.
1329 * pt.c (value_dependent_expression_p): Handle cast expressions
1330 without operands (such as "int()").
1331
1332 2004-03-18 Mark Mitchell <mark@codesourcery.com>
1333
1334 * semantics.c (finish_pseudo_destructor_expr): Allow differing
1335 cv-qualification between the type named by the
1336 pseudo-destructor-name and the object-type.
1337
1338 * search.c (accessible_base_p): Handle non-proper bases.
1339
1340 * name-lookup.c (do_nonmember_using_decl): If a using declaration
1341 refers to a single overloaded function, set the type of the
1342 function.
1343 * tree.c (lvalue_type): Simplify.
1344 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
1345 unknown type.
1346 (build_unary_op): Handle OVERLOADs with known types.
1347
1348 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
1349 function templates.
1350
1351 * parser.c (cp_parser_postfix_expression): Handle the use of
1352 "typename" in non-dependent contexts. Convert appropriately when
1353 when using a qualified name after "->" or ".".
1354
1355 * call.c (conditional_conversion): Honor the requirement that some
1356 conversions refer to the original object.
1357
1358 2004-03-18 Mark Mitchell <mark@codesourcery.com>
1359
1360 * call.c (build_conditional_expr): Do not call force_rvalue for
1361 operands of void_type when the conditional expression itself has
1362 void type.
1363 * name-lookup.c (pushdecl): Don't consider a declaration of a
1364 function named "main" to be an overload of a type named "main".
1365 * parser.c (cp_parser_template_name): Perform name lookup when the
1366 template name is proceeded by "template" if the qualifying scope
1367 is non-dependent.
1368 * typeck.c (composite_pointer_type_r): Correctly handle
1369 pointer-to-member types.
1370 (build_const_cast): Likewise.
1371
1372 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1373
1374 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
1375 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
1376 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
1377 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
1378 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
1379 (TYPEOF_TYPE_EXPR): New macro.
1380 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
1381 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
1382 * pt.c (tsubst): Likewise.
1383 * semantics.c (finish_typeof): Likewise.
1384 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
1385 and TEMPLATE_TYPE_PARM.
1386 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
1387 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
1388
1389 2004-03-16 Mark Mitchell <mark@codesourcery.com>
1390
1391 PR c++/14586
1392 * cp-tree.h (build_new_op): Change prototype.
1393 (build_x_binary_op): Likewise.
1394 * call.c (build_new_op): Add overloaded_p parameter.
1395 * decl2.c (grok_array_decl): Adjust call to build_new_op.
1396 * parser.c (cp_parser_binary_expression): Note that uses of
1397 overloaded operators prevents an expression from being considered
1398 an integral constant.
1399 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
1400 build_x_binary_op.
1401 * semantics.c (finish_call_expr): Likewise.
1402 * typeck.c (rationalize_conditional_expr): Likewise.
1403 (build_x_indirect_ref): Likewise.
1404 (build_x_binary_op): Likewise.
1405 (build_x_unary_op): Likewise.
1406 (build_x_compound_expr): Likewise.
1407 (build_modify_expr): Likewise.
1408 * typeck2.c (build_x_arrow): Likewise.
1409
1410 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
1411
1412 * cp-lang.c, ptree.c: Update copyright.
1413
1414 2004-03-13 Mark Mitchell <mark@codesourcery.com>
1415
1416 PR c++/14550
1417 * parser.c (cp_parser_non_integral_constant_expression): Encode
1418 more of the idiom that surrounded calls to this function within
1419 the function itself
1420 (cp_parser_primary_expression): Adjust accordingly.
1421 (cp_parser_postfix_expression): Likewise.
1422 (cp_parser_unary_expression): Likewise.
1423 (cp_parser_cast_expression): Likewise.
1424 (cp_parser_assignment_expression): Likewise.
1425 (cp_parser_expression): Likewise.
1426 (cp_parser_new_expression): Note that new-expressions are not
1427 allowed in integral constant expressions.
1428 (cp_parser_delete_expression): Likewise.
1429
1430 2004-03-12 Matt Austern <austern@apple.com>
1431
1432 * decl2.c (maybe_make_one_only): Look at
1433 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
1434 to make an explicit instantiation weak.
1435 * method.c (use_thunk): Make sure we call comdat_linkage
1436 when appropriate.
1437 * pt.c (do_type_instantiation): On systems where weak symbols
1438 don't go in a static archive's TOC, explicit instantiation of a
1439 class must imply *explicit* instantiation of its memeber.
1440
1441 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
1442
1443 * call.c, cp-tree.h, pt.c: Fix comment typos.
1444
1445 2004-03-10 Mark Mitchell <mark@codesourcery.com>
1446
1447 PR c++/14510
1448 * decl.c (xref_tag): Disregard non-type declarations when
1449 looking up a tagged type.
1450
1451 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
1452
1453 PR c++/14397
1454 * call.c (convert_like_real): Build a const qualified temporary,
1455 when testing ctor access.
1456
1457 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1458
1459 * call.c (initialize_reference): Fix typo.
1460
1461 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1462
1463 PR c++/14409
1464 * pt.c (determine_specialization): For member templates, match also
1465 constness.
1466
1467 PR c++/14448
1468 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
1469 non-dependent.
1470 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
1471
1472 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1473
1474 PR c++/14230
1475 * call.c (initialize_reference): Handle initializers that are
1476 class-member access expressions applies to rvalues.
1477
1478 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1479
1480 PR c++/14432
1481 * name-lookup.c (supplement_binding): Ignore functions that are
1482 marked DECL_ANTICIPATED.
1483
1484 2004-03-08 Mark Mitchell <mark@codesourcery.com>
1485
1486 PR c++/14401
1487 * class.c (check_field_decls): Complain about non-static data
1488 members of reference type in unions. Propagate
1489 CLASSTYPE_REF_FIELDS_NEED_INIT and
1490 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
1491 data members.
1492 * init.c (perform_member_init): Complain about mbmers with const
1493 type that are not explicitly initialized.
1494
1495 2004-03-08 Mark Mitchell <mark@codesourcery.com>
1496
1497 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
1498 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
1499 (lang_identifier): Remove implicit_decl and error_locus.
1500 (IDENTIFIER_IMPLICIT_DECL): Remove.
1501 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
1502 (IDENTIFIER_ERROR_LOCUS): Likewise.
1503 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
1504 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
1505 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
1506 (implicitly_declare): Remove.
1507 * decl.c (warn_extern_redeclared_static): Remove check of
1508 IDENTIFIER_IMPLICIT_DECL.
1509 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
1510 (implicitly_declare): Remove.
1511 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
1512 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
1513 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
1514 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
1515 in the innermost scope, rather than at namespace scope.
1516 * name-lookup.c (push_local_binding): Give it external linkage.
1517 (pushdecl): Remove dead code.
1518 * name-lookup.h (push_local_binding): Declare it.
1519 * ptree.c (cxx_print_identifier): Don't print
1520 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
1521 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
1522 not IDENTIFIER_ERROR_LOCUS.
1523 * typeck.c (build_function_call): Remove dead code.
1524
1525 2004-03-08 Jason Merrill <jason@redhat.com>
1526
1527 PR c++/13170
1528 * decl.c (xref_tag): Remove attribute handling.
1529 * cp-tree.h: Adjust prototype.
1530 * decl.c, parser.c, rtti.c: Adjust callers.
1531 * parser.c (cp_parser_class_head): Pass back attributes in the
1532 class head.
1533 (cp_parser_class_specifier): Adjust.
1534
1535 2004-03-08 Matt Austern <austern@apple.com>
1536
1537 PR debug/14079
1538 * name-lookup.c (add_decl_to_level): Add extern variables, as well
1539 as static, to static_decls array.
1540
1541 2004-03-05 Jason Merrill <jason@redhat.com>
1542
1543 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
1544
1545 2004-03-04 Geoffrey Keating <geoffk@apple.com>
1546
1547 * decl.c (grokfndecl): Update old incorrect comment.
1548 (grokvardecl): Diagnose C++ variables of type with no linkage.
1549
1550 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1551
1552 PR c++/14369
1553 * pt.c (build_non_dependent_expr): Do not create a
1554 NON_DEPENDENT_EXPR for a THROW_EXPR.
1555
1556 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
1557
1558 PR c++/14369
1559 * error.c (dump_expr): Handle THROW_EXPR.
1560
1561 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1562
1563 PR c++/14360
1564 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
1565 lookup if ordinary name-lookup finds a non-function.
1566 * pt.c (tsubst_copy_and_build): Likewise.
1567
1568 PR c++/14361
1569 * parser.c (cp_parser_late_parsing_default_args): Check that there
1570 are no extra tokens after the end of the default-argument
1571 expression.
1572
1573 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1574
1575 PR c++/14324
1576 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
1577 having C++ linkage for name-mangling purposes.
1578
1579 PR c++/14260
1580 * parser.c (cp_parser_direct_declarator): Recognize constructor
1581 declarators that use a template-id to name the class being
1582 constructed.
1583
1584 PR c++/14337
1585 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
1586 (tsubst_expr): Do not call tsubst_copy, even when
1587 processing_template_decl.
1588
1589 2004-03-01 Jeff Law <law@redhat.com>
1590
1591 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
1592 the proper type.
1593
1594 2004-02-29 Mark Mitchell <mark@codesourcery.com>
1595
1596 PR c++/14138
1597 * name-lookup.h (push_scope): Change prototype.
1598 * name-lookup.c (push_scope): Do not reenter the current class
1599 scope.
1600 * decl.c (grokfndecl): Check return code from push_scope before
1601 calling pop_scope.
1602 * decl2.c (check_classfn): Likewise.
1603 * parser.c (cp_parser_conversion_function_id): Likewise.
1604 (cp_parser_init_declarator): Likewise.
1605 (cp_parser_direct_declarator): Likewise.
1606 (cp_parser_class_specifier): Likewise.
1607 (cp_parser_class_head): Likewise.
1608 (cp_parser_lookup_name): Likewise.
1609 (cp_parser_constructor_declarator_p): Likewise.
1610 * pt.c (instantiate_class_template): Likewise.
1611 (resolve_typename_type): Likewise.
1612
1613 2004-02-29 Mark Mitchell <mark@codesourcery.com>
1614
1615 PR c++/14267
1616 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
1617 extension.
1618
1619 PR debug/12103
1620 * class.c (update_vtable_entry_for_fn): Do not go through
1621 covariance machinery if the type returned by an overrider is the
1622 same as the original.
1623
1624 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
1625
1626 * call.c: Fix a comment typo.
1627
1628 2004-02-27 Ziemowit Laski <zlaski@apple.com>
1629
1630 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
1631
1632 2004-02-26 Mark Mitchell <mark@codesourcery.com>
1633
1634 PR c++/14278
1635 * parser.c (cp_parser_parameter_declaration_list): Commit
1636 to fewer tentative parses.
1637
1638 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1639
1640 PR c++/14284
1641 * pt.c (dependent_type_p_r): A template template parameter is a
1642 dependent type.
1643
1644 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1645
1646 PR c++/14246
1647 * mangle.c (write_template_arg_literal): Don't rely on identity for
1648 boolean constants.
1649
1650 2004-02-24 Jason Merrill <jason@redhat.com>
1651
1652 * tree.c (build_exception_variant): Use check_qualified_type.
1653
1654 2004-02-23 Zack Weinberg <zack@codesourcery.com>
1655 Kazu Hirata <kazu@cs.umass.edu>
1656
1657 * decl.c (cxx_init_decl_processing): Don't check
1658 flag_writable_strings.
1659
1660 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
1661
1662 PR c++/14156
1663 * typeck.c (maybe_warn_about_returning_address_of_location):
1664 Change check for VAR_DECL to use DECL_P instead.
1665
1666 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1667
1668 PR c++/14250
1669 * cvt.c (build_expr_type_conversion): Type must be complete before
1670 looking up for conversions.
1671
1672 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1673
1674 PR c++/14143
1675 * name-lookup.c (arg_assoc_class): Don't look into template
1676 arguments if it is not a primary template.
1677
1678 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1679
1680 PR c++/12007
1681 * method.c (use_thunk): Always clone function argument tree.
1682
1683 2004-02-20 Mark Mitchell <mark@codesourcery.com>
1684
1685 PR c++/14199
1686 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
1687
1688 PR c++/14173
1689 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
1690 for all type variants.
1691
1692 2004-02-19 Mark Mitchell <mark@codesourcery.com>
1693
1694 PR c++/13927
1695 * decl.c (duplicate_decls): Return error_mark_node for invalid
1696 redeclarations.
1697 * name-lookup.c (push_namespace): Ignore the return value from
1698 pushdecl.
1699 * pt.c (push_template_decl_real): Robustify.
1700
1701 PR c++/14186
1702 * name-lookup.c (push_class_level_binding): Do not complain about
1703 adding a binding for a member whose name is the same as the
1704 enclosing class if the member is located in a base class of the
1705 current class.
1706
1707 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1708
1709 PR c++/14181
1710 * parser.c (cp_parser_new_expression): Parse an ill-formed
1711 direct-new-declarator after a parenthesized type-id to emit good
1712 diagnostic.
1713
1714 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
1715
1716 * cp-tree.def, cvt.c: Update copyright.
1717
1718 2004-02-17 Mark Mitchell <mark@codesourcery.com>
1719
1720 PR c++/11326
1721 * cp-tree.h (abi_version_at_least): Remove.
1722 * mangle.c: Include flags.h.
1723
1724 2004-02-15 Mark Mitchell <mark@codesourcery.com>
1725
1726 PR c++/13971
1727 * call.c (build_conditional_expr): Handle conversions between
1728 class types which result in differently cv-qualified type
1729 variants.
1730
1731 PR c++/14086
1732 * class.c (delete_duplicate_fields_1): Remove.
1733 (delete_duplicate_fields): Likewise.
1734 (finish_struct_anon): Remove check for members with the same name
1735 as their enclosing class.
1736 (check_field_decls): Do not call duplicate_fields.
1737 * decl.c (grokdeclarator): Remove check for static data members
1738 with the same name as their enclosing class.
1739 * name-lookup.c (push_class_level_binding): Check for members with
1740 the same name as their enclosing class.
1741
1742 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
1743
1744 PR c++/14085
1745 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
1746
1747 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1748
1749 PR c++/13635
1750 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
1751 has full set of arguments.
1752
1753 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1754
1755 PR c++/13927
1756 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
1757
1758 2004-02-13 Mark Mitchell <mark@codesourcery.com>
1759
1760 PR c++/14122
1761 * cp-tree.h (delete_sanity): Change prototype.
1762 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
1763 Remove dead code. Adjust code to warn about deleting an array.
1764 * typekc.c (decay_conversion): Use build_address and build_nop.
1765
1766 PR c++/14108
1767 * search.c (accessible_p): Do not check access in thunks.
1768
1769 PR c++/14083
1770 * call.c (build_conditional_expr): Call force_rvalue on the
1771 non-void operand in the case that one result is a throw-expression
1772 and the other is not.
1773
1774 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
1775
1776 PR c++/9851
1777 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
1778 the type name and look ahead for ::~, and bail out early with a
1779 better error message if the parse is going to fail.
1780
1781 2004-02-12 Mark Mitchell <mark@codesourcery.com>
1782
1783 * call.c (conversion_kind): New type.
1784 (conversion_rank): Likewise.
1785 (conversion): Likewise.
1786 (CONVERSION_RANK): New macro.
1787 (conversion_obstack): New variable.
1788 (obstack_initialized): Likewise.
1789 (z_candidate): Change type of convs and second_conv.
1790 (candidate_warning): New type.
1791 (IDENTITY_RANK): Remove.
1792 (EXACT_RANK): Likewise.
1793 (PROMO_RANK): Likewise.
1794 (STD_RANK): Likewise.
1795 (PBOOL_RANK): Likewise.
1796 (USER_RANK): Likewise.
1797 (ELLIPSIS_RANK): Likewise.
1798 (BAD_RANK): Likewise.
1799 (ICS_RANK): Likewise.
1800 (ICS_STD_RANK): Likewise.
1801 (ICS_USER_FLAG): Likewise.
1802 (ICS_ELLIPSIS_FLAG): Likewise.
1803 (ICS_THIS_FLAG): Likewise.
1804 (ICS_BAD_FLAG): Likewise.
1805 (NEED_TEMPORARY_P): Likewise.
1806 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
1807 (USER_CONV_CAND): Likewise.
1808 (USER_CONV_FN): Likewise.
1809 (conversion_obstack_alloc): New function.
1810 (alloc_conversion): Likewise.
1811 (validate_conversion_obstack): Likewise.
1812 (alloc_conversions): Likewise.
1813 (build_conv): Adjust to deal with new conversion data structures.
1814 (build_identity_conv): New function.
1815 (build_ambiguous_conv): Likewise.
1816 (standard_conversion): Adjust to deal with new conversion data
1817 structures.
1818 (convert_class_to_reference): Likewise.
1819 (direct_reference_binding): Likewise.
1820 (reference_binding): Likewise.
1821 (implicit_conversion): Likewise.
1822 (add_candidate): Likewise.
1823 (add_function_candidate): Likewise.
1824 (add_conv_candidate): Likewise.
1825 (build_builtin_candidate): Likewise.
1826 (print_z_candidate): Likewise.
1827 (merge_conversion_sequences): Likewise.
1828 (build_user_type_conversion_1): Likewise.
1829 (build_user_type_conversion): Likewise.
1830 (build_new_function_call): Likewise.
1831 (build_object_call): Likewise.
1832 (conditional_conversion): Likewise.
1833 (build_conditional_expr): Likewise.
1834 (build_new_op): Likewise.
1835 (build_op_delete_call): Likewise.
1836 (convert_like_real): Likewise.
1837 (build_over_call): Likewise.
1838 (build_new_method_call): Likewise.
1839 (is_subseq): Likewise.
1840 (maybe_handle_implicit_object): Likewise.
1841 (maybe_handle_ref_bind): Likewise.
1842 (compare_ics): Likewise.
1843 (source_type): Likewise.
1844 (add_warning): Likewise.
1845 (joust): Likewise.
1846 (can_convert_arg): Likewise.
1847 (can_convert_arg_bad): Likewise.
1848 (perform_implicit_conversion): Likewise.
1849 (perform_direct_initialization_if_possible): Likewise.
1850 (initialize_reference): Likewise.
1851 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
1852 * cp-tree.def (WRAPPER): Likewise.
1853 (IDENTITY_CONV): Remove.
1854 (LVALUE_CONV): Likewise.
1855 (QUAL_CONV): Likewise.
1856 (STD_CONV): Likewise.
1857 (PTR_CONV): Likewise.
1858 (PMEM_CONV): Likewise.
1859 (BASE_CONV): Likewise.
1860 (REF_BIND): Likewise.
1861 (USER_CONV): Likewise.
1862 (AMBIG_CONV): Likewise.
1863 (RVALUE_CONV): Likewise.
1864 * cp-tree.h (tree_wrapper): Remove.
1865 (WRAPPER_ZC): Remove.
1866 (lang_tree_node): Remove wrapper.
1867 (LOOKUP_SPECULATIVELY): Remove.
1868 (build_op_delete_call): Adjust prototype.
1869 (validate_conversion_obstack): Declare.
1870 (build_zc_wrapper): Remove.
1871 * cvt.c (convert_to_reference): Remove dead code.
1872 (ocp_convert): Likewise.
1873 * decl.c (redeclaration_error_message): Correct handling of
1874 templates.
1875 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
1876 (cp_tree_node_structure): Remove WRAPPER case.
1877 * decl2.c (finish_file): Call validate_conversion_obstack.
1878 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
1879 (build_op_delete_call): Likewise.
1880 (build_x_delete): Likewise.
1881 (build_delete): Adjust call to build_op_delete_call.
1882 * pt.c (tsubst_friend_declaration): Adjust code to determine
1883 whether or not a friend template is a definition.
1884 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
1885 * tree.c (build_zc_wrapper): Remove.
1886
1887 2004-02-12 Zack Weinberg <zack@codesourcery.com>
1888
1889 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
1890 * cp-tree.h: Don't declare cxx_builtin_type_decls.
1891 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
1892 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
1893
1894 2004-02-10 Mark Mitchell <mark@codesourcery.com>
1895
1896 * typeck.c (lookup_destructor): Fix typo in error message.
1897
1898 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
1899
1900 * call.c, parser.c, tree.c: Fix comment typos.
1901
1902 2004-02-07 Zack Weinberg <zack@codesourcery.com>
1903
1904 Bug 13856
1905 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
1906 * decl.c (duplicate_decls, start_function): Likewise.
1907
1908 2004-02-07 Zack Weinberg <zack@codesourcery.com>
1909
1910 * name-lookup.c (pushdecl): Issue shadow warnings directly.
1911 * parser.c (free_parser_stacks): Delete.
1912
1913 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
1914
1915 * rtti.c: Update copyright.
1916
1917 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1918
1919 PR c++/14033
1920 * decl.c (require_complete_types_for_parms): Do not insert
1921 error_mark_node in the parameter list.
1922
1923 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1924
1925 PR c++/14028
1926 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
1927 error when terminator can not be found.
1928
1929 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
1930
1931 Make-lang.in (po-generated): Delete.
1932
1933 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
1934
1935 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
1936 targetm.calls.promote_prototypes.
1937
1938 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1939
1940 PR middle-end/13750
1941 Revert:
1942 2004-01-15 Geoffrey Keating <geoffk@apple.com>
1943 PR pch/13361
1944 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
1945 (handle_pragma_implementation): Likewise.
1946
1947 2004-02-05 Mark Mitchell <mark@codesourcery.com>
1948
1949 PR c++/13714
1950 * typeck.c (lookup_destructor): Tweak error message.
1951
1952 2004-02-05 Jan Hubicka <jh@suse.cz>
1953
1954 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
1955 functions.
1956
1957 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1958
1959 PR c++/14008
1960 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
1961 code, only emits the diagnostic now. Added lookup of the identifier
1962 and support for qualified ids.
1963 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
1964 Parse an (invalid) type name as id-expression within a declarator.
1965 (cp_parser_simple_declaration): Use it.
1966 (cp_parser_member_declaration): Likewise.
1967 (cp_parser_make_typename_type): New function. Handle errors through
1968 cp_parser_diagnose_invalid_typename.
1969 (cp_parser_elaborated_type_specifier): Use it.
1970
1971 2004-02-04 Mark Mitchell <mark@codesourcery.com>
1972
1973 PR c++/13932
1974 * call.c (convert_like_real): Use "converting" rather than
1975 "argument" as the descriptive keyword to
1976 dubious_conversion_warnings.
1977 * typeck.c (convert_for_assignment): Do not call
1978 dubious_conversion_warnings.
1979
1980 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1981
1982 PR c++/13086
1983 * init.c (build_delete): Emit a more informative error message in
1984 case of an incomplete type, and on the correct source line.
1985
1986 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
1987
1988 * error.c, search.c: Update copyright.
1989
1990 2004-02-04 Mark Mitchell <mark@codesourcery.com>
1991
1992 PR c++/9941
1993 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
1994 linkage for the typeinfo name string.
1995
1996 2004-02-04 Mark Mitchell <mark@codesourcery.com>
1997
1998 PR c++/13969
1999 * cp-tree.h (fold_non_dependent_expr): New function.
2000 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
2001 (cp_parser_template_argument): Use fold_non_dependent_expr.
2002 (cp_parser_direct_declarator): Likewise.
2003 * pt.c (fold_non_dependent_expr): New function.
2004 (convert_nontype_argument): Use it.
2005 (tsubst_qualified_id): Simplify.
2006 (tsubst_copy_and_build): Likewise.
2007
2008 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2009
2010 * decl.c (cxx_push_function_context): Do not set
2011 current_function_is_thunk.
2012 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
2013 actual function.
2014
2015 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2016
2017 PR c++/13997
2018 * pt.c (more_specialized_class): Increase processing_template_decl
2019 while partial ordering.
2020
2021 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2022
2023 PR c++/13925
2024 * decl.c (start_function): Do not call pushdecl for any
2025 instantiation or specialization of a primary template.
2026
2027 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2028
2029 PR c++/13950
2030 * parser.c (cp_parser_class_name): Robustify.
2031
2032 PR c++/13970
2033 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
2034
2035 PR c++/14002
2036 * semantics.c (finish_id_expression): Do not return an
2037 IDENTIFIER_NODE when lookup finds a PARM_DECL.
2038
2039 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2040
2041 PR c++/13978
2042 * pt.c (build_non_dependent_expr): Do not build
2043 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
2044
2045 PR c++/13968
2046 * semantics.c (finish_id_expression): Do not return an
2047 IDENTIFIER_NODE when lookup finds a VAR_DECL.
2048
2049 PR c++/13975
2050 * parser.c (cp_parser_simple_declaration): When skipping to the
2051 end of the statement swallow the terminating semicolon.
2052
2053 2004-02-02 Mark Mitchell <mark@codesourcery.com>
2054
2055 PR c++/13113
2056 * init.c (build_offset_ref): Improve error recovery for invalid
2057 uses of non-static member functions.
2058
2059 PR c++/13854
2060 * cp-tree.h (cp_build_type_attribute_variant): New function.
2061 * class.c (build_clone): Use cp_build_type_attribute_variant.
2062 * decl.c (duplicate_decls): Likewise.
2063 * pt.c (copy_default_args_to_explicit_spec): Likewise.
2064 (tsubst_function_type): Likewise.
2065 * tree.c (build_exception_variant): Check attributes before
2066 concluding that two types are the same.
2067 (cp_build_type-attribute_variant): New method.
2068 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
2069
2070 PR c++/13907
2071 * call.c (convert_class_to_reference): Keep better track of
2072 pedantically invalid user-defined conversions.
2073
2074 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2075
2076 PR c++/13957
2077 * pt.c (tsubst_qualified_id): Improved error message when a type
2078 is expected but not found.
2079
2080 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
2081
2082 * class.c: Fix comment typos.
2083 * decl.c: Likewise.
2084 * error.c: Likewise.
2085 * parser.c: Likewise.
2086 * pt.c: Likewise.
2087 * search.c: Likewise.
2088 * typeck.c: Likewise.
2089
2090 2004-01-30 Richard Henderson <rth@redhat.com>
2091
2092 PR c++/13693
2093 * method.c (use_thunk): Don't force_target_expr for void thunks.
2094 * tree.c (build_target_expr_with_type): Assert non-void type.
2095 (force_target_expr): Likewise.
2096
2097 2004-01-30 Michael Matz <matz@suse.de>
2098
2099 * parser.c (cp_parser_labeled_statement): Accept case ranges.
2100
2101 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2102
2103 DR206
2104 PR c++/13813
2105 * decl.c (grokdeclarator): Check immediatly type completeness for
2106 non-dependent types.
2107
2108 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2109
2110 PR c++/13683
2111 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
2112 a sizeof expression.block
2113
2114 2004-01-29 Mark Mitchell <mark@codesourcery.com>
2115
2116 PR c++/13883
2117 * mangle.c (write_encoding): Correct encoding of member template
2118 constructors.
2119
2120 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2121
2122 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
2123 template name as it was `<::' (digraph typo).
2124 (cp_parser_nth_token_starts_template_argument_list_p): New function.
2125 (cp_parser_id_expression): Use it.
2126 (cp_parser_nested_name_specifier_opt): Likewise.
2127 (cp_parser_template_name): Likewise.
2128 (cp_parser_class_name): Likewise.
2129 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
2130
2131 2004-01-28 Mark Mitchell <mark@codesourcery.com>
2132
2133 PR c++/13791
2134 * typeck.c (merge_types): Do not merge attributes into
2135 TYPENAME_TYPEs.
2136
2137 PR c++/13736
2138 * parser.c (cp_parser_direct_declarator): Do not prevent
2139 backtracking inside a parenthesized declarator.
2140 (cp_parser_parameter_declaration): Fix typo in comment.
2141
2142 2004-01-28 Jan Hubicka <jh@suse.cz>
2143
2144 * semantics.c (expand_body) Do emit_associated_thunks before
2145 expansion.
2146
2147 2004-01-27 Devang Patel <dpatel@apple.com>
2148
2149 * name-lookup.c: Include "debug.h"
2150 (do_namespace_alias): Invoke debug_hooks to emit debug info
2151 for namespace alias.
2152 (do_local_using_decl): Invoke debug_hooks to emit debug info
2153 for using decl.
2154 (do_class_using_decl): Same.
2155 (do_toplevel_using_decl): Same.
2156 (do_using_directive): Same.
2157 (cp_emit_debug_info_for_using): New function.
2158 * Make-lang.in (cp/parser.o): Depend on debug.h
2159 (cp/name-lookup.o): Same.
2160
2161 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2162
2163 * cp-tree.h (language_function, lang_type_header): Use
2164 BOOL_BITFIELD.
2165 * name-lookup.h (cp_binding_level): Likewise.
2166
2167 2004-01-26 Mark Mitchell <mark@codesourcery.com>
2168
2169 PR c++/13663
2170 * semantics.c (finish_for_expr): Check for unresolved overloaded
2171 functions.
2172
2173 * class.c (add_method): Just check processing_template_decl to
2174 determine whether or not we are within a template.
2175 * decl2.c (maybe_retrofit_in_chrg): Likewise.
2176 * init.c (decl_constant_value): Check the type of the declaration,
2177 not TREE_READONLY.
2178 * name-lookup.c (maybe_push_to_top_level): Rename to ...
2179 (push_to_top_level): ... this.
2180 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
2181 * pt.c (push_template_decl_real): Reorder condition for speed.
2182 (convert_template_argument): Use dependency-checking functions in
2183 place of uses_template_parms.
2184 (lookup_template_class): Avoid calling uses_template_parms more
2185 than once.
2186 (uses_template_parms): Reimplement, using dependency-checking
2187 functions.
2188 (instantiate_class_template): Use push_to_top_level, not
2189 maybe_push_to_top_level.
2190 (type_unification_real): Simplify.
2191 (type_dependent_expression_p): Handle OFFSET_REFs and
2192 TEMPLATE_DECLs.
2193 (any_dependent_template_arguments_p): Handle multiple levels of
2194 template argument.
2195 * semantics.c (expand_or_defer_fn): Do not check
2196 uses_template_parms for template instantiations.
2197 * typeck.c (comptypes): Avoid calling cp_type_quals.
2198
2199 2004-01-25 Mark Mitchell <mark@codesourcery.com>
2200
2201 PR c++/13833
2202 * call.c (build_over_call): Do not convert arguments when
2203 processing a template.
2204 * pt.c (build_non_dependent_expr): Do not build a
2205 NON_DEPENDENT_EXPR for arithmetic constants.
2206
2207 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2208
2209 PR c++/13810
2210 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
2211 returns a TYPE_DECL. no further lookup is required.
2212 * semantics.c (check_template_template_default_arg): A TYPE_DECL
2213 is invalid. Rework to give better diagnostics.
2214
2215 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2216
2217 PR c++/13797
2218 * pt.c (instantiate_class_template): Add an error_mark_node
2219 check.
2220 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
2221
2222 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
2223
2224 PR c++/13701
2225 * decl.c (finish_function): Move the call to
2226 finish_fname_decls below the call to
2227 finish_eh_spec_block.
2228
2229 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
2230
2231 * optimize.c, typeck2.c: Update copyright.
2232
2233 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
2234
2235 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
2236 init.c, mangle.c, typeck.c: Update copyright.
2237
2238 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
2239
2240 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
2241
2242 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2243
2244 * Make-lang.in: Replace $(docdir) with doc.
2245 (c++.info, c++.srcinfo): Dummy entry.
2246 (c++.man, c++.srcman): New rules.
2247 (c++.install-man): Revamp rule.
2248
2249 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2250
2251 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
2252 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
2253 immediate $(shell) instead of deferred backquote.
2254
2255 2004-01-19 Mark Mitchell <mark@codesourcery.com>
2256
2257 PR c++/13651
2258 * parser.c (cp_parser_postfix_expression): When encountering
2259 incomplete type on left-hand side of "->" or ".", treat the entire
2260 expression as erroneous.
2261
2262 PR c++/13592
2263 * call.c (build_field_call): Remove.
2264 (n_build_method_call): Likewise.
2265 (build_method_call): Likewise.
2266 (build_new_method_call): Do not call build_field_call.
2267 * class.c (n_build_method_call): Remove.
2268 (print_class_statistics): Do not print it.
2269 * cp-tree.h (build_method_call): Remove declaration.
2270 (finish_object_call_expr): Likewise.
2271 (build_new_1): Do not use build_method_call.
2272 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
2273 when the function appearing on the right-hand-side of "." or "->"
2274 is not actually a function.
2275 * pt.c (tsubst_copy_and_build): Likewise.
2276 * semantics.c (finish_object_call_expr): Remove.
2277
2278 2004-01-18 Mark Mitchell <mark@codesourcery.com>
2279
2280 PR c++/13710
2281 * pt.c (tsubst): Use finish_typeof.
2282
2283 2004-01-18 Jason Merrill <jason@redhat.com>
2284
2285 PR c++/11725
2286 * except.c (build_throw): In a template, set
2287 current_function_returns_abnormally.
2288
2289 2004-01-17 Fred Fish <fnf@intrinsity.com>
2290
2291 PR c++/11895
2292 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
2293 except don't call array_type_nelts() with a VECTOR_TYPE.
2294
2295 2004-01-16 Jan Hubicka <jh@suse.cz>
2296
2297 * mangle.c (write_mangled_name): Remove inline modifier.
2298
2299 2004-01-16 Mark Mitchell <mark@codesourcery.com>
2300
2301 PR c++/13574
2302 * decl.c (compute_array_index_type): Fix grammar in comment.
2303 * init.c (build_zero_init): Handle zero-sized arrays correctly.
2304
2305 PR c++/13178
2306 * call.c (name_as_c_string): Print conversion operator names
2307 correctly.
2308
2309 PR c++/13478
2310 * call.c (initialize_reference): Pass -1 for inner parameter to
2311 convert_like_real.
2312
2313 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2314
2315 PR c++/13407
2316 * parser.c (cp_parser_base_specifier): Check for an invalid
2317 keyword `typename' and emit an user-friendly error message.
2318
2319 2004-01-15 Geoffrey Keating <geoffk@apple.com>
2320
2321 PR pch/13361
2322 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2323 (handle_pragma_implementation): Likewise.
2324
2325 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2326
2327 PR c++/9259
2328 * typeck.c (build_class_member_access_expr): Allow to access members
2329 of the currently open class.
2330 (finish_class_member_access_expr): Likewise.
2331
2332 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
2333
2334 PR c++/13659
2335 * name-lookup.c (validate_nonmember_using_decl): Take scope and
2336 name by value, instead of computing them.
2337 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
2338 arguments. Pass them to validate_nonmember_using_decl.
2339 * name-lookup.h (do_local_using_decl): Adjust.
2340 (do_toplevel_using_decl): Likewise.
2341 * parser.c (cp_parser_using_declaration): Likewise.
2342 * pt.c (tsubst_expr): Likewise.
2343
2344 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
2345
2346 PR c++/13594
2347 PR c++/13658
2348 * name-lookup.c (qualified_lookup_using_namespace): Search
2349 strongly-associated namespaces first, and only then try other
2350 namespaces.
2351
2352 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
2353
2354 * Make-lang.in (c++.srcextra): Dummy entry.
2355
2356 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2357
2358 PR c++/8856
2359 * parser.c (cp_parser_template_name): Don't try to parse a
2360 conversion-function-id, as it cannot be a template-name.
2361 (cp_parser_simple_type_specifier): Check for invalid template-ids
2362 even after a built-in type.
2363
2364 2004-01-14 Jan Hubicka <jh@suse.cz>
2365
2366 PR c++/12850
2367 * pt.c (instantiate_decl): Do not increase function_depth.
2368
2369 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
2370
2371 PR c++/9021
2372 PR c++/11005
2373 * parser.c (cp_parser_elaborated_type_specifier): Warn about
2374 attributes and discard.
2375 * decl.c (xref_tag): Don't overwite existing attributes with
2376 NULL_TREE.
2377
2378 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2379
2380 PR c++/12335
2381 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
2382 is no destructor while looking up a BIT_NOT_EXPR.
2383
2384 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
2385
2386 * cxxfilt.c: Remove unused file.
2387
2388 2004-01-14 Jan Hubicka <jh@suse.cz>
2389
2390 Partial fix to PR c++/12850
2391 * decl2.c (mark_used): Do not proactively instantiate templates
2392 when compiling in unit-at-a-time or not optimizing.
2393 * optimize.c (maybe_clone_body): Do not increase function depth.
2394
2395 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2396
2397 PR c++/13474
2398 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
2399
2400 2004-01-12 Steven Bosscher <stevenb@suse.de>
2401
2402 PR c++/13558
2403 * parser.c (cp_parser_member_declaration): Any non-type is also
2404 not a class or a function.
2405
2406 2004-01-12 Jason Merrill <jason@redhat.com>
2407
2408 PR c++/12815
2409 * class.c (build_base_path): Do not mark vtable references as
2410 TREE_CONSTANT.
2411 (build_vtbl_ref_1): Likewise.
2412
2413 2004-01-12 Richard Henderson <rth@redhat.com>
2414
2415 PR opt/10776
2416 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
2417 (store_init_value): Use it.
2418 * decl.c (check_initializer): Expect full initialization code
2419 from store_init_value.
2420 * init.c (expand_aggr_init_1): Likewise.
2421 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
2422
2423 2004-01-12 Mark Mitchell <mark@codesourcery.com>
2424
2425 * class.c (layout_class_type): For non-POD class types, also copy
2426 the DECL_SIZE and DECL_MODE of fields to the base class type.
2427
2428 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2429
2430 PR c++/13289
2431 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
2432 calling regenerate_decl_from_template.
2433
2434 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
2435
2436 PR c++/4100
2437 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
2438 decl-specifier occurring along with a class definition.
2439
2440 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
2441
2442 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
2443 clauses to comments describing declares_class_or_enum.
2444 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
2445 false.
2446
2447 2004-01-12 Jan Hubicka <jh@suse.cz>
2448
2449 * pt.c (for_each_template_parm): Do not check for duplicates.
2450 (for_each_template_parm): Use walk_tree duplicate checking code.
2451
2452 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
2453
2454 PR c++/3478
2455 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
2456 is error_mark_node, don't add any more decl_specs.
2457 (cp_parser_init_declarator): After committing to a declaration, if
2458 the decl_specifiers start with error_mark_node, issue an error and
2459 change the type to "int".
2460
2461 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
2462
2463 PR bootstrap/7817
2464 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
2465
2466 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2467
2468 DR 337
2469 PR c++/9256
2470 * pt.c (tsubst): Substitution must fail if we are attempting to
2471 create an array with element type that is an abstract class type.
2472 * decl.c (cp_finish_decl): Strip pointers and array types recursively
2473 before calling abstract_virtuals_error.
2474
2475 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
2476
2477 * name-lookup.c (qualified_lookup_using_namespace): Consider
2478 strong using directives even if we've already found a binding.
2479
2480 2004-01-09 Mark Mitchell <mark@codesourcery.com>
2481
2482 * cp-tree.h (cxx_expand_expr): Change prototype.
2483 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
2484
2485 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2486
2487 PR c++/12573
2488 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
2489 looking into them recursively. They can be there because of the
2490 new __offsetof__ extension.
2491
2492 2004-01-07 Zack Weinberg <zack@codesourcery.com>
2493
2494 * parser.c (cp_parser_save_member_function_body): Mark the
2495 definition static.
2496
2497 2004-01-05 Mark Mitchell <mark@codesourcery.com>
2498
2499 PR c++/13057
2500 * class.c (build_clone): Copy type attributes from the original
2501 function to the clone.
2502
2503 PR c++/12815
2504 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
2505 references as constant.
2506
2507 PR c++/12132
2508 * parser.c (cp_parser_explicit_instantiation): Improve error
2509 recovery.
2510 (cp_parser_require): Improve indication of the error location.
2511
2512 PR c++/13451
2513 * parser.c (cp_parser_class_head): Reorder logic to check for
2514 invalid qualification.
2515
2516 2004-01-04 Mark Mitchell <mark@codesourcery.com>
2517
2518 PR c++/13157
2519 * name-lookup.c (lookup_using_namespace): Remove spacesp
2520 parameter.
2521 (unqualified_namespace_lookup): Likewise.
2522 (lookup_qualified_name): Adjust accordingly.
2523 (lookup_name_real): Likewise.
2524 (lookup_arg_dependent): Do not eliminate the namespace of the
2525 functions found by unqualified name lookup unless that is the
2526 current namespace.
2527
2528 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
2529
2530 * semantics.c (push_deferring_access_checks): Fix format.
2531 (resume_deferring_access_checks): Likewise.
2532 (stop_deferring_access_checks): Likewise.
2533 (pop_deferring_access_checks): Likewise.
2534 (get_deferred_access_checks): Likewise.
2535 (pop_to_parent_deferring_access_checks): Likewise.
2536 (perform_deferred_access_checks): Likewise.
2537 (perform_or_defer_access_check): Likewise.
2538
2539 2004-01-04 Richard Henderson <rth@redhat.com>
2540
2541 * call.c (build_over_call): Don't create a save_expr of an
2542 aggregate, but rather its address.
2543
2544 2004-01-04 Mark Mitchell <mark@codesourcery.com>
2545
2546 PR c++/13529
2547 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
2548 an offsetof expression.
2549
2550 * parser.c (cp_parser_parameter_declaration): Fix comment.
2551
2552 PR c++/12226
2553 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
2554 (reference_binding): Set it when appropriate.
2555 (build_temp): New function, split out from ...
2556 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
2557 (initialize_reference): Likewise.
2558
2559 PR c++/13536
2560 * parser.c (cp_parser): Add in_type_id_in_expr_p.
2561 (cp_parser_new): Initialize it.
2562 (cp_parser_postfix_expression): Set it.
2563 (cp_parser_sizeof_operand): Likewise.
2564 (cp_parser_parameteR_declaration): Do not commit early to tenative
2565 parsers when in_type_id_in_expr_p is set.
2566
2567 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2568
2569 PR c++/13094
2570 * parser.c (cp_parser_template_argument): Don't call
2571 make_unbound_class_template directly.
2572 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
2573 UNBOUND_CLASS_TEMPLATE tree node.
2574
2575 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
2576
2577 PR target/12729
2578 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
2579
2580 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2581
2582 PR c++/13520
2583 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
2584 (DECL_FUNCTION_TEMPLATE_P): Use it.
2585 (DECL_CLASS_TEMPLATE_P): Likewise.
2586 * parser.c (cp_parser_lookup_name): Add is_template parameter.
2587 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
2588 (cp_parser_template_name): Likewise.
2589 (cp_parser_elaborated_type_specifier): Likewise.
2590 (cp_parser_namespace_name): Likewise.
2591 (cp_parser_class_name): Likewise.
2592 (cp_parser_lookup_name_simple): Likewise.
2593
2594 See ChangeLog.3 for earlier changes.