]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/cp/ChangeLog
call.c (alloc_conversion): Use cast when converting from void *.
[thirdparty/gcc.git] / gcc / cp / ChangeLog
1 2006-01-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
2
3 * call.c (alloc_conversion): Use cast when converting from void *.
4 (alloc_conversions): Likewise.
5 (add_candidate): Likewise.
6 (print_z_candidates): Likewise.
7 (add_warning): Likewise.
8 * pt.c (retrieve_local_specialization): Likewise.
9 (process_partial_specialization): Likewise.
10 (mangle_class_name_for_template): Likewise.
11 (tsubst_template_args): Likewise.
12 * typeck2.c (pat_calc_hash): Likewise.
13 (pat_compare): Likewise.
14 (abstract_virtuals_error): Likewise.
15 * class.c (method_name_cmp): Likewise.
16 (resort_method_name_cmp): Likewise.
17 (get_vfield_name): Likewise.
18 * decl2.c (generate_ctor_and_dtor_functions_for_priority): Likewise.
19 * lex.c (init_reswords): Likewise.
20 * rtti.c (create_pseudo_type_info): Likewise.
21 * search.c (dfs_lookup_base): Likewise.
22 (dfs_dcast_hint_pre): Likewise.
23 (dfs_dcast_hint_post): Likewise.
24 * tree.c (hash_tree_cons): Likewise.
25 * repo.c (extract_string): Likewise.
26 (afgets): Likewise.
27 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Likewise.
28 * g++spec.c (lang_specific_driver): Likewise.
29
30 2006-01-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
31
32 * class.c (check_bases): Likewise.
33 (maybe_warn_about_overly_private_class): Likewise.
34 (check_field_decls): Likewise.
35 (layout_empty_base): Likewise.
36 (layout_virtual_bases): Likewise.
37 (layout_class_type): Likewise.
38
39 * call.c (joust): Pass option code to warning. Use inform for
40 explanation.
41
42 2006-01-28 Mark Mitchell <mark@codesourcery.com>
43
44 PR c++/25999
45 * decl.c (start_preparsed_function): Call maybe_apply_pragma_weak
46 here, not ...
47 (start_function): ... here.
48
49 2006-01-28 Mark Mitchell <mark@codesourcery.com>
50
51 PR c++/25855
52 * class.c (resolve_address_of_overloaded_function): Adjust use of
53 return value from most_specialized_instantiation.
54 * pt.c (determine_specialization): Avoid multiple calls to
55 get_bindings.
56 (most_specialized_instantiation): When a tie occurs, set the
57 current presumed champion to the next template. Return the
58 TREE_LIST node containing the template, rather than the template
59 itself.
60 (most_specialized): Remove.
61 * name-lookup.c (push_overloaded_decl): When duplicate_decls
62 indicates a failed redeclaration, report that to callers.
63
64 2006-01-26 Jason Merrill <jason@redhat.com>
65
66 PR c++/16021
67 * name-lookup.c (parse_using_directive): Require strong using to
68 name a nested namespace.
69
70 2006-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
71
72 Revert:
73 * cp-tree.h (do_poplevel): Remove prototype.
74 * semantics.c (do_poplevel): Add prototype. Make static.
75
76 Revert:
77 * cp-tree.h (default_conversion): Remove prototype.
78 * typeck.c (default_conversion): Make static.
79
80 2006-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
81
82 * cp-tree.h (get_primary_binfo): Remove prototype.
83 (push_using_decl): Likewise.
84 (current_template_args): Likewise.
85 (more_specialized_class): Likewise.
86 (mark_class_instantiated): Likewise.
87 (default_conversion): Likewise.
88 (pfn_from_ptrmemfunc): Likewise.
89 * class.c (get_primary_binfo): Add prototype, make static, simplify.
90 * name-lookup.c (push_using_decl): Make static.
91 * pt.c (current_template_args): Likewise.
92 (more_specialized_class): Likewise.
93 (mark_class_instantiated): Likewise.
94 * typeck.c (default_conversion): Make static.
95 (pfn_from_ptrmemfunc): Add prototype, make static.
96
97 2006-01-24 Dirk Mueller <dmueller@suse.de>
98
99 * typeck.c (build_binary_op): Use OPT_Wfloat_equal in warning().
100
101 2006-01-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
102
103 PR c++/25552
104 * parser.c (cp_parser_unqualified_id): Check that destructor name
105 and scope match.
106 * call.c (check_dtor_name): Do not expect a BIT_NOT_EXPR.
107 Adjust comment. Return early if possible.
108 Use same_type_p to compare types.
109 * typeck.c (lookup_destructor): Adjust call to check_dtor_name.
110
111 2006-01-24 Mark Mitchell <mark@codesourcery.com>
112
113 * semantics.c: Remove outdated comment.
114
115 2006-01-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
116
117 * cp-tree.h (do_poplevel): Remove prototype.
118 * semantics.c (do_poplevel): Add prototype. Make static.
119
120 * cp-tree.h (original_type): Remove prototype.
121 * typeck.c (original_type): Make static.
122
123 * cp-tree.h (declare_global_var): Remove prototype.
124 * decl.c (declare_global_var): Make static.
125
126 * cp-tree.h (implicitly_declare_fn): Remove prototype.
127 * method.c (implicitly_declare_fn): Make static.
128
129 * cp-tree.h (fold_decl_constant_value): Remove prototype.
130 * pt.c (fold_decl_constant_value): Make static.
131
132 * cp-tree.h (build_x_delete): Remove prototype.
133 * init.c (build_vec_delete_1): Call build_op_delete_call directly
134 and not via build_x_delete.
135 (build_x_delete): Remove.
136
137 * cp-tree.h (get_vtt_name): Remove prototype.
138 * class.c (get_vtt_name): Remove.
139 (build_vtt): Call mangle_vtt_for_type instead of get_vtt_name.
140
141 2006-01-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
142
143 * rtti.c (build_dynamic_cast): Fix comment.
144
145 2006-01-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
146
147 PR c++/10891
148 * rtti.c (build_dynamic_cast): Reject dynamic_cast use if
149 -fno-rtti.
150
151 2006-01-21 Mark Mitchell <mark@codesourcery.com>
152
153 PR c++/25895
154 * class.c (build_base_path): Generate a NOP_EXPR instead of a
155 COMPONENT_REF if the base and derived classes are at the same
156 address.
157
158 PR c++/25856
159 * decl.c (begin_destructor_body): Robustify.
160
161 PR c++/25858
162 * parser.c (cp_parser_direct_declarator): Robustify.
163
164 2006-01-20 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
165
166 * parser.c (cp_lexer_next_token_is_keyword): Simplify.
167
168 * parser.c (clear_decl_specs): Remove prototype.
169
170 * parser.c (cp_parser_expression_fn): Remove.
171
172 * call.c (add_builtin_candidates): Remove superfluous return.
173 * name-lookup.c (do_toplevel_using_decl): Likewise.
174 * parser.c (cp_parser_type_specifier_seq): Likewise.
175 (cp_parser_save_default_args): Likewise.
176
177 2006-01-20 Dirk Mueller <dmueller@suse.com>
178
179 PR c++/5520
180 * semantics.c (finish_if_stmt): Call empty_body_warning.
181 * parser.c (cp_parser_implicitly_scoped_statement):
182 Mark empty statement with an empty stmt.
183
184 2006-01-19 Mark Mitchell <mark@codesourcery.com>
185
186 PR c++/22136
187 * name-lookup.c (do_class_using_decl): Don't try to look up base
188 classes in templates with dependent base types.
189
190 2006-01-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
191
192 PR c++/25854
193 * pt.c (maybe_process_partial_specialization): Return early on
194 error_mark_node.
195
196 2006-01-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
197
198 PR c++/16829
199 * decl.c (start_preparsed_function): Check default arguments
200 unconditionally.
201 * name-lookup.c (pushdecl_maybe_friend): Check default arguments
202 of all functions and function templates.
203 * parser.c (cp_parser_late_parsing_default_args): Check default
204 arguments.
205 * decl2.c (check_default_args): Set missing default arguments to
206 error_mark_node.
207
208 2006-01-18 Mark Mitchell <mark@codesourcery.com>
209
210 PR c++/25836
211 * cp-tree.h (push_class_stack): New function.
212 (pop_class_stack): Likewise.
213 * class.c (class_stack_node): Add hidden field.
214 (pushclass): Clear it.
215 (push_class_stack): New function.
216 (pop_class_stack): Likewise.
217 (currently_open_class): Ignore hidden classes.
218 (currently_open_derived_class): Likewise.
219 * name-lookup.c (push_to_top_level): Call push_class_stack.
220 (pop_from_top_level): Call pop_class_stack.
221
222 2006-01-18 Kazu Hirata <kazu@codesourcery.com>
223
224 * tree.c (find_tree_t, find_tree): Remove.
225 * cp-tree.h: Remove the prototype for find_tree.
226
227 2006-01-18 Jakub Jelinek <jakub@redhat.com>
228
229 * search.c (lookup_conversions_r): Fix a pasto.
230
231 2006-01-17 Eric Christopher <echristo@apple.com>
232
233 * call.c (convert_like_real): When issuing conversion
234 warnings, depend on OPT_Wconversion.
235 * cvt.c (build_expr_type_conversion): Ditto.
236
237 2006-01-17 Kazu Hirata <kazu@codesourcery.com>
238
239 * name-lookup.c (lookup_namespace_name): Remove.
240 * name-lookup.h: Remove the prototype for
241 lookup_namespace_name.
242
243 2006-01-17 Jakub Jelinek <jakub@redhat.com>
244
245 PR c/25682
246 * decl.c (compute_array_index_type): After issuing not an integral
247 constant-expression error, set size to 1 to avoid ICEs later on.
248
249 2006-01-16 Ian Lance Taylor <ian@airs.com>
250
251 * parser.c: Include "cgraph.h".
252 (cp_parser_asm_definition): Call cgraph_add_asm_node rather than
253 assemble_asm.
254
255 2006-01-16 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
256
257 * g++spec.c (lang_specific_spec_functions): Remove.
258
259 2006-01-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
260
261 * decl.c (check_initializer): Fix thinko.
262
263 2006-01-14 Mark Mitchell <mark@codesourcery.com>
264
265 PR c++/25663
266 * parser.c (cp_parser_direct_declarator): Use cp_parser_error
267 instead of error.
268
269 2006-01-13 Jason Merrill <jason@redhat.com>
270
271 * pt.c (check_explicit_specialization): Use CP_DECL_CONTEXT even more.
272
273 * name-lookup.c (set_decl_namespace): Use CP_DECL_CONTEXT.
274 * pt.c (check_explicit_specialization): Likewise.
275
276 2006-01-12 Jason Merrill <jason@redhat.com>
277
278 PR libstdc++/24660
279 * pt.c (check_explicit_specialization): Handle namespace
280 association.
281 * name-lookup.c (set_decl_namespace): Likewise.
282
283 2006-01-12 Nathan Sidwell <nathan@codesourcery.com>
284
285 PR c++/24824
286 * class.c (handle_using_decl): Pass correct scope to
287 cp_emit_debug_info_for_using.
288
289 2006-01-11 Nathan Sidwell <nathan@codesourcery.com>
290
291 PR c++/25386
292 * tree.c (lvalue_p_1): Any part of a COMPONENT_REF affects
293 packedness.
294
295 2006-01-06 Gabriel Dos Reis <gdr@integrablesolutions.net>
296
297 * parser.c (cp_parser_primary_expression): Document the grammar
298 for the built-in offsetof, a GNU extension.
299
300 2006-01-04 Zdenek Dvorak <dvorakz@suse.cz>
301
302 PR c++/25632
303 * init.c (constant_value_1): Unshare use of DECL_INITIAL. Fix a typo
304 in condition.
305
306 2006-01-04 Chris Lattner <sabre@gnu.org>
307
308 * typeck2.c: update copyright to 2006
309 (split_nonconstant_init_1): Set TREE_CONSTANT to true.
310
311 2006-01-04 Mark Mitchell <mark@codesourcery.com>
312
313 PR c++/24782
314 * parser.c (cp_parser_nested_name_specifier_opt): Preserve access
315 checks, even when parsing tentatively.
316
317 2006-01-04 Richard Henderson <rth@redhat.com>
318
319 Merge from gomp branch.
320 * lex.c (handle_pragma_java_exceptions): Fix whitespace.
321 * parser.c (struct cp_token): Add pragma_kind.
322 (eof_token): Update to match.
323 (struct cp_lexer): Add in_pragma; rearrange next for better packing.
324 (cp_parser_initial_pragma): New.
325 (cp_lexer_new_main): Use it. Don't bother clearing
326 c_lex_return_raw_strings.
327 (cp_lexer_get_preprocessor_token): Always initialize keyword
328 and pragma_kind fields. Handle CPP_PRAGMA.
329 (cp_lexer_consume_token): Don't allow CPP_PRAGMA_EOL when
330 in_pragma is set.
331 (cp_lexer_handle_pragma): Remove. Update callers to cp_parser_pragma.
332 (cp_lexer_print_token) <CPP_PRAGMA>: Don't print as a string.
333 (cp_parser_skip_to_pragma_eol): New.
334 (cp_parser_error): Use it.
335 (cp_parser_skip_to_closing_parenthesis): Stop at CPP_PRAGMA_EOL;
336 rearrange with switch statement.
337 (cp_parser_skip_to_end_of_statement): Likewise.
338 (cp_parser_skip_to_end_of_block_or_statement): Likewise.
339 (cp_parser_skip_to_closing_brace): Likewise.
340 (cp_parser_skip_until_found): Likewise.
341 (cp_parser_statement): Add in_compound argument; update callers.
342 Use it to decide how to handle pragma parsing.
343 (cp_parser_labeled_statement): Add in_compound argument; pass
344 it on to cp_parser_statement.
345 (cp_parser_statement_seq_opt): Stop at CPP_PRAGMA_EOL.
346 (cp_parser_declaration_seq_opt): Likewise.
347 (cp_parser_parameter_declaration): Likewise.
348 (cp_parser_member_specification_opt): Likewise.
349 (cp_parser_function_definition_after_decl): Likewise.
350 (cp_parser_cache_group): Handle CPP_PRAGMA/CPP_PRAGMA_EOL pairs.
351 (cp_parser_pragma): New.
352 (pragma_lex): New.
353
354 2006-01-04 Dirk Mueller <dmueller@suse.com>
355
356 * decl.c (finish_constructor_body): create simple
357 compound stmt instead of a if(1) { } construct.
358
359 2006-01-03 Mark Mitchell <mark@codesourcery.com>
360
361 PR c++/25492
362 * name-lookup.c (push_class_level_binding): When a derived class
363 provides a type binding, eliminate any type binding from a base
364 class.
365
366 PR c++/25625
367 * repo.c (repo_emit_p): Always instantiate static data members
368 initialized by constant expressions, so that there values are
369 available.
370
371 2006-01-02 Mark Mitchell <mark@codesourcery.com>
372
373 PR c++/25635
374 * class.c (add_method): Set TYPE_HAS_CONVERSION for classes with a
375 conversion operator.
376 * decl.c (grokdeclarator): Do not set TYPE_HAS_CONVERSION here.
377
378 PR c++/25638
379 * class.c (add_method): Never associate more than one destructor
380 with a single class.
381
382 PR c++/25637
383 * cp-tree.h (do_friend): Adjust prototype.
384 * decl.c (grokfndecl): Make funcdef_flag a bool, not an int.
385 (grokdeclarator): Likewise. Refine check for invalid
386 declarations/definitions of member functions outside of their own
387 class.
388 * friend.c (do_friend): Make funcdef_flag a bool, not an int.
389
390 PR c++/25633
391 * parser.c (cp_parser_mem_initializer_list): Check result of
392 cp_parser_mem_initializer against error_mark_node, not NULL_TREE.
393 (cp_parser_mem_initializer): Return error_mark_node for failure.
394
395 PR c++/25634
396 * parser.c (cp_parser_template_parameter_list): Call
397 begin_template_parm_list and end_template_parm_list here.
398 (cp_parser_type_parameter): Not here.
399 (cp_parser_template_declaration_after_export): Or here.
400 (cp_parser_elaborated_type_specifier): Call
401 cp_parser_check_template_parameters.
402
403 * tree.c (build_target_expr_with_type): Use force_target_expr.
404
405 * decl2.c (mark_used): Fix typo in comment.
406
407 2006-01-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
408
409 * parser.c (cp_parser_using_declaration): Skip name-lookup on
410 invalid scope.
411
412 2005-12-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
413
414 * cxx-pretty-print.c (pp_cxx_constant): New. Print
415 string-literal in parens if input program says so.
416 (pp_cxx_primary_expression): Hand off constant printing to
417 pp_cxx_constant.
418 (pp_cxx_pretty_printer_init): Set pp->c_base.constant.
419 (pp_cxx_expression): Use pp_cxx_constant for literals.
420 * error.c (dump_expr): Use pp_constant for literals.
421
422 2005-12-29 Nathan Sidwell <nathan@codesourcery.com>
423
424 * method.c (make_thunk): Don't set comdat_linkage here.
425 (use_thunk): Make thunk one only here, if thunk target is
426 DECL_ONE_ONLY.
427
428 2005-12-26 Mark Mitchell <mark@codesourcery.com>
429
430 PR c++/25439
431 * decl.c (grokdeclarator): Remove dead code.
432 * ptree.c (cxx_print_xnode): Handle BASELINK.
433 * parser.c (make_id_declarator): Add sfk parameter.
434 (cp_parser_direct_declarator): Do not pass TYPE_DECLs to
435 make_id_declarator.
436 (cp_parser_declarator_id): Simplify BASELINKs here.
437 (cp_parser_member_declaration): Adjust calls to
438 make_id_declarator.
439
440 2005-12-26 Mark Mitchell <mark@codesourcery.com>
441
442 PR c++/23171, c++/23172, c++/25417.
443 * typeck.c (build_unary_op): Create temporary variables for
444 compound literals whose addresses are taken.
445 * init.c (expand_aggr_init_1): Use COMPOUND_LITERAL_P.
446 * decl.c (reshape_init_vector): Likewise.
447 (reshape_init): Give it external linkage.
448 (check_initializer): Use COMPOUND_LITERAL_P.
449 (initialize_artificial_var): Allow the initializer to be a
450 CONSTRUCTOR.
451 * call.c (make_temporary_var_for_ref_to_temp): Use
452 create_temporary_var.
453 * cp-tree.h (COMPOUND_LITERAL_P): New macro.
454 (rehape_init): Declare.
455 * typeck2.c (digest_init): Use COMPOUND_LITERAL_P.
456 * semantics.c (finish_compound_literal): Use reshape_init.
457
458 2005-12-23 Mark Mitchell <mark@codesourcery.com>
459
460 PR c++/24671
461 * pt.c (instantiate_template): Handle SFINAE.
462
463 2005-12-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
464
465 * decl.c (grokdeclarator): Improve diagnostic for friend
466 declarations of class members.
467
468 2005-12-22 Mark Mitchell <mark@codesourcery.com>
469
470 PR c++/25369
471 * tree.c (really_overloaded_fn): Tweak comment.
472 * pt.c (tsubst_call_declarator_parms): Remove.
473 (tsubst_copy): Call mark_used on the member referenced by an
474 OFFSET_REF.
475 * semantics.c (finish_qualified_id_expr): Simplify.
476 * decl2.c (mark_used): Accept BASELINKs.
477
478 PR c++/25364
479 * typeck.c (build_unary_op): Pass DECLs not names to
480 build_offset_refs.
481 * init.c (build_offset_ref): Do not do name lookup. Do not call
482 mark_used.
483 * call.c (build_call): Simplify and tidy.
484 * semantics.c (finish_qualified_id_expr): Call mark_used.
485
486 2005-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
487
488 PR c++/23333
489 * parser.c (cp_parser_pure_specifier): Check for PURE_ZERO to
490 identify a single '0'.
491
492 2005-12-20 Mark Mitchell <mark@codesourcery.com>
493
494 PR c++/21228
495 * decl.c (use_eh_spec_block): New function.
496 (store_parm_decls): Use it.
497 (finish_function): Likewise.
498
499 2005-12-19 Mark Mitchell <mark@codesourcery.com>
500
501 PR c++/24278
502 * init.c (expand_member_init): Print messages about baseclasses
503 using %T rather than %D.
504
505 PR c++/24915
506 * class.c (add_method): Do not treat templates as identical unless
507 their return types are the same.
508
509 2005-12-12 Mark Mitchell <mark@codesourcery.com>
510
511 PR c++/25300
512 * tree.c (build_qualified_name): Return error_mark_node for
513 erroneous input.
514
515 2005-12-10 Mark Mitchell <mark@codesourcery.com>
516
517 PR c++/25337
518 * pt.c (tsubst_copy_and_build): Permit dependent types for the
519 object in a class member access expression.
520
521 2005-12-10 Terry Laurenzo <tlaurenzo@gmail.com>
522
523 PR java/9861
524 * mangle.c (write_bare_function_type): Mangle return type for
525 methods of Java classes
526
527 2005-12-08 Théodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
528
529 * call.c (build_conditional_expr): Print types in error messages.
530
531 2005-12-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
532
533 * expr.c (cxx_expand_expr): Call gcc_unreachable instead of abort.
534
535 2005-12-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
536
537 * cp-gimplify.c (gimplify_cp_loop): Use fold_build3.
538
539 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
540
541 * Make-lang.in (c++.all.build, c++.install-normal): Remove.
542
543 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
544
545 * Make-lang.in: Remove all dependencies on s-gtype.
546
547 2005-12-06 Aldy Hernandez <aldyh@redhat.com>
548
549 PR C++/24138
550 * decl.c (reshape_init_array_1): Handle max_index of -1.
551
552 2005-12-06 Roger Sayle <roger@eyesopen.com>
553
554 * typeck.c (build_binary_op): Issue warning if either operand of a
555 comparison operator is a string literal, except for testing equality
556 or inequality against NULL.
557
558 2005-12-06 Roger Sayle <roger@eyesopen.com>
559
560 PR c++/25263
561 * decl.c (compute_array_index_type): Check that itype is an
562 INTEGER_CST node before testing/clearing TREE_OVERFLOW.
563
564 2005-12-05 Daniel Berlin <dberlin@dberlin.org>
565
566 * ptree.c (cxx_print_decl): Update to check for decl_common
567 structure.
568
569 2005-12-02 Mark Mitchell <mark@codesourcery.com>
570
571 PR c++/24173
572 * decl.c (duplicate_decls): Don't rely on DECL_TEMPLATE_INFO after
573 clobbering newdecl.
574
575 2005-12-02 Richard Guenther <rguenther@suse.de>
576
577 * semantics.c (simplify_aggr_init_expr): Use buildN instead
578 of build.
579
580 2005-12-02 Gabriel Dos Reis <gdr@integrable-solutions.net>
581
582 * parser.c (cp_lexer_new_main): Usr GGC_RESIZEVEC instead of
583 ggc_realloc.
584 (cp_parser_template_argument_list): Use XRESIZEVEC instead of
585 xrealloc.
586 * class.c (pushclass): Likewise.
587
588 2005-12-02 Gabriel Dos Reis <gdr@integrable-solutions.net>
589
590 * decl2.c (get_priority_info): Use XNEW, not xmalloc.
591 * decl.c (push_switch): Likewise.
592 * lex.c (handle_pragma_implementation): Likewise.
593 * cp-objcp-common.c (decl_shadowed_for_var_insert): Use GGC_NEW,
594 not ggc_alloc.
595 (cxx_initialize_diagnostics): Use XNEW, not xmalloc.
596 * class.c (init_class_processing): Use XNEWVEC, not xmalloc.
597 * g++spec.c (lang_specific_driver): Likewise.
598 * mangle.c (save_partially_mangled_name): Likewise.
599 * parser.c (cp_lexer_new_main): Use GGC_NEWVEC, not ggc_alloc.
600 (cp_parser_template_argument_list): Use XNEWVEC, nto xmalloc.
601 (cp_parser_sizeof_operand): Likewise.
602 * repo.c (open_repo_file, open_repo_file): Likewise.
603
604 2005-12-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
605
606 * parser.c (cp_parser_make_typename_type): Call make_typename_type
607 with tf_none instead of magic value 0.
608 (cp_parser_explicit_instantiation): Call do_type_instantiation
609 with tf_error instead of magic value 1.
610 (cp_parser_elaborated_type_specifier): Call make_typename_type
611 with tf_error instead of magic value 1.
612 (cp_parser_class_name): Likewise.
613 (cp_parser_lookup_name): Likewise.
614
615 2005-12-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
616
617 * parser.c (cp_parser_declaration): Set token2.type to CPP_EOF,
618 not RID_MAX.
619
620 2005-11-30 Jason Merrill <jason@redhat.com>
621
622 PR c++/21123
623 * cp-gimplify.c (cp_genericize_r): Don't dereference invisible reference
624 parms in a thunk.
625
626 2005-11-30 Ben Elliston <bje@au.ibm.com>
627
628 * typeck.c (build_x_unary_op): Correct spelling in error message.
629
630 2005-11-28 Nathan Sidwell <nathan@codesourcery.com>
631
632 PR c++/21166
633 * class.c (check_field_decls): Only set DECL_PACKED on a field
634 when its natural alignment is > BITS_PER_UNIT.
635
636 2005-11-27 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
637
638 PR c++/24979
639 * cp-tree.h (DECL_MAIN_P): Remove duplicate definition.
640
641 2005-11-26 Richard Henderson <rth@redhat.com>
642
643 * lex.c: Update for pragma_lex rename.
644 * parser.c: Likewise.
645
646 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
647
648 PR c++/9278
649 * decl.c (grokparms): Do not allow typedef-names in a '(void)'
650 parmlist.
651
652 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
653
654 * typeck2.c (process_init_constructor_union): Remove check for
655 unnamed union members.
656
657 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
658
659 * name-lookup.c (lookup_name_real): Merge two if's.
660
661 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
662
663 * pt.c (instantiate_class_template): Clean-up.
664
665 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
666
667 * pt.c (template_class_depth_real): Remove. Move functionality to ...
668 (template_class_depth): ... here, replacing count_specializations
669 with 0. Adjust comment.
670
671 2005-11-24 Richard Guenther <rguenther@suse.de>
672 Dirk Mueller <dmueller@suse.de>
673
674 PR c++/14024
675 * typeck.c (build_reinterpret_cast_1): Use
676 strict_aliasing_warning.
677
678 2005-11-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
679
680 PR c++/24235
681 * pt.c (check_instantiated_args): Reword diagnostic message about
682 template argument involving local types.
683
684 2005-11-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
685
686 PR c++/21667
687 * typeck.c (build_array_ref): Avoid code duplicate. Use common
688 C/C++ diagnostic function warn_array_subscript_with_type_char.
689
690 2005-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
691
692 PR c++/22238
693 * error.c (resolve_virtual_fun_from_obj_type_ref): New.
694 (dump_expr): Use it in <case CALL_EXPR>.
695
696 2005-11-21 Richard Henderson <rth@redhat.com>
697
698 * cp-objcp-common.h, name-lookup.c, name-lookup.h: Revert 11-18 patch.
699
700 * name-lookup.c (lookup_name): Remove prefer_type argument.
701 (lookup_name_prefer_type): New.
702 * decl.c (lookup_and_check_tag): Use them.
703 * pt.c (tsubst_friend_class): Likewise.
704 (lookup_template_class): Likewise.
705 (tsubst_copy_and_build): Likewise.
706 * name-lookup.h (lookup_name_prefer_type): New.
707 (lookup_name): Remove declaration.
708
709 2005-11-18 Mark Mitchell <mark@codesourcery.com>
710
711 PR c++/8355
712 * decl.c (grokfndecl): Set up DECL_TEMPLATE_INFO before calling
713 set_decl_namespace.
714 * name-lookup.c (set_decl_namespace):
715
716 2005-11-18 Mike Stump <mrs@apple.com>
717
718 * cp-objcp-common.h (LANG_HOOKS_LOOKUP_NAME): Add.
719 * name-lookup.c (lookup_name_two): Remove.
720 (lookup_name_one): Add.
721 * name-lookup.h (lookup_name_two): Remove.
722 (lookup_name_one): Add.
723
724 2005-11-15 Jason Merrill <jason@redhat.com>
725
726 PR c++/24580
727 * method.c (locate_copy): Also use skip_artificial_parms here.
728 (synthesize_exception_spec): Use CLASS_TYPE_P rather than checking
729 for RECORD_TYPE.
730 (locate_ctor): Abort if we fail to find a default constructor.
731
732 2005-11-15 Mike Stump <mrs@apple.com>
733
734 * name-lookup.c (lookup_name_two): Add.
735 * name-lookup.h: Likewise.
736
737 2005-11-15 Mark Mitchell <mark@codesourcery.com>
738
739 PR c++/24667
740 * typeck.c (check_for_casting_away_constness): Use the diag_fn.
741 (build_const_cast_1): Call it, for C-style casts.
742
743 2005-11-14 Mark Mitchell <mark@codesourcery.com>
744
745 PR c++/24687
746 * pt.c (check_explicit_specialization): Don't check for C linkage.
747 (push_template_decl_real): Likewise.
748 * parser.c (cp_parser_explicit_specialization): Check here.
749 (cp_parser_template_declaration_after_export): And here.
750
751 * parser.c (cp_lexer_get_preprocessor_token): Initialize keyword
752 field.
753
754 2005-11-14 Jason Merrill <jason@redhat.com>
755
756 PR c++/24580
757 * method.c (locate_ctor): Skip all artificial parms, not just
758 'this'.
759
760 2005-11-14 Mark Mitchell <mark@codesourcery.com>
761
762 * parser.c (eof_token): Add initializer for ambiguous_p.
763
764 2005-11-13 Mark Mitchell <mark@codesourcery.com>
765
766 PR c++/24817
767 * decl.c (check_redeclaration_exception_specification): New
768 function.
769 (duplicate_decls): Use it.
770 * error.c (fndecl_to_string): Print the template parameter list.
771
772 PR c++/20293
773 * cxx-pretty-print.c (pp_cxx_statement): Print qualifying scopes
774 for namespaces.
775 (pp_cxx_original_namespace_definition): Likewise.
776 * name-lookup.c (ambiguous_decl): Don't issue error messages;
777 instead return lists of ambiguous candidates.
778 (select_decl): Handle ambiguous namespace lookups.
779 * parser.c (cp_token): Add ambiguous_p.
780 (cp_lexer_get_preprocessor_token): Set it.
781 (cp_parser_diagnose_invalid_type_name): Avoid duplicate messages
782 when a qualified name uses an invalid scope.
783 (cp_parser_primary_expression): Print ambiguous candidates.
784 (cp_parser_type_parameter): Adjust comment to reflect new
785 parameter name for cp_parser_lookup_name.
786 (cp_parser_template_argument): Likewise.
787 (cp_parser_elaborated_type_specifier): Likewise.
788 (cp_parser_namespace_name): Likewise.
789 (cp_parser_class_name): Print ambiguous candidates.
790 (cp_parser_lookup_name): Rename ambiguous_p parameter to
791 ambiguous_decls. Use it to return a list of ambiguous candiates
792 when a lookup is ambiguous.
793 (cp_parser_lookup_name_simple): Adjust comment to reflect new
794 parameter name for cp_parser_lookup_name.
795
796 2005-11-12 Jakub Jelinek <jakub@redhat.com>
797
798 PR c++/24780
799 * typeck.c (complete_type): Set TYPE_NEEDS_CONSTRUCTING
800 and TYPE_HAS_NONTRIVIAL_DESTRUCTOR flags for all variants
801 of array type.
802
803 PR c++/24761
804 * pt.c (tsubst_copy_asm_operands): New function.
805 (tsubst_expr) <case ASM_EXPR>: Use it.
806
807 2005-11-08 Jakub Jelinek <jakub@redhat.com>
808
809 PR c++/19450
810 * decl.c (redeclaration_error_message): Issue diagnostics about
811 olddecl and newdecl disagreement on __thread property.
812 (grokdeclarator): Set DECL_TLS_MODEL on class static variables.
813
814 2005-11-08 Jason Merrill <jason@redhat.com>
815
816 PR c++/21123
817 * method.c (use_thunk): Use build_cplus_new instead of
818 force_target_expr.
819
820 2005-11-06 Jason Merrill <jason@redhat.com>
821 James A. Morrison <phython@gcc.gnu.org>
822
823 PR c++/17256
824 * decl2.c (cp_finish_file): Fix conditions for undefined warning.
825 Set TREE_NO_WARNING instead of TREE_PUBLIC.
826 * pt.c (instantiate_pending_templates): Set DECL_INITIAL to avoid
827 a warning on a function we didn't instantiate because of excessive
828 recursion.
829
830 2005-11-06 Mark Mitchell <mark@codesourcery.com>
831
832 * class.c (record_subobject_offsets): Don't record offsets past
833 biggest empty class for non-empty base classes.
834 (layout_class_type): Use TYPE_SIZE_UNIT, not TYPE_SIZE, when
835 keeping track of the size of emptyclasses.
836
837 PR c++/21308
838 * class.c (sizeof_biggest_empty_class): New variable.
839 (record_subobject_offsets): Don't record offsets past biggest
840 empty class for data members. Replace vbases_p parameter with
841 is_data_member parameter.
842 (build_base_field): Adjust call.
843 (layout_class_type): Likewise. Maintain
844 sizeof_biggest_empty_class.
845
846 2005-11-05 Kazu Hirata <kazu@codesourcery.com>
847
848 * decl2.c, init.c, typeck.c: Fix comment typos.
849
850 2005-11-04 Richard Guenther <rguenther@suse.de>
851
852 PR c++/22487
853 * init.c (build_vec_init): Build comparison of matching
854 types.
855
856 2005-11-03 Josh Conner <jconner@apple.com>
857
858 PR c++/19989
859 pt.c (tsubst): Accept zero-length array if tf_error is set
860 in complain flags. Change error message for negative-
861 length array.
862
863 2005-11-04 Joseph S. Myers <joseph@codesourcery.com>
864
865 * cp-tree.h (cp_cpp_error), error.c (cp_cpp_error): Take va_list*
866 parameter.
867
868 2005-11-03 Joseph S. Myers <joseph@codesourcery.com>
869
870 PR c++/17964
871 * error.c (cp_cpp_error): New function.
872 * cp-tree.h (cp_cpp_error): Declare.
873 * parser.c (cp_lexer_new_main): Set CPP option client_diagnostic
874 and error callback after lexing.
875
876 2005-11-03 Mark Mitchell <mark@codesourcery.com>
877
878 PR c++/21627
879 * pt.c (register_specialization): Update inline flags on clones.y
880
881 2005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
882
883 PR c++/24582
884 * decl.c (declare_local_label): Return 0 for variables
885 with error_mark_node as their types.
886
887 2005-11-02 Mark Mitchell <mark@codesourcery.com>
888
889 PR c++/22434
890 * call.c (build_conditional_expr): Do bad conversions, if there's
891 no other choice.
892
893 PR c++/24560
894 * parser.c (cp_parser_postfix_dot_deref_expression): Improve error
895 message for use of overloaded functions on LHS of "." operator.
896
897 PR c++/19253
898 * parser.c (cp_parser_postfix_expression): Use
899 cp_parser_elaborated_type_specifier to handle typename-types in
900 functional casts.
901 (cp_parser_enclosed_argument_list): Skip ahead to the end of the
902 template argument list if the closing ">" is not found.
903
904 PR c++/24569
905 * pt.c (instantiate_decl): Use cp_finish_decl, not
906 finish_static_data_member_decl.
907
908 2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
909
910 * decl.c (grokfndecl): Remove the setting
911 of the return type of the function type
912 of main after erroring about must returning
913 int.
914
915 2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
916
917 PR C++/23229
918 * decl.c (grokfndecl): Create a new function type
919 after erroring out about main not returning int.
920
921 2005-10-28 Josh Conner <jconner@apple.com>
922
923 PR c++/22153
924 * parser.c (cp_parser_member_declaration): Detect and handle
925 a template specialization.
926
927 2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
928
929 PR C++/23426
930 * decl.c (start_decl): Check that the decl is an
931 error_mark_node before getting the type.
932 Remove the check for the decl's type being an
933 error_mark_node.
934
935 2005-10-21 Mark Mitchell <mark@codesourcery.com>
936
937 PR c++/24260
938 * parser.c (cp_parser_init_declarator): Pass attributes to
939 grokfield.
940
941 2005-10-20 Mark Mitchell <mark@codesourcery.com>
942
943 PR c++/22618
944 * search.c (accessible_p): Check access in the outermost set of
945 template parameters.
946
947 2005-10-20 Richard Guenther <rguenther@suse.de>
948
949 * decl.c (grokdeclarator): Fix ambiguous pedwarn message.
950
951 2005-10-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
952
953 PR c++/22293
954 * decl.c (grokdeclarator): Reject unqualified destructors in
955 friend declarations.
956
957 2005-10-18 Mark Mitchell <mark@codesourcery.com>
958
959 PR c++/23293
960 * pt.c (convert_template_argument): Use canonical type variants in
961 template specializations.
962
963 2005-10-18 Nathan Sidwell <nathan@codesourcery.com>
964
965 PR c++/21383
966 * name-lookup.c (arg_assoc): Template args can be null in a
967 template-id-expr.
968
969 PR c++/22604
970 * class.c (update_vtable_entry_for_fn): Don't process invalid
971 covariant overriders.
972
973 PR c++/23118
974 * cp-tree.h (add_method): Add return value.
975 * class.c (add_method): Return success indicator.
976 * semantics.c (finish_member_declaration): Don't add an invalid
977 method to the method list.
978
979 2005-10-17 Mark Mitchell <mark@codesourcery.com>
980
981 PR c++/21908
982 * call.c (build_new_method_call): Do not show VTT parameters to
983 the user.
984
985 2005-10-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
986
987 PR c++/23440
988 * parser.c (cp_parser_statement): If the parser reached CPP_EOF,
989 only complain about missing statement.
990
991 2005-10-17 Nathan Sidwell <nathan@codesourcery.com>
992
993 PR c++/24386
994 * cp-tree.h (BASELINK_QUALIFIED_P): New.
995 * pt.c (tsubst_copy_and_build): <CALL_EXPR case>: Use it.
996 * typeck.c (finish_class_member_access_expr): Set it.
997
998 PR c++/21353
999 * decl.c (check_default_argument): Don't check
1000 processing_template_decl or uses_template_parms here.
1001 (grokparms): Only call check_default_argument when not processing
1002 a template decl.
1003 * parser.c (cp_parser_late_parsing_default_arg): Call
1004 check_default_argument when not processing a template decl.
1005
1006 2005-10-16 Mark Mitchell <mark@codesourcery.com>
1007
1008 PR c++/24389
1009 * decl2.c (mark_used): Use uses_template_parms instead of
1010 dependent_type_p.
1011 * init.c (constant_value_1): Handle uninstantiated templates
1012 specially.
1013 * pt.c (instantiate_decl): Add sanity check.
1014
1015 2005-10-16 Mark Mitchell <mark@codesourcery.com>
1016
1017 PR c++/22173
1018 * typeck.c (check_template_keyword): Fix thinko.
1019
1020 2005-10-16 Andrew Pinski <pinskia@physics.uc.edu>
1021
1022 PR c++/23959
1023 * decl.c (pop_switch): Only call c_do_switch_warnings
1024 when not processing templates.
1025
1026 2005-10-16 Mark Mitchell <mark@codesourcery.com>
1027
1028 PR c++/22173
1029 * cp-tree.h (QUALIFIED_NAME_IS_TEMPLATE): New macro.
1030 (check_template_keyword): New function.
1031 (finish_id_expression): Change prototoype.
1032 (finish_qualified_id_expr): Change prototype.
1033 (build_qualified_name): New function.
1034 (finish_class_member_access_expr): Change prototype.
1035 * init.c (build_offset_ref): Use build_qualified_name.
1036 * mangle.c (write_expression): Likewise.
1037 * parser.c (cp_parser_primary_expression): Remove qualifying_class
1038 parameter. Add address_p and template_arg_p. Use
1039 build_qualified_name.
1040 (cp_parser_id_expression): Default *template_p to
1041 template_keyword_p. Check for invalid uses of the template
1042 keyword.
1043 (cp_parser_postfix_expression): Eliminate special handling for
1044 qualified names. Adjust call to cp_parser_primary_expression.
1045 (cp_parser_postfix_dot_deref_expression): Adjust call to
1046 cp_parser_id_expression and finish_class_member_access_expr.
1047 (cp_parser_template_argument_list): Add comment.
1048 (cp_parser_template_argument): Adjust use of
1049 cp_parser_primary_expression. Remove call to
1050 finish_qualified_id_expr.
1051 (cp_parser_lookup_name): Use build_qualified_name.
1052 * pt.c (tsubst): Use build_qualified_name.
1053 (tsubst_qualified_id): Likewise. Adjust call to
1054 finish_qualified_id_expr.
1055 (tsubst_copy): Use build_qualified_name.
1056 (tsubst_copy_and_build): Adjusts call to finish_id_expression and
1057 finish_class_member_access_expr.
1058 * semantics.c (finish_non_static_data_member): Use
1059 build_qualified_name.
1060 (finish_qualified_id_expr): Add template_p and template_arg_p
1061 parameters.
1062 (finish_id_expression): Remove qualifiying_class parameter. Add
1063 template_p, done, address_p, and template_arg_p. Use
1064 build_qualified_name. Adjust calls to
1065 finish_class_member_acess_expr.
1066 * tree.c (build_qualified_name): New function.
1067 * typeck.c (check_template_keyword): New function.
1068 (finish_class_member_access_expr): Add template_p argument. Check
1069 for invalid uses of the template keyword.
1070
1071 2005-10-15 Mark Mitchell <mark@codesourcery.com>
1072
1073 PR c++/21347
1074 * class.c (maybe_warn_about_overly_private_class): Lazy
1075 constructors are public.
1076
1077 2005-10-14 Mark Mitchell <mark@codesourcery.com>
1078
1079 PR c++/19565
1080 * call.c (convert_like_real): Rely on convert_and_check to issue
1081 warnings about overflow and conversion to unsigned.
1082 * decl.c (finish_enum): Use the location of the enumerators, not
1083 the closing brace of the enumeration, when reporting warnings
1084 about conversions.
1085 (build_enumerator): Use error_mark_node for erroneous values.
1086 * typeck2.c (digest_init): Remove reference to "signature pointer"
1087 from comment.
1088
1089 2005-10-14 Nathan Sidwell <nathan@codesourcery.com>
1090
1091 PR c++/17796
1092 * optimize.c (update_cloned_parm): Add FIRST parameter. Use it.
1093 (maybe_clone_body): Track the first clone.
1094
1095 2005-10-13 Nathan Sidwell <nathan@codesourcery.com>
1096
1097 PR c++/23984
1098 * class.c (build_base_path): The vtable is always the first thing
1099 in the vtt.
1100
1101 2005-10-13 Mark Mitchell <mark@codesourcery.com>
1102
1103 PR c++/20721
1104 * cp-tree.h (DECL_NONTRIVIALLY_INITIALIZED_P): New macro.
1105 * decl.c (duplicate_decls): Merge it into new declarations.
1106 (decl_jump_unsafe): Use it, rather than DECL_INITIAL.
1107 (cp_finish_decl): Set it, when appropriate.
1108
1109 PR c++/22180
1110 * call.c (build_new_method_call): Correct pretty-printing of
1111 destructor names.
1112 * pt.c (tsubst_qualified_id): Recognize invalid uses of "~T" as an
1113 identifier.
1114
1115 PR c++/23694
1116 * decl.c (start_method): Return error_mark_node for errors.
1117
1118 PR c++/23307
1119 * pt.c (push_template_decl_real): Complain about attempts to
1120 declare template variables.
1121
1122 PR c++/22352
1123 * pt.c (tsubst_template_parms): Set processing_template_decl while
1124 processing the parameters.
1125 (tsubst_decl): Set processing_template_decl when substituting into
1126 a TEMPLATE_DECL.
1127
1128 PR c++/22405
1129 * pt.c (most_specialized_instantiation): Robustify.
1130
1131 PR c++/22464
1132 * semantics.c (finish_id_expression): Issue errors about uses of
1133 local variables in containing functions even in templates.
1134
1135 2005-10-12 Danny Smith <dannysmith@users.sourceforge.net>
1136
1137 PR target/21801
1138 PR target/23589
1139 * class.c (finish_struct_1): Call
1140 targetm.cxx.adjust_class_at_definition.
1141
1142
1143 2005-10-12 Nathan Sidwell <nathan@codesourcery.com>
1144
1145 PR c++/21592
1146 * pt.c (build_non_dependent_expr): Don't wrap a COMPONENT_REF
1147 with already looked up member functions. Assert we're not
1148 returning a NON_DEPENDENT_EXPR with unknown type.
1149 * typeck.c (finish_class_member_access_expr): We can get
1150 non-template-id-expr baselinks. If the lookup finds a baselink,
1151 remember it even inside templates.
1152
1153 PR c++/23797
1154 * parser.c (cp_parser_functional_cast): Cope when TYPE is not a
1155 TYPE_DECL. Use dependent_type_p to check type.
1156 * pt.c (uses_template_parms_p): Use dependent_type_p for a
1157 TYPE_DECL.
1158 (type_dependent_expression_p): Assert we've not been given a
1159 TYPE_DECL.
1160
1161 PR c++/21117
1162 * decl.c (check_function_type): Correctly overwrite incomplete
1163 return type with void type.
1164 * typeck.c (check_return_expr): If the function's return type is
1165 void, don't try and convert a return expr.
1166
1167 2005-10-12 David Edelsohn <edelsohn@gnu.org>
1168
1169 PR c++/23730
1170 * call.c (build_object_call): If BINFO is NULL, bypass
1171 lookup_fnfields and set fns to NULL_TREE.
1172
1173 2005-10-12 Paolo Bonzini <bonzini@gnu.org>
1174
1175 PR c++/24052
1176 * error.c (dump_expr): Pass LABEL_DECL to dump_decl. Print
1177 an ADDR_EXPR of a LABEL_DECL as &&.
1178
1179 2005-10-12 Nathan Sidwell <nathan@codesourcery.com>
1180
1181 PR c++/19964
1182 * class.c (walk_subobject_offsets): Don't walk error_mark_node.
1183
1184 2005-10-11 Ian Lance Taylor <ian@airs.com>
1185
1186 PR c++/8057
1187 * cvt.c (convert_to_void): Don't warn about unused values when
1188 processing a template declaration.
1189
1190 2005-10-11 Mark Mitchell <mark@codesourcery.com>
1191
1192 PR c++/21089
1193 * call.c (convert_like_real): Use decl_constant_value, not
1194 integral_constant_value.
1195 * init.c (constant_value_1): New function.
1196 (integral_constant_value): Use it.
1197 (decl_constant_value): Likewise.
1198 * typeck.c (decay_conversion): Use decl_constant_value, not
1199 integral_constant_value.
1200
1201 PR c++/21369
1202 * parser.c (cp_parser_elaborated_type_specifier): Don't treat
1203 class types as templates if the type is not appearing as part of a
1204 type definition or declaration.
1205
1206 2005-10-10 Mark Mitchell <mark@codesourcery.com>
1207
1208 PR c++/24277
1209 * pt.c (instantiate_decl): Call finish_static_data_member_decl for
1210 static data members.
1211
1212 2005-10-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1213 Mark Mitchell <mark@codesourcery.com>
1214
1215 PR c++/23437
1216 * parser.c (cp_parser_template_argument_list): Do not treat
1217 contents of argument list as part of a constant expression.
1218
1219 2005-10-10 Mark Mitchell <mark@codesourcery.com>
1220
1221 PR c++/24139
1222 * decl.c (grokdeclarator): Do not require template parameter lists
1223 for explicitly specialized class.
1224 * error.c (dump_aggr_type): Do not dump template arguments for
1225 non-primary specializations.
1226 (dump_function_name): Likewise.
1227
1228 PR c++/24275
1229 * pt.c (instantiate_decl): Instantiate the initializer of
1230 a static data member in the namespace containing the class
1231 containing the static data member.
1232
1233 2005-10-08 James A. Morrison <phython@gcc.gnu.org>
1234
1235 PR c++/22172
1236 * parser.c (cp_parser_postfix_expression) <RID_TYPENAME>: Treat nontype
1237 scopes as nondependent.
1238
1239 2005-10-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1240
1241 * call.c (resolve_args): Remove redundant test.
1242
1243 2005-10-05 Paolo Bonzini <bonzini@gnu.org>
1244
1245 PR tree-optimization/21419
1246 PR tree-optimization/24146
1247 PR tree-optimization/24151
1248
1249 * semantics.c (finish_asm_stmt): Call readonly_error if outputs are
1250 read-only. Set ASM_VOLATILE_P for asms without outputs.
1251
1252 2005-10-05 Nathan Sidwell <nathan@codesourcery.com>
1253
1254 PR c++/23513
1255 * call.c (joust): Adjust length count to more_specialized_fn.
1256 * pt.c (more_specialized_fn): Cope with non-static member vs
1257 non-member.
1258
1259 2005-10-04 Andrew Pinski <pinskia@physics.uc.edu>
1260
1261 PR middle-end/23125
1262 * decl.c (make_rtl_for_nonlocal_decl): Use set_user_assembler_name
1263 instead of change_decl_assembler_name.
1264
1265 2005-10-03 Alexandre Oliva <aoliva@redhat.com>
1266
1267 * error.c (dump_type) <UNKNOWN_TYPE>: Print reworded message.
1268
1269 2005-10-03 Mark Mitchell <mark@codesourcery.com>
1270
1271 PR c++/17775
1272 * repo.c: Include flags.h.
1273 (finish_repo): Add -frandom-seed to the arguments.
1274
1275 2005-10-02 Mark Mitchell <mark@codesourcery.com>
1276
1277 PR c++/22621
1278 * parser.c (cp_parser_template_argument): Don't turn "T::f" into
1279 "(*this).T::f".
1280 * pt.c (convert_nontype_argument): Remove ??? comment.
1281
1282 PR c++/23840
1283 * tree.c (lvalue_p_1): A VA_ARG_EXPR with class type is an lvalue,
1284 when class rvalues are lvalues.
1285
1286 2005-09-28 Mark Mitchell <mark@codesourcery.com>
1287
1288 PR c++/16782
1289 * decl.c (grokdeclarator): Always pedwarn about overqualified
1290 member names.
1291
1292 2005-09-27 Mark Mitchell <mark@codesourcery.com>
1293
1294 PR c++/22147
1295 * name-lookup.c (maybe_process_template_type_declaration): Don't
1296 treat forward declarations of classes as templates just because
1297 we're processing_template_decl.
1298 * pt.c (tsubst_decl): Clear DECL_TEMPLATE_INFO for friend
1299 functions.
1300
1301 2005-09-26 Jason Merrill <jason@redhat.com>
1302
1303 PR c++/13764
1304 * cp-tree.h (FUNCTION_NEEDS_BODY_BLOCK): New macro.
1305 * name-lookup.c (pushdecl_maybe_friend): Check it.
1306 * decl.c (begin_function_body): Do nothing if it's false.
1307 (finish_function_body): Ditto.
1308 (outer_curly_brace_block): New fn.
1309 (finish_function): Use it.
1310
1311 2005-09-26 Richard Guenther <rguenther@suse.de>
1312
1313 PR middle-end/15855
1314 * decl2.c (do_static_destruction): Remove.
1315 (finish_static_initialization_or_destruction): Likewise.
1316 (DECL_EFFECTIVE_INIT_PRIORITY): New macro.
1317 (NEEDS_GUARD_P): Likewise.
1318 (do_static_initialization): Rename to
1319 do_static_initialization_or_destruction. Process all
1320 initializers/destructors and handle common conditionalizing.
1321 (start_static_initialization_or_destruction): Rename to
1322 one_static_initialization_or_destruction. Handle only
1323 decl-specific conditionalizing.
1324 (cp_finish_file): Call do_static_initialization_or_destruction.
1325
1326 2005-09-22 Jakub Jelinek <jakub@redhat.com>
1327
1328 PR c++/21983
1329 * class.c (find_final_overrider): Move diagnostic about no unique final
1330 overrider to...
1331 (update_vtable_entry_for_fn): ... here.
1332
1333 2005-09-21 Mark Mitchell <mark@codesourcery.com>
1334
1335 PR c++/23993
1336 * init.c (integral_constant_value): Use DECL_INTEGRAL_CONSTANT_VAR_P.
1337
1338 2005-09-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1339
1340 PR c++/23965
1341 * call.c (resolve_args): Return error_mark_node on arguments
1342 whose TREE_TYPE is error_mark_node.
1343
1344 2005-09-20 Jakub Jelinek <jakub@redhat.com>
1345
1346 PR c++/23947
1347 * rtti.c (get_pseudo_ti_init): Recompute ti pointer after
1348 get_tinfo_ptr calls.
1349
1350 2005-09-16 Mark Mitchell <mark@codesourcery.com>
1351
1352 PR c++/23914
1353 * parser.c (cp_parser_enclosed_template_argument_list): Make sure
1354 skip_evaluation is false when processing template arguments.
1355
1356 PR c++/21514
1357 * pt.c (check_instantiated_args): Treat uses of anonymous types as
1358 causing type-deduction failure.
1359
1360 2005-09-15 Jason Merrill <jason@redhat.com>
1361
1362 PR c++/23357
1363 * cp-tree.def (SIZEOF_EXPR, ALIGNOF_EXPR): Change code class to
1364 tcc_expression.
1365
1366 2005-09-15 Mark Mitchell <mark@codesourcery.com>
1367
1368 PR c++/23896
1369 * pt.c (tsubst_aggr_type): Make sure skip_evaluation is false when
1370 processing template arguments.
1371
1372 * pt.c (check_explicit_instantiation_namespace): Fix typo.
1373
1374 PR c++/13140
1375 * decl.c (check_class_member_definition_namespace): New function.
1376 (grokfndecl): Use it.
1377 (grokvardecl): Likewise.
1378 (grokdecl): Improve documentation.
1379 * pt.c (check_explicit_instantiation_namespace): New function.
1380 (register_specialization): Call check_specialization_namespace
1381 when replacing an implicitly instantiated function.
1382 (check_explicit_specialization): Ensure that DECL_CONTEXT is set
1383 correctly for namespace-scope specializations.
1384 (do_decl_instantiation): Use
1385 check_explicit_instantiation_namespace.
1386 (do_type_instantiation): Likewise.
1387
1388 2005-09-15 Nathan Sidwell <nathan@codesourcery.com>
1389
1390 PR c++/23725
1391 * error.c (dump_decl): <USING_DECL case> Use USING_DECL_SCOPE.
1392
1393 2005-09-13 Bastian Blank <waldi@debian.org>
1394
1395 PR c++/16171
1396 * mangle.c (find_substitution): Do not use special substitutions
1397 for identifiers not in std::.
1398
1399 2005-09-13 Mark Mitchell <mark@codesourcery.com>
1400
1401 PR c++/23839
1402 * typeck.c (cxx_mark_addressable): Only check DECL_HARD_REGISTER
1403 for VAR_DECLs.
1404
1405 2005-09-13 Mark Mitchell <mark@codesourcery.com>
1406
1407 PR c++/23842
1408 * pt.c (tsubst_default_argument): Do treat default argument
1409 expressions as occurring in the context of the function called.
1410
1411 2005-09-12 Mark Mitchell <mark@codesourcery.com>
1412
1413 PR c++/23841
1414 * parser.c (cp_parser_primary_expression): Recognize the closing
1415 ">" of a template-argument-list after a floating-point literal as
1416 the end of a cast expression.
1417
1418 2005-09-12 Mark Mitchell <mark@codesourcery.com>
1419
1420 PR c++/23789
1421 * cvt.c (perform_qualification_conversions): Don't create
1422 unnecessary NOP_EXPRs.
1423 * pt.c (tsubst_template_arg): Use fold_non_dependent_expr.
1424
1425 2005-09-12 Ian Lance Taylor <ian@airs.com>
1426
1427 PR g++/7874
1428 * cp-tree.h (struct lang_decl_flags): Add hidden_friend_p
1429 bitfield. Make dummy bitfield one bit smaller.
1430 (DECL_HIDDEN_FRIEND_P): Define.
1431 (pushdecl_maybe_friend): Declare.
1432 (pushdecl_top_level_maybe_friend): Declare.
1433 * decl.c (duplicate_decls): Add newdecl_is_friend parameter.
1434 Change prototype and all callers. Add assertion that a
1435 DECL_ARTIFICIAL FUNCTION_DECL is not DECL_HIDDEN_FRIEND_P. Set
1436 DECL_ANTICIPATED and DECL_HIDDEN_FRIEND_P in duplicated decl if
1437 appropriate.
1438 * name-lookup.c (supplement_binding): Don't ignore a
1439 DECL_HIDDEN_FRIEND_P.
1440 (pushdecl_maybe_friend): Break out contents of pushdecl. Add
1441 is_friend parameter. Set DECL_ANTICIPATED and
1442 DECL_HIDDEN_FRIEND_P for a friend function.
1443 (pushdecl): Just call pushdecl_maybe_friend.
1444 (pushdecl_with_scope): Add is_friend parameter. Change prototype
1445 and all callers.
1446 (pushdecl_namespace_level): Likewise.
1447 (push_overloaded_decl): Likewise. Check DECL_HIDDEN_FRIEND_P as
1448 well as DECL_ANTICIPATED when checking for a builtin.
1449 (do_nonmember_using_decl): Check DECL_HIDDEN_FRIEND_P as well as
1450 DECL_ANTICIPATED when checking for a builtin.
1451 (do_nonmember_using_decl): Likewise.
1452 (pushdecl_top_level_1): Add is_friend parameter. Change all
1453 callers.
1454 (pushdecl_top_level_maybe_friend): New function.
1455 (remove_hidden_names): New function.
1456 (struct arg_lookup): Add args field.
1457 (friend_of_associated_class_p): New static function.
1458 (arg_assoc_namespace): Ignore hidden functions which are not
1459 friends of an associated class of some argument.
1460 (lookup_arg_dependent): Remove hidden functions from list passed
1461 in. Initialize k.args.
1462 * name-lookup.h (remove_hidden_names): Declare.
1463 * friend.c (do_friend): Call pushdecl_maybe_friend instead of
1464 pushdecl.
1465 * call.c (add_function_candidate): Change DECL_ANTICIPATED test to
1466 an assertion, with a check for DECL_HIDDEN_FRIEND_P.
1467 (build_new_function_call): Add koenig_p parameter. Change
1468 prototype and callers.
1469 * pt.c (register_specialization): Add is_friend parameter. Change
1470 all callers.
1471 (push_template_decl_real): Change is_friend parameter to bool.
1472 Change prototype and all callers.
1473 (tsubst_friend_class): Call pushdecl_top_level_maybe_friend
1474 instead of pushdecl_top_level.
1475
1476 2005-09-11 Richard Henderson <rth@redhat.com>
1477
1478 * decl2.c (build_anon_union_vars): Copy attributes from the base addr.
1479 * pt.c (tsubst_decl): Substitute in DECL_VALUE_EXPR.
1480
1481 2005-09-09 Gabriel Dos Reis <gdr@integrable-solutions.net>
1482
1483 * parser.c (cp_parser_translation_unit): Simplify. The while-block
1484 was actually executed at most once.
1485
1486 2005-09-09 Richard Henderson <rth@redhat.com>
1487
1488 PR debug/20998
1489 * cp-tree.def (ALIAS_DECL): Remove.
1490 * cp-lang.c (cp_init_ts): Remove support for it.
1491 * error.c (dump_decl): Likewise.
1492 * name-lookup.c (pushdecl): Likewise.
1493 * semantics.c (finish_id_expression): Likewise.
1494 * decl2.c (build_anon_union_vars): Use a VAR_DECL with
1495 DECL_VALUE_EXPR instead.
1496
1497 2005-09-09 Mark Mitchell <mark@codesourcery.com>
1498
1499 PR c++/22252
1500 * decl.c (start_preparsed_function): Do not pay attention to
1501 #pragma interface for implicitly-defined methods.
1502 * decl2.c (cp_finish_file): Do not complain about uses of inline
1503 functions that have bodies, even if we decided not to emit the
1504 body in this translation unit.
1505 * semantics.c (note_decl_for_pch): Do not mess with linkage.
1506 (expand_or_defer_fn): Make inline, non-template functions COMDAT
1507 at this point.
1508
1509 2005-09-08 Richard Henderson <rth@redhat.com>
1510
1511 PR debug/23190
1512 * decl.c (wrapup_globals_for_namespace): Call
1513 emit_debug_global_declarations.
1514 * decl2.c (cp_finish_file): Likewise.
1515
1516 2005-09-08 Mark Mitchell <mark@codesourcery.com>
1517
1518 PR c++/23691
1519 * decl2.c (mark_used): Instantiate static data members initialized
1520 by constants, even in a template.
1521
1522 2005-09-08 Andrew Pinski <pinskia@physics.uc.edu>
1523
1524 PR obj-c++/16816
1525 * parser.c (cp_parser_objc_selector_expression): Treat CPP_SCOPE as
1526 two CPP_COLON.
1527
1528 2005-09-07 Richard Guenther <rguenther@suse.de>
1529
1530 * cp-gimplify.c (cp_gimplify_expr): Create empty CONSTRUCTOR
1531 for EMPTY_CLASS_EXPR.
1532
1533 2005-09-06 Jakub Jelinek <jakub@redhat.com>
1534
1535 PR c/23075
1536 * typeck.c (check_return_expr): Add no_warning argument. Set
1537 *no_warning to true if "return-statement with no value, in function
1538 returning" warning has been issued.
1539 * cp-tree.h (check_return_expr): Adjust prototype.
1540 * semantics.c (finish_return_stmt): Set TREE_NO_WARNING if
1541 check_return_expr set *no_warning to true.
1542
1543 2005-09-06 Mark Mitchell <mark@codesourcery.com>
1544
1545 * cp-tree.h (rvalue): New function.
1546 * call.c (build_conditional_expr): Use it.
1547 * init.c (build_new_1): Likewise.
1548 * rtti.c (build_dynamic_cast_1): Likewise.
1549 * tree.c (rvalue): New function.
1550 * typeck.c (build_unary_op): Use it.
1551 (build_static_cast_1): Likewise.
1552
1553 PR c++/9782
1554 * init.c (build_new_1): Make sure the entire array type is
1555 complete, not just its element types.
1556
1557 2005-09-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1558
1559 * decl.c (check_elaborated_type_specifier): Remove redundant check.
1560
1561 2005-09-06 Jakub Jelinek <jakub@redhat.com>
1562
1563 PR c++/23056
1564 * typeck.c (ignore_overflows): New helper function.
1565 (build_static_cast_1): Use it.
1566
1567 2005-09-06 Kazu Hirata <kazu@codesourcery.com>
1568
1569 * cp-tree.h, decl.c, decl2.c, semantics.c: Fix comment typos.
1570 Follow spelling conventions.
1571
1572 2005-09-05 Mark Mitchell <mark@codesourcery.com>
1573
1574 PR c++/23667
1575 * pt.c (tsubst_decl): Clear DECL_TEMPLATE_INSTANTIATED when
1576 copying a VAR_DECL.
1577
1578 2005-09-05 Mark Mitchell <mark@codesourcery.com>
1579
1580 PR c++/21440
1581 * semantics.c (finish_stmt_expr_expr): Add an explicit
1582 initialization to the last statement in the statement-expression.
1583 * (finish_stmt_expr): Adjust accordingly.
1584
1585 2005-09-03 Mark Mitchell <mark@codesourcery.com>
1586
1587 PR c++/23699
1588 * decl2.c (mark_used): Always instantiate static data members
1589 initialized by constant expressions.
1590 * pt.c (instantiate_decl): Instantiate the initializers for static
1591 data members initialized by constant expressions.
1592
1593 PR c++/21687
1594 * semantics.c (expand_or_defer_fn): Do not call ggc_collect when
1595 finishing processing for a template function in a local class.
1596 Revert:
1597 2005-09-02 Mark Mitchell <mark@codesourcery.com>
1598 * parser.c (cp_parser_class_specifier): Push/pop GC contexts
1599 around functions in local classes.
1600
1601 2005-09-02 Mark Mitchell <mark@codesourcery.com>
1602
1603 PR c++/21687
1604 * parser.c (cp_parser_class_specifier): Push/pop GC contexts
1605 around functions in local classes.
1606
1607 2005-08-31 Andrew Pinski <pinskia@physics.uc.edu>
1608
1609 PR obj-c++/23640
1610 * decl2.c (cp_finish_file): If this is obj-c++ and we need a static
1611 init, call generate_ctor_or_dtor_function.
1612
1613 2005-08-31 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1614
1615 PR c++/13377
1616 * parser.c (cp_parser_lookup_name): Pass LOOKUP_COMPLAIN to
1617 lookup_name_real on final parse.
1618
1619 2005-08-31 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1620
1621 PR c++/23639
1622 * semantics.c (qualified_name_lookup_error): Do not complain again
1623 on invalid scope.
1624
1625 2005-08-30 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1626
1627 PR c++/23586
1628 * parser.c (cp_parser_namespace_name): Move diagnostic for
1629 invalid namespace-name to here from ...
1630 * name-lookup.c (do_namespace_alias): ... here and ...
1631 (do_using_directive): ... here. Remove dead code.
1632
1633 2005-08-28 Mark Mitchell <mark@codesourcery.com>
1634
1635 PR c++/23099
1636 * cp-tree.h (saved_scope): Add skip_evaluation.
1637 * decl.c (start_decl): Use DECL_INITIALIZED_IN_CLASS_P, not
1638 DECL_INITIAL, to determine whether or not a static data member was
1639 initialized in the class-specifier.
1640 (cp_finish_decl): Add comment.
1641 * init.c (integral_constant_value): Subtitute into the
1642 initializers for static data members in templates.
1643 * name-lookup.c (push_to_top_level): Save skip_evaluation.
1644 (pop_from_top_level): Restore it.
1645 * pt.c (instantiate_class_template): Do not substitute into the
1646 intializers of static data members when instantiating a class.
1647 (regenerate_decl_from_template): Simplify.
1648 (instantiate_decl): Tidy. Substitute into the initializer for a
1649 static data member even when the definition of the data member is
1650 not available.
1651
1652 2005-08-26 Mark Mitchell <mark@codesourcery.com>
1653
1654 PR c++/19004
1655 * pt.c (uses_template_parms): Handle IDENTIFIER_NODE.
1656 (type_dependent_expression_p): Allow BASELINKs whose associated
1657 functions are simply a FUNCTION_DECL.
1658
1659 PR c++/23491
1660 * cp-tree.h (build_vec_init): Adjust prototype.
1661 * init.c (perform_member_init): Adjust call to build_vec_init.
1662 (build_aggr_init): Likewise.
1663 (build_new_1): Do not call build_default_init for array types.
1664 (build_vec_init): Add explicit_default_init_p parameter. Perform
1665 default initialization of vector elements when set.
1666 * typeck.c (build_modify_expr): Adjust call to build_vec_init.
1667
1668 2005-08-25 Nathan Sidwell <nathan@codesourcery.com>
1669
1670 PR c++/20817
1671 * typeck.c (build_x_unary_op): Make sure OFFSET_REF is not for a
1672 ->*.
1673
1674 2005-08-24 Nathan Sidwell <nathan@codesourcery.com>
1675
1676 PR c++/22454
1677 * parser.c (cp_lexer_peek_nth_token): Relax assert.
1678
1679 2005-08-23 Nathan Sidwell <nathan@codesourcery.com>
1680
1681 PR c++/23044
1682 * pt.c (tsubst_qualified_id): A SCOPE_REF can still remain.
1683
1684 2005-08-22 James E Wilson <wilson@specifix.com>
1685
1686 PR tree-optimization/23426
1687 * decl.c (grokdeclarator): Use TYPE_SIZE_UNIT not TYPE_SIZE for
1688 array size check.
1689
1690 2005-08-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1691
1692 PR c++/22233
1693 * pt.c (push_template_decl_real): Return error_mark_node if the
1694 number of template parameters does not match previous definition.
1695
1696 2005-08-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1697
1698 PR c++/23089
1699 * decl.c (require_complete_types_for_parms): Mark incomplete types
1700 as invalid.
1701
1702 2005-08-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1703
1704 * parser.c (cp_parser_nth_token_starts_template_argument_list_p):
1705 Fix typo in leading comment.
1706
1707 2005-08-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1708
1709 * name-lookup.c, ptree.c: Delete HOST_PTR_PRINTF.
1710
1711 2005-08-15 Fariborz Jahanian <fjahanian@apple.com>
1712
1713 * cp-tree.h (can_convert_arg, fn_type_unification): New argument.
1714 * call.c (add_template_candidate_real): Pass down 'flags' to
1715 fn_type_unification.
1716 (can_convert_arg): New 'flags' argument. Pass it to call to
1717 implicit_conversion instead of LOOKUP_NORMAL.
1718 (can_convert): Add LOOKUP_NORMAL to call to can_convert_arg.
1719 * class.c (resolve_address_of_overloaded_function): Ditto.
1720 (resolve_address_of_overloaded_function): Ditto.
1721 * decl.c (reshape_init, check_default_argument): Ditto.
1722 * typeck.c (build_ptrmemfunc): Ditto.
1723 * pt.c (type_unification_real): Add 'flags' argument.
1724 (fn_type_unification): Pass 'flags' to type_unification_real.
1725 (type_unification_real): Pass new 'flags' argument to call to
1726 can_convert_arg.
1727
1728 2005-08-12 Giovanni Bajo <giovannibajo@libero.it>
1729 Nathan Sidwell <nathan@codesourcery.com>
1730
1731 PR c++/21799
1732 PR c++/8271
1733 * pt.c (unify) <METHOD_TYPE>: Check this-pointer cv-qualifiers
1734 explicitly.
1735
1736 2005-08-12 Nathan Sidwell <nathan@codesourcery.com>
1737
1738 PR c++/21799
1739 Revert my 2005-07-08 patch
1740 * pt.c (type_unification_real): Remove is_method_argument and
1741 assoicated checks.
1742 (fn_type_unification, unify): Adjust type_unification_real calls.
1743
1744 2005-08-11 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1745
1746 PR c++/23266
1747 * decl2.c (grokfield): Check that method is not static before
1748 marking it as pure.
1749
1750 2005-08-11 Nathan Sidwell <nathan@codesourcery.com>
1751
1752 PR c++/23219
1753 * name-lookup.c (pushtag): Process the template type before
1754 altering the identifier lookup fields. Remove unreachable code
1755 creating an empty stub decl.
1756
1757 2005-08-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1758
1759 PR c++/20646
1760 * decl.c (grokdeclarator): Reset storage_class after error.
1761
1762 2005-08-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1763
1764 PR c++/22508
1765 * init.c (build_new_1): Check for empty candidate list.
1766
1767 2005-08-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1768
1769 PR c++/23191
1770 * pt.c (tsubst) <case METHOD_TYPE>: Check for error_mark_node
1771 before calling build_exception_variant.
1772
1773 2005-08-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1774
1775 PR c++/19498
1776 * pt.c (tsubst_decl) <case TEMPLATE_DECL>: Return ERROR_MARK_NODE
1777 if substitution of template args did not succeed.
1778
1779 2005-08-06 Michael Matz <matz@suse.de>
1780
1781 * method.c (use_thunk): Call init_insn_lengths.
1782
1783 2005-08-05 James A. Morrison <phython@gcc.gnu.org>
1784
1785 PR c++/22514
1786 * name-lookup.c (cp_emit_debug_info_for_using): Do nothing if
1787 sorrycount or errorcount are nonzero.
1788
1789 2005-08-05 Mark Mitchell <mark@codesourcery.com>
1790
1791 * name-lookup.c (pushtag): Remove accidental commit from:
1792 2004-12-21 Mark Mitchell <mark@codesourcery.com>
1793 PR c++/19063
1794 * decl.c (grokdeclarator): Return error_mark_node, not
1795 void_type_node, to indicate errors.
1796 * parser.c (cp_parser_template_parameter_list): Robustify.
1797 (cp_parser_template_parameter): Likewise.
1798
1799 2005-08-01 Kazu Hirata <kazu@codesourcery.com>
1800
1801 * class.c, decl.c, name-lookup.c, pt.c, typeck.c, typeck2.c:
1802 Fix comment typos.
1803
1804 2005-07-29 Kazu Hirata <kazu@codesourcery.com>
1805
1806 * method.c: Fix a comment typo.
1807
1808 2005-07-28 Mark Mitchell <mark@codesourcery.com>
1809
1810 PR c++/22545
1811 * call.c (add_builtin_candidate): Adjust for changes in
1812 representation of pointer-to-member types.
1813
1814 2005-07-28 Mike Stump <mrs@apple.com>
1815
1816 * pt.c (check_explicit_specialization): Add visibility logic.
1817 (lookup_template_class): Likewise.
1818 (instantiate_class_template): Likewise.
1819
1820 2005-07-27 Devang Patel <dpatel@apple.com>
1821
1822 * name-lookup.c (pushtag): Do no set DECL_IGNORED_P bit.
1823
1824 2005-07-25 Ian Lance Taylor <ian@airs.com>
1825
1826 * ptree.c (cxx_print_identifier): Print a leading space if the
1827 indent level is 0.
1828
1829 2005-07-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1830
1831 * call.c (convert_for_arg_passing): Check function pointers when
1832 -Wmissing-format-attribute is activated.
1833 * typeck.c (convert_for_assignment): Likewise.
1834
1835 2005-07-22 Manfred Hollstein <mh@suse.com>
1836
1837 * parser.c (cp_parser_declaration): Fix unitialised warnings.
1838
1839 2005-07-21 Andrew Pinski <pinskia@physics.uc.edu>
1840
1841 * class.c (build_base_path): Fix typo.
1842
1843 2005-07-21 Andrew Pinski <pinskia@physics.uc.edu>
1844
1845 PR C++/22358
1846 * class.c (build_base_path): Convert BINFO_OFFSET to the correct type.
1847
1848 2005-07-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1849
1850 * call.c: Fix comment typo(s).
1851 * cxx-pretty-print.h: Likewise.
1852 * name-lookup.c: Likewise.
1853 * parser.c: Likewise.
1854
1855 2005-07-20 Douglas Gregor <doug.gregor@gmail.com>
1856
1857 PR c++/2922
1858 * semantics.c (perform_koenig_lookup): For dependent calls, just
1859 return the set of functions we've found so far. Later, it will be
1860 augmented by those found through argument-dependent lookup.
1861 * name-lookup.c (lookup_arg_dependent): Implement DR 164 by removing
1862 the optimization that skips namespaces where the functions were
1863 originally found.
1864
1865 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
1866
1867 Make CONSTRUCTOR use VEC to store initializers.
1868 * call.c (convert_default_arg): Update call to digest_init.
1869 * class.c (dump_class_hierarchy, dump_array): Update to cope with
1870 VEC in CONSTRUCTOR_ELTS.
1871 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Likewise.
1872 (finish_compound_literal, digest_init): Update declaration.
1873 * decl.c (struct reshape_iter): New data type.
1874 (reshape_init_array): Rename to...
1875 (reshape_init_array_1): Update to cope with VEC in CONSTRUCTOR_ELTS.
1876 (reshape_init): Rewrite from scratch. Split parts into...
1877 (reshape_init_array, reshape_init_vector, reshape_init_class,
1878 reshape_init_r): New functions.
1879 (check_initializer): Update call to reshape_init. Remove obsolete
1880 code.
1881 (initialize_artificial_var, cp_complete_array_type): Update to cope
1882 with VEC in CONSTRUCTOR_ELTS.
1883 * decl2.c (grokfield): Update calls to digest_init.
1884 (mark_vtable_entries): Update to cope with VEC in CONSTRUCTOR_ELTS.
1885 * error.c (dump_expr_init_vec): New function.
1886 (dump_expr): Use dump_expr_init_vec.
1887 * init.c (build_zero_init, build_vec_init): Update to cope with VEC
1888 in CONSTRUCTOR_ELTS.
1889 (expand_default_init): Update call to digest_init.
1890 * parser.c (cp_parser_postfix_expression): Use a VEC for the
1891 initializers.
1892 (cp_parser_initializer_list): Build a VEC of initializers.
1893 * pt.c (tsubst_copy, tsubst_copy_and_build): Update to cope with VEC
1894 in CONSTRUCTOR_ELTS.
1895 * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer,
1896 ptm_initializer, class_initializer, get_pseudo_ti_init): Use
1897 build_constructor_from_list instead of build_constructor.
1898 * semantics.c (finish_compound_literal): Update call to digest_init.
1899 * tree.c (stabilize_init): Update to cope with VEC in
1900 CONSTRUCTOR_ELTS.
1901 * typeck.c (build_ptrmemfunc1): Likewise.
1902 * typeck2.c: (cxx_incomplete_type_error, split_nonconstant_init_1):
1903 Likewise.
1904 (store_init_value): Use build_constructor_from_list and update call
1905 to digest_init.
1906 (digest_init): Rewrite.
1907 (process_init_constructor): Rewrite from scratch. Split into...
1908 (process_init_constructor_array, picflag_from_initializer,
1909 process_init_constructor_record, process_init_constructor_union):
1910 New functions.
1911 (PICFLAG_ERRONEOUS, PICFLAG_NOT_ALL_CONSTANT, PICFLAG_NOT_ALL_SIMPLE):
1912 New macros.
1913 (build_functional_cast): Use build_constructor_from_list instead of
1914 build_constructor.
1915
1916 2005-07-18 Mark Mitchell <mark@codesourcery.com>
1917
1918 PR c++/22263
1919 * cp-tree.h (instantiate_decl): Change prototype.
1920 * decl2.c (mark_used): Adjust accordingly.
1921 * pt.c (do_decl_instantiation): Likewise.
1922 (instantiate_class_member): Likewise.
1923 (instantiate_decl): Rename undefined_ok as expl_inst_class_mem_p.
1924 Clear DECL_INTERFACE_KNOWN for an explicitly instantiated template
1925 that has no definition available.
1926 (instantiate_pending_templates): Adjust call to instantiate_decl.
1927
1928 2005-07-17 Mark Mitchell <mark@codesourcery.com>
1929
1930 PR c++/22139
1931 * cp-tree.h (DECL_TEMPLATE_INFO): Improve documentation.
1932 * decl.c (duplicate_decls): Re-register template specializations
1933 for functions that have DECL_TEMLPLATE_INFO, even if they do not
1934 have DECL_TEMPLATE_INSTANTIATION set.
1935
1936 2005-07-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1937
1938 * call.c (diagnostic_fn_t): New.
1939 (build_temp, convert_like_real): Use diagnostic_fn_t.
1940
1941 2005-07-15 Mark Mitchell <mark@codesourcery.com>
1942
1943 PR c++/22204
1944 * repo.c (repo_emit_p): Robustify.
1945
1946 2005-07-14 Daniel Berlin <dberlin@dberlin.org>
1947
1948 Fix PR c++/22452
1949 * tree.c (decl_linkage): Don't check DECL_COMDAT on CONST_DECL.
1950
1951 2005-07-15 Mark Mitchell <mark@codesourcery.com>
1952
1953 PR c++/22132
1954 * call.c (implicit_conversion): Add c_cast_p parameter.
1955 (standard_conversion): Likewise. Allow conversions between
1956 differently-qualified pointer types when performing a C-style
1957 cast.
1958 (add_function_candidate): Adjust callee.
1959 (build_builtin_candidate): Likewise.
1960 (build_user_type_conversion_1): Likewise.
1961 (conditional_conversion): Likewise.
1962 (can_convert_arg): Likewise.
1963 (can_convert_arg_bad): Likewise.
1964 (perform_implicit_conversion): Likewise.
1965 * cp-tree.h (comp_ptr_ttypes_const): Declare.
1966 * typeck.c (comp_ptr_ttypes_const): Give it external linkage.
1967 Return bool.
1968
1969 2005-07-12 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1970 Nathan Sidwell <nathan@codesourcery.com>
1971
1972 PR c++/20172
1973 * pt.c (tsubst_template_parms): Check for invalid non-type
1974 parameters.
1975
1976 2005-07-09 Andrew Pinski <pinskia@physics.uc.edu>
1977
1978 * cp-lang.c (shadowed_var_for_decl, decl_shadowed_for_var_lookup,
1979 decl_shadowed_for_var_insert): Move over to cp-objcp-common.c.
1980 (cp_init_ts): Call init_shadowed_var_for_decl.
1981 Remove include of gt-cp-cp-lang.h.
1982 * cp-objcp-common.c (shadowed_var_for_decl,
1983 decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Moved from
1984 cp-lang.c.
1985 (init_shadowed_var_for_decl): New function to initialize
1986 shadowed_var_for_decl.
1987 Include gt-cp-cp-objcp-common.h.
1988 * Make-lang.in (gt-cp-lang.h): Remove.
1989 (gt-cp-cp-objcp-common.h): Add.
1990 (cp/cp-lang.o): Remove dependancy on gt-cp-lang.h.
1991 (cp/cp-objcp-common.o): Add dependancy on gt-cp-cp-objcp-common.h.
1992 * config-lang.in (gtfiles): Remove cp-lang.c and Add cp-objcp-common.c.
1993 * cp-tree (init_shadowed_var_for_decl): Add prototype.
1994
1995 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
1996
1997 * Make-lang.in: Add gt-cp-lang.h.
1998 (cp-lang.o): Ditto.
1999 * class.c (create_vtable_ptr): Stop setting DECL_ASSEMBLER_NAME on
2000 the field.
2001 * config-lang.in: Add cp-lang.c to gtfiles.
2002 * cp-lang.c: Include hashtab.h.
2003 (cp_init_ts): New function.
2004 (LANG_HOOK_INIT_TS): Use macro.
2005 (decl_shadowed_for_var_lookup): New function.
2006 (decl_shadowed_for_var_insert): Ditto.
2007 * cp-tree.h (THUNK_FUNCTION_CHECK): Use decl_common.
2008 (NON_THUNK_FUNCTION_CHECK): Ditto.
2009 (DECL_NAMESPACE_ASSOCIATIONS): Use decl_non_common.
2010 (DECL_INIT_PRIORITY): Ditto.
2011 (DECL_HAS_SHADOWED_FOR_VAR_P): Ditto.
2012 (DECL_SHADOWED_FOR_VAR): Use hashtable.
2013 (SET_DECL_SHADOWED_FOR_VAR): Ditto.
2014 * decl.c (duplicate_decls): Update for new/updated structures.
2015 (poplevel): Use SET_DECL_SHADOWED_FOR_VAR.
2016 * decl2.c (start_static_initialization_or_destruction): Deal with
2017 priority.
2018 * pt.c (tsubst_decl): Check TS_DECL_WRTL before doing
2019 SET_DECL_RTL.
2020 * tree.c (handle_init_priority_attribute): Handle priority.
2021
2022 2005-07-08 Nathan Sidwell <nathan@codesourcery.com>
2023
2024 PR c++/21799
2025 * pt.c (type_unification_real): Add is_method argument. Use it
2026 for this pointer unification.
2027 (fn_type_unification): Adjust type_unification_real call.
2028 (unify): Likewise.
2029
2030 2005-07-07 Nathan Sidwell <nathan@codesourcery.com>
2031
2032 * pt.c (type_unification_real): Remove allow_incomplete argument.
2033 Remove unreachable code.
2034 (fn_type_unification): Adjust call to type_unification_real.
2035 (unify): Likewise.
2036
2037 2005-07-05 Paolo Bonzini <bonzini@gnu.org>
2038
2039 * Makefile.in (class.o, decl2.o): Adjust dependencies.
2040 * class.c: Include tree-dump.h.
2041 * decl2.c: Include tree-dump.h.
2042
2043 2005-07-02 Gabriel Dos Reis <gdr@integrable-solutions.net>
2044
2045 * dump.c: Use dump_string_field.
2046
2047 2005-07-03 Joseph S. Myers <joseph@codesourcery.com>
2048
2049 * cp-tree.h (GCC_DIAG_STYLE): #undef before defining. Change
2050 minimum GCC version for format checking to 4.1.
2051
2052 2005-07-02 Kazu Hirata <kazu@codesourcery.com>
2053
2054 * Make-lang.in (cc1plus-checksum.c): Use
2055 build/genchecksum$(build_exeext), not build/genchecksum$(exeext).
2056
2057 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
2058
2059 * name-lookup.c, parser.c: Use %q, %< and %> to quote in
2060 diagnostics.
2061
2062 2005-07-02 Zack Weinberg <zack@codesourcery.com>
2063 Joseph S. Myers <joseph@codesourcery.com>
2064
2065 * error.c (location_of): Add comment.
2066 (locate_error, cp_error_at, cp_warning_at, cp_pedwarn_at): Remove.
2067 * cp-tree.h (cp_error_at, cp_warning_at, cp_pedwarn_at): Remove.
2068 * call.c, class.c, decl.c, decl2.c, friend.c, init.c,
2069 name-lookup.c, parser.c, pt.c, search.c, semantics.c, typeck.c,
2070 typeck2.c: Use '+' flag instead of %J, cp_error_at, cp_warning_at
2071 or cp_pedwarn_at. Mark up some diagnostic strings with N_.
2072
2073 2005-06-30 Daniel Berlin <dberlin@dberlin.org>
2074
2075 * decl.c (require_complete_types_for_parms): Call relayout_decl
2076 instead of layout_decl.
2077
2078 2005-06-30 Zack Weinberg <zack@codesourcery.com>
2079 Jakub Jelinek <jakub@redhat.com>
2080
2081 * cp-lang.c: No need to include cxx-pretty-print.h.
2082 * error.c (cp_printer): Update signature. No need to process
2083 flags.
2084 (print_instantiation_partial_context): Output last newline
2085 with pp_base_newline.
2086 * Make-lang.in: Update dependencies.
2087
2088 2005-06-30 Steven Bosscher <stevenb@suse.de>
2089
2090 * decl.c (start_decl): Replace DECL_THREAD_LOCAL with
2091 DECL_THREAD_LOCAL_P.
2092 (cp_finish_decl): Likewise.
2093 (grokvardecl): Set the default DECL_TLS_MODEL here.
2094
2095 2005-06-28 Joseph S. Myers <joseph@codesourcery.com>
2096
2097 * cvt.c (ocp_convert): Use invalid_conversion hook.
2098 * typeck.c (build_binary_op): Use invalid_binary_op hook.
2099 (build_unary_op): Use invalid_unary_op hook.
2100
2101 2005-06-28 Paul Brook <paul@codesourcery.com>
2102
2103 * Make-lang.in (cp/except.o): Depend on $(TARGET_H)
2104 * except.c: Include target.h.
2105 (init_exception_processing): Initialize unwind_resume_libfunc.
2106 * doc/tm.texi: Document TARGET_ASM_TTYPE
2107
2108 2005-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2109
2110 * call.c (build_over_call): Pass in named argument list to
2111 `check_function_arguments'.
2112 * typeck.c (build_function_call): Likewise.
2113
2114 2005-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2115
2116 * cp-tree.h (lang_check_failed): Add noreturn attribute.
2117
2118 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
2119
2120 * all files: Update FSF address in copyright headers.
2121
2122 2005-06-23 Jason Merrill <jason@redhat.com>
2123
2124 PR c++/19317
2125 * semantics.c (simplify_aggr_init_expr): Use
2126 CALL_EXPR_RETURN_SLOT_OPT, not CALL_EXPR_HAS_RETURN_SLOT_ADDR.
2127
2128 2005-06-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2129
2130 * pt.c (register_specialization): Remove superfluous assertion.
2131
2132 2005-06-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2133
2134 * call.c (convert_like_real): Add format attribute.
2135 * typeck.c (check_for_casting_away_constness,
2136 build_static_cast_1): Likewise.
2137 * typeck2.c (readonly_error, cxx_incomplete_type_diagnostic):
2138 Likewise.
2139
2140 2005-06-17 Geoffrey Keating <geoffk@apple.com>
2141
2142 PR c++/17413
2143 * pt.c (type_unification_real): Apply template type deduction even
2144 to procedure parameters that are not dependent on a template
2145 parameter.
2146
2147 2005-06-16 Nathan Sidwell <nathan@codesourcery.com>
2148
2149 * rtti.c (get_tinfo_decl): Avoid caching tinfo_descs when it might
2150 change.
2151 (create_pseudo_type_info): First parameter is an int.
2152
2153 2005-06-15 Nathan Sidwell <nathan@codesourcery.com>
2154
2155 PR c++/20678
2156 * error.c (dump_expr) <COMPONENT_REF case>: Check DECL_NAME is not
2157 null.
2158
2159 * Make-lang.in: Reformat some long lines.
2160 (gt-cp-rtti.h): New target.
2161 (cp/rtti.o): Add dependency.
2162 * config-lang.in (gtfiles): Add cp/rtti.c.
2163 * cp-tree.h (CPTI_TI_DESC_TYPE, CPTI_BLTN_DESC_TYPE,
2164 CPTI_PTR_DESC_TYPE, CPTI_ARY_DESC_TYPE, CPTI_FUNC_DESC_TYPE,
2165 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE,
2166 CPTI_SI_CLASS_DESC_TYPE, CPTI_VMI_CLASS_DESC_TYPE,
2167 CPTI_PTM_DESC_TYPE, CPTI_BASE_DESC_TYPE): Remove.
2168 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
2169 ary_desc_type_node, func_desc_type_node, enum_desc_type_node,
2170 class_desc_type_node, si_class_desc_type_node,
2171 vmi_class_desc_type_node, ptm_desc_type_node,
2172 base_desc_type_node): Remove.
2173 * decl.c: Adjust documentation of global trees.
2174 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL,
2175 TINFO_REAL_NAME): Remove.
2176 (struct tinfo_s): New.
2177 (enum tinfo_kind): New.
2178 (tinfo_descs): New.
2179 (get_tinfo_decl): Adjust use of tinfo descriptor.
2180 (tinfo_base_init, generic_initializer, ptr_initializer,
2181 ptm_initializer, class_initializer): Likewise.
2182 (get_pseudo_ti_init): Take descriptor index. Adjust.
2183 (create_pseudo_type_info): Likewise.
2184 (get_pseudo_ti_desc): Return descriptor index. Adjust.
2185 (create_tinfo_types): Adjust use of create_pseudo_type_info.
2186 (emit_tinfo_decl): Adjust use of tinfo descriptor.
2187
2188 2005-06-14 Roger Sayle <roger@eyesopen.com>
2189
2190 * decl.c (grokdeclarator): Only check TREE_OVERFLOW on INTEGER_CST.
2191
2192 2005-06-13 Geoffrey Keating <geoffk@apple.com>
2193
2194 * Make-lang.in (c++.install-man): Doesn't really depend on installdirs.
2195 (rule for installing g++.1 manpage): Does depend on installdirs.
2196
2197 2005-06-13 Nathan Sidwell <nathan@codesourcery.com>
2198
2199 PR c++/20789
2200 * decl.c (cp_finish_decl): Clear runtime runtime initialization if
2201 in-class decl's initializer is bad.
2202
2203 PR c++/21929
2204 * parser.c (struct cp_parser): Document that scope could be
2205 error_mark.
2206 (cp_parser_diagnose_invalid_type_name): Cope with error_mark for
2207 scope.
2208 (cp_parser_nested_name_specifier): Return NULL_TREE on error.
2209 (cp_parser_postfix_expression): Deal with null or error_mark
2210 scope.
2211 (cp_parser_elaborated_type_specifier): Adjust
2212 cp_parser_nested_name_specifier call.
2213
2214 * parser (cp_parser_skip_to_end_of_block_or_statement): Cleanup.
2215
2216 2005-06-12 Roger Sayle <roger@eyesopen.com>
2217
2218 PR c++/21930
2219 * error.c (dump_expr): UNARY_PLUS_EXPR need not handle void types.
2220 Treat CONVERT_EXPR identically to NOP_EXPR.
2221
2222 2005-06-10 Aldy Hernandez <aldyh@redhat.com>
2223
2224 PR c++/10611
2225 * cvt.c (build_expr_type_conversion): Same.
2226 * typeck.c (build_binary_op): Handle vectors.
2227 (common_type): Same.
2228 (type_after_usual_arithmetic_conversions): Same.
2229
2230 2005-06-08 Nathan Sidwell <nathan@codesourcery.com>
2231
2232 PR c++/19497
2233 * cp-tree.def (USING_DECL): Update documentation.
2234 * cp-tree.h (DECL_DEPENDENT_P): New.
2235 (USING_DECL_DECLS, USING_DECL_SCOPE): New.
2236 * class.c (handle_using_decl): Move most of the processing to ...
2237 * name-lookup.c (do_class_using_decl): ... here. Make stricter.
2238 (push_using_decl): Use USING_DECL_SCOPE.
2239 (cp_emit_debug_info_for_using): Make extern.
2240 * cxx-pretty-print.c (pp_cxx_statement) <USING_DECL case>: Adjust.
2241 * name-lookup.h (cp_emit_debug_info_for_using): Declare.
2242 * pt.c (tsubst_decl) <USING_DECL case>: Use do_class_using_decl
2243 when tsubsting.
2244 (tsubst_expr): Use USING_DECL_SCOPE.
2245 * search.c (lookup_field_1): Use DECL_DEPENDENT_P.
2246 * semantics.c (finish_member_declaration): Likewise.
2247
2248 2005-06-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2249
2250 PR c++/19894
2251 * pt.c (tsubst): Reject pointer-to-member of type void.
2252
2253 PR c++/20563
2254 * parser.c (cp_parser_label_declaration): Deal with invalid/missing
2255 identifiers.
2256
2257 2005-06-07 Nathan Sidwell <nathan@codesourcery.com>
2258
2259 * cp-tree.def (DEFAULT_ARG): Adjust documentation.
2260 * cp-tree.h (DEFARG_INSTANTIATIONS): New.
2261 (struct tree_default_arg): Add instantiations member.
2262 * parser.c (cp_parser_late_parsing_default_args): Adjust to use a
2263 VEC.
2264 * pt.c (tsubst_arg_types): Likewise.
2265
2266 * parser.c (cp_parser_late_parsing_default_args): Fix overeager
2267 assert in previous patch.
2268
2269 2005-06-06 Jakub Jelinek <jakub@redhat.com>
2270
2271 * error.c (locate_error): Use gmsgid instead of msgid for argument
2272 name.
2273 (cp_error_at, cp_warning_at, cp_pedwarn_at): Likewise.
2274
2275 2005-06-06 Nathan Sidwell <nathan@codesourcery.com>
2276
2277 PR 21903
2278 * cp-tree.def (DEFAULT_ARG): Document TREE_CHAIN use.
2279 * parser.c (cp_parser_late_parsing_default_args): Propagate parsed
2280 argument to any early instantiations.
2281 * pt.c (tsubst_arg_types): Chain early instantiation of default arg.
2282
2283 PR c++/20637
2284 * cp-tree.h (add_method): Add using_decl parameter.
2285 * class.c (add_method): Add using_decl parameter. Adjust error
2286 messages.
2287 (handle_using_decl): Pass the using decl to add_method.
2288 (clone_function_decl): Adjust add_member calls.
2289 * decl2.c (check_classfn): Likewise.
2290 * method.c (lazily_declare_fn): Likewise.
2291 * semantics.c (finish_member_declaration): Likewise.
2292
2293 * method.c (synthesize_method): Use inform, not warning.
2294
2295 2005-06-06 Hans-Peter Nilsson <hp@axis.se>
2296
2297 * config-lang.in (target_libs): Remove target-gperf.
2298
2299 2005-06-05 Mark Mitchell <mark@codesourcery.com>
2300
2301 PR c++/21619
2302 * cp-tree.h (DECL_IS_BUILTIN_CONSTANT_P): New macro.
2303 * parser.c (cp_parser_postfix_expression): Allow non-constant
2304 expressions as arguments to __builtin_constant_p.
2305 * tree.c (builtin_valid_in_constant_expr_p): Use
2306 DECL_IS_BUILTIN_CONSTANT_P.
2307
2308 2005-06-03 Mark Mitchell <mark@codesourcery.com>
2309
2310 PR c++/21853
2311 * typeck.c (casts_away_constness_r): Do not drop cv-qualifiers on
2312 the pointed-to type for a pointer-to-member.
2313
2314 PR c++/21336
2315 * cp-tree.h (grok_op_properties): Remove friendp parameter.
2316 * decl.c (grokfndecl): Adjust call.
2317 (grok_op_properties): Determine the class of which the function is
2318 a member by looking at its DECL_CONTEXT, not current_class_type.
2319 * pt.c (tsubst_decl): Adjust call to grok_op_properties.
2320
2321 2005-06-02 Nathan Sidwell <nathan@codesourcery.com>
2322
2323 * method.c (synthesize_method): Add addtional arg to warning call.
2324
2325 PR c++/21280
2326 * Make-lang.in (method.o): Add diagnostic.h
2327 * decl.c (start_preparsed_function): Use decl's location for file
2328 info.
2329 * decl2.c (cp_finish_file): Set input_location before synthesizing
2330 a function.
2331 (mark_used): When deferring a synthesized function, save current
2332 location. Do not set function's location when actually
2333 synthesizing it.
2334 * method.c: #include diagnostic.h.
2335 (synthesize_method): Set the functions source location. Show
2336 needed location if errors are emitted.
2337
2338 * decl.c (start_decl): Simplify specialization handling. Remove
2339 unneeded CLASSTYPE_TEMPLATE_INSTANTIATION check.
2340 * mangle.c (discriminator_for_local_entity): Use VEC_index.
2341
2342 PR c++/20350
2343 * decl.c (duplicate_decls): Copy all of DECL_USE_TEMPLATE.
2344
2345 PR c++/21151
2346 * name-lookup.c (pushtag): Push local class even in a template.
2347
2348 2005-05-31 Nathan Sidwell <nathan@codesourcery.com>
2349
2350 PR c++/21165
2351 * init.c (integral_constant_value): Check the type of the
2352 initializer, not the decl.
2353
2354 2005-05-30 Mark Mitchell <mark@codesourcery.com>
2355
2356 PR c++/21784
2357 * name-lookup.c (do_nonmember_using_decl): Ignore builtin
2358 functions, even when the used name is not a function.
2359
2360 2005-05-30 Kazu Hirata <kazu@cs.umass.edu>
2361
2362 * operators.def, optimize.c: Update copyright.
2363
2364 2005-05-28 Mark Mitchell <mark@codesourcery.com>
2365
2366 PR c++/21210
2367 * call.c (standard_conversion): Permit conversions to complex
2368 types if conversion to the corresponding scalar type would be
2369 permitted.
2370
2371 PR c++/21340
2372 * method.c (implicitly_declare_fn): Clear processing_template_decl
2373 when generating implicit declaration.
2374
2375 2005-05-27 Mark Mitchell <mark@codesourcery.com>
2376
2377 PR c++/21614
2378 * typeck.c (get_member_function_from_ptrfunc): Do not attempt
2379 conversions to base classes of incomplete types.
2380
2381 2005-05-27 Ian Lance Taylor <ian@airs.com>
2382
2383 * semantics.c (add_stmt): Add C++ frontend specific version.
2384 * cp-tree.h (STMT_IS_FULL_EXPR_P): Define.
2385 (stmts_are_full_exprs_p): Declare.
2386
2387 2005-05-27 Roger Sayle <roger@eyesopen.com>
2388 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2389
2390 * cp-tree.def (UNARY_PLUS_EXPR): New C++ unary tree code.
2391 * parser.c (cp_parser_unary_expression): Use UNARY_PLUS_EXPR instead
2392 of CONVERT_EXPR.
2393 (cp_parser_unary_expression): Likewise.
2394 * typeck.c (build_unary_op): Likewise.
2395 * call.c (add_builtin_candidate, build_new_op): Likewise.
2396 * error.c (dump_expr): Likewise.
2397 * pt.c (tsubst_copy, tsubst_copy_and_build): Likewise.
2398 * decl.c (ambi_op_p, grok_op_properties): Likewise.
2399 * dump.c (dump_op): Likewise.
2400 * lex.c (init_operators): Likewise.
2401 * operators.def ("+"): Likewise.
2402 * cp-gimplify.c (cp_gimplify_expr): Handle UNARY_PLUS_EXPR like a
2403 conversion, if the result and argument types differ.
2404 * tree.c (fold_if_not_in_template): Fold UNARY_PLUS_EXPR much
2405 like a NOP_EXPR when !processing_template_decl.
2406
2407 * cxx-pretty-print.c (pp_cxx_cast_expression): Prototype.
2408 (pp_cxx_unary_expression): Handle new UNARY_PLUS_EXPR tree code.
2409
2410 2005-05-27 Nathan Sidwell <nathan@codesourcery.com>
2411
2412 PR c++/21455
2413 * typeck.c (get_delta_difference): Cope with incomplete but equal
2414 classes. Reorder if.
2415
2416 PR c++/21681
2417 * parser.c (cp_parser_late_parsing_for_member): Disable access
2418 checking for template functions.
2419
2420 2005-05-26 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2421
2422 PR c++/21768
2423 * pt.c (redeclare_class_template): Change error message according
2424 to coding conventions.
2425
2426 2005-05-26 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2427
2428 * call.c (build_op_delete_call): Fix quoting in error message.
2429
2430 2005-05-25 Richard Henderson <rth@redhat.com>
2431
2432 PR libgcj/21692
2433 * cp-tree.h (make_alias_for): Declare.
2434 * decl2.c (build_java_method_aliases): New.
2435 (cp_finish_file): Call it.
2436 * method.c (make_alias_for): Split out from ...
2437 (make_alias_for_thunk): ... here.
2438
2439 2005-05-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2440
2441 PR c++/21686
2442 * semantics.c (finish_id_expression): Fix quoting in error message.
2443
2444 2005-05-25 DJ Delorie <dj@redhat.com>
2445
2446 * decl.c (duplicate_decls): Move warning control from if() to
2447 warning(OPT_*).
2448 * name-lookup.c (parse_using_directive): Likewise.
2449 * parser.c (cp_parser_elaborated_type_specifier): Likewise.
2450 (cp_parser_init_declarator): Likewise.
2451 * tree.c (handle_com_interface_attribute): Likewise.
2452
2453 2005-05-24 Ziemowit Laski <zlaski@apple.com>
2454
2455 * class.c (layout_class_type): Do not issue C++ ABI warnings
2456 for ObjC structs.
2457 * decl.c (objc_mark_locals_volatile): Streamline by calling
2458 objc_volatilize_decl().
2459 * parser.c (cp_parser_objc_message_expression): Allow simple
2460 type specifiers (instead of merely type names) as message
2461 receivers.
2462 * pt.c (template_args_equal): Do not call objc_comptypes().
2463 * typeck.c (composite_pointer_type): If both pointers are
2464 ObjC-esque, arbitrarily choose the first; do not call
2465 objc_comptypes().
2466 (comptypes): Do not call objc_comptypes().
2467 (convert_for_assignment): Call objc_compare_types().
2468 (comp_ptr_ttypes_real): Call objc_type_quals_match() before
2469 concluding that types do not match.
2470
2471 2005-05-24 Andrew Pinski <pinskia@physics.uc.edu>
2472
2473 PR C++/21645
2474 * optimize.c (update_cloned_parm): Copy the TYPE also from the
2475 original one.
2476
2477 2005-05-19 Jakub Jelinek <jakub@redhat.com>
2478
2479 PR c++/21495
2480 * decl.c (grokdeclarator): Fix "storage class specified for"
2481 error reporting.
2482
2483 2005-05-19 Kazu Hirata <kazu@cs.umass.edu>
2484
2485 * parser.c: Fix comment typos.
2486
2487 2005-05-18 Geoffrey Keating <geoffk@apple.com>
2488
2489 * Make-lang.in (cc1plus-dummy): New.
2490 (cc1plus-checksum.c): New.
2491 (cc1plus-checksum.o): New.
2492 (cc1plus): Add cc1plus-checksum.o.
2493
2494 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
2495
2496 PR C++/19664
2497 * decl2.c (determine_visibility): Don't set visibility to
2498 hidden if it has been set explicitly by user.
2499
2500 2005-05-17 Ziemowit Laski <zlaski@apple.com>
2501 Mike Stump <mrs@apple.com>
2502
2503 Yet more Objective-C++...
2504
2505 * cp-objcp-common.h (cxx_get_alias_set): Move from
2506 here...
2507 (cxx_warn_unused_global_decl): Likewise.
2508 (cp_expr_size): Likewise.
2509 (cp_tree_size): Likewise.
2510 (cp_var_mod_type_p): Likewise.
2511 (cxx_initialize_diagnostics): Likewise.
2512 (cxx_types_compatible_p): Likewise.
2513 * cp-tree.h: to here.
2514 (do_poplevel): Add.
2515 * lex.c (D_OBJC): Add.
2516 (init_reswords): Add.
2517 * Make-lang.in (cp/pt.o): Add cp/cp-objcp-common.h.
2518 * parser.c: Add c-common.h include.
2519 * pt.c: Add c-common.h and cp-objcp-common.h includes.
2520 (template_args_equal): Use objc_comptypes as well.
2521 (tsubst_copy_and_build): Use objcp_tsubst_copy_and_build as well.
2522 * semantics.c (do_poplevel): Remove static.
2523
2524 * decl.c (objc_mark_locals_volatile): Don't change decls that are
2525 already ok.
2526 * decl2.c (generate_ctor_or_dtor_function): Add code to initialize
2527 Objective C++ early enough.
2528 * lex.c (struct resword reswords): Add Objective-C++ support.
2529 * parser.c (cp_lexer_get_preprocessor_token): Add Objective-C++.
2530 (cp_parser_objc_message_receiver): Add.
2531 (cp_parser_objc_message_args): Likewise.
2532 (cp_parser_objc_message_expression): Likewise.
2533 (cp_parser_objc_encode_expression): Likewise.
2534 (cp_parser_objc_defs_expression): Likewise.
2535 (cp_parser_objc_protocol_expression): Likewise.
2536 (cp_parser_objc_selector_expression): Likewise.
2537 (cp_parser_objc_expression): Likewise.
2538 (cp_parser_objc_visibility_spec): Likewise.
2539 (cp_parser_objc_method_type): Likewise.
2540 (cp_parser_objc_protocol_qualifiers): Likewise.
2541 (cp_parser_objc_typename): Likewise.
2542 (cp_parser_objc_selector_p): Likewise.
2543 (cp_parser_objc_selector): Likewise.
2544 (cp_parser_objc_method_keyword_params): Likewise.
2545 (cp_parser_objc_method_tail_params_opt): Likewise.
2546 (cp_parser_objc_interstitial_code): Likewise.
2547 (cp_parser_objc_method_signature): Likewise.
2548 (cp_parser_objc_method_prototype_list): Likewise.
2549 (cp_parser_objc_method_definition_list): Likewise.
2550 (cp_parser_objc_class_ivars): Likewise.
2551 (cp_parser_objc_identifier_list): Likewise.
2552 (cp_parser_objc_alias_declaration): Likewise.
2553 (cp_parser_objc_class_declaration): Likewise.
2554 (cp_parser_objc_protocol_declaration): Likewise.
2555 (cp_parser_objc_protocol_refs_opt): Likewise.
2556 (cp_parser_objc_superclass_or_category): Likewise.
2557 (cp_parser_objc_class_interface): Likewise.
2558 (cp_parser_objc_class_implementation): Likewise.
2559 (cp_parser_objc_end_implementation): Likewise.
2560 (cp_parser_objc_declaration): Likewise.
2561 (cp_parser_objc_try_catch_finally_statement): Likewise.
2562 (cp_parser_objc_synchronized_statement): Likewise.
2563 (cp_parser_objc_throw_statement): Likewise.
2564 (cp_parser_objc_statement): Likewise.
2565 (cp_parser_primary_expression): Add Objective-C++.
2566 (cp_parser_statement): Likewise.
2567 (cp_parser_declaration): Likewise.
2568 (cp_parser_simple_type_specifier): Likewise.
2569 (cp_parser_type_name): Likewise.
2570 (cp_parser_parameter_declaration_list): Likewise.
2571 (cp_parser_member_declaration) Likewise.
2572 * tree.c: Include debug.h.
2573 * typeck.c (composite_pointer_type): Add Objective-C++ support.
2574 (finish_class_member_access_expr): Likewise.
2575 (build_function_call): Allow objc to rewrite FUNCTION_DECLs.
2576 (build_modify_expr): Allow objc to generate write barriers.
2577
2578 * Make-lang.in (cp/tree.o): Add debug.h.
2579 * tree.c (lvalue_p_1, case CONST_DECL): Add.
2580
2581 2005-05-18 Jan Hubicka <jh@suse.cz>
2582
2583 * method.c: Include tree-pass.h
2584 (use_thunk): Lower body before expanding.
2585
2586 2005-05-17 Jakub Jelinek <jakub@redhat.com>
2587
2588 PR c++/21454
2589 * decl.c (maybe_deduce_size_from_array_init): Call
2590 cp_apply_type_quals_to_decl after completing array type.
2591
2592 2005-05-16 Richard Henderson <rth@redhat.com>
2593
2594 * decl.c (build_library_fn_1): Move setting TREE_NOTHROW ...
2595 (build_library_fn): ... here.
2596
2597 2005-05-12 Ian Lance Taylor <ian@airs.com>
2598
2599 * cp-tree.h (cp_stmt_codes): Don't define.
2600 (statement_code_p): Declare.
2601 (STATEMENT_CODE_P): Define.
2602 * lex.c (statement_code_p): Define.
2603 (cxx_init): Use actual codes in stmt_codes initializer, not
2604 cp_stmt_codes macro. Initialize statement_code_p directly, rather
2605 than using INIT_STATEMENT_CODES.
2606
2607 2005-05-09 Mark Mitchell <mark@codesourcery.com>
2608
2609 * typeck.c (build_unary_op): Do not resort to address arithmetic
2610 when taking the address of a COMPONENT_REF.
2611
2612 2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
2613
2614 * class.c (vtbl_init_data_s): Change the type of fns to
2615 VEC(tree,gc)*.
2616 (build_vtbl_initializer, add_vcall_offset, add_vcall_offset):
2617 Use VEC instead of VARRAY.
2618
2619 2005-05-07 Richard Sandiford <rsandifo@redhat.com>
2620
2621 * mangle.c: Remove a reference to the MIPS -mint64 option.
2622
2623 2005-05-07 Kazu Hirata <kazu@cs.umass.edu>
2624
2625 * decl.c (wrapup_globals_for_namespace): Use VEC instead of
2626 VARRAY.
2627 * name-lookup.c (add_decl_to_level, begin_scope): Likewise.
2628 * name-lookup.h (cp_binding_level): Change the type of
2629 static_decls to VEC(tree,gc)*.
2630
2631 * mangle.c (globals): Change the type of substitutions to
2632 VEC(tree,gc)*.
2633 (dump_substitution_candidates, add_substitution,
2634 find_substitution, finish_mangling, init_mangle): Use VEC
2635 instead of VARRAY.
2636
2637 2005-05-06 Kazu Hirata <kazu@cs.umass.edu>
2638
2639 * decl2.c (spew_debug): Remove.
2640
2641 * decl2.c (ssdf_decls, start_static_storage_duration_function,
2642 generate_ctor_or_dtor_function): Use VEC instead of VARRAY.
2643
2644 * decl2.c (pending_statics, note_vague_linkage_var,
2645 cp_finish_file): Use VEC instead of VARRAY.
2646 (pending_statics_used): Remove.
2647
2648 2005-05-05 Kazu Hirata <kazu@cs.umass.edu>
2649
2650 * decl2.c (deferred_fns, note_vague_linkage_fn,
2651 cp_finish_file): Use VEC instead of VARRAY.
2652
2653 2005-05-05 Mark Mitchell <mark@codesourcery.com>
2654
2655 PR c++/21352
2656 * pt.c (build_non_dependent_expr): Use is_overloaded_fn.
2657
2658 2005-05-05 Kazu Hirata <kazu@cs.umass.edu>
2659
2660 * pt.c: Fix a comment typo.
2661
2662 2005-05-04 Kazu Hirata <kazu@cs.umass.edu>
2663
2664 * cp-tree.h (language_function): Change the type of
2665 x_local_names to VEC.
2666 * decl.c (push_local_name): Adjust uses of local_names.
2667
2668 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
2669
2670 * friend.c, lex.c, mangle.c, repo.c: Update copyright.
2671
2672 2005-05-02 Kazu Hirata <kazu@cs.umass.edu>
2673
2674 * class.c (local_classes, init_class_processing): Use VEC
2675 instead of VARRAY.
2676 * cp-tree.h (local_classes): Likewise.
2677 * mangle.c (discriminator_for_local_entity): Likewise.
2678 * name-lookup.c (pushtag): Likewise.
2679
2680 * class.c (current_lang_depth, push_lang_context,
2681 pop_lang_context): Use VEC instead of VARRAY.
2682 * cp-tree.h (saved_scope): Use VEC for lang_base instead of
2683 VARRAY.
2684 * name-lookup.c (push_to_top_level): Use VEC instead of
2685 VARRAY.
2686
2687 2005-05-02 Paolo Bonzini <bonzini@gnu.org>
2688
2689 * semantics.c (finish_call_expr): Call resolve_overloaded_builtin
2690 for BUILT_IN_MD built-ins.
2691
2692 2005-05-02 Michael Matz <matz@suse.de>
2693
2694 PR c++/19542
2695 * cp-tree.h (cp_tree_index): Remove CPTI_NULL, to be defined in C
2696 common frontend.
2697 (null_node): Remove.
2698 * lex.c (cxx_init): Move null_node initialisation to C common frontend.
2699
2700 2005-04-25 Ian Lance Taylor <ian@airs.com>
2701
2702 * cp-tree.def: Add EXPR_STMT.
2703 * cp-tree.h (cp_stmt_codes): Add EXPR_STMT.
2704 (EXPR_STMT_EXPR): Define.
2705 * cp-gimplify.c: Include "flags.h".
2706 (gimplify_expr_stmt): New static function.
2707 (cp_gimplify_expr): Handle EXPR_STMT.
2708 * cxx-pretty-print.c (pp_cxx_statement): Use pp_cxx_expression
2709 rather than pp_expression.
2710 (pp_cxx_statement): Handle EXPR_STMT.
2711 * dump.c (cp_dump_tree): Handle EXPR_STMT.
2712 * lex.c (cxx_init): Don't use c_common_stmt_codes in stmt_codes
2713 initializer.
2714
2715 2005-04-25 Andrew Pinski <pinskia@physics.uc.edu>
2716
2717 PR C++/21188
2718 * rtti.c (ifnonnull): Cast the zero comparison operand
2719 to the correct type.
2720
2721 2005-04-24 Jakub Jelinek <jakub@redhat.com>
2722
2723 PR middle-end/20991
2724 * class.c: Include cgraph.h.
2725 (cp_fold_obj_type_ref): Set node->local.vtable_method.
2726 * Make-lang.in (cgraph.o): Depend on $(CGRAPH_H).
2727
2728 2005-04-12 Markus F.X.J. Oberhumer <markus@oberhumer.com>
2729
2730 * mangle.c (write_builtin_type): Handle integer types which are
2731 not one of the shared integer type nodes and emit a "vendor
2732 extended builtin type" with an encoding in the form of "u5int96".
2733
2734 2005-04-24 Ian Lance Taylor <ian@airs.com>
2735
2736 * cp-tree.def (USING_STMT): Change class to tcc_statement.
2737 (TRY_BLOCK, EH_SPEC_BLOCK, HANDLER, CLEANUP_STMT): Likewise.
2738 (IF_STMT, FOR_STMT, WHILE_STMT, DO_STMT): Likewise.
2739 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
2740
2741 2005-04-23 DJ Delorie <dj@redhat.com>
2742
2743 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, friend.c,
2744 init.c, lex.c, mangle.c, method.c, name-lookup.c, parser.c,
2745 repo.c, rtti.c, tree.c, typeck.c, typeck2.c: Adjust warning()
2746 callers.
2747
2748 2005-04-22 Per Bothner <per@bothner.com>
2749
2750 * decl.c (make_rtl_for_nonlocal_decl): Don't try get_fileinfo if
2751 input_filename is NULL, as it is for (say) __PRETTY_FUNCTION__.
2752
2753 2005-04-22 Alexandre Oliva <aoliva@redhat.com>
2754
2755 PR c++/21087
2756 * name-lookup.c (push_overloaded_decl): Do not overload with
2757 non-duplicate anticipated built-in.
2758
2759 2005-04-21 Kazu Hirata <kazu@cs.umass.edu>
2760
2761 * cp-tree.h (THROW_NAME, AUTO_VTABLE_NAME, AUTO_TEMP_FORMAT,
2762 VTABLE_BASE, VTABLE_NAME_PREFIX, STATIC_NAME_FORMAT): Remove.
2763
2764 2005-04-21 Nathan Sidwell <nathan@codesourcery.com>
2765
2766 * cp-tree.h: Adjust for new VEC API.
2767 Define VEC(tree_pair_s,gc).
2768 (struct save_scope): Adjust.
2769 (struct lang_type_class): Adjust.
2770 (unemitted_tinfo_decls): Adjust.
2771 * class.c (add_method, resort_type_method_vec,
2772 finish_struct_methods, struct find_final_overrider_data,
2773 dfs_find_final_overrider_pre, find_final_overrider,
2774 get_vcall_index, warn_hidden, walk_subobject_offsets,
2775 check_methods, fixup_inline_methods, end_of_class,
2776 warn_about_ambiguous_bases, finish_struct, build_vtbl_initializer,
2777 add_vcall_offset): Adjust.
2778 * decl.c (xref_basetypes, finish_method): Adjust.
2779 * decl2.c (check_classfn): Adjust.
2780 * init.c (sort_mem_initializers, push_base_cleanups): Adjust.
2781 * method.c (do_build_copy_constructor): Adjust.
2782 * name-lookup.c (new_class_binding, store_binding,
2783 store_bindings, store_class_bindings): Adjust.
2784 * name-lookup.h: Define VEC(cxx_saved_binding,gc),
2785 VEC(cp_class_binding,gc).
2786 (struct cp_binding_level): Adjust.
2787 * parser.c: Define VEC(cp_token_position,heap).
2788 (struct cp_lexer): Adjust.
2789 (cp_lexer_new_main, cp_lexer_new_from_tokens, cp_lexer_destroy,
2790 cp_lexer_save_tokens): Adjust.
2791 * pt.c (retrieve_specialization,
2792 check_explicit_specialization): Adjust.
2793 * rtti.c (unemitted_tinfo_decls): Adjust.
2794 (init_rtti_processing, get_tinfo_decl, get_pseudo_ti_init,
2795 get_pseudo_ti_desc): Adjust.
2796 * search.c (dfs_access_in_type, lookup_conversion_operator,
2797 lookup_fnfields_1, dfs_walk_once, dfs_walk_once_accessible,
2798 dfs_get_pure_virtuals, lookup_conversions_r, binfo_for_vbase): Adjust.
2799 * semantics.c: Define VEC(deferred_access,gc).
2800 (push_deferring_access_checks): Adjust.
2801 * typeck2.c (abstract_virtuals_error): Adjust.
2802
2803 2005-04-20 Ian Lance Taylor <ian@airs.com>
2804
2805 * cp-tree.def: Add STMT_EXPR.
2806 * cp-tree.h (STMT_EXPR_NO_SCOPE): Define.
2807 (STMT_EXPR_STMT): Define.
2808 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
2809 STMT_EXPR.
2810 (pp_cxx_expression): Likewise.
2811 (pp_cxx_statement): Call pp_cxx_statement, not pp_statement.
2812 * dump.c (cp_dump_tree): Handle STMT_EXPR.
2813
2814 2005-04-18 Kazu Hirata <kazu@cs.umass.edu>
2815
2816 * decl.c (expand_static_init): Call build2 and build3 instead
2817 of build.
2818
2819 * cp-tree.h (VPTR_NAME, VPTR_NAME_P): Remove.
2820
2821 2005-04-17 Ian Lance Taylor <ian@airs.com>
2822
2823 * cp-tree.def: Add SIZEOF_EXPR, ARROW_EXPR and ALIGNOF_EXPR.
2824 * cxx-pretty-print.c (pp_cxx_postfix_expression): Handle
2825 ARROW_EXPR.
2826 (pp_cxx_unary_expression): Handle SIZEOF_EXPR and ALIGNOF_EXPR.
2827 (pp_cxx_expression): Handle ARROW_EXPR, SIZEOF_EXPR, and
2828 ALIGNOF_EXPR.
2829 * typeck.c (cxx_sizeof_or_alignof_type): Update call to
2830 c_sizeof_or_alignof_type for change in parameter type.
2831
2832 2005-04-16 Mark Mitchell <mark@codesourcery.com>
2833
2834 PR c++/21025
2835 * typeck.c (cxx_sizeof_or_alignof_type): Check whether the type to
2836 which sizeof/alignof is dependent, rather than just whether we are
2837 processing_template_decl.
2838
2839 2005-04-17 Kazu Hirata <kazu@cs.umass.edu>
2840
2841 * cp-tree.h (LOOKUP_GLOBAL): Remove.
2842 (LOOKUP_ONLYCONVERTING, DIRECT_BIND, LOOKUP_NO_CONVERSION,
2843 LOOKUP_DESTRUCTOR, LOOKUP_NO_TEMP_BIND, LOOKUP_PREFER_TYPES,
2844 LOOKUP_PREFER_NAMESPACES, LOOKUP_CONSTRUCTOR_CALLABLE): Adjust
2845 their values.
2846
2847 2005-04-15 Richard Henderson <rth@redhat.com>
2848
2849 PR middle-end/14311
2850 * semantics.c (finish_call_expr): Call resolve_overloaded_builtin.
2851
2852 2005-04-15 Kazu Hirata <kazu@cs.umass.edu>
2853
2854 * cp-tree.h (lang_type_class): Remove redefined. Move
2855 java_interface into where redefined was. Increment the width
2856 of dummy.
2857 (TYPE_REDEFINED): Remove.
2858
2859 2005-04-14 Kazu Hirata <kazu@cs.umass.edu>
2860
2861 * cp-tree.h (SET_TMPL_ARG, ENUM_TI_TEMPLATE, ENUM_TI_ARGS,
2862 CLASSTYPE_TEMPLATE_LEVEL): Remove.
2863
2864 2005-04-11 Mark Mitchell <mark@codesourcery.com>
2865
2866 * decl2.c (determine_visibility): Don't use export_class_data.
2867 (import_export_decl): Honor TARGET_CXX_CLASS_DATA_ALWAYS_WEAK and
2868 TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY.
2869
2870 2005-04-09 Kazu Hirata <kazu@cs.umass.edu>
2871
2872 * cp-tree.h (cxx_alignof): Remove.
2873
2874 * cp-tree.h (DECL_ARRAY_DELETE_OPERATOR_P): Remove.
2875
2876 * cp-tree.h (EXCEPTION_CLEANUP_NAME, B_SET, B_CLR, B_TST,
2877 CONV_STATIC_CAST): Remove.
2878
2879 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Remove.
2880
2881 * cp-tree.h (VF_BINFO_VALUE, VF_BASETYPE_VALUE): Remove.
2882
2883 * cp-tree.h (cp_deprecated): Remove.
2884
2885 2005-04-08 Ian Lance Taylor <ian@airs.com>
2886
2887 * cp-tree.def: Define FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT,
2888 CONTINUE_STMT, SWITCH_STMT.
2889 * cp-tree.h (cp_stmt_codes): Add FOR_STMT, WHILE_STMT, DO_STMT,
2890 BREAK_STMT, CONTINUE_STMT, SWITCH_STMT.
2891 (WHILE_COND, WHILE_BODY): Define.
2892 (DO_COND, DO_BODY): Define.
2893 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Define.
2894 (SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Define.
2895 * cp-gimplify.c (enum bc_t): Define.
2896 (struct cp_gimplify_ctx, ctxp): Define.
2897 (push_context, pop_context): New static functions.
2898 (begin_bc_block, finish_bc_block): New static functions.
2899 (build_bc_goto): New static function.
2900 (gimplify_cp_loop, gimplify_for_stmt): New static functions.
2901 (gimplify_while_stmt, gimplify_do_stmt): Likewise.
2902 (gimplify_switch_stmt): Likewise.
2903 (cp_gimplify_expr): Handle FOR_STMT, WHILE_STMT, DO_STMT,
2904 SWITCH_STMT, CONTINUE_STMT, BREAK_STMT.
2905 (cp_genericize): Call push_context and pop_context.
2906 * semantics.c (finish_break_stmt): Just call build_stmt
2907 (BREAK_STMT) rather than build_break_stmt.
2908 (finish_continue_stmt): Corresponding change.
2909 * decl.c (pop_switch): Update call to c_do_switch_warnings for new
2910 parameters.
2911 * cxx-pretty-print.c (pp_cxx_statement): Handle SWITCH_STMT,
2912 WHILE_STMT, DO_STMT, FOR_STMT, BREAK_STMT, CONTINUE_STMT.
2913 * dump.c (cp_dump_tree): Likewise.
2914
2915 2005-04-08 Mark Mitchell <mark@codesourcery.com>
2916
2917 PR c++/20905
2918 * parser.c (cp_parser_type_specifier_seq): Add is_condition
2919 parameter.
2920 (cp_parser_new_type_id): Pass it.
2921 (cp_parser_condition): Likewise.
2922 (cp_parser_conversion_type_id): Likewise.
2923 (cp_parser_type_id): Likewise.
2924 (cp_parser_type_specifier_seq): In a condition, do not allow
2925 invalid type-specifier combinations.
2926 (cp_parser_exception_declaration): Adjust call to
2927 cp_parser_type_specifier_seq.
2928
2929 * cp-tree.def (TINST_LEVEL): Document TINST_IN_SYSTEM_HEADER_P.
2930 * cp-tree.h (struct tinst_level): Add in_system_header_p.
2931 (TINST_IN_SYSTEM_HEADER_P): New macro.
2932 (make_tinst_level): Remove.
2933 * pt.c (lookup_template_class): Preserve DECL_IN_SYSTEM_HEADER on
2934 the instantiated class.
2935 (push_tinst_level): Do not use make_tinst_level. Set
2936 TINST_IN_SYSTEM_HEADER_P.
2937 (pop_tinst_level): Likewise.
2938 (instantiate_class_template): Set in_system_header.
2939 (instantiate_pending_templates): Likewise.
2940 * tree.c (make_tinst_level): Remove.
2941
2942 2005-04-06 Joseph S. Myers <joseph@codesourcery.com>
2943
2944 * decl.c (start_decl): Apply pending #pragma weak regardless of
2945 scope.
2946
2947 2005-04-06 Mark Mitchell <mark@codesourcery.com>
2948
2949 PR c++/20212
2950 * pt.c (regenerate_decl_from_template): Copy attributes for
2951 parameters from the pattern to the instantiation.
2952
2953 2005-04-05 Mark Mitchell <mark@codesourcery.com>
2954
2955 PR c++/20734
2956 * cp-tree.def (OFFSET_REF): Correct comments.
2957 * init.c (build_offset_ref): Remove misleading comment.
2958 * typeck.c (build_unary_op): Handle pointer-to-member creation
2959 here, rather than ...
2960 (unary_complex_lvalue): ... here.
2961
2962 2005-04-06 Jason Merrill <jason@redhat.com>
2963
2964 PR c++/19312
2965 * tree.c (stabilize_init): Don't bother trying to stabilize
2966 something with no side-effects.
2967
2968 2005-04-05 Mark Mitchell <mark@codesourcery.com>
2969
2970 PR c++/20763
2971 * decl.c (grokdeclarator): Correct attribute handling.
2972
2973 2005-04-05 Mark Mitchell <mark@codesourcery.com>
2974
2975 PR c++/19159
2976 * decl2.c (import_export_decl): Use non-COMDAT external linkage
2977 for virtual tables, typeinfo, etc. that will be emitted in only
2978 one translation unit on systems without weak symbols.
2979
2980 2005-04-04 Mark Mitchell <mark@codesourcery.com>
2981
2982 PR c++/20679
2983 * parser.c (cp_parser_template_name): Fix thinko.
2984
2985 2005-04-04 Nathan Sidwell <nathan@codesourcery.com>
2986
2987 PR c++/20746
2988 * method.c (use_thunk): Protect covariant pointer return
2989 adjustments from NULL pointers.
2990
2991 2005-04-04 Jan Hubicka <jh@suse.cz>
2992
2993 * decl2.c (finish_objects): Revert my previous patch.
2994 (cp_finish_file): Likewise.
2995
2996 2005-04-03 Kazu Hirata <kazu@cs.umass.edu>
2997
2998 * pt.c: Fix comment typos.
2999
3000 2005-04-03 Nathan Sidwell <nathan@codesourcery.com>
3001
3002 PR c++/20723
3003 * pt.c (more_specialized_fn): Member functions are unordered wrt
3004 non-members. Conversion operators are unordered wrt other
3005 functions.
3006
3007 2005-04-01 Nathan Sidwell <nathan@codesourcery.com>
3008
3009 * call.c (add_template_candidates_real): Remove length parameter
3010 from fn_type_unification call.
3011 * class.c (resolve_address_of_overloaded_function): Likewise
3012 * cp-tree.h (fn_type_unification): Remove length parameter.
3013 * pt.c (get_bindings_overload): Remove.
3014 (get_bindings_real): Rename to ...
3015 (get_bindings): ... here. Remove length and strict
3016 parameters. Change return type flag to boolean. Remove original
3017 forwarding function.
3018 (determine_specialization): Adjust get_bindings call.
3019 (fn_type_unification): Remove length parameter. Adjust.
3020 (type_unification_real): Remove length parameter. Adjust.
3021 (resolve_overloaded_unification): Adjust get_bindings call.
3022 (try_one_overload): Simplify confusing cascaded if control flow.
3023 (unify): Remove length paramter from type_unification_real call.
3024 (most_specialized_instantiation): Adjust get_bindings calls.
3025 (most_specialized): Likewise.
3026
3027 2005-03-31 Nathan Sidwell <nathan@codesourcery.com>
3028
3029 PR c++/19203, implement DR 214
3030 * call.c (joust): Use more_specialized_fn.
3031 * cp-tree.h (DEDUCE_ORDER): Remove.
3032 (more_specialized): Replace with ...
3033 (more_specialized_fn): ... this.
3034 * pt.c (maybe_adjust_types_for_deduction): Remove DEDUCE_ORDER
3035 case.
3036 (type_unification_real): Remove DEDUCE_ORDER case.
3037 (more_specialized): Replace with ...
3038 (more_specialized_fn): ... this. Implement DR 214.
3039 (most_specialized_instantiation): Use get_bindings_real directly.
3040
3041 2005-03-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
3042
3043 PR c++/18644
3044 * call.c (build_new_op): Remove check for -Wsynth.
3045
3046 2005-03-31 Jan Hubicka <jh@suse.cz>
3047
3048 * decl2.c (finish_objects): Mark ctor as needed.
3049 (cp_finish_file): Output variables only in nonunit-at-a-time.
3050
3051 2005-03-29 Richard Henderson <rth@redhat.com>
3052
3053 PR c/20519
3054 * decl.c (cp_complete_array_type): Rename from complete_array_type.
3055 Use the new complete_array_type in c-common.c. Update all callers.
3056 * cp-tree.h (cp_complete_array_type): Update to match.
3057
3058 2005-03-24 Geoffrey Keating <geoffk@apple.com>
3059
3060 * typeck.c (build_static_cast_1): Allow scalar_cast between
3061 any integral, floating, or enumeration type.
3062
3063 2005-03-24 Steven Bosscher <stevenb@suse.de>
3064
3065 * typeck.c (comptypes): First determine if the types are compatible
3066 from a target-independent point of view. Check target attributes
3067 last.
3068
3069 * class.c (build_base_path):
3070 (build_vbase_offset_vtbl_entries):
3071 (add_vcall_offset): Replace fold (buildN (...)) with fold_buildN.
3072 * error.c (dump_expr): Likewise.
3073 * init.c (build_zero_init, expand_cleanup_for_base,
3074 build_vec_delete_1): Likewise.
3075 * mangle.c (write_integer_cst): Likewise.
3076 * method.c (thunk_adjust): Likewise.
3077 * pt.c (convert_nontype_argument, tsubst, unify): Likewise.
3078 * tree.c (cxx_print_statistics, array_type_nelts_total): Likewise.
3079 * typeck.c (build_ptrmemfunc_access_expr,
3080 (get_member_function_from_ptrfunc): Likewise.
3081
3082 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
3083
3084 * cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
3085
3086 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
3087
3088 * cp-tree.h (perform_integral_promotions): Remove.
3089 (default_conversion): Add.
3090
3091 2005-03-22 Mark Mitchell <mark@codesourcery.com>
3092
3093 * parser.c (cp_parser_warn_min_max): New function.
3094 (cp_parser_binary_expression): Use it.
3095 (cp_parser_assignment_operator_opt): Likewise.
3096 (cp_parser_operator): Likewise.
3097
3098 2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3099
3100 PR c++/19980
3101 * decl.c (start_preparsed_function): Robustify.
3102
3103 2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3104
3105 PR c++/20499
3106 * parser.c (cp_parser_class_head): Return NULL_TREE when
3107 encountering a redefinition.
3108
3109 2005-03-22 Nathan Sidwell <nathan@codesourcery.com>
3110
3111 PR c++/20465
3112 PR c++/20381
3113 * typeck.c (build_ptrmemfunc): Allow OFFSET_REF when processing a
3114 template.
3115
3116 2005-03-21 Paolo Carlini <pcarlini@suse.de>
3117
3118 PR c++/20461
3119 PR c++/20536
3120 * init.c (emit_mem_initializers): Don't crash on undefined
3121 types.
3122
3123 2005-03-21 Paolo Carlini <pcarlini@suse.de>
3124
3125 PR c++/20147
3126 * semantics.c (finish_stmt_expr_expr): Return immediately
3127 if error_operand_p (expr).
3128
3129 2005-03-21 Joseph S. Myers <joseph@codesourcery.com>
3130
3131 * cp-tree.h (lvalue_or_else, lvalue_p): New.
3132 * typeck.c (lvalue_or_else): New. Call lvalue_error.
3133
3134 2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3135
3136 PR c++/20240
3137 * decl.c (decls_match): Compare context of VAR_DECL.
3138
3139 2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3140
3141 PR c++/20333
3142 * parser.c (cp_parser_postfix_expression) <case RID_TYPENAME>:
3143 Check the return value of cp_parser_nested_name_specifier.
3144
3145 2005-03-18 Dale Johannesen <dalej@apple.com>
3146
3147 * cp/tree.c (cp_tree_equal): Handle SSA_NAME.
3148
3149 2005-03-18 Paolo Carlini <pcarlini@suse.de>
3150
3151 PR c++/20463
3152 * parser.c (cp_parser_diagnose_invalid_type_name):
3153 Check TYPE_BINFO (current_class_type) before attempting
3154 to emit inform messages.
3155
3156 2005-03-17 Paolo Carlini <pcarlini@suse.de>
3157
3158 PR c++/19966
3159 * cp-tree.h (grok_op_properties): Change return type to void.
3160 * decl.c (grok_op_properties): Return early - don't check the
3161 arity - in case of a static member or an operator that cannot
3162 be non-member; tidy a bit.
3163
3164 2005-03-17 Nathan Sidwell <nathan@codesourcery.com>
3165
3166 PR c++/20186
3167 * pt.c (contains_dependent_cast_p): Remove.
3168 (fold_non_dependent_expr): Don't use it.
3169 (value_dependent_expression_p): Use a switch statement.
3170 reference_exprs can be dependent.
3171
3172 2005-03-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3173
3174 PR c++/4403
3175 PR c++/9783, DR433
3176 * name-lookup.c (pushtag): Skip template parameter scope when
3177 scope is ts_global. Don't push tag into template parameter
3178 scope.
3179 * pt.c (instantiate_class_template): Reorder friend class
3180 template substitution to handle non-dependent friend class
3181 that hasn't been previously declared.
3182
3183 2005-03-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3184
3185 Friend class name lookup 5/n
3186 PR c++/1016
3187 * cp-tree.h (pushtag): Adjust declaration.
3188 * decl.c (lookup_and_check_tag): Call lookup_type_scope if
3189 lookup_name fails.
3190 (xref_tag): Adjust call to pushtag. Make hidden class visible.
3191 (start_enum): Adjust call to pushtag.
3192 * name-lookup.c (ambiguous_decl): Ignore hidden names.
3193 (qualify_lookup): Change return type to bool.
3194 (hidden_name_p): New function.
3195 (lookup_namespace_name, unqualified_namespace_lookup,
3196 lookup_name_real): Use it.
3197 (lookup_type_scope): Update comments.
3198 (maybe_process_template_type_declaration): Change parameter name
3199 from globalize to is_friend.
3200 (pushtag): Change globalize parameter of type int to tag_scope.
3201 Hide name if introduced by friend declaration.
3202 * name-lookup.h (hidden_name_p): Add declaration.
3203 * parser.c (cp_parser_lookup_name): Don't deal with hidden name
3204 here.
3205 * pt.c (push_template_decl_real): Make hidden class template
3206 visible.
3207 (lookup_template_class, instantiate_class_template): Adjust call
3208 to pushtag.
3209 * semantics.c (begin_class_definition): Likewise.
3210 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
3211 tinfo_base_init, emit_support_tinfos): Use ts_current instead of
3212 ts_global.
3213
3214 2005-03-13 Mark Mitchell <mark@codesourcery.com>
3215
3216 PR c++/20157
3217 * pt.c (determine_specialization): Reject non-specializations.
3218
3219 2005-03-11 Per Bothner <per@bothner.com>
3220
3221 * cp-tree.h (struct cp_declarator): New id_loc field.
3222 * cp/parser.c (cp_lexer_get_preprocessor_token): Set cp_token's
3223 location using c_lex_with_flags, instead of input_location.
3224 (cp_parser_direct_declarator): Set declarator's id_loc from
3225 cp_token's id_loc.
3226
3227 2005-03-10 Jakub Jelinek <jakub@redhat.com>
3228
3229 PR c++/18384, c++/18327
3230 * decl.c (reshape_init_array): Use UHWI type for max_index_cst
3231 and index. Convert max_index to size_type_node if it isn't
3232 host_integerp (, 1).
3233
3234 2005-03-09 Mark Mitchell <mark@codesourcery.com>
3235
3236 PR c++/20208
3237 * pt.c (tsubst_decl): Apply array-to-pointer and
3238 function-to-pointer conversions to function arguments.
3239 (regenerate_decl_from_template): Likewise.
3240
3241 2005-03-09 Paolo Carlini <pcarlini@suse.de>
3242
3243 PR c++/16859
3244 * decl.c (complete_array_type): In pedantic mode, return
3245 3 for an empty initializer list as the initializer for an
3246 array of unknown bound (8.5.1/4).
3247 (maybe_deduce_size_from_array_init): Fix final test to use
3248 the above.
3249
3250 2005-03-08 Nathan Sidwell <nathan@codesourcery.com>
3251
3252 PR c++/20186
3253 * pt.c (contains_dependent_cast_p): New.
3254 (fold_non_dependent_expr): Call it.
3255
3256 2005-03-08 Mark Mitchell <mark@codesourcery.com>
3257
3258 PR c++/20142
3259 * cp-tree.h (target_type): Remove.
3260 * decl.c (layout_var_decl): Remove #if 0'd code.
3261 (cp_finish_decl): Remove dead code.
3262 * init.c (build_vec_init): When determining whether or not the
3263 element type has an asignment operator, look through all array
3264 dimensions.
3265 * typeck.c (target_type): Remove.
3266
3267 2005-03-07 Mark Mitchell <mark@codesourcery.com>
3268
3269 * class.c (finish_struct_1): Do not warn about non-virtual
3270 destructors in Java classes.
3271
3272 2005-03-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3273
3274 PR c++/19311
3275 * init.c (build_offset_ref): Don't build non-dependent SCOPE_REF.
3276 * pt.c (build_non_dependent_expr): Don't build NON_DEPENDENT_EXPR
3277 for OFFSET_TYPE.
3278 * typeck.c (build_x_unary_op): Don't build non-dependent SCOPE_REF.
3279 Also set PTRMEM_OK_P for NON_DEPENDENT_EXPR.
3280 (build_unary_op): Handle building ADDR_EXPR of OFFSET_REF inside
3281 template.
3282
3283 2005-03-02 Alexandre Oliva <aoliva@redhat.com>
3284
3285 * name-lookup.c (push_overloaded_decl): Don't error if the new
3286 decl matches the old one.
3287 * decl.c (redeclaration_error_message): Likewise.
3288
3289 2005-03-01 Per Bothner <per@bothner.com>
3290
3291 * decl.c (finish_function): Use SET_EXPR_LOCATION instead of
3292 unavailable annotate_with_file_line, if USE_MAPPED_LOCATION.
3293
3294 2005-03-01 Nathan Sidwell <nathan@codesourcery.com>
3295
3296 PR c++/20232
3297 * class.c (update_vtable_entry_for_fn): Don't crash on invalid
3298 covariancy.
3299
3300 * cp-tree.g (THUNK_TARGET): Expand comment.
3301 * method.c (use_thunk): Make sure we also use the target, if that
3302 is a thunk.
3303
3304 2005-02-27 Jakub Jelinek <jakub@redhat.com>
3305
3306 PR c++/20206
3307 * decl.c (cxx_comdat_group): Put thunks for
3308 TARGET_USE_LOCAL_THUNK_ALIAS_P (function) functions into the same
3309 comdat group as the thunk target.
3310
3311 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3312
3313 * call.c, class.c, cp-tree.h, decl2.c, error.c, init.c, mangle.c,
3314 parser.c: Fix comment typo(s).
3315
3316 2005-02-24 Jakub Jelinek <jakub@redhat.com>
3317
3318 PR c++/20175
3319 * decl.c (reshape_init): Don't warn about missing braces if STRING_CST
3320 initializes a char/wchar_t array.
3321
3322 2005-02-23 Mark Mitchell <mark@codesourcery.com>
3323
3324 PR c++/19878
3325 * decl.c (grokvardecl): Set DECL_INTERFACE_KNOWN for declarations
3326 with internal linkage.
3327
3328 2005-02-23 Alexandre Oliva <aoliva@redhat.com>
3329
3330 * decl.c (grokvardecl): Don't exempt anonymous types from having
3331 linkage for variables that have linkage other than "C".
3332
3333 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
3334
3335 * cp-objcp-common.h, error.c: Update copyright.
3336
3337 2005-02-22 Mark Mitchell <mark@codesourcery.com>
3338
3339 PR c++/20073
3340 * decl.c (start_decl_1): Don't clear TREE_READONLY.
3341 (cp_finish_decl): Likewise.
3342 (complete_vars): Call cp_apply_type_quals_to_decl.
3343 * typeck.c (cp_apply_type_quals): Avoid setting TREE_READONLY in
3344 cases where that's not valid.
3345
3346 PR c++/19991
3347 * init.c (integral_constant_value): Iterate if the value of a decl
3348 is itself a constant.
3349
3350 PR c++/20152
3351 * parser.c (cp_parser_class_head): Check for redefintions here.
3352 * semantics.c (begin_class_definition): Not here.
3353
3354 PR c++/20153
3355 * decl2.c (build_anon_union_vars): Add type parameter.
3356 (finish_anon_union): Pass it.
3357
3358 PR c++/20148
3359 * error.c (dump_expr): Do not print the body of a BIND_EXPR.
3360 Handle STATEMENT_LIST.
3361
3362 PR c++/19883
3363 * parser.c (cp_parser_direct_declarator): Always complain about
3364 non-constant array bounds when in a function scope.
3365 * semantics.c (finish_id_expression): Do not mark dependent names
3366 as non-constant.
3367
3368 2005-02-21 Douglas Gregor <dgregor@cs.indiana.edu>
3369
3370 PR c++/19076
3371 PR c++/6628
3372 * cp-tree.h (cp_apply_type_quals_to_decl): Declared.
3373 * decl.c (grokdeclarator): Pedwarn about qualifying a function
3374 type.
3375 Add qualifiers when declaring a typedef of a function type.
3376 Member function pointers pick up the qualifiers of the typedef
3377 used to declare them.
3378 Don't complain about creating cv-qualified function types.
3379 Complain about qualified function typedefs that are used to
3380 declare non-static member functions or free functions.
3381 Use cp_apply_type_quals_to_decl.
3382 (start_preparsed_function): Use cp_apply_type_quals_to_decl.
3383 (grokclassfn): Use cp_apply_type_quals_to_decl.
3384 * error.c (dump_type_suffix): Print qualifiers for function
3385 types.
3386 * pt.c (tsubst_decl): Use cp_apply_type_quals_to_decl.
3387 (tsubst): When substituting a function type into a member
3388 pointer type, pass along the qualifiers.
3389 (unify): Unify member pointers to member function pointers.
3390 * tree.c (cp_build_qualified_type_real): Function types may be
3391 qualified. This includes restrict qualifiers.
3392 * typeck.c (cp_apply_type_quals_to_decl): New function to replace
3393 use of c_apply_type_quals_to_decl. Drops qualifiers that are being
3394 added to function types.
3395
3396 2005-02-20 Zack Weinberg <zack@codesourcery.com>
3397
3398 PR 18785
3399 * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to
3400 c_common_to_target_charset. Delete bogus comment.
3401
3402 2005-02-18 Richard Henderson <rth@redhat.com>
3403
3404 PR libstdc++/10606
3405 * except.c (do_get_exception_ptr): New.
3406 (expand_start_catch_block): Use it.
3407
3408 2005-02-19 Jakub Jelinek <jakub@redhat.com>
3409
3410 * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING
3411 if type is not error_mark_node.
3412
3413 2005-01-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3414
3415 PR c++/19508
3416 * decl2.c (grokfield): Do not apply attributes to template parameters
3417 as they are ignored by tsubst anyway.
3418
3419 2005-02-18 Jakub Jelinek <jakub@redhat.com>
3420
3421 PR c++/19813
3422 * decl.c (start_decl_1): Clear TREE_READONLY flag if
3423 its type has TYPE_NEEDS_CONSTRUCTING.
3424 (complete_vars): Likewise.
3425
3426 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
3427
3428 PR c++/20028
3429 * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
3430 template along with TYPE_SIZE.
3431
3432 PR c++/20022
3433 * semantics.c (perform_deferred_access_checks): Use
3434 get_deferred_access_checks to get the top of the stack.
3435
3436 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
3437
3438 PR c++/17788
3439 * class.c (add_implicitly_declared_members, check_field_decl)
3440 (check_field_decls, check_bases): Remove arguments, tests and
3441 assignments of cant_have_default_ctor-related variables.
3442
3443 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
3444
3445 * decl2.c (mark_used): Set the source location of the used decl to
3446 the current input location here...
3447 * method.c (synthesize_method): ... not here. Set input_location
3448 from the decl instead.
3449
3450 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
3451
3452 PR c++/19608
3453 * parser.c (cp_parser_late_parsing_for_member): Use
3454 current_function_decl as scope to push to and from.
3455
3456 PR c++/19884
3457 * pt.c (check_explicit_specialization): Make sure namespace
3458 binding lookup found an overloaded function.
3459 (lookup_template_function): Just assert FNS is an overloaded
3460 function.
3461
3462 PR c++/19895
3463 * decl.c (grokdeclarator): Check for error mark node in ptrmem
3464 construction.
3465
3466 2005-02-14 Alexandre Oliva <aoliva@redhat.com>
3467
3468 PR c++/17816
3469 * decl.c (redeclaration_error_message): Report redefinition of
3470 pure virtual function.
3471
3472 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
3473
3474 PR c++/19891
3475 * class.c (build_simple_base_path): Build the component_ref
3476 directly.
3477 (update_vtable_entry_for_fn): Walk the covariant's binfo chain
3478 rather than using lookup_base.
3479 * search.c (dfs_walk_once): Add non-recursive assert check.
3480 * typeck.c (build_class_member_access_expr): It is possible for
3481 the member type to be both const and volatile.
3482
3483 2005-02-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3484
3485 PR c++/14479
3486 PR c++/19487
3487 * pt.c (maybe_check_template_type): Remove.
3488 * cp-tree.h (maybe_check_template_type): Remove prototype.
3489 * name-lookup.c (maybe_process_template_type_declaration): Don't
3490 use maybe_check_template_type.
3491
3492 2005-02-11 Richard Henderson <rth@redhat.com>
3493
3494 PR c++/19632
3495 * pt.c (get_mostly_instantiated_function_type): Save and restore
3496 flag_access_control instead of push/pop_access_scope.
3497
3498 2005-02-10 Mark Mitchell <mark@codesourcery.com>
3499
3500 PR c++/19755
3501 * decl.c (reshape_init): Issue warnings about missing braces.
3502
3503 2005-02-11 Kazu Hirata <kazu@cs.umass.edu>
3504
3505 * cp-tree.def, except.c, ptree.c: Update copyright.
3506
3507 2005-02-09 Mark Mitchell <mark@codesourcery.com>
3508
3509 PR c++/19811
3510 * call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
3511 attempting name lookup.
3512
3513 * parser.c (cp_parser_unqualified_id): Initialize type_decl.
3514
3515 PR c++/19787
3516 * call.c (initialize_reference): Robustify.
3517
3518 PR ++/19732
3519 * decl.c (grokdeclarator): Check for invalid use of destructor
3520 names.
3521
3522 PR c++/19762
3523 * parser.c (cp_parser_unqualified_id): Avoid creating destructor
3524 names with invalid types.
3525
3526 PR c++/19826
3527 * parser.c (cp_parser_direct_declarator): Allow type-dependent
3528 expressions as array bounds.
3529
3530 PR c++/19739
3531 * parser.c (cp_parser_attributes_list): Allow empty lists.
3532
3533 2005-02-08 Mark Mitchell <mark@codesourcery.com>
3534
3535 PR c++/19733
3536 * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
3537 (check_bases): Give warnings about a base class with a
3538 non-virtual destructor, even if it is implicit.
3539 (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
3540 (maybe_warn_about_overly_private_class): Don't use
3541 TYPE_HAS_DESTRUCTOR.
3542 (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
3543 (check_for_override): Give it external linkage.
3544 (add_implicitly_declared_members): Generate destructors lazily.
3545 (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
3546 TYPE_HAS_DESTRUCTOR.
3547 (check_bases_and_members): Call check_methods before
3548 check_field_decls.
3549 (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
3550 TYPE_HAS_DESTRUCTOR.
3551 (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
3552 * cp-tree.def (PSEUDO_DTOR_EXPR): Document.
3553 * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
3554 (lang_type_class): Add lazy_destructor.
3555 (CLASSTYPE_LAZY_DESTRUCTOR): New macro.
3556 (CLASSTYPE_DESTRUCTORS): Robustify.
3557 (TYPE_HAS_DESTRUCTOR): Remove.
3558 (check_for_override): Declare.
3559 (build_vbase_delete): Remove.
3560 * cvt.c (convert_to_void): Issue errors about pseudo-destructor
3561 expressions.
3562 * decl.c (cxx_maybe_build_cleanup): Remove dead code.
3563 * except.c (dtor_nothrow): Lazily create destructors if necessary.
3564 (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
3565 * init.c (build_delete): Lazily create destructors, if necessary.
3566 (build_vbase_delete): Remove.
3567 * method.c (locate_dtor): Simplify.
3568 (implicitly_declare_fn): Add support for destructors.
3569 * parser.c (cp_parser_lookup_name): Lazily create destructors, if
3570 necessary.
3571 * pt.c (check_explicit_specialization): Don't use
3572 TYPE_HAS_DESTRUCTOR.
3573 (instantiate_class_template): Likewise.
3574 * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
3575 * rtti.c (emit_support_tinfos): Robustify.
3576 * search.c (lookup_fnfields_1): Lazily create destructors.
3577 * typeck.c (build_class_member_access_expr): Remove
3578 PSEUDO_DTOR_EXPR handling.
3579 (lookup_destructor): Likewise.
3580
3581 2005-02-08 Kazu Hirata <kazu@cs.umass.edu>
3582
3583 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update
3584 copyright.
3585
3586 2005-02-07 Mark Mitchell <mark@codesourcery.com>
3587
3588 * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
3589 on boolean variables.
3590 (cp_lexer_stop_debugging): Likewise.
3591
3592 2005-02-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3593
3594 PR c++/17401
3595 * parser.c (cp_parser_pure_specifier): Emit a specific error
3596 message with an invalid pure specifier.
3597 * decl2.c (grok_function_init): Remove.
3598 (grokfield): An initializer for a method is a always a pure
3599 specifier.
3600
3601 2005-02-02 Matt Austern <austern@apple.com>
3602
3603 PR c++/19628
3604 * cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
3605 * parser.c (cp_parser_postfix_expression): Accept function call in
3606 constant expression if builtin_valid_in_constant_expr_p is true
3607 for that function.
3608 * pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
3609 * semantics.c (finish_id_expression): Accept function call in constant
3610 expression if builtin_valid_in_constant_expr_p is true for that
3611 function.
3612 * tree.c (builtin_valid_in_constant_expr_p): New.
3613
3614 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3615
3616 PR c++/17413
3617 * pt.c (check_instantiated_args): Improve error message.
3618 Fix logic when to print its second part.
3619
3620 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3621
3622 * cp-tree.h (complete_type_or_else): Remove macro.
3623 (complete_type_or_diagnostic): Rename to complete_type_or_else
3624 and remove last argument.
3625 * typeck.c (complete_type_or_diagnostic): Rename to
3626 complete_type_or_else and remove last argument.
3627
3628 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3629
3630 * cp-tree.h (commonparms): Remove prototype.
3631 (convert_arguments): Likewise.
3632 (PFN_FROM_PTRMEMFUNC): Remove.
3633 * typeck.c (commonparms): Make static.
3634 (convert_arguments): Add prototype. Make static.
3635 (PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc.
3636
3637 2005-01-31 Mark Mitchell <mark@codesourcery.com>
3638
3639 * parser.c (cp_parser_primary_expression): Don't complain about
3640 floating-point literals in integral constant expressions when
3641 !pedantic.
3642
3643 2005-02-01 Alexandre Oliva <aoliva@redhat.com>
3644
3645 * parser.c (cp_parser_template_id): Revert comment patch too.
3646
3647 PR c++/18757
3648 PR c++/19366
3649 PR c++/19499
3650 * parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
3651 Issue an error when creating the template id.
3652 * pt.c (fn_type_unification): Return early if the explicit
3653 template arg list is an error_mark_node.
3654
3655 2005-01-31 Mark Mitchell <mark@codesourcery.com>
3656
3657 * decl.c (build_enumerator): Do not issue duplicate error messages
3658 about invalid enumeration constants.
3659 * parser.c (cp_parser_non_integral_constant_expression): Always
3660 set parser->non_integral_constant_expression_p.
3661 (cp_parser_primary_expression): Add cast_p parameter. Issue
3662 errors about invalid uses of floating-point literals in
3663 cast-expressions.
3664 (cp_parser_postfix_expression): Add cast_p parameter.
3665 (cp_parser_open_square_expression): Pass it.
3666 (cp_parser_parenthesized_expression_list): Add cast_p parameter.
3667 (cp_parser_unary_expression): Likewise.
3668 (cp_parser_new_placement): Pass it.
3669 (cp_parser_direct_new_declarator): Likewise.
3670 (cp_parser_new_initializer): Likewise.
3671 (cp_parser_cast_expression): Add cast_p parameter.
3672 (cp_parser_binary_expression): Likewise.
3673 (cp_parser_question_colon_clause): Likewise.
3674 (cp_parser_assignment_expression): Likewise.
3675 (cp_parser_expression): Likewise.
3676 (cp_parser_constant_expression): If an integral constant
3677 expression is invalid, return error_mark_node.
3678 (cp_parser_expression_statement): Pass cast_p.
3679 (cp_parser_condition): Likewise.
3680 (cp_parser_iteration_statement): Likewise.
3681 (cp_parser_jump_statement): Likewise.
3682 (cp_parser_mem_initializer): Likewise.
3683 (cp_parser_template_argument): Likewise.
3684 (cp_parser_parameter_declaration): Likewise.
3685 (cp_parser_initializer): Likewise.
3686 (cp_parser_throw_expression): Likewise.
3687 (cp_parser_attribute_list): Likewise.
3688 (cp_parser_simple_cast_expression): Likewise.
3689 (cp_parser_functional_cast): Likewise.
3690 (cp_parser_late_parsing_default_args): Likewise.
3691 (cp_parser_sizeof_operand): Save/restore
3692 non_integral_constant_expression_p.
3693
3694 2005-01-31 Mike Stump <mrs@apple.com>
3695
3696 * parser.c (cp_lexer_new_main): Get the first token, first, before
3697 doing anything.
3698
3699 2005-01-31 Mark Mitchell <mark@codesourcery.com>
3700
3701 * decl.c (start_decl): Add missing parentheses.
3702
3703 2005-01-30 Mark Mitchell <mark@codesourcery.com>
3704
3705 PR c++/19555
3706 * cp-tree.h (DECL_USE_TEMPLATE): Expand documentation.
3707 * decl.c (duplicate_decls): Do not discard
3708 DECL_IMPLICIT_INSTANTIATION when merging declarations.
3709 (start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for
3710 variables that do not have DECL_USE_TEMPLATE.
3711
3712 PR c++/19395
3713 * decl.c (grokdeclarator): Refactor code so that qualified names
3714 are never allowed as the declarator in a typedef.
3715
3716 PR c++/19367
3717 * name-lookup.c (do_nonmember_using_decl): Avoid overloading
3718 builtin declarations.
3719
3720 PR c++/19457
3721 * call.c (convert_like_real): Inline call to
3722 dubious_conversion_warnings here.
3723 * cp-tree.h (dubious_conversion_warnings): Remove.
3724 * semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before
3725 setting TREE_NEGATED_INT.
3726 * typeck.c (dubious_conversion_warnings): Remove.
3727
3728 PR c++/19349
3729 * name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd
3730 memory.
3731
3732 2005-01-28 Mark Mitchell <mark@codesourcery.com>
3733
3734 PR c++/19253
3735 * parser.c (cp_parser_diagnose_invalid_type_name): Commit to
3736 tentative parses.
3737
3738 PR c++/19667
3739 * pt.c (redeclare_class_template): Robustify.
3740
3741 2005-01-27 Steven Bosscher <stevenb@suse.de>
3742
3743 * decl.c (finish_case_label): Use SWITCH_STMT accessor macros
3744 instead of SWITCH_EXPR ones.
3745 * pt.c (tsubst_expr): Likewise.
3746 * semantics.c (begin_switch_stmt, finish_switch_cond,
3747 finish_switch_stmt): Likewise.
3748
3749 2005-01-26 J"orn Rennecke <joern.rennecke@st.com>
3750
3751 PR c++/18370
3752 * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
3753
3754 2005-01-25 Andrew Pinski <pinskia@physics.uc.edu>
3755
3756 * class.c (abort_fndecl_addr): New variable.
3757 (build_vtbl_initializer): If we have a pure virtual function
3758 share the abort function's address.
3759 Include gt-cp-class.h at the end.
3760 * config-lang.in (gtfiles): Add cp/class.c.
3761
3762 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3763
3764 * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
3765 (pp_cxx_function_definition): Make static.
3766 * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
3767 (pp_cxx_function_definition): Likewise.
3768
3769 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3770
3771 * name-lookup.c (print_binding_level): Make static.
3772 (constructor_name_full): Make static inline.
3773 (current_decl_namespace): Make static.
3774 * name-lookup.h (constructor_name_full): Remove prototype.
3775 (print_binding_level): Likewise.
3776 (current_decl_namespace): Likewise.
3777
3778 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3779
3780 * decl.h (debug_bindings_indentation): Remove.
3781
3782 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
3783
3784 * typeck.c: Fix a comment typo.
3785
3786 2005-01-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3787
3788 PR c++/19208
3789 * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
3790 at least once.
3791 (tsubst): Use fold_decl_constant_value in place of a bare call to
3792 integral_constant_value.
3793
3794 2005-01-20 Kazu Hirata <kazu@cs.umass.edu>
3795
3796 * typeck.c (more_qualified_p): Remove.
3797 * cp-tree.h: Remove the corresponding prototype.
3798
3799 2005-01-19 Matt Austern <austern@apple.com>
3800
3801 * typeck.c (comptypes): Handle return code from objc_comptypes
3802 correctly.
3803
3804 2005-01-19 Kazu Hirata <kazu@cs.umass.edu>
3805
3806 * cp-tree.h, name-lookup.h: Remove unused prototypes.
3807
3808 2005-01-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3809
3810 PR c++/19375
3811 * semantics.c (finish_id_expression): Disable access checking for
3812 already lookuped FIELD_DECL.
3813
3814 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
3815
3816 * decl.c (delete_block): Remove.
3817 * cp-tree.h: Remove the corresponding prototype.
3818
3819 * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
3820 walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
3821 Remove.
3822 * cp-tree.h: Remove the corresponding prototypes.
3823
3824 * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
3825 cp_update_decl_after_saving, name_p): Remove.
3826 * cp-tree.h: Remove the corresponding prototypes.
3827
3828 2005-01-18 Andrew Pinski <pinskia@physics.uc.edu>
3829
3830 PR c/19472
3831 * semantics.c (finish_asm_stmt): Strip nops off
3832 input memory operands.
3833
3834 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
3835
3836 * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
3837 typeck2.c: Update copyright.
3838
3839 2005-01-16 Kazu Hirata <kazu@cs.umass.edu>
3840
3841 * class.c (get_enclosing_class): Remove.
3842 * cp-tree.h: Remove the corresponding prototypes.
3843
3844 * cvt.c (convert_lvalue): Remove.
3845 * cp-tree.h: Remove the corresponding prototype.
3846
3847 * pt.c (tinst_for_decl): Remove.
3848 * cp-tree.h: Remove the corresponding prototypes.
3849
3850 * tree.c (hash_chainon): Remove.
3851 * cp-tree.h: Remove the corresponding prototypes.
3852
3853 2005-01-15 Jakub Jelinek <jakub@redhat.com>
3854
3855 PR c++/19263
3856 * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
3857 of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
3858
3859 2005-01-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3860
3861 * Make-lang.in (cp-warn): Don't append $(WERROR).
3862
3863 2005-01-10 Kazu Hirata <kazu@cs.umass.edu>
3864
3865 * cp-tree.h: Fix a comment typo.
3866
3867 2005-01-07 Nathan Sidwell <nathan@codesourcery.com>
3868
3869 PR c++/19298
3870 * pt.c (tsubst_qualified_id): Call convert_from_reference.
3871
3872 2005-01-06 Mark Mitchell <mark@codesourcery.com>
3873
3874 PR c++/19244
3875 * class.c (add_implicitly_declared_members): Remove dead code.
3876 * decl.c (grokfndecl): Add sfk parameter. Use it do set
3877 DECL_CONSTRUCTOR_P.
3878 (grokdeclarator): Adjust calls to grokfndecl.
3879 * method.c (implicitly_declare_fn): Improve documentation.
3880 * parser.c (cp_parser_direct_declarator): Do not consider a
3881 function to be a constructor if the containing class was
3882 originally anonymous.
3883
3884 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3885
3886 PR c++/17154
3887 * search.c (lookup_field_1): Handle using declaration in
3888 class template partial specialization.
3889
3890 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3891
3892 PR c++/19258
3893 * pt.c (push_access_scope): Handle friend defined in class.
3894 (pop_access_scope): Likewise.
3895
3896 2005-01-06 Nathan Sidwell <nathan@codesourcery.com>
3897
3898 PR c++/19270
3899 * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
3900 (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
3901 array-new handling code. Use build_x_binary_op.
3902
3903 2005-01-05 Nathan Sidwell <nathan@codesourcery.com>
3904
3905 PR c++/19030
3906 * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
3907 * name-lookup.h (push_scope): Return pushed scope, not flag.
3908 * name-lookup.c (push_scope): Return scope that should be popped,
3909 not a flag.
3910 * decl.c (start_decl): Adjust.
3911 (grokfndecl): Adjust scope push and pop.
3912 * decl2.c (check_classfn): Likewise.
3913 * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
3914 cp_parser_init_declarator, cp_parser_direct_declarator,
3915 cp_parser_class_specifier, cp_parser_class_head,
3916 cp_parser_lookup_name,
3917 cp_parser_constructor_declarator_p): Likewise.
3918 * pt.c (instantiate_class_template,
3919 resolve_typename_type): Likewise.
3920
3921 2005-01-03 Volker Reichelt <reichelt@igpm.rwth-aaachen.de>
3922
3923 PR c++/14136
3924 * parser.c (cp_parser_unqualified_id): Do not issue error message
3925 for typedef-name as destructor declarator when performing an
3926 uncommitted tentative parse.
3927
3928 2005-01-01 Steven Bosscher <stevenb@suse.de>
3929
3930 PR middle-end/17544
3931 * decl.c (finish_function): Fix comment. Annotate the compiler
3932 generated return with the current file name and line 0.