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