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