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