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