Friend class name lookup 3/n, PR c++/3332
[gcc.git] / gcc / cp / ChangeLog
1 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2
3 Friend class name lookup 3/n, PR c++/3332
4 * name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
5 (lookup_type_scope): Don't deal with name from user declaration
6 specially.
7 * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
8 * parser.c (cp_parser_class_specifier): Use push_inner_scope and
9 pop_inner_scope.
10
11 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12
13 Friend class name lookup 2/n, PR c++/14513, c++/15410
14 * name-lookup.c (lookup_name_real): Simplify.
15 (lookup_type_scope): Add SCOPE parameter. Handle friend class
16 lookup.
17 * name-lookup.h (tag_scope): New enum type.
18 (lookup_type_scope): Adjust declaration.
19 * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
20 Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
21 (start_enum): Likewise. Add assertion test that NAME is
22 IDENTIFIER_NODE. Use anonymous name for dummy ENUMERAL_TYPE in
23 case of error.
24 * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
25 * parser.c (cp_parser_elaborated_type_specifier,
26 cp_parser_class_head): Adjust call to xref_tag.
27 * pt.c (lookup_template_class, instantiate_class_template):
28 Likewise.
29 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
30 tinfo_base_init, emit_support_tinfos): Likewise.
31
32 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
33
34 * g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
35
36 2004-11-24 Mark Mitchell <mark@codesourcery.com>
37
38 PR c++/17473
39 * name-lookup.c (supplement_binding): Do not allow typedefs to be
40 redefined in class scope.
41
42 PR c++/18285
43 * parser.c (cp_parser_set_decl_type_spec): Do not try to allow
44 redefinitions of builtin types other that "bool" or "wchar_t".
45
46 2004-11-24 Steven Bosscher <stevenb@suse.de>
47
48 * decl.c (cxx_init_decl_processing): Don't clear
49 flag_inline_functions.
50
51 2004-11-24 Mark Mitchell <mark@codesourcery.com>
52
53 * pt.c (tsubst_function_type): Do not permit function types which
54 return arrays or functions.
55
56 PR c++/18586
57 * parser.c (cp_parser_init_declarator): Do not pop scope twice.
58
59 PR c++/18530
60 * cp-tree.h (CTOR_NAME): Remove.
61 (DTOR_NAME): Remove.
62 * decl.c (initialize_predefined_identifiers): Add spaces to the
63 end of constructor and destructor names.
64
65 2004-11-24 Giovanni Bajo <giovannibajo@gcc.gnu.org>
66
67 PR c++/8929
68 * decl.c (start_decl): Check for invalid specialization headers.
69
70 2004-11-24 Paolo Bonzini <bonzini@gnu.org>
71
72 PR c++/16882
73
74 * call.c (standard_conversion): Move check for conversions between
75 vector pointers...
76 * typeck.c (ptr_reasonably_similar): ... here.
77
78 2004-11-23 Ben Elliston <bje@au.ibm.com>
79
80 * cp-tree.h (context_as_string): Remove extern.
81 * error.c (context_as_string): Remove.
82
83 * cp-tree.h (cp_type_qual_from_rid): Remove extern.
84 * lex.c (cp_type_qual_from_rid): Remove.
85
86 * cp-tree.h (do_poplevel): Remove extern.
87 (check_multiple_declarators): Likewise.
88 * semantics.c (do_poplevel): Make static.
89 (check_multiple_declarators): Remove.
90
91 * cp-tree.h (check_final_overrider): Remove extern.
92 * search.c (check_final_overrider): Make static.
93
94 * cp-tree.h (build_artificial_parm): Remove extern.
95 * decl2.c (build_artificial_parm): Make static.
96
97 2004-11-22 Giovanni Bajo <giovannibajo@gcc.gnu.org>
98
99 PR c++/18354
100 * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
101 Make sure the result is always a rvalue.
102
103 2004-11-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
104
105 * decl.c (start_preparsed_function): Call check_function_type even
106 in templates.
107 (require_complete_types_for_parms): Skip dependent types.
108 (check_function_type): Likewise.
109
110 2004-11-16 Steven Bosscher <stevenb@suse.de>
111
112 * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
113 * search.c: Don't include it.
114
115 2004-11-15 Andrew Pinski <pinskia@physics.uc.edu>
116
117 * cp-gimplify.c: Include pointer-set.h
118 (cp_genericize_r): Use pointer_sets instead of a hashtable.
119 Also instert the new statement for CLEANUP_STMT.
120 (cp_genericize): Use pointer_sets instead of a hashtable.
121 * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
122
123 2004-11-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
124
125 Friend class name lookup 1/n, PR c++/18471
126 * decl.c (lookup_and_check_tag): New function.
127 (xref_tag, start_enum): Use it.
128 (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
129 before !DECL_IMPLICIT_TYPEDEF_P. Also display previously declared
130 location.
131 * name-lookup.c (lookup_name_current_level): Rename to ...
132 (lookup_name_innermost_nonclass_level): ... this.
133 (lookup_type_scope): New function.
134 * name-lookup.h (lookup_name_current_level): Rename to ...
135 (lookup_name_innermost_nonclass_level): ... this.
136 (lookup_type_scope): Add declaration.
137
138 2004-11-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
139
140 PR c++/17344
141 * pt.c (coerce_template_parms): Only emit error message about
142 invalid template argument when TF_ERROR.
143
144 2004-11-12 Mark Mitchell <mark@codesourcery.com>
145
146 PR c++/18389
147 * decl.c (start_decl): Make sure to set *pop_scope_p. Return
148 error_mark_node to indicate errors.
149
150 PR c++/18429
151 * parser.c (cp_parser_direct_declarator): Disallow non-constant
152 array bounds when not inside a function.
153
154 PR c++/18436
155 * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
156 unqualified name resolves to a member function.
157
158 PR c++/18407
159 * pt.c (tsubst_copy_and_build): Handle qualified names used from a
160 derived class correctly.
161
162 * decl2.c (import_export_decl): Fix typo in comment.
163 * tree.c (pod_type_p): Likewise.
164
165 2004-11-10 Andrew Pinski <pinskia@physics.uc.edu>
166
167 * typeck.c (cxx_mark_addressable): Add braces around the first if.
168
169 2004-11-10 Adam Nemet <anemet@lnxw.com>
170
171 PR middle-end/18160
172 * typeck.c (cxx_mark_addressable): Issue an error if address of an
173 explicit register variable is requested.
174
175 2004-11-10 Nathan Sidwell <nathan@codesourcery.com>
176
177 PR c++/18143
178 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
179 (struct lang_decl_flags): Add thunk_p flag.
180 (struct lang_decl): Remove separate fixed_offset. Place
181 cloned_function and fixed_offset into union.
182 (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
183 (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
184 (THUNK_FIXED_OFFSET): Adjust.
185 * method.c (make_thunk): Adjust.
186
187 2004-11-09 Mark Mitchell <mark@codesourcery.com>
188
189 PR c++/18369
190 * init.c (build_new_1): Handle parenthesized type-ids that name an
191 array type. Tidy.
192
193 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
194
195 * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
196 pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
197 quoting in diagnostics.
198 * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
199 quoting in printf format.
200 * decl.c (duplicate_decls, start_decl): Use %qD instead of
201 unquoted %D.
202
203 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
204
205 * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
206 search.c, typeck2.c: Fix comment formatting.
207
208 2004-11-04 Ulrich Weigand <uweigand@de.ibm.com>
209
210 PR tree-optimization/18184
211 * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
212 of different modes or alias-all flags as equivalent.
213 * typeck.c (comptypes): Likewise.
214
215 2004-11-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
216
217 DR 49, 100
218 * cp-tree.h (TYPE_REF_OBJ_P): New macro.
219 (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
220 TYPE_REFFN_P): Document.
221 (fold_decl_constant_value): New prototype.
222 * pt.c (convert_nontype_argument_function): Rewrite and extract
223 parts into...
224 (fold_decl_constant_value, convert_nontype_argument_function): New.
225 (lookup_template_class): Add comment about useless double call.
226 * mangle.c (write_expression): Strip conversions before lowering
227 pointer to members.
228 * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
229 enum to enum conversion.
230
231 2004-11-02 Mark Mitchell <mark@codesourcery.com>
232
233 PR c++/18124
234 * parser.c (cp_parser_type_parameter): Robustify.
235
236 PR c++/18155
237 * parser.c (cp_parser_single_declaration): Disallow template
238 typedefs.
239
240 PR c++/18177
241 * typeck.c (build_const_cast): Use error_operand_p.
242
243 2004-11-02 Ziemowit Laski <zlaski@apple.com>
244
245 * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
246 (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
247 * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
248 from cp-lang.c.
249 * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
250 from cp-lang.c.
251 (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
252
253 2004-11-01 Nathan Sidwell <nathan@codesourcery.com>
254
255 PR c++/18064
256 * search.c (check_final_overrider): Deprecate gnu covariant extension.
257
258 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
259
260 Convert diagnostics to use quoting flag q 9/n
261 * typeck.c (build_x_unary_op, convert_member_func_to_ptr,
262 get_delta_difference): Use new quotation style.
263 * repo.c (reopen_repo_file_for_write): Likewise.
264 * pt.c (do_type_instantiation): Likewise.
265 * parser.c (cp_parser_diagnose_invalid_type_name):
266 * name-lookup.c (push_overloaded_decl, set_decl_namespace):
267 * error.c (cp_print_error_function,
268 print_instantiation_full_context): Likewise.
269 * decl.c (define_label, grok_reference_init,
270 maybe_deduce_size_from_array_init, revert_static_member_fn):
271 * decl2.c (check_classfn): Likewise.
272 * class.c (add_method, check_field_decls, layout_class_type,
273 resolve_address_of_overloaded_function): Likewise.
274 * call.c (build_x_va_arg, build_over_call): Likewise.
275
276 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
277
278 Convert diagnostics to use quoting flag q 8/n
279 * cvt.c (cp_convert_to_pointer, warn_ref_binding,
280 convert_to_reference, ocp_convert, convert_to_void
281 cp_convert_to_pointer): Use new quotation style.
282
283 2004-10-31 Mark Mitchell <mark@codesourcery.com>
284
285 PR c++/15172
286 * typeck2.c (store_init_value): Use split_nonconstant_init even
287 for types that require construction.
288
289 1004-10-28 Matt Austern <austern@apple.com>
290
291 PR c++/17542
292 * cp-tree.h (class_key_or_enum_as_string): Declare.
293 * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
294 and remove static qualifier.
295 * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
296 union/enum declaration.
297
298 2004-10-29 Kazu Hirata <kazu@cs.umass.edu>
299
300 * pt.c: Fix a comment typo.
301
302 2004-10-28 Nathan Sidwell <nathan@codesourcery.com>
303
304 * typeck.c (composite_pointer_type): Remove comment about DR 195.
305 (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
306 warning when being pedantic.
307 (build_reinterpet_cast, build_c_cast): Adjust.
308
309 2004-10-29 Mark Mitchell <mark@codesourcery.com>
310
311 PR c++/17695
312 * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
313 appear in a constructor/destructor that will be cloned.
314
315 1004-10-28 Matt Austern <austern@apple.com>
316
317 PR c++/14124
318 * decl.c (finish_enum): Handle packed attribute.
319 * parser.c (cp_parser_enum_specifier): Process trailing attributes.
320
321 2004-10-28 Mark Mitchell <mark@codesourcery.com>
322
323 PR c++/17132
324 * pt.c (instantiate_class_template): Increment
325 processing_template_decl when substituting into a member class
326 template.
327
328 2004-10-27 Mark Mitchell <mark@codesourcery.com>
329
330 PR c++/17435
331 * call.c (convert_like_real): Fix formatting.
332 (initialize_reference): When binding a temporary to a base class,
333 ensure that the nominal copy made is to the derived class, not the
334 base class.
335
336 PR c++/18140
337 * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
338 include ">>".
339
340 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
341
342 * decl.c (bad_specifiers): Move the q after the %.
343
344 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
345
346 * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
347 the %.
348
349 2004-10-26 Mark Mitchell <mark@codesourcery.com>
350
351 * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
352 * search.c (current_scope): Fix prototype.
353
354 PR c++/18093
355 * search.c (current_scope): Return the innermost non-block scope,
356 not the innermost non-block, non-namespace scope.
357 (at_namespace_scope_p): Adjust accordingly.
358 (dfs_accessible_post): Do not pass namespaces to is_friend.
359 (dfs_walk_once_accessible_r): Likewise.
360 * decl.c (grokvardecl): Adjust call to current_scope.
361 (build_enumerator): Likewise.
362 * parser.c (cp_parser_using_declaration): Likewise.
363 (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
364 current_scope.
365 (cp_parser_class_head): Adjust call to current_scope.
366 * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
367 alias.
368
369 PR c++/18020
370 * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
371 their underlying values.
372
373 PR c++/18161
374 * typeck.c (build_binary_op): Honor build_type, even when in a
375 template.
376
377 2004-10-26 Nathan Sidwell <nathan@codesourcery.com>
378
379 * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
380 padding token checking.
381
382 2004-10-25 Andrew Pinski <pinskia@physics.uc.edu>
383
384 PR c++/18121
385 * decl.c (grokdeclarator) <case cdk_array>: Remove the call
386 layout_type as it is already done by create_array_type_for_decl.
387
388 2004-10-22 Nathan Sidwell <nathan@codesourcery.com>
389
390 PR c++/18095
391 * parser.c (eof_token): Make const, correctly initialize rid and
392 location fields.
393 (struct cp_lexer): Replace buffer_end pointer with buffer_length
394 count. Adjust.
395 (cp_lexer_new_main): Directly grow lexer's buffer here. Don't
396 zero it out.
397 (cp_lexer_new_from_tokens): Adjust.
398 (cp_lexer_grow_buffer): Remove.
399 (cp_lexer_peek_nth_token, cp_lexer_consume_token,
400 cp_lexer_purge_token): Add const casts.
401
402 2004-10-21 Mark Mitchell <mark@codesourcery.com>
403
404 PR c++/18073
405 PR c++/10841
406 * cp-tree.h (convert_to_base): Change prototype.
407 (build_ptrmemfunc): Likewise.
408 (convert_ptrmem): New function.
409 * call.c (struct conversion): Adjust documentation for base_p.
410 (standard_conversion): Set base_p for ck_pmem conversions as
411 appropriate.
412 (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
413 conversions.
414 * class.c (convert_to_base): Handle both pointers and objects.
415 Add nonnull parameter.
416 (build_vfield_ref): Adjust call to convert_to_base.
417 * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
418 (convert_force): Likewise.
419 * typeck.c (build_unary_op): Likewise.
420 (convert_ptrmem): New function.
421 (build_static_cast_1): Use it.
422 (build_reinterpret_cast): Allow conversions to vector types.
423 (get_delta_difference): Add c_cast_p parameter.
424 (build_ptrmemfunc): Likewise. Adjust calls to
425 get_delta_difference.
426
427 2004-10-21 Andrew Pinski <pinskia@physics.uc.edu>
428
429 PR c++/13560
430 * error.c (cp_error_at): Output the context as it might be
431 different file as the other location.
432
433 2004-10-21 Kazu Hirata <kazu@cs.umass.edu>
434
435 * typeck.c: Fix a comment typo.
436
437 2004-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
438
439 PR c++/13495
440 * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
441 * cp-tree.h (make_unbound_class_template): Adjust prototype.
442 * parser.c (cp_parser_lookup_name): Adjust call to
443 make_unbound_class_template.
444 (cp_parser_single_declaration): Handle member class of class
445 template as template friend parsing correctly.
446 * friend.c (is_friend): Call is_specialization_of_friend for
447 template friend class.
448 (make_friend_class): Handle member class of class template as
449 template friend.
450 * pt.c (is_specialization_of_friend): Likewise.
451 (instantiate_class_template): Likewise.
452 (tsubst): Adjust call to make_unbound_class_template.
453
454 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
455
456 * typeck.c (composite_pointer_type): Add comment about DR 195
457 (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
458 Allow function pointer conversions that DR195 suggests.
459 (build_reinterpret_cast, build_c_cast): Update
460 build_reinterpret_cast_1 calls.
461
462 2004-10-20 Kazu Hirata <kazu@cs.umass.edu>
463
464 * call.c, typeck.c: Fix comment typos.
465
466 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
467
468 * parser.c (cp_token_position): New typedef. Define VEC thereof.
469 (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
470 next_token and last_token cp_token_position. Make saved_tokens a
471 VEC(cp_token_position).
472 (eof_token): New static variable.
473 (CP_SAVED_TOKENS_SIZE): Rename to ...
474 (CP_SAVED_TOKEN_STACK): ... here.
475 (cp_lexer_new_main): Adjust main lexer creation and buffer
476 filling.
477 (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
478 to the parent buffer. Do not append eof token.
479 (cp_lexer_destroy): Only free buffer if non-NULL. Free token
480 stack.
481 (cp_lexer_next_token, cp_lexer_prev_token): Remove.
482 (cp_lexer_token_position, cp_lexer_token_at): New.
483 (cp_lexer_saving_tokens): Adjust. Make inline.
484 (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
485 (cp_lexer_peek_token_emit_debug_info): Fold into ...
486 (cp_lexer_peek_token): ... here.
487 (cp_lexer_peek_nth_token): Don't peek past EOF.
488 (cp_lexer_consume_token): Set next_token to eof_token, if reaching
489 EOF.
490 (cp_lexer_purge_token): Adjust eof setting.
491 (cp_lexer_purge_tokens_after): Likewise.
492 (cp_lexer_save_tokens): Push next_token directly.
493 (cp_lexer_commit_tokens): Adjust.
494 (cp_lexer_rollback_tokens): Pop next_token directly.
495 (cp_parser_check_for_invalid_template_id): Adjust token purging.
496 (cp_parser_translation_unit): Do not consume the EOF.
497 (cp_parser_nested_name_specifier_opt): Adjust token purging.
498 (cp_parser_template_id, cp_parser_template_name): Likewise.
499
500 2004-10-19 Mark Mitchell <mark@codesourcery.com>
501
502 PR c++/14035
503 * call.c (struct conversion): Add base_p.
504 (convert_like): Add c_cast_p argument.
505 (convert_like_with_conversion): Likewise.
506 (build_conv): Clear base_p.
507 (standard_conversion): Set it, for derived-to-base conversions.
508 (convert_like_real): Add c_cast_p parameter. Handle pointer
509 conversions directly rather than relying on ocp_convert.
510 (perform_direct_initialization_if_possible): Add c_cast_p
511 parameter.
512 * cp-tree.h (perform_direct_initialization_if_possible): Change
513 prototype.
514 (convert_member_func_to_ptr): New function.
515 * typeck.c (check_for_casting_away_constness): Add diag_fn
516 parameter.
517 (build_static_cast_1): New function, split out from ...
518 (build_static_cast): ... here. Use build_static_cast_1.
519 (build_reinterpret_cast_1): New function, split out from ...
520 (build_reinterpret_cast): ... here. Use build_reinterpret_cast_1.
521 (build_const_cast_1): New function, split out from ...
522 (build_const_cast): ... here. Use build_const_cast_1.
523 (build_c_cast): Rewrite to use build_const_cast_1,
524 build_static_cast_1, and build_reinterpret_cast_1.
525 (convert_member_func_to_ptr): New function.
526
527 2004-10-19 Paolo Bonzini <bonzini@gnu.org>
528
529 PR c++/18047
530 * parser.c (enum cp_parser_prec): Give relational expressions
531 a higher precedence than equality expressions.
532
533 2004-10-15 Nathan Sidwell <nathan@codesourcery.com>
534
535 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
536 (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
537 (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
538 (enum base_access): Reorganize.
539 (accessible_base_p, accessible_p): Add consider_local_p parameter.
540 * call.c (standard_conversion): Update comment about
541 DERIVED_FROM_P.
542 (enforce_access): Adjust accessible_p call.
543 (build_over_call): Adjust accessible_base_p call.
544 * class.c (convert_to_base): Adjust lookup_base call.
545 (build_vtbl_ref_1): Likewise.
546 (warn_about_ambiguous_bases): Likewise. Add early exit.
547 * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
548 * search.c (accessible_base_p): Add consider_local_p parameter.
549 (lookup_base): Pass consider_local_p to accessible_base_p call.
550 (friend_accessible_p): Check whether scope is a class member.
551 Remove unnecessary class template check.
552 (accessible_p): Add consider_local_p parameter. Use it.
553 (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
554 * tree.c (maybe_dummy_object): Likewise.
555 * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
556 (build_class_member_access_expr): Adjust lookup_base call.
557 * typeck2.c (binfo_or_else): Likewise.
558 * rtti.c (build_dynamic_cast_1): Access can consider friendship
559 and current scope.
560
561 2004-10-17 Giovanni Bajo <giovannibajo@gcc.gnu.org>
562
563 PR c++/17743
564 * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
565
566 2004-10-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
567
568 PR c++/10479
569 * parser.c (cp_parser_parenthesized_expression_list): Fold
570 non-dependent expressions in attribute lists.
571
572 2004-10-15 Mark Mitchell <mark@codesourcery.com>
573
574 PR c++/17042
575 * decl.c (declare_global_var): Use the return value from pushdecl.
576
577 PR c++/14667
578 * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
579 type names if we have already found a valid type.
580 (cp_parser_member_declaration): Likewise.
581
582 PR c++/17916
583 * parser.c (cp_parser_member_specification_opt): Handle
584 CPP_PRAGMA.
585
586 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
587
588 * dump.c, g++spec.c, repo.c: Update copyright.
589
590 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
591
592 * decl.c: Fix a comment typo.
593
594 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
595
596 PR c++/16301
597 * name-lookup.c (parse_using_directive): If we have a
598 error_mark_node, do not set the decl namespace associations
599 on it.
600
601 2004-10-14 Mark Mitchell <mark@codesourcery.com>
602
603 PR c++/17976
604 * decl.c (cp_finish_decl): Do not call expand_static_init more
605 than once for a single variable.
606
607 2004-10-14 Matt Austern <austern@apple.com>
608
609 * Make-lang.in (pt.o): depends on pointer-set.h
610 * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
611 * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
612 (for_each_template_parm): Convert from htab_t to pointer_set_t.
613 * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
614
615 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
616
617 PR c++/17661
618 * semantics.c (finish_for_expr): Convert expression to void
619 so that we don't create temporaries for a?b:c.
620
621 2004-10-13 Kazu Hirata <kazu@cs.umass.edu>
622
623 * search.c: Fix a comment typo.
624
625 2004-10-12 Nathan Sidwell <nathan@codesourcery.com>
626
627 * class.c (dfs_modify_vtables): Simplify condition. Return
628 dfs_skip_bases as appropriate.
629 (modify_all_vtables): Walk in pre-order.
630 * search.c (dfs_walk_all, dfs_walk_once_r,
631 dfs_walk_once_accessible_r): Assert post order function never
632 returns dfs_skip_bases.
633
634 * search.c (struct lookup_base_data_s): New.
635 (lookup_base_r): Replace with ...
636 (dfs_lookup_base): ... this.
637 (lookup_base): Use dfs_walk_all.
638
639 2004-10-12 Kazu Hirata <kazu@cs.umass.edu>
640
641 * search.c: Fix comment typos.
642
643 2004-10-11 Mark Mitchell <mark@codesourcery.com>
644
645 PR c++/15786
646 * parser.c (cp_parser_declarator): Add member_p parameter.
647 (cp_parser_condition): Adjust calls to cp_parser_declarator.
648 (cp_parser_explicit_instantiation): Likewise.
649 (cp_parser_init_declarator): Likewise.
650 (cp_parser_direct_declarator): Add member_p parameter. Do not
651 parse tentatively when parsing the parameters to a member.
652 (cp_parser_type_id): Adjust calls to cp_parser_declarator.
653 (cp_parser_parameter_declaration): Likewise.
654 (cp_parser_member_declaration): Likewise.
655 (cp_parser_exception_declaration): Likewise.
656
657 PR c++/17936
658 * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
659 * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
660 for members of partial or explicit specializations.
661
662 PR c++/17929
663 * decl2.c (finish_anon_union): Robustify.
664
665 2004-10-11 Nathan Sidwell <nathan@codesourcery.com>
666
667 * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
668 (dcast_base_hint): ... here.
669 * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
670 * search.c (struct dcast_data_s): New.
671 (dynamic_cast_base_recurse): Remove. Replace with ...
672 (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
673 (get_dynamic_cast_base_type): Rename to ...
674 (dcast_base_hint): ... here. Use dfs_walk_once_accessible.
675 (accessible_r): Remove.
676 (dfs_accessible_post): New, broken out of accessible_r.
677 (accessible_p): Use dfs_walk_once_accessible.
678 (dfs_walk_once_accessible_r): New. From accessible_r.
679 (dfs_walk_once_accessible): New. From acessible_p.
680
681 * cp-tree.h (SAME_BINFO_TYPE_P): New.
682 * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
683 binfo types.
684 (convert_to_base_statically, determine_primary_bases,
685 update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
686 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
687 accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
688 build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
689 * init.c (expand_member_init): Likewise.
690 * search.c (lookup_base_r, dynamic_cast_base_recurse,
691 binfo_via_virtual, copied_binfo, binfo_for_vbase,
692 original_binfo): Likewise.
693 * tree.c (copy_binfo): Likewise.
694
695 2004-10-11 Kazu Hirata <kazu@cs.umass.edu>
696
697 * semantics.c: Fix comment typos.
698
699 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
700
701 PR c++/17554
702 part of c++/17657
703 middle-end/17703
704 * semantics.c (maybe_cleanup_point_expr): Call
705 fold_build_cleanup_point_expr.
706 (maybe_cleanup_point_expr_void): New function.
707 (add_decl_expr): Call maybe_cleanup_point_expr_void.
708 (finish_expr_stmt): Likewise.
709 (finish_return_stmt): Likewise.
710 (finish_for_expr): Likewise.
711 (finish_asm_stmt): Likewise.
712 * typeck.c (condition_conversion): Call
713 fold_build_cleanup_point_expr.
714
715 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
716
717 PR c++/17907
718 * semantics.c (add_decl_expr): If the decl has a size which
719 has side effects then the decl expression needs a cleanup point.
720
721 2004-10-10 Mark Mitchell <mark@codesourcery.com>
722
723 PR c++/17393
724 * decl.c (grokdeclarator): Robustify error-recovery on invalid
725 declarations.
726
727 2004-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
728
729 Convert diagnostics to use quoting flag q 7/n
730 * typeck.c (composite_pointer_type_r, composite_pointer_type,
731 cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr,
732 string_conv_p, build_class_member_access_expr,
733 build_class_member_access_expr, lookup_destructor,
734 finish_class_member_access_expr, build_indirect_ref,
735 get_member_function_from_ptrfunc, build_function_call,
736 convert_arguments, build_binary_op, pointer_diff, build_unary_op,
737 check_for_casting_away_constness, build_static_cast,
738 build_reinterpret_cast, build_const_cast, build_c_cast,
739 build_modify_expr, get_delta_difference, build_ptrmemfunc,
740 dubious_conversion_warnings, convert_for_assignment,
741 convert_for_initialization,
742 maybe_warn_about_returning_address_of_local, check_return_expr):
743 Use quoting marks.
744
745 * typeck2.c (error_not_base_type, readonly_error,
746 abstract_virtuals_error, cxx_incomplete_type_diagnostic,
747 store_init_value, digest_init, build_x_arrow,
748 build_m_component_ref, require_complete_eh_spec_types): Likewise.
749
750 * tree.c (cp_build_qualified_type_real,
751 handle_java_interface_attribute, handle_init_priority_attribute):
752 Likewise.
753
754 * semantics.c (finish_asm_stmt, finish_non_static_data_member,
755 finish_pseudo_destructor_expr,
756 check_template_template_default_arg, begin_class_definition,
757 finish_base_specifier, qualified_name_lookup_error,
758 finish_id_expression, finish_typeof): Likewise.
759
760 * search.c (lookup_base, check_final_overrider,
761 look_for_overrides_r): Likewise.
762
763 * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
764
765 2004-10-09 Mark Mitchell <mark@codesourcery.com>
766
767 PR c++/17867
768 * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
769 constructor.
770
771 PR c++/17670
772 * init.c (build_new): Correct comments.
773 * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
774 the non-array case.
775
776 PR c++/17821
777 * parser.c (cp_parser_postfix_dot_deref_expression): If the
778 pseduo-destructor-name production does not work, fall back to the
779 ordinary production.
780
781 PR c++/17826
782 * tree.c (cp_tree_equal): Handle a BASELINK.
783
784 PR c++/17524
785 * cp-tree.h (check_var_type): New function.
786 * decl.c (check_var_type): New function, split out from ...
787 (grokdeclarator): ... here.
788 * pt.c (tsubst_decl): Use check_var_type.
789
790 PR c++/17685
791 * decl.c (grokdeclarator): Disallow declarations of operators as
792 non-functions.
793
794 2004-10-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
795
796 PR c++/17868
797 * error.c (dump_expr): Add missing case for RDIV_EXPR.
798
799 2004-10-08 Kazu Hirata <kazu@cs.umass.edu>
800
801 * pt.c, search.c: Fix comment typos.
802
803 2004-10-08 Nathan Sidwell <nathan@codesourcery.com>
804
805 * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
806 unmarkedp): Remove.
807 (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
808 * class.c (struct find_final_overrider_data): Remove most_derived,
809 vpath_list and vpath fields. Add path field.
810 (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
811 (dfs_find_final_overrider): Rename to ...
812 (dfs_find_final_overrider_pre): ... here. Adjust.
813 (dfs_find_final_overrider_post): Adjust.
814 (dfs_find_final_overrider_q): Fold into
815 dfs_find_final_overrider_pre.
816 (find_final_overrider): Adjust dfs searching.
817 (dfs_modify_vtables): Don't mark binfo here.
818 (modify_all_vtables): Use dfs_walk_once.
819 (build_vtt_inits): Likwise. Use dfs_walk_all.
820 (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
821 Return dfs_skip_bases as appropriate.
822 (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
823 * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
824 appropriate. Don't mark binfo here.
825 (initialize_vtbl_ptrs): Use dfs_walk_once.
826 * search.c (struct vbase_info): Remove unused struct.
827 (access_in_type): Use dfs_walk_once.
828 (dfs_access_in_type): Don't mark binfo here.
829 (dfs_accessible_queue_p, dfs_accessible_p) Remove.
830 Fold into ...
831 (accessible_r): ... here. New. Specialize dfs_walk_once.
832 (accessible_p): Use accessible_r.
833 (lookup_field_queue_p): Remove. Fold into ...
834 (lookup_field_r): ... here. Adjust.
835 (lookup_member): Use dfs_walk_all.
836 (dfs_walk_real, dfs_walk): Replace with ...
837 (dfs_walk_all, dfs_walk_once): ... these.
838 (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
839 (dfs_unmark, unmarkedp, markedp): Remove.
840 (dfs_get_pure_virtuals): Don't mark binfo here.
841 (get_pure_virtuals): Use dfs_walk_once.
842 (dfs_debug_unmarked_p): Remove. Fold into ...
843 (dfs_debug_mark): ... here.
844 (note_debug_info_needed): Use dfs_walk_all.
845
846 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
847
848 * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
849 CLEANUP_POINT_EXPR to get the asm expression.
850
851 2004-10-07 Mark Mitchell <mark@codesourcery.com>
852
853 * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
854 (DECL_MEMBER_TEMPLATE_P): New macro.
855 (is_member_template): Remove.
856 (class_method_index_for_fn): New function.
857 * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
858 * class.c (finish_struct_methods): Remove out-of-date comment.
859 * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
860 * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
861 class_method_index_for_fn.
862 * pt.c (is_member_template): Remove.
863 (is_member_template_class): Likewise.
864 (optimize_specialization_lookup_p): New function.
865 (retrieve_specialization): Optimize lookups for members that are
866 not member templates.
867 (register_specialization): Adjust accordingly.
868 (build_template_decl): Add member_template_p parameter. Set
869 DECL_MEMBER_TEMPLATE_P.
870 (process_partial_specialization): Adjust call to
871 retrieve_specialization.
872 (push_template_decl_real): Determine whether the template is a
873 member template.
874 (lookup_template_class): Use retrieve_specialization.
875 (tsubst_decl): Adjust call to retrieve_specialization.
876 (tsubst_exception_specification): New function.
877 (tsubst): Use it.
878 (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
879 (instantiate_template): Adjust call to retrieve_specialization.
880 (regenerate_decl_from_template): Do not actually generate a new
881 DECL.
882 (instantiate_decl): Adjust call to retrieve_specialization.
883 (class_method_index_for_fn): New method.
884
885 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
886
887 * parser.c (cp_parser_asm_definition): Look passed the
888 CLEANUP_POINT_EXPR to get the asm expression.
889
890 2004-10-06 Andrew Pinski <pinskia@physics.uc.edu>
891
892 PR c++/17368
893 * semantics.c (finish_asm_stmt): Asm expressions need cleanup
894 also.
895
896 2004-10-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
897
898 Convert diagnostics to use quoting flag q 6/n
899 * pt.c (finish_member_template_decl, check_specialization_scope,
900 maybe_process_partial_specialization, determine_specialization,
901 check_explicit_specialization, maybe_check_template_type,
902 process_partial_specialization, check_default_tmpl_args,
903 push_template_decl_real, redeclare_class_template,
904 convert_nontype_argument, coerce_template_parms,
905 lookup_template_class, push_tinst_level,
906 instantiate_class_template, tsubst_arg_types,
907 tsubst_function_type, tsubst, tsubst_qualified_id,
908 tsubst_copy_and_build, check_instantiated_args,
909 do_decl_instantiation, do_type_instantiation,
910 invalid_nontype_parm_type_p, check_specialization_namespace,
911 convert_template_argument, determine_specialization,
912 check_template_shadow, tsubst_decl
913 instantiate_pending_templates): Use quoting marks.
914
915 2004-10-05 Nathan Sidwell <nathan@codesourcery.com>
916
917 PR c++/17829
918 * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
919 unqualified lookup finds a member function.
920
921 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
922
923 Convert diagnostics to use quoting flag q 5/n
924 * parser.c (cp_parser_name_lookup_error,
925 cp_parser_diagnose_invalid_type_name,
926 cp_parser_primary_expression, cp_parser_unqualified_id,
927 cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement,
928 cp_parser_jump_statement, cp_parser_simple_declaration,
929 cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id,
930 cp_parser_type_parameter, cp_parser_template_id,
931 cp_parser_template_name, cp_parser_direct_declarator,
932 cp_parser_parameter_declaration_list, cp_parser_class_head,
933 cp_parser_base_specifier, cp_parser_lookup_name,
934 cp_parser_late_parsing_default_args,
935 cp_parser_optional_template_keyword
936 cp_parser_elaborated_type_specifier, cp_parser_check_class_key,
937 cp_parser_check_access_in_redeclaration): Use quoting marks.
938
939 * name-lookup.c (supplement_binding, pushdecl,
940 check_for_out_of_scope_variable, validate_nonmember_using_decl,
941 do_nonmember_using_decl, lookup_tag, set_decl_namespace,
942 push_namespace, do_namespace_alias, do_using_directive,
943 ambiguous_decl, lookup_namespace_name, add_function): Likewise.
944
945 * method.c (use_thunk): Likewise.
946
947 * lex.c (unqualified_name_lookup_error,
948 unqualified_fn_lookup_error): Likewise.
949
950 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
951
952 Convert diagnostics to use quoting flag q 4/n
953 * except.c (decl_is_java_type, build_throw,
954 is_admissible_throw_operand, check_handlers_1, check_handlers):
955 Use quoting formats.
956 * friend.c (add_friend, make_friend_class, do_friend): Likewise.
957 * init.c (sort_mem_initializers, emit_mem_initializers,
958 member_init_ok_or_else, expand_member_init, is_aggr_type,
959 build_offset_ref, build_java_class_ref): Likewise.
960
961 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
962
963 Convert diagnostics to use quoting flag q 3/n
964 * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
965 redeclaration_error_message, lookup_label, check_goto,
966 make_typename_type, make_unbound_class_template,
967 fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1,
968 grok_reference_init, layout_var_decl, maybe_commonize_var,
969 check_for_uninitialized_const_var, reshape_init_array,
970 reshape_init, check_initializer, cp_finish_decl,
971 member_function_or_else, bad_specifiers, grokfndecl, grokvardecl,
972 check_static_variable_definition, compute_array_index_type,
973 create_array_type_for_decl, check_special_function_return_type,
974 grokdeclarator, check_default_argument, grokparms,
975 grok_ctor_properties, grok_op_properties,
976 check_elaborated_type_specifier, xref_tag, finish_enum,
977 build_enumerator, check_function_type, start_preparsed_function,
978 store_parm_decls): Use quoting formats.
979 * decl2.c (grok_array_decl, delete_sanity, check_member_template,
980 check_java_method, check_classfn, finish_static_data_member_decl,
981 grokfield, grokbitfield, grok_function_init,
982 build_anon_union_vars, coerce_new_type, coerce_delete_type,
983 check_default_args): Likewise.
984 * parser.c (cp_parser_decl_specifier_seq): Likewise.
985
986 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
987
988 Convert diagnostics to use quoting flag q 2/n
989 * class.c (build_base_path, add_method, alter_access,
990 handle_using_decl, check_bases,
991 maybe_warn_about_overly_private_class, find_final_overrider,
992 warn_hidden, finish_struct_anon, add_implicitly_declared_members,
993 check_bitfield_decl, check_field_decls, layout_empty_base,
994 build_base_field, check_methods, layout_virtual_bases,
995 warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
996 resolve_address_of_overloaded_function, instantiate_type,
997 note_name_declared_in_class): Use format flag "q" for quoting.
998
999 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1000
1001 Convert diagnostics to use quoting flag q 1/n
1002 * error.c (locate_error): Ignore quoting flag q.
1003 * call.c (build_user_type_conversion_1, build_operator_new_call,
1004 build_object_call, op_error, build_conditional_expr,
1005 build_new_op, build_op_delete_call, enforce_access,
1006 convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
1007 convert_default_arg, build_over_call, build_new_method_call,
1008 joust, perform_implicit_conversion, initialize_reference): Use the
1009 quoting flag q.
1010
1011 2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
1012
1013 PR c++/17797
1014 * typeck.c (build_reinterpret_cast): Return if the inner type
1015 is error_mark_node.
1016
1017 2004-10-01 Jan Hubicka <jh@suse.cz>
1018
1019 * semantics.c (expand_body): Update call of tree_rest_of_compilation.
1020
1021 2004-09-30 Nathan Sidwell <nathan@codesourcery.com>
1022
1023 * cp-tree.h (struct lang_decl): Shrink by reordering fields and
1024 turning operator_code and fixed_offset into bitfields.
1025
1026 2004-09-29 Joseph S. Myers <jsm@polyomino.org.uk>
1027
1028 * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
1029
1030 2004-09-29 Jason Merrill <jason@redhat.com>
1031
1032 PR tree-optimization/17697
1033 * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
1034
1035 2004-09-28 Jason Merrill <jason@redhat.com>
1036
1037 PR middle-end/17525
1038 * class.c (build_base_field): Set TYPE_MODE.
1039
1040 2004-09-28 Roger Sayle <roger@eyesopen.com>
1041
1042 PR driver/17537
1043 * g++spec.c (lang_specific_driver): Unrecognized libraries, other
1044 than -lc and -lm, may require linking against libstc++.
1045
1046 2004-09-28 Kazu Hirata <kazu@cs.umass.edu>
1047
1048 * tree.c: Fix a comment typo.
1049
1050 2004-09-28 Nathan Sidwell <nathan@codesourcery.com>
1051
1052 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
1053 (struct secondary_vptr_vtt_init_data_s): New.
1054 (build_vtt_inits): Adjust dfs_walkers.
1055 (dfs_build_secondary_vptr_vtt_inits): Caller data is a
1056 secondary_vptr_vtt_init_data_s structure. Adjust.
1057 (dfs_ctor_vtable_bases_queue_p): Remove.
1058 (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
1059
1060 * pt.c (struct get_template_base_data_s): Remove.
1061 (get_template_base_r): Fold into get_template_base.
1062 (get_template_base): Walk base binfos directly in inheritance
1063 graph order.
1064
1065 2004-09-27 Mark Mitchell <mark@codesourcery.com>
1066
1067 PR c++/17642
1068 * cp-tree.h (fold_if_not_in_template): New function.
1069 * call.c (build_conditional_expr): Use fold_if_not_in_template.
1070 (build_cxx_call): Likewise.
1071 * cvt.c (convert_to_complex): Likewise.
1072 (ocp_convert): Likewise.
1073 (convert): Likewise.
1074 (convert_force): Likewise.
1075 * decl.c (compute_array_index_type): Clear
1076 processing_template_decl while folding array bounds.
1077 * pt.c (convert_nontype_argument): Clear
1078 processing_template_decl while processing non-type argument
1079 initialization.
1080 * tree.c (fold_if_not_in_template): New function.
1081 * typeck.c (build_class_member_access_expr): Use
1082 fold_if_not_in_template.
1083 (build_array_ref): Likewise.
1084 (build_binary_op): Likewise. Do not try to optimize computations
1085 when processing templates.
1086 (cp_pointer_int_sum): Use fold_if_not_in_template.
1087 (pointer_diff): Likewise.
1088 (build_unary_op): Likewise.
1089 (build_reinterpret_cast): Likewise.
1090 (get_delta_difference): Likewise.
1091 (expand_ptrmemfunc_cst): Likewise.
1092 (dubious_conversion_warnings): Likewise.
1093
1094 2004-09-27 Matt Austern <austern@apple.com>
1095
1096 * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
1097 (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
1098 tokens that come from headers that are implicitly extern "C".
1099 (struct cp_parser): new one-bit field, implicit_extern_c.
1100 (cp_parser_new): Set parser's implicit_extern_c to false.
1101 (cp_parser_translation_unit): Pop lang context if we were in a
1102 header that was implicitly extern "C".
1103 (cp_parser_declaration_seq_opt): Push/pop lang context as
1104 required by the token's and parser's implicit_extern_c.
1105
1106 2004-09-27 Mark Mitchell <mark@codesourcery.com>
1107
1108 PR c++/17585
1109 * cp-tree.h (shared_member_p): Declare.
1110 * search.c (shared_member_p): Give it external linkage.
1111 * semantics.c (finish_qualified_id_expr): Use it.
1112 (finish_id_expression): Likewise.
1113
1114 PR c++/17585
1115 * semantics.c (finish_id_expression): Do not add "this->" to
1116 static member functions.
1117
1118 2004-09-27 Nathan Sidwell <nathan@codesourcery.com>
1119
1120 PR c++/17681
1121 * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
1122
1123 * class.c (struct count_depth_data): Remove.
1124 (dfs_depth_post, dfs_depth_q): Remove.
1125 (find_final_overrider): Use number of vbase classes as depth
1126 bound.
1127
1128 * cp-tree.h (types_overlap_p): Remove.
1129 * search.c (struct overlap_info): Remove.
1130 (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
1131
1132 * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
1133 (get_template_base_recursive): Remove. Replace with ...
1134 (get_template_base_r): ... this.
1135 (struct get_template_base_data_s): New.
1136 (get_template_base): Use get_template_base_r via dfs_walk. Always
1137 return NULL on failure.
1138 (unify): Remove error_mark_node check from get_template_base result.
1139
1140 2004-09-24 Paolo Bonzini <bonzini@gnu.org>
1141
1142 * parser.c (cp_parser_expression_stack): Clarify why it is
1143 an array of NUM_PREC_VALUES elements.
1144 (cp_parser_binary_expression): Clarify why we do not need to
1145 handle stack overflow.
1146
1147 2004-09-24 Nathan Sidwell <nathan@codesourcery.com>
1148
1149 PR c++/16889
1150 * search.c (lookup_field_queue_p): Correct check for hidden base.
1151
1152 * search.c (bfs_walk): Remove.
1153 (lookup_member): Use dfs_walk_real.
1154 (dfs_walk_real): Move and adjust documentation from bfs_walk.
1155
1156 2004-09-23 Zack Weinberg <zack@codesourcery.com>
1157
1158 * decl.c (grokfndecl): If ::main is found not to return int,
1159 correct it after issuing a diagnostic.
1160 (grokdeclarator): If the incoming type was error_mark_node, do
1161 not complain about declaring something with no type.
1162 (start_function): Change check for ::main not returning int to
1163 an assertion, as grokfndecl now catches this when the user did it.
1164 * init.c (perform_member_init, sort_mem_initializers)
1165 (emit_mem_initializers): Make most diagnostics be issued on
1166 the line of current_function_decl, not whatever the current
1167 input line is.
1168 * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
1169 definition and declaration with #ifdef ENABLE_CHECKING.
1170 Avoid unnecessary use of fprintf.
1171 (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
1172 definitions to avoid warnings.
1173 (cp_lexer_new_main): Add assertion that first token is not a
1174 padding token.
1175 (cp_lexer_new_from_token_array): Fold into ...
1176 (cp_lexer_new_from_tokens): ... here. Add assertion that
1177 first token is not a padding token.
1178 (cp_lexer_set_source_position_from_token): Move nearer to callers.
1179 Remove unused lexer argument.
1180 (cp_lexer_peek_token): Just print debugging report (if enabled)
1181 and return lexer->next_token.
1182 (cp_lexer_skip_purged_tokens): Delete.
1183 (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
1184 inline, simplify bodies.
1185 (cp_lexer_peek_nth_token): Add debugging report a la
1186 cp_lexer_peek_token.
1187 (cp_lexer_consume_token): Correct commentary. Advance over
1188 purged tokens here. Set current source position here, from
1189 token to be returned. Avoid unnecessary use of fprintf.
1190 (cp_lexer_purge_token): Advance next_token pointer over this and
1191 subsequent purged tokens.
1192 (cp_parser_error): Adjust source position to that of the
1193 peeked token.
1194 (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
1195 (cp_parser_string_literal): Remove some excessive cleverness.
1196 (cp_parser_enum_specifier): Call start_enum before consuming
1197 the opening brace.
1198 (cp_parser_member_declaration): Make the "extra semicolon"
1199 diagnostic consistently-worded with the other place this is
1200 diagnosed. Explicitly set the diagnostic location to the
1201 location of the offending semicolon.
1202 (cp_parser_enclosed_template_argument_list): Use %</%> quoting
1203 in diagnostics. Do not use cp_parser_require. Set location
1204 of diagnostics about improper use of '>>' to location of
1205 offending token.
1206 (cp_parser_late_parsing_for_member):
1207 Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
1208 (cp_parser_late_parsing_default_args): Likewise. Manually
1209 move some logic outside the loop.
1210
1211 2004-09-23 Andrew Pinski <pinskia@physics.uc.edu>
1212
1213 PR c++/17618
1214 * cvt.c (cp_convert_to_pointer): Return early when the type is
1215 an error_mark_node.
1216
1217 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
1218
1219 PR c++/13989
1220 PR c++/9844
1221 * decl.c (grokfndecl): Add new argument "attrlist", use it
1222 to call cplus_decl_attributes.
1223 (start_function): Remove call to cplus_decl_attributes.
1224 * cvt.c (ocp_convert): Add support to use type conversion
1225 function to vector type.
1226 * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
1227 to the parsed type.
1228
1229 2004-09-23 Paolo Bonzini <bonzini@gnu.org>
1230
1231 PR c++/17596
1232
1233 * parser.c (cp_parser_token_tree_map_node,
1234 cp_parser_pm_expression, cp_parser_additive_expression,
1235 cp_parser_multiplicative_expression, cp_parser_shift_expression,
1236 cp_parser_relational_expression, cp_parser_equality_expression,
1237 cp_parser_and_expression, cp_parser_exclusive_or_expression,
1238 cp_parser_inclusive_or_expression,
1239 cp_parser_logical_and_expression,
1240 cp_parser_logical_or_expression): Removed.
1241 (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
1242 binops, binops_by_token): New.
1243 (cp_parser_assignment_expression): Use cp_parser_binary_expression.
1244 (cp_parser_new): Initialize binops_by_token.
1245 (cp_parser_binary_expression): Rewritten.
1246 (N_CP_TTYPES): New.
1247
1248 2004-09-23 Kazu Hirata <kazu@cs.umass.edu>
1249
1250 * parser.c: Fix a comment typo.
1251
1252 2004-09-23 Nathan Sidwell <nathan@codesourcery.com>
1253
1254 PR c++/17620
1255 * decl.c (xref_basetypes): Look through typedefs before checking
1256 for duplicate base.
1257
1258 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
1259
1260 * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
1261 * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
1262 * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
1263 (init_rtti_processing): Initialize it to something realistic.
1264 (get_tinfo_decl): Adjust pushing the new decl.
1265
1266 * cp-tree.h (struct lang_type_class): Remove marked flags, add
1267 diamond_shaped and repeated_base flags. Reorder to keep 8-bit blocks.
1268 (TYPE_MARKED_P): New.
1269 (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
1270 (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
1271 CLEAR_CLASSTYPE_MARKED_N): Remove.
1272 (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
1273 CLEAR_CLASSTYPE_MARKED_*): Remove.
1274 * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
1275 shaped and repeated base properties.
1276 * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
1277 * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
1278 class_hint_flags): Remove.
1279 (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
1280 CLASSTYPE_DIAMOND_SHAPED_P.
1281
1282 2004-09-21 Ziemowit Laski <zlaski@apple.com>
1283
1284 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
1285 cp-objcp-common.h.
1286 (objcp_tsubst_copy_and_build): Reformat function signature.
1287 * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
1288 (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
1289
1290 2004-09-21 Zack Weinberg <zack@codesourcery.com>
1291
1292 * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
1293 Don't handle CPP_PRAGMA tokens specially.
1294 (cp_lexer_handle_pragma): Use cp_lexer_consume_token. Don't
1295 purge the token; do clear token->value after processing. Add
1296 assertion at beginning that token->value is nonzero.
1297 (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
1298 CPP_PRAGMA as a full statement or declaration in its own right.
1299
1300 2004-09-21 Matt Austern <austern@apple.com>
1301
1302 PR c++/15049
1303 * decl.c (grokvardecl): Accept declarations of global variables
1304 using anonymous types.
1305
1306 2004-09-21 Roger Sayle <roger@eyesopen.com>
1307
1308 PR c++/7503
1309 * tree.c (lvalue_p_1): Disallow MIN_EXPR and MAX_EXPR as lvalues
1310 if either operand has side-effects.
1311 * typeck.c (rationalize_conditional_expr): Assert that neither
1312 operand of MIN_EXPR or MAX_EXPR has side-effects.
1313 (build_modify_expr): Add support for MIN_EXPR and MAX_EXPR.
1314 Check that the "lhs" is a valid lvalue, i.e. that neither operand
1315 of a MIN_EXPR or MAX_EXPR has a side-effect.
1316
1317 2004-09-21 Nathan Sidwell <nathan@codesourcery.com>
1318
1319 * cp-tree.h (struct lang_type_header): Remove
1320 uses_multiple_inheritance field.
1321 (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
1322 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
1323 (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
1324 (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
1325 (TYPE_CONTAINS_VPTR_P): Likewise.
1326 * call.c (add_template_candidate_real): Use
1327 CLASSTYPE_VBASECLASSES.
1328 (build_special_member_call): Likewise.
1329 * class.c (finish_struct_bits): Remove
1330 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
1331 bookkeeping.
1332 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
1333 (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
1334 bookkeeping.
1335 (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
1336 (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
1337 Likewise.
1338 * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
1339 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
1340 bookkeeping.
1341 (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
1342 * decl2.c (maybe_retrofit_in_chrg): Likewise.
1343 * init.c (expand_member, push_base_cleanups): Likewise.
1344 * pt.c (instantiate_class_template): Remove
1345 TYPE_USES_MULTIPLE_INHERITANCE,
1346 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
1347 bookkeeping.
1348 * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
1349 check.
1350 * typeck2.c (process_init_constructor): Replace some sorrys with
1351 asserts.
1352
1353 2004-09-21 Andreas Tobler <a.tobler@schweiz.ch>
1354
1355 * decl.c (reshape_init_array): Initialize max_index_cst to fix
1356 bootstrap failure.
1357
1358 2004-09-20 Mark Mitchell <mark@codesourcery.com>
1359
1360 PR c++/17530
1361 * pt.c (tsubst): Fix parentheses to accomodate emacs.
1362 (tsubst_baselink): If we get a single function, mark it as used.
1363
1364 2004-09-20 Matt Austern <austern@apple.com>
1365 Zack Weinberg <zack@codesourcery.com>
1366
1367 * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
1368 Apply lbasename to input_filename before passing to get_fileinfo.
1369 * semantics.c (begin_class_definition): Likewise.
1370 * lex.c (handle_pragma_interface): Apply get_fileinfo to the
1371 correct filename. Rename variables to be less confusing.
1372 (handle_pragma_implementation): Likewise. Disable "appears
1373 after file is included" diagnostic.
1374
1375 * parser.c (struct cp_token): Add in_system_header fiag.
1376 (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
1377 (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
1378 (CPP_NONE, cp_lexer_read_token): Delete.
1379 (struct cp_lexer): Remove first_token, string_tokens,
1380 main_lexer_p fields. Clarify comments.
1381 (struct cp_token_cache): Now just a pair of pointers.
1382 (CP_LEXER_BUFFER_SIZE): New #define.
1383 (CPP_PURGED): New fake token type.
1384 (cp_lexer_new_from_token_array, cp_lexer_destroy)
1385 (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
1386 (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
1387 New functions.
1388 (cp_lexer_new_from_tokens): Now a simple wrapper around
1389 cp_lexer_new_from_token_array.
1390 (cp_lexer_set_source_position_from_token): Also update
1391 in_system_header.
1392 (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
1393 Don't wrap round.
1394 (cp_lexer_token_difference): Dont handle wrapping round.
1395 (cp_lexer_new_main): Enable pragma deferral and raw strings,
1396 read the entire translation unit through c_lex_with_flags into
1397 this lexer's buffer, then turn raw strings back off again.
1398 (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
1399 (cp_lexer_get_preprocessor_token): No need to handle not being
1400 the main lexer. Set token->in_system_header too.
1401 (cp_lexer_peek_token): Skip purged tokens. Feed pragma tokens
1402 to cp_lexer_handle_pragma. No need to call cp_lexer_read_token.
1403 (cp_lexer_peek_nth_token): Likewise.
1404 (cp_lexer_purge_token): Mark the token PURGED, don't shift all
1405 the other tokens down.
1406 (cp_lexer_purge_tokens_after): Likewise.
1407 (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
1408 about there being no tokens.
1409 (cp_lexer_print_token): Revise to give useful information on
1410 all tokens.
1411 (struct cp_parser): Add field translate_strings_p.
1412 (cp_parser_new): Initialize it.
1413 (cp_parser_translation_unit): Destroy the lexer when done.
1414 (cp_parser_parameter_declaration): Restructure saving of
1415 default arguments.
1416 (cp_parser_save_member_function_body): Likewise.
1417 (cp_parser_check_for_invalid_template_id)
1418 (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
1419 Adjust calls to cp_lexer_advance_token.
1420 (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
1421 No need to fiddle c_lex_string_translate.
1422 (cp_parser_primary_expression, cp_parser_linkage_specification)
1423 (cp_parser_asm_definition, cp_parser_asm_specification_opt)
1424 (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
1425 Use cp_parser_string_literal.
1426 (cp_parser_attribute_list): Save and restore
1427 parser->translate_strings_p, not c_lex_string_translate.
1428 (cp_parser_cache_group): Delete.
1429 (cp_parser_cache_group_1): Rename cp_parser_cache_group. Do
1430 not take a cache argument.
1431
1432 2004-09-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1433
1434 PR c++/14179
1435 * decl.c (reshape_init): Extract array handling into...
1436 (reshape_init_array): New function. Use integers instead of trees
1437 for indices. Handle out-of-range designated initializers.
1438
1439 2004-09-20 Steven Bosscher <stevenb@suse.de>
1440
1441 * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
1442 to null_node.
1443
1444 2004-09-19 Mark Mitchell <mark@codesourcery.com>
1445
1446 * decl2.c (determine_visibility): Allow class visibility
1447 directives to override targetm.cxx.export_class_data.
1448
1449 2004-09-18 Kazu Hirata <kazu@cs.umass.edu>
1450
1451 * call.c, semantics.c: Follow spelling conventions.
1452 * class.c: Fix a comment typo.
1453
1454 2004-09-16 Geoffrey Keating <geoffk@apple.com>
1455
1456 PR pch/13361
1457 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
1458 (handle_pragma_implementation): Likewise.
1459
1460 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
1461 Zack Weinberg <zack@codesourcery.com>
1462
1463 * cp-tree.def: Use tree_code_class enumeration constants
1464 instead of code letters.
1465 * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
1466 * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
1467 Update for new tree-class enumeration constants.
1468
1469 2004-09-16 Mark Mitchell <mark@codesourcery.com>
1470
1471 PR c++/16002
1472 * parser.c (cp_parser_simple_declaration): Commit to tentative
1473 parses after seeing a decl-specifier.
1474 (cp_parser_simple_declaration): Eliminate spurious message.
1475 (cp_parser_init_declarator): Adjust error message.
1476
1477 PR c++/16029
1478 * lex.c (unqualified_name_lookup_error): Mark the dummy
1479 declaration as used.
1480
1481 PR c++/17501
1482 * parser.c (cp_parser_nested_name_specifier): Do not resolve
1483 typename types if the user explicitly said "typename".
1484
1485 2004-09-16 Andrew MacLeod <amacleod@redhat.com>
1486
1487 * error.c (dump_decl): Make sure there is lang_specific info before
1488 checking for DTOR and CTOR decls.
1489
1490 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
1491
1492 * class.c (copy_virtuals): Remove.
1493 (build_primary_vtable): Use copy_list directly.
1494 (build_secondary_vtable): Likewise.
1495 (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
1496 (create_vtable_ptr): Likewise.
1497
1498 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
1499
1500 * search.c: Follow spelling conventions.
1501
1502 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
1503
1504 * cp-tree.h (struct lang_type_class): Make pure_virtuals a
1505 VEC(tree).
1506 (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
1507 comments.
1508 * call.c (build_new_method_call): Don't confirm a pure virtual is
1509 in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning.
1510 * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
1511 (fixup_inline_methods, finish_struct): Likewise.
1512 * decl.c (finish_method): Likewise.
1513 * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
1514 CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
1515 * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
1516 vector to avoid repeating the list in error messages.
1517
1518 2004-09-15 Mark Mitchell <mark@codesourcery.com>
1519
1520 * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
1521 * cp-tree.h (cxx_comdat_group): Declare.
1522 * decl.c (cxx_comdat_group): New function.
1523
1524 2004-09-15 Nathan Sidwell <nathan@codesourcery.com>
1525
1526 * search.c (get_pure_virtuals): Remove unused variables.
1527
1528 * cp-tree.h (struct lang_decl_flags): Remove
1529 needs_final_overrider.
1530 (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
1531 * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
1532 * class.c (finish_struct_bits): Correct comment about
1533 CLASSTYPE_PURE_VIRTUALS.
1534 * search.c (get_pure_virtuals): Remove useless loop.
1535
1536 2004-09-14 Mark Mitchell <mark@codesourcery.com>
1537
1538 PR c++/17324
1539 * mangle.c (partially_mangled_name): New variable.
1540 (partially_mangled_name_len): Likewise.
1541 (save_partially_mangled_name): New function.
1542 (restore_partially_mangled_name): Likewise.
1543 (write_encoding): Save and restore partially mangled names around
1544 calls to get_mostly_instantiated_function_type.
1545 (write_unqualified_name): Likewise.
1546
1547 2004-09-14 Nathan Sidwell <nathan@codesourcery.com>
1548
1549 * pt.c (unify): Replace gcc_unreachable with gcc_assert.
1550
1551 2004-09-13 Mark Mitchell <mark@codesourcery.com>
1552
1553 PR c++/16162
1554 * parser.c (cp_parser_id_expression): Correct value for
1555 is_declarator.
1556 (cp_parser_nested_name_specifier_opt): Look through typenames as
1557 necessary.
1558 (cp_parser_template_name): Honor check_dependency_p.
1559
1560 PR c++/16716
1561 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
1562 Robustify.
1563
1564 PR c++/17327
1565 * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with
1566 gcc_unreacable.
1567
1568 2004-09-12 Richard Henderson <rth@redhat.com>
1569
1570 PR c++/16254
1571 * semantics.c (maybe_cleanup_point_expr): Don't call fold.
1572 * typeck.c (condition_conversion): Likewise.
1573
1574 2004-09-11 Richard Henderson <rth@redhat.com>
1575
1576 PR c++/17404
1577 * pt.c (cur_stmt_expr): Move from tsubst_expr.
1578 (tsubst_expr) <case STMT_EXPR>: Move ...
1579 (tsubst_copy_and_build): ... here.
1580
1581 2004-09-10 Zack Weinberg <zack@codesourcery.com>
1582
1583 * cp-tree.h (interface_only, interface_unknown): Delete declarations;
1584 comment explaining them moved to c-common.h.
1585 * lex.c (interface_only, interface_unknown, extract_interface_info):
1586 Delete definitions.
1587 (cxx_finish): Don't reset interface_unknown.
1588 (handle_pragma_interface): Don't set interface_only and
1589 interface_unknown; just the like-named fields in finfo.
1590 (handle_pragma_implementation): Adjust comment.
1591 * decl2.c (cp_finish_file): Don't reset interface_only and
1592 interface_unknown.
1593 * method.c (synthesize_method): Don't reset interface_unknown or
1594 call extract_interface_info.
1595 * pt.c (pop_tinst_level): Don't call extract_interface_info.
1596 * decl.c (start_cleanup_fn): Don't save or restore interface_only
1597 and interface_unknown.
1598 (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
1599 and use the result instead of the interface_only/interface_unknown
1600 globals.
1601 (start_preparsed_function): Likewise.
1602 * lex.c (cxx_make_type): Likewise.
1603 * semantics.c (begin_class_definition): Likewise.
1604 (expand_body): Don't call extract_interface_info.
1605
1606 2004-09-10 Ziemowit Laski <zlaski@apple.com>
1607
1608 * decl.c (objc_mark_locals_volatile): Make description of
1609 routine more descriptive; only mark VAR_DECLs at each
1610 binding level.
1611
1612 2004-09-10 Richard Henderson <rth@redhat.com>
1613
1614 PR c++/17386
1615 * call.c (build_vfield_ref): Move...
1616 * class.c (build_vfield_ref): ... here. Convert datum to the
1617 primary base containing the vptr.
1618 (make_new_vtable): Simplify build_primary_vtable arguments.
1619 (finish_struct_1): Do not duplicate TYPE_VFIELD.
1620 * typeck.c (build_class_member_access_expr): Don't warn for
1621 null object access to base fields.
1622
1623 2004-09-10 Ziemowit Laski <zlaski@apple.com>
1624
1625 * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
1626 New functions, to be called from ObjC++.
1627
1628 2004-09-10 Kazu Hirata <kazu@cs.umass.edu>
1629
1630 * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
1631 name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
1632 comment typos.
1633
1634 2004-09-09 Ziemowit Laski <zlaski@apple.com>
1635
1636 * typeck.c (build_c_cast): Preserve the cast if casting
1637 to and from an Objective-C type.
1638
1639 2004-09-09 Ziemowit Laski <zlaski@apple.com>
1640
1641 * Make-lang.in (cp/typeck.o): Depend on c-common.h.
1642 * typeck.c: Include c-common.h.
1643 (comptypes): For RECORD_TYPEs, call objc_comptypes() and
1644 return the result if nonnegative.
1645
1646 2004-09-09 Zack Weinberg <zack@codesourcery.com>
1647
1648 * decl2.c (import_export_class)
1649 * lex.c (handle_pragma_interface):
1650 Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
1651
1652 2004-09-08 Ziemowit Laski <zlaski@apple.com>
1653
1654 * Make-lang.in (cp/semantics.o): Depend on c-common.h.
1655 * semantics.c: Include c-common.h.
1656 (finish_compound_stmt): Call objc_clear_super_receiver().
1657
1658 2004-09-08 Ziemowit Laski <zlaski@apple.com>
1659
1660 * cp-tree.h (do_poplevel): New prototype.
1661 * semantics.c (do_poplevel): Make externally visible.
1662
1663 2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
1664
1665 * cp-tree.h (tree_pair_s): Define a GC'd vector.
1666 * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
1667 * semantics.c (deferred_access): Likewise.
1668
1669 2004-09-06 Daniel Jacobowitz <dan@debian.org>
1670
1671 * semantics.c (expand_body): Assert that we are not nested.
1672
1673 2004-09-06 Zack Weinberg <zack@codesourcery.com>
1674
1675 * decl.c (build_enumerator): Use add_double and int_fits_type_p
1676 instead of cp_build_binary_op, to avoid creating short-lived trees.
1677 * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
1678 lookahead instead of backtracking. Move some code to avoid a
1679 conditional branch.
1680 (cp_parser_enum_specifier): Avoid duplication of effort with caller.
1681 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
1682 (cp_parser_enumerator_list, cp_parser_enumerator_definition):
1683 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
1684
1685 2004-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1686
1687 * decl.c (grok_declarator): Remove a redundant semicolon.
1688
1689 * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
1690 Correct comments describing function parameters.
1691
1692 2004-09-03 Matt Austern <austern@apple.com>
1693 Compile speed improvement.
1694 * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
1695 Otherwise define a stub macro that expands to nothing.
1696 (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise
1697 define a stub macro that expands to 0.
1698 (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
1699 (cp_lexer_stop_debugging): Likewise.
1700 (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise
1701 define a stub macro that expands to NULL.
1702 (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
1703 (cp_lexer_new_from_tokens): Likewise.
1704
1705 2004-09-03 Jan Hubicka <jh@suse.cz>
1706
1707 * decl.c (finish_function): Clean out pointers we no longer need.
1708
1709 2004-09-03 Jan Beulich <jbeulich@novell.com>
1710
1711 * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
1712 than "-lm".
1713
1714 2004-09-02 Paul Brook <paul@codesourcery.com>
1715
1716 * decl2.c (determine_visibility): Only check data visibility
1717 for VAR_DECLS.
1718
1719 2004-08-31 Mark Mitchell <mark@codesourcery.com>
1720
1721 * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
1722 * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
1723 * decl2.c (determine_visibility): Honor
1724 TARGET_CXX_EXPORT_CLASS_DATA.
1725
1726 * class.c (key_method): Rename to ...
1727 (determine_key_method): ... this.
1728 (finish_struct_1): Adjust accordingly.
1729 * cp-tree.h (key_method): Declare.
1730 * decl2.c (maybe_emit_vtables): Determine the key method here if
1731 it has not already been done.
1732
1733 2004-08-31 Ziemowit Laski <zlaski@apple.com>
1734
1735 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
1736 (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
1737 (cp/cp-decl.c): Do not depend on gtype-cp.h.
1738 (cp/cp-objcp-common.o): New target.
1739 * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
1740 (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
1741 cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
1742 prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
1743 respectively.
1744 (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
1745 LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
1746 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
1747 LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
1748 LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
1749 LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
1750 LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
1751 LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
1752 LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
1753 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
1754 LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
1755 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
1756 LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
1757 LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
1758 LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
1759 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
1760 LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
1761 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
1762 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
1763 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
1764 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
1765 LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
1766 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
1767 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
1768 LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
1769 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
1770 LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
1771 LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
1772 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
1773 LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
1774 LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
1775 hooks to cp-objcp-common.h.
1776 (finish_file): New function.
1777 * cp-objcp-common.c: New file.
1778 * cp-objcp-common.h: New file.
1779 * cp-tree.h (cp_finish_file): New prototype.
1780 * decl.c: Do not include gtype-cp.h.
1781 * decl2.c (finish_file): Rename to cp_finish_file.
1782
1783 2004-08-31 Richard Henderson <rth@redhat.com>
1784
1785 PR c++/17221
1786 * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
1787 (tsubst_copy_and_build): ... here.
1788
1789 2004-08-30 Mark Mitchell <mark@codesourcery.com>
1790
1791 * cp-tree.h (initialize_artificial_var): Declare.
1792 * decl.c (initialize_artifical_var): New function.
1793 * class.c (initialize_array): Remove.
1794 (initialize_vtable): Use initialize_artificial_var.
1795 (build_vtt): Likewise.
1796 (build_ctor_vtbl_group): Likewise.
1797
1798 2004-08-30 Richard Henderson <rth@redhat.com>
1799
1800 * class.c (build_base_path): Use build_address directly.
1801 * typeck.c (build_unary_op): Don't lower &a.b to pointer
1802 arithmetic directly.
1803 * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
1804 means !initializer_constant_valid_p.
1805
1806 2004-08-30 Richard Henderson <rth@redhat.com>
1807
1808 * class.c (fixed_type_or_null): Use get_base_address before
1809 assuming an ADDR_EXPR is non-null.
1810
1811 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
1812
1813 * name-lookup.c (pop_binding, pushdecl,
1814 set_identifier_type_value_with_scope, push_overloaded_decl,
1815 arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
1816 * parser.c (cp_parser_diagnose_invalid_type_name,
1817 cp_parser_postfix_expression, cp_parser_unary_expression,
1818 cp_parser_check_declarator_template_para): Likewise.
1819 * pt.c (push_inline_template_parms_recursive,
1820 check_explicit_specialization, convert_nontype_argument,
1821 coerce_template_template_parms, uses_template_parms,
1822 instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
1823 tsubst_expr, instantiate_template,
1824 maybe_adjust_types_for_deduction, type_unification_real,
1825 resolve_overloaded_unification, template_decl_level,
1826 type_dependent_expression_p): Likewise.
1827 * search.c (lookup_base_r): Likewise.
1828 * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
1829 * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
1830 verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
1831 * typeck.c (common_type, get_member_function_from_ptrfunc,
1832 build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
1833 * typeck2.c (cxx_incomplete_type_diagnostic,
1834 split_nonconstant_init_1, store_init_value,
1835 process_init_constructor): Likewise.
1836
1837 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
1838
1839 * call.c (check_dtor_name): Replace abort with gcc_assert or
1840 gcc_unreachable.
1841 (build_call, add_builtin_candidate, build_new_op,
1842 convert_like_real, build_over_call, in_charge_arg_for_name,
1843 source_type, joust): Likewise.
1844 * class.c (build_simple_base_path, get_vcall_index,
1845 finish_struct_1, instantiate_type, get_enclosing_class,
1846 add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
1847 * cp-gimplify.c (cp_genericize): Likewise.
1848 * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
1849 * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
1850 * decl.c (poplevel, make_unbound_class_template, reshape_init,
1851 check_special_function_return_type, grokdeclarator,
1852 grok_op_properties, tag_name, xref_tag, start_preparsed_function,
1853 finish_function): Likewise.
1854 * decl2.c (grokfield, maybe_emit_vtables):Likewise.
1855 * error.c (dump_global_iord, dump_decl, dump_template_decl,
1856 language_to_string): Likewise.
1857 * except.c (choose_personality_routine): Likewise.
1858 * friend.c (do_friend): Likewise.
1859 * g++spec.c (lang_specific_driver): Likewise.
1860 * init.c (build_zero_init, expand_default_init, build_new_1,
1861 build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
1862 * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
1863 * mangle.c (add_substitution, write_unscoped_name,
1864 write_template_prefix, write_identifier,
1865 write_special_name_destructor, write_type, write_builtin_type,
1866 write_expression, write_template_param,
1867 write_java_integer_type_codes): Likewise.
1868 * method.c (implicitly_declare_fn): Likewise.
1869
1870 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
1871
1872 * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
1873 (BINFO_INDIRECT_PRIMARY_P): Remove.
1874 * class.c (determine_primary_base): Rename to ...
1875 (determine_primary_bases): ... here. Set all primary bases.
1876 (set_primary_base): Remove.
1877 (mark_primary_bases): Remove.
1878 (build_simple_base_path, walk_subobject_offsets,
1879 propagate_binfo_offsets, end_of_class): Adjust.
1880 (layout_class_type): Rename determine_primary_base call.
1881 (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
1882 to type_as_string.
1883 (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
1884 build_rtti_vtbl_entries): Adjust.
1885 * init.c (build_vtbl_address): Adjust.
1886
1887 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
1888
1889 2004-08-28 Ziemowit Laski <zlaski@apple.com>
1890
1891 * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
1892 CXX_AND_OBJCXX_OBJS.
1893 (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
1894 separately on the link line.
1895
1896 2004-08-28 Jason Merrill <jason@redhat.com>
1897
1898 * decl.c (expand_static_init): Avoid bogus warnings.
1899
1900 2004-08-27 Jason Merrill <jason@redhat.com>
1901
1902 PR c++/16851
1903 * tree.c (stabilize_init): See through a COMPOUND_EXPR.
1904
1905 PR c++/13684
1906 * decl.c (expand_static_init): Use thread-safety API.
1907 (register_dtor_fn): Return the call, don't expand it.
1908 * tree.c (add_stmt_to_compound): New fn.
1909 (stabilize_call): Use it.
1910
1911 2004-08-27 Richard Henderson <rth@redhat.com>
1912
1913 * cp-tree.def (OFFSETOF_EXPR): New.
1914 * parser.c (cp_parser_builtin_offsetof): Either built an
1915 OFFSETOF_EXPR, or call fold_offsetof immediately.
1916 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
1917
1918 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
1919
1920 * call.c (validate_conversion_obstack): Replace
1921 my_friendly_assert with gcc_assert or gcc_unreachable.
1922 (direct_reference_binding, merge_conversion_sequences,
1923 build_user_type_conversion_1, perform_overload_resolution,
1924 build_op_delete_call, enforce_access, call_builtin_trap,
1925 build_over_call, build_special_member_call, build_new_method_call,
1926 initialize_reference): Likewise.
1927 * class.c (build_base_path, build_primary_vtable, alter_access,
1928 check_bases, update_vtable_entry_for_fn, layout_empty_base,
1929 clone_function_decl, adjust_clone_args,
1930 type_requires_array_cookie, include_empty_classes,
1931 finish_struct_1, resolve_address_of_overloaded_function,
1932 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
1933 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
1934 accumulate_vtbl_inits, build_vtbl_initializer,
1935 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
1936 * cvt.c (build_up_reference, convert_to_reference): Likewise.
1937 * decl.c (poplevel, duplicate_decls, make_typename_type,
1938 cxx_init_decl_processing, reshape_init, check_initializer,
1939 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
1940 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
1941 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
1942 xref_basetypes, start_preparsed_function, save_function_data,
1943 finish_function, finish_method, maybe_register_incomplete_var,
1944 complete_vars): Likewise.
1945 * decl2.c (grok_array_decl, check_member_template,
1946 check_classfn, finish_static_data_member_decl, coerce_new_type,
1947 coerce_delete_type, import_export_class, decl_needed_p,
1948 determine_visibility, import_export_decl, build_cleanup,
1949 start_static_initialization_or_destructi, do_static_destruction,
1950 prune_vars_needing_no_initialization,
1951 build_offset_ref_call_from_tree): Likewise.
1952 * error.c (dump_decl, dump_expr): Likewise.
1953 * init.c (finish_init_stmts, build_zero_init,
1954 expand_virtual_init, expand_default_init, expand_aggr_init_1,
1955 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
1956 Likewise.
1957 * mangle.c (write_method_parms, write_template_args,
1958 write_expression, write_template_arg): Likewise.
1959 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
1960 * name-lookup.c (pop_binding, begin_scope, leave_scope,
1961 resume_scope, push_using_decl, validate_nonmember_using_decl,
1962 is_ancestor, poplevel_class, set_inherited_value_binding_p,
1963 push_class_level_binding, do_class_using_decl, push_namespace,
1964 pop_namespace, add_using_namespace, ambiguous_decl,
1965 lookup_namespace_name, lookup_type_current_level,
1966 maybe_process_template_type_declaration): Likewise.
1967 * parser.c (cp_lexer_peek_nth_token,
1968 cp_parser_parse_and_diagnose_invalid_typ,
1969 cp_parser_translation_unit, cp_parser_template_id,
1970 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
1971 * pt.c (push_access_scope, finish_member_template_decl,
1972 push_inline_template_parms_recursive, add_outermost_template_args,
1973 get_innermost_template_args, begin_explicit_instantiation,
1974 end_explicit_instantiation, retrieve_specialization,
1975 is_specialization_of, is_specialization_of_friend,
1976 register_specialization, check_explicit_specialization,
1977 comp_template_parms, process_template_parm,
1978 process_partial_specialization, convert_nontype_argument,
1979 coerce_template_template_parms, coerce_template_parms,
1980 mangle_class_name_for_template, lookup_template_function,
1981 lookup_template_class, instantiate_class_template, tsubst_decl,
1982 tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
1983 instantiate_template, fn_type_unification, type_unification_real,
1984 get_template_base, regenerate_decl_from_template,
1985 template_for_substitution, instantiate_decl,
1986 get_mostly_instantiated_function_type, dependent_scope_ref_p,
1987 value_dependent_expression_p, resolve_typename_type): Likewise.
1988 * repo.c (repo_emit_p): Likewise.
1989 * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
1990 create_tinfo_types, emit_tinfo_decl): Likewise.
1991 * search.c (lookup_base_r, lookup_base, lookup_field_1,
1992 dfs_access_in_type, build_baselink, lookup_member,
1993 adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
1994 * semantics.c (perform_or_defer_access_check,
1995 finish_non_static_data_member, finish_stmt_expr_expr,
1996 finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
1997 finish_template_template_parm, finish_member_declaration,
1998 emit_associated_thunks): Likewise.
1999 * tree.c (build_target_expr_with_type, force_target_expr,
2000 copy_binfo, get_first_fn, cp_tree_equal): Likewise.
2001 * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
2002 cxx_sizeof_or_alignof_type, perform_integral_promotions,
2003 build_class_member_access_expr, finish_class_member_access_expr,
2004 build_ptrmemfunc_access_expr, build_unary_op,
2005 unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
2006 build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
2007 * typeck2.c (complete_type_check_abstract,
2008 abstract_virtuals_error, process_init_constructor,
2009 add_exception_specifier): Likewise.
2010
2011 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
2012
2013 * class.c (build_vtbl_initializer): Use ssize_int.
2014 * decl.c (complete_array_type): Likewise.
2015 * method.c (finish_thunk): Likewise.
2016 * search.c (get_dynamic_base_type): Likewise.
2017
2018 2004-08-26 Richard Henderson <rth@redhat.com>
2019
2020 * cp-tree.h (DECL_FIELD_IS_BASE): New.
2021 * class.c (build_base_field): Set it.
2022 (build_simple_base_path): Use it.
2023 (fixed_type_or_null): Don't consider base fields definitive.
2024
2025 2004-08-25 Roger Sayle <roger@eyesopen.com>
2026
2027 PR middle-end/16693
2028 PR tree-optimization/16372
2029 * decl.c (finish_enum): Make the precision of the enumerated type
2030 the same width as the underlying integer type.
2031
2032 2004-08-25 Mark Mitchell <mark@codesourcery.com>
2033
2034 PR c++/17155
2035 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
2036 functions.
2037
2038 * mangle.c (get_identifier_nocopy): Add cast.
2039
2040 * cp-tree.h (mangle_type): Remove.
2041 * mangle.c (globals): GTY it.
2042 (mangle_obstack): New variable.
2043 (name_obstack): Likewise.
2044 (name_base): Likewise.
2045 (write_char): Adjust accordingly.
2046 (write_chars): Likewise.
2047 (write_string): Likewise.
2048 (start_mangling): Initialize G.substitutions only one. Add
2049 ident_p parameter.
2050 (finish_mangling): Use VARRAY_CLEAR to reclaim
2051 storage in G.substitutions. Use obstack_finish.
2052 (init_mangle): Adjust for changes to variable names above.
2053 Initialize G.substitutions.
2054 (mangle_decl_string): Adjust call to start_mangling.
2055 (get_identifier_nocopy): New function.
2056 (mangle_decl): Use it.
2057 (mangle_type_string): Adjust call to start_mangling.
2058 (mangle_special_for_type): Likewise.
2059 (mangle_vtt_for_type): Likewise.
2060 (mangle_ctor_vtbl_for_type): Likewise.
2061 (mangle_thunk): Likewise.
2062 (mangle_guard_variable): Likewise.
2063 (mangle_ref_init_variable): Likewise.
2064
2065 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2066
2067 PR c++/14428
2068 * pt.c (redeclare_class_template): Check the type of non-type and
2069 template template parameter.
2070
2071 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
2072
2073 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
2074 (build_user_type_conversion_1, convert_like_real,
2075 build_java_interface_fn_ref, build_special_member_call): Likewise.
2076 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
2077 * cp-gimplify.c (cp_gimplify_expr): Likewise.
2078 * cvt.c (cp_convert_to_pointer): Likewise.
2079 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
2080 * decl2.c (start_static_initialization_or_destruction,
2081 generate_ctor_or_dtor_function): Likewise.
2082 * except.c (build_throw): Likewise.
2083 * mangle.c (write_integer_cst): Likewise.
2084 * method.c (finish_thunk): Likewise.
2085 * rtti.c (build_headof, get_tinfo_decl_dynamic,
2086 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
2087 get_pseudo_ti_init): Likewise.
2088 * search.c (get_dynamic_cast_base_type): Likewise.
2089
2090 2004-08-25 Zack Weinberg <zack@codesourcery.com>
2091
2092 * class.c, search.c: Remove references to DWARF_DEBUG.
2093
2094 2004-08-25 Adam Nemet <anemet@lnxw.com>
2095
2096 * repo.c (extract_string): Reset backquote after one character.
2097 (get_base_filename): Fix indentation.
2098
2099 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
2100
2101 * decl.c (cxx_init_decl_processing): Adjust
2102 build_common_tree_nodes call.
2103
2104 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
2105
2106 PR c++/16889
2107 * (is_subobject_of_p): Resurrect & optimize.
2108 (lookup_field_r): Use it.
2109
2110 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2111
2112 PR c++/16706
2113 * search.c (friend_accessible_p): Increment processing_template_decl
2114 when deal with TEMPLATE_DECL of SCOPE.
2115
2116 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
2117
2118 PR c++/17149
2119 * semantics.c (check_accessibility_of_qualified_id): Defer check
2120 if qualifying_type is a template parameter.
2121
2122 2004-08-23 Mark Mitchell <mark@codesourcery.com>
2123
2124 PR c++/17163
2125 * pt.c (instantiate_decl): Do not try to apply
2126 DECL_DECLARED_INLINED_P to a VAR_DECL.
2127
2128 * search.c (build_baselink): Fix typo in comment.
2129
2130 2004-08-22 Andrew Pinski <apinski@apple.com>
2131
2132 Revert:
2133 2004-08-22 Andrew Pinski <apinski@apple.com>
2134 PR c++/14029
2135 * typeck.c (build_unary_op): Use &a.b if the folded lowered
2136 expression is not constant.
2137
2138 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
2139
2140 * name-lookup.c (pushdecl): Rename build_type_copy call.
2141 * tree.c (cp_build_qualified_type_real,
2142 build_exception_variant, handle_java_interface_attribute): Likewise.
2143
2144 2004-08-22 Andrew Pinski <apinski@apple.com>
2145
2146 PR c++/14029
2147 * typeck.c (build_unary_op): Use &a.b if the folded lowered
2148 expression is not constant.
2149
2150 2004-08-20 Mark Mitchell <mark@codesourcery.com>
2151
2152 PR c++/17121
2153 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
2154
2155 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
2156
2157 PR c++/17120
2158 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
2159 MODOP_EXPR.
2160
2161 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2162
2163 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
2164 before calling comp_template_args.
2165
2166 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
2167
2168 * class.c (build_vtbl_initializer): Use build_int_cst for
2169 negative size types.
2170 * decl.c (complete_array_type): Likewise.
2171 * method.c (finish_thunk): Likewise.
2172
2173 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
2174
2175 * tree.c: Remove unused mark_local_for_remap_r.
2176
2177 2004-08-19 Eric Christopher <echristo@redhat.com>
2178
2179 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
2180 * tree.c (cxx_unsave_expr_now): Delete.
2181 (cp_unsave_r): Ditto.
2182
2183 2004-08-19 Mark Mitchell <mark@codesourcery.com>
2184
2185 PR c++/15890
2186 * pt.c (push_template_decl_real): Disallow template allocation
2187 functions with fewer than two parameters.
2188
2189 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
2190
2191 * cp-tree.h (build_shared_int_cst): Remove.
2192 * tree.c (shared_int_cache): Remove.
2193 (build_shared_int_cst): Remove.
2194 * class.c (finish_struct_1): Use build_int_cst.
2195
2196 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
2197
2198 * decl.c (finish_enum): Do not copy value node early, copy
2199 later.
2200 * lex.c (cxx_init): Force null_node to be unique.
2201
2202 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
2203
2204 PR c++/17041
2205 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
2206 from input for MODOP_EXPR.
2207
2208 2004-08-18 Mark Mitchell <mark@codesourcery.com>
2209
2210 * pt.c (dependent_template_p): Fix typo in commment.
2211
2212 PR c++/17068
2213 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
2214 dependent.
2215
2216 2004-08-17 Mark Mitchell <mark@codesourcery.com>
2217
2218 PR c++/16246
2219 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
2220 arguments have the same type as the corresponding parameter.
2221
2222 PR c++/16215
2223 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
2224 is set use it for diagnostic purposes.
2225 (cp_parser_pseudo_destructor_name): Remove special-case error
2226 message.
2227
2228 PR c++/15871
2229 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
2230
2231 PR c++/16965
2232 * cp-tree.h (qualified_name_lookup_error): Add parameter.
2233 * name-lookup.c (do_class_using_decl): Restrict set of entities
2234 passed to cp_emit_debug_info_for_using more carefully.
2235 (lookup_qualified_name): Allow lookup_member to return sets of
2236 ambiguous entries.
2237 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
2238 (cp_parser_primary_expression): Handle ambiguous lookups.
2239 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
2240 (cp_parser_template_argument): Likewise.
2241 (cp_parser_elaborate_type_specifier): Likewise.
2242 (cp_parser_namespace_name): Likewise.
2243 (cp_parser_class_name): Likewise.
2244 (cp_parser_lookup_name_simple): Likewise.
2245 * pt.c (tsubst_qualified_id): Handle ambiguous results.
2246 (tsubst_expr): Likewise.
2247 * semantics.c (qualified_name_lookup_error): Add decl paramter.
2248 For ambiguous lookups, print candidates.
2249
2250 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2251
2252 PR c++/6749
2253 * pt.c (instantiate_pending_templates): Add int parameter. Don't
2254 return anything.
2255 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
2256 * decl2.c (finish_file): Adjust call to
2257 instantiate_pending_templates.
2258
2259 2004-08-15 Roger Sayle <roger@eyesopen.com>
2260
2261 * call.c (build_vfield_ref, build_call, build_conditional_expr,
2262 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
2263 build_java_interface_fn_ref, build_special_member_call,
2264 build_new_method_call, initialize_reference): Replace calls to
2265 build with calls to buildN.
2266 * class.c (build_base_path, convert_to_base_statically,
2267 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
2268 build_vtbl_initializer): Likewise.
2269 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
2270 gimplify_if_stmt, cp_genericize_r): Likewise.
2271 * cvt.c (convert_to_void): Likewise.
2272 * decl.c (check_initializer, finish_constructor_body,
2273 finish_destructor_body): Likewise.
2274 * error.c (dump_expr): Likewise.
2275 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
2276 Likewise.
2277 * init.c (perform_member_init, expand_virtual_init,
2278 expand_cleanup_for_base, build_init, expand_default_init,
2279 build_offset_ref, decl_constant_value, build_new, build_new_1,
2280 build_vec_delete_1, build_vec_init, build_delete,
2281 push_base_cleanups, build_vec_delete): Likewise.
2282 * mangle.c (write_integer_cst): Likewise.
2283 * method.c (thunk_adjust, do_build_copy_constructor,
2284 do_build_assign_ref): Likewise.
2285 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
2286 unify, build_non_dependent_expr): Likewise.
2287 * rtti.c (build_headof, build_typeid, ifnonnull,
2288 build_dyanmic_cast_1, tinfo_base_init): Likewise.
2289 * semantics.c (begin_compound_stmt, finish_call_expr,
2290 finish_pseudo_destructor_expr, finish_id_expression,
2291 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
2292 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
2293 array_type_nelts_total, stabilize_call): Likewise.
2294 * typeck.c (decay_conversion, build_class_member_access_expr,
2295 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
2296 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
2297 build_x_unary_op, build_unary_op, unary_complex_lvalue,
2298 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
2299 check_return_expr): Likewise.
2300 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
2301 split_nonconstant_init, store_init_value, build_m_component_ref):
2302 Likewise.
2303
2304 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
2305
2306 * call.c (convert_class_to_reference,
2307 build_user_type_conversion_1, convert_like_real,
2308 build_java_interface_fn_ref, build_special_member_call): Use
2309 build_int_cst.
2310 * class.c (build_vtbl_initializer): Likewise.
2311 * cp-gimplify.c (cp_gimplify_expr): Likewise.
2312 * cvt.c (cp_convert_to_pointer): Likewise.
2313 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
2314 * decl2.c (start_static_initialization_or_destruction,
2315 generate_ctor_or_dtor_function): Likewise.
2316 * except.c (build_throw): Likewise.
2317 * lex.c (cxx_init): Likewise.
2318 * mangle.c (write_integer_cst): Likewise.
2319 * rtti.c (build_headof, get_tinfo_decl_dynamic,
2320 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
2321 get_pseudo_ti_init): Likewise.
2322 * search.c (get_dynamic_cast_base_type): Likewise.
2323 * tree.c (build_shared_int_cst): Likewise.
2324
2325 2004-08-12 Mark Mitchell <mark@codesourcery.com>
2326
2327 PR c++/16273
2328 * class.c (count_depth_data): New type.
2329 (dfs_depth_post): New function.
2330 (dfs_depth_q): Likewise.
2331 (find_final_overrider_data_s): Change type of vpath.
2332 Add vpath_list.
2333 (dfs_find_final_overrider_1): New function.
2334 (dfs_find_final_overrider): Use it.
2335 (dfs_find_final_overrider_q): Adjust use of vpath.
2336 (dfs_find_final_overrider_post): Likewise.
2337 (find_final_overrider): Use dfs_depth. Allocate and deallocate
2338 vpath_list.
2339
2340 2004-08-12 Jan Beulich <jbeulich@novell.com>
2341
2342 * parser.c (cp_parser_asm_definition): Properly consume scope operator
2343 tokens preceding the clobbers. Don't check for scope operator
2344 following inputs. Simplify inputs handling to match that now used for
2345 clobbers.
2346
2347 2004-08-11 Mark Mitchell <mark@codesourcery.com>
2348
2349 PR c++/16698
2350 * except.c (build_throw): Allocate cleanup_type and the function
2351 for __cxa_throw separately.
2352
2353 PR c++/16853
2354 * call.c (standard_conversion): Do not accept conversions between
2355 pointers to members if the class types are unrelated.
2356
2357 PR c++/16618
2358 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
2359 char &" instead of just "char &".
2360
2361 PR c++/16870
2362 * pt.c (tsubst): Just return the unknown_type_node.
2363
2364 2004-08-11 Mark Mitchell <mark@codesourcery.com>
2365
2366 PR c++/16964
2367 * parser.c (cp_parser_class_specifier): Robustify.
2368
2369 PR c++/16904
2370 * pt.c (tsubst_copy_and_build): Complain about invalid
2371 qualification.
2372
2373 PR c++/16929
2374 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
2375 current_class_ref while tsubsting.
2376
2377 2004-08-10 Mark Mitchell <mark@codesourcery.com>
2378
2379 PR c++/16971
2380 * parser.c (cp_parser_init_declarator): Robustify.
2381
2382 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
2383
2384 * typeck2.c (process_init_constructor): Guard the missing field warning
2385 with warn_missing_field_initializers rather than extra_warnings.
2386
2387 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
2388
2389 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
2390
2391 2004-08-05 Mark Mitchell <mark@codesourcery.com>
2392
2393 * decl.c (start_preparsed_function): Move determine_visibility
2394 call.
2395 * decl2.c (determine_visibility): Incorporate dllexport testing.
2396
2397 2004-08-05 Geoffrey Keating <geoffk@apple.com>
2398
2399 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
2400 means that libstdc++ is needed.
2401
2402 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
2403
2404 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
2405
2406 2004-08-04 Geoffrey Keating <geoffk@apple.com>
2407
2408 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
2409 than passing it as a parameter to rest_of_decl_compilation.
2410 * decl2.c (grokfield): Use set_user_assembler_name.
2411
2412 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
2413
2414 * decl.c (complete_array_type): Don't gratuitously copy
2415 maxindex. Its type is always set.
2416
2417 2004-08-04 Paul Brook <paul@codesourcery.com>
2418
2419 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
2420 * cp-tree.h (struct language_function): Rename x_dtor_label to
2421 x_cdtor_label.
2422 (dtor_label): Rename ...
2423 (cdtor_label): ... to this.
2424 * decl.c (begin_constructor_body): Remove.
2425 (check_special_function_return_type): Maybe change the return type.
2426 (grokdeclarator): Pass the class type.
2427 (start_preparsed_function): Constructors may need a return label.
2428 (finish_constructor_body, finish_destructor_body): Set the return
2429 value.
2430 (begin_function_body): Don't call begin_constructor_body.
2431 (finish_function): Don't warn for constructors or destructors.
2432 (implicitly_declare_fn): Maybe change the return type.
2433 * optimize.c: Include target.h.
2434 (maybe_clone_body): Remap the function result.
2435 * semantics.c: Include target.h.
2436 (finish_return_stmt): Maybe jump to return label for constructors.
2437
2438 2004-08-03 Mark Mitchell <mark@codesourcery.com>
2439
2440 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
2441 (check_field_decls): Or here.
2442 (check_methods): Or here.
2443 (initialize_array): Don't mess with DECL_CONTEXT.
2444 * cp-tree.h (start_decl): Adjust prototype.
2445 (determine_visibility): New function.
2446 * decl.c (duplicate_decls): Remove checks for hidden "operator
2447 new".
2448 (build_library_fn_1): Give all library functions default
2449 visibility.
2450 (start_decl): Add pop_scope_p parameter. Tidy.
2451 (cp_finish_decl): Do not pop scopes here. Call
2452 determine_visibility for variable definitions.
2453 (start_preparsed_function): Call determine_visibility.
2454 * decl2.c (determine_visibility): New function.
2455 * method.c (use_thunk): Fix formatting.
2456 * parser.c (cp_parser_condition): Adjust calls to start_decl.
2457 (cp_parser_init_declarator): Likewise.
2458 * pt.c (instantiate_decl): Always call pop_nested_class.
2459 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
2460 (tinfo_base_init): Likewise.
2461
2462 2004-08-02 Mark Mitchell <mark@codesourcery.com>
2463
2464 PR c++/16707
2465 * name-lookup.c (validate_nonmember_using_decl): Robustify.
2466
2467 2004-08-01 Mark Mitchell <mark@codesourcery.com>
2468
2469 PR c++/16224
2470 * name-lookup.c (decl_namespace): Remove.
2471 (current_decl_namespace): Use decl_namespace_context instead of
2472 decl_namespace.
2473 (push_decl_namespace): Likewise.
2474 (arg_assoc_class): Likewise.
2475 (arg_assoc_type): Likewise.
2476 * pt.c (check_specialization_namespace): New function.
2477 (maybe_process_partial_specialization): Use it.
2478 (register_specialization): Likewise.
2479
2480 PR c++/16489
2481 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
2482 * call.c (null_ptr_cst_p): Handle variables with constant
2483 initializers.
2484 * pt.c (convert_nontype_argument): Use
2485 DECL_INTEGRAL_CONSTANT_VAR_P.
2486 * semantics.c (finish_id_expression): Likewise.
2487
2488 PR c++/16529
2489 * decl.c (duplicate_decls): Reject duplicate namespace
2490 declarations.
2491
2492 PR c++/16810
2493 * typeck.c (build_ptrmemfunc): Loosen assertion.
2494
2495 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2496
2497 * call.c (z_candidate::template_decl): Rename from template.
2498 (add_template_candidate_real): Adjust member reference.
2499 (joust): Likewise.
2500
2501 2004-07-29 Mark Mitchell <mark@codesourcery.com>
2502
2503 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
2504 (lang_decl_flags): Narrow the width of "languages". Add
2505 repo_available_p.
2506 (DECL_NEEDED_P): Remove.
2507 (FOR_EACH_CLONE): New macro.
2508 (DECL_REPO_AVAILABLE_P): Likewise.
2509 (DECL_TINFO_P): Likewise.
2510 (set_linkage_according_to_type): Declare.
2511 (import_export_vtable): Remove.
2512 (import_export_tinfo): Likewise.
2513 (mark_needed): New function.
2514 (decl_needed_p): Likewise.
2515 (note_vauge_linkage_fn): Likewise.
2516 (init_repo): Change prototype.
2517 (repo_template_used): Remove.
2518 (repo_template_instantiated): Likewise.
2519 (repo_emit_p): New function.
2520 (repo_export_class_p): Likewise.
2521 (no_linkage_check): Change prototype.
2522 * class.c (set_linkage_according_to_type): New function.
2523 (build_vtable): Use it. Do not call import_export_vtable. Set
2524 DECL_IGNORED_P if appropriate.
2525 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
2526 (make_rtL_for_nonlocal_decls): Check for template instantiations
2527 explicitly.
2528 (grokfndecl): Adjust call to no_linkage_check.
2529 (set_linkage_for_static_data_member): New function.
2530 (grokvardecl): Use it. Adjust call to no_linkage_check.
2531 (grokdeclarator): Use set_linkage_for_static_data_member.
2532 * decl2.c (note_vague_linkage_fn): New function.
2533 (note_vague_linkage_var): Likewise.
2534 (finish_static_data_member_decl): Use it.
2535 (import_export_vtable): Remove.
2536 (import_export_class): Use repo_export_class_p.
2537 (var_finalized_p): Simplify.
2538 (maybe_emit_vtables): Simplify.
2539 (mark_needed): New function.
2540 (decl_needed_p): Likewise.
2541 (import_export_decl): Add documentation and consistency checks.
2542 Use repo_emit_p. Handle virtual tables and RTTI information
2543 here.
2544 (import_export_tinfo): Remove.
2545 (write_out_vars): Call import_export_decl.
2546 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
2547 whenever one is.
2548 (finish_file): Use decl_needed_p. Do not call import_export_decl
2549 for undefined static data members. Do not warn about undefined
2550 inlines when using a repository.
2551 (mark_used): Use note_vague_linkage_fn. Always defer template
2552 instantiations.
2553 * lex.c (cxx_init): Adjust call to init_repo. Always set
2554 flag_unit_at_a-time.
2555 * method.c (synthesize_method): Remove unncessary
2556 import_export_decl call.
2557 (implicitly_declare_fn): Use set_linkage_according_to_type.
2558 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
2559 * pt.c (instantiate_class_template): Don't redundantly add classes
2560 to keyed_classes. Don't call repo_template_used.
2561 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
2562 templates with internal linkage.
2563 (check_instantiated_args): Adjust call to no_linkage_check.
2564 (instantiate_template): Use FOR_EACH_CLONE.
2565 (mark_definable): New function.
2566 (mark_decl_instantiated): Use it.
2567 (do_decl_instantiation): Adjust tests for explicit instantiation
2568 after "extern template".
2569 (instantiate_class_member): Do not use repo_template_instantiated.
2570 (do_type_instantiation): Simplify.
2571 (instantiate_decl): Use mark_definable. Check repo_emit_p.
2572 Simplify.
2573 * repo.c (repo_get_id): Remove.
2574 (original_repo): Remove.
2575 (IDENTIFIER_REPO_USED): Remove.
2576 (IDENTIFIER_REPO_CHOSEN): Remove.
2577 Remove all #if 0'd code.
2578 (repo_template_used): Remove.
2579 (repo_template_instantiated): Remove.
2580 (temporary_obstack_initialized_p): New variable.
2581 (init_repo): Register with lang_post_pch_load. Avoid creating
2582 identifiers unnecessarily. Don't use original_repo. Close the
2583 file here.
2584 (reopen_repo_file_for_write): Not here.
2585 (finish_repo): Always write out a new repository file.
2586 (repo_emit_p): New function.
2587 (repo_export_class_p): Likewise.
2588 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
2589 (involves_incomplete_p): New function.
2590 (tinfo_base_init): Use it.
2591 (ptr_initializer): Remove non_public_ptr parameter.
2592 (ptm_initializer): Likewise.
2593 (get_pseudo_ti_init): Likewise.
2594 (unemitted_tinfo_decl_p): Remove.
2595 (emit_tinfo_decl): Use import_export_decl.
2596 * semantics.c (expand_body): Move updates of static_ctors and
2597 static_dtors to ...
2598 (expand_or_defer_fn): ... here.
2599 * tree.c (no_linkage_check): Add relaxed_p parameter.
2600
2601 2004-07-28 Eric Christopher <echristo@redhat.com>
2602
2603 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
2604
2605 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
2606
2607 * cp-tree.h (struct tree_pair_s): New.
2608 (typedef tree_pair_p): New.
2609 (DEF_VEC_O(tree_pair_s)): New.
2610 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
2611 (CLASSTYPE_VCALL_INDICES): Update documentation.
2612 * class.c (get_vcall_index): Adjust.
2613 (add_vcall_offset): Adjust.
2614
2615 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
2616
2617 * pt.c, typeck.c: Remove spurious carriage returns.
2618
2619 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2620
2621 PR c++/14429
2622 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
2623 when the type of ARG is not dependent.
2624
2625 2004-07-26 Geoffrey Keating <geoffk@apple.com>
2626
2627 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
2628 (lang_specific_driver): If the C++ or math library options don't
2629 start with '-l', don't count them as added libraries.
2630
2631 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
2632
2633 * decl.c (xref_basetypes): Adjust base access vector creation.
2634 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
2635 access accesses.
2636 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
2637
2638 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
2639 Brian Ryner <bryner@brianryner.com>
2640
2641 PR c++/15000
2642 PR c++/9283
2643 * class.c (check_field_decls): Apply hidden visibility if
2644 -fvisibility-inlines-hidden and inlined unless otherwise specified
2645 (build_vtable): Set vtable visibility to class visibility.
2646 (check_field_decls): Default static member visibility to class
2647 visibility.
2648 (check_methods): Default method visibility to class visibility.
2649 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
2650 CLASSTYPE_VISIBILITY_SPECIFIED macro.
2651 * decl.c (duplicate_decls): New logic for merging definition decls
2652 with declaration decls. Added ignore & warning when non default
2653 applied to global operator new or delete.
2654 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
2655 wherever VISIBILITY was changed
2656 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
2657 visibility.
2658 (tinfo_base_init): Set typeinfo name visibility to class visibility.
2659
2660 2004-07-25 Bernardo Innocenti <bernie@develer.com>
2661
2662 * decl.c: Rename all identifiers named `class' to `cl'.
2663 * cp-tree.h: Likewise.
2664
2665 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
2666
2667 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
2668 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
2669 * name-lookup.c (binding_entry_make): Use GGC_NEW.
2670 (binding_table_construct): Use GGC_CNEWVEC.
2671 (binding_table_new): Use GGC_NEW.
2672 (cxx_binding_make): Likewise.
2673 (begin_scope): Likewise.
2674 (push_to_top_level): Use GCC_CNEW.
2675 * parser.c (cp_token_cache_new): Likewise.
2676 (cp_token_cache_push_token): Likewise.
2677 (cp_lexer_new_main): Likewise.
2678 (cp_lexer_new_from_tokens): Likewise.
2679 (cp_parser_context_new): Likewise.
2680 (cp_parser_new): Likewise.
2681 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
2682 * lex.c (cxx_make_type): Use GGC_CNEW.
2683 (retrofit_lang_decl): Use GGC_NEWVAR.
2684 (cxx_dup_lang_specific_decl): Likewise.
2685 (copy_lang_type): Likewise.
2686 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
2687 (save_function_data): Likewise.
2688 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
2689 (cxx_push_function_context): Likewise.
2690
2691 2004-07-25 Richard Henderson <rth@redhat.com>
2692
2693 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
2694 DECL_IGNORED_P on RESULT_DECL.
2695 * semantics.c (finalize_nrv): Copy them too.
2696
2697 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
2698
2699 * search.c (lookup_conversion_operator): Avoid two loops.
2700 (add_conversions): Remove.
2701 (check_hidden_convs, split_conversions,
2702 lookup_conversions_r): New.
2703 (lookup_conversions): Use lookup_conversions_r.
2704
2705 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
2706
2707 * pt.c (get_template_base): Check type is completable.
2708
2709 2004-07-21 Eric Christopher <echristo@redhat.com>
2710
2711 * decl.c (poplevel): Inline unused variable checking.
2712 Change formatting.
2713
2714 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
2715
2716 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
2717 integer vectors.
2718
2719 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2720
2721 PR c++/14497
2722 * pt.c (check_explicit_specialization): Remove extension to accept
2723 specializations without template headers. Fall-through to normal
2724 processing.
2725
2726 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2727
2728 PR c++/509
2729 * pt.c (determine_specialization): New parameter template_count.
2730 Disambiguate between member templates and member functions counting
2731 the template headers.
2732 (check_explicit_specialization): Update caller.
2733 (tsubst_friend_function): Likewise.
2734
2735 2004-07-20 Steven Bosscher <stevenb@suse.de>
2736
2737 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
2738 * cp-tree.h (tinst_level_t): New tree type.
2739 (union lang_tree_node): Handle it.
2740 (TINST_LOCATION): New accessor macro.
2741 (make_tinst_level): New prototype.
2742 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
2743 * decl.c (cp_tree_node_structure): Likewise.
2744 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
2745 (print_instantiation_partial_context): Likewise.
2746 * pt.c (pop_tinst_level): Likewise.
2747 (push_tinst_level): Use make_tinst_level.
2748 * tree.c (make_tinst_level): New function.
2749 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
2750
2751 2004-07-20 Mark Mitchell <mark@codesourcery.com>
2752
2753 * parser.c (cp_parser_simple_type_specifier): Fix typo.
2754
2755 PR c++/16637
2756 * parser.c (cp_parser_simple_type_specifier): Do not record usage
2757 of globally-qualified names.
2758
2759 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2760
2761 PR c++/16175
2762 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
2763 cv qualifier.
2764
2765 2004-07-19 Mark Mitchell <mark@codesourcery.com>
2766
2767 PR c++/16623
2768 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
2769 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
2770 * class.c (add_implicitly_declared_members): Use
2771 CLASSTYPE_LAZY_ASSIGNMENT_OP.
2772 * method.c (lazily_declare_fn): Clear
2773 CLASSTYPE_LAZY_ASSIGNMENT_OP.
2774 * search.c (lookup_fnfields_1): Check it.
2775
2776 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
2777
2778 * cp-tree.h (vec_binfo_member): Remove.
2779 * tree.c (vec_binfo_member): Remove.
2780
2781 * cp-tree.h (struct lang_type_class): Remove vfields field.
2782 (CLASSTYPE_VFIELDS): Remove.
2783 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
2784 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
2785 handling.
2786 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
2787 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
2788 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
2789
2790 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
2791
2792 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
2793 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
2794 Moved to common.
2795 (BINFO_LANG_SLOTS): Remove.
2796 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
2797 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
2798 * class.c (check_bases): Adjust BINFO accessors.
2799 (determine_primary_base, finish_struct_bits,
2800 maybe_warn_about_overly_private_class, warn_hidden,
2801 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
2802 warn_about_ambiguous_bases, get_vfield_name,
2803 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
2804 add_vcall_offset_vtbl_entries_r): Likewise.
2805 * dump.c (cp_dump_tree): Likewise.
2806 * init.c (sort_mem_initializers, expand_member_init, build_delete,
2807 push_base_cleanups): Likewise.
2808 * method.c (do_build_copy_constructor, do_build_assign_ref,
2809 synthesize_exception_spec): Likewise.
2810 name-lookup.c (arg_assoc_class): Likewise.
2811 * pt.c (instantiate_class_template,
2812 get_template_base_recursive): Likewise.
2813 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
2814 * typeck2.c (process_init_constructor): Likewise.
2815 * search.c (lookup_base_r, dynamic_cast_base_recurse,
2816 dfs_access_in_type, dfs_walk_real, look_for_overrides,
2817 types_overlap_p, copied_binfo, original_binfo): Likewise.
2818 (binfo_for_vtable): Remove
2819
2820 2004-07-20 Steven Bosscher <stevenb@suse.de>
2821
2822 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
2823 thunk_alias, and the access and virtual_offset fields.
2824 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
2825 * decl.c (finish_case_label): Update c_add_case_node call.
2826
2827 2004-07-19 Mark Mitchell <mark@codesourcery.com>
2828
2829 Revert patch for PR c++/16623.
2830
2831 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
2832
2833 * except.c: Remove two spurious carriage returns.
2834
2835 2004-07-19 Mark Mitchell <mark@codesourcery.com>
2836
2837 PR c++/16623
2838 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
2839 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
2840 * class.c (add_implicitly_declared_members): Use
2841 CLASSTYPE_LAZY_ASSIGNMENT_OP.
2842 * method.c (lazily_declare_fn): Clear
2843 CLASSTYPE_LAZY_ASSIGNMENT_OP.
2844 * search.c (lookup_fnfields_1): Check it.
2845
2846 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
2847
2848 * class.c (add_method): Delay adding the slot until the end.
2849 (determine_primary_base): Adjust VEC_iterate invokation.
2850 (resort_type_method_vec, finish_struct_methods, warn_hidden,
2851 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
2852 build_vtbl_initializer): Likewise.
2853 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
2854 build_vbase_delete): Likewise.
2855 * method.c (do_build_copy_constructor): Likewise.
2856 * name-lookup.c (new_class_binding, print_binding_level,
2857 poplevel_class, store_class_bindings, push_to_top_level,
2858 pop_from_top_level): Likewise.
2859 * pt.c (check_explicit_specialization): Likewise.
2860 * search.c (lookup_conversion_operator, lookup_fnfields_1,
2861 get_pure_virtuals, add_conversions, dfs_check_overlap,
2862 binfo_for_vbase): Likewise.
2863
2864 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2865
2866 PR c++/12170
2867 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
2868 innermost set of template arguments during deduction. Simplify.
2869
2870 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
2871
2872 * typeck.c (build_modify_expr, build_x_modify_expr): Set
2873 TREE_NO_WARNING on assignments with an operator other than '='.
2874
2875 2004-07-10 Steven Bosscher <stevenb@suse.de>
2876 Joseph S. Myers <jsm@polyomino.org.uk>
2877
2878 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
2879 * decl2.c (grokfield): Don't check current_class_depth via
2880 unused TREE_COMPLEXITY.
2881 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
2882 to avoid the missing parentheses warning.
2883 Don't set C_SET_EXP_ORIGINAL_CODE.
2884
2885 2004-07-18 Mark Mitchell <mark@codesourcery.com>
2886
2887 * tree.c (no_linkage_helper): Remove.
2888 (no_linkage_check): Don't use walk_tree_without_duplicates.
2889
2890 * mangle.c (write_expression): Issue a sorry for zero-operand
2891 functional casts.
2892
2893 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2894
2895 PR c++/13092
2896 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2897 TREE_TYPE for non-dependent names.
2898 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
2899 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2900 unknown_type_node as its TREE_TYPE.
2901 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2902 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2903 (dump_expr) <SCOPE_REF case>: Likewise.
2904
2905 2004-07-17 Jason Merrill <jason@redhat.com>
2906
2907 PR c++/16115
2908 * call.c (type_passed_as): Make the invisible reference type
2909 __restrict.
2910 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
2911 cp_genericize_r. Handle invisible reference lowering.
2912 (is_invisiref_parm): New fn.
2913 (cp_genericize): Adjust the types of invisible reference parms.
2914 Don't repeat the walk for clones.
2915 * decl.c (store_parm_decls): Don't generate any code for clones.
2916
2917 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
2918
2919 * cp-tree.h (builtin_function): Declare.
2920
2921 2004-07-16 Mark Mitchell <mark@codesourcery.com>
2922
2923 * class.c (finish_struct_methods): Remove unncessary code.
2924 (add_implicitly_declared_members): Create declarations for default
2925 constructors and copy constructors lazily.
2926 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
2927 lazy_copy_ctor.
2928 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
2929 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
2930 * decl2.c (check_classfn): Robustify.
2931 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
2932 (locate_ctor): Handle lazy default constructors.
2933 (locate_copy): Handle lazy copy constructors.
2934 (implicitly_declare_fn): Make sure we're looking at the
2935 TYPE_MAIN_VARIANT for a class before creating functions. Don't
2936 set TYPE_HAS_CONSTRUCTOR.
2937 (lazily_declare_fn): New function.
2938 * name-lookup.c (constructor_name_full): Simplify.
2939 * search.c (lookup_fnfields_1): Lazily create methods, as
2940 necessary.
2941 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
2942
2943 2004-07-16 Steven Bosscher <stevenb@suse.de>
2944
2945 * cp-tree.h (struct lang_type): Don't have three GTY options on a
2946 single bit GTY desc.
2947
2948 2004-07-16 Richard Henderson <rth@redhat.com>
2949
2950 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
2951 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
2952 * tree.c (cp_copy_res_decl_for_inlining): Remove.
2953
2954 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
2955
2956 * class.c (finish_struct_bits): Use for loop.
2957 (propagate_binfo_offsets): Do primary binfo outside of loop.
2958
2959 PR c++/16583
2960 * dump.c (cp_dump_tree): Don't dump the bases if there's no
2961 binfo.
2962
2963 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
2964
2965 2004-07-15 Mark Mitchell <mark@codesourcery.com>
2966
2967 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
2968 has_abstract_assign_ref. Make methods a VEC(tree) *.
2969 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
2970 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
2971 (CLASSTYPE_DESTRUCTORS): Likewise.
2972 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
2973 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
2974 (add_method): Change prototoype.
2975 * class.c (add_method): Remove error_p parameter. Adjust for
2976 changes to CLASSTYPE_METHOD_VEC.
2977 (handle_using_decl): Adjust call to add_method.
2978 (maybe_warn_about_overly_private_class): Adjust for
2979 changes to CLASSTYPE_METHOD_VEC.
2980 (resort_type_method_vec): Likewise.
2981 (finish_struct_methods): Likewise.
2982 (check_for_override): Likewise.
2983 (warn_hidden): Likewise.
2984 (add_implicitly_declared_members): Defer creation of assignment
2985 operators. Adjust call to add_method.
2986 (clone_function_decl): Adjust call to add_method.
2987 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
2988 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
2989 * decl.c (grok_special_member_properties): Don't set
2990 TYPE_HAS_ABSTRACT_ASSIGN_REF.
2991 * decl2.c (check_classfn): Adjust for
2992 changes to CLASSTYPE_METHOD_VEC.
2993 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
2994 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
2995 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
2996 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
2997 cp_finish_decl.
2998 * pt.c (check_explicit_specialization): Adjust for
2999 changes to CLASSTYPE_METHOD_VEC.
3000 (instantiate_class_template): Do not set
3001 TYPE_HAS_ABSTRACT_ASSIGN_REF.
3002 * ptree.c (cxx_print_type): Don't try to print
3003 CLASSTYPE_METHOD_VEC.
3004 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
3005 * search.c (lookup_field_r): Adjust for
3006 changes to CLASSTYPE_METHOD_VEC.
3007 (lookup_fnfields): Likewise.
3008 (lookup_conversion_operator): Likewise.
3009 (lookup_fnfields_1): Likewise. Create assignment operators
3010 lazily.
3011 (look_for_overrides_here): Adjust for
3012 changes to CLASSTYPE_METHOD_VEC.
3013 (add_conversions): Likewise.
3014 * semantics.c (finish_member_declaration): Adjust call to add_method.
3015
3016 2004-07-15 Jason Merrill <jason@redhat.com>
3017
3018 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
3019 references and pointers are compatible.
3020
3021 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
3022
3023 * decl.c (xref_basetypes): Refactor.
3024 * tree.c (copy_base_binfos): Replace with ...
3025 (copy_binfo): ... this. Deep copy the given binfo, (not the just
3026 bases of the given base).
3027 * cp-tree.h (copy_base_binfo): Remove.
3028 (copy_binfo): Declare.
3029
3030 2004-07-15 Mark Mitchell <mark@codesourcery.com>
3031
3032 * name-lookup.c (set_inherited_value_binding_p): Add class_type
3033 parameter.
3034 (get_class_binding): Adjust.
3035 (push_class_level_binding): Don't use set_inherited_value_binding_p.
3036
3037 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
3038
3039 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
3040 * decl.c (xref_basetypes): Set it here.
3041
3042 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
3043 Don't check for incomplete base.
3044 (get_vfield_name): Simplify while loop.
3045 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
3046
3047 2004-07-14 Mark Mitchell <mark@codesourcery.com>
3048
3049 * lex.c (cxx_make_type): Remove call to get_pointer_type.
3050
3051 * cp-tree.h (IDENTIFIER_VALUE): Remove.
3052 (BINFO_PUSHDECLS_MARKED): Likewise.
3053 (maybe_inject_for_scope_var): Likewise.
3054 (push_class_decls): Likewise.
3055 * name-lookup.h (push_class_binding): Remove.
3056 (innermost_non_namespace_value): New function.
3057 (outer_binding): Likewise.
3058 * class.c (add_method): Push bindings before adding to
3059 TYPE_METHODS.
3060 (restore_class_cache): Do not restore class_shadowed.
3061 (pushclass): Do not add USING_DECLs. Do not call
3062 push_class_decls.
3063 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
3064 * decl.c (pushdecl): Use outer_binding.
3065 (poplevel): Set the scope for an out-of-scope for-loop declaration
3066 appropriately.
3067 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
3068 * name-lookup.c (new_class_binding): New function.
3069 (push_binding): Use it.
3070 (pushdecl): Use innermost_non_namespace_value.
3071 (maybe_inject_for_scope_var): Remove.
3072 (push_class_binding): Remove.
3073 (set_inherited_value_binding_p): New function.
3074 (get_class_binding): New function.
3075 (push_class_level_binding): Assert that the current_class_type is
3076 being defined.
3077 (outer_binding): New function.
3078 (innermost_non_namespace_value): Likewise.
3079 (lookup_name_real): Use outer_binding.
3080 (lookup_name_current_level): Ignore out-of-scope variables.
3081 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
3082 (lookup_template_class): Likewise.
3083 * search.c (dfs_push_type_decls): Remove.
3084 (dfs_push_decls): Likewise.
3085 (setup_class_bindings): Likewise.
3086 (lookup_field_1): Handle USING_DECLs from dependent scopes.
3087 (marked_pushdecls_p): Remove.
3088 (unmarked_pushdecls_p): Remove.
3089 (marked_identifiers): Remove.
3090 (setup_class_bindings): Remove.
3091 (dfs_push_type_decls): Remove.
3092 (dfs_push_decls): Remove.
3093 (push_class_decls): Remove.
3094
3095 2004-07-13 Mark Mitchell <mark@codesourcery.com>
3096
3097 PR c++/16518
3098 PR c++/16337
3099 * decl.c (grokvardecl): Make declspecs parameter const.
3100 (grokdeclarator): Likewise. Adjust accordingly.
3101 * decl.h (grokdeclarator): Adjust declaration.
3102 * parser.c (cp_parser_init_declarator): Do not clear
3103 decl_specifiers->attributes.
3104
3105 * cp-tree.h (lang_identifier): Remove class_value.
3106 (IDENTIFIER_CLASS_VALUE): Remove.
3107 (pop_class_decls): Likewise.
3108 (init_search_processing): Likewise.
3109 * class.c (handle_using_decl): Use lookup_member, not
3110 IDENTIFIER_CLASS_VALUE.
3111 (restore_class_cache): New function, split out from ...
3112 (pushclass): ... here. Do not call clear_identifier_class_values.
3113 (invalidate_class_lookup_cache): Do not clear
3114 IDENTIFIER_CLASS_VALUE.
3115 (popclass): Do not call pop_class_decls.
3116 (maybe_note_name_used_in_class): Do not save names looked up after
3117 the class is complete. Use lookup_member, not
3118 IDENTIFIER_CLASS_VALUE.
3119 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
3120 * decl.c (cxx_init_decl_processing): Do not call
3121 init_search_processing.
3122 * method.c (do_build_copy_constructor): Remove unnecessary code.
3123 (do_build_assign_ref): Likewise.
3124 * name-lookup.c (pushdecl): Use lookup_member, not
3125 IDENTIFIER_CLASS_VALUE.
3126 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
3127 type_shadowed list.
3128 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
3129 (push_class_binding): Do not set it.
3130 (clear_identifier_class_values): Remove.
3131 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
3132 (store_binding): Do not save it.
3133 (pop_from_top_level): Do not restore it.
3134 * name-lookup.h (cxx_saved_binding): Remove class_value.
3135 (clear_identifier_class_values): Remove.
3136 * ptree.c (cxx_print_identifier): Do not print
3137 IDENTIFIER_CLASS_VALUE.
3138 * search.c (search_obstack): Remove.
3139 (push_stack_level): Remove.
3140 (pop_stack_level): Remove.
3141 (search_level): Remove.
3142 (search_stack): Remove.
3143 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
3144 (setup_class_bindings): Use IDENTIFIER_MARKED, not
3145 IDENTIFIER_CLASS_VALUE.
3146 (marked_identifiers): New variable.
3147 (push_class_decls): Clear IDENTIFIER_MARKED.
3148 (pop_class_decls): Don't call pop_search_level.
3149 (init_search_processing): Remove.
3150
3151 2004-07-12 Mark Mitchell <mark@codesourcery.com>
3152
3153 * cp-tree.h (get_aggr_typedef): Remove.
3154 * init.c (get_aggr_typedef): Likewise.
3155
3156 * name-lookup.c (push_class_level_binding): Simplify.
3157
3158 2004-07-12 Andrew Pinski <apinski@apple.com>
3159
3160 PR c++/16475
3161 Revert:
3162 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
3163 PR c++/16276
3164 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
3165 is not public.
3166
3167 2004-07-12 Eric Christopher <echristo@redhat.com>
3168
3169 * parser.c (cp_parser_class_head): Remove unused variable.
3170
3171 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3172
3173 * decl.c (grok_op_properties): Reject [de-]allocation functions
3174 declared in a namespace, or declared as static.
3175
3176 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
3177
3178 * cp-tree.h (make_binfo): Remove.
3179 * decl.c (xref_basetypes): Use make_tree_binfo directly.
3180 * tree.h (copy_base_binfos): Likewise.
3181 (make_binfo): Remove.
3182
3183 * call.c (build_user_type_conversion_1, build_new_op,
3184 check_constructor_callable, build_temp,
3185 perform_direct_initialization_of_possible): Pass type directly to
3186 lookup_fnfields & build_special_member_call.
3187 (build_special_member_call): Accept a type, and complete it.
3188 * class.c (finish_stuct_bits): Copy the BINFOs here.
3189 * cvt.c (ocp_convert): Pass type directly to
3190 build_special_member_call.
3191 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
3192 (xref_basetypes): Allocate the binfo here. Adjust.
3193 * init.c (build_init, build_new_1): Pass type directly to
3194 build_special_member_call.
3195 * lex.c (cxx_make_type): Do not allocate binfo here.
3196 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
3197 * parser.c (cp_parser_class_head): Always call xref_basetypes.
3198 * pt.c (instantiate_class_template): Likewise. Inhibit access
3199 checking for template friends.
3200 * ptree.c (cxx_print_type): Adjust record printing.
3201 * search.c (lookup_base): When taking a type, complete it before
3202 looking for a binfo.
3203 (lookup_member): Delay completing a type.
3204 (push_class_decls): Don't walk an incomplete type.
3205 (lookup_conversions): Likewise.
3206 * semantics.c (finish_stmt_expr_expr): Pass type directly to
3207 build_special_member_call.
3208 * tree.c (copy_base_binfos): Adjust.
3209 (make_binfo): Likewise.
3210 * typeck.c (build_modify_expr): Pass type directly to
3211 build_special_member_call.
3212 * typeck2.c (process_init_constructor): Check a binfo exists.
3213 (build_m_component_ref): Allow accessing an incomplete type.
3214 (build_functional_cast): Pass type directly to
3215 build_special_member_call.
3216
3217 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3218
3219 PR c++/2204
3220 * config-lang.in (gtfiles): Add typeck2.c.
3221 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
3222 gt-cp-typeck2.h.
3223 * cp-tree.h: Declare complete_type_check_abstract.
3224 * typeck2.c (pat_calc_hash, pat_compare,
3225 complete_type_check_abstract): New functions.
3226 (abstract_virtuals_error): If the type is abstract, register the
3227 declaration within abstract_pending_vars for further checks.
3228 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
3229 * decl.c (cp_finish_decl): Do not strip array types.
3230 (create_array_type_for_decl): Check for abstractness of the element
3231 type.
3232 (complete_vars): Call complete_type_check_abstract.
3233 * class.c (finish_struct): Prepare a list of virtual functions for
3234 template types, and call complete_vars on it to check for abstractness.
3235
3236 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
3237
3238 PR tree-optimization/14107
3239 * decl.c (finish_function): Remove temporary band-aid.
3240
3241 2004-07-11 Mark Mitchell <mark@codesourcery.com>
3242
3243 * call.c (build_operator_new_call): Avoid using push_to_top_level.
3244 (build_new_op): Adjust call to lookup_function_nonclass.
3245 * name-lookup.c (identifier_type_value): Adjust call to
3246 lookup_name_real.
3247 (lookup_name_real): Add block_p parameter.
3248 (lookup_name_nonclass): Adjust call to lookup_name_real.
3249 (lookup_function_nonclass): Likewise.
3250 (lookup_name): Likewise.
3251 * name-lookup.h (lookup_name_real): Change prototype.
3252 (lookup_name_nonclass): Likewise.
3253 * parser.c (cp_parser_lookup_name): Likewise.
3254
3255 * cp-tree.h (saved_scope): Make old_bindings a vector.
3256 (unuse_fields): Remove.
3257 * name-lookup.h (cxx_saved_binding): Define it.
3258 * class.c (pushclass): Don't use unuse_fields.
3259 * name-lookup.c (cxx_saved_binding_make): Remove.
3260 (store_binding): Add new bindings to a vector, using an
3261 accumulator style, rather than adding them to a list.
3262 (store_bindings): Adjust accordingly.
3263 (store_class_bindings): Likewise.
3264 (push_to_top_level): Likewise.
3265 (pop_from_top_level): Likewise.
3266 * optimize.c (maybe_clone_body): Must push_to_top_level and
3267 pop_from_top_level calls outside of loop.
3268 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
3269 calls here from cp_parser_late_parsing_default_args.
3270 (cp_parser_save_default_args): Record the class type in which the
3271 function is declared.
3272 (cp_parser_late_parsing_default_args): Do not call
3273 push_nested_class/pop_nested_class.
3274 * search.c (dfs_unuse_fields): Remove.
3275 (unuse_fields): Remove.
3276
3277 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
3278
3279 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
3280 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
3281 * cp-tree.h (poplevel): Declare.
3282 (set_block): Remove.
3283 * decl.c (set_block): Remove.
3284
3285 2004-07-10 Mike Stump <mrs@apple.com>
3286
3287 * decl2.c (import_export_class): Never export/import vtables
3288 with inline key functions.
3289
3290 2004-07-09 Steven Bosscher <stevenb@suse.de>
3291
3292 * typeck.c (c_expand_asm_operands): Remove.
3293
3294 2004-07-09 Mike Stump <mrs@apple.com>
3295
3296 * typeck.c (build_class_member_access_expr): Skip null deref
3297 warning when we don't dereference it.
3298
3299 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3300
3301 PR c++/8211
3302 PR c++/16165
3303 * class.c (check_field_decls): Improve -Weffc++ warning: do not
3304 warn for pointers to functions/members, or for classes without
3305 destructors.
3306
3307 2004-07-08 Mark Mitchell <mark@codesourcery.com>
3308
3309 * name-lookup.h (struct cp_binding_level): Update documentation
3310 for class_shadowed.
3311
3312 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3313
3314 PR c++/16169
3315 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
3316 returning CALL_EXPR, and non-reference return type.
3317
3318 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
3319
3320 * name-lookup.c (push_binding): Use VEC_reserve.
3321
3322 2004-07-08 Richard Henderson <rth@redhat.com>
3323
3324 * cp-tree.h (expand_eh_spec_block): Remove.
3325
3326 2004-07-07 Mark Mitchell <mark@codesourcery.com>
3327
3328 * cp-tree.h (saved_scope): Remove x_previous_class_type and
3329 x_previous_class_values; add x_previous_class_level.
3330 (previous_class_type): Remove.
3331 (previous_class_values): Remove.
3332 (previous_class_level): New macro.
3333 * class.c (pushclass): Restore the identifier cache more
3334 expeditiously.
3335 (invalidate_class_lookup_cache): Use vector for class_shadowed and
3336 previous_class_values.
3337 * decl.c (poplevel): Likewise.
3338 * name-lookup.c (cxx_binding_init): New function.
3339 (cxx_binding_make): Use it.
3340 (push_binding): For a binding in a class level, use a vector of
3341 cp_class_binding nodes.
3342 (push_binding_level): New function.
3343 (begin_scope): Use it.
3344 (leave_scope): Do not put class binding levels on the free list.
3345 (print_binding_level): Adjust for the fact that class_shadowed is
3346 a vector.
3347 (poplevel_class): Likewise.
3348 (clear_identifier_class_values): Likewise.
3349 (push_class_level_binding): Likewise.
3350 (set_class_shadows): Remove.
3351 (store_binding): New function.
3352 (store_class_bindings): New function.
3353 (push_to_top_level): Use store_class_bindings as appropriate.
3354 (pop_from_top_level): Use previous_class_level, not
3355 previous_class_type.
3356 * name-lookup.h (cp_class_binding): New type.
3357 (cp_binding_level): Use a vector object for class_shadowed.
3358 (push_binding_level): Declare.
3359 (set_class_shadows): Remove.
3360
3361 2004-07-07 Andrew Pinski <apinski@apple.com>
3362
3363 * class.c (instantiate_type): BUFFER_REF is dead.
3364 * lex.c (init_operators): IN_EXPR is dead.
3365
3366 2004-07-07 Jason Merrill <jason@redhat.com>
3367
3368 PR c++/16334
3369 * call.c (build_new_op): Give overload warnings for built-in
3370 candidates.
3371
3372 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
3373
3374 PR c++/16276
3375 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
3376 is not public.
3377
3378 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
3379
3380 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
3381 * class.c (build_primary_vtable, check_bases,
3382 determine_primary_base, finish_struct_bits,
3383 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
3384 get_basefndecls, warn_hidden, walk_subobject_offsets,
3385 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
3386 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
3387 finish_struct_1, get_vfield_name, contains_empty_class_p,
3388 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
3389 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
3390 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
3391 BINFO macros.
3392 * decl.c (xref_basetypes): Likewise.
3393 * dump.c (cp_dump_tree): Likewise.
3394 * error.c (dump_expr): Likewise.
3395 * init.c (sort_mem_initializers, expand_member_init,
3396 push_base_cleanups): Likewise.
3397 * method.c (do_build_copy_constructor, do_build_assign_reg,
3398 synthesize_exception_spec): Likewise.
3399 * name-lookup.c (arg_assoc_class): Likewise.
3400 * pt.c (instantiate_class_template, tsubst,
3401 get_template_base_recursive): Likewise.
3402 * ptree.c (cxx_print_type): Likewise.
3403 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
3404 * search.c (lookup_base_r, dynamic_cast_base_recurse,
3405 dfs_access_in_type, access_in_type, lookup_field_queue_p,
3406 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
3407 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
3408 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
3409 binfo_for_vtable, copied_binfo, original_binfo): Likewise
3410 * tree.c (copy_base_binfos, make_binfo): Likewise.
3411 * typeck.c (commmon_base_type): Likewise
3412 * typeck2.c (process_init_constructor): Likewise
3413
3414 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
3415
3416 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
3417
3418 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3419
3420 PR c++/3671
3421 * pt.c (convert_nontype_argument): Disallow conversions between
3422 different enumeration types.
3423
3424 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
3425
3426 * cp-tree.h (BINFO_MARKED): Remove.
3427 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
3428 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
3429 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
3430 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
3431 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
3432 (mark_primary_bases, determine_primary_base, base_derived_from,
3433 dfs_find_final_overrider, dfs_find_final_overrider_q,
3434 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
3435 dfs_modify_vtables, walk_subobject_offsets,
3436 layout_nonempty_base_or_field, build_base_field,
3437 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
3438 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
3439 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
3440 build_ctor_vtbl_group, accumulate_vtble_inits,
3441 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
3442 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
3443 add_vcall_offset_vtbl_entries_1): Likewise.
3444 * decl.c (xref_basetypes): Incomming virtual base indicated by
3445 TREE_TYPE. Adjust.
3446 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
3447 * init.c (finish_init_stmts, sort_mem_initializers,
3448 emit_mem_initializers, build_vtble_address, expand_member_init,
3449 push_base_cleanups): Likewise.
3450 * method.c (do_build_copy_constructor): Likewise.
3451 * pt.c (instantiate_class_template,
3452 get_template_base_recursive): Likewise.
3453 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
3454 get_pseudo_ti_desc): Likewise.
3455 * search.c (lookup_base_r, dynamic_cast_base_recurse,
3456 binfo_from_vbase, binfo_via_virtual, copied_binfo,
3457 original_binfo): Likewise.
3458 * semantics.c (finish_base_specifier): Virtualness is indicated
3459 by TREE_TYPE.
3460 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
3461
3462 2004-07-06 Mark Mitchell <mark@codesourcery.com>
3463
3464 Revert:
3465 2004-06-24 Jason Merrill <jason@redhat.com>
3466 PR c++/16115
3467 * decl.c (grokparms): Give the PARM_DECL reference type if the
3468 parameter is passed by invisible reference.
3469
3470 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3471
3472 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
3473 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
3474 * pt.c (check_instantiated_args, unify): Likewise.
3475
3476 2004-07-05 Phil Edwards <phil@codesourcery.com>
3477
3478 * Make-lang.in (check-c++, lang_checks): Add some comments.
3479
3480 2004-07-05 Zack Weinberg <zack@codesourcery.com>
3481
3482 * cp-mudflap.c: Delete file.
3483 * Makefile.in: Remove all references to cp-mudflap.o.
3484
3485 2004-07-05 Zack Weinberg <zack@codesourcery.com>
3486
3487 * decl.c (cxx_init_decl_processing): Call
3488 build_common_tree_nodes before creating the global NAMESPACE_DECL.
3489
3490 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3491
3492 PR c++/2518
3493 * call.c (build_operator_new_call): Look only at global scope.
3494
3495 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
3496
3497 * call.c (enforce_access): Expect TREE_BINFO.
3498 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
3499 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
3500 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
3501 Adjust.
3502 (BINFO_LANG_ELTS): Remove.
3503 (BINFO_LANG_SLOTS): New.
3504 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
3505 (CLASSTYPE_TEMPLATE_INFO): Adjust.
3506 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
3507 * search.c (lookup_member): Check TREE_BINFO.
3508 * semantics.c (perform_or_defer_access_check): Likewise.
3509 (check_accessibility_of_qualified_id): Check
3510 deferred_access_no_check.
3511 * tree.c (make_binfo): Use make_tree_binfo.
3512
3513 2004-07-04 Mark Mitchell <mark@codesourcery.com>
3514
3515 * method.c (implicitly_declare_fn): Set linkage of generated
3516 functions.
3517
3518 2004-07-04 Richard Henderson <rth@redhat.com>
3519
3520 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
3521
3522 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
3523
3524 PR c++/3761
3525 * name-lookup.c (push_class_level_binding): Don't pass a
3526 TREE_LIST of ambiguous names to check_template_shadow as it
3527 only handles declarations. Instead, pull the declaration
3528 out and pass that.
3529
3530 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3531
3532 PR c++/14971
3533 * pt.c (check_explicit_specialization): Clarify error message.
3534
3535 2004-07-02 Richard Henderson <rth@redhat.com>
3536
3537 * tree.c (cp_unsave_r): Update remap_save_expr call.
3538
3539 2004-07-02 Mark Mitchell <mark@codesourcery.com>
3540
3541 PR c++/16240
3542 * mangle.c (write_template_arg): Correct mangling.
3543
3544 PR c++/16297
3545 * decl.c (grokdeclarator): Robustify.
3546
3547 2004-07-01 Richard Henderson <rth@redhat.com>
3548
3549 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
3550 * method.c (synthesize_method): Don't clear_last_expr.
3551 * name-lookup.c (maybe_push_cleanup_level): Likewise.
3552
3553 2004-07-01 Nick Clifton <nickc@redhat.com>
3554
3555 * decl2.c (import_export_class): Invoke the
3556 import_export_class field in the gcc_target structure if it is not
3557 empty.
3558
3559 2004-06-30 Richard Henderson (rth@redhat.com>
3560
3561 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
3562 * method.c (use_thunk): Likewise.
3563
3564 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
3565
3566 * call.c (build_over_call), typeck.c (build_function_call): Call
3567 check_function_arguments instead of check_function_format.
3568
3569 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
3570
3571 * call.c (build_over_call), typeck.c (build_function_call): Update
3572 calls to check_function_format.
3573
3574 2004-06-30 Richard Henderson <rth@redhat.com>
3575
3576 * call.c (build_over_call): Use __builtin_memcpy for copying
3577 CLASS_AS_BASE rather than funny casting.
3578
3579 2004-06-30 Richard Henderson <rth@redhat.com>
3580
3581 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
3582 TYPE_SIZE_UNIT of full_type.
3583
3584 2004-06-30 Per Bothner <per@bothner.com>
3585
3586 Conditionally compile support for --enable-mapped_location.
3587 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
3588 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
3589 adjustments - which I don't understand.
3590 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
3591 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
3592 (print_instantiation_partial_context): Use expand_location.
3593 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
3594 * name-lookup.c: Likewise.
3595 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
3596 * name-lookup.c: Use input_line macro.
3597 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
3598 (cp_parser_statement): Rename locaal variable statement_locus to
3599 statement_location and use SET_EXPR_LOCATION macro.
3600 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
3601 * tree.c (cp_walk_subtrees): Likewise.
3602
3603 2004-06-29 Per Bothner <per@bothner.com>
3604
3605 * tree.c (build_min_nt, build_min, build_min_non_dep):
3606 Don't set TREE_COMPLEXITY from input_line.
3607
3608 2004-06-29 Paul Brook <paul@codesourcery.com>
3609
3610 * init.c: Include target.h.
3611 (get_cookie_size): Remove and replace with target hook.
3612 Update callers.
3613 (build_new_1): Store the element size in the cookie.
3614
3615 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
3616
3617 PR c++/16260
3618 * parser.c (cp_parser_template_declaration_after_export): Disable
3619 access checks here ...
3620 (cp_parser_class_specifier): ... not here.
3621
3622 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
3623
3624 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
3625 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
3626 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
3627 TREE_CHECK macro.
3628
3629 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
3630
3631 * cp-tree.h (struct deferred_access): Move to ...
3632 * semantics.c (struct deferred_access): ... here. Adjust.
3633 (deferred_access_stack): Make a VEC(deferred_access),
3634 (deferred_access_free_list): Remove.
3635 (deferred_access_no_check): New.
3636 (push_deferring_access_checks, resume_deferring_access_checks,
3637 stop_deferring_access_checks, pop_deferring_access_checks,
3638 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
3639 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
3640
3641 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
3642
3643 PR c++/16174
3644 * call.c (build_temp): Declare.
3645 (check_constructor_callable): New.
3646 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
3647 CONSTRUCTOR_CALLABLE.
3648 (convert_like_real, initialize_reference): Use
3649 check_constructor_callable.
3650 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
3651 (LOOKUP_*): Renumber.
3652
3653 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
3654
3655 * friend.c (add_friend): Only perform access checks when context
3656 is a class.
3657 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
3658 * parser.c (cp_parser_class_specifier): Disable access checks here
3659 when parsing the body of a templated class.
3660 * semantics.c (perform_or_defer_access_checks): Reorder to allow
3661 NULL binfos when not checking access.
3662
3663 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
3664
3665 Use vector API for vbase list.
3666 * cp-tree.h: Include vec.h
3667 (DEF_VEC_P (tree)): New type.
3668 (struct lang_type_class): Change vbase's member type.
3669 (binfo_for_vbase): Declare.
3670 * class.c (determine_primary_base, base_derived_from,
3671 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
3672 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
3673 build_vtbl_initializer): Adjust.
3674 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
3675 vbases.
3676 * init.c (sort_mem_initializers, expand_member_init,
3677 push_base_cleanups): Adjust.
3678 * method.c (do_build_copy_constructor): Adjust.
3679 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
3680 (binfo_for_vbase): New.
3681 * tree.c (copy_base_binfos): Adjust.
3682
3683 2004-06-28 Mark Mitchell <mark@codesourcery.com>
3684
3685 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
3686
3687 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
3688
3689 PR c++/14123
3690 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
3691 paranthesis in case of pointers to array members.
3692 * error.c (dump_type_prefix): Likewise.
3693 (dump_type_suffix): Maybe issue a whitespace when printing
3694 ARRAY_TYPE.
3695
3696 2004-06-27 Mark Mitchell <mark@codesourcery.com>
3697
3698 PR c++/16193
3699 * parser.c (cp_parser_set_decl_spec_type): Refine test for
3700 redefinition of built-in types.
3701
3702 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
3703
3704 * error.c (pp_template_argument_list_start): Remove.
3705 (pp_template_argument_list_end): Likewise.
3706 (pp_separate_with_comma): Use pp_cxx_separate_with.
3707 (reinit_global_formatting_buffer): Remove.
3708 (pp_non_consecutive_character): Likewise.
3709 (dump_scope): Use pp_cxx_colon_colon.
3710 (dump_template_parameter): Use pp_cxx_identifier,
3711 pp_cxx_tree_identifier and pp_cxx_whitespace.
3712 (dump_templat_bindings): Replace use of pp_string with sequence
3713 of pp_cxx_whitespace and pp_equal.
3714 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
3715 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
3716 padding here.
3717 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
3718 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
3719 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
3720 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
3721 pp_cxx_right_bracket, pp_cxx_identifier throughout,
3722 (dump_decl): Likewise.
3723 (dump_template_decl): Likewise.
3724 (dump_function_decl): Likewise. Set padding as appropriate.
3725 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
3726 pp_cxx_right_paren.
3727 (dump_exception_spec): Likewise.
3728 (dump_function_name): Use pp_cxx_tree_identifier and
3729 pp_cxx_identifier.
3730 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
3731 pp_cxx_end_template_argument_list.
3732 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
3733 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
3734 pp_cxx_whitespace throughout.
3735 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
3736 pp_cxx_right_paren.
3737 (dump_unary_op): Likewise.
3738 (reinit_cxx_pp): New function.
3739 (type_as_string); Use it.
3740 (expr_as_string): Likewise.
3741 (decl_as_string); Likewise.
3742 (context_as_string): Likewise.
3743 (lang_decl_name): Likewise.
3744 (decl_to_string): Likewise.
3745 (expr_to_string): Likewise.
3746 (parm_to_string): Likewise.
3747 (type_to_string): Likewise.
3748 (args_to_string): Likewise.
3749 (cv_to_string): Likewise.
3750
3751 2004-06-26 Mark Mitchell <mark@codesourcery.com>
3752
3753 * cp-tree.h (cp_cv_quals): New type.
3754 (cp_declarator): Use it instead of "tree" as appropriate.
3755 (grok_method_quals): Adjust prototype.
3756 (grokclassfn): Likewise.
3757 (do_friend): Likewise.
3758 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
3759 (grokdeclarator): Likewise.
3760 * decl2.c (grok_method_quals): Likewise.
3761 (grokclassfn): Likewise.
3762 * friend.c (do_friend): Likewise.
3763 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
3764 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
3765 (make_pointer_declarator): Likewise.
3766 (make_reference_declarator): Likewise.
3767 (make_ptrmem_declarator): Likewise.
3768 (cp_parser_ptr_operator): Likewise.
3769 (cp_parser_cv_qualifier_seq_opt): Likewise.
3770 (cp_parser_cv_qualifier_opt): Remove.
3771 (cp_parser_new_declarator_opt): Adjust call to
3772 cp_parser_ptr_operator.
3773 (cp_parser_conversion_declaration_opt): Likewise.
3774 (cp_parser_declarator): Use cp_cv_quals, not tree.
3775 (cp_parser_direct_declarator): Likewise.
3776
3777 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3778
3779 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
3780 Rename DECL_STMT to DECL_EXPR.
3781 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
3782 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
3783 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
3784
3785 2004-06-26 Jan Hubicka <jh@suse.cz>
3786
3787 PR C++/14865
3788 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
3789 reachability analysis.
3790
3791 2004-06-25 Mark Mitchell <mark@codesourcery.com>
3792
3793 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
3794 2004-06-23 change.
3795
3796 2004-06-25 Paul Brook <paul@codesourcery.com>
3797
3798 * decl2.c (get_guard): Call targetm.cxx.guard_type.
3799 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
3800
3801 2004-06-24 Mark Mitchell <mark@codesourcery.com>
3802
3803 * decl.c (grokdeclarator): Restore error messages about __thread.
3804 * parser.c (cp_parser_decl_specifier_seq): Likewise.
3805
3806 2004-06-24 Jason Merrill <jason@redhat.com>
3807
3808 PR c++/16115
3809 * decl.c (grokparms): Give the PARM_DECL reference type if the
3810 parameter is passed by invisible reference.
3811
3812 2004-06-24 Andreas Schwab <schwab@suse.de>
3813
3814 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
3815
3816 2004-06-23 Mark Mitchell <mark@codesourcery.com>
3817
3818 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
3819 (cp/decl.o): Likewise.
3820 (cp/decl2.o): Likewise.
3821 (cp/pt.o): Likewise.
3822 (cp/semantics.o): Likewise.
3823 * config-lang.in (gtfiles): Do not reference cp/lex.h.
3824 * class.c: Do not include lex.h.
3825 (add_implicitly_declared_members): Do not use
3826 adding_implicit_members.
3827 (check_bases_and_members): Do not talk about grok_x_components.
3828 * cp/cp-tree.h (adding_implicit_members): Remove.
3829 (cp_storage_class): New type.
3830 (cp_decl_spec): Likewise.
3831 (cp_decl_specifier_seq): Likewise.
3832 (cp_parameter_declarator): Use it for the decl_specifiers field.
3833 (check_tag_decl): Adjust prototype.
3834 (shadow_tag): Likewise.
3835 (groktypename): Likewise.
3836 (start_decl): Likewise.
3837 (start_function): Likewise.
3838 (start_method): Likewise.
3839 (grok_x_components): Remove.
3840 (grokfield): Adjust prototype.
3841 (grokbitfield): Likewise.
3842 (finish_member_class_template): Remove.
3843 * decl.c: Do not include lex.h.
3844 (adding_implicit_members): Do not define.
3845 (check_tag_decl): Do not use trees to represent decl-specifiers.
3846 (shadow_tag): Likewise.
3847 (groktypename): Likewise.
3848 (start_decl): Likewise.
3849 (grokvardecl): Likewise.
3850 (grokdeclarator): Likewise.
3851 (grokparms): Likewise.
3852 (start_function): Likewise.
3853 (start_method): Likewise.
3854 * decl.h (grokdeclarator): Adjust prototype.
3855 * decl2.c: Do not include lex.h.
3856 (grok_x_components): Remove.
3857 (grokfield): Do not use trees to represent decl-specifiers.
3858 (grokbitfield): Likewise.
3859 * lex.c: Do not include lex.h.
3860 * lex.h: Remove.
3861 * parser.c: Include target.h.
3862 (clear_decl_specs): New function.
3863 (cp_parser_translation_unit): Do not use trees to represent
3864 decl-specifiers.
3865 (cp_parser_postfix_expression): Likewise.
3866 (cp_parser_new_type_id): Likewise.
3867 (cp_parser_condition): Likewise.
3868 (cp_parser_simple_declaration): Likewise.
3869 (cp_parser_decl_specifier_seq): Likewise.
3870 (cp_parser_function_specifier_opt): Likewise.
3871 (cp_parser_conversion_type_id): Likewise.
3872 (cp_parser_template_parameter): Likewise.
3873 (cp_parser_explicit_instantiation): Likewise.
3874 (cp_parser_type_specifier): Likewise.
3875 (cp_parser_simple_type_specifier): Likewise.
3876 (cp_parser_init_declarator): Likewise.
3877 (cp_parser_type_id): Likewise.
3878 (cp_parser_type_specifier_seq): Likewise.
3879 (cp_parser_parameter_declaration): Likewise.
3880 (cp_parser_member_declaration): Likewise.
3881 (cp_parser_exception_declaration): Likewise.
3882 (cp_parser_function_definition_from_specifiers_and_declarator):
3883 Likewise.
3884 (cp_parser_single_declaration): Likewise.
3885 (cp_parser_save_member_function_body): Likewise.
3886 (cp_parser_friend_p): Likewise.
3887 (cp_parser_set_storage_class): New function.
3888 (cp_parser_set_decl_spec_type): Likewise.
3889 * pt.c: Do not include lex.h.
3890 * semantics.c: Likewise.
3891 (finish_member_class_template): Remove.
3892
3893 2004-06-23 Roger Sayle <roger@eyesopen.com>
3894
3895 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
3896 longer take both "args" and "convert_args" as arguments.
3897 (build_op_delete_call): Update call to build_cxx_call.
3898 (build_over_call): Likewise, update call to build_cxx_call.
3899 * cp-tree.h (build_cxx_call): Update funtion prototype.
3900 * typeck.c (build_function_call): Don't call expand_tree_builtin.
3901 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
3902 (throw_bad_typeid): Likewise.
3903 (build_dynamic_cast_1): Likewise.
3904
3905 2004-06-22 Richard Henderson <rth@redhat.com>
3906
3907 * class.c (build_vfn_ref): Take a pointer not object. Build
3908 an OBJ_TYPE_REF.
3909 (cp_fold_obj_type_ref): New.
3910 * call.c (build_over_call): Update build_vfn_ref call.
3911 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
3912 * cp-tree.h (cp_fold_obj_type_ref): Declare.
3913
3914 2004-06-21 Jason Merrill <jason@redhat.com>
3915
3916 PR c++/16112
3917 * cp-gimplify.c (cp_gimplify_init_expr): Look through
3918 CLEANUP_POINT_EXPR.
3919
3920 2004-06-21 Mark Mitchell <mark@codesourcery.com>
3921
3922 * cp-tree.def (NEW_EXPR): Add a fourth slot.
3923 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
3924 (TREE_PARMLIST): Likewise.
3925 (CALL_DECLARATOR_PARMS): Likewise.
3926 (CALL_DECLARATOR_QUALS): Likewise.
3927 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
3928 (cp_declarator_kind): New type.
3929 (cp_parameter_declarator): Likewise.
3930 (cp_declarator): Likewise.
3931 (cp_error_declarator): Likewise.
3932 (no_parameters): Likewise.
3933 (groktypename): Change prototype.
3934 (start_decl): Likewise.
3935 (start_handler_parms): Likewise.
3936 (get_scope_of_declarator): Likewise.
3937 (start_function): Likewise.
3938 (start_preparsed_function): New function.
3939 (start_function): Change prototype.
3940 (start_method): Likewise.
3941 (grokfield): Likewise.
3942 (grokbitfield): Likewise.
3943 (build_new): Likewise.
3944 (make_pointer_declarator): Remove.
3945 (make_reference_declarator): Likewise.
3946 (make_call_declarator): Likewise.
3947 (set_quals_and_spec): Likewise.
3948 (process_template_parm): Change prototype.
3949 (begin_function_definition): Remove.
3950 (finish_parmlist): Remove.
3951 * decl.c (groktypename): Do not use trees to represent
3952 declarators.
3953 (start_decl): Likewise.
3954 (start_handler_parms): Remove.
3955 (get_scope_of_declarator): Reimplement.
3956 (grokdeclarator): Do not use trees to represent declarators.
3957 (grokparms): Likewise.
3958 (start_function): Likewise.
3959 (start_method): Likewise.
3960 (build_void_list_mode): Do not use TREE_PARMLIST.
3961 * decl.h (grokdeclarator): Change prototype.
3962 * decl2.c (grok_method_quals): Robustify.
3963 (grok_x_components): Do not use trees to represent declarators.
3964 (grokfield): Likewise.
3965 (grokbitfield): Likewise.
3966 (start_objects): Build FUNCTION_DECLs, not declarators.
3967 (start_static_storage_duration_function): Likewise.
3968 * init.c (build_new): Simplify.
3969 * lex.c (make_pointer_declarator): Remove.
3970 (make_reference_declarator): Likewise.
3971 (make_call_declarator): Likewise.
3972 (set_quals_and_spec): Likewise.
3973 * method.c (use_thunk): Use start_preparsed_function.
3974 (synthesize_method): Likewise.
3975 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
3976 * optimize.c (maybe_clone_body): Use start_preparsed_function.
3977 * parser.c (cp_error_declarator): New variable.
3978 (declarator_obstack): Likewise.
3979 (alloc_declarator): New function.
3980 (make_declarator): Likewise.
3981 (make_id_declarator): Likewise.
3982 (make_pointer_declarator): Likewise.
3983 (make_reference_declarator): Likewise.
3984 (make_ptrmem_declarator): Likewise.
3985 (make_call_declarator): Likewise.
3986 (make_array_declarator): Likewise.
3987 (no_parameters): New variable.
3988 (make_parameter_declarator): Likewise.
3989 (cp_parser_check_for_definition_in_return_type): Do not use trees
3990 to represent declarators.
3991 (cp_parser_translation_unit): Likewise.
3992 (cp_parser_new_expression): Likewise.
3993 (cp_parser_new_type_id): Likewise.
3994 (cp_parser_new_declarator_opt): Likewise.
3995 (cp_parser_direct_new_declarator): Likewise.
3996 (cp_parser_condition): Likewise.
3997 (cp_parser_declaration_statement): Likewise.
3998 (cp_parser_declaration): Likewise.
3999 (cp_parser_conversion_type_id): Likewise.
4000 (cp_parser_conversion_declarator_opt): Likewise.
4001 (cp_parser_template_parameter_list): Likewise.
4002 (cp_parser_template_parameter): Likewise.
4003 (cp_parser_explicit_instantiation): Likewise.
4004 (cp_parser_init_declarator): Likewise.
4005 (cp_parser_declarator): Likewise.
4006 (cp_parser_direct_declarator): Likewise.
4007 (cp_parser_type_id): Likewise.
4008 (cp_parser_parameter_declaration_clause): Likewise.
4009 (cp_parser_parameter_declaration_list): Likewise.
4010 (cp_parser_parameter_declaration): Likewise.
4011 (cp_parser_member_declaration): Likewise.
4012 (cp_parser_exception_declaration): Likewise.
4013 (cp_parser_check_declarator_template_parameters): Likewise.
4014 (cp_parser_function_definition_from_specifiers_and_declarator):
4015 Likewise.
4016 (cp_parser_save_member_function_body): Likewise.
4017 * pt.c (process_template_parm): Add is_non_type parameter.
4018 (convert_template_argument): Adjust call to groktypename.
4019 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
4020 (tsubst): Do not expect declarators.
4021 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
4022 argument.
4023 (instantiate_decl): Use start_preparsed_function.
4024 * semantics.c (begin_function_definition): Remove.
4025 (finish_parmlist): Remove.
4026 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
4027 declarators.
4028
4029 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4030
4031 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
4032 (build_new_method_call): Likewise.
4033 * decl.c (local_variable_p_walkfn): Don't walk into types.
4034 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
4035 (build_anon_union_vars): Add new operand for COMPONENT_REF.
4036 * init.c (buld_new): Add new operand for ARRAY_REF.
4037 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
4038 (do_build_assign_ref): Likewise.
4039 * parser.c (cp_parser_direct_new_declarator): Add new operands
4040 for ARRAY_REF.
4041 (cp_parser_direct_declarator): Likewise.
4042 * pt.c (tsubst): Likewise.
4043 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
4044 for COMPONENT_REF.
4045 * semantics.c (finish_non_static_data_member): Add new operand
4046 for COMPONENT_REF.
4047 * typeck.c (build_class_member_access_expr): Likewise.
4048 (build_class_member_access_expr, finish_class_member_access_expr):
4049 Likewise.
4050 (build_ptrmemfunc_access_expr): Likewise.
4051 (build_array_ref): Add new operands for ARRAY_REF.
4052 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
4053 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
4054
4055 2004-06-21 Richard Henderson <rth@redhat.com>
4056
4057 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
4058 * parser.c (cp_parser_jump_statement): Update commentary.
4059 * pt.c (tsubst_expr): Use RETURN_EXPR.
4060 * semantics.c (finish_return_stmt): Likewise.
4061 (finalize_nrv_r): Likewise.
4062 * typeck.c, typeck2.c: Update file start commentary.
4063
4064 2004-06-21 Richard Henderson <rth@redhat.com>
4065
4066 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
4067
4068 2004-06-20 Richard Henderson <rth@redhat.com>
4069
4070 * cp-tree.h (add_decl_stmt): Declare.
4071 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
4072 * semantics.c (maybe_cleanup_point_expr): New.
4073 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
4074 finish_for_expr, finish_switch_cond): Use it.
4075 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
4076
4077 2004-06-20 Richard Henderson <rth@redhat.com>
4078
4079 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
4080 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
4081 (cp_gimplify_expr): Call it.
4082 (gimplify_cleanup_stmt): Move from c-gimplify.c.
4083 (cp_genericize): New.
4084 * decl.c (finish_function): Call it.
4085 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
4086 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
4087 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
4088 (cp_genericize): Declare.
4089 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
4090 * dump.c (cp_dump_tree): Likewise.
4091 * semantics.c (push_cleanup): Move from c-semantics.c.
4092
4093 2004-06-20 Zack Weinberg <zack@codesourcery.com>
4094
4095 * cp-lang.c (has_c_linkage): Implement.
4096
4097 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
4098 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
4099 (builtin_function_1): Don't call make_decl_rtl.
4100 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
4101 (grokvardecl): Don't call mangle_decl.
4102 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
4103 DECL_ASSEMBLER_NAME.
4104 * method.c (set_mangled_name_for_decl): Delete.
4105 * name-lookup.c (pushdecl): When a local extern shadows a
4106 file-scope declaration of the same object, give both DECLs the
4107 same DECL_UID.
4108 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
4109 on DECL_ASSEMBLER_NAME.
4110
4111 2004-06-19 Richard Henderson <rth@redhat.com>
4112
4113 * cp-gimplify.c: Remove unnecessary prototypes.
4114 (cp_gimplify_stmt): Merge into ...
4115 (cp_gimplify_expr): ... here. Move to end of file. Handle
4116 stmts_are_full_exprs_p frobbing.
4117 * cp-tree.h (cp_gimplify_stmt): Remove.
4118 * pt.c (tsubst_expr): Merge prep_stmt and unify.
4119 * tree.c (init_tree): Don't set lang_gimplify_stmt.
4120
4121 2004-06-18 Richard Henderson <rth@redhat.com>
4122
4123 PR c++/16034
4124 * semantics.c (begin_cond): New.
4125 (finish_cond): Rewrite to handle template DECL_STMTs specially.
4126 Assume that non-template decls go land before the conditional.
4127 (simplify_loop_decl_cond): Likewise.
4128 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
4129 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
4130 begin_switch_stmt, finish_switch_cond): Update to match.
4131
4132 2004-06-17 Jason Merrill <jason@redhat.com>
4133
4134 PR c++/16015
4135 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
4136 (finish_stmt_expr_expr): Update type after conversions.
4137 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
4138 Handle void initializer.
4139 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
4140
4141 2004-06-17 Geoffrey Keating <geoffk@apple.com>
4142
4143 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
4144 * cp-tree.h (defer_fn): Delete.
4145 * decl2.c (defer_fn): Delete.
4146 (finish_file): Simplify deferred_fns loops; check that
4147 only used inline functions get into deferred_fns.
4148 (mark_used): Inline previous contents of defer_fn.
4149
4150 2004-06-16 Richard Henderson <rth@redhat.com>
4151
4152 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
4153 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
4154 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
4155 of CTOR_INITIALIZER ...
4156 (pp_cxx_statement): ... here.
4157 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
4158 (finish_function): Use alloc_stmt_list to zap entire function.
4159 * parser.c (cp_parser_compound_statement): Update commentary.
4160 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
4161 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
4162 (finish_stmt_expr): Don't look through COMPOUND_STMT.
4163
4164 2004-06-16 Geoffrey Keating <geoffk@apple.com>
4165
4166 * pt.c (mark_decl_instantiated): Don't call defer_fn.
4167
4168 2004-06-16 Richard Henderson <rth@redhat.com>
4169
4170 * parser.c (cp_parser_labeled_statement): Update commentary.
4171 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
4172 * tree.c (mark_local_for_remap_r): Likewise.
4173
4174 2004-06-16 Richard Henderson <rth@redhat.com>
4175
4176 * parser.c (cp_parser_asm_definition): Update commentary.
4177 * pt.c (tsubst_expr): Use ASM_EXPR.
4178 * semantics.c (finish_asm_stmt): Likewise.
4179
4180 2004-06-16 Richard Henderson <rth@redhat.com>
4181
4182 * decl.c (finish_destructor_body): Use LABEL_EXPR.
4183 * parser.c (cp_parser_statement): Update commentary.
4184 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
4185 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
4186 * tree.c (mark_local_for_remap_r): Likewise.
4187
4188 2004-06-16 Richard Henderson <rth@redhat.com>
4189
4190 PR c++/16012
4191 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
4192 statement in FOR_INIT_STMT for templates.
4193
4194 2004-06-15 Richard Henderson <rth@redhat.com>
4195
4196 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
4197 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
4198 (genericize_try_block): Use gimplify_stmt.
4199 (genericize_catch_block, genericize_eh_spec_block): Likewise.
4200 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
4201 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
4202 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
4203 (cp_tree_chain_matters_p): Remove.
4204 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
4205 (COMPOUND_STMT_BODY_BLOCK): New.
4206 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
4207 (EXPR_STMT_STMT_EXPR_RESULT): New.
4208 (building_stmt_tree): Check cur_stmt_list.
4209 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
4210 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
4211 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
4212 (cp_finish_decl): Use push_cleanup.
4213 (start_function, finish_function): Use statement lists.
4214 (finish_stmt): Do nothing.
4215 * except.c (begin_eh_spec_block): Use statement lists.
4216 (check_handlers_1, check_handlers): Likewise.
4217 * init.c (construct_virtual_base): Don't add extra compound stmts.
4218 (build_vec_init): Likewise.
4219 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
4220 * name-lookup.h (struct cp_binding_level): Add statement_list.
4221 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
4222 (cp_parser_labeled_statement, cp_parser_expression_statement,
4223 cp_parser_statement_seq_opt): Likewise.
4224 (cp_parser_compound_statement): Likewise. Take bool for try block.
4225 (cp_parser_selection_statement): Tidy if processing.
4226 (cp_parser_already_scoped_statement): Rewrite to do what it says.
4227 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
4228 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
4229 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
4230 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
4231 (finish_cond): New, rewritten from FINISH_COND.
4232 (simplify_loop_decl_cond): New.
4233 (finish_expr_stmt): Avoid nested EXPR_STMTs.
4234 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
4235 begin_else_clause, finish_else_clause, finish_if_stmt,
4236 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
4237 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
4238 finish_for_cond, finish_for_stmt, begin_switch_stmt,
4239 finish_switch_cond, finish_switch_stmt, begin_try_block,
4240 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
4241 finish_handler_sequence, finish_function_handler_sequence,
4242 begin_handler, finish_handler_parms, finish_handler,
4243 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
4244 using statement lists.
4245 (begin_compound_stmt): Replace has_no_scope argument with flags.
4246 Update all callers. Use statement lists.
4247 (finish_compound_stmt): Likewise.
4248 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
4249 (current_scope_stmt_stack): Remove.
4250 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
4251 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
4252 Rewrite with statement lists.
4253
4254 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
4255
4256 * parser.c: Change all assignments of c_lex_string_translate
4257 to true and false to 1 and 0.
4258 (cp_lexer_read_token): Convert type of the translated string.
4259 (cp_parser_skip_to_closing_parentheses): Preserve original
4260 value of c_lex_string_translate, and set it to -1 while
4261 running.
4262 (cp_parser_cache_group): Likewise.
4263 (cp_parser_cache_group_1): Renamed.
4264 (cp_parser_asm_operand_list): Remove redundant setting of
4265 c_lex_string_translate.
4266 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
4267 Handle chained strings.
4268
4269 2004-06-12 Andrew Pinski <apinski@apple.com>
4270
4271 PR c++/14639
4272 Revert:
4273 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
4274
4275 * cp-tree.h: Fix typo.
4276
4277 * cp-tree.h: Include cgraph.h
4278 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
4279 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
4280
4281 2004-06-12 Jason Merrill <jason@redhat.com>
4282
4283 PR tree-optimization/14107
4284 * decl.c (finish_function): Warn about no return in all functions.
4285
4286 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
4287
4288 * cp-tree.h (struct language_function): Remove cannot_inline.
4289 * decl.c (save_function_data): cannot_inline is no more.
4290 (cxx_push_function_context): Likewise.
4291 * decl2.c (start_objects, start_static_storage_duration_function):
4292 Reset DECL_INLINE, set DECL_UNINLINABLE.
4293
4294 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4295
4296 PR c++/15967
4297 * search.c (lookup_field): Propagate the ambiguity list.
4298 (lookup_fnfields): Likewise.
4299
4300 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4301
4302 PR c++/15947
4303 * parser.c (cp_parser_template_name): Ctors/dtors never need a
4304 template keyword to disambiguate.
4305
4306 2004-06-14 Mark Mitchell <mark@codesourcery.com>
4307
4308 PR c++/15096
4309 * decl.c (grokdeclarator): Ignore pointer-to-members when
4310 computing template depth.
4311
4312 PR c++/14930
4313 * name-lookup.c (pushtag): Do not try to put class declarations in
4314 explicit specialization scopes.
4315
4316 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
4317
4318 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
4319
4320 2004-06-11 Mark Mitchell <mark@codesourcery.com>
4321
4322 PR c++/15862
4323 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
4324 bindings for undeclared built-ins.
4325
4326 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4327
4328 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
4329 appear at the correct location.
4330
4331 2004-06-10 Jason Merrill <jason@redhat.com>
4332
4333 PR c++/15875
4334 Revert:
4335 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4336 * init.c (build_offset_ref): Build SCOPE_REF with non-null
4337 TREE_TYPE for non-dependent names.
4338 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
4339 unknown_type_node as its TREE_TYPE.
4340 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
4341 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
4342 (dump_expr) <SCOPE_REF case>: Likewise.
4343
4344 2004-06-10 Mark Mitchell <mark@codesourcery.com>
4345
4346 PR c++/15227
4347 * parser.c (cp_parser_direct_declarator): Robustify.
4348
4349 PR c++/15877
4350 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
4351 constants in non-dependent contexts.
4352
4353 PR c++/14211
4354 PR c++/15076
4355 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
4356 necessary.
4357
4358 2004-06-10 Jakub Jelinek <jakub@redhat.com>
4359
4360 PR c++/14791
4361 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
4362 specially.
4363
4364 2004-06-09 Mark Mitchell <mark@codesourcery.com>
4365
4366 Revert:
4367 PR c++/15815
4368 2004-06-07 Mark Mitchell <mark@codesourcery.com>
4369 * lex.c (handle_pragma_interface): Deprecate.
4370 (handle_pragma_implementation): Likewise.
4371
4372 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
4373
4374 * g++spec.c (lang_specific_driver): Remove check for -lm
4375 and -lmath when check it see if it was the math library.
4376
4377 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4378
4379 PR c++/7841
4380 * parser.c (cp_parser_direct_declarator): Reject constructor named
4381 as qualified template-id.
4382
4383 2004-06-07 Mark Mitchell <mark@codesourcery.com>
4384
4385 PR c++/15815
4386 * lex.c (handle_pragma_interface): Deprecate.
4387 (handle_pragma_implementation): Likewise.
4388
4389 2004-06-07 Mark Mitchell <mark@codesourcery.com>
4390
4391 PR c++/15766
4392 * parser.c (cp_parser_iteration_statement): Fix typo in error
4393 message.
4394
4395 PR c++/14777
4396 * pt.c (tsubst_default_argument): Do not defer access checks
4397 while substituting into the default argument.
4398
4399 PR c++/15554
4400 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
4401 constant in a non-dependent context.
4402
4403 PR c++/15057
4404 * except.c (build_throw): Ensure that temp_expr has been
4405 initialized.
4406
4407 2004-06-06 Roger Sayle <roger@eyesopen.com>
4408
4409 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
4410
4411 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4412
4413 PR c++/15503
4414 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
4415 'typename', and accept 'template'.
4416
4417 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
4418 Jan Hubicka <jh@suse.cz>
4419
4420 PR c++/14639
4421 * method.c (use_think): Do not mark thunk as referenced.
4422
4423 2004-06-03 Matt Austern <austern@apple.com>
4424
4425 PR c++/15428
4426 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
4427 is nonzero, and if we see a noninline definition of a key method,
4428 make the vtables nonweak.
4429
4430 2004-06-02 Matt Austern <austern@apple.com>
4431
4432 * cp-tree.h (instantiate_decl): new boolean parameter,
4433 undefined_ok. Current behavior is equivalent to its being 0.
4434 * decl2.c (mark_used): Add new argument when calling instantiate_decl
4435 * pt.c (mark_decl_instantiated): Unconditionally make
4436 instantiations explicit unconditionally
4437 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
4438 since mark_decl_instantiated now does it.
4439 (instantiate_class_member): New. Instantiate a member of an
4440 explicitly instantiated class template.
4441 (do_type_instantiation): Explicitly instantiate members of an
4442 explicitly instantiated class template.
4443 (instantiate_decl): if undefined_ok is nonzero, and if we're
4444 trying to explicitly instantiated a template with no definition,
4445 change it to an implicit instantiation.
4446 (instantiate_pending_templates): Add new argument to instantiate_decl.
4447 * tree.c (cp_cannot_inline_tree_fn): Likewise.
4448
4449 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
4450
4451 * cp-tree.h: Fix typo.
4452
4453 * cp-tree.h: Include cgraph.h
4454 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
4455 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
4456
4457 2004-06-01 Jason Merrill <jason@redhat.com>
4458
4459 PR c++/15142
4460 * call.c (call_builtin_trap): Remove type parm.
4461 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
4462 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
4463
4464 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4465
4466 PR c++/13092
4467 * init.c (build_offset_ref): Build SCOPE_REF with non-null
4468 TREE_TYPE for non-dependent names.
4469 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
4470 unknown_type_node as its TREE_TYPE.
4471 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
4472 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
4473 (dump_expr) <SCOPE_REF case>: Likewise.
4474
4475 2004-06-01 Richard Henderson <rth@redhat.com>
4476 Andrew Pinski <pinskia@physics.uc.edu>
4477
4478 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
4479 * parser.c (struct cp_parser): Remove in_offsetof.
4480 (cp_parser_new): Don't set it.
4481 (cp_parser_unary_expression): Don't check it.
4482 (cp_parser_postfix_open_square_expression): Split out from ...
4483 (cp_parser_postfix_expression): ... here.
4484 (cp_parser_postfix_dot_deref_expression): Likewise.
4485 (cp_parser_builtin_offsetof): New.
4486 (cp_parser_primary_expression): Use it.
4487
4488 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4489
4490 PR c++/14932
4491 * parser.c (cp_parser_postfix_expression): Allow subscript
4492 operator in offsetof.
4493
4494 2004-05-31 Mark Mitchell <mark@codesourcery.com>
4495
4496 PR c++/15701
4497 * friend.c (add_friend): Do not try to perform access checks for
4498 functions from dependent classes.
4499
4500 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
4501
4502 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
4503 (pp_cxx_begin_template_argument_list): Turn into a function.
4504 (pp_cxx_end_template_argument_list): Likewise.
4505 (pp_cxx_separate_with): Define.
4506 (pp_cxx_unqualified_id): Tidy.
4507 (pp_cxx_primary_expression): Likewise.
4508 (pp_cxx_postfix_expression): Likewise.
4509 (pp_cxx_expression): Likewise.
4510 (pp_cxx_simple_type_specifier): Likewise.
4511 (pp_cxx_type_specifier_seq): Likewise.
4512 (pp_cxx_parameter_declaration_clause): Likewise.
4513 (pp_cxx_exception_specification): Likewise.
4514 (pp_cxx_direct_declarator): Likewise.
4515 (pp_cxx_type_id): Likewise.
4516 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
4517 cxx-pretty-print.c.
4518 (pp_cxx_left_paren): Likewise.
4519 (pp_cxx_right_paren): Likewise.
4520 (pp_cxx_left_brace): Likewise.
4521 (pp_cxx_right_brace): Likewise.
4522 (pp_cxx_left_bracket): Likewise.
4523 (pp_cxx_right_bracket): Likewise.
4524 (pp_cxx_dot): Likewise.
4525 (pp_cxx_identifier): Likewise.
4526 (pp_cxx_tree_identifier): Likewise.
4527 (pp_cxx_ampersand): New macro.
4528 (pp_cxx_star): Likewise.
4529 (pp_cxx_arrow): Likewise.
4530 (pp_cxx_semicolon): Likewise.
4531 (pp_cxx_complement): Likewise.
4532 (pp_cxx_begin_template_argument_list): Declaree.
4533 (pp_cxx_end_template_argument_list): Likewise.
4534 (pp_cxx_colon_colon): likewise.
4535
4536 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
4537
4538 * parser.c (cp_parser_simple_type_specifier): Explicitly test
4539 against NULL_TREE.
4540
4541 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
4542
4543 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
4544 typeck.c: Fix comment formatting.
4545
4546 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
4547
4548 * cp-lang.c (cp_expand_decl): Remove.
4549 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
4550
4551 2004-05-30 Andreas Jaeger <aj@suse.de>
4552
4553 * lang-specs.h: Add missing initializers for .ii.
4554
4555 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
4556
4557 * decl.c (cp_make_fname_decl): Free return value from
4558 fname_as_string.
4559
4560 2004-05-28 Mark Mitchell <mark@codesourcery.com>
4561
4562 PR c++/15083
4563 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
4564 even in a templat.e
4565 * init.c (build_new): Likewise.
4566
4567 PR c++/15640
4568 * name-lookup.c (arg_assoc): Robustify.
4569
4570 PR c++/15471
4571 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
4572 when determining the scope to use for a pointer to member.
4573 (lookup_anon_field): Give it external linkage.
4574 * cp-tree.h (lookup_anon_field): Declare it.
4575 * expr.c (cplus_expand_constant): Use it.
4576
4577 2004-05-28 Mark Mitchell <mark@codesourcery.com>
4578
4579 PR c++/14668
4580 * parser.c (cp_parser_simple_type_specifier): Call
4581 maybe_note_name_used_in_class.
4582
4583 2004-05-28 Tom Marshall <tmarshall@real.com>
4584
4585 PR c++/15214
4586 * class.c (finish_struct_1): Warn only if the dtor is non-private or
4587 the class has friends.
4588
4589 2004-05-27 Adam Nemet <anemet@lnxw.com>
4590
4591 PR c++/12883
4592 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
4593 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
4594
4595 2004-05-24 Geoffrey Keating <geoffk@apple.com>
4596
4597 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
4598 if it might be needed.
4599 * pt.c (mark_decl_instantiated): Only call defer_fn if
4600 the function actually needs processing in finish_file.
4601 * decl2.c (finish_file): Add check that elements in
4602 deferred_fns_used are really needed there. Remove unnecessary
4603 test of DECL_SAVED_TREE.
4604
4605 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
4606
4607 * Make-lang.in: No need to specify $(LIBCPP).
4608
4609 2004-05-23 Mark Mitchell <mark@codesourcery.com>
4610
4611 PR c++/15044
4612 * parser.c (cp_parser_class_head): Robustify.
4613
4614 PR c++/15317
4615 * parser.c (cp_parser_decl_specifier_seq): Correct error in
4616 comment.
4617 (cp_parser_constructor_declarator_p): Treat attributes
4618 as decl-specifiers.
4619
4620 PR c++/15329
4621 * typeck.c (build_unary_op): Do not attempt to resolve casts to
4622 base classes in templates.
4623
4624 2004-05-23 Mark Mitchell <mark@codesourcery.com>
4625
4626 PR c++/15165
4627 * pt.c (instantiate_template): Robustify.
4628
4629 2004-05-23 Mark Mitchell <mark@codesourcery.com>
4630
4631 PR c++/15025
4632 * decl.c (xref_tag): Issue errors about redeclaring template
4633 classes as non-template classes.
4634
4635 2004-05-23 Mark Mitchell <mark@codesourcery.com>
4636
4637 PR c++/14821
4638 * name-lookup.c (supplement_binding): Allow redefinitions of
4639 namespace aliases.
4640
4641 PR c++/14883
4642 * parser.c (cp_parser_template_argument): Robustify.
4643
4644 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4645
4646 * class.c (alter_access): Use %E format specifier to print an
4647 identifier node. Avoid looking at the IDENTIFIER_POINTER.
4648 (push_lang_context): Likewise.
4649 * decl.c (lookup_label): Likewise.
4650 (grokdeclarator): Likewise.
4651 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
4652 * pt.c (do_type_instantiation): Likewise.
4653 * tree.c (handle_java_interface_attribute): Likewise.
4654 (handle_com_interface_attribute): Likewise.
4655 (handle_init_priority_attribute): Likewise.
4656
4657 2004-05-22 Mark Mitchell <mark@codesourcery.com>
4658
4659 PR c++/15285
4660 PR c++/15299
4661 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
4662 recognized as overloaded functions.
4663
4664 2004-05-22 Mark Mitchell <mark@codesourcery.com>
4665
4666 PR c++/15507
4667 * class.c (layout_nonempty_base_or_field): Do not try to avoid
4668 layout conflicts for unions.
4669
4670 PR c++/15542
4671 * typeck.c (build_x_unary_op): Instantiate template class
4672 specializations before looking for "operator &".
4673
4674 PR c++/15427
4675 * typeck.c (complete_type): Layout non-dependent array types, even
4676 in templates.
4677
4678 PR c++/15287
4679 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
4680 template.
4681
4682 2004-05-22 Roger Sayle <roger@eyesopen.com>
4683
4684 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
4685 returning when TREE_TYPE is error_mark_node.
4686 * typeck.c (require_complete_type): Return error_mark_node if
4687 value's type is an error_mark_node.
4688
4689 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
4690
4691 * optimize.c (calls_setjmp_r): Remove.
4692 (calls_setjmp_p): Remove.
4693 * cp-tree.c (calls_setjmp_p): Remove.
4694 * decl.c (finish_function): Do not call calls_setjmp_p.
4695
4696 2004-05-18 Zack Weinberg <zack@codesourcery.com>
4697
4698 * decl.c (cp_finish_decl): Use mark_decl_referenced.
4699 * decl2.c (maybe_make_one_only): Likewise.
4700 * method.c (use_thunk): Likewise.
4701
4702 2004-05-18 Jason Merrill <jason@redhat.com>
4703
4704 * class.c (build_base_path): Tidy a bit.
4705
4706 2004-05-14 Geoffrey Keating <geoffk@apple.com>
4707
4708 * name-lookup.c (struct scope_binding): New.
4709 (EMPTY_SCOPE_BINDING): New.
4710 (lookup_using_namespace): Take a scope_binding instead of a
4711 cxx_binding.
4712 (qualified_lookup_using_namespace): Likewise.
4713 (cxx_binding_clear): Delete.
4714 (do_nonmember_using_decl): Use a scope_binding instead of a
4715 cxx_binding.
4716 (lookup_tag): Don't call select_decl.
4717 (ambiguous_decl): Don't return anything (and change callers to match).
4718 Take a scope_binding as the second parameter.
4719 (lookup_namespace_name): Use a scope_binding instead of a
4720 cxx_binding.
4721 (unqualified_namespace_lookup): Likewise.
4722 (lookup_qualified_name): Likewise.
4723 (select_decl): Take a scope_binding instead of a cxx_binding.
4724 Use macros rather than hand-coding tests for type-ness.
4725
4726 2004-05-13 Diego Novillo <dnovillo@redhat.com>
4727
4728 * cp-gimplify.c: Rename from cp-simplify.c.
4729 * Make-lang.in, optimize.c: Update.
4730
4731 2004-05-13 Diego Novillo <dnovillo@redhat.com>
4732
4733 Merge from tree-ssa-20020619-branch. See
4734 ChangeLog.tree-ssa for details.
4735
4736 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
4737 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
4738 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
4739 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
4740 Merged.
4741 * cp-mudflap.c: New file.
4742 * cp-simplify.c:: New file.
4743
4744 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4745
4746 PR c++/14389
4747 * decl2.c (check_classfn): For member templates, compare also the
4748 template parameters to match the declaration.
4749 * cp-tree.h: Adjust declaration of check_classfn.
4750 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
4751 * friend.c (do_friend): Likewise.
4752 * pt.c (tsubst_friend_function): Likewise.
4753
4754 2004-05-01 Zack Weinberg <zack@codesourcery.com>
4755
4756 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
4757 Instead, dig into the representation type to find the array bound.
4758
4759 2004-04-30 Jason Merrill <jason@redhat.com>
4760
4761 Refer to base members using COMPONENT_REFs where possible.
4762 * class.c (build_simple_base_path): New fn.
4763 (build_base_path): Use it for non-virtual base references.
4764 (layout_class_type): Change base fields to their real type
4765 after layout is done.
4766 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
4767 * cp-lang.c (cxx_get_alias_set): Use it.
4768
4769 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
4770
4771 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
4772 comment typos.
4773
4774 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4775
4776 PR c++/15064
4777 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
4778 used in integral constant expressions.
4779
4780 2004-04-22 Mark Mitchell <mark@codesourcery.com>
4781
4782 * init.c (build_aggr_init): Fix accidental use of C99 construct in
4783 previous change.
4784
4785 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
4786 braced initializer.
4787 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
4788 * decl.c (reshape_init): Use it.
4789 * init.c (perform_member_init): Remove redundant condition.
4790 (build_aggr_init): Adjust to handle brace-enclosed initializers
4791 correctly.
4792 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
4793
4794 * parser.c (cp_parser_initializer_clause): Do not set
4795 TREE_HAS_CONSTRUCTOR on the initializer.
4796 * rtti.c (tinfo_base_init): Likewise.
4797 (generic_initializer): Likewise.
4798 (ptr_initializer): Likewise.
4799 (ptm_initializer): Likewise.
4800 (class_initializer): Likewise.
4801 (get_pseudo_ti_init): Likewise.
4802 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
4803
4804 2004-04-22 Alan Modra <amodra@bigpond.net.au>
4805
4806 * name-lookup.c (anonymous_namespace_name): Make static.
4807
4808 2004-04-19 Roger Sayle <roger@eyesopen.com>
4809
4810 PR middle-end/14531
4811 * class.c (build_base_path): Call fold whilst building the NULL
4812 pointer check expression trees.
4813
4814 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
4815
4816 * init.c (build_new_1): Don't use type size argument for Java
4817 _Jv_AllocObject call.
4818
4819 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
4820
4821 * method.c (make_alias_for_thunk): Remove preprocessor guard on
4822 declaration and definition.
4823
4824 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
4825
4826 PR c++/14808
4827 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
4828 than ASM_OUTPUT_DEF.
4829
4830 2004-04-08 Jakub Jelinek <jakub@redhat.com>
4831
4832 * decl2.c (mark_used): Don't segfault if cfun != NULL but
4833 current_function_decl == NULL.
4834
4835 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
4836
4837 PR c++/3518
4838 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
4839 level.
4840
4841 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4842
4843 * init.c (decl_constant_value): Don't look at DECL_INITIAL
4844 of PARM_DECL.
4845 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
4846 or TREE_SIDE_EFFECTS of a type.
4847
4848 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
4849
4850 PR c++/14007
4851 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
4852 cv-qualifier unification.
4853 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
4854
4855 2004-04-02 Jan Hubicka <jh@suse.cz>
4856
4857 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
4858 * cp-tree.h (cp_update_decl_after_saving): Declare.
4859 * tree.c (cp_update_decl_after_saving): Define.
4860
4861 2004-04-01 Mark Mitchell <mark@codesourcery.com>
4862
4863 PR c++/14803
4864 * typeck.c (get_delta_difference): Call fold before returning the
4865 value.
4866
4867 2004-04-01 Richard Henderson <rth@redhat.com>
4868
4869 PR c++/14804
4870 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
4871 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
4872
4873 2004-04-01 Mark Mitchell <mark@codesourcery.com>
4874
4875 PR c++/14810
4876 * name-lookup.c (maybe_push_cleanup_level): Robustify.
4877
4878 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4879
4880 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
4881
4882 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4883
4884 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
4885 * class.c (check_bitfield_decl): Likewise.
4886 * cvt.c (type_promotes_to): Likewise.
4887 * decl.c (finish_enum): Likewise.
4888 * mangle.c (write_builtin_type): Likewise.
4889 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
4890 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
4891 (build_binary_op): Likewise.
4892
4893 2004-03-31 Jan Hubicka <jh@suse.cz>
4894
4895 * tree.h (optimize_function): Kill prototype.
4896 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
4897 * semantics.c (expand_body): Kill.
4898
4899 2004-03-30 Mark Mitchell <mark@codesourcery.com>
4900
4901 PR c++/14724
4902 * decl.c (start_decl_1): Do not decide whether or not to create a
4903 new cleanup level until after the type has been completed.
4904
4905 PR c++/14763
4906 * pt.c (tsubst_default_argument): Clear current_function_decl.
4907
4908 2004-03-30 Zack Weinberg <zack@codesourcery.com>
4909
4910 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
4911
4912 2004-03-29 Zack Weinberg <zack@codesourcery.com>
4913
4914 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
4915 is null, just print the literal name and return.
4916
4917 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
4918
4919 * cxx-pretty-print.c: Fix comment typos.
4920
4921 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
4922
4923 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
4924 Update copyright.
4925
4926 2004-03-23 Ziemowit Laski <zlaski@apple.com>
4927
4928 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
4929 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
4930 target hook.
4931
4932 2004-03-23 Zack Weinberg <zack@codesourcery.com>
4933
4934 PR 12267, 12391, 12560, 13129, 14114, 14133
4935 * cp-lang.c (c_reset_state): Delete.
4936 (push_file_scope, pop_file_scope): New stubs.
4937 * parser.c (c_parse_file): Call sorry() here if called more than once.
4938
4939 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4940
4941 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
4942 for INTEGER_CST.
4943
4944 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4945
4946 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
4947
4948 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
4949
4950 * error.c (enum pad): Remove.
4951 (dump_qualifiers): Likewise.
4952 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
4953 (dump_aggr_type): Likewise.
4954 (dump_type_suffix): Likewise.
4955 (dump_simple_decl): Likewise.
4956 (dump_function_decl): Likewise.
4957 (cv_to_string): Likewise.
4958 (dump_type_prefix): Likewise. Adjust return void.
4959 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
4960 cxx_pretty_print.h.
4961 (pp_cxx_template_keyword_if_needed): Document.
4962 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
4963 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
4964 MUST_NOT_THROW_EXPR.
4965
4966 2004-03-21 Mark Mitchell <mark@codesourcery.com>
4967
4968 PR c++/14616
4969 * decl.c (cp_finish_decl): Compute the size of arrays declared in
4970 templates, if their type is non-dependent.
4971
4972 2004-03-19 Mark Mitchell <mark@codesourcery.com>
4973
4974 * call.c (build_op_delete_call): Do not forget the placement
4975 arguments when iterating through mutiple delete operators.
4976
4977 * cp-tree.h (svaed_scope): Remove last_parms.
4978 (NEW_DELETE_OPNAME_P): New macro.
4979 (last_function_parms): Remove.
4980 (do_friend): Adjust prototype.
4981 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
4982 using last_function_parms.
4983 (grokfndecl): Take the PARM_DECLs as an argument, rather than
4984 using last_function_parms.
4985 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
4986 for class-specific operator new and operator delete.
4987 (grok_op_properties): Do not look for allocation functions with
4988 METHOD_TYPEs.
4989 (start_function): Use DECL_ARGUMENTS instead of
4990 last_function_parms.
4991 * decl.h (last_function_parms): Do not declare.
4992 * decl2.c (grokclassfn): Do not use last_function_parms.
4993 * friend.c (do_friend): Remove parmdecls parameter.
4994 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
4995 (pop_from_top_level): Do not restore it.
4996 * pt.c (check_explicit_specialization): Do not adjust
4997 last_function_parms.
4998
4999 * name-lookup.c (do_local_using_decl): Create a local binding for
5000 types brought in via using declarations.
5001
5002 * name-lookup.c (lookup_arg_dependent): Handle block-scope
5003 function declarations correctly.
5004
5005 * semantics.c (finish_id_expression): Correct handling of
5006 conversion operators to dependent types.
5007
5008 * typeck.c (lookup_destructor): Allow the use of destructors from
5009 base classes.
5010
5011 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5012
5013 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
5014 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
5015 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
5016 the field is named TEMPLATE_TYPE_PARM_INDEX.
5017
5018 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5019
5020 PR c++/14545
5021 * parser.c (cp_parser_functional_cast): A cast to anything
5022 but integral or enumaration type is not an integral constant
5023 expression.
5024 * pt.c (value_dependent_expression_p): Handle cast expressions
5025 without operands (such as "int()").
5026
5027 2004-03-18 Mark Mitchell <mark@codesourcery.com>
5028
5029 * semantics.c (finish_pseudo_destructor_expr): Allow differing
5030 cv-qualification between the type named by the
5031 pseudo-destructor-name and the object-type.
5032
5033 * search.c (accessible_base_p): Handle non-proper bases.
5034
5035 * name-lookup.c (do_nonmember_using_decl): If a using declaration
5036 refers to a single overloaded function, set the type of the
5037 function.
5038 * tree.c (lvalue_type): Simplify.
5039 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
5040 unknown type.
5041 (build_unary_op): Handle OVERLOADs with known types.
5042
5043 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
5044 function templates.
5045
5046 * parser.c (cp_parser_postfix_expression): Handle the use of
5047 "typename" in non-dependent contexts. Convert appropriately when
5048 when using a qualified name after "->" or ".".
5049
5050 * call.c (conditional_conversion): Honor the requirement that some
5051 conversions refer to the original object.
5052
5053 2004-03-18 Mark Mitchell <mark@codesourcery.com>
5054
5055 * call.c (build_conditional_expr): Do not call force_rvalue for
5056 operands of void_type when the conditional expression itself has
5057 void type.
5058 * name-lookup.c (pushdecl): Don't consider a declaration of a
5059 function named "main" to be an overload of a type named "main".
5060 * parser.c (cp_parser_template_name): Perform name lookup when the
5061 template name is proceeded by "template" if the qualifying scope
5062 is non-dependent.
5063 * typeck.c (composite_pointer_type_r): Correctly handle
5064 pointer-to-member types.
5065 (build_const_cast): Likewise.
5066
5067 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5068
5069 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
5070 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
5071 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
5072 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
5073 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
5074 (TYPEOF_TYPE_EXPR): New macro.
5075 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
5076 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
5077 * pt.c (tsubst): Likewise.
5078 * semantics.c (finish_typeof): Likewise.
5079 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
5080 and TEMPLATE_TYPE_PARM.
5081 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
5082 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
5083
5084 2004-03-16 Mark Mitchell <mark@codesourcery.com>
5085
5086 PR c++/14586
5087 * cp-tree.h (build_new_op): Change prototype.
5088 (build_x_binary_op): Likewise.
5089 * call.c (build_new_op): Add overloaded_p parameter.
5090 * decl2.c (grok_array_decl): Adjust call to build_new_op.
5091 * parser.c (cp_parser_binary_expression): Note that uses of
5092 overloaded operators prevents an expression from being considered
5093 an integral constant.
5094 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
5095 build_x_binary_op.
5096 * semantics.c (finish_call_expr): Likewise.
5097 * typeck.c (rationalize_conditional_expr): Likewise.
5098 (build_x_indirect_ref): Likewise.
5099 (build_x_binary_op): Likewise.
5100 (build_x_unary_op): Likewise.
5101 (build_x_compound_expr): Likewise.
5102 (build_modify_expr): Likewise.
5103 * typeck2.c (build_x_arrow): Likewise.
5104
5105 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
5106
5107 * cp-lang.c, ptree.c: Update copyright.
5108
5109 2004-03-13 Mark Mitchell <mark@codesourcery.com>
5110
5111 PR c++/14550
5112 * parser.c (cp_parser_non_integral_constant_expression): Encode
5113 more of the idiom that surrounded calls to this function within
5114 the function itself
5115 (cp_parser_primary_expression): Adjust accordingly.
5116 (cp_parser_postfix_expression): Likewise.
5117 (cp_parser_unary_expression): Likewise.
5118 (cp_parser_cast_expression): Likewise.
5119 (cp_parser_assignment_expression): Likewise.
5120 (cp_parser_expression): Likewise.
5121 (cp_parser_new_expression): Note that new-expressions are not
5122 allowed in integral constant expressions.
5123 (cp_parser_delete_expression): Likewise.
5124
5125 2004-03-12 Matt Austern <austern@apple.com>
5126
5127 * decl2.c (maybe_make_one_only): Look at
5128 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
5129 to make an explicit instantiation weak.
5130 * method.c (use_thunk): Make sure we call comdat_linkage
5131 when appropriate.
5132 * pt.c (do_type_instantiation): On systems where weak symbols
5133 don't go in a static archive's TOC, explicit instantiation of a
5134 class must imply *explicit* instantiation of its memeber.
5135
5136 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
5137
5138 * call.c, cp-tree.h, pt.c: Fix comment typos.
5139
5140 2004-03-10 Mark Mitchell <mark@codesourcery.com>
5141
5142 PR c++/14510
5143 * decl.c (xref_tag): Disregard non-type declarations when
5144 looking up a tagged type.
5145
5146 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
5147
5148 PR c++/14397
5149 * call.c (convert_like_real): Build a const qualified temporary,
5150 when testing ctor access.
5151
5152 2004-03-09 Mark Mitchell <mark@codesourcery.com>
5153
5154 * call.c (initialize_reference): Fix typo.
5155
5156 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5157
5158 PR c++/14409
5159 * pt.c (determine_specialization): For member templates, match also
5160 constness.
5161
5162 PR c++/14448
5163 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
5164 non-dependent.
5165 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
5166
5167 2004-03-09 Mark Mitchell <mark@codesourcery.com>
5168
5169 PR c++/14230
5170 * call.c (initialize_reference): Handle initializers that are
5171 class-member access expressions applies to rvalues.
5172
5173 2004-03-09 Mark Mitchell <mark@codesourcery.com>
5174
5175 PR c++/14432
5176 * name-lookup.c (supplement_binding): Ignore functions that are
5177 marked DECL_ANTICIPATED.
5178
5179 2004-03-08 Mark Mitchell <mark@codesourcery.com>
5180
5181 PR c++/14401
5182 * class.c (check_field_decls): Complain about non-static data
5183 members of reference type in unions. Propagate
5184 CLASSTYPE_REF_FIELDS_NEED_INIT and
5185 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
5186 data members.
5187 * init.c (perform_member_init): Complain about mbmers with const
5188 type that are not explicitly initialized.
5189
5190 2004-03-08 Mark Mitchell <mark@codesourcery.com>
5191
5192 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
5193 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
5194 (lang_identifier): Remove implicit_decl and error_locus.
5195 (IDENTIFIER_IMPLICIT_DECL): Remove.
5196 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
5197 (IDENTIFIER_ERROR_LOCUS): Likewise.
5198 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
5199 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
5200 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
5201 (implicitly_declare): Remove.
5202 * decl.c (warn_extern_redeclared_static): Remove check of
5203 IDENTIFIER_IMPLICIT_DECL.
5204 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
5205 (implicitly_declare): Remove.
5206 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
5207 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
5208 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
5209 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
5210 in the innermost scope, rather than at namespace scope.
5211 * name-lookup.c (push_local_binding): Give it external linkage.
5212 (pushdecl): Remove dead code.
5213 * name-lookup.h (push_local_binding): Declare it.
5214 * ptree.c (cxx_print_identifier): Don't print
5215 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
5216 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
5217 not IDENTIFIER_ERROR_LOCUS.
5218 * typeck.c (build_function_call): Remove dead code.
5219
5220 2004-03-08 Jason Merrill <jason@redhat.com>
5221
5222 PR c++/13170
5223 * decl.c (xref_tag): Remove attribute handling.
5224 * cp-tree.h: Adjust prototype.
5225 * decl.c, parser.c, rtti.c: Adjust callers.
5226 * parser.c (cp_parser_class_head): Pass back attributes in the
5227 class head.
5228 (cp_parser_class_specifier): Adjust.
5229
5230 2004-03-08 Matt Austern <austern@apple.com>
5231
5232 PR debug/14079
5233 * name-lookup.c (add_decl_to_level): Add extern variables, as well
5234 as static, to static_decls array.
5235
5236 2004-03-05 Jason Merrill <jason@redhat.com>
5237
5238 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
5239
5240 2004-03-04 Geoffrey Keating <geoffk@apple.com>
5241
5242 * decl.c (grokfndecl): Update old incorrect comment.
5243 (grokvardecl): Diagnose C++ variables of type with no linkage.
5244
5245 2004-03-01 Mark Mitchell <mark@codesourcery.com>
5246
5247 PR c++/14369
5248 * pt.c (build_non_dependent_expr): Do not create a
5249 NON_DEPENDENT_EXPR for a THROW_EXPR.
5250
5251 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
5252
5253 PR c++/14369
5254 * error.c (dump_expr): Handle THROW_EXPR.
5255
5256 2004-03-01 Mark Mitchell <mark@codesourcery.com>
5257
5258 PR c++/14360
5259 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
5260 lookup if ordinary name-lookup finds a non-function.
5261 * pt.c (tsubst_copy_and_build): Likewise.
5262
5263 PR c++/14361
5264 * parser.c (cp_parser_late_parsing_default_args): Check that there
5265 are no extra tokens after the end of the default-argument
5266 expression.
5267
5268 2004-03-01 Mark Mitchell <mark@codesourcery.com>
5269
5270 PR c++/14324
5271 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
5272 having C++ linkage for name-mangling purposes.
5273
5274 PR c++/14260
5275 * parser.c (cp_parser_direct_declarator): Recognize constructor
5276 declarators that use a template-id to name the class being
5277 constructed.
5278
5279 PR c++/14337
5280 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
5281 (tsubst_expr): Do not call tsubst_copy, even when
5282 processing_template_decl.
5283
5284 2004-03-01 Jeff Law <law@redhat.com>
5285
5286 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
5287 the proper type.
5288
5289 2004-02-29 Mark Mitchell <mark@codesourcery.com>
5290
5291 PR c++/14138
5292 * name-lookup.h (push_scope): Change prototype.
5293 * name-lookup.c (push_scope): Do not reenter the current class
5294 scope.
5295 * decl.c (grokfndecl): Check return code from push_scope before
5296 calling pop_scope.
5297 * decl2.c (check_classfn): Likewise.
5298 * parser.c (cp_parser_conversion_function_id): Likewise.
5299 (cp_parser_init_declarator): Likewise.
5300 (cp_parser_direct_declarator): Likewise.
5301 (cp_parser_class_specifier): Likewise.
5302 (cp_parser_class_head): Likewise.
5303 (cp_parser_lookup_name): Likewise.
5304 (cp_parser_constructor_declarator_p): Likewise.
5305 * pt.c (instantiate_class_template): Likewise.
5306 (resolve_typename_type): Likewise.
5307
5308 2004-02-29 Mark Mitchell <mark@codesourcery.com>
5309
5310 PR c++/14267
5311 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
5312 extension.
5313
5314 PR debug/12103
5315 * class.c (update_vtable_entry_for_fn): Do not go through
5316 covariance machinery if the type returned by an overrider is the
5317 same as the original.
5318
5319 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
5320
5321 * call.c: Fix a comment typo.
5322
5323 2004-02-27 Ziemowit Laski <zlaski@apple.com>
5324
5325 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
5326
5327 2004-02-26 Mark Mitchell <mark@codesourcery.com>
5328
5329 PR c++/14278
5330 * parser.c (cp_parser_parameter_declaration_list): Commit
5331 to fewer tentative parses.
5332
5333 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5334
5335 PR c++/14284
5336 * pt.c (dependent_type_p_r): A template template parameter is a
5337 dependent type.
5338
5339 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5340
5341 PR c++/14246
5342 * mangle.c (write_template_arg_literal): Don't rely on identity for
5343 boolean constants.
5344
5345 2004-02-24 Jason Merrill <jason@redhat.com>
5346
5347 * tree.c (build_exception_variant): Use check_qualified_type.
5348
5349 2004-02-23 Zack Weinberg <zack@codesourcery.com>
5350 Kazu Hirata <kazu@cs.umass.edu>
5351
5352 * decl.c (cxx_init_decl_processing): Don't check
5353 flag_writable_strings.
5354
5355 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
5356
5357 PR c++/14156
5358 * typeck.c (maybe_warn_about_returning_address_of_location):
5359 Change check for VAR_DECL to use DECL_P instead.
5360
5361 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5362
5363 PR c++/14250
5364 * cvt.c (build_expr_type_conversion): Type must be complete before
5365 looking up for conversions.
5366
5367 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5368
5369 PR c++/14143
5370 * name-lookup.c (arg_assoc_class): Don't look into template
5371 arguments if it is not a primary template.
5372
5373 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5374
5375 PR c++/12007
5376 * method.c (use_thunk): Always clone function argument tree.
5377
5378 2004-02-20 Mark Mitchell <mark@codesourcery.com>
5379
5380 PR c++/14199
5381 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
5382
5383 PR c++/14173
5384 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
5385 for all type variants.
5386
5387 2004-02-19 Mark Mitchell <mark@codesourcery.com>
5388
5389 PR c++/13927
5390 * decl.c (duplicate_decls): Return error_mark_node for invalid
5391 redeclarations.
5392 * name-lookup.c (push_namespace): Ignore the return value from
5393 pushdecl.
5394 * pt.c (push_template_decl_real): Robustify.
5395
5396 PR c++/14186
5397 * name-lookup.c (push_class_level_binding): Do not complain about
5398 adding a binding for a member whose name is the same as the
5399 enclosing class if the member is located in a base class of the
5400 current class.
5401
5402 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5403
5404 PR c++/14181
5405 * parser.c (cp_parser_new_expression): Parse an ill-formed
5406 direct-new-declarator after a parenthesized type-id to emit good
5407 diagnostic.
5408
5409 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
5410
5411 * cp-tree.def, cvt.c: Update copyright.
5412
5413 2004-02-17 Mark Mitchell <mark@codesourcery.com>
5414
5415 PR c++/11326
5416 * cp-tree.h (abi_version_at_least): Remove.
5417 * mangle.c: Include flags.h.
5418
5419 2004-02-15 Mark Mitchell <mark@codesourcery.com>
5420
5421 PR c++/13971
5422 * call.c (build_conditional_expr): Handle conversions between
5423 class types which result in differently cv-qualified type
5424 variants.
5425
5426 PR c++/14086
5427 * class.c (delete_duplicate_fields_1): Remove.
5428 (delete_duplicate_fields): Likewise.
5429 (finish_struct_anon): Remove check for members with the same name
5430 as their enclosing class.
5431 (check_field_decls): Do not call duplicate_fields.
5432 * decl.c (grokdeclarator): Remove check for static data members
5433 with the same name as their enclosing class.
5434 * name-lookup.c (push_class_level_binding): Check for members with
5435 the same name as their enclosing class.
5436
5437 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
5438
5439 PR c++/14085
5440 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
5441
5442 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5443
5444 PR c++/13635
5445 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
5446 has full set of arguments.
5447
5448 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5449
5450 PR c++/13927
5451 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
5452
5453 2004-02-13 Mark Mitchell <mark@codesourcery.com>
5454
5455 PR c++/14122
5456 * cp-tree.h (delete_sanity): Change prototype.
5457 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
5458 Remove dead code. Adjust code to warn about deleting an array.
5459 * typekc.c (decay_conversion): Use build_address and build_nop.
5460
5461 PR c++/14108
5462 * search.c (accessible_p): Do not check access in thunks.
5463
5464 PR c++/14083
5465 * call.c (build_conditional_expr): Call force_rvalue on the
5466 non-void operand in the case that one result is a throw-expression
5467 and the other is not.
5468
5469 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
5470
5471 PR c++/9851
5472 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
5473 the type name and look ahead for ::~, and bail out early with a
5474 better error message if the parse is going to fail.
5475
5476 2004-02-12 Mark Mitchell <mark@codesourcery.com>
5477
5478 * call.c (conversion_kind): New type.
5479 (conversion_rank): Likewise.
5480 (conversion): Likewise.
5481 (CONVERSION_RANK): New macro.
5482 (conversion_obstack): New variable.
5483 (obstack_initialized): Likewise.
5484 (z_candidate): Change type of convs and second_conv.
5485 (candidate_warning): New type.
5486 (IDENTITY_RANK): Remove.
5487 (EXACT_RANK): Likewise.
5488 (PROMO_RANK): Likewise.
5489 (STD_RANK): Likewise.
5490 (PBOOL_RANK): Likewise.
5491 (USER_RANK): Likewise.
5492 (ELLIPSIS_RANK): Likewise.
5493 (BAD_RANK): Likewise.
5494 (ICS_RANK): Likewise.
5495 (ICS_STD_RANK): Likewise.
5496 (ICS_USER_FLAG): Likewise.
5497 (ICS_ELLIPSIS_FLAG): Likewise.
5498 (ICS_THIS_FLAG): Likewise.
5499 (ICS_BAD_FLAG): Likewise.
5500 (NEED_TEMPORARY_P): Likewise.
5501 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
5502 (USER_CONV_CAND): Likewise.
5503 (USER_CONV_FN): Likewise.
5504 (conversion_obstack_alloc): New function.
5505 (alloc_conversion): Likewise.
5506 (validate_conversion_obstack): Likewise.
5507 (alloc_conversions): Likewise.
5508 (build_conv): Adjust to deal with new conversion data structures.
5509 (build_identity_conv): New function.
5510 (build_ambiguous_conv): Likewise.
5511 (standard_conversion): Adjust to deal with new conversion data
5512 structures.
5513 (convert_class_to_reference): Likewise.
5514 (direct_reference_binding): Likewise.
5515 (reference_binding): Likewise.
5516 (implicit_conversion): Likewise.
5517 (add_candidate): Likewise.
5518 (add_function_candidate): Likewise.
5519 (add_conv_candidate): Likewise.
5520 (build_builtin_candidate): Likewise.
5521 (print_z_candidate): Likewise.
5522 (merge_conversion_sequences): Likewise.
5523 (build_user_type_conversion_1): Likewise.
5524 (build_user_type_conversion): Likewise.
5525 (build_new_function_call): Likewise.
5526 (build_object_call): Likewise.
5527 (conditional_conversion): Likewise.
5528 (build_conditional_expr): Likewise.
5529 (build_new_op): Likewise.
5530 (build_op_delete_call): Likewise.
5531 (convert_like_real): Likewise.
5532 (build_over_call): Likewise.
5533 (build_new_method_call): Likewise.
5534 (is_subseq): Likewise.
5535 (maybe_handle_implicit_object): Likewise.
5536 (maybe_handle_ref_bind): Likewise.
5537 (compare_ics): Likewise.
5538 (source_type): Likewise.
5539 (add_warning): Likewise.
5540 (joust): Likewise.
5541 (can_convert_arg): Likewise.
5542 (can_convert_arg_bad): Likewise.
5543 (perform_implicit_conversion): Likewise.
5544 (perform_direct_initialization_if_possible): Likewise.
5545 (initialize_reference): Likewise.
5546 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
5547 * cp-tree.def (WRAPPER): Likewise.
5548 (IDENTITY_CONV): Remove.
5549 (LVALUE_CONV): Likewise.
5550 (QUAL_CONV): Likewise.
5551 (STD_CONV): Likewise.
5552 (PTR_CONV): Likewise.
5553 (PMEM_CONV): Likewise.
5554 (BASE_CONV): Likewise.
5555 (REF_BIND): Likewise.
5556 (USER_CONV): Likewise.
5557 (AMBIG_CONV): Likewise.
5558 (RVALUE_CONV): Likewise.
5559 * cp-tree.h (tree_wrapper): Remove.
5560 (WRAPPER_ZC): Remove.
5561 (lang_tree_node): Remove wrapper.
5562 (LOOKUP_SPECULATIVELY): Remove.
5563 (build_op_delete_call): Adjust prototype.
5564 (validate_conversion_obstack): Declare.
5565 (build_zc_wrapper): Remove.
5566 * cvt.c (convert_to_reference): Remove dead code.
5567 (ocp_convert): Likewise.
5568 * decl.c (redeclaration_error_message): Correct handling of
5569 templates.
5570 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
5571 (cp_tree_node_structure): Remove WRAPPER case.
5572 * decl2.c (finish_file): Call validate_conversion_obstack.
5573 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
5574 (build_op_delete_call): Likewise.
5575 (build_x_delete): Likewise.
5576 (build_delete): Adjust call to build_op_delete_call.
5577 * pt.c (tsubst_friend_declaration): Adjust code to determine
5578 whether or not a friend template is a definition.
5579 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
5580 * tree.c (build_zc_wrapper): Remove.
5581
5582 2004-02-12 Zack Weinberg <zack@codesourcery.com>
5583
5584 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
5585 * cp-tree.h: Don't declare cxx_builtin_type_decls.
5586 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
5587 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
5588
5589 2004-02-10 Mark Mitchell <mark@codesourcery.com>
5590
5591 * typeck.c (lookup_destructor): Fix typo in error message.
5592
5593 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
5594
5595 * call.c, parser.c, tree.c: Fix comment typos.
5596
5597 2004-02-07 Zack Weinberg <zack@codesourcery.com>
5598
5599 Bug 13856
5600 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
5601 * decl.c (duplicate_decls, start_function): Likewise.
5602
5603 2004-02-07 Zack Weinberg <zack@codesourcery.com>
5604
5605 * name-lookup.c (pushdecl): Issue shadow warnings directly.
5606 * parser.c (free_parser_stacks): Delete.
5607
5608 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
5609
5610 * rtti.c: Update copyright.
5611
5612 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5613
5614 PR c++/14033
5615 * decl.c (require_complete_types_for_parms): Do not insert
5616 error_mark_node in the parameter list.
5617
5618 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5619
5620 PR c++/14028
5621 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
5622 error when terminator can not be found.
5623
5624 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
5625
5626 Make-lang.in (po-generated): Delete.
5627
5628 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
5629
5630 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
5631 targetm.calls.promote_prototypes.
5632
5633 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
5634
5635 PR middle-end/13750
5636 Revert:
5637 2004-01-15 Geoffrey Keating <geoffk@apple.com>
5638 PR pch/13361
5639 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
5640 (handle_pragma_implementation): Likewise.
5641
5642 2004-02-05 Mark Mitchell <mark@codesourcery.com>
5643
5644 PR c++/13714
5645 * typeck.c (lookup_destructor): Tweak error message.
5646
5647 2004-02-05 Jan Hubicka <jh@suse.cz>
5648
5649 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
5650 functions.
5651
5652 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5653
5654 PR c++/14008
5655 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
5656 code, only emits the diagnostic now. Added lookup of the identifier
5657 and support for qualified ids.
5658 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
5659 Parse an (invalid) type name as id-expression within a declarator.
5660 (cp_parser_simple_declaration): Use it.
5661 (cp_parser_member_declaration): Likewise.
5662 (cp_parser_make_typename_type): New function. Handle errors through
5663 cp_parser_diagnose_invalid_typename.
5664 (cp_parser_elaborated_type_specifier): Use it.
5665
5666 2004-02-04 Mark Mitchell <mark@codesourcery.com>
5667
5668 PR c++/13932
5669 * call.c (convert_like_real): Use "converting" rather than
5670 "argument" as the descriptive keyword to
5671 dubious_conversion_warnings.
5672 * typeck.c (convert_for_assignment): Do not call
5673 dubious_conversion_warnings.
5674
5675 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5676
5677 PR c++/13086
5678 * init.c (build_delete): Emit a more informative error message in
5679 case of an incomplete type, and on the correct source line.
5680
5681 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
5682
5683 * error.c, search.c: Update copyright.
5684
5685 2004-02-04 Mark Mitchell <mark@codesourcery.com>
5686
5687 PR c++/9941
5688 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
5689 linkage for the typeinfo name string.
5690
5691 2004-02-04 Mark Mitchell <mark@codesourcery.com>
5692
5693 PR c++/13969
5694 * cp-tree.h (fold_non_dependent_expr): New function.
5695 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
5696 (cp_parser_template_argument): Use fold_non_dependent_expr.
5697 (cp_parser_direct_declarator): Likewise.
5698 * pt.c (fold_non_dependent_expr): New function.
5699 (convert_nontype_argument): Use it.
5700 (tsubst_qualified_id): Simplify.
5701 (tsubst_copy_and_build): Likewise.
5702
5703 2004-02-04 Mark Mitchell <mark@codesourcery.com>
5704
5705 * decl.c (cxx_push_function_context): Do not set
5706 current_function_is_thunk.
5707 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
5708 actual function.
5709
5710 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5711
5712 PR c++/13997
5713 * pt.c (more_specialized_class): Increase processing_template_decl
5714 while partial ordering.
5715
5716 2004-02-03 Mark Mitchell <mark@codesourcery.com>
5717
5718 PR c++/13925
5719 * decl.c (start_function): Do not call pushdecl for any
5720 instantiation or specialization of a primary template.
5721
5722 2004-02-03 Mark Mitchell <mark@codesourcery.com>
5723
5724 PR c++/13950
5725 * parser.c (cp_parser_class_name): Robustify.
5726
5727 PR c++/13970
5728 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
5729
5730 PR c++/14002
5731 * semantics.c (finish_id_expression): Do not return an
5732 IDENTIFIER_NODE when lookup finds a PARM_DECL.
5733
5734 2004-02-03 Mark Mitchell <mark@codesourcery.com>
5735
5736 PR c++/13978
5737 * pt.c (build_non_dependent_expr): Do not build
5738 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
5739
5740 PR c++/13968
5741 * semantics.c (finish_id_expression): Do not return an
5742 IDENTIFIER_NODE when lookup finds a VAR_DECL.
5743
5744 PR c++/13975
5745 * parser.c (cp_parser_simple_declaration): When skipping to the
5746 end of the statement swallow the terminating semicolon.
5747
5748 2004-02-02 Mark Mitchell <mark@codesourcery.com>
5749
5750 PR c++/13113
5751 * init.c (build_offset_ref): Improve error recovery for invalid
5752 uses of non-static member functions.
5753
5754 PR c++/13854
5755 * cp-tree.h (cp_build_type_attribute_variant): New function.
5756 * class.c (build_clone): Use cp_build_type_attribute_variant.
5757 * decl.c (duplicate_decls): Likewise.
5758 * pt.c (copy_default_args_to_explicit_spec): Likewise.
5759 (tsubst_function_type): Likewise.
5760 * tree.c (build_exception_variant): Check attributes before
5761 concluding that two types are the same.
5762 (cp_build_type-attribute_variant): New method.
5763 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
5764
5765 PR c++/13907
5766 * call.c (convert_class_to_reference): Keep better track of
5767 pedantically invalid user-defined conversions.
5768
5769 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5770
5771 PR c++/13957
5772 * pt.c (tsubst_qualified_id): Improved error message when a type
5773 is expected but not found.
5774
5775 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
5776
5777 * class.c: Fix comment typos.
5778 * decl.c: Likewise.
5779 * error.c: Likewise.
5780 * parser.c: Likewise.
5781 * pt.c: Likewise.
5782 * search.c: Likewise.
5783 * typeck.c: Likewise.
5784
5785 2004-01-30 Richard Henderson <rth@redhat.com>
5786
5787 PR c++/13693
5788 * method.c (use_thunk): Don't force_target_expr for void thunks.
5789 * tree.c (build_target_expr_with_type): Assert non-void type.
5790 (force_target_expr): Likewise.
5791
5792 2004-01-30 Michael Matz <matz@suse.de>
5793
5794 * parser.c (cp_parser_labeled_statement): Accept case ranges.
5795
5796 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5797
5798 DR206
5799 PR c++/13813
5800 * decl.c (grokdeclarator): Check immediatly type completeness for
5801 non-dependent types.
5802
5803 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5804
5805 PR c++/13683
5806 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
5807 a sizeof expression.block
5808
5809 2004-01-29 Mark Mitchell <mark@codesourcery.com>
5810
5811 PR c++/13883
5812 * mangle.c (write_encoding): Correct encoding of member template
5813 constructors.
5814
5815 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5816
5817 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
5818 template name as it was `<::' (digraph typo).
5819 (cp_parser_nth_token_starts_template_argument_list_p): New function.
5820 (cp_parser_id_expression): Use it.
5821 (cp_parser_nested_name_specifier_opt): Likewise.
5822 (cp_parser_template_name): Likewise.
5823 (cp_parser_class_name): Likewise.
5824 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
5825
5826 2004-01-28 Mark Mitchell <mark@codesourcery.com>
5827
5828 PR c++/13791
5829 * typeck.c (merge_types): Do not merge attributes into
5830 TYPENAME_TYPEs.
5831
5832 PR c++/13736
5833 * parser.c (cp_parser_direct_declarator): Do not prevent
5834 backtracking inside a parenthesized declarator.
5835 (cp_parser_parameter_declaration): Fix typo in comment.
5836
5837 2004-01-28 Jan Hubicka <jh@suse.cz>
5838
5839 * semantics.c (expand_body) Do emit_associated_thunks before
5840 expansion.
5841
5842 2004-01-27 Devang Patel <dpatel@apple.com>
5843
5844 * name-lookup.c: Include "debug.h"
5845 (do_namespace_alias): Invoke debug_hooks to emit debug info
5846 for namespace alias.
5847 (do_local_using_decl): Invoke debug_hooks to emit debug info
5848 for using decl.
5849 (do_class_using_decl): Same.
5850 (do_toplevel_using_decl): Same.
5851 (do_using_directive): Same.
5852 (cp_emit_debug_info_for_using): New function.
5853 * Make-lang.in (cp/parser.o): Depend on debug.h
5854 (cp/name-lookup.o): Same.
5855
5856 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5857
5858 * cp-tree.h (language_function, lang_type_header): Use
5859 BOOL_BITFIELD.
5860 * name-lookup.h (cp_binding_level): Likewise.
5861
5862 2004-01-26 Mark Mitchell <mark@codesourcery.com>
5863
5864 PR c++/13663
5865 * semantics.c (finish_for_expr): Check for unresolved overloaded
5866 functions.
5867
5868 * class.c (add_method): Just check processing_template_decl to
5869 determine whether or not we are within a template.
5870 * decl2.c (maybe_retrofit_in_chrg): Likewise.
5871 * init.c (decl_constant_value): Check the type of the declaration,
5872 not TREE_READONLY.
5873 * name-lookup.c (maybe_push_to_top_level): Rename to ...
5874 (push_to_top_level): ... this.
5875 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
5876 * pt.c (push_template_decl_real): Reorder condition for speed.
5877 (convert_template_argument): Use dependency-checking functions in
5878 place of uses_template_parms.
5879 (lookup_template_class): Avoid calling uses_template_parms more
5880 than once.
5881 (uses_template_parms): Reimplement, using dependency-checking
5882 functions.
5883 (instantiate_class_template): Use push_to_top_level, not
5884 maybe_push_to_top_level.
5885 (type_unification_real): Simplify.
5886 (type_dependent_expression_p): Handle OFFSET_REFs and
5887 TEMPLATE_DECLs.
5888 (any_dependent_template_arguments_p): Handle multiple levels of
5889 template argument.
5890 * semantics.c (expand_or_defer_fn): Do not check
5891 uses_template_parms for template instantiations.
5892 * typeck.c (comptypes): Avoid calling cp_type_quals.
5893
5894 2004-01-25 Mark Mitchell <mark@codesourcery.com>
5895
5896 PR c++/13833
5897 * call.c (build_over_call): Do not convert arguments when
5898 processing a template.
5899 * pt.c (build_non_dependent_expr): Do not build a
5900 NON_DEPENDENT_EXPR for arithmetic constants.
5901
5902 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5903
5904 PR c++/13810
5905 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
5906 returns a TYPE_DECL. no further lookup is required.
5907 * semantics.c (check_template_template_default_arg): A TYPE_DECL
5908 is invalid. Rework to give better diagnostics.
5909
5910 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5911
5912 PR c++/13797
5913 * pt.c (instantiate_class_template): Add an error_mark_node
5914 check.
5915 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
5916
5917 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
5918
5919 PR c++/13701
5920 * decl.c (finish_function): Move the call to
5921 finish_fname_decls below the call to
5922 finish_eh_spec_block.
5923
5924 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
5925
5926 * optimize.c, typeck2.c: Update copyright.
5927
5928 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
5929
5930 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
5931 init.c, mangle.c, typeck.c: Update copyright.
5932
5933 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
5934
5935 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
5936
5937 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
5938
5939 * Make-lang.in: Replace $(docdir) with doc.
5940 (c++.info, c++.srcinfo): Dummy entry.
5941 (c++.man, c++.srcman): New rules.
5942 (c++.install-man): Revamp rule.
5943
5944 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
5945
5946 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
5947 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
5948 immediate $(shell) instead of deferred backquote.
5949
5950 2004-01-19 Mark Mitchell <mark@codesourcery.com>
5951
5952 PR c++/13651
5953 * parser.c (cp_parser_postfix_expression): When encountering
5954 incomplete type on left-hand side of "->" or ".", treat the entire
5955 expression as erroneous.
5956
5957 PR c++/13592
5958 * call.c (build_field_call): Remove.
5959 (n_build_method_call): Likewise.
5960 (build_method_call): Likewise.
5961 (build_new_method_call): Do not call build_field_call.
5962 * class.c (n_build_method_call): Remove.
5963 (print_class_statistics): Do not print it.
5964 * cp-tree.h (build_method_call): Remove declaration.
5965 (finish_object_call_expr): Likewise.
5966 (build_new_1): Do not use build_method_call.
5967 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
5968 when the function appearing on the right-hand-side of "." or "->"
5969 is not actually a function.
5970 * pt.c (tsubst_copy_and_build): Likewise.
5971 * semantics.c (finish_object_call_expr): Remove.
5972
5973 2004-01-18 Mark Mitchell <mark@codesourcery.com>
5974
5975 PR c++/13710
5976 * pt.c (tsubst): Use finish_typeof.
5977
5978 2004-01-18 Jason Merrill <jason@redhat.com>
5979
5980 PR c++/11725
5981 * except.c (build_throw): In a template, set
5982 current_function_returns_abnormally.
5983
5984 2004-01-17 Fred Fish <fnf@intrinsity.com>
5985
5986 PR c++/11895
5987 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
5988 except don't call array_type_nelts() with a VECTOR_TYPE.
5989
5990 2004-01-16 Jan Hubicka <jh@suse.cz>
5991
5992 * mangle.c (write_mangled_name): Remove inline modifier.
5993
5994 2004-01-16 Mark Mitchell <mark@codesourcery.com>
5995
5996 PR c++/13574
5997 * decl.c (compute_array_index_type): Fix grammar in comment.
5998 * init.c (build_zero_init): Handle zero-sized arrays correctly.
5999
6000 PR c++/13178
6001 * call.c (name_as_c_string): Print conversion operator names
6002 correctly.
6003
6004 PR c++/13478
6005 * call.c (initialize_reference): Pass -1 for inner parameter to
6006 convert_like_real.
6007
6008 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6009
6010 PR c++/13407
6011 * parser.c (cp_parser_base_specifier): Check for an invalid
6012 keyword `typename' and emit an user-friendly error message.
6013
6014 2004-01-15 Geoffrey Keating <geoffk@apple.com>
6015
6016 PR pch/13361
6017 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
6018 (handle_pragma_implementation): Likewise.
6019
6020 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6021
6022 PR c++/9259
6023 * typeck.c (build_class_member_access_expr): Allow to access members
6024 of the currently open class.
6025 (finish_class_member_access_expr): Likewise.
6026
6027 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
6028
6029 PR c++/13659
6030 * name-lookup.c (validate_nonmember_using_decl): Take scope and
6031 name by value, instead of computing them.
6032 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
6033 arguments. Pass them to validate_nonmember_using_decl.
6034 * name-lookup.h (do_local_using_decl): Adjust.
6035 (do_toplevel_using_decl): Likewise.
6036 * parser.c (cp_parser_using_declaration): Likewise.
6037 * pt.c (tsubst_expr): Likewise.
6038
6039 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
6040
6041 PR c++/13594
6042 PR c++/13658
6043 * name-lookup.c (qualified_lookup_using_namespace): Search
6044 strongly-associated namespaces first, and only then try other
6045 namespaces.
6046
6047 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
6048
6049 * Make-lang.in (c++.srcextra): Dummy entry.
6050
6051 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6052
6053 PR c++/8856
6054 * parser.c (cp_parser_template_name): Don't try to parse a
6055 conversion-function-id, as it cannot be a template-name.
6056 (cp_parser_simple_type_specifier): Check for invalid template-ids
6057 even after a built-in type.
6058
6059 2004-01-14 Jan Hubicka <jh@suse.cz>
6060
6061 PR c++/12850
6062 * pt.c (instantiate_decl): Do not increase function_depth.
6063
6064 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
6065
6066 PR c++/9021
6067 PR c++/11005
6068 * parser.c (cp_parser_elaborated_type_specifier): Warn about
6069 attributes and discard.
6070 * decl.c (xref_tag): Don't overwite existing attributes with
6071 NULL_TREE.
6072
6073 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6074
6075 PR c++/12335
6076 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
6077 is no destructor while looking up a BIT_NOT_EXPR.
6078
6079 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
6080
6081 * cxxfilt.c: Remove unused file.
6082
6083 2004-01-14 Jan Hubicka <jh@suse.cz>
6084
6085 Partial fix to PR c++/12850
6086 * decl2.c (mark_used): Do not proactively instantiate templates
6087 when compiling in unit-at-a-time or not optimizing.
6088 * optimize.c (maybe_clone_body): Do not increase function depth.
6089
6090 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6091
6092 PR c++/13474
6093 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
6094
6095 2004-01-12 Steven Bosscher <stevenb@suse.de>
6096
6097 PR c++/13558
6098 * parser.c (cp_parser_member_declaration): Any non-type is also
6099 not a class or a function.
6100
6101 2004-01-12 Jason Merrill <jason@redhat.com>
6102
6103 PR c++/12815
6104 * class.c (build_base_path): Do not mark vtable references as
6105 TREE_CONSTANT.
6106 (build_vtbl_ref_1): Likewise.
6107
6108 2004-01-12 Richard Henderson <rth@redhat.com>
6109
6110 PR opt/10776
6111 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
6112 (store_init_value): Use it.
6113 * decl.c (check_initializer): Expect full initialization code
6114 from store_init_value.
6115 * init.c (expand_aggr_init_1): Likewise.
6116 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
6117
6118 2004-01-12 Mark Mitchell <mark@codesourcery.com>
6119
6120 * class.c (layout_class_type): For non-POD class types, also copy
6121 the DECL_SIZE and DECL_MODE of fields to the base class type.
6122
6123 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6124
6125 PR c++/13289
6126 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
6127 calling regenerate_decl_from_template.
6128
6129 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
6130
6131 PR c++/4100
6132 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
6133 decl-specifier occurring along with a class definition.
6134
6135 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
6136
6137 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
6138 clauses to comments describing declares_class_or_enum.
6139 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
6140 false.
6141
6142 2004-01-12 Jan Hubicka <jh@suse.cz>
6143
6144 * pt.c (for_each_template_parm): Do not check for duplicates.
6145 (for_each_template_parm): Use walk_tree duplicate checking code.
6146
6147 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
6148
6149 PR c++/3478
6150 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
6151 is error_mark_node, don't add any more decl_specs.
6152 (cp_parser_init_declarator): After committing to a declaration, if
6153 the decl_specifiers start with error_mark_node, issue an error and
6154 change the type to "int".
6155
6156 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
6157
6158 PR bootstrap/7817
6159 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
6160
6161 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6162
6163 DR 337
6164 PR c++/9256
6165 * pt.c (tsubst): Substitution must fail if we are attempting to
6166 create an array with element type that is an abstract class type.
6167 * decl.c (cp_finish_decl): Strip pointers and array types recursively
6168 before calling abstract_virtuals_error.
6169
6170 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
6171
6172 * name-lookup.c (qualified_lookup_using_namespace): Consider
6173 strong using directives even if we've already found a binding.
6174
6175 2004-01-09 Mark Mitchell <mark@codesourcery.com>
6176
6177 * cp-tree.h (cxx_expand_expr): Change prototype.
6178 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
6179
6180 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6181
6182 PR c++/12573
6183 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
6184 looking into them recursively. They can be there because of the
6185 new __offsetof__ extension.
6186
6187 2004-01-07 Zack Weinberg <zack@codesourcery.com>
6188
6189 * parser.c (cp_parser_save_member_function_body): Mark the
6190 definition static.
6191
6192 2004-01-05 Mark Mitchell <mark@codesourcery.com>
6193
6194 PR c++/13057
6195 * class.c (build_clone): Copy type attributes from the original
6196 function to the clone.
6197
6198 PR c++/12815
6199 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
6200 references as constant.
6201
6202 PR c++/12132
6203 * parser.c (cp_parser_explicit_instantiation): Improve error
6204 recovery.
6205 (cp_parser_require): Improve indication of the error location.
6206
6207 PR c++/13451
6208 * parser.c (cp_parser_class_head): Reorder logic to check for
6209 invalid qualification.
6210
6211 2004-01-04 Mark Mitchell <mark@codesourcery.com>
6212
6213 PR c++/13157
6214 * name-lookup.c (lookup_using_namespace): Remove spacesp
6215 parameter.
6216 (unqualified_namespace_lookup): Likewise.
6217 (lookup_qualified_name): Adjust accordingly.
6218 (lookup_name_real): Likewise.
6219 (lookup_arg_dependent): Do not eliminate the namespace of the
6220 functions found by unqualified name lookup unless that is the
6221 current namespace.
6222
6223 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
6224
6225 * semantics.c (push_deferring_access_checks): Fix format.
6226 (resume_deferring_access_checks): Likewise.
6227 (stop_deferring_access_checks): Likewise.
6228 (pop_deferring_access_checks): Likewise.
6229 (get_deferred_access_checks): Likewise.
6230 (pop_to_parent_deferring_access_checks): Likewise.
6231 (perform_deferred_access_checks): Likewise.
6232 (perform_or_defer_access_check): Likewise.
6233
6234 2004-01-04 Richard Henderson <rth@redhat.com>
6235
6236 * call.c (build_over_call): Don't create a save_expr of an
6237 aggregate, but rather its address.
6238
6239 2004-01-04 Mark Mitchell <mark@codesourcery.com>
6240
6241 PR c++/13529
6242 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
6243 an offsetof expression.
6244
6245 * parser.c (cp_parser_parameter_declaration): Fix comment.
6246
6247 PR c++/12226
6248 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
6249 (reference_binding): Set it when appropriate.
6250 (build_temp): New function, split out from ...
6251 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
6252 (initialize_reference): Likewise.
6253
6254 PR c++/13536
6255 * parser.c (cp_parser): Add in_type_id_in_expr_p.
6256 (cp_parser_new): Initialize it.
6257 (cp_parser_postfix_expression): Set it.
6258 (cp_parser_sizeof_operand): Likewise.
6259 (cp_parser_parameteR_declaration): Do not commit early to tenative
6260 parsers when in_type_id_in_expr_p is set.
6261
6262 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6263
6264 PR c++/13094
6265 * parser.c (cp_parser_template_argument): Don't call
6266 make_unbound_class_template directly.
6267 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
6268 UNBOUND_CLASS_TEMPLATE tree node.
6269
6270 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
6271
6272 PR target/12729
6273 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
6274
6275 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6276
6277 PR c++/13520
6278 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
6279 (DECL_FUNCTION_TEMPLATE_P): Use it.
6280 (DECL_CLASS_TEMPLATE_P): Likewise.
6281 * parser.c (cp_parser_lookup_name): Add is_template parameter.
6282 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
6283 (cp_parser_template_name): Likewise.
6284 (cp_parser_elaborated_type_specifier): Likewise.
6285 (cp_parser_namespace_name): Likewise.
6286 (cp_parser_class_name): Likewise.
6287 (cp_parser_lookup_name_simple): Likewise.
6288
6289 See ChangeLog.3 for earlier changes.