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