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