re PR c++/16034 (dtor called prematurely for while-loop scoped variable)
[gcc.git] / gcc / cp / ChangeLog
1 2004-06-18 Richard Henderson <rth@redhat.com>
2
3 PR c++/16034
4 * semantics.c (begin_cond): New.
5 (finish_cond): Rewrite to handle template DECL_STMTs specially.
6 Assume that non-template decls go land before the conditional.
7 (simplify_loop_decl_cond): Likewise.
8 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
9 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
10 begin_switch_stmt, finish_switch_cond): Update to match.
11
12 2004-06-17 Jason Merrill <jason@redhat.com>
13
14 PR c++/16015
15 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
16 (finish_stmt_expr_expr): Update type after conversions.
17 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
18 Handle void initializer.
19 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
20
21 2004-06-17 Geoffrey Keating <geoffk@apple.com>
22
23 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
24 * cp-tree.h (defer_fn): Delete.
25 * decl2.c (defer_fn): Delete.
26 (finish_file): Simplify deferred_fns loops; check that
27 only used inline functions get into deferred_fns.
28 (mark_used): Inline previous contents of defer_fn.
29
30 2004-06-16 Richard Henderson <rth@redhat.com>
31
32 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
33 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
34 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
35 of CTOR_INITIALIZER ...
36 (pp_cxx_statement): ... here.
37 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
38 (finish_function): Use alloc_stmt_list to zap entire function.
39 * parser.c (cp_parser_compound_statement): Update commentary.
40 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
41 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
42 (finish_stmt_expr): Don't look through COMPOUND_STMT.
43
44 2004-06-16 Geoffrey Keating <geoffk@apple.com>
45
46 * pt.c (mark_decl_instantiated): Don't call defer_fn.
47
48 2004-06-16 Richard Henderson <rth@redhat.com>
49
50 * parser.c (cp_parser_labeled_statement): Update commentary.
51 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
52 * tree.c (mark_local_for_remap_r): Likewise.
53
54 2004-06-16 Richard Henderson <rth@redhat.com>
55
56 * parser.c (cp_parser_asm_definition): Update commentary.
57 * pt.c (tsubst_expr): Use ASM_EXPR.
58 * semantics.c (finish_asm_stmt): Likewise.
59
60 2004-06-16 Richard Henderson <rth@redhat.com>
61
62 * decl.c (finish_destructor_body): Use LABEL_EXPR.
63 * parser.c (cp_parser_statement): Update commentary.
64 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
65 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
66 * tree.c (mark_local_for_remap_r): Likewise.
67
68 2004-06-16 Richard Henderson <rth@redhat.com>
69
70 PR c++/16012
71 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
72 statement in FOR_INIT_STMT for templates.
73
74 2004-06-15 Richard Henderson <rth@redhat.com>
75
76 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
77 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
78 (genericize_try_block): Use gimplify_stmt.
79 (genericize_catch_block, genericize_eh_spec_block): Likewise.
80 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
81 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
82 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
83 (cp_tree_chain_matters_p): Remove.
84 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
85 (COMPOUND_STMT_BODY_BLOCK): New.
86 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
87 (EXPR_STMT_STMT_EXPR_RESULT): New.
88 (building_stmt_tree): Check cur_stmt_list.
89 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
90 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
91 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
92 (cp_finish_decl): Use push_cleanup.
93 (start_function, finish_function): Use statement lists.
94 (finish_stmt): Do nothing.
95 * except.c (begin_eh_spec_block): Use statement lists.
96 (check_handlers_1, check_handlers): Likewise.
97 * init.c (construct_virtual_base): Don't add extra compound stmts.
98 (build_vec_init): Likewise.
99 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
100 * name-lookup.h (struct cp_binding_level): Add statement_list.
101 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
102 (cp_parser_labeled_statement, cp_parser_expression_statement,
103 cp_parser_statement_seq_opt): Likewise.
104 (cp_parser_compound_statement): Likewise. Take bool for try block.
105 (cp_parser_selection_statement): Tidy if processing.
106 (cp_parser_already_scoped_statement): Rewrite to do what it says.
107 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
108 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
109 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
110 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
111 (finish_cond): New, rewritten from FINISH_COND.
112 (simplify_loop_decl_cond): New.
113 (finish_expr_stmt): Avoid nested EXPR_STMTs.
114 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
115 begin_else_clause, finish_else_clause, finish_if_stmt,
116 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
117 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
118 finish_for_cond, finish_for_stmt, begin_switch_stmt,
119 finish_switch_cond, finish_switch_stmt, begin_try_block,
120 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
121 finish_handler_sequence, finish_function_handler_sequence,
122 begin_handler, finish_handler_parms, finish_handler,
123 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
124 using statement lists.
125 (begin_compound_stmt): Replace has_no_scope argument with flags.
126 Update all callers. Use statement lists.
127 (finish_compound_stmt): Likewise.
128 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
129 (current_scope_stmt_stack): Remove.
130 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
131 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
132 Rewrite with statement lists.
133
134 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
135
136 * parser.c: Change all assignments of c_lex_string_translate
137 to true and false to 1 and 0.
138 (cp_lexer_read_token): Convert type of the translated string.
139 (cp_parser_skip_to_closing_parentheses): Preserve original
140 value of c_lex_string_translate, and set it to -1 while
141 running.
142 (cp_parser_cache_group): Likewise.
143 (cp_parser_cache_group_1): Renamed.
144 (cp_parser_asm_operand_list): Remove redundant setting of
145 c_lex_string_translate.
146 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
147 Handle chained strings.
148
149 2004-06-12 Andrew Pinski <apinski@apple.com>
150
151 PR c++/14639
152 Revert:
153 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
154
155 * cp-tree.h: Fix typo.
156
157 * cp-tree.h: Include cgraph.h
158 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
159 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
160
161 2004-06-12 Jason Merrill <jason@redhat.com>
162
163 PR tree-optimization/14107
164 * decl.c (finish_function): Warn about no return in all functions.
165
166 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
167
168 * cp-tree.h (struct language_function): Remove cannot_inline.
169 * decl.c (save_function_data): cannot_inline is no more.
170 (cxx_push_function_context): Likewise.
171 * decl2.c (start_objects, start_static_storage_duration_function):
172 Reset DECL_INLINE, set DECL_UNINLINABLE.
173
174 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
175
176 PR c++/15967
177 * search.c (lookup_field): Propagate the ambiguity list.
178 (lookup_fnfields): Likewise.
179
180 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
181
182 PR c++/15947
183 * parser.c (cp_parser_template_name): Ctors/dtors never need a
184 template keyword to disambiguate.
185
186 2004-06-14 Mark Mitchell <mark@codesourcery.com>
187
188 PR c++/15096
189 * decl.c (grokdeclarator): Ignore pointer-to-members when
190 computing template depth.
191
192 PR c++/14930
193 * name-lookup.c (pushtag): Do not try to put class declarations in
194 explicit specialization scopes.
195
196 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
197
198 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
199
200 2004-06-11 Mark Mitchell <mark@codesourcery.com>
201
202 PR c++/15862
203 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
204 bindings for undeclared built-ins.
205
206 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
207
208 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
209 appear at the correct location.
210
211 2004-06-10 Jason Merrill <jason@redhat.com>
212
213 PR c++/15875
214 Revert:
215 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
216 * init.c (build_offset_ref): Build SCOPE_REF with non-null
217 TREE_TYPE for non-dependent names.
218 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
219 unknown_type_node as its TREE_TYPE.
220 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
221 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
222 (dump_expr) <SCOPE_REF case>: Likewise.
223
224 2004-06-10 Mark Mitchell <mark@codesourcery.com>
225
226 PR c++/15227
227 * parser.c (cp_parser_direct_declarator): Robustify.
228
229 PR c++/15877
230 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
231 constants in non-dependent contexts.
232
233 PR c++/14211
234 PR c++/15076
235 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
236 necessary.
237
238 2004-06-10 Jakub Jelinek <jakub@redhat.com>
239
240 PR c++/14791
241 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
242 specially.
243
244 2004-06-09 Mark Mitchell <mark@codesourcery.com>
245
246 Revert:
247 PR c++/15815
248 2004-06-07 Mark Mitchell <mark@codesourcery.com>
249 * lex.c (handle_pragma_interface): Deprecate.
250 (handle_pragma_implementation): Likewise.
251
252 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
253
254 * g++spec.c (lang_specific_driver): Remove check for -lm
255 and -lmath when check it see if it was the math library.
256
257 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
258
259 PR c++/7841
260 * parser.c (cp_parser_direct_declarator): Reject constructor named
261 as qualified template-id.
262
263 2004-06-07 Mark Mitchell <mark@codesourcery.com>
264
265 PR c++/15815
266 * lex.c (handle_pragma_interface): Deprecate.
267 (handle_pragma_implementation): Likewise.
268
269 2004-06-07 Mark Mitchell <mark@codesourcery.com>
270
271 PR c++/15766
272 * parser.c (cp_parser_iteration_statement): Fix typo in error
273 message.
274
275 PR c++/14777
276 * pt.c (tsubst_default_argument): Do not defer access checks
277 while substituting into the default argument.
278
279 PR c++/15554
280 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
281 constant in a non-dependent context.
282
283 PR c++/15057
284 * except.c (build_throw): Ensure that temp_expr has been
285 initialized.
286
287 2004-06-06 Roger Sayle <roger@eyesopen.com>
288
289 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
290
291 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
292
293 PR c++/15503
294 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
295 'typename', and accept 'template'.
296
297 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
298 Jan Hubicka <jh@suse.cz>
299
300 PR c++/14639
301 * method.c (use_think): Do not mark thunk as referenced.
302
303 2004-06-03 Matt Austern <austern@apple.com>
304
305 PR c++/15428
306 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
307 is nonzero, and if we see a noninline definition of a key method,
308 make the vtables nonweak.
309
310 2004-06-02 Matt Austern <austern@apple.com>
311
312 * cp-tree.h (instantiate_decl): new boolean parameter,
313 undefined_ok. Current behavior is equivalent to its being 0.
314 * decl2.c (mark_used): Add new argument when calling instantiate_decl
315 * pt.c (mark_decl_instantiated): Unconditionally make
316 instantiations explicit unconditionally
317 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
318 since mark_decl_instantiated now does it.
319 (instantiate_class_member): New. Instantiate a member of an
320 explicitly instantiated class template.
321 (do_type_instantiation): Explicitly instantiate members of an
322 explicitly instantiated class template.
323 (instantiate_decl): if undefined_ok is nonzero, and if we're
324 trying to explicitly instantiated a template with no definition,
325 change it to an implicit instantiation.
326 (instantiate_pending_templates): Add new argument to instantiate_decl.
327 * tree.c (cp_cannot_inline_tree_fn): Likewise.
328
329 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
330
331 * cp-tree.h: Fix typo.
332
333 * cp-tree.h: Include cgraph.h
334 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
335 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
336
337 2004-06-01 Jason Merrill <jason@redhat.com>
338
339 PR c++/15142
340 * call.c (call_builtin_trap): Remove type parm.
341 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
342 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
343
344 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
345
346 PR c++/13092
347 * init.c (build_offset_ref): Build SCOPE_REF with non-null
348 TREE_TYPE for non-dependent names.
349 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
350 unknown_type_node as its TREE_TYPE.
351 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
352 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
353 (dump_expr) <SCOPE_REF case>: Likewise.
354
355 2004-06-01 Richard Henderson <rth@redhat.com>
356 Andrew Pinski <pinskia@physics.uc.edu>
357
358 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
359 * parser.c (struct cp_parser): Remove in_offsetof.
360 (cp_parser_new): Don't set it.
361 (cp_parser_unary_expression): Don't check it.
362 (cp_parser_postfix_open_square_expression): Split out from ...
363 (cp_parser_postfix_expression): ... here.
364 (cp_parser_postfix_dot_deref_expression): Likewise.
365 (cp_parser_builtin_offsetof): New.
366 (cp_parser_primary_expression): Use it.
367
368 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
369
370 PR c++/14932
371 * parser.c (cp_parser_postfix_expression): Allow subscript
372 operator in offsetof.
373
374 2004-05-31 Mark Mitchell <mark@codesourcery.com>
375
376 PR c++/15701
377 * friend.c (add_friend): Do not try to perform access checks for
378 functions from dependent classes.
379
380 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
381
382 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
383 (pp_cxx_begin_template_argument_list): Turn into a function.
384 (pp_cxx_end_template_argument_list): Likewise.
385 (pp_cxx_separate_with): Define.
386 (pp_cxx_unqualified_id): Tidy.
387 (pp_cxx_primary_expression): Likewise.
388 (pp_cxx_postfix_expression): Likewise.
389 (pp_cxx_expression): Likewise.
390 (pp_cxx_simple_type_specifier): Likewise.
391 (pp_cxx_type_specifier_seq): Likewise.
392 (pp_cxx_parameter_declaration_clause): Likewise.
393 (pp_cxx_exception_specification): Likewise.
394 (pp_cxx_direct_declarator): Likewise.
395 (pp_cxx_type_id): Likewise.
396 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
397 cxx-pretty-print.c.
398 (pp_cxx_left_paren): Likewise.
399 (pp_cxx_right_paren): Likewise.
400 (pp_cxx_left_brace): Likewise.
401 (pp_cxx_right_brace): Likewise.
402 (pp_cxx_left_bracket): Likewise.
403 (pp_cxx_right_bracket): Likewise.
404 (pp_cxx_dot): Likewise.
405 (pp_cxx_identifier): Likewise.
406 (pp_cxx_tree_identifier): Likewise.
407 (pp_cxx_ampersand): New macro.
408 (pp_cxx_star): Likewise.
409 (pp_cxx_arrow): Likewise.
410 (pp_cxx_semicolon): Likewise.
411 (pp_cxx_complement): Likewise.
412 (pp_cxx_begin_template_argument_list): Declaree.
413 (pp_cxx_end_template_argument_list): Likewise.
414 (pp_cxx_colon_colon): likewise.
415
416 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
417
418 * parser.c (cp_parser_simple_type_specifier): Explicitly test
419 against NULL_TREE.
420
421 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
422
423 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
424 typeck.c: Fix comment formatting.
425
426 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
427
428 * cp-lang.c (cp_expand_decl): Remove.
429 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
430
431 2004-05-30 Andreas Jaeger <aj@suse.de>
432
433 * lang-specs.h: Add missing initializers for .ii.
434
435 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
436
437 * decl.c (cp_make_fname_decl): Free return value from
438 fname_as_string.
439
440 2004-05-28 Mark Mitchell <mark@codesourcery.com>
441
442 PR c++/15083
443 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
444 even in a templat.e
445 * init.c (build_new): Likewise.
446
447 PR c++/15640
448 * name-lookup.c (arg_assoc): Robustify.
449
450 PR c++/15471
451 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
452 when determining the scope to use for a pointer to member.
453 (lookup_anon_field): Give it external linkage.
454 * cp-tree.h (lookup_anon_field): Declare it.
455 * expr.c (cplus_expand_constant): Use it.
456
457 2004-05-28 Mark Mitchell <mark@codesourcery.com>
458
459 PR c++/14668
460 * parser.c (cp_parser_simple_type_specifier): Call
461 maybe_note_name_used_in_class.
462
463 2004-05-28 Tom Marshall <tmarshall@real.com>
464
465 PR c++/15214
466 * class.c (finish_struct_1): Warn only if the dtor is non-private or
467 the class has friends.
468
469 2004-05-27 Adam Nemet <anemet@lnxw.com>
470
471 PR c++/12883
472 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
473 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
474
475 2004-05-24 Geoffrey Keating <geoffk@apple.com>
476
477 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
478 if it might be needed.
479 * pt.c (mark_decl_instantiated): Only call defer_fn if
480 the function actually needs processing in finish_file.
481 * decl2.c (finish_file): Add check that elements in
482 deferred_fns_used are really needed there. Remove unnecessary
483 test of DECL_SAVED_TREE.
484
485 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
486
487 * Make-lang.in: No need to specify $(LIBCPP).
488
489 2004-05-23 Mark Mitchell <mark@codesourcery.com>
490
491 PR c++/15044
492 * parser.c (cp_parser_class_head): Robustify.
493
494 PR c++/15317
495 * parser.c (cp_parser_decl_specifier_seq): Correct error in
496 comment.
497 (cp_parser_constructor_declarator_p): Treat attributes
498 as decl-specifiers.
499
500 PR c++/15329
501 * typeck.c (build_unary_op): Do not attempt to resolve casts to
502 base classes in templates.
503
504 2004-05-23 Mark Mitchell <mark@codesourcery.com>
505
506 PR c++/15165
507 * pt.c (instantiate_template): Robustify.
508
509 2004-05-23 Mark Mitchell <mark@codesourcery.com>
510
511 PR c++/15025
512 * decl.c (xref_tag): Issue errors about redeclaring template
513 classes as non-template classes.
514
515 2004-05-23 Mark Mitchell <mark@codesourcery.com>
516
517 PR c++/14821
518 * name-lookup.c (supplement_binding): Allow redefinitions of
519 namespace aliases.
520
521 PR c++/14883
522 * parser.c (cp_parser_template_argument): Robustify.
523
524 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
525
526 * class.c (alter_access): Use %E format specifier to print an
527 identifier node. Avoid looking at the IDENTIFIER_POINTER.
528 (push_lang_context): Likewise.
529 * decl.c (lookup_label): Likewise.
530 (grokdeclarator): Likewise.
531 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
532 * pt.c (do_type_instantiation): Likewise.
533 * tree.c (handle_java_interface_attribute): Likewise.
534 (handle_com_interface_attribute): Likewise.
535 (handle_init_priority_attribute): Likewise.
536
537 2004-05-22 Mark Mitchell <mark@codesourcery.com>
538
539 PR c++/15285
540 PR c++/15299
541 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
542 recognized as overloaded functions.
543
544 2004-05-22 Mark Mitchell <mark@codesourcery.com>
545
546 PR c++/15507
547 * class.c (layout_nonempty_base_or_field): Do not try to avoid
548 layout conflicts for unions.
549
550 PR c++/15542
551 * typeck.c (build_x_unary_op): Instantiate template class
552 specializations before looking for "operator &".
553
554 PR c++/15427
555 * typeck.c (complete_type): Layout non-dependent array types, even
556 in templates.
557
558 PR c++/15287
559 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
560 template.
561
562 2004-05-22 Roger Sayle <roger@eyesopen.com>
563
564 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
565 returning when TREE_TYPE is error_mark_node.
566 * typeck.c (require_complete_type): Return error_mark_node if
567 value's type is an error_mark_node.
568
569 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
570
571 * optimize.c (calls_setjmp_r): Remove.
572 (calls_setjmp_p): Remove.
573 * cp-tree.c (calls_setjmp_p): Remove.
574 * decl.c (finish_function): Do not call calls_setjmp_p.
575
576 2004-05-18 Zack Weinberg <zack@codesourcery.com>
577
578 * decl.c (cp_finish_decl): Use mark_decl_referenced.
579 * decl2.c (maybe_make_one_only): Likewise.
580 * method.c (use_thunk): Likewise.
581
582 2004-05-18 Jason Merrill <jason@redhat.com>
583
584 * class.c (build_base_path): Tidy a bit.
585
586 2004-05-14 Geoffrey Keating <geoffk@apple.com>
587
588 * name-lookup.c (struct scope_binding): New.
589 (EMPTY_SCOPE_BINDING): New.
590 (lookup_using_namespace): Take a scope_binding instead of a
591 cxx_binding.
592 (qualified_lookup_using_namespace): Likewise.
593 (cxx_binding_clear): Delete.
594 (do_nonmember_using_decl): Use a scope_binding instead of a
595 cxx_binding.
596 (lookup_tag): Don't call select_decl.
597 (ambiguous_decl): Don't return anything (and change callers to match).
598 Take a scope_binding as the second parameter.
599 (lookup_namespace_name): Use a scope_binding instead of a
600 cxx_binding.
601 (unqualified_namespace_lookup): Likewise.
602 (lookup_qualified_name): Likewise.
603 (select_decl): Take a scope_binding instead of a cxx_binding.
604 Use macros rather than hand-coding tests for type-ness.
605
606 2004-05-13 Diego Novillo <dnovillo@redhat.com>
607
608 * cp-gimplify.c: Rename from cp-simplify.c.
609 * Make-lang.in, optimize.c: Update.
610
611 2004-05-13 Diego Novillo <dnovillo@redhat.com>
612
613 Merge from tree-ssa-20020619-branch. See
614 ChangeLog.tree-ssa for details.
615
616 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
617 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
618 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
619 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
620 Merged.
621 * cp-mudflap.c: New file.
622 * cp-simplify.c:: New file.
623
624 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
625
626 PR c++/14389
627 * decl2.c (check_classfn): For member templates, compare also the
628 template parameters to match the declaration.
629 * cp-tree.h: Adjust declaration of check_classfn.
630 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
631 * friend.c (do_friend): Likewise.
632 * pt.c (tsubst_friend_function): Likewise.
633
634 2004-05-01 Zack Weinberg <zack@codesourcery.com>
635
636 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
637 Instead, dig into the representation type to find the array bound.
638
639 2004-04-30 Jason Merrill <jason@redhat.com>
640
641 Refer to base members using COMPONENT_REFs where possible.
642 * class.c (build_simple_base_path): New fn.
643 (build_base_path): Use it for non-virtual base references.
644 (layout_class_type): Change base fields to their real type
645 after layout is done.
646 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
647 * cp-lang.c (cxx_get_alias_set): Use it.
648
649 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
650
651 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
652 comment typos.
653
654 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
655
656 PR c++/15064
657 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
658 used in integral constant expressions.
659
660 2004-04-22 Mark Mitchell <mark@codesourcery.com>
661
662 * init.c (build_aggr_init): Fix accidental use of C99 construct in
663 previous change.
664
665 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
666 braced initializer.
667 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
668 * decl.c (reshape_init): Use it.
669 * init.c (perform_member_init): Remove redundant condition.
670 (build_aggr_init): Adjust to handle brace-enclosed initializers
671 correctly.
672 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
673
674 * parser.c (cp_parser_initializer_clause): Do not set
675 TREE_HAS_CONSTRUCTOR on the initializer.
676 * rtti.c (tinfo_base_init): Likewise.
677 (generic_initializer): Likewise.
678 (ptr_initializer): Likewise.
679 (ptm_initializer): Likewise.
680 (class_initializer): Likewise.
681 (get_pseudo_ti_init): Likewise.
682 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
683
684 2004-04-22 Alan Modra <amodra@bigpond.net.au>
685
686 * name-lookup.c (anonymous_namespace_name): Make static.
687
688 2004-04-19 Roger Sayle <roger@eyesopen.com>
689
690 PR middle-end/14531
691 * class.c (build_base_path): Call fold whilst building the NULL
692 pointer check expression trees.
693
694 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
695
696 * init.c (build_new_1): Don't use type size argument for Java
697 _Jv_AllocObject call.
698
699 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
700
701 * method.c (make_alias_for_thunk): Remove preprocessor guard on
702 declaration and definition.
703
704 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
705
706 PR c++/14808
707 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
708 than ASM_OUTPUT_DEF.
709
710 2004-04-08 Jakub Jelinek <jakub@redhat.com>
711
712 * decl2.c (mark_used): Don't segfault if cfun != NULL but
713 current_function_decl == NULL.
714
715 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
716
717 PR c++/3518
718 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
719 level.
720
721 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
722
723 * init.c (decl_constant_value): Don't look at DECL_INITIAL
724 of PARM_DECL.
725 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
726 or TREE_SIDE_EFFECTS of a type.
727
728 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
729
730 PR c++/14007
731 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
732 cv-qualifier unification.
733 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
734
735 2004-04-02 Jan Hubicka <jh@suse.cz>
736
737 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
738 * cp-tree.h (cp_update_decl_after_saving): Declare.
739 * tree.c (cp_update_decl_after_saving): Define.
740
741 2004-04-01 Mark Mitchell <mark@codesourcery.com>
742
743 PR c++/14803
744 * typeck.c (get_delta_difference): Call fold before returning the
745 value.
746
747 2004-04-01 Richard Henderson <rth@redhat.com>
748
749 PR c++/14804
750 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
751 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
752
753 2004-04-01 Mark Mitchell <mark@codesourcery.com>
754
755 PR c++/14810
756 * name-lookup.c (maybe_push_cleanup_level): Robustify.
757
758 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
759
760 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
761
762 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
763
764 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
765 * class.c (check_bitfield_decl): Likewise.
766 * cvt.c (type_promotes_to): Likewise.
767 * decl.c (finish_enum): Likewise.
768 * mangle.c (write_builtin_type): Likewise.
769 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
770 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
771 (build_binary_op): Likewise.
772
773 2004-03-31 Jan Hubicka <jh@suse.cz>
774
775 * tree.h (optimize_function): Kill prototype.
776 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
777 * semantics.c (expand_body): Kill.
778
779 2004-03-30 Mark Mitchell <mark@codesourcery.com>
780
781 PR c++/14724
782 * decl.c (start_decl_1): Do not decide whether or not to create a
783 new cleanup level until after the type has been completed.
784
785 PR c++/14763
786 * pt.c (tsubst_default_argument): Clear current_function_decl.
787
788 2004-03-30 Zack Weinberg <zack@codesourcery.com>
789
790 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
791
792 2004-03-29 Zack Weinberg <zack@codesourcery.com>
793
794 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
795 is null, just print the literal name and return.
796
797 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
798
799 * cxx-pretty-print.c: Fix comment typos.
800
801 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
802
803 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
804 Update copyright.
805
806 2004-03-23 Ziemowit Laski <zlaski@apple.com>
807
808 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
809 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
810 target hook.
811
812 2004-03-23 Zack Weinberg <zack@codesourcery.com>
813
814 PR 12267, 12391, 12560, 13129, 14114, 14133
815 * cp-lang.c (c_reset_state): Delete.
816 (push_file_scope, pop_file_scope): New stubs.
817 * parser.c (c_parse_file): Call sorry() here if called more than once.
818
819 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
820
821 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
822 for INTEGER_CST.
823
824 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
825
826 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
827
828 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
829
830 * error.c (enum pad): Remove.
831 (dump_qualifiers): Likewise.
832 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
833 (dump_aggr_type): Likewise.
834 (dump_type_suffix): Likewise.
835 (dump_simple_decl): Likewise.
836 (dump_function_decl): Likewise.
837 (cv_to_string): Likewise.
838 (dump_type_prefix): Likewise. Adjust return void.
839 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
840 cxx_pretty_print.h.
841 (pp_cxx_template_keyword_if_needed): Document.
842 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
843 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
844 MUST_NOT_THROW_EXPR.
845
846 2004-03-21 Mark Mitchell <mark@codesourcery.com>
847
848 PR c++/14616
849 * decl.c (cp_finish_decl): Compute the size of arrays declared in
850 templates, if their type is non-dependent.
851
852 2004-03-19 Mark Mitchell <mark@codesourcery.com>
853
854 * call.c (build_op_delete_call): Do not forget the placement
855 arguments when iterating through mutiple delete operators.
856
857 * cp-tree.h (svaed_scope): Remove last_parms.
858 (NEW_DELETE_OPNAME_P): New macro.
859 (last_function_parms): Remove.
860 (do_friend): Adjust prototype.
861 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
862 using last_function_parms.
863 (grokfndecl): Take the PARM_DECLs as an argument, rather than
864 using last_function_parms.
865 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
866 for class-specific operator new and operator delete.
867 (grok_op_properties): Do not look for allocation functions with
868 METHOD_TYPEs.
869 (start_function): Use DECL_ARGUMENTS instead of
870 last_function_parms.
871 * decl.h (last_function_parms): Do not declare.
872 * decl2.c (grokclassfn): Do not use last_function_parms.
873 * friend.c (do_friend): Remove parmdecls parameter.
874 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
875 (pop_from_top_level): Do not restore it.
876 * pt.c (check_explicit_specialization): Do not adjust
877 last_function_parms.
878
879 * name-lookup.c (do_local_using_decl): Create a local binding for
880 types brought in via using declarations.
881
882 * name-lookup.c (lookup_arg_dependent): Handle block-scope
883 function declarations correctly.
884
885 * semantics.c (finish_id_expression): Correct handling of
886 conversion operators to dependent types.
887
888 * typeck.c (lookup_destructor): Allow the use of destructors from
889 base classes.
890
891 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
892
893 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
894 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
895 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
896 the field is named TEMPLATE_TYPE_PARM_INDEX.
897
898 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
899
900 PR c++/14545
901 * parser.c (cp_parser_functional_cast): A cast to anything
902 but integral or enumaration type is not an integral constant
903 expression.
904 * pt.c (value_dependent_expression_p): Handle cast expressions
905 without operands (such as "int()").
906
907 2004-03-18 Mark Mitchell <mark@codesourcery.com>
908
909 * semantics.c (finish_pseudo_destructor_expr): Allow differing
910 cv-qualification between the type named by the
911 pseudo-destructor-name and the object-type.
912
913 * search.c (accessible_base_p): Handle non-proper bases.
914
915 * name-lookup.c (do_nonmember_using_decl): If a using declaration
916 refers to a single overloaded function, set the type of the
917 function.
918 * tree.c (lvalue_type): Simplify.
919 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
920 unknown type.
921 (build_unary_op): Handle OVERLOADs with known types.
922
923 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
924 function templates.
925
926 * parser.c (cp_parser_postfix_expression): Handle the use of
927 "typename" in non-dependent contexts. Convert appropriately when
928 when using a qualified name after "->" or ".".
929
930 * call.c (conditional_conversion): Honor the requirement that some
931 conversions refer to the original object.
932
933 2004-03-18 Mark Mitchell <mark@codesourcery.com>
934
935 * call.c (build_conditional_expr): Do not call force_rvalue for
936 operands of void_type when the conditional expression itself has
937 void type.
938 * name-lookup.c (pushdecl): Don't consider a declaration of a
939 function named "main" to be an overload of a type named "main".
940 * parser.c (cp_parser_template_name): Perform name lookup when the
941 template name is proceeded by "template" if the qualifying scope
942 is non-dependent.
943 * typeck.c (composite_pointer_type_r): Correctly handle
944 pointer-to-member types.
945 (build_const_cast): Likewise.
946
947 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
948
949 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
950 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
951 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
952 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
953 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
954 (TYPEOF_TYPE_EXPR): New macro.
955 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
956 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
957 * pt.c (tsubst): Likewise.
958 * semantics.c (finish_typeof): Likewise.
959 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
960 and TEMPLATE_TYPE_PARM.
961 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
962 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
963
964 2004-03-16 Mark Mitchell <mark@codesourcery.com>
965
966 PR c++/14586
967 * cp-tree.h (build_new_op): Change prototype.
968 (build_x_binary_op): Likewise.
969 * call.c (build_new_op): Add overloaded_p parameter.
970 * decl2.c (grok_array_decl): Adjust call to build_new_op.
971 * parser.c (cp_parser_binary_expression): Note that uses of
972 overloaded operators prevents an expression from being considered
973 an integral constant.
974 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
975 build_x_binary_op.
976 * semantics.c (finish_call_expr): Likewise.
977 * typeck.c (rationalize_conditional_expr): Likewise.
978 (build_x_indirect_ref): Likewise.
979 (build_x_binary_op): Likewise.
980 (build_x_unary_op): Likewise.
981 (build_x_compound_expr): Likewise.
982 (build_modify_expr): Likewise.
983 * typeck2.c (build_x_arrow): Likewise.
984
985 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
986
987 * cp-lang.c, ptree.c: Update copyright.
988
989 2004-03-13 Mark Mitchell <mark@codesourcery.com>
990
991 PR c++/14550
992 * parser.c (cp_parser_non_integral_constant_expression): Encode
993 more of the idiom that surrounded calls to this function within
994 the function itself
995 (cp_parser_primary_expression): Adjust accordingly.
996 (cp_parser_postfix_expression): Likewise.
997 (cp_parser_unary_expression): Likewise.
998 (cp_parser_cast_expression): Likewise.
999 (cp_parser_assignment_expression): Likewise.
1000 (cp_parser_expression): Likewise.
1001 (cp_parser_new_expression): Note that new-expressions are not
1002 allowed in integral constant expressions.
1003 (cp_parser_delete_expression): Likewise.
1004
1005 2004-03-12 Matt Austern <austern@apple.com>
1006
1007 * decl2.c (maybe_make_one_only): Look at
1008 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
1009 to make an explicit instantiation weak.
1010 * method.c (use_thunk): Make sure we call comdat_linkage
1011 when appropriate.
1012 * pt.c (do_type_instantiation): On systems where weak symbols
1013 don't go in a static archive's TOC, explicit instantiation of a
1014 class must imply *explicit* instantiation of its memeber.
1015
1016 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
1017
1018 * call.c, cp-tree.h, pt.c: Fix comment typos.
1019
1020 2004-03-10 Mark Mitchell <mark@codesourcery.com>
1021
1022 PR c++/14510
1023 * decl.c (xref_tag): Disregard non-type declarations when
1024 looking up a tagged type.
1025
1026 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
1027
1028 PR c++/14397
1029 * call.c (convert_like_real): Build a const qualified temporary,
1030 when testing ctor access.
1031
1032 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1033
1034 * call.c (initialize_reference): Fix typo.
1035
1036 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1037
1038 PR c++/14409
1039 * pt.c (determine_specialization): For member templates, match also
1040 constness.
1041
1042 PR c++/14448
1043 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
1044 non-dependent.
1045 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
1046
1047 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1048
1049 PR c++/14230
1050 * call.c (initialize_reference): Handle initializers that are
1051 class-member access expressions applies to rvalues.
1052
1053 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1054
1055 PR c++/14432
1056 * name-lookup.c (supplement_binding): Ignore functions that are
1057 marked DECL_ANTICIPATED.
1058
1059 2004-03-08 Mark Mitchell <mark@codesourcery.com>
1060
1061 PR c++/14401
1062 * class.c (check_field_decls): Complain about non-static data
1063 members of reference type in unions. Propagate
1064 CLASSTYPE_REF_FIELDS_NEED_INIT and
1065 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
1066 data members.
1067 * init.c (perform_member_init): Complain about mbmers with const
1068 type that are not explicitly initialized.
1069
1070 2004-03-08 Mark Mitchell <mark@codesourcery.com>
1071
1072 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
1073 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
1074 (lang_identifier): Remove implicit_decl and error_locus.
1075 (IDENTIFIER_IMPLICIT_DECL): Remove.
1076 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
1077 (IDENTIFIER_ERROR_LOCUS): Likewise.
1078 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
1079 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
1080 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
1081 (implicitly_declare): Remove.
1082 * decl.c (warn_extern_redeclared_static): Remove check of
1083 IDENTIFIER_IMPLICIT_DECL.
1084 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
1085 (implicitly_declare): Remove.
1086 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
1087 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
1088 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
1089 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
1090 in the innermost scope, rather than at namespace scope.
1091 * name-lookup.c (push_local_binding): Give it external linkage.
1092 (pushdecl): Remove dead code.
1093 * name-lookup.h (push_local_binding): Declare it.
1094 * ptree.c (cxx_print_identifier): Don't print
1095 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
1096 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
1097 not IDENTIFIER_ERROR_LOCUS.
1098 * typeck.c (build_function_call): Remove dead code.
1099
1100 2004-03-08 Jason Merrill <jason@redhat.com>
1101
1102 PR c++/13170
1103 * decl.c (xref_tag): Remove attribute handling.
1104 * cp-tree.h: Adjust prototype.
1105 * decl.c, parser.c, rtti.c: Adjust callers.
1106 * parser.c (cp_parser_class_head): Pass back attributes in the
1107 class head.
1108 (cp_parser_class_specifier): Adjust.
1109
1110 2004-03-08 Matt Austern <austern@apple.com>
1111
1112 PR debug/14079
1113 * name-lookup.c (add_decl_to_level): Add extern variables, as well
1114 as static, to static_decls array.
1115
1116 2004-03-05 Jason Merrill <jason@redhat.com>
1117
1118 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
1119
1120 2004-03-04 Geoffrey Keating <geoffk@apple.com>
1121
1122 * decl.c (grokfndecl): Update old incorrect comment.
1123 (grokvardecl): Diagnose C++ variables of type with no linkage.
1124
1125 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1126
1127 PR c++/14369
1128 * pt.c (build_non_dependent_expr): Do not create a
1129 NON_DEPENDENT_EXPR for a THROW_EXPR.
1130
1131 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
1132
1133 PR c++/14369
1134 * error.c (dump_expr): Handle THROW_EXPR.
1135
1136 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1137
1138 PR c++/14360
1139 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
1140 lookup if ordinary name-lookup finds a non-function.
1141 * pt.c (tsubst_copy_and_build): Likewise.
1142
1143 PR c++/14361
1144 * parser.c (cp_parser_late_parsing_default_args): Check that there
1145 are no extra tokens after the end of the default-argument
1146 expression.
1147
1148 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1149
1150 PR c++/14324
1151 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
1152 having C++ linkage for name-mangling purposes.
1153
1154 PR c++/14260
1155 * parser.c (cp_parser_direct_declarator): Recognize constructor
1156 declarators that use a template-id to name the class being
1157 constructed.
1158
1159 PR c++/14337
1160 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
1161 (tsubst_expr): Do not call tsubst_copy, even when
1162 processing_template_decl.
1163
1164 2004-03-01 Jeff Law <law@redhat.com>
1165
1166 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
1167 the proper type.
1168
1169 2004-02-29 Mark Mitchell <mark@codesourcery.com>
1170
1171 PR c++/14138
1172 * name-lookup.h (push_scope): Change prototype.
1173 * name-lookup.c (push_scope): Do not reenter the current class
1174 scope.
1175 * decl.c (grokfndecl): Check return code from push_scope before
1176 calling pop_scope.
1177 * decl2.c (check_classfn): Likewise.
1178 * parser.c (cp_parser_conversion_function_id): Likewise.
1179 (cp_parser_init_declarator): Likewise.
1180 (cp_parser_direct_declarator): Likewise.
1181 (cp_parser_class_specifier): Likewise.
1182 (cp_parser_class_head): Likewise.
1183 (cp_parser_lookup_name): Likewise.
1184 (cp_parser_constructor_declarator_p): Likewise.
1185 * pt.c (instantiate_class_template): Likewise.
1186 (resolve_typename_type): Likewise.
1187
1188 2004-02-29 Mark Mitchell <mark@codesourcery.com>
1189
1190 PR c++/14267
1191 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
1192 extension.
1193
1194 PR debug/12103
1195 * class.c (update_vtable_entry_for_fn): Do not go through
1196 covariance machinery if the type returned by an overrider is the
1197 same as the original.
1198
1199 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
1200
1201 * call.c: Fix a comment typo.
1202
1203 2004-02-27 Ziemowit Laski <zlaski@apple.com>
1204
1205 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
1206
1207 2004-02-26 Mark Mitchell <mark@codesourcery.com>
1208
1209 PR c++/14278
1210 * parser.c (cp_parser_parameter_declaration_list): Commit
1211 to fewer tentative parses.
1212
1213 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1214
1215 PR c++/14284
1216 * pt.c (dependent_type_p_r): A template template parameter is a
1217 dependent type.
1218
1219 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1220
1221 PR c++/14246
1222 * mangle.c (write_template_arg_literal): Don't rely on identity for
1223 boolean constants.
1224
1225 2004-02-24 Jason Merrill <jason@redhat.com>
1226
1227 * tree.c (build_exception_variant): Use check_qualified_type.
1228
1229 2004-02-23 Zack Weinberg <zack@codesourcery.com>
1230 Kazu Hirata <kazu@cs.umass.edu>
1231
1232 * decl.c (cxx_init_decl_processing): Don't check
1233 flag_writable_strings.
1234
1235 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
1236
1237 PR c++/14156
1238 * typeck.c (maybe_warn_about_returning_address_of_location):
1239 Change check for VAR_DECL to use DECL_P instead.
1240
1241 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1242
1243 PR c++/14250
1244 * cvt.c (build_expr_type_conversion): Type must be complete before
1245 looking up for conversions.
1246
1247 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1248
1249 PR c++/14143
1250 * name-lookup.c (arg_assoc_class): Don't look into template
1251 arguments if it is not a primary template.
1252
1253 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1254
1255 PR c++/12007
1256 * method.c (use_thunk): Always clone function argument tree.
1257
1258 2004-02-20 Mark Mitchell <mark@codesourcery.com>
1259
1260 PR c++/14199
1261 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
1262
1263 PR c++/14173
1264 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
1265 for all type variants.
1266
1267 2004-02-19 Mark Mitchell <mark@codesourcery.com>
1268
1269 PR c++/13927
1270 * decl.c (duplicate_decls): Return error_mark_node for invalid
1271 redeclarations.
1272 * name-lookup.c (push_namespace): Ignore the return value from
1273 pushdecl.
1274 * pt.c (push_template_decl_real): Robustify.
1275
1276 PR c++/14186
1277 * name-lookup.c (push_class_level_binding): Do not complain about
1278 adding a binding for a member whose name is the same as the
1279 enclosing class if the member is located in a base class of the
1280 current class.
1281
1282 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1283
1284 PR c++/14181
1285 * parser.c (cp_parser_new_expression): Parse an ill-formed
1286 direct-new-declarator after a parenthesized type-id to emit good
1287 diagnostic.
1288
1289 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
1290
1291 * cp-tree.def, cvt.c: Update copyright.
1292
1293 2004-02-17 Mark Mitchell <mark@codesourcery.com>
1294
1295 PR c++/11326
1296 * cp-tree.h (abi_version_at_least): Remove.
1297 * mangle.c: Include flags.h.
1298
1299 2004-02-15 Mark Mitchell <mark@codesourcery.com>
1300
1301 PR c++/13971
1302 * call.c (build_conditional_expr): Handle conversions between
1303 class types which result in differently cv-qualified type
1304 variants.
1305
1306 PR c++/14086
1307 * class.c (delete_duplicate_fields_1): Remove.
1308 (delete_duplicate_fields): Likewise.
1309 (finish_struct_anon): Remove check for members with the same name
1310 as their enclosing class.
1311 (check_field_decls): Do not call duplicate_fields.
1312 * decl.c (grokdeclarator): Remove check for static data members
1313 with the same name as their enclosing class.
1314 * name-lookup.c (push_class_level_binding): Check for members with
1315 the same name as their enclosing class.
1316
1317 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
1318
1319 PR c++/14085
1320 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
1321
1322 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1323
1324 PR c++/13635
1325 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
1326 has full set of arguments.
1327
1328 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1329
1330 PR c++/13927
1331 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
1332
1333 2004-02-13 Mark Mitchell <mark@codesourcery.com>
1334
1335 PR c++/14122
1336 * cp-tree.h (delete_sanity): Change prototype.
1337 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
1338 Remove dead code. Adjust code to warn about deleting an array.
1339 * typekc.c (decay_conversion): Use build_address and build_nop.
1340
1341 PR c++/14108
1342 * search.c (accessible_p): Do not check access in thunks.
1343
1344 PR c++/14083
1345 * call.c (build_conditional_expr): Call force_rvalue on the
1346 non-void operand in the case that one result is a throw-expression
1347 and the other is not.
1348
1349 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
1350
1351 PR c++/9851
1352 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
1353 the type name and look ahead for ::~, and bail out early with a
1354 better error message if the parse is going to fail.
1355
1356 2004-02-12 Mark Mitchell <mark@codesourcery.com>
1357
1358 * call.c (conversion_kind): New type.
1359 (conversion_rank): Likewise.
1360 (conversion): Likewise.
1361 (CONVERSION_RANK): New macro.
1362 (conversion_obstack): New variable.
1363 (obstack_initialized): Likewise.
1364 (z_candidate): Change type of convs and second_conv.
1365 (candidate_warning): New type.
1366 (IDENTITY_RANK): Remove.
1367 (EXACT_RANK): Likewise.
1368 (PROMO_RANK): Likewise.
1369 (STD_RANK): Likewise.
1370 (PBOOL_RANK): Likewise.
1371 (USER_RANK): Likewise.
1372 (ELLIPSIS_RANK): Likewise.
1373 (BAD_RANK): Likewise.
1374 (ICS_RANK): Likewise.
1375 (ICS_STD_RANK): Likewise.
1376 (ICS_USER_FLAG): Likewise.
1377 (ICS_ELLIPSIS_FLAG): Likewise.
1378 (ICS_THIS_FLAG): Likewise.
1379 (ICS_BAD_FLAG): Likewise.
1380 (NEED_TEMPORARY_P): Likewise.
1381 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
1382 (USER_CONV_CAND): Likewise.
1383 (USER_CONV_FN): Likewise.
1384 (conversion_obstack_alloc): New function.
1385 (alloc_conversion): Likewise.
1386 (validate_conversion_obstack): Likewise.
1387 (alloc_conversions): Likewise.
1388 (build_conv): Adjust to deal with new conversion data structures.
1389 (build_identity_conv): New function.
1390 (build_ambiguous_conv): Likewise.
1391 (standard_conversion): Adjust to deal with new conversion data
1392 structures.
1393 (convert_class_to_reference): Likewise.
1394 (direct_reference_binding): Likewise.
1395 (reference_binding): Likewise.
1396 (implicit_conversion): Likewise.
1397 (add_candidate): Likewise.
1398 (add_function_candidate): Likewise.
1399 (add_conv_candidate): Likewise.
1400 (build_builtin_candidate): Likewise.
1401 (print_z_candidate): Likewise.
1402 (merge_conversion_sequences): Likewise.
1403 (build_user_type_conversion_1): Likewise.
1404 (build_user_type_conversion): Likewise.
1405 (build_new_function_call): Likewise.
1406 (build_object_call): Likewise.
1407 (conditional_conversion): Likewise.
1408 (build_conditional_expr): Likewise.
1409 (build_new_op): Likewise.
1410 (build_op_delete_call): Likewise.
1411 (convert_like_real): Likewise.
1412 (build_over_call): Likewise.
1413 (build_new_method_call): Likewise.
1414 (is_subseq): Likewise.
1415 (maybe_handle_implicit_object): Likewise.
1416 (maybe_handle_ref_bind): Likewise.
1417 (compare_ics): Likewise.
1418 (source_type): Likewise.
1419 (add_warning): Likewise.
1420 (joust): Likewise.
1421 (can_convert_arg): Likewise.
1422 (can_convert_arg_bad): Likewise.
1423 (perform_implicit_conversion): Likewise.
1424 (perform_direct_initialization_if_possible): Likewise.
1425 (initialize_reference): Likewise.
1426 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
1427 * cp-tree.def (WRAPPER): Likewise.
1428 (IDENTITY_CONV): Remove.
1429 (LVALUE_CONV): Likewise.
1430 (QUAL_CONV): Likewise.
1431 (STD_CONV): Likewise.
1432 (PTR_CONV): Likewise.
1433 (PMEM_CONV): Likewise.
1434 (BASE_CONV): Likewise.
1435 (REF_BIND): Likewise.
1436 (USER_CONV): Likewise.
1437 (AMBIG_CONV): Likewise.
1438 (RVALUE_CONV): Likewise.
1439 * cp-tree.h (tree_wrapper): Remove.
1440 (WRAPPER_ZC): Remove.
1441 (lang_tree_node): Remove wrapper.
1442 (LOOKUP_SPECULATIVELY): Remove.
1443 (build_op_delete_call): Adjust prototype.
1444 (validate_conversion_obstack): Declare.
1445 (build_zc_wrapper): Remove.
1446 * cvt.c (convert_to_reference): Remove dead code.
1447 (ocp_convert): Likewise.
1448 * decl.c (redeclaration_error_message): Correct handling of
1449 templates.
1450 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
1451 (cp_tree_node_structure): Remove WRAPPER case.
1452 * decl2.c (finish_file): Call validate_conversion_obstack.
1453 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
1454 (build_op_delete_call): Likewise.
1455 (build_x_delete): Likewise.
1456 (build_delete): Adjust call to build_op_delete_call.
1457 * pt.c (tsubst_friend_declaration): Adjust code to determine
1458 whether or not a friend template is a definition.
1459 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
1460 * tree.c (build_zc_wrapper): Remove.
1461
1462 2004-02-12 Zack Weinberg <zack@codesourcery.com>
1463
1464 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
1465 * cp-tree.h: Don't declare cxx_builtin_type_decls.
1466 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
1467 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
1468
1469 2004-02-10 Mark Mitchell <mark@codesourcery.com>
1470
1471 * typeck.c (lookup_destructor): Fix typo in error message.
1472
1473 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
1474
1475 * call.c, parser.c, tree.c: Fix comment typos.
1476
1477 2004-02-07 Zack Weinberg <zack@codesourcery.com>
1478
1479 Bug 13856
1480 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
1481 * decl.c (duplicate_decls, start_function): Likewise.
1482
1483 2004-02-07 Zack Weinberg <zack@codesourcery.com>
1484
1485 * name-lookup.c (pushdecl): Issue shadow warnings directly.
1486 * parser.c (free_parser_stacks): Delete.
1487
1488 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
1489
1490 * rtti.c: Update copyright.
1491
1492 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1493
1494 PR c++/14033
1495 * decl.c (require_complete_types_for_parms): Do not insert
1496 error_mark_node in the parameter list.
1497
1498 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1499
1500 PR c++/14028
1501 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
1502 error when terminator can not be found.
1503
1504 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
1505
1506 Make-lang.in (po-generated): Delete.
1507
1508 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
1509
1510 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
1511 targetm.calls.promote_prototypes.
1512
1513 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1514
1515 PR middle-end/13750
1516 Revert:
1517 2004-01-15 Geoffrey Keating <geoffk@apple.com>
1518 PR pch/13361
1519 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
1520 (handle_pragma_implementation): Likewise.
1521
1522 2004-02-05 Mark Mitchell <mark@codesourcery.com>
1523
1524 PR c++/13714
1525 * typeck.c (lookup_destructor): Tweak error message.
1526
1527 2004-02-05 Jan Hubicka <jh@suse.cz>
1528
1529 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
1530 functions.
1531
1532 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1533
1534 PR c++/14008
1535 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
1536 code, only emits the diagnostic now. Added lookup of the identifier
1537 and support for qualified ids.
1538 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
1539 Parse an (invalid) type name as id-expression within a declarator.
1540 (cp_parser_simple_declaration): Use it.
1541 (cp_parser_member_declaration): Likewise.
1542 (cp_parser_make_typename_type): New function. Handle errors through
1543 cp_parser_diagnose_invalid_typename.
1544 (cp_parser_elaborated_type_specifier): Use it.
1545
1546 2004-02-04 Mark Mitchell <mark@codesourcery.com>
1547
1548 PR c++/13932
1549 * call.c (convert_like_real): Use "converting" rather than
1550 "argument" as the descriptive keyword to
1551 dubious_conversion_warnings.
1552 * typeck.c (convert_for_assignment): Do not call
1553 dubious_conversion_warnings.
1554
1555 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1556
1557 PR c++/13086
1558 * init.c (build_delete): Emit a more informative error message in
1559 case of an incomplete type, and on the correct source line.
1560
1561 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
1562
1563 * error.c, search.c: Update copyright.
1564
1565 2004-02-04 Mark Mitchell <mark@codesourcery.com>
1566
1567 PR c++/9941
1568 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
1569 linkage for the typeinfo name string.
1570
1571 2004-02-04 Mark Mitchell <mark@codesourcery.com>
1572
1573 PR c++/13969
1574 * cp-tree.h (fold_non_dependent_expr): New function.
1575 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
1576 (cp_parser_template_argument): Use fold_non_dependent_expr.
1577 (cp_parser_direct_declarator): Likewise.
1578 * pt.c (fold_non_dependent_expr): New function.
1579 (convert_nontype_argument): Use it.
1580 (tsubst_qualified_id): Simplify.
1581 (tsubst_copy_and_build): Likewise.
1582
1583 2004-02-04 Mark Mitchell <mark@codesourcery.com>
1584
1585 * decl.c (cxx_push_function_context): Do not set
1586 current_function_is_thunk.
1587 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
1588 actual function.
1589
1590 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1591
1592 PR c++/13997
1593 * pt.c (more_specialized_class): Increase processing_template_decl
1594 while partial ordering.
1595
1596 2004-02-03 Mark Mitchell <mark@codesourcery.com>
1597
1598 PR c++/13925
1599 * decl.c (start_function): Do not call pushdecl for any
1600 instantiation or specialization of a primary template.
1601
1602 2004-02-03 Mark Mitchell <mark@codesourcery.com>
1603
1604 PR c++/13950
1605 * parser.c (cp_parser_class_name): Robustify.
1606
1607 PR c++/13970
1608 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
1609
1610 PR c++/14002
1611 * semantics.c (finish_id_expression): Do not return an
1612 IDENTIFIER_NODE when lookup finds a PARM_DECL.
1613
1614 2004-02-03 Mark Mitchell <mark@codesourcery.com>
1615
1616 PR c++/13978
1617 * pt.c (build_non_dependent_expr): Do not build
1618 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
1619
1620 PR c++/13968
1621 * semantics.c (finish_id_expression): Do not return an
1622 IDENTIFIER_NODE when lookup finds a VAR_DECL.
1623
1624 PR c++/13975
1625 * parser.c (cp_parser_simple_declaration): When skipping to the
1626 end of the statement swallow the terminating semicolon.
1627
1628 2004-02-02 Mark Mitchell <mark@codesourcery.com>
1629
1630 PR c++/13113
1631 * init.c (build_offset_ref): Improve error recovery for invalid
1632 uses of non-static member functions.
1633
1634 PR c++/13854
1635 * cp-tree.h (cp_build_type_attribute_variant): New function.
1636 * class.c (build_clone): Use cp_build_type_attribute_variant.
1637 * decl.c (duplicate_decls): Likewise.
1638 * pt.c (copy_default_args_to_explicit_spec): Likewise.
1639 (tsubst_function_type): Likewise.
1640 * tree.c (build_exception_variant): Check attributes before
1641 concluding that two types are the same.
1642 (cp_build_type-attribute_variant): New method.
1643 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
1644
1645 PR c++/13907
1646 * call.c (convert_class_to_reference): Keep better track of
1647 pedantically invalid user-defined conversions.
1648
1649 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1650
1651 PR c++/13957
1652 * pt.c (tsubst_qualified_id): Improved error message when a type
1653 is expected but not found.
1654
1655 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
1656
1657 * class.c: Fix comment typos.
1658 * decl.c: Likewise.
1659 * error.c: Likewise.
1660 * parser.c: Likewise.
1661 * pt.c: Likewise.
1662 * search.c: Likewise.
1663 * typeck.c: Likewise.
1664
1665 2004-01-30 Richard Henderson <rth@redhat.com>
1666
1667 PR c++/13693
1668 * method.c (use_thunk): Don't force_target_expr for void thunks.
1669 * tree.c (build_target_expr_with_type): Assert non-void type.
1670 (force_target_expr): Likewise.
1671
1672 2004-01-30 Michael Matz <matz@suse.de>
1673
1674 * parser.c (cp_parser_labeled_statement): Accept case ranges.
1675
1676 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1677
1678 DR206
1679 PR c++/13813
1680 * decl.c (grokdeclarator): Check immediatly type completeness for
1681 non-dependent types.
1682
1683 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1684
1685 PR c++/13683
1686 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
1687 a sizeof expression.block
1688
1689 2004-01-29 Mark Mitchell <mark@codesourcery.com>
1690
1691 PR c++/13883
1692 * mangle.c (write_encoding): Correct encoding of member template
1693 constructors.
1694
1695 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1696
1697 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
1698 template name as it was `<::' (digraph typo).
1699 (cp_parser_nth_token_starts_template_argument_list_p): New function.
1700 (cp_parser_id_expression): Use it.
1701 (cp_parser_nested_name_specifier_opt): Likewise.
1702 (cp_parser_template_name): Likewise.
1703 (cp_parser_class_name): Likewise.
1704 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
1705
1706 2004-01-28 Mark Mitchell <mark@codesourcery.com>
1707
1708 PR c++/13791
1709 * typeck.c (merge_types): Do not merge attributes into
1710 TYPENAME_TYPEs.
1711
1712 PR c++/13736
1713 * parser.c (cp_parser_direct_declarator): Do not prevent
1714 backtracking inside a parenthesized declarator.
1715 (cp_parser_parameter_declaration): Fix typo in comment.
1716
1717 2004-01-28 Jan Hubicka <jh@suse.cz>
1718
1719 * semantics.c (expand_body) Do emit_associated_thunks before
1720 expansion.
1721
1722 2004-01-27 Devang Patel <dpatel@apple.com>
1723
1724 * name-lookup.c: Include "debug.h"
1725 (do_namespace_alias): Invoke debug_hooks to emit debug info
1726 for namespace alias.
1727 (do_local_using_decl): Invoke debug_hooks to emit debug info
1728 for using decl.
1729 (do_class_using_decl): Same.
1730 (do_toplevel_using_decl): Same.
1731 (do_using_directive): Same.
1732 (cp_emit_debug_info_for_using): New function.
1733 * Make-lang.in (cp/parser.o): Depend on debug.h
1734 (cp/name-lookup.o): Same.
1735
1736 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1737
1738 * cp-tree.h (language_function, lang_type_header): Use
1739 BOOL_BITFIELD.
1740 * name-lookup.h (cp_binding_level): Likewise.
1741
1742 2004-01-26 Mark Mitchell <mark@codesourcery.com>
1743
1744 PR c++/13663
1745 * semantics.c (finish_for_expr): Check for unresolved overloaded
1746 functions.
1747
1748 * class.c (add_method): Just check processing_template_decl to
1749 determine whether or not we are within a template.
1750 * decl2.c (maybe_retrofit_in_chrg): Likewise.
1751 * init.c (decl_constant_value): Check the type of the declaration,
1752 not TREE_READONLY.
1753 * name-lookup.c (maybe_push_to_top_level): Rename to ...
1754 (push_to_top_level): ... this.
1755 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
1756 * pt.c (push_template_decl_real): Reorder condition for speed.
1757 (convert_template_argument): Use dependency-checking functions in
1758 place of uses_template_parms.
1759 (lookup_template_class): Avoid calling uses_template_parms more
1760 than once.
1761 (uses_template_parms): Reimplement, using dependency-checking
1762 functions.
1763 (instantiate_class_template): Use push_to_top_level, not
1764 maybe_push_to_top_level.
1765 (type_unification_real): Simplify.
1766 (type_dependent_expression_p): Handle OFFSET_REFs and
1767 TEMPLATE_DECLs.
1768 (any_dependent_template_arguments_p): Handle multiple levels of
1769 template argument.
1770 * semantics.c (expand_or_defer_fn): Do not check
1771 uses_template_parms for template instantiations.
1772 * typeck.c (comptypes): Avoid calling cp_type_quals.
1773
1774 2004-01-25 Mark Mitchell <mark@codesourcery.com>
1775
1776 PR c++/13833
1777 * call.c (build_over_call): Do not convert arguments when
1778 processing a template.
1779 * pt.c (build_non_dependent_expr): Do not build a
1780 NON_DEPENDENT_EXPR for arithmetic constants.
1781
1782 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1783
1784 PR c++/13810
1785 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
1786 returns a TYPE_DECL. no further lookup is required.
1787 * semantics.c (check_template_template_default_arg): A TYPE_DECL
1788 is invalid. Rework to give better diagnostics.
1789
1790 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1791
1792 PR c++/13797
1793 * pt.c (instantiate_class_template): Add an error_mark_node
1794 check.
1795 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
1796
1797 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
1798
1799 PR c++/13701
1800 * decl.c (finish_function): Move the call to
1801 finish_fname_decls below the call to
1802 finish_eh_spec_block.
1803
1804 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
1805
1806 * optimize.c, typeck2.c: Update copyright.
1807
1808 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
1809
1810 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
1811 init.c, mangle.c, typeck.c: Update copyright.
1812
1813 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
1814
1815 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
1816
1817 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
1818
1819 * Make-lang.in: Replace $(docdir) with doc.
1820 (c++.info, c++.srcinfo): Dummy entry.
1821 (c++.man, c++.srcman): New rules.
1822 (c++.install-man): Revamp rule.
1823
1824 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
1825
1826 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
1827 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
1828 immediate $(shell) instead of deferred backquote.
1829
1830 2004-01-19 Mark Mitchell <mark@codesourcery.com>
1831
1832 PR c++/13651
1833 * parser.c (cp_parser_postfix_expression): When encountering
1834 incomplete type on left-hand side of "->" or ".", treat the entire
1835 expression as erroneous.
1836
1837 PR c++/13592
1838 * call.c (build_field_call): Remove.
1839 (n_build_method_call): Likewise.
1840 (build_method_call): Likewise.
1841 (build_new_method_call): Do not call build_field_call.
1842 * class.c (n_build_method_call): Remove.
1843 (print_class_statistics): Do not print it.
1844 * cp-tree.h (build_method_call): Remove declaration.
1845 (finish_object_call_expr): Likewise.
1846 (build_new_1): Do not use build_method_call.
1847 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
1848 when the function appearing on the right-hand-side of "." or "->"
1849 is not actually a function.
1850 * pt.c (tsubst_copy_and_build): Likewise.
1851 * semantics.c (finish_object_call_expr): Remove.
1852
1853 2004-01-18 Mark Mitchell <mark@codesourcery.com>
1854
1855 PR c++/13710
1856 * pt.c (tsubst): Use finish_typeof.
1857
1858 2004-01-18 Jason Merrill <jason@redhat.com>
1859
1860 PR c++/11725
1861 * except.c (build_throw): In a template, set
1862 current_function_returns_abnormally.
1863
1864 2004-01-17 Fred Fish <fnf@intrinsity.com>
1865
1866 PR c++/11895
1867 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
1868 except don't call array_type_nelts() with a VECTOR_TYPE.
1869
1870 2004-01-16 Jan Hubicka <jh@suse.cz>
1871
1872 * mangle.c (write_mangled_name): Remove inline modifier.
1873
1874 2004-01-16 Mark Mitchell <mark@codesourcery.com>
1875
1876 PR c++/13574
1877 * decl.c (compute_array_index_type): Fix grammar in comment.
1878 * init.c (build_zero_init): Handle zero-sized arrays correctly.
1879
1880 PR c++/13178
1881 * call.c (name_as_c_string): Print conversion operator names
1882 correctly.
1883
1884 PR c++/13478
1885 * call.c (initialize_reference): Pass -1 for inner parameter to
1886 convert_like_real.
1887
1888 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1889
1890 PR c++/13407
1891 * parser.c (cp_parser_base_specifier): Check for an invalid
1892 keyword `typename' and emit an user-friendly error message.
1893
1894 2004-01-15 Geoffrey Keating <geoffk@apple.com>
1895
1896 PR pch/13361
1897 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
1898 (handle_pragma_implementation): Likewise.
1899
1900 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1901
1902 PR c++/9259
1903 * typeck.c (build_class_member_access_expr): Allow to access members
1904 of the currently open class.
1905 (finish_class_member_access_expr): Likewise.
1906
1907 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
1908
1909 PR c++/13659
1910 * name-lookup.c (validate_nonmember_using_decl): Take scope and
1911 name by value, instead of computing them.
1912 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
1913 arguments. Pass them to validate_nonmember_using_decl.
1914 * name-lookup.h (do_local_using_decl): Adjust.
1915 (do_toplevel_using_decl): Likewise.
1916 * parser.c (cp_parser_using_declaration): Likewise.
1917 * pt.c (tsubst_expr): Likewise.
1918
1919 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
1920
1921 PR c++/13594
1922 PR c++/13658
1923 * name-lookup.c (qualified_lookup_using_namespace): Search
1924 strongly-associated namespaces first, and only then try other
1925 namespaces.
1926
1927 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
1928
1929 * Make-lang.in (c++.srcextra): Dummy entry.
1930
1931 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1932
1933 PR c++/8856
1934 * parser.c (cp_parser_template_name): Don't try to parse a
1935 conversion-function-id, as it cannot be a template-name.
1936 (cp_parser_simple_type_specifier): Check for invalid template-ids
1937 even after a built-in type.
1938
1939 2004-01-14 Jan Hubicka <jh@suse.cz>
1940
1941 PR c++/12850
1942 * pt.c (instantiate_decl): Do not increase function_depth.
1943
1944 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
1945
1946 PR c++/9021
1947 PR c++/11005
1948 * parser.c (cp_parser_elaborated_type_specifier): Warn about
1949 attributes and discard.
1950 * decl.c (xref_tag): Don't overwite existing attributes with
1951 NULL_TREE.
1952
1953 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1954
1955 PR c++/12335
1956 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
1957 is no destructor while looking up a BIT_NOT_EXPR.
1958
1959 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
1960
1961 * cxxfilt.c: Remove unused file.
1962
1963 2004-01-14 Jan Hubicka <jh@suse.cz>
1964
1965 Partial fix to PR c++/12850
1966 * decl2.c (mark_used): Do not proactively instantiate templates
1967 when compiling in unit-at-a-time or not optimizing.
1968 * optimize.c (maybe_clone_body): Do not increase function depth.
1969
1970 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1971
1972 PR c++/13474
1973 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
1974
1975 2004-01-12 Steven Bosscher <stevenb@suse.de>
1976
1977 PR c++/13558
1978 * parser.c (cp_parser_member_declaration): Any non-type is also
1979 not a class or a function.
1980
1981 2004-01-12 Jason Merrill <jason@redhat.com>
1982
1983 PR c++/12815
1984 * class.c (build_base_path): Do not mark vtable references as
1985 TREE_CONSTANT.
1986 (build_vtbl_ref_1): Likewise.
1987
1988 2004-01-12 Richard Henderson <rth@redhat.com>
1989
1990 PR opt/10776
1991 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
1992 (store_init_value): Use it.
1993 * decl.c (check_initializer): Expect full initialization code
1994 from store_init_value.
1995 * init.c (expand_aggr_init_1): Likewise.
1996 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
1997
1998 2004-01-12 Mark Mitchell <mark@codesourcery.com>
1999
2000 * class.c (layout_class_type): For non-POD class types, also copy
2001 the DECL_SIZE and DECL_MODE of fields to the base class type.
2002
2003 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2004
2005 PR c++/13289
2006 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
2007 calling regenerate_decl_from_template.
2008
2009 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
2010
2011 PR c++/4100
2012 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
2013 decl-specifier occurring along with a class definition.
2014
2015 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
2016
2017 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
2018 clauses to comments describing declares_class_or_enum.
2019 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
2020 false.
2021
2022 2004-01-12 Jan Hubicka <jh@suse.cz>
2023
2024 * pt.c (for_each_template_parm): Do not check for duplicates.
2025 (for_each_template_parm): Use walk_tree duplicate checking code.
2026
2027 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
2028
2029 PR c++/3478
2030 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
2031 is error_mark_node, don't add any more decl_specs.
2032 (cp_parser_init_declarator): After committing to a declaration, if
2033 the decl_specifiers start with error_mark_node, issue an error and
2034 change the type to "int".
2035
2036 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
2037
2038 PR bootstrap/7817
2039 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
2040
2041 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2042
2043 DR 337
2044 PR c++/9256
2045 * pt.c (tsubst): Substitution must fail if we are attempting to
2046 create an array with element type that is an abstract class type.
2047 * decl.c (cp_finish_decl): Strip pointers and array types recursively
2048 before calling abstract_virtuals_error.
2049
2050 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
2051
2052 * name-lookup.c (qualified_lookup_using_namespace): Consider
2053 strong using directives even if we've already found a binding.
2054
2055 2004-01-09 Mark Mitchell <mark@codesourcery.com>
2056
2057 * cp-tree.h (cxx_expand_expr): Change prototype.
2058 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
2059
2060 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2061
2062 PR c++/12573
2063 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
2064 looking into them recursively. They can be there because of the
2065 new __offsetof__ extension.
2066
2067 2004-01-07 Zack Weinberg <zack@codesourcery.com>
2068
2069 * parser.c (cp_parser_save_member_function_body): Mark the
2070 definition static.
2071
2072 2004-01-05 Mark Mitchell <mark@codesourcery.com>
2073
2074 PR c++/13057
2075 * class.c (build_clone): Copy type attributes from the original
2076 function to the clone.
2077
2078 PR c++/12815
2079 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
2080 references as constant.
2081
2082 PR c++/12132
2083 * parser.c (cp_parser_explicit_instantiation): Improve error
2084 recovery.
2085 (cp_parser_require): Improve indication of the error location.
2086
2087 PR c++/13451
2088 * parser.c (cp_parser_class_head): Reorder logic to check for
2089 invalid qualification.
2090
2091 2004-01-04 Mark Mitchell <mark@codesourcery.com>
2092
2093 PR c++/13157
2094 * name-lookup.c (lookup_using_namespace): Remove spacesp
2095 parameter.
2096 (unqualified_namespace_lookup): Likewise.
2097 (lookup_qualified_name): Adjust accordingly.
2098 (lookup_name_real): Likewise.
2099 (lookup_arg_dependent): Do not eliminate the namespace of the
2100 functions found by unqualified name lookup unless that is the
2101 current namespace.
2102
2103 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
2104
2105 * semantics.c (push_deferring_access_checks): Fix format.
2106 (resume_deferring_access_checks): Likewise.
2107 (stop_deferring_access_checks): Likewise.
2108 (pop_deferring_access_checks): Likewise.
2109 (get_deferred_access_checks): Likewise.
2110 (pop_to_parent_deferring_access_checks): Likewise.
2111 (perform_deferred_access_checks): Likewise.
2112 (perform_or_defer_access_check): Likewise.
2113
2114 2004-01-04 Richard Henderson <rth@redhat.com>
2115
2116 * call.c (build_over_call): Don't create a save_expr of an
2117 aggregate, but rather its address.
2118
2119 2004-01-04 Mark Mitchell <mark@codesourcery.com>
2120
2121 PR c++/13529
2122 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
2123 an offsetof expression.
2124
2125 * parser.c (cp_parser_parameter_declaration): Fix comment.
2126
2127 PR c++/12226
2128 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
2129 (reference_binding): Set it when appropriate.
2130 (build_temp): New function, split out from ...
2131 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
2132 (initialize_reference): Likewise.
2133
2134 PR c++/13536
2135 * parser.c (cp_parser): Add in_type_id_in_expr_p.
2136 (cp_parser_new): Initialize it.
2137 (cp_parser_postfix_expression): Set it.
2138 (cp_parser_sizeof_operand): Likewise.
2139 (cp_parser_parameteR_declaration): Do not commit early to tenative
2140 parsers when in_type_id_in_expr_p is set.
2141
2142 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2143
2144 PR c++/13094
2145 * parser.c (cp_parser_template_argument): Don't call
2146 make_unbound_class_template directly.
2147 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
2148 UNBOUND_CLASS_TEMPLATE tree node.
2149
2150 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
2151
2152 PR target/12729
2153 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
2154
2155 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2156
2157 PR c++/13520
2158 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
2159 (DECL_FUNCTION_TEMPLATE_P): Use it.
2160 (DECL_CLASS_TEMPLATE_P): Likewise.
2161 * parser.c (cp_parser_lookup_name): Add is_template parameter.
2162 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
2163 (cp_parser_template_name): Likewise.
2164 (cp_parser_elaborated_type_specifier): Likewise.
2165 (cp_parser_namespace_name): Likewise.
2166 (cp_parser_class_name): Likewise.
2167 (cp_parser_lookup_name_simple): Likewise.
2168
2169 See ChangeLog.3 for earlier changes.