]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/cp/ChangeLog
Merge tree-ssa-20020619-branch into mainline.
[thirdparty/gcc.git] / gcc / cp / ChangeLog
1 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2
3 Merge from tree-ssa-20020619-branch. See
4 ChangeLog.tree-ssa for details.
5
6 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
7 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
8 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
9 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
10 Merged.
11 * cp-mudflap.c: New file.
12 * cp-simplify.c:: New file.
13
14 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
15
16 PR c++/14389
17 * decl2.c (check_classfn): For member templates, compare also the
18 template parameters to match the declaration.
19 * cp-tree.h: Adjust declaration of check_classfn.
20 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
21 * friend.c (do_friend): Likewise.
22 * pt.c (tsubst_friend_function): Likewise.
23
24 2004-05-01 Zack Weinberg <zack@codesourcery.com>
25
26 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
27 Instead, dig into the representation type to find the array bound.
28
29 2004-04-30 Jason Merrill <jason@redhat.com>
30
31 Refer to base members using COMPONENT_REFs where possible.
32 * class.c (build_simple_base_path): New fn.
33 (build_base_path): Use it for non-virtual base references.
34 (layout_class_type): Change base fields to their real type
35 after layout is done.
36 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
37 * cp-lang.c (cxx_get_alias_set): Use it.
38
39 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
40
41 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
42 comment typos.
43
44 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
45
46 PR c++/15064
47 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
48 used in integral constant expressions.
49
50 2004-04-22 Mark Mitchell <mark@codesourcery.com>
51
52 * init.c (build_aggr_init): Fix accidental use of C99 construct in
53 previous change.
54
55 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
56 braced initializer.
57 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
58 * decl.c (reshape_init): Use it.
59 * init.c (perform_member_init): Remove redundant condition.
60 (build_aggr_init): Adjust to handle brace-enclosed initializers
61 correctly.
62 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
63
64 * parser.c (cp_parser_initializer_clause): Do not set
65 TREE_HAS_CONSTRUCTOR on the initializer.
66 * rtti.c (tinfo_base_init): Likewise.
67 (generic_initializer): Likewise.
68 (ptr_initializer): Likewise.
69 (ptm_initializer): Likewise.
70 (class_initializer): Likewise.
71 (get_pseudo_ti_init): Likewise.
72 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
73
74 2004-04-22 Alan Modra <amodra@bigpond.net.au>
75
76 * name-lookup.c (anonymous_namespace_name): Make static.
77
78 2004-04-19 Roger Sayle <roger@eyesopen.com>
79
80 PR middle-end/14531
81 * class.c (build_base_path): Call fold whilst building the NULL
82 pointer check expression trees.
83
84 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
85
86 * init.c (build_new_1): Don't use type size argument for Java
87 _Jv_AllocObject call.
88
89 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
90
91 * method.c (make_alias_for_thunk): Remove preprocessor guard on
92 declaration and definition.
93
94 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
95
96 PR c++/14808
97 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
98 than ASM_OUTPUT_DEF.
99
100 2004-04-08 Jakub Jelinek <jakub@redhat.com>
101
102 * decl2.c (mark_used): Don't segfault if cfun != NULL but
103 current_function_decl == NULL.
104
105 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
106
107 PR c++/3518
108 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
109 level.
110
111 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
112
113 * init.c (decl_constant_value): Don't look at DECL_INITIAL
114 of PARM_DECL.
115 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
116 or TREE_SIDE_EFFECTS of a type.
117
118 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
119
120 PR c++/14007
121 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
122 cv-qualifier unification.
123 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
124
125 2004-04-02 Jan Hubicka <jh@suse.cz>
126
127 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
128 * cp-tree.h (cp_update_decl_after_saving): Declare.
129 * tree.c (cp_update_decl_after_saving): Define.
130
131 2004-04-01 Mark Mitchell <mark@codesourcery.com>
132
133 PR c++/14803
134 * typeck.c (get_delta_difference): Call fold before returning the
135 value.
136
137 2004-04-01 Richard Henderson <rth@redhat.com>
138
139 PR c++/14804
140 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
141 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
142
143 2004-04-01 Mark Mitchell <mark@codesourcery.com>
144
145 PR c++/14810
146 * name-lookup.c (maybe_push_cleanup_level): Robustify.
147
148 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
149
150 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
151
152 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
153
154 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
155 * class.c (check_bitfield_decl): Likewise.
156 * cvt.c (type_promotes_to): Likewise.
157 * decl.c (finish_enum): Likewise.
158 * mangle.c (write_builtin_type): Likewise.
159 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
160 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
161 (build_binary_op): Likewise.
162
163 2004-03-31 Jan Hubicka <jh@suse.cz>
164
165 * tree.h (optimize_function): Kill prototype.
166 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
167 * semantics.c (expand_body): Kill.
168
169 2004-03-30 Mark Mitchell <mark@codesourcery.com>
170
171 PR c++/14724
172 * decl.c (start_decl_1): Do not decide whether or not to create a
173 new cleanup level until after the type has been completed.
174
175 PR c++/14763
176 * pt.c (tsubst_default_argument): Clear current_function_decl.
177
178 2004-03-30 Zack Weinberg <zack@codesourcery.com>
179
180 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
181
182 2004-03-29 Zack Weinberg <zack@codesourcery.com>
183
184 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
185 is null, just print the literal name and return.
186
187 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
188
189 * cxx-pretty-print.c: Fix comment typos.
190
191 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
192
193 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
194 Update copyright.
195
196 2004-03-23 Ziemowit Laski <zlaski@apple.com>
197
198 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
199 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
200 target hook.
201
202 2004-03-23 Zack Weinberg <zack@codesourcery.com>
203
204 PR 12267, 12391, 12560, 13129, 14114, 14133
205 * cp-lang.c (c_reset_state): Delete.
206 (push_file_scope, pop_file_scope): New stubs.
207 * parser.c (c_parse_file): Call sorry() here if called more than once.
208
209 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
210
211 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
212 for INTEGER_CST.
213
214 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
215
216 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
217
218 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
219
220 * error.c (enum pad): Remove.
221 (dump_qualifiers): Likewise.
222 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
223 (dump_aggr_type): Likewise.
224 (dump_type_suffix): Likewise.
225 (dump_simple_decl): Likewise.
226 (dump_function_decl): Likewise.
227 (cv_to_string): Likewise.
228 (dump_type_prefix): Likewise. Adjust return void.
229 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
230 cxx_pretty_print.h.
231 (pp_cxx_template_keyword_if_needed): Document.
232 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
233 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
234 MUST_NOT_THROW_EXPR.
235
236 2004-03-21 Mark Mitchell <mark@codesourcery.com>
237
238 PR c++/14616
239 * decl.c (cp_finish_decl): Compute the size of arrays declared in
240 templates, if their type is non-dependent.
241
242 2004-03-19 Mark Mitchell <mark@codesourcery.com>
243
244 * call.c (build_op_delete_call): Do not forget the placement
245 arguments when iterating through mutiple delete operators.
246
247 * cp-tree.h (svaed_scope): Remove last_parms.
248 (NEW_DELETE_OPNAME_P): New macro.
249 (last_function_parms): Remove.
250 (do_friend): Adjust prototype.
251 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
252 using last_function_parms.
253 (grokfndecl): Take the PARM_DECLs as an argument, rather than
254 using last_function_parms.
255 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
256 for class-specific operator new and operator delete.
257 (grok_op_properties): Do not look for allocation functions with
258 METHOD_TYPEs.
259 (start_function): Use DECL_ARGUMENTS instead of
260 last_function_parms.
261 * decl.h (last_function_parms): Do not declare.
262 * decl2.c (grokclassfn): Do not use last_function_parms.
263 * friend.c (do_friend): Remove parmdecls parameter.
264 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
265 (pop_from_top_level): Do not restore it.
266 * pt.c (check_explicit_specialization): Do not adjust
267 last_function_parms.
268
269 * name-lookup.c (do_local_using_decl): Create a local binding for
270 types brought in via using declarations.
271
272 * name-lookup.c (lookup_arg_dependent): Handle block-scope
273 function declarations correctly.
274
275 * semantics.c (finish_id_expression): Correct handling of
276 conversion operators to dependent types.
277
278 * typeck.c (lookup_destructor): Allow the use of destructors from
279 base classes.
280
281 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
282
283 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
284 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
285 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
286 the field is named TEMPLATE_TYPE_PARM_INDEX.
287
288 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
289
290 PR c++/14545
291 * parser.c (cp_parser_functional_cast): A cast to anything
292 but integral or enumaration type is not an integral constant
293 expression.
294 * pt.c (value_dependent_expression_p): Handle cast expressions
295 without operands (such as "int()").
296
297 2004-03-18 Mark Mitchell <mark@codesourcery.com>
298
299 * semantics.c (finish_pseudo_destructor_expr): Allow differing
300 cv-qualification between the type named by the
301 pseudo-destructor-name and the object-type.
302
303 * search.c (accessible_base_p): Handle non-proper bases.
304
305 * name-lookup.c (do_nonmember_using_decl): If a using declaration
306 refers to a single overloaded function, set the type of the
307 function.
308 * tree.c (lvalue_type): Simplify.
309 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
310 unknown type.
311 (build_unary_op): Handle OVERLOADs with known types.
312
313 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
314 function templates.
315
316 * parser.c (cp_parser_postfix_expression): Handle the use of
317 "typename" in non-dependent contexts. Convert appropriately when
318 when using a qualified name after "->" or ".".
319
320 * call.c (conditional_conversion): Honor the requirement that some
321 conversions refer to the original object.
322
323 2004-03-18 Mark Mitchell <mark@codesourcery.com>
324
325 * call.c (build_conditional_expr): Do not call force_rvalue for
326 operands of void_type when the conditional expression itself has
327 void type.
328 * name-lookup.c (pushdecl): Don't consider a declaration of a
329 function named "main" to be an overload of a type named "main".
330 * parser.c (cp_parser_template_name): Perform name lookup when the
331 template name is proceeded by "template" if the qualifying scope
332 is non-dependent.
333 * typeck.c (composite_pointer_type_r): Correctly handle
334 pointer-to-member types.
335 (build_const_cast): Likewise.
336
337 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
338
339 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
340 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
341 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
342 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
343 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
344 (TYPEOF_TYPE_EXPR): New macro.
345 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
346 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
347 * pt.c (tsubst): Likewise.
348 * semantics.c (finish_typeof): Likewise.
349 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
350 and TEMPLATE_TYPE_PARM.
351 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
352 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
353
354 2004-03-16 Mark Mitchell <mark@codesourcery.com>
355
356 PR c++/14586
357 * cp-tree.h (build_new_op): Change prototype.
358 (build_x_binary_op): Likewise.
359 * call.c (build_new_op): Add overloaded_p parameter.
360 * decl2.c (grok_array_decl): Adjust call to build_new_op.
361 * parser.c (cp_parser_binary_expression): Note that uses of
362 overloaded operators prevents an expression from being considered
363 an integral constant.
364 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
365 build_x_binary_op.
366 * semantics.c (finish_call_expr): Likewise.
367 * typeck.c (rationalize_conditional_expr): Likewise.
368 (build_x_indirect_ref): Likewise.
369 (build_x_binary_op): Likewise.
370 (build_x_unary_op): Likewise.
371 (build_x_compound_expr): Likewise.
372 (build_modify_expr): Likewise.
373 * typeck2.c (build_x_arrow): Likewise.
374
375 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
376
377 * cp-lang.c, ptree.c: Update copyright.
378
379 2004-03-13 Mark Mitchell <mark@codesourcery.com>
380
381 PR c++/14550
382 * parser.c (cp_parser_non_integral_constant_expression): Encode
383 more of the idiom that surrounded calls to this function within
384 the function itself
385 (cp_parser_primary_expression): Adjust accordingly.
386 (cp_parser_postfix_expression): Likewise.
387 (cp_parser_unary_expression): Likewise.
388 (cp_parser_cast_expression): Likewise.
389 (cp_parser_assignment_expression): Likewise.
390 (cp_parser_expression): Likewise.
391 (cp_parser_new_expression): Note that new-expressions are not
392 allowed in integral constant expressions.
393 (cp_parser_delete_expression): Likewise.
394
395 2004-03-12 Matt Austern <austern@apple.com>
396
397 * decl2.c (maybe_make_one_only): Look at
398 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
399 to make an explicit instantiation weak.
400 * method.c (use_thunk): Make sure we call comdat_linkage
401 when appropriate.
402 * pt.c (do_type_instantiation): On systems where weak symbols
403 don't go in a static archive's TOC, explicit instantiation of a
404 class must imply *explicit* instantiation of its memeber.
405
406 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
407
408 * call.c, cp-tree.h, pt.c: Fix comment typos.
409
410 2004-03-10 Mark Mitchell <mark@codesourcery.com>
411
412 PR c++/14510
413 * decl.c (xref_tag): Disregard non-type declarations when
414 looking up a tagged type.
415
416 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
417
418 PR c++/14397
419 * call.c (convert_like_real): Build a const qualified temporary,
420 when testing ctor access.
421
422 2004-03-09 Mark Mitchell <mark@codesourcery.com>
423
424 * call.c (initialize_reference): Fix typo.
425
426 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
427
428 PR c++/14409
429 * pt.c (determine_specialization): For member templates, match also
430 constness.
431
432 PR c++/14448
433 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
434 non-dependent.
435 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
436
437 2004-03-09 Mark Mitchell <mark@codesourcery.com>
438
439 PR c++/14230
440 * call.c (initialize_reference): Handle initializers that are
441 class-member access expressions applies to rvalues.
442
443 2004-03-09 Mark Mitchell <mark@codesourcery.com>
444
445 PR c++/14432
446 * name-lookup.c (supplement_binding): Ignore functions that are
447 marked DECL_ANTICIPATED.
448
449 2004-03-08 Mark Mitchell <mark@codesourcery.com>
450
451 PR c++/14401
452 * class.c (check_field_decls): Complain about non-static data
453 members of reference type in unions. Propagate
454 CLASSTYPE_REF_FIELDS_NEED_INIT and
455 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
456 data members.
457 * init.c (perform_member_init): Complain about mbmers with const
458 type that are not explicitly initialized.
459
460 2004-03-08 Mark Mitchell <mark@codesourcery.com>
461
462 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
463 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
464 (lang_identifier): Remove implicit_decl and error_locus.
465 (IDENTIFIER_IMPLICIT_DECL): Remove.
466 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
467 (IDENTIFIER_ERROR_LOCUS): Likewise.
468 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
469 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
470 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
471 (implicitly_declare): Remove.
472 * decl.c (warn_extern_redeclared_static): Remove check of
473 IDENTIFIER_IMPLICIT_DECL.
474 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
475 (implicitly_declare): Remove.
476 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
477 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
478 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
479 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
480 in the innermost scope, rather than at namespace scope.
481 * name-lookup.c (push_local_binding): Give it external linkage.
482 (pushdecl): Remove dead code.
483 * name-lookup.h (push_local_binding): Declare it.
484 * ptree.c (cxx_print_identifier): Don't print
485 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
486 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
487 not IDENTIFIER_ERROR_LOCUS.
488 * typeck.c (build_function_call): Remove dead code.
489
490 2004-03-08 Jason Merrill <jason@redhat.com>
491
492 PR c++/13170
493 * decl.c (xref_tag): Remove attribute handling.
494 * cp-tree.h: Adjust prototype.
495 * decl.c, parser.c, rtti.c: Adjust callers.
496 * parser.c (cp_parser_class_head): Pass back attributes in the
497 class head.
498 (cp_parser_class_specifier): Adjust.
499
500 2004-03-08 Matt Austern <austern@apple.com>
501
502 PR debug/14079
503 * name-lookup.c (add_decl_to_level): Add extern variables, as well
504 as static, to static_decls array.
505
506 2004-03-05 Jason Merrill <jason@redhat.com>
507
508 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
509
510 2004-03-04 Geoffrey Keating <geoffk@apple.com>
511
512 * decl.c (grokfndecl): Update old incorrect comment.
513 (grokvardecl): Diagnose C++ variables of type with no linkage.
514
515 2004-03-01 Mark Mitchell <mark@codesourcery.com>
516
517 PR c++/14369
518 * pt.c (build_non_dependent_expr): Do not create a
519 NON_DEPENDENT_EXPR for a THROW_EXPR.
520
521 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
522
523 PR c++/14369
524 * error.c (dump_expr): Handle THROW_EXPR.
525
526 2004-03-01 Mark Mitchell <mark@codesourcery.com>
527
528 PR c++/14360
529 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
530 lookup if ordinary name-lookup finds a non-function.
531 * pt.c (tsubst_copy_and_build): Likewise.
532
533 PR c++/14361
534 * parser.c (cp_parser_late_parsing_default_args): Check that there
535 are no extra tokens after the end of the default-argument
536 expression.
537
538 2004-03-01 Mark Mitchell <mark@codesourcery.com>
539
540 PR c++/14324
541 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
542 having C++ linkage for name-mangling purposes.
543
544 PR c++/14260
545 * parser.c (cp_parser_direct_declarator): Recognize constructor
546 declarators that use a template-id to name the class being
547 constructed.
548
549 PR c++/14337
550 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
551 (tsubst_expr): Do not call tsubst_copy, even when
552 processing_template_decl.
553
554 2004-03-01 Jeff Law <law@redhat.com>
555
556 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
557 the proper type.
558
559 2004-02-29 Mark Mitchell <mark@codesourcery.com>
560
561 PR c++/14138
562 * name-lookup.h (push_scope): Change prototype.
563 * name-lookup.c (push_scope): Do not reenter the current class
564 scope.
565 * decl.c (grokfndecl): Check return code from push_scope before
566 calling pop_scope.
567 * decl2.c (check_classfn): Likewise.
568 * parser.c (cp_parser_conversion_function_id): Likewise.
569 (cp_parser_init_declarator): Likewise.
570 (cp_parser_direct_declarator): Likewise.
571 (cp_parser_class_specifier): Likewise.
572 (cp_parser_class_head): Likewise.
573 (cp_parser_lookup_name): Likewise.
574 (cp_parser_constructor_declarator_p): Likewise.
575 * pt.c (instantiate_class_template): Likewise.
576 (resolve_typename_type): Likewise.
577
578 2004-02-29 Mark Mitchell <mark@codesourcery.com>
579
580 PR c++/14267
581 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
582 extension.
583
584 PR debug/12103
585 * class.c (update_vtable_entry_for_fn): Do not go through
586 covariance machinery if the type returned by an overrider is the
587 same as the original.
588
589 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
590
591 * call.c: Fix a comment typo.
592
593 2004-02-27 Ziemowit Laski <zlaski@apple.com>
594
595 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
596
597 2004-02-26 Mark Mitchell <mark@codesourcery.com>
598
599 PR c++/14278
600 * parser.c (cp_parser_parameter_declaration_list): Commit
601 to fewer tentative parses.
602
603 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
604
605 PR c++/14284
606 * pt.c (dependent_type_p_r): A template template parameter is a
607 dependent type.
608
609 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
610
611 PR c++/14246
612 * mangle.c (write_template_arg_literal): Don't rely on identity for
613 boolean constants.
614
615 2004-02-24 Jason Merrill <jason@redhat.com>
616
617 * tree.c (build_exception_variant): Use check_qualified_type.
618
619 2004-02-23 Zack Weinberg <zack@codesourcery.com>
620 Kazu Hirata <kazu@cs.umass.edu>
621
622 * decl.c (cxx_init_decl_processing): Don't check
623 flag_writable_strings.
624
625 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
626
627 PR c++/14156
628 * typeck.c (maybe_warn_about_returning_address_of_location):
629 Change check for VAR_DECL to use DECL_P instead.
630
631 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
632
633 PR c++/14250
634 * cvt.c (build_expr_type_conversion): Type must be complete before
635 looking up for conversions.
636
637 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
638
639 PR c++/14143
640 * name-lookup.c (arg_assoc_class): Don't look into template
641 arguments if it is not a primary template.
642
643 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
644
645 PR c++/12007
646 * method.c (use_thunk): Always clone function argument tree.
647
648 2004-02-20 Mark Mitchell <mark@codesourcery.com>
649
650 PR c++/14199
651 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
652
653 PR c++/14173
654 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
655 for all type variants.
656
657 2004-02-19 Mark Mitchell <mark@codesourcery.com>
658
659 PR c++/13927
660 * decl.c (duplicate_decls): Return error_mark_node for invalid
661 redeclarations.
662 * name-lookup.c (push_namespace): Ignore the return value from
663 pushdecl.
664 * pt.c (push_template_decl_real): Robustify.
665
666 PR c++/14186
667 * name-lookup.c (push_class_level_binding): Do not complain about
668 adding a binding for a member whose name is the same as the
669 enclosing class if the member is located in a base class of the
670 current class.
671
672 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
673
674 PR c++/14181
675 * parser.c (cp_parser_new_expression): Parse an ill-formed
676 direct-new-declarator after a parenthesized type-id to emit good
677 diagnostic.
678
679 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
680
681 * cp-tree.def, cvt.c: Update copyright.
682
683 2004-02-17 Mark Mitchell <mark@codesourcery.com>
684
685 PR c++/11326
686 * cp-tree.h (abi_version_at_least): Remove.
687 * mangle.c: Include flags.h.
688
689 2004-02-15 Mark Mitchell <mark@codesourcery.com>
690
691 PR c++/13971
692 * call.c (build_conditional_expr): Handle conversions between
693 class types which result in differently cv-qualified type
694 variants.
695
696 PR c++/14086
697 * class.c (delete_duplicate_fields_1): Remove.
698 (delete_duplicate_fields): Likewise.
699 (finish_struct_anon): Remove check for members with the same name
700 as their enclosing class.
701 (check_field_decls): Do not call duplicate_fields.
702 * decl.c (grokdeclarator): Remove check for static data members
703 with the same name as their enclosing class.
704 * name-lookup.c (push_class_level_binding): Check for members with
705 the same name as their enclosing class.
706
707 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
708
709 PR c++/14085
710 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
711
712 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
713
714 PR c++/13635
715 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
716 has full set of arguments.
717
718 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
719
720 PR c++/13927
721 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
722
723 2004-02-13 Mark Mitchell <mark@codesourcery.com>
724
725 PR c++/14122
726 * cp-tree.h (delete_sanity): Change prototype.
727 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
728 Remove dead code. Adjust code to warn about deleting an array.
729 * typekc.c (decay_conversion): Use build_address and build_nop.
730
731 PR c++/14108
732 * search.c (accessible_p): Do not check access in thunks.
733
734 PR c++/14083
735 * call.c (build_conditional_expr): Call force_rvalue on the
736 non-void operand in the case that one result is a throw-expression
737 and the other is not.
738
739 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
740
741 PR c++/9851
742 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
743 the type name and look ahead for ::~, and bail out early with a
744 better error message if the parse is going to fail.
745
746 2004-02-12 Mark Mitchell <mark@codesourcery.com>
747
748 * call.c (conversion_kind): New type.
749 (conversion_rank): Likewise.
750 (conversion): Likewise.
751 (CONVERSION_RANK): New macro.
752 (conversion_obstack): New variable.
753 (obstack_initialized): Likewise.
754 (z_candidate): Change type of convs and second_conv.
755 (candidate_warning): New type.
756 (IDENTITY_RANK): Remove.
757 (EXACT_RANK): Likewise.
758 (PROMO_RANK): Likewise.
759 (STD_RANK): Likewise.
760 (PBOOL_RANK): Likewise.
761 (USER_RANK): Likewise.
762 (ELLIPSIS_RANK): Likewise.
763 (BAD_RANK): Likewise.
764 (ICS_RANK): Likewise.
765 (ICS_STD_RANK): Likewise.
766 (ICS_USER_FLAG): Likewise.
767 (ICS_ELLIPSIS_FLAG): Likewise.
768 (ICS_THIS_FLAG): Likewise.
769 (ICS_BAD_FLAG): Likewise.
770 (NEED_TEMPORARY_P): Likewise.
771 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
772 (USER_CONV_CAND): Likewise.
773 (USER_CONV_FN): Likewise.
774 (conversion_obstack_alloc): New function.
775 (alloc_conversion): Likewise.
776 (validate_conversion_obstack): Likewise.
777 (alloc_conversions): Likewise.
778 (build_conv): Adjust to deal with new conversion data structures.
779 (build_identity_conv): New function.
780 (build_ambiguous_conv): Likewise.
781 (standard_conversion): Adjust to deal with new conversion data
782 structures.
783 (convert_class_to_reference): Likewise.
784 (direct_reference_binding): Likewise.
785 (reference_binding): Likewise.
786 (implicit_conversion): Likewise.
787 (add_candidate): Likewise.
788 (add_function_candidate): Likewise.
789 (add_conv_candidate): Likewise.
790 (build_builtin_candidate): Likewise.
791 (print_z_candidate): Likewise.
792 (merge_conversion_sequences): Likewise.
793 (build_user_type_conversion_1): Likewise.
794 (build_user_type_conversion): Likewise.
795 (build_new_function_call): Likewise.
796 (build_object_call): Likewise.
797 (conditional_conversion): Likewise.
798 (build_conditional_expr): Likewise.
799 (build_new_op): Likewise.
800 (build_op_delete_call): Likewise.
801 (convert_like_real): Likewise.
802 (build_over_call): Likewise.
803 (build_new_method_call): Likewise.
804 (is_subseq): Likewise.
805 (maybe_handle_implicit_object): Likewise.
806 (maybe_handle_ref_bind): Likewise.
807 (compare_ics): Likewise.
808 (source_type): Likewise.
809 (add_warning): Likewise.
810 (joust): Likewise.
811 (can_convert_arg): Likewise.
812 (can_convert_arg_bad): Likewise.
813 (perform_implicit_conversion): Likewise.
814 (perform_direct_initialization_if_possible): Likewise.
815 (initialize_reference): Likewise.
816 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
817 * cp-tree.def (WRAPPER): Likewise.
818 (IDENTITY_CONV): Remove.
819 (LVALUE_CONV): Likewise.
820 (QUAL_CONV): Likewise.
821 (STD_CONV): Likewise.
822 (PTR_CONV): Likewise.
823 (PMEM_CONV): Likewise.
824 (BASE_CONV): Likewise.
825 (REF_BIND): Likewise.
826 (USER_CONV): Likewise.
827 (AMBIG_CONV): Likewise.
828 (RVALUE_CONV): Likewise.
829 * cp-tree.h (tree_wrapper): Remove.
830 (WRAPPER_ZC): Remove.
831 (lang_tree_node): Remove wrapper.
832 (LOOKUP_SPECULATIVELY): Remove.
833 (build_op_delete_call): Adjust prototype.
834 (validate_conversion_obstack): Declare.
835 (build_zc_wrapper): Remove.
836 * cvt.c (convert_to_reference): Remove dead code.
837 (ocp_convert): Likewise.
838 * decl.c (redeclaration_error_message): Correct handling of
839 templates.
840 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
841 (cp_tree_node_structure): Remove WRAPPER case.
842 * decl2.c (finish_file): Call validate_conversion_obstack.
843 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
844 (build_op_delete_call): Likewise.
845 (build_x_delete): Likewise.
846 (build_delete): Adjust call to build_op_delete_call.
847 * pt.c (tsubst_friend_declaration): Adjust code to determine
848 whether or not a friend template is a definition.
849 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
850 * tree.c (build_zc_wrapper): Remove.
851
852 2004-02-12 Zack Weinberg <zack@codesourcery.com>
853
854 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
855 * cp-tree.h: Don't declare cxx_builtin_type_decls.
856 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
857 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
858
859 2004-02-10 Mark Mitchell <mark@codesourcery.com>
860
861 * typeck.c (lookup_destructor): Fix typo in error message.
862
863 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
864
865 * call.c, parser.c, tree.c: Fix comment typos.
866
867 2004-02-07 Zack Weinberg <zack@codesourcery.com>
868
869 Bug 13856
870 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
871 * decl.c (duplicate_decls, start_function): Likewise.
872
873 2004-02-07 Zack Weinberg <zack@codesourcery.com>
874
875 * name-lookup.c (pushdecl): Issue shadow warnings directly.
876 * parser.c (free_parser_stacks): Delete.
877
878 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
879
880 * rtti.c: Update copyright.
881
882 2003-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
883
884 PR c++/14033
885 * decl.c (require_complete_types_for_parms): Do not insert
886 error_mark_node in the parameter list.
887
888 2003-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
889
890 PR c++/14028
891 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
892 error when terminator can not be found.
893
894 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
895
896 Make-lang.in (po-generated): Delete.
897
898 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
899
900 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
901 targetm.calls.promote_prototypes.
902
903 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
904
905 PR middle-end/13750
906 Revert:
907 2004-01-15 Geoffrey Keating <geoffk@apple.com>
908 PR pch/13361
909 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
910 (handle_pragma_implementation): Likewise.
911
912 2004-02-05 Mark Mitchell <mark@codesourcery.com>
913
914 PR c++/13714
915 * typeck.c (lookup_destructor): Tweak error message.
916
917 2004-02-05 Jan Hubicka <jh@suse.cz>
918
919 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
920 functions.
921
922 2003-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
923
924 PR c++/14008
925 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
926 code, only emits the diagnostic now. Added lookup of the identifier
927 and support for qualified ids.
928 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
929 Parse an (invalid) type name as id-expression within a declarator.
930 (cp_parser_simple_declaration): Use it.
931 (cp_parser_member_declaration): Likewise.
932 (cp_parser_make_typename_type): New function. Handle errors through
933 cp_parser_diagnose_invalid_typename.
934 (cp_parser_elaborated_type_specifier): Use it.
935
936 2004-02-04 Mark Mitchell <mark@codesourcery.com>
937
938 PR c++/13932
939 * call.c (convert_like_real): Use "converting" rather than
940 "argument" as the descriptive keyword to
941 dubious_conversion_warnings.
942 * typeck.c (convert_for_assignment): Do not call
943 dubious_conversion_warnings.
944
945 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
946
947 PR c++/13086
948 * init.c (build_delete): Emit a more informative error message in
949 case of an incomplete type, and on the correct source line.
950
951 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
952
953 * error.c, search.c: Update copyright.
954
955 2004-02-04 Mark Mitchell <mark@codesourcery.com>
956
957 PR c++/9941
958 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
959 linkage for the typeinfo name string.
960
961 2004-02-04 Mark Mitchell <mark@codesourcery.com>
962
963 PR c++/13969
964 * cp-tree.h (fold_non_dependent_expr): New function.
965 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
966 (cp_parser_template_argument): Use fold_non_dependent_expr.
967 (cp_parser_direct_declarator): Likewise.
968 * pt.c (fold_non_dependent_expr): New function.
969 (convert_nontype_argument): Use it.
970 (tsubst_qualified_id): Simplify.
971 (tsubst_copy_and_build): Likewise.
972
973 2004-02-04 Mark Mitchell <mark@codesourcery.com>
974
975 * decl.c (cxx_push_function_context): Do not set
976 current_function_is_thunk.
977 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
978 actual function.
979
980 2003-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
981
982 PR c++/13997
983 * pt.c (more_specialized_class): Increase processing_template_decl
984 while partial ordering.
985
986 2004-02-03 Mark Mitchell <mark@codesourcery.com>
987
988 PR c++/13925
989 * decl.c (start_function): Do not call pushdecl for any
990 instantiation or specialization of a primary template.
991
992 2004-02-03 Mark Mitchell <mark@codesourcery.com>
993
994 PR c++/13950
995 * parser.c (cp_parser_class_name): Robustify.
996
997 PR c++/13970
998 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
999
1000 PR c++/14002
1001 * semantics.c (finish_id_expression): Do not return an
1002 IDENTIFIER_NODE when lookup finds a PARM_DECL.
1003
1004 2004-02-03 Mark Mitchell <mark@codesourcery.com>
1005
1006 PR c++/13978
1007 * pt.c (build_non_dependent_expr): Do not build
1008 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
1009
1010 PR c++/13968
1011 * semantics.c (finish_id_expression): Do not return an
1012 IDENTIFIER_NODE when lookup finds a VAR_DECL.
1013
1014 PR c++/13975
1015 * parser.c (cp_parser_simple_declaration): When skipping to the
1016 end of the statement swallow the terminating semicolon.
1017
1018 2004-02-02 Mark Mitchell <mark@codesourcery.com>
1019
1020 PR c++/13113
1021 * init.c (build_offset_ref): Improve error recovery for invalid
1022 uses of non-static member functions.
1023
1024 PR c++/13854
1025 * cp-tree.h (cp_build_type_attribute_variant): New function.
1026 * class.c (build_clone): Use cp_build_type_attribute_variant.
1027 * decl.c (duplicate_decls): Likewise.
1028 * pt.c (copy_default_args_to_explicit_spec): Likewise.
1029 (tsubst_function_type): Likewise.
1030 * tree.c (build_exception_variant): Check attributes before
1031 concluding that two types are the same.
1032 (cp_build_type-attribute_variant): New method.
1033 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
1034
1035 PR c++/13907
1036 * call.c (convert_class_to_reference): Keep better track of
1037 pedantically invalid user-defined conversions.
1038
1039 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1040
1041 PR c++/13957
1042 * pt.c (tsubst_qualified_id): Improved error message when a type
1043 is expected but not found.
1044
1045 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
1046
1047 * class.c: Fix comment typos.
1048 * decl.c: Likewise.
1049 * error.c: Likewise.
1050 * parser.c: Likewise.
1051 * pt.c: Likewise.
1052 * search.c: Likewise.
1053 * typeck.c: Likewise.
1054
1055 2004-01-30 Richard Henderson <rth@redhat.com>
1056
1057 PR c++/13693
1058 * method.c (use_thunk): Don't force_target_expr for void thunks.
1059 * tree.c (build_target_expr_with_type): Assert non-void type.
1060 (force_target_expr): Likewise.
1061
1062 2004-01-30 Michael Matz <matz@suse.de>
1063
1064 * parser.c (cp_parser_labeled_statement): Accept case ranges.
1065
1066 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1067
1068 DR206
1069 PR c++/13813
1070 * decl.c (grokdeclarator): Check immediatly type completeness for
1071 non-dependent types.
1072
1073 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1074
1075 PR c++/13683
1076 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
1077 a sizeof expression.block
1078
1079 2004-01-29 Mark Mitchell <mark@codesourcery.com>
1080
1081 PR c++/13883
1082 * mangle.c (write_encoding): Correct encoding of member template
1083 constructors.
1084
1085 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1086
1087 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
1088 template name as it was `<::' (digraph typo).
1089 (cp_parser_nth_token_starts_template_argument_list_p): New function.
1090 (cp_parser_id_expression): Use it.
1091 (cp_parser_nested_name_specifier_opt): Likewise.
1092 (cp_parser_template_name): Likewise.
1093 (cp_parser_class_name): Likewise.
1094 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
1095
1096 2004-01-28 Mark Mitchell <mark@codesourcery.com>
1097
1098 PR c++/13791
1099 * typeck.c (merge_types): Do not merge attributes into
1100 TYPENAME_TYPEs.
1101
1102 PR c++/13736
1103 * parser.c (cp_parser_direct_declarator): Do not prevent
1104 backtracking inside a parenthesized declarator.
1105 (cp_parser_parameter_declaration): Fix typo in comment.
1106
1107 2004-01-28 Jan Hubicka <jh@suse.cz>
1108
1109 * semantics.c (expand_body) Do emit_associated_thunks before
1110 expansion.
1111
1112 2004-01-27 Devang Patel <dpatel@apple.com>
1113
1114 * name-lookup.c: Include "debug.h"
1115 (do_namespace_alias): Invoke debug_hooks to emit debug info
1116 for namespace alias.
1117 (do_local_using_decl): Invoke debug_hooks to emit debug info
1118 for using decl.
1119 (do_class_using_decl): Same.
1120 (do_toplevel_using_decl): Same.
1121 (do_using_directive): Same.
1122 (cp_emit_debug_info_for_using): New function.
1123 * Make-lang.in (cp/parser.o): Depend on debug.h
1124 (cp/name-lookup.o): Same.
1125
1126 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1127
1128 * cp-tree.h (language_function, lang_type_header): Use
1129 BOOL_BITFIELD.
1130 * name-lookup.h (cp_binding_level): Likewise.
1131
1132 2004-01-26 Mark Mitchell <mark@codesourcery.com>
1133
1134 PR c++/13663
1135 * semantics.c (finish_for_expr): Check for unresolved overloaded
1136 functions.
1137
1138 * class.c (add_method): Just check processing_template_decl to
1139 determine whether or not we are within a template.
1140 * decl2.c (maybe_retrofit_in_chrg): Likewise.
1141 * init.c (decl_constant_value): Check the type of the declaration,
1142 not TREE_READONLY.
1143 * name-lookup.c (maybe_push_to_top_level): Rename to ...
1144 (push_to_top_level): ... this.
1145 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
1146 * pt.c (push_template_decl_real): Reorder condition for speed.
1147 (convert_template_argument): Use dependency-checking functions in
1148 place of uses_template_parms.
1149 (lookup_template_class): Avoid calling uses_template_parms more
1150 than once.
1151 (uses_template_parms): Reimplement, using dependency-checking
1152 functions.
1153 (instantiate_class_template): Use push_to_top_level, not
1154 maybe_push_to_top_level.
1155 (type_unification_real): Simplify.
1156 (type_dependent_expression_p): Handle OFFSET_REFs and
1157 TEMPLATE_DECLs.
1158 (any_dependent_template_arguments_p): Handle multiple levels of
1159 template argument.
1160 * semantics.c (expand_or_defer_fn): Do not check
1161 uses_template_parms for template instantiations.
1162 * typeck.c (comptypes): Avoid calling cp_type_quals.
1163
1164 2004-01-25 Mark Mitchell <mark@codesourcery.com>
1165
1166 PR c++/13833
1167 * call.c (build_over_call): Do not convert arguments when
1168 processing a template.
1169 * pt.c (build_non_dependent_expr): Do not build a
1170 NON_DEPENDENT_EXPR for arithmetic constants.
1171
1172 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1173
1174 PR c++/13810
1175 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
1176 returns a TYPE_DECL. no further lookup is required.
1177 * semantics.c (check_template_template_default_arg): A TYPE_DECL
1178 is invalid. Rework to give better diagnostics.
1179
1180 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1181
1182 PR c++/13797
1183 * pt.c (instantiate_class_template): Add an error_mark_node
1184 check.
1185 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
1186
1187 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
1188
1189 PR c++/13701
1190 * decl.c (finish_function): Move the call to
1191 finish_fname_decls below the call to
1192 finish_eh_spec_block.
1193
1194 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
1195
1196 * optimize.c, typeck2.c: Update copyright.
1197
1198 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
1199
1200 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
1201 init.c, mangle.c, typeck.c: Update copyright.
1202
1203 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
1204
1205 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
1206
1207 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
1208
1209 * Make-lang.in: Replace $(docdir) with doc.
1210 (c++.info, c++.srcinfo): Dummy entry.
1211 (c++.man, c++.srcman): New rules.
1212 (c++.install-man): Revamp rule.
1213
1214 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
1215
1216 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
1217 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
1218 immediate $(shell) instead of deferred backquote.
1219
1220 2004-01-19 Mark Mitchell <mark@codesourcery.com>
1221
1222 PR c++/13651
1223 * parser.c (cp_parser_postfix_expression): When encountering
1224 incomplete type on left-hand side of "->" or ".", treat the entire
1225 expression as erroneous.
1226
1227 PR c++/13592
1228 * call.c (build_field_call): Remove.
1229 (n_build_method_call): Likewise.
1230 (build_method_call): Likewise.
1231 (build_new_method_call): Do not call build_field_call.
1232 * class.c (n_build_method_call): Remove.
1233 (print_class_statistics): Do not print it.
1234 * cp-tree.h (build_method_call): Remove declaration.
1235 (finish_object_call_expr): Likewise.
1236 (build_new_1): Do not use build_method_call.
1237 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
1238 when the function appearing on the right-hand-side of "." or "->"
1239 is not actually a function.
1240 * pt.c (tsubst_copy_and_build): Likewise.
1241 * semantics.c (finish_object_call_expr): Remove.
1242
1243 2004-01-18 Mark Mitchell <mark@codesourcery.com>
1244
1245 PR c++/13710
1246 * pt.c (tsubst): Use finish_typeof.
1247
1248 2004-01-18 Jason Merrill <jason@redhat.com>
1249
1250 PR c++/11725
1251 * except.c (build_throw): In a template, set
1252 current_function_returns_abnormally.
1253
1254 2004-01-17 Fred Fish <fnf@intrinsity.com>
1255
1256 PR c++/11895
1257 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
1258 except don't call array_type_nelts() with a VECTOR_TYPE.
1259
1260 2004-01-16 Jan Hubicka <jh@suse.cz>
1261
1262 * mangle.c (write_mangled_name): Remove inline modifier.
1263
1264 2004-01-16 Mark Mitchell <mark@codesourcery.com>
1265
1266 PR c++/13574
1267 * decl.c (compute_array_index_type): Fix grammar in comment.
1268 * init.c (build_zero_init): Handle zero-sized arrays correctly.
1269
1270 PR c++/13178
1271 * call.c (name_as_c_string): Print conversion operator names
1272 correctly.
1273
1274 PR c++/13478
1275 * call.c (initialize_reference): Pass -1 for inner parameter to
1276 convert_like_real.
1277
1278 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1279
1280 PR c++/13407
1281 * parser.c (cp_parser_base_specifier): Check for an invalid
1282 keyword `typename' and emit an user-friendly error message.
1283
1284 2004-01-15 Geoffrey Keating <geoffk@apple.com>
1285
1286 PR pch/13361
1287 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
1288 (handle_pragma_implementation): Likewise.
1289
1290 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1291
1292 PR c++/9259
1293 * typeck.c (build_class_member_access_expr): Allow to access members
1294 of the currently open class.
1295 (finish_class_member_access_expr): Likewise.
1296
1297 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
1298
1299 PR c++/13659
1300 * name-lookup.c (validate_nonmember_using_decl): Take scope and
1301 name by value, instead of computing them.
1302 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
1303 arguments. Pass them to validate_nonmember_using_decl.
1304 * name-lookup.h (do_local_using_decl): Adjust.
1305 (do_toplevel_using_decl): Likewise.
1306 * parser.c (cp_parser_using_declaration): Likewise.
1307 * pt.c (tsubst_expr): Likewise.
1308
1309 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
1310
1311 PR c++/13594
1312 PR c++/13658
1313 * name-lookup.c (qualified_lookup_using_namespace): Search
1314 strongly-associated namespaces first, and only then try other
1315 namespaces.
1316
1317 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
1318
1319 * Make-lang.in (c++.srcextra): Dummy entry.
1320
1321 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1322
1323 PR c++/8856
1324 * parser.c (cp_parser_template_name): Don't try to parse a
1325 conversion-function-id, as it cannot be a template-name.
1326 (cp_parser_simple_type_specifier): Check for invalid template-ids
1327 even after a built-in type.
1328
1329 2004-01-14 Jan Hubicka <jh@suse.cz>
1330
1331 PR c++/12850
1332 * pt.c (instantiate_decl): Do not increase function_depth.
1333
1334 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
1335
1336 PR c++/9021
1337 PR c++/11005
1338 * parser.c (cp_parser_elaborated_type_specifier): Warn about
1339 attributes and discard.
1340 * decl.c (xref_tag): Don't overwite existing attributes with
1341 NULL_TREE.
1342
1343 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1344
1345 PR c++/12335
1346 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
1347 is no destructor while looking up a BIT_NOT_EXPR.
1348
1349 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
1350
1351 * cxxfilt.c: Remove unused file.
1352
1353 2004-01-14 Jan Hubicka <jh@suse.cz>
1354
1355 Partial fix to PR c++/12850
1356 * decl2.c (mark_used): Do not proactively instantiate templates
1357 when compiling in unit-at-a-time or not optimizing.
1358 * optimize.c (maybe_clone_body): Do not increase function depth.
1359
1360 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1361
1362 PR c++/13474
1363 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
1364
1365 2003-01-12 Steven Bosscher <stevenb@suse.de>
1366
1367 PR c++/13558
1368 * parser.c (cp_parser_member_declaration): Any non-type is also
1369 not a class or a function.
1370
1371 2004-01-12 Jason Merrill <jason@redhat.com>
1372
1373 PR c++/12815
1374 * class.c (build_base_path): Do not mark vtable references as
1375 TREE_CONSTANT.
1376 (build_vtbl_ref_1): Likewise.
1377
1378 2004-01-12 Richard Henderson <rth@redhat.com>
1379
1380 PR opt/10776
1381 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
1382 (store_init_value): Use it.
1383 * decl.c (check_initializer): Expect full initialization code
1384 from store_init_value.
1385 * init.c (expand_aggr_init_1): Likewise.
1386 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
1387
1388 2004-01-12 Mark Mitchell <mark@codesourcery.com>
1389
1390 * class.c (layout_class_type): For non-POD class types, also copy
1391 the DECL_SIZE and DECL_MODE of fields to the base class type.
1392
1393 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1394
1395 PR c++/13289
1396 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
1397 calling regenerate_decl_from_template.
1398
1399 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
1400
1401 PR c++/4100
1402 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
1403 decl-specifier occurring along with a class definition.
1404
1405 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
1406
1407 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
1408 clauses to comments describing declares_class_or_enum.
1409 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
1410 false.
1411
1412 2004-01-12 Jan Hubicka <jh@suse.cz>
1413
1414 * pt.c (for_each_template_parm): Do not check for duplicates.
1415 (for_each_template_parm): Use walk_tree duplicate checking code.
1416
1417 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
1418
1419 PR c++/3478
1420 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
1421 is error_mark_node, don't add any more decl_specs.
1422 (cp_parser_init_declarator): After committing to a declaration, if
1423 the decl_specifiers start with error_mark_node, issue an error and
1424 change the type to "int".
1425
1426 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
1427
1428 PR bootstrap/7817
1429 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
1430
1431 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1432
1433 DR 337
1434 PR c++/9256
1435 * pt.c (tsubst): Substitution must fail if we are attempting to
1436 create an array with element type that is an abstract class type.
1437 * decl.c (cp_finish_decl): Strip pointers and array types recursively
1438 before calling abstract_virtuals_error.
1439
1440 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
1441
1442 * name-lookup.c (qualified_lookup_using_namespace): Consider
1443 strong using directives even if we've already found a binding.
1444
1445 2004-01-09 Mark Mitchell <mark@codesourcery.com>
1446
1447 * cp-tree.h (cxx_expand_expr): Change prototype.
1448 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
1449
1450 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1451
1452 PR c++/12573
1453 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
1454 looking into them recursively. They can be there because of the
1455 new __offsetof__ extension.
1456
1457 2004-01-07 Zack Weinberg <zack@codesourcery.com>
1458
1459 * parser.c (cp_parser_save_member_function_body): Mark the
1460 definition static.
1461
1462 2004-01-05 Mark Mitchell <mark@codesourcery.com>
1463
1464 PR c++/13057
1465 * class.c (build_clone): Copy type attributes from the original
1466 function to the clone.
1467
1468 PR c++/12815
1469 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
1470 references as constant.
1471
1472 PR c++/12132
1473 * parser.c (cp_parser_explicit_instantiation): Improve error
1474 recovery.
1475 (cp_parser_require): Improve indication of the error location.
1476
1477 PR c++/13451
1478 * parser.c (cp_parser_class_head): Reorder logic to check for
1479 invalid qualification.
1480
1481 2004-01-04 Mark Mitchell <mark@codesourcery.com>
1482
1483 PR c++/13157
1484 * name-lookup.c (lookup_using_namespace): Remove spacesp
1485 parameter.
1486 (unqualified_namespace_lookup): Likewise.
1487 (lookup_qualified_name): Adjust accordingly.
1488 (lookup_name_real): Likewise.
1489 (lookup_arg_dependent): Do not eliminate the namespace of the
1490 functions found by unqualified name lookup unless that is the
1491 current namespace.
1492
1493 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
1494
1495 * semantics.c (push_deferring_access_checks): Fix format.
1496 (resume_deferring_access_checks): Likewise.
1497 (stop_deferring_access_checks): Likewise.
1498 (pop_deferring_access_checks): Likewise.
1499 (get_deferred_access_checks): Likewise.
1500 (pop_to_parent_deferring_access_checks): Likewise.
1501 (perform_deferred_access_checks): Likewise.
1502 (perform_or_defer_access_check): Likewise.
1503
1504 2004-01-04 Richard Henderson <rth@redhat.com>
1505
1506 * call.c (build_over_call): Don't create a save_expr of an
1507 aggregate, but rather its address.
1508
1509 2004-01-04 Mark Mitchell <mark@codesourcery.com>
1510
1511 PR c++/13529
1512 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
1513 an offsetof expression.
1514
1515 * parser.c (cp_parser_parameter_declaration): Fix comment.
1516
1517 PR c++/12226
1518 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
1519 (reference_binding): Set it when appropriate.
1520 (build_temp): New function, split out from ...
1521 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
1522 (initialize_reference): Likewise.
1523
1524 PR c++/13536
1525 * parser.c (cp_parser): Add in_type_id_in_expr_p.
1526 (cp_parser_new): Initialize it.
1527 (cp_parser_postfix_expression): Set it.
1528 (cp_parser_sizeof_operand): Likewise.
1529 (cp_parser_parameteR_declaration): Do not commit early to tenative
1530 parsers when in_type_id_in_expr_p is set.
1531
1532 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1533
1534 PR c++/13094
1535 * parser.c (cp_parser_template_argument): Don't call
1536 make_unbound_class_template directly.
1537 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
1538 UNBOUND_CLASS_TEMPLATE tree node.
1539
1540 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
1541
1542 PR target/12729
1543 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
1544
1545 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1546
1547 PR c++/13520
1548 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
1549 (DECL_FUNCTION_TEMPLATE_P): Use it.
1550 (DECL_CLASS_TEMPLATE_P): Likewise.
1551 * parser.c (cp_parser_lookup_name): Add is_template parameter.
1552 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
1553 (cp_parser_template_name): Likewise.
1554 (cp_parser_elaborated_type_specifier): Likewise.
1555 (cp_parser_namespace_name): Likewise.
1556 (cp_parser_class_name): Likewise.
1557 (cp_parser_lookup_name_simple): Likewise.
1558
1559 See ChangeLog.3 for earlier changes.