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