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