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