parser.c (cp_parser_using_declaration): Skip name-lookup on invalid scope.
[gcc.git] / gcc / cp / ChangeLog
1 2006-01-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2
3 * parser.c (cp_parser_using_declaration): Skip name-lookup on
4 invalid scope.
5
6 2005-12-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
7
8 * cxx-pretty-print.c (pp_cxx_constant): New. Print
9 string-literal in parens if input program says so.
10 (pp_cxx_primary_expression): Hand off constant printing to
11 pp_cxx_constant.
12 (pp_cxx_pretty_printer_init): Set pp->c_base.constant.
13 (pp_cxx_expression): Use pp_cxx_constant for literals.
14 * error.c (dump_expr): Use pp_constant for literals.
15
16 2005-12-29 Nathan Sidwell <nathan@codesourcery.com>
17
18 * method.c (make_thunk): Don't set comdat_linkage here.
19 (use_thunk): Make thunk one only here, if thunk target is
20 DECL_ONE_ONLY.
21
22 2005-12-26 Mark Mitchell <mark@codesourcery.com>
23
24 PR c++/25439
25 * decl.c (grokdeclarator): Remove dead code.
26 * ptree.c (cxx_print_xnode): Handle BASELINK.
27 * parser.c (make_id_declarator): Add sfk parameter.
28 (cp_parser_direct_declarator): Do not pass TYPE_DECLs to
29 make_id_declarator.
30 (cp_parser_declarator_id): Simplify BASELINKs here.
31 (cp_parser_member_declaration): Adjust calls to
32 make_id_declarator.
33
34 2005-12-26 Mark Mitchell <mark@codesourcery.com>
35
36 PR c++/23171, c++/23172, c++/25417.
37 * typeck.c (build_unary_op): Create temporary variables for
38 compound literals whose addresses are taken.
39 * init.c (expand_aggr_init_1): Use COMPOUND_LITERAL_P.
40 * decl.c (reshape_init_vector): Likewise.
41 (reshape_init): Give it external linkage.
42 (check_initializer): Use COMPOUND_LITERAL_P.
43 (initialize_artificial_var): Allow the initializer to be a
44 CONSTRUCTOR.
45 * call.c (make_temporary_var_for_ref_to_temp): Use
46 create_temporary_var.
47 * cp-tree.h (COMPOUND_LITERAL_P): New macro.
48 (rehape_init): Declare.
49 * typeck2.c (digest_init): Use COMPOUND_LITERAL_P.
50 * semantics.c (finish_compound_literal): Use reshape_init.
51
52 2005-12-23 Mark Mitchell <mark@codesourcery.com>
53
54 PR c++/24671
55 * pt.c (instantiate_template): Handle SFINAE.
56
57 2005-12-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
58
59 * decl.c (grokdeclarator): Improve diagnostic for friend
60 declarations of class members.
61
62 2005-12-22 Mark Mitchell <mark@codesourcery.com>
63
64 PR c++/25369
65 * tree.c (really_overloaded_fn): Tweak comment.
66 * pt.c (tsubst_call_declarator_parms): Remove.
67 (tsubst_copy): Call mark_used on the member referenced by an
68 OFFSET_REF.
69 * semantics.c (finish_qualified_id_expr): Simplify.
70 * decl2.c (mark_used): Accept BASELINKs.
71
72 PR c++/25364
73 * typeck.c (build_unary_op): Pass DECLs not names to
74 build_offset_refs.
75 * init.c (build_offset_ref): Do not do name lookup. Do not call
76 mark_used.
77 * call.c (build_call): Simplify and tidy.
78 * semantics.c (finish_qualified_id_expr): Call mark_used.
79
80 2005-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
81
82 PR c++/23333
83 * parser.c (cp_parser_pure_specifier): Check for PURE_ZERO to
84 identify a single '0'.
85
86 2005-12-20 Mark Mitchell <mark@codesourcery.com>
87
88 PR c++/21228
89 * decl.c (use_eh_spec_block): New function.
90 (store_parm_decls): Use it.
91 (finish_function): Likewise.
92
93 2005-12-19 Mark Mitchell <mark@codesourcery.com>
94
95 PR c++/24278
96 * init.c (expand_member_init): Print messages about baseclasses
97 using %T rather than %D.
98
99 PR c++/24915
100 * class.c (add_method): Do not treat templates as identical unless
101 their return types are the same.
102
103 2005-12-12 Mark Mitchell <mark@codesourcery.com>
104
105 PR c++/25300
106 * tree.c (build_qualified_name): Return error_mark_node for
107 erroneous input.
108
109 2005-12-10 Mark Mitchell <mark@codesourcery.com>
110
111 PR c++/25337
112 * pt.c (tsubst_copy_and_build): Permit dependent types for the
113 object in a class member access expression.
114
115 2005-12-10 Terry Laurenzo <tlaurenzo@gmail.com>
116
117 PR java/9861
118 * mangle.c (write_bare_function_type): Mangle return type for
119 methods of Java classes
120
121 2005-12-08 Théodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
122
123 * call.c (build_conditional_expr): Print types in error messages.
124
125 2005-12-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
126
127 * expr.c (cxx_expand_expr): Call gcc_unreachable instead of abort.
128
129 2005-12-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
130
131 * cp-gimplify.c (gimplify_cp_loop): Use fold_build3.
132
133 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
134
135 * Make-lang.in (c++.all.build, c++.install-normal): Remove.
136
137 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
138
139 * Make-lang.in: Remove all dependencies on s-gtype.
140
141 2005-12-06 Aldy Hernandez <aldyh@redhat.com>
142
143 PR C++/24138
144 * decl.c (reshape_init_array_1): Handle max_index of -1.
145
146 2005-12-06 Roger Sayle <roger@eyesopen.com>
147
148 * typeck.c (build_binary_op): Issue warning if either operand of a
149 comparison operator is a string literal, except for testing equality
150 or inequality against NULL.
151
152 2005-12-06 Roger Sayle <roger@eyesopen.com>
153
154 PR c++/25263
155 * decl.c (compute_array_index_type): Check that itype is an
156 INTEGER_CST node before testing/clearing TREE_OVERFLOW.
157
158 2005-12-05 Daniel Berlin <dberlin@dberlin.org>
159
160 * ptree.c (cxx_print_decl): Update to check for decl_common
161 structure.
162
163 2005-12-02 Mark Mitchell <mark@codesourcery.com>
164
165 PR c++/24173
166 * decl.c (duplicate_decls): Don't rely on DECL_TEMPLATE_INFO after
167 clobbering newdecl.
168
169 2005-12-02 Richard Guenther <rguenther@suse.de>
170
171 * semantics.c (simplify_aggr_init_expr): Use buildN instead
172 of build.
173
174 2005-12-02 Gabriel Dos Reis <gdr@integrable-solutions.net>
175
176 * parser.c (cp_lexer_new_main): Usr GGC_RESIZEVEC instead of
177 ggc_realloc.
178 (cp_parser_template_argument_list): Use XRESIZEVEC instead of
179 xrealloc.
180 * class.c (pushclass): Likewise.
181
182 2005-12-02 Gabriel Dos Reis <gdr@integrable-solutions.net>
183
184 * decl2.c (get_priority_info): Use XNEW, not xmalloc.
185 * decl.c (push_switch): Likewise.
186 * lex.c (handle_pragma_implementation): Likewise.
187 * cp-objcp-common.c (decl_shadowed_for_var_insert): Use GGC_NEW,
188 not ggc_alloc.
189 (cxx_initialize_diagnostics): Use XNEW, not xmalloc.
190 * class.c (init_class_processing): Use XNEWVEC, not xmalloc.
191 * g++spec.c (lang_specific_driver): Likewise.
192 * mangle.c (save_partially_mangled_name): Likewise.
193 * parser.c (cp_lexer_new_main): Use GGC_NEWVEC, not ggc_alloc.
194 (cp_parser_template_argument_list): Use XNEWVEC, nto xmalloc.
195 (cp_parser_sizeof_operand): Likewise.
196 * repo.c (open_repo_file, open_repo_file): Likewise.
197
198 2005-12-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
199
200 * parser.c (cp_parser_make_typename_type): Call make_typename_type
201 with tf_none instead of magic value 0.
202 (cp_parser_explicit_instantiation): Call do_type_instantiation
203 with tf_error instead of magic value 1.
204 (cp_parser_elaborated_type_specifier): Call make_typename_type
205 with tf_error instead of magic value 1.
206 (cp_parser_class_name): Likewise.
207 (cp_parser_lookup_name): Likewise.
208
209 2005-12-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
210
211 * parser.c (cp_parser_declaration): Set token2.type to CPP_EOF,
212 not RID_MAX.
213
214 2005-11-30 Jason Merrill <jason@redhat.com>
215
216 PR c++/21123
217 * cp-gimplify.c (cp_genericize_r): Don't dereference invisible reference
218 parms in a thunk.
219
220 2005-11-30 Ben Elliston <bje@au.ibm.com>
221
222 * typeck.c (build_x_unary_op): Correct spelling in error message.
223
224 2005-11-28 Nathan Sidwell <nathan@codesourcery.com>
225
226 PR c++/21166
227 * class.c (check_field_decls): Only set DECL_PACKED on a field
228 when its natural alignment is > BITS_PER_UNIT.
229
230 2005-11-27 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
231
232 PR c++/24979
233 * cp-tree.h (DECL_MAIN_P): Remove duplicate definition.
234
235 2005-11-26 Richard Henderson <rth@redhat.com>
236
237 * lex.c: Update for pragma_lex rename.
238 * parser.c: Likewise.
239
240 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
241
242 PR c++/9278
243 * decl.c (grokparms): Do not allow typedef-names in a '(void)'
244 parmlist.
245
246 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
247
248 * typeck2.c (process_init_constructor_union): Remove check for
249 unnamed union members.
250
251 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
252
253 * name-lookup.c (lookup_name_real): Merge two if's.
254
255 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
256
257 * pt.c (instantiate_class_template): Clean-up.
258
259 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
260
261 * pt.c (template_class_depth_real): Remove. Move functionality to ...
262 (template_class_depth): ... here, replacing count_specializations
263 with 0. Adjust comment.
264
265 2005-11-24 Richard Guenther <rguenther@suse.de>
266 Dirk Mueller <dmueller@suse.de>
267
268 PR c++/14024
269 * typeck.c (build_reinterpret_cast_1): Use
270 strict_aliasing_warning.
271
272 2005-11-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
273
274 PR c++/24235
275 * pt.c (check_instantiated_args): Reword diagnostic message about
276 template argument involving local types.
277
278 2005-11-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
279
280 PR c++/21667
281 * typeck.c (build_array_ref): Avoid code duplicate. Use common
282 C/C++ diagnostic function warn_array_subscript_with_type_char.
283
284 2005-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
285
286 PR c++/22238
287 * error.c (resolve_virtual_fun_from_obj_type_ref): New.
288 (dump_expr): Use it in <case CALL_EXPR>.
289
290 2005-11-21 Richard Henderson <rth@redhat.com>
291
292 * cp-objcp-common.h, name-lookup.c, name-lookup.h: Revert 11-18 patch.
293
294 * name-lookup.c (lookup_name): Remove prefer_type argument.
295 (lookup_name_prefer_type): New.
296 * decl.c (lookup_and_check_tag): Use them.
297 * pt.c (tsubst_friend_class): Likewise.
298 (lookup_template_class): Likewise.
299 (tsubst_copy_and_build): Likewise.
300 * name-lookup.h (lookup_name_prefer_type): New.
301 (lookup_name): Remove declaration.
302
303 2005-11-18 Mark Mitchell <mark@codesourcery.com>
304
305 PR c++/8355
306 * decl.c (grokfndecl): Set up DECL_TEMPLATE_INFO before calling
307 set_decl_namespace.
308 * name-lookup.c (set_decl_namespace):
309
310 2005-11-18 Mike Stump <mrs@apple.com>
311
312 * cp-objcp-common.h (LANG_HOOKS_LOOKUP_NAME): Add.
313 * name-lookup.c (lookup_name_two): Remove.
314 (lookup_name_one): Add.
315 * name-lookup.h (lookup_name_two): Remove.
316 (lookup_name_one): Add.
317
318 2005-11-15 Jason Merrill <jason@redhat.com>
319
320 PR c++/24580
321 * method.c (locate_copy): Also use skip_artificial_parms here.
322 (synthesize_exception_spec): Use CLASS_TYPE_P rather than checking
323 for RECORD_TYPE.
324 (locate_ctor): Abort if we fail to find a default constructor.
325
326 2005-11-15 Mike Stump <mrs@apple.com>
327
328 * name-lookup.c (lookup_name_two): Add.
329 * name-lookup.h: Likewise.
330
331 2005-11-15 Mark Mitchell <mark@codesourcery.com>
332
333 PR c++/24667
334 * typeck.c (check_for_casting_away_constness): Use the diag_fn.
335 (build_const_cast_1): Call it, for C-style casts.
336
337 2005-11-14 Mark Mitchell <mark@codesourcery.com>
338
339 PR c++/24687
340 * pt.c (check_explicit_specialization): Don't check for C linkage.
341 (push_template_decl_real): Likewise.
342 * parser.c (cp_parser_explicit_specialization): Check here.
343 (cp_parser_template_declaration_after_export): And here.
344
345 * parser.c (cp_lexer_get_preprocessor_token): Initialize keyword
346 field.
347
348 2005-11-14 Jason Merrill <jason@redhat.com>
349
350 PR c++/24580
351 * method.c (locate_ctor): Skip all artificial parms, not just
352 'this'.
353
354 2005-11-14 Mark Mitchell <mark@codesourcery.com>
355
356 * parser.c (eof_token): Add initializer for ambiguous_p.
357
358 2005-11-13 Mark Mitchell <mark@codesourcery.com>
359
360 PR c++/24817
361 * decl.c (check_redeclaration_exception_specification): New
362 function.
363 (duplicate_decls): Use it.
364 * error.c (fndecl_to_string): Print the template parameter list.
365
366 PR c++/20293
367 * cxx-pretty-print.c (pp_cxx_statement): Print qualifying scopes
368 for namespaces.
369 (pp_cxx_original_namespace_definition): Likewise.
370 * name-lookup.c (ambiguous_decl): Don't issue error messages;
371 instead return lists of ambiguous candidates.
372 (select_decl): Handle ambiguous namespace lookups.
373 * parser.c (cp_token): Add ambiguous_p.
374 (cp_lexer_get_preprocessor_token): Set it.
375 (cp_parser_diagnose_invalid_type_name): Avoid duplicate messages
376 when a qualified name uses an invalid scope.
377 (cp_parser_primary_expression): Print ambiguous candidates.
378 (cp_parser_type_parameter): Adjust comment to reflect new
379 parameter name for cp_parser_lookup_name.
380 (cp_parser_template_argument): Likewise.
381 (cp_parser_elaborated_type_specifier): Likewise.
382 (cp_parser_namespace_name): Likewise.
383 (cp_parser_class_name): Print ambiguous candidates.
384 (cp_parser_lookup_name): Rename ambiguous_p parameter to
385 ambiguous_decls. Use it to return a list of ambiguous candiates
386 when a lookup is ambiguous.
387 (cp_parser_lookup_name_simple): Adjust comment to reflect new
388 parameter name for cp_parser_lookup_name.
389
390 2005-11-12 Jakub Jelinek <jakub@redhat.com>
391
392 PR c++/24780
393 * typeck.c (complete_type): Set TYPE_NEEDS_CONSTRUCTING
394 and TYPE_HAS_NONTRIVIAL_DESTRUCTOR flags for all variants
395 of array type.
396
397 PR c++/24761
398 * pt.c (tsubst_copy_asm_operands): New function.
399 (tsubst_expr) <case ASM_EXPR>: Use it.
400
401 2005-11-08 Jakub Jelinek <jakub@redhat.com>
402
403 PR c++/19450
404 * decl.c (redeclaration_error_message): Issue diagnostics about
405 olddecl and newdecl disagreement on __thread property.
406 (grokdeclarator): Set DECL_TLS_MODEL on class static variables.
407
408 2005-11-08 Jason Merrill <jason@redhat.com>
409
410 PR c++/21123
411 * method.c (use_thunk): Use build_cplus_new instead of
412 force_target_expr.
413
414 2005-11-06 Jason Merrill <jason@redhat.com>
415 James A. Morrison <phython@gcc.gnu.org>
416
417 PR c++/17256
418 * decl2.c (cp_finish_file): Fix conditions for undefined warning.
419 Set TREE_NO_WARNING instead of TREE_PUBLIC.
420 * pt.c (instantiate_pending_templates): Set DECL_INITIAL to avoid
421 a warning on a function we didn't instantiate because of excessive
422 recursion.
423
424 2005-11-06 Mark Mitchell <mark@codesourcery.com>
425
426 * class.c (record_subobject_offsets): Don't record offsets past
427 biggest empty class for non-empty base classes.
428 (layout_class_type): Use TYPE_SIZE_UNIT, not TYPE_SIZE, when
429 keeping track of the size of emptyclasses.
430
431 PR c++/21308
432 * class.c (sizeof_biggest_empty_class): New variable.
433 (record_subobject_offsets): Don't record offsets past biggest
434 empty class for data members. Replace vbases_p parameter with
435 is_data_member parameter.
436 (build_base_field): Adjust call.
437 (layout_class_type): Likewise. Maintain
438 sizeof_biggest_empty_class.
439
440 2005-11-05 Kazu Hirata <kazu@codesourcery.com>
441
442 * decl2.c, init.c, typeck.c: Fix comment typos.
443
444 2005-11-04 Richard Guenther <rguenther@suse.de>
445
446 PR c++/22487
447 * init.c (build_vec_init): Build comparison of matching
448 types.
449
450 2005-11-03 Josh Conner <jconner@apple.com>
451
452 PR c++/19989
453 pt.c (tsubst): Accept zero-length array if tf_error is set
454 in complain flags. Change error message for negative-
455 length array.
456
457 2005-11-04 Joseph S. Myers <joseph@codesourcery.com>
458
459 * cp-tree.h (cp_cpp_error), error.c (cp_cpp_error): Take va_list*
460 parameter.
461
462 2005-11-03 Joseph S. Myers <joseph@codesourcery.com>
463
464 PR c++/17964
465 * error.c (cp_cpp_error): New function.
466 * cp-tree.h (cp_cpp_error): Declare.
467 * parser.c (cp_lexer_new_main): Set CPP option client_diagnostic
468 and error callback after lexing.
469
470 2005-11-03 Mark Mitchell <mark@codesourcery.com>
471
472 PR c++/21627
473 * pt.c (register_specialization): Update inline flags on clones.y
474
475 2005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
476
477 PR c++/24582
478 * decl.c (declare_local_label): Return 0 for variables
479 with error_mark_node as their types.
480
481 2005-11-02 Mark Mitchell <mark@codesourcery.com>
482
483 PR c++/22434
484 * call.c (build_conditional_expr): Do bad conversions, if there's
485 no other choice.
486
487 PR c++/24560
488 * parser.c (cp_parser_postfix_dot_deref_expression): Improve error
489 message for use of overloaded functions on LHS of "." operator.
490
491 PR c++/19253
492 * parser.c (cp_parser_postfix_expression): Use
493 cp_parser_elaborated_type_specifier to handle typename-types in
494 functional casts.
495 (cp_parser_enclosed_argument_list): Skip ahead to the end of the
496 template argument list if the closing ">" is not found.
497
498 PR c++/24569
499 * pt.c (instantiate_decl): Use cp_finish_decl, not
500 finish_static_data_member_decl.
501
502 2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
503
504 * decl.c (grokfndecl): Remove the setting
505 of the return type of the function type
506 of main after erroring about must returning
507 int.
508
509 2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
510
511 PR C++/23229
512 * decl.c (grokfndecl): Create a new function type
513 after erroring out about main not returning int.
514
515 2005-10-28 Josh Conner <jconner@apple.com>
516
517 PR c++/22153
518 * parser.c (cp_parser_member_declaration): Detect and handle
519 a template specialization.
520
521 2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
522
523 PR C++/23426
524 * decl.c (start_decl): Check that the decl is an
525 error_mark_node before getting the type.
526 Remove the check for the decl's type being an
527 error_mark_node.
528
529 2005-10-21 Mark Mitchell <mark@codesourcery.com>
530
531 PR c++/24260
532 * parser.c (cp_parser_init_declarator): Pass attributes to
533 grokfield.
534
535 2005-10-20 Mark Mitchell <mark@codesourcery.com>
536
537 PR c++/22618
538 * search.c (accessible_p): Check access in the outermost set of
539 template parameters.
540
541 2005-10-20 Richard Guenther <rguenther@suse.de>
542
543 * decl.c (grokdeclarator): Fix ambiguous pedwarn message.
544
545 2005-10-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
546
547 PR c++/22293
548 * decl.c (grokdeclarator): Reject unqualified destructors in
549 friend declarations.
550
551 2005-10-18 Mark Mitchell <mark@codesourcery.com>
552
553 PR c++/23293
554 * pt.c (convert_template_argument): Use canonical type variants in
555 template specializations.
556
557 2005-10-18 Nathan Sidwell <nathan@codesourcery.com>
558
559 PR c++/21383
560 * name-lookup.c (arg_assoc): Template args can be null in a
561 template-id-expr.
562
563 PR c++/22604
564 * class.c (update_vtable_entry_for_fn): Don't process invalid
565 covariant overriders.
566
567 PR c++/23118
568 * cp-tree.h (add_method): Add return value.
569 * class.c (add_method): Return success indicator.
570 * semantics.c (finish_member_declaration): Don't add an invalid
571 method to the method list.
572
573 2005-10-17 Mark Mitchell <mark@codesourcery.com>
574
575 PR c++/21908
576 * call.c (build_new_method_call): Do not show VTT parameters to
577 the user.
578
579 2005-10-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
580
581 PR c++/23440
582 * parser.c (cp_parser_statement): If the parser reached CPP_EOF,
583 only complain about missing statement.
584
585 2005-10-17 Nathan Sidwell <nathan@codesourcery.com>
586
587 PR c++/24386
588 * cp-tree.h (BASELINK_QUALIFIED_P): New.
589 * pt.c (tsubst_copy_and_build): <CALL_EXPR case>: Use it.
590 * typeck.c (finish_class_member_access_expr): Set it.
591
592 PR c++/21353
593 * decl.c (check_default_argument): Don't check
594 processing_template_decl or uses_template_parms here.
595 (grokparms): Only call check_default_argument when not processing
596 a template decl.
597 * parser.c (cp_parser_late_parsing_default_arg): Call
598 check_default_argument when not processing a template decl.
599
600 2005-10-16 Mark Mitchell <mark@codesourcery.com>
601
602 PR c++/24389
603 * decl2.c (mark_used): Use uses_template_parms instead of
604 dependent_type_p.
605 * init.c (constant_value_1): Handle uninstantiated templates
606 specially.
607 * pt.c (instantiate_decl): Add sanity check.
608
609 2005-10-16 Mark Mitchell <mark@codesourcery.com>
610
611 PR c++/22173
612 * typeck.c (check_template_keyword): Fix thinko.
613
614 2005-10-16 Andrew Pinski <pinskia@physics.uc.edu>
615
616 PR c++/23959
617 * decl.c (pop_switch): Only call c_do_switch_warnings
618 when not processing templates.
619
620 2005-10-16 Mark Mitchell <mark@codesourcery.com>
621
622 PR c++/22173
623 * cp-tree.h (QUALIFIED_NAME_IS_TEMPLATE): New macro.
624 (check_template_keyword): New function.
625 (finish_id_expression): Change prototoype.
626 (finish_qualified_id_expr): Change prototype.
627 (build_qualified_name): New function.
628 (finish_class_member_access_expr): Change prototype.
629 * init.c (build_offset_ref): Use build_qualified_name.
630 * mangle.c (write_expression): Likewise.
631 * parser.c (cp_parser_primary_expression): Remove qualifying_class
632 parameter. Add address_p and template_arg_p. Use
633 build_qualified_name.
634 (cp_parser_id_expression): Default *template_p to
635 template_keyword_p. Check for invalid uses of the template
636 keyword.
637 (cp_parser_postfix_expression): Eliminate special handling for
638 qualified names. Adjust call to cp_parser_primary_expression.
639 (cp_parser_postfix_dot_deref_expression): Adjust call to
640 cp_parser_id_expression and finish_class_member_access_expr.
641 (cp_parser_template_argument_list): Add comment.
642 (cp_parser_template_argument): Adjust use of
643 cp_parser_primary_expression. Remove call to
644 finish_qualified_id_expr.
645 (cp_parser_lookup_name): Use build_qualified_name.
646 * pt.c (tsubst): Use build_qualified_name.
647 (tsubst_qualified_id): Likewise. Adjust call to
648 finish_qualified_id_expr.
649 (tsubst_copy): Use build_qualified_name.
650 (tsubst_copy_and_build): Adjusts call to finish_id_expression and
651 finish_class_member_access_expr.
652 * semantics.c (finish_non_static_data_member): Use
653 build_qualified_name.
654 (finish_qualified_id_expr): Add template_p and template_arg_p
655 parameters.
656 (finish_id_expression): Remove qualifiying_class parameter. Add
657 template_p, done, address_p, and template_arg_p. Use
658 build_qualified_name. Adjust calls to
659 finish_class_member_acess_expr.
660 * tree.c (build_qualified_name): New function.
661 * typeck.c (check_template_keyword): New function.
662 (finish_class_member_access_expr): Add template_p argument. Check
663 for invalid uses of the template keyword.
664
665 2005-10-15 Mark Mitchell <mark@codesourcery.com>
666
667 PR c++/21347
668 * class.c (maybe_warn_about_overly_private_class): Lazy
669 constructors are public.
670
671 2005-10-14 Mark Mitchell <mark@codesourcery.com>
672
673 PR c++/19565
674 * call.c (convert_like_real): Rely on convert_and_check to issue
675 warnings about overflow and conversion to unsigned.
676 * decl.c (finish_enum): Use the location of the enumerators, not
677 the closing brace of the enumeration, when reporting warnings
678 about conversions.
679 (build_enumerator): Use error_mark_node for erroneous values.
680 * typeck2.c (digest_init): Remove reference to "signature pointer"
681 from comment.
682
683 2005-10-14 Nathan Sidwell <nathan@codesourcery.com>
684
685 PR c++/17796
686 * optimize.c (update_cloned_parm): Add FIRST parameter. Use it.
687 (maybe_clone_body): Track the first clone.
688
689 2005-10-13 Nathan Sidwell <nathan@codesourcery.com>
690
691 PR c++/23984
692 * class.c (build_base_path): The vtable is always the first thing
693 in the vtt.
694
695 2005-10-13 Mark Mitchell <mark@codesourcery.com>
696
697 PR c++/20721
698 * cp-tree.h (DECL_NONTRIVIALLY_INITIALIZED_P): New macro.
699 * decl.c (duplicate_decls): Merge it into new declarations.
700 (decl_jump_unsafe): Use it, rather than DECL_INITIAL.
701 (cp_finish_decl): Set it, when appropriate.
702
703 PR c++/22180
704 * call.c (build_new_method_call): Correct pretty-printing of
705 destructor names.
706 * pt.c (tsubst_qualified_id): Recognize invalid uses of "~T" as an
707 identifier.
708
709 PR c++/23694
710 * decl.c (start_method): Return error_mark_node for errors.
711
712 PR c++/23307
713 * pt.c (push_template_decl_real): Complain about attempts to
714 declare template variables.
715
716 PR c++/22352
717 * pt.c (tsubst_template_parms): Set processing_template_decl while
718 processing the parameters.
719 (tsubst_decl): Set processing_template_decl when substituting into
720 a TEMPLATE_DECL.
721
722 PR c++/22405
723 * pt.c (most_specialized_instantiation): Robustify.
724
725 PR c++/22464
726 * semantics.c (finish_id_expression): Issue errors about uses of
727 local variables in containing functions even in templates.
728
729 2005-10-12 Danny Smith <dannysmith@users.sourceforge.net>
730
731 PR target/21801
732 PR target/23589
733 * class.c (finish_struct_1): Call
734 targetm.cxx.adjust_class_at_definition.
735
736
737 2005-10-12 Nathan Sidwell <nathan@codesourcery.com>
738
739 PR c++/21592
740 * pt.c (build_non_dependent_expr): Don't wrap a COMPONENT_REF
741 with already looked up member functions. Assert we're not
742 returning a NON_DEPENDENT_EXPR with unknown type.
743 * typeck.c (finish_class_member_access_expr): We can get
744 non-template-id-expr baselinks. If the lookup finds a baselink,
745 remember it even inside templates.
746
747 PR c++/23797
748 * parser.c (cp_parser_functional_cast): Cope when TYPE is not a
749 TYPE_DECL. Use dependent_type_p to check type.
750 * pt.c (uses_template_parms_p): Use dependent_type_p for a
751 TYPE_DECL.
752 (type_dependent_expression_p): Assert we've not been given a
753 TYPE_DECL.
754
755 PR c++/21117
756 * decl.c (check_function_type): Correctly overwrite incomplete
757 return type with void type.
758 * typeck.c (check_return_expr): If the function's return type is
759 void, don't try and convert a return expr.
760
761 2005-10-12 David Edelsohn <edelsohn@gnu.org>
762
763 PR c++/23730
764 * call.c (build_object_call): If BINFO is NULL, bypass
765 lookup_fnfields and set fns to NULL_TREE.
766
767 2005-10-12 Paolo Bonzini <bonzini@gnu.org>
768
769 PR c++/24052
770 * error.c (dump_expr): Pass LABEL_DECL to dump_decl. Print
771 an ADDR_EXPR of a LABEL_DECL as &&.
772
773 2005-10-12 Nathan Sidwell <nathan@codesourcery.com>
774
775 PR c++/19964
776 * class.c (walk_subobject_offsets): Don't walk error_mark_node.
777
778 2005-10-11 Ian Lance Taylor <ian@airs.com>
779
780 PR c++/8057
781 * cvt.c (convert_to_void): Don't warn about unused values when
782 processing a template declaration.
783
784 2005-10-11 Mark Mitchell <mark@codesourcery.com>
785
786 PR c++/21089
787 * call.c (convert_like_real): Use decl_constant_value, not
788 integral_constant_value.
789 * init.c (constant_value_1): New function.
790 (integral_constant_value): Use it.
791 (decl_constant_value): Likewise.
792 * typeck.c (decay_conversion): Use decl_constant_value, not
793 integral_constant_value.
794
795 PR c++/21369
796 * parser.c (cp_parser_elaborated_type_specifier): Don't treat
797 class types as templates if the type is not appearing as part of a
798 type definition or declaration.
799
800 2005-10-10 Mark Mitchell <mark@codesourcery.com>
801
802 PR c++/24277
803 * pt.c (instantiate_decl): Call finish_static_data_member_decl for
804 static data members.
805
806 2005-10-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
807 Mark Mitchell <mark@codesourcery.com>
808
809 PR c++/23437
810 * parser.c (cp_parser_template_argument_list): Do not treat
811 contents of argument list as part of a constant expression.
812
813 2005-10-10 Mark Mitchell <mark@codesourcery.com>
814
815 PR c++/24139
816 * decl.c (grokdeclarator): Do not require template parameter lists
817 for explicitly specialized class.
818 * error.c (dump_aggr_type): Do not dump template arguments for
819 non-primary specializations.
820 (dump_function_name): Likewise.
821
822 PR c++/24275
823 * pt.c (instantiate_decl): Instantiate the initializer of
824 a static data member in the namespace containing the class
825 containing the static data member.
826
827 2005-10-08 James A. Morrison <phython@gcc.gnu.org>
828
829 PR c++/22172
830 * parser.c (cp_parser_postfix_expression) <RID_TYPENAME>: Treat nontype
831 scopes as nondependent.
832
833 2005-10-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
834
835 * call.c (resolve_args): Remove redundant test.
836
837 2005-10-05 Paolo Bonzini <bonzini@gnu.org>
838
839 PR tree-optimization/21419
840 PR tree-optimization/24146
841 PR tree-optimization/24151
842
843 * semantics.c (finish_asm_stmt): Call readonly_error if outputs are
844 read-only. Set ASM_VOLATILE_P for asms without outputs.
845
846 2005-10-05 Nathan Sidwell <nathan@codesourcery.com>
847
848 PR c++/23513
849 * call.c (joust): Adjust length count to more_specialized_fn.
850 * pt.c (more_specialized_fn): Cope with non-static member vs
851 non-member.
852
853 2005-10-04 Andrew Pinski <pinskia@physics.uc.edu>
854
855 PR middle-end/23125
856 * decl.c (make_rtl_for_nonlocal_decl): Use set_user_assembler_name
857 instead of change_decl_assembler_name.
858
859 2005-10-03 Alexandre Oliva <aoliva@redhat.com>
860
861 * error.c (dump_type) <UNKNOWN_TYPE>: Print reworded message.
862
863 2005-10-03 Mark Mitchell <mark@codesourcery.com>
864
865 PR c++/17775
866 * repo.c: Include flags.h.
867 (finish_repo): Add -frandom-seed to the arguments.
868
869 2005-10-02 Mark Mitchell <mark@codesourcery.com>
870
871 PR c++/22621
872 * parser.c (cp_parser_template_argument): Don't turn "T::f" into
873 "(*this).T::f".
874 * pt.c (convert_nontype_argument): Remove ??? comment.
875
876 PR c++/23840
877 * tree.c (lvalue_p_1): A VA_ARG_EXPR with class type is an lvalue,
878 when class rvalues are lvalues.
879
880 2005-09-28 Mark Mitchell <mark@codesourcery.com>
881
882 PR c++/16782
883 * decl.c (grokdeclarator): Always pedwarn about overqualified
884 member names.
885
886 2005-09-27 Mark Mitchell <mark@codesourcery.com>
887
888 PR c++/22147
889 * name-lookup.c (maybe_process_template_type_declaration): Don't
890 treat forward declarations of classes as templates just because
891 we're processing_template_decl.
892 * pt.c (tsubst_decl): Clear DECL_TEMPLATE_INFO for friend
893 functions.
894
895 2005-09-26 Jason Merrill <jason@redhat.com>
896
897 PR c++/13764
898 * cp-tree.h (FUNCTION_NEEDS_BODY_BLOCK): New macro.
899 * name-lookup.c (pushdecl_maybe_friend): Check it.
900 * decl.c (begin_function_body): Do nothing if it's false.
901 (finish_function_body): Ditto.
902 (outer_curly_brace_block): New fn.
903 (finish_function): Use it.
904
905 2005-09-26 Richard Guenther <rguenther@suse.de>
906
907 PR middle-end/15855
908 * decl2.c (do_static_destruction): Remove.
909 (finish_static_initialization_or_destruction): Likewise.
910 (DECL_EFFECTIVE_INIT_PRIORITY): New macro.
911 (NEEDS_GUARD_P): Likewise.
912 (do_static_initialization): Rename to
913 do_static_initialization_or_destruction. Process all
914 initializers/destructors and handle common conditionalizing.
915 (start_static_initialization_or_destruction): Rename to
916 one_static_initialization_or_destruction. Handle only
917 decl-specific conditionalizing.
918 (cp_finish_file): Call do_static_initialization_or_destruction.
919
920 2005-09-22 Jakub Jelinek <jakub@redhat.com>
921
922 PR c++/21983
923 * class.c (find_final_overrider): Move diagnostic about no unique final
924 overrider to...
925 (update_vtable_entry_for_fn): ... here.
926
927 2005-09-21 Mark Mitchell <mark@codesourcery.com>
928
929 PR c++/23993
930 * init.c (integral_constant_value): Use DECL_INTEGRAL_CONSTANT_VAR_P.
931
932 2005-09-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
933
934 PR c++/23965
935 * call.c (resolve_args): Return error_mark_node on arguments
936 whose TREE_TYPE is error_mark_node.
937
938 2005-09-20 Jakub Jelinek <jakub@redhat.com>
939
940 PR c++/23947
941 * rtti.c (get_pseudo_ti_init): Recompute ti pointer after
942 get_tinfo_ptr calls.
943
944 2005-09-16 Mark Mitchell <mark@codesourcery.com>
945
946 PR c++/23914
947 * parser.c (cp_parser_enclosed_template_argument_list): Make sure
948 skip_evaluation is false when processing template arguments.
949
950 PR c++/21514
951 * pt.c (check_instantiated_args): Treat uses of anonymous types as
952 causing type-deduction failure.
953
954 2005-09-15 Jason Merrill <jason@redhat.com>
955
956 PR c++/23357
957 * cp-tree.def (SIZEOF_EXPR, ALIGNOF_EXPR): Change code class to
958 tcc_expression.
959
960 2005-09-15 Mark Mitchell <mark@codesourcery.com>
961
962 PR c++/23896
963 * pt.c (tsubst_aggr_type): Make sure skip_evaluation is false when
964 processing template arguments.
965
966 * pt.c (check_explicit_instantiation_namespace): Fix typo.
967
968 PR c++/13140
969 * decl.c (check_class_member_definition_namespace): New function.
970 (grokfndecl): Use it.
971 (grokvardecl): Likewise.
972 (grokdecl): Improve documentation.
973 * pt.c (check_explicit_instantiation_namespace): New function.
974 (register_specialization): Call check_specialization_namespace
975 when replacing an implicitly instantiated function.
976 (check_explicit_specialization): Ensure that DECL_CONTEXT is set
977 correctly for namespace-scope specializations.
978 (do_decl_instantiation): Use
979 check_explicit_instantiation_namespace.
980 (do_type_instantiation): Likewise.
981
982 2005-09-15 Nathan Sidwell <nathan@codesourcery.com>
983
984 PR c++/23725
985 * error.c (dump_decl): <USING_DECL case> Use USING_DECL_SCOPE.
986
987 2005-09-13 Bastian Blank <waldi@debian.org>
988
989 PR c++/16171
990 * mangle.c (find_substitution): Do not use special substitutions
991 for identifiers not in std::.
992
993 2005-09-13 Mark Mitchell <mark@codesourcery.com>
994
995 PR c++/23839
996 * typeck.c (cxx_mark_addressable): Only check DECL_HARD_REGISTER
997 for VAR_DECLs.
998
999 2005-09-13 Mark Mitchell <mark@codesourcery.com>
1000
1001 PR c++/23842
1002 * pt.c (tsubst_default_argument): Do treat default argument
1003 expressions as occurring in the context of the function called.
1004
1005 2005-09-12 Mark Mitchell <mark@codesourcery.com>
1006
1007 PR c++/23841
1008 * parser.c (cp_parser_primary_expression): Recognize the closing
1009 ">" of a template-argument-list after a floating-point literal as
1010 the end of a cast expression.
1011
1012 2005-09-12 Mark Mitchell <mark@codesourcery.com>
1013
1014 PR c++/23789
1015 * cvt.c (perform_qualification_conversions): Don't create
1016 unnecessary NOP_EXPRs.
1017 * pt.c (tsubst_template_arg): Use fold_non_dependent_expr.
1018
1019 2005-09-12 Ian Lance Taylor <ian@airs.com>
1020
1021 PR g++/7874
1022 * cp-tree.h (struct lang_decl_flags): Add hidden_friend_p
1023 bitfield. Make dummy bitfield one bit smaller.
1024 (DECL_HIDDEN_FRIEND_P): Define.
1025 (pushdecl_maybe_friend): Declare.
1026 (pushdecl_top_level_maybe_friend): Declare.
1027 * decl.c (duplicate_decls): Add newdecl_is_friend parameter.
1028 Change prototype and all callers. Add assertion that a
1029 DECL_ARTIFICIAL FUNCTION_DECL is not DECL_HIDDEN_FRIEND_P. Set
1030 DECL_ANTICIPATED and DECL_HIDDEN_FRIEND_P in duplicated decl if
1031 appropriate.
1032 * name-lookup.c (supplement_binding): Don't ignore a
1033 DECL_HIDDEN_FRIEND_P.
1034 (pushdecl_maybe_friend): Break out contents of pushdecl. Add
1035 is_friend parameter. Set DECL_ANTICIPATED and
1036 DECL_HIDDEN_FRIEND_P for a friend function.
1037 (pushdecl): Just call pushdecl_maybe_friend.
1038 (pushdecl_with_scope): Add is_friend parameter. Change prototype
1039 and all callers.
1040 (pushdecl_namespace_level): Likewise.
1041 (push_overloaded_decl): Likewise. Check DECL_HIDDEN_FRIEND_P as
1042 well as DECL_ANTICIPATED when checking for a builtin.
1043 (do_nonmember_using_decl): Check DECL_HIDDEN_FRIEND_P as well as
1044 DECL_ANTICIPATED when checking for a builtin.
1045 (do_nonmember_using_decl): Likewise.
1046 (pushdecl_top_level_1): Add is_friend parameter. Change all
1047 callers.
1048 (pushdecl_top_level_maybe_friend): New function.
1049 (remove_hidden_names): New function.
1050 (struct arg_lookup): Add args field.
1051 (friend_of_associated_class_p): New static function.
1052 (arg_assoc_namespace): Ignore hidden functions which are not
1053 friends of an associated class of some argument.
1054 (lookup_arg_dependent): Remove hidden functions from list passed
1055 in. Initialize k.args.
1056 * name-lookup.h (remove_hidden_names): Declare.
1057 * friend.c (do_friend): Call pushdecl_maybe_friend instead of
1058 pushdecl.
1059 * call.c (add_function_candidate): Change DECL_ANTICIPATED test to
1060 an assertion, with a check for DECL_HIDDEN_FRIEND_P.
1061 (build_new_function_call): Add koenig_p parameter. Change
1062 prototype and callers.
1063 * pt.c (register_specialization): Add is_friend parameter. Change
1064 all callers.
1065 (push_template_decl_real): Change is_friend parameter to bool.
1066 Change prototype and all callers.
1067 (tsubst_friend_class): Call pushdecl_top_level_maybe_friend
1068 instead of pushdecl_top_level.
1069
1070 2005-09-11 Richard Henderson <rth@redhat.com>
1071
1072 * decl2.c (build_anon_union_vars): Copy attributes from the base addr.
1073 * pt.c (tsubst_decl): Substitute in DECL_VALUE_EXPR.
1074
1075 2005-09-09 Gabriel Dos Reis <gdr@integrable-solutions.net>
1076
1077 * parser.c (cp_parser_translation_unit): Simplify. The while-block
1078 was actually executed at most once.
1079
1080 2005-09-09 Richard Henderson <rth@redhat.com>
1081
1082 PR debug/20998
1083 * cp-tree.def (ALIAS_DECL): Remove.
1084 * cp-lang.c (cp_init_ts): Remove support for it.
1085 * error.c (dump_decl): Likewise.
1086 * name-lookup.c (pushdecl): Likewise.
1087 * semantics.c (finish_id_expression): Likewise.
1088 * decl2.c (build_anon_union_vars): Use a VAR_DECL with
1089 DECL_VALUE_EXPR instead.
1090
1091 2005-09-09 Mark Mitchell <mark@codesourcery.com>
1092
1093 PR c++/22252
1094 * decl.c (start_preparsed_function): Do not pay attention to
1095 #pragma interface for implicitly-defined methods.
1096 * decl2.c (cp_finish_file): Do not complain about uses of inline
1097 functions that have bodies, even if we decided not to emit the
1098 body in this translation unit.
1099 * semantics.c (note_decl_for_pch): Do not mess with linkage.
1100 (expand_or_defer_fn): Make inline, non-template functions COMDAT
1101 at this point.
1102
1103 2005-09-08 Richard Henderson <rth@redhat.com>
1104
1105 PR debug/23190
1106 * decl.c (wrapup_globals_for_namespace): Call
1107 emit_debug_global_declarations.
1108 * decl2.c (cp_finish_file): Likewise.
1109
1110 2005-09-08 Mark Mitchell <mark@codesourcery.com>
1111
1112 PR c++/23691
1113 * decl2.c (mark_used): Instantiate static data members initialized
1114 by constants, even in a template.
1115
1116 2005-09-08 Andrew Pinski <pinskia@physics.uc.edu>
1117
1118 PR obj-c++/16816
1119 * parser.c (cp_parser_objc_selector_expression): Treat CPP_SCOPE as
1120 two CPP_COLON.
1121
1122 2005-09-07 Richard Guenther <rguenther@suse.de>
1123
1124 * cp-gimplify.c (cp_gimplify_expr): Create empty CONSTRUCTOR
1125 for EMPTY_CLASS_EXPR.
1126
1127 2005-09-06 Jakub Jelinek <jakub@redhat.com>
1128
1129 PR c/23075
1130 * typeck.c (check_return_expr): Add no_warning argument. Set
1131 *no_warning to true if "return-statement with no value, in function
1132 returning" warning has been issued.
1133 * cp-tree.h (check_return_expr): Adjust prototype.
1134 * semantics.c (finish_return_stmt): Set TREE_NO_WARNING if
1135 check_return_expr set *no_warning to true.
1136
1137 2005-09-06 Mark Mitchell <mark@codesourcery.com>
1138
1139 * cp-tree.h (rvalue): New function.
1140 * call.c (build_conditional_expr): Use it.
1141 * init.c (build_new_1): Likewise.
1142 * rtti.c (build_dynamic_cast_1): Likewise.
1143 * tree.c (rvalue): New function.
1144 * typeck.c (build_unary_op): Use it.
1145 (build_static_cast_1): Likewise.
1146
1147 PR c++/9782
1148 * init.c (build_new_1): Make sure the entire array type is
1149 complete, not just its element types.
1150
1151 2005-09-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1152
1153 * decl.c (check_elaborated_type_specifier): Remove redundant check.
1154
1155 2005-09-06 Jakub Jelinek <jakub@redhat.com>
1156
1157 PR c++/23056
1158 * typeck.c (ignore_overflows): New helper function.
1159 (build_static_cast_1): Use it.
1160
1161 2005-09-06 Kazu Hirata <kazu@codesourcery.com>
1162
1163 * cp-tree.h, decl.c, decl2.c, semantics.c: Fix comment typos.
1164 Follow spelling conventions.
1165
1166 2005-09-05 Mark Mitchell <mark@codesourcery.com>
1167
1168 PR c++/23667
1169 * pt.c (tsubst_decl): Clear DECL_TEMPLATE_INSTANTIATED when
1170 copying a VAR_DECL.
1171
1172 2005-09-05 Mark Mitchell <mark@codesourcery.com>
1173
1174 PR c++/21440
1175 * semantics.c (finish_stmt_expr_expr): Add an explicit
1176 initialization to the last statement in the statement-expression.
1177 * (finish_stmt_expr): Adjust accordingly.
1178
1179 2005-09-03 Mark Mitchell <mark@codesourcery.com>
1180
1181 PR c++/23699
1182 * decl2.c (mark_used): Always instantiate static data members
1183 initialized by constant expressions.
1184 * pt.c (instantiate_decl): Instantiate the initializers for static
1185 data members initialized by constant expressions.
1186
1187 PR c++/21687
1188 * semantics.c (expand_or_defer_fn): Do not call ggc_collect when
1189 finishing processing for a template function in a local class.
1190 Revert:
1191 2005-09-02 Mark Mitchell <mark@codesourcery.com>
1192 * parser.c (cp_parser_class_specifier): Push/pop GC contexts
1193 around functions in local classes.
1194
1195 2005-09-02 Mark Mitchell <mark@codesourcery.com>
1196
1197 PR c++/21687
1198 * parser.c (cp_parser_class_specifier): Push/pop GC contexts
1199 around functions in local classes.
1200
1201 2005-08-31 Andrew Pinski <pinskia@physics.uc.edu>
1202
1203 PR obj-c++/23640
1204 * decl2.c (cp_finish_file): If this is obj-c++ and we need a static
1205 init, call generate_ctor_or_dtor_function.
1206
1207 2005-08-31 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1208
1209 PR c++/13377
1210 * parser.c (cp_parser_lookup_name): Pass LOOKUP_COMPLAIN to
1211 lookup_name_real on final parse.
1212
1213 2005-08-31 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1214
1215 PR c++/23639
1216 * semantics.c (qualified_name_lookup_error): Do not complain again
1217 on invalid scope.
1218
1219 2005-08-30 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1220
1221 PR c++/23586
1222 * parser.c (cp_parser_namespace_name): Move diagnostic for
1223 invalid namespace-name to here from ...
1224 * name-lookup.c (do_namespace_alias): ... here and ...
1225 (do_using_directive): ... here. Remove dead code.
1226
1227 2005-08-28 Mark Mitchell <mark@codesourcery.com>
1228
1229 PR c++/23099
1230 * cp-tree.h (saved_scope): Add skip_evaluation.
1231 * decl.c (start_decl): Use DECL_INITIALIZED_IN_CLASS_P, not
1232 DECL_INITIAL, to determine whether or not a static data member was
1233 initialized in the class-specifier.
1234 (cp_finish_decl): Add comment.
1235 * init.c (integral_constant_value): Subtitute into the
1236 initializers for static data members in templates.
1237 * name-lookup.c (push_to_top_level): Save skip_evaluation.
1238 (pop_from_top_level): Restore it.
1239 * pt.c (instantiate_class_template): Do not substitute into the
1240 intializers of static data members when instantiating a class.
1241 (regenerate_decl_from_template): Simplify.
1242 (instantiate_decl): Tidy. Substitute into the initializer for a
1243 static data member even when the definition of the data member is
1244 not available.
1245
1246 2005-08-26 Mark Mitchell <mark@codesourcery.com>
1247
1248 PR c++/19004
1249 * pt.c (uses_template_parms): Handle IDENTIFIER_NODE.
1250 (type_dependent_expression_p): Allow BASELINKs whose associated
1251 functions are simply a FUNCTION_DECL.
1252
1253 PR c++/23491
1254 * cp-tree.h (build_vec_init): Adjust prototype.
1255 * init.c (perform_member_init): Adjust call to build_vec_init.
1256 (build_aggr_init): Likewise.
1257 (build_new_1): Do not call build_default_init for array types.
1258 (build_vec_init): Add explicit_default_init_p parameter. Perform
1259 default initialization of vector elements when set.
1260 * typeck.c (build_modify_expr): Adjust call to build_vec_init.
1261
1262 2005-08-25 Nathan Sidwell <nathan@codesourcery.com>
1263
1264 PR c++/20817
1265 * typeck.c (build_x_unary_op): Make sure OFFSET_REF is not for a
1266 ->*.
1267
1268 2005-08-24 Nathan Sidwell <nathan@codesourcery.com>
1269
1270 PR c++/22454
1271 * parser.c (cp_lexer_peek_nth_token): Relax assert.
1272
1273 2005-08-23 Nathan Sidwell <nathan@codesourcery.com>
1274
1275 PR c++/23044
1276 * pt.c (tsubst_qualified_id): A SCOPE_REF can still remain.
1277
1278 2005-08-22 James E Wilson <wilson@specifix.com>
1279
1280 PR tree-optimization/23426
1281 * decl.c (grokdeclarator): Use TYPE_SIZE_UNIT not TYPE_SIZE for
1282 array size check.
1283
1284 2005-08-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1285
1286 PR c++/22233
1287 * pt.c (push_template_decl_real): Return error_mark_node if the
1288 number of template parameters does not match previous definition.
1289
1290 2005-08-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1291
1292 PR c++/23089
1293 * decl.c (require_complete_types_for_parms): Mark incomplete types
1294 as invalid.
1295
1296 2005-08-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1297
1298 * parser.c (cp_parser_nth_token_starts_template_argument_list_p):
1299 Fix typo in leading comment.
1300
1301 2005-08-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1302
1303 * name-lookup.c, ptree.c: Delete HOST_PTR_PRINTF.
1304
1305 2005-08-15 Fariborz Jahanian <fjahanian@apple.com>
1306
1307 * cp-tree.h (can_convert_arg, fn_type_unification): New argument.
1308 * call.c (add_template_candidate_real): Pass down 'flags' to
1309 fn_type_unification.
1310 (can_convert_arg): New 'flags' argument. Pass it to call to
1311 implicit_conversion instead of LOOKUP_NORMAL.
1312 (can_convert): Add LOOKUP_NORMAL to call to can_convert_arg.
1313 * class.c (resolve_address_of_overloaded_function): Ditto.
1314 (resolve_address_of_overloaded_function): Ditto.
1315 * decl.c (reshape_init, check_default_argument): Ditto.
1316 * typeck.c (build_ptrmemfunc): Ditto.
1317 * pt.c (type_unification_real): Add 'flags' argument.
1318 (fn_type_unification): Pass 'flags' to type_unification_real.
1319 (type_unification_real): Pass new 'flags' argument to call to
1320 can_convert_arg.
1321
1322 2005-08-12 Giovanni Bajo <giovannibajo@libero.it>
1323 Nathan Sidwell <nathan@codesourcery.com>
1324
1325 PR c++/21799
1326 PR c++/8271
1327 * pt.c (unify) <METHOD_TYPE>: Check this-pointer cv-qualifiers
1328 explicitly.
1329
1330 2005-08-12 Nathan Sidwell <nathan@codesourcery.com>
1331
1332 PR c++/21799
1333 Revert my 2005-07-08 patch
1334 * pt.c (type_unification_real): Remove is_method_argument and
1335 assoicated checks.
1336 (fn_type_unification, unify): Adjust type_unification_real calls.
1337
1338 2005-08-11 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1339
1340 PR c++/23266
1341 * decl2.c (grokfield): Check that method is not static before
1342 marking it as pure.
1343
1344 2005-08-11 Nathan Sidwell <nathan@codesourcery.com>
1345
1346 PR c++/23219
1347 * name-lookup.c (pushtag): Process the template type before
1348 altering the identifier lookup fields. Remove unreachable code
1349 creating an empty stub decl.
1350
1351 2005-08-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1352
1353 PR c++/20646
1354 * decl.c (grokdeclarator): Reset storage_class after error.
1355
1356 2005-08-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1357
1358 PR c++/22508
1359 * init.c (build_new_1): Check for empty candidate list.
1360
1361 2005-08-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1362
1363 PR c++/23191
1364 * pt.c (tsubst) <case METHOD_TYPE>: Check for error_mark_node
1365 before calling build_exception_variant.
1366
1367 2005-08-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1368
1369 PR c++/19498
1370 * pt.c (tsubst_decl) <case TEMPLATE_DECL>: Return ERROR_MARK_NODE
1371 if substitution of template args did not succeed.
1372
1373 2005-08-06 Michael Matz <matz@suse.de>
1374
1375 * method.c (use_thunk): Call init_insn_lengths.
1376
1377 2005-08-05 James A. Morrison <phython@gcc.gnu.org>
1378
1379 PR c++/22514
1380 * name-lookup.c (cp_emit_debug_info_for_using): Do nothing if
1381 sorrycount or errorcount are nonzero.
1382
1383 2005-08-05 Mark Mitchell <mark@codesourcery.com>
1384
1385 * name-lookup.c (pushtag): Remove accidental commit from:
1386 2004-12-21 Mark Mitchell <mark@codesourcery.com>
1387 PR c++/19063
1388 * decl.c (grokdeclarator): Return error_mark_node, not
1389 void_type_node, to indicate errors.
1390 * parser.c (cp_parser_template_parameter_list): Robustify.
1391 (cp_parser_template_parameter): Likewise.
1392
1393 2005-08-01 Kazu Hirata <kazu@codesourcery.com>
1394
1395 * class.c, decl.c, name-lookup.c, pt.c, typeck.c, typeck2.c:
1396 Fix comment typos.
1397
1398 2005-07-29 Kazu Hirata <kazu@codesourcery.com>
1399
1400 * method.c: Fix a comment typo.
1401
1402 2005-07-28 Mark Mitchell <mark@codesourcery.com>
1403
1404 PR c++/22545
1405 * call.c (add_builtin_candidate): Adjust for changes in
1406 representation of pointer-to-member types.
1407
1408 2005-07-28 Mike Stump <mrs@apple.com>
1409
1410 * pt.c (check_explicit_specialization): Add visibility logic.
1411 (lookup_template_class): Likewise.
1412 (instantiate_class_template): Likewise.
1413
1414 2005-07-27 Devang Patel <dpatel@apple.com>
1415
1416 * name-lookup.c (pushtag): Do no set DECL_IGNORED_P bit.
1417
1418 2005-07-25 Ian Lance Taylor <ian@airs.com>
1419
1420 * ptree.c (cxx_print_identifier): Print a leading space if the
1421 indent level is 0.
1422
1423 2005-07-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1424
1425 * call.c (convert_for_arg_passing): Check function pointers when
1426 -Wmissing-format-attribute is activated.
1427 * typeck.c (convert_for_assignment): Likewise.
1428
1429 2005-07-22 Manfred Hollstein <mh@suse.com>
1430
1431 * parser.c (cp_parser_declaration): Fix unitialised warnings.
1432
1433 2005-07-21 Andrew Pinski <pinskia@physics.uc.edu>
1434
1435 * class.c (build_base_path): Fix typo.
1436
1437 2005-07-21 Andrew Pinski <pinskia@physics.uc.edu>
1438
1439 PR C++/22358
1440 * class.c (build_base_path): Convert BINFO_OFFSET to the correct type.
1441
1442 2005-07-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1443
1444 * call.c: Fix comment typo(s).
1445 * cxx-pretty-print.h: Likewise.
1446 * name-lookup.c: Likewise.
1447 * parser.c: Likewise.
1448
1449 2005-07-20 Douglas Gregor <doug.gregor@gmail.com>
1450
1451 PR c++/2922
1452 * semantics.c (perform_koenig_lookup): For dependent calls, just
1453 return the set of functions we've found so far. Later, it will be
1454 augmented by those found through argument-dependent lookup.
1455 * name-lookup.c (lookup_arg_dependent): Implement DR 164 by removing
1456 the optimization that skips namespaces where the functions were
1457 originally found.
1458
1459 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
1460
1461 Make CONSTRUCTOR use VEC to store initializers.
1462 * call.c (convert_default_arg): Update call to digest_init.
1463 * class.c (dump_class_hierarchy, dump_array): Update to cope with
1464 VEC in CONSTRUCTOR_ELTS.
1465 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Likewise.
1466 (finish_compound_literal, digest_init): Update declaration.
1467 * decl.c (struct reshape_iter): New data type.
1468 (reshape_init_array): Rename to...
1469 (reshape_init_array_1): Update to cope with VEC in CONSTRUCTOR_ELTS.
1470 (reshape_init): Rewrite from scratch. Split parts into...
1471 (reshape_init_array, reshape_init_vector, reshape_init_class,
1472 reshape_init_r): New functions.
1473 (check_initializer): Update call to reshape_init. Remove obsolete
1474 code.
1475 (initialize_artificial_var, cp_complete_array_type): Update to cope
1476 with VEC in CONSTRUCTOR_ELTS.
1477 * decl2.c (grokfield): Update calls to digest_init.
1478 (mark_vtable_entries): Update to cope with VEC in CONSTRUCTOR_ELTS.
1479 * error.c (dump_expr_init_vec): New function.
1480 (dump_expr): Use dump_expr_init_vec.
1481 * init.c (build_zero_init, build_vec_init): Update to cope with VEC
1482 in CONSTRUCTOR_ELTS.
1483 (expand_default_init): Update call to digest_init.
1484 * parser.c (cp_parser_postfix_expression): Use a VEC for the
1485 initializers.
1486 (cp_parser_initializer_list): Build a VEC of initializers.
1487 * pt.c (tsubst_copy, tsubst_copy_and_build): Update to cope with VEC
1488 in CONSTRUCTOR_ELTS.
1489 * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer,
1490 ptm_initializer, class_initializer, get_pseudo_ti_init): Use
1491 build_constructor_from_list instead of build_constructor.
1492 * semantics.c (finish_compound_literal): Update call to digest_init.
1493 * tree.c (stabilize_init): Update to cope with VEC in
1494 CONSTRUCTOR_ELTS.
1495 * typeck.c (build_ptrmemfunc1): Likewise.
1496 * typeck2.c: (cxx_incomplete_type_error, split_nonconstant_init_1):
1497 Likewise.
1498 (store_init_value): Use build_constructor_from_list and update call
1499 to digest_init.
1500 (digest_init): Rewrite.
1501 (process_init_constructor): Rewrite from scratch. Split into...
1502 (process_init_constructor_array, picflag_from_initializer,
1503 process_init_constructor_record, process_init_constructor_union):
1504 New functions.
1505 (PICFLAG_ERRONEOUS, PICFLAG_NOT_ALL_CONSTANT, PICFLAG_NOT_ALL_SIMPLE):
1506 New macros.
1507 (build_functional_cast): Use build_constructor_from_list instead of
1508 build_constructor.
1509
1510 2005-07-18 Mark Mitchell <mark@codesourcery.com>
1511
1512 PR c++/22263
1513 * cp-tree.h (instantiate_decl): Change prototype.
1514 * decl2.c (mark_used): Adjust accordingly.
1515 * pt.c (do_decl_instantiation): Likewise.
1516 (instantiate_class_member): Likewise.
1517 (instantiate_decl): Rename undefined_ok as expl_inst_class_mem_p.
1518 Clear DECL_INTERFACE_KNOWN for an explicitly instantiated template
1519 that has no definition available.
1520 (instantiate_pending_templates): Adjust call to instantiate_decl.
1521
1522 2005-07-17 Mark Mitchell <mark@codesourcery.com>
1523
1524 PR c++/22139
1525 * cp-tree.h (DECL_TEMPLATE_INFO): Improve documentation.
1526 * decl.c (duplicate_decls): Re-register template specializations
1527 for functions that have DECL_TEMLPLATE_INFO, even if they do not
1528 have DECL_TEMPLATE_INSTANTIATION set.
1529
1530 2005-07-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1531
1532 * call.c (diagnostic_fn_t): New.
1533 (build_temp, convert_like_real): Use diagnostic_fn_t.
1534
1535 2005-07-15 Mark Mitchell <mark@codesourcery.com>
1536
1537 PR c++/22204
1538 * repo.c (repo_emit_p): Robustify.
1539
1540 2005-07-14 Daniel Berlin <dberlin@dberlin.org>
1541
1542 Fix PR c++/22452
1543 * tree.c (decl_linkage): Don't check DECL_COMDAT on CONST_DECL.
1544
1545 2005-07-15 Mark Mitchell <mark@codesourcery.com>
1546
1547 PR c++/22132
1548 * call.c (implicit_conversion): Add c_cast_p parameter.
1549 (standard_conversion): Likewise. Allow conversions between
1550 differently-qualified pointer types when performing a C-style
1551 cast.
1552 (add_function_candidate): Adjust callee.
1553 (build_builtin_candidate): Likewise.
1554 (build_user_type_conversion_1): Likewise.
1555 (conditional_conversion): Likewise.
1556 (can_convert_arg): Likewise.
1557 (can_convert_arg_bad): Likewise.
1558 (perform_implicit_conversion): Likewise.
1559 * cp-tree.h (comp_ptr_ttypes_const): Declare.
1560 * typeck.c (comp_ptr_ttypes_const): Give it external linkage.
1561 Return bool.
1562
1563 2005-07-12 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1564 Nathan Sidwell <nathan@codesourcery.com>
1565
1566 PR c++/20172
1567 * pt.c (tsubst_template_parms): Check for invalid non-type
1568 parameters.
1569
1570 2005-07-09 Andrew Pinski <pinskia@physics.uc.edu>
1571
1572 * cp-lang.c (shadowed_var_for_decl, decl_shadowed_for_var_lookup,
1573 decl_shadowed_for_var_insert): Move over to cp-objcp-common.c.
1574 (cp_init_ts): Call init_shadowed_var_for_decl.
1575 Remove include of gt-cp-cp-lang.h.
1576 * cp-objcp-common.c (shadowed_var_for_decl,
1577 decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Moved from
1578 cp-lang.c.
1579 (init_shadowed_var_for_decl): New function to initialize
1580 shadowed_var_for_decl.
1581 Include gt-cp-cp-objcp-common.h.
1582 * Make-lang.in (gt-cp-lang.h): Remove.
1583 (gt-cp-cp-objcp-common.h): Add.
1584 (cp/cp-lang.o): Remove dependancy on gt-cp-lang.h.
1585 (cp/cp-objcp-common.o): Add dependancy on gt-cp-cp-objcp-common.h.
1586 * config-lang.in (gtfiles): Remove cp-lang.c and Add cp-objcp-common.c.
1587 * cp-tree (init_shadowed_var_for_decl): Add prototype.
1588
1589 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
1590
1591 * Make-lang.in: Add gt-cp-lang.h.
1592 (cp-lang.o): Ditto.
1593 * class.c (create_vtable_ptr): Stop setting DECL_ASSEMBLER_NAME on
1594 the field.
1595 * config-lang.in: Add cp-lang.c to gtfiles.
1596 * cp-lang.c: Include hashtab.h.
1597 (cp_init_ts): New function.
1598 (LANG_HOOK_INIT_TS): Use macro.
1599 (decl_shadowed_for_var_lookup): New function.
1600 (decl_shadowed_for_var_insert): Ditto.
1601 * cp-tree.h (THUNK_FUNCTION_CHECK): Use decl_common.
1602 (NON_THUNK_FUNCTION_CHECK): Ditto.
1603 (DECL_NAMESPACE_ASSOCIATIONS): Use decl_non_common.
1604 (DECL_INIT_PRIORITY): Ditto.
1605 (DECL_HAS_SHADOWED_FOR_VAR_P): Ditto.
1606 (DECL_SHADOWED_FOR_VAR): Use hashtable.
1607 (SET_DECL_SHADOWED_FOR_VAR): Ditto.
1608 * decl.c (duplicate_decls): Update for new/updated structures.
1609 (poplevel): Use SET_DECL_SHADOWED_FOR_VAR.
1610 * decl2.c (start_static_initialization_or_destruction): Deal with
1611 priority.
1612 * pt.c (tsubst_decl): Check TS_DECL_WRTL before doing
1613 SET_DECL_RTL.
1614 * tree.c (handle_init_priority_attribute): Handle priority.
1615
1616 2005-07-08 Nathan Sidwell <nathan@codesourcery.com>
1617
1618 PR c++/21799
1619 * pt.c (type_unification_real): Add is_method argument. Use it
1620 for this pointer unification.
1621 (fn_type_unification): Adjust type_unification_real call.
1622 (unify): Likewise.
1623
1624 2005-07-07 Nathan Sidwell <nathan@codesourcery.com>
1625
1626 * pt.c (type_unification_real): Remove allow_incomplete argument.
1627 Remove unreachable code.
1628 (fn_type_unification): Adjust call to type_unification_real.
1629 (unify): Likewise.
1630
1631 2005-07-05 Paolo Bonzini <bonzini@gnu.org>
1632
1633 * Makefile.in (class.o, decl2.o): Adjust dependencies.
1634 * class.c: Include tree-dump.h.
1635 * decl2.c: Include tree-dump.h.
1636
1637 2005-07-02 Gabriel Dos Reis <gdr@integrable-solutions.net>
1638
1639 * dump.c: Use dump_string_field.
1640
1641 2005-07-03 Joseph S. Myers <joseph@codesourcery.com>
1642
1643 * cp-tree.h (GCC_DIAG_STYLE): #undef before defining. Change
1644 minimum GCC version for format checking to 4.1.
1645
1646 2005-07-02 Kazu Hirata <kazu@codesourcery.com>
1647
1648 * Make-lang.in (cc1plus-checksum.c): Use
1649 build/genchecksum$(build_exeext), not build/genchecksum$(exeext).
1650
1651 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
1652
1653 * name-lookup.c, parser.c: Use %q, %< and %> to quote in
1654 diagnostics.
1655
1656 2005-07-02 Zack Weinberg <zack@codesourcery.com>
1657 Joseph S. Myers <joseph@codesourcery.com>
1658
1659 * error.c (location_of): Add comment.
1660 (locate_error, cp_error_at, cp_warning_at, cp_pedwarn_at): Remove.
1661 * cp-tree.h (cp_error_at, cp_warning_at, cp_pedwarn_at): Remove.
1662 * call.c, class.c, decl.c, decl2.c, friend.c, init.c,
1663 name-lookup.c, parser.c, pt.c, search.c, semantics.c, typeck.c,
1664 typeck2.c: Use '+' flag instead of %J, cp_error_at, cp_warning_at
1665 or cp_pedwarn_at. Mark up some diagnostic strings with N_.
1666
1667 2005-06-30 Daniel Berlin <dberlin@dberlin.org>
1668
1669 * decl.c (require_complete_types_for_parms): Call relayout_decl
1670 instead of layout_decl.
1671
1672 2005-06-30 Zack Weinberg <zack@codesourcery.com>
1673 Jakub Jelinek <jakub@redhat.com>
1674
1675 * cp-lang.c: No need to include cxx-pretty-print.h.
1676 * error.c (cp_printer): Update signature. No need to process
1677 flags.
1678 (print_instantiation_partial_context): Output last newline
1679 with pp_base_newline.
1680 * Make-lang.in: Update dependencies.
1681
1682 2005-06-30 Steven Bosscher <stevenb@suse.de>
1683
1684 * decl.c (start_decl): Replace DECL_THREAD_LOCAL with
1685 DECL_THREAD_LOCAL_P.
1686 (cp_finish_decl): Likewise.
1687 (grokvardecl): Set the default DECL_TLS_MODEL here.
1688
1689 2005-06-28 Joseph S. Myers <joseph@codesourcery.com>
1690
1691 * cvt.c (ocp_convert): Use invalid_conversion hook.
1692 * typeck.c (build_binary_op): Use invalid_binary_op hook.
1693 (build_unary_op): Use invalid_unary_op hook.
1694
1695 2005-06-28 Paul Brook <paul@codesourcery.com>
1696
1697 * Make-lang.in (cp/except.o): Depend on $(TARGET_H)
1698 * except.c: Include target.h.
1699 (init_exception_processing): Initialize unwind_resume_libfunc.
1700 * doc/tm.texi: Document TARGET_ASM_TTYPE
1701
1702 2005-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1703
1704 * call.c (build_over_call): Pass in named argument list to
1705 `check_function_arguments'.
1706 * typeck.c (build_function_call): Likewise.
1707
1708 2005-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1709
1710 * cp-tree.h (lang_check_failed): Add noreturn attribute.
1711
1712 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
1713
1714 * all files: Update FSF address in copyright headers.
1715
1716 2005-06-23 Jason Merrill <jason@redhat.com>
1717
1718 PR c++/19317
1719 * semantics.c (simplify_aggr_init_expr): Use
1720 CALL_EXPR_RETURN_SLOT_OPT, not CALL_EXPR_HAS_RETURN_SLOT_ADDR.
1721
1722 2005-06-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1723
1724 * pt.c (register_specialization): Remove superfluous assertion.
1725
1726 2005-06-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1727
1728 * call.c (convert_like_real): Add format attribute.
1729 * typeck.c (check_for_casting_away_constness,
1730 build_static_cast_1): Likewise.
1731 * typeck2.c (readonly_error, cxx_incomplete_type_diagnostic):
1732 Likewise.
1733
1734 2005-06-17 Geoffrey Keating <geoffk@apple.com>
1735
1736 PR c++/17413
1737 * pt.c (type_unification_real): Apply template type deduction even
1738 to procedure parameters that are not dependent on a template
1739 parameter.
1740
1741 2005-06-16 Nathan Sidwell <nathan@codesourcery.com>
1742
1743 * rtti.c (get_tinfo_decl): Avoid caching tinfo_descs when it might
1744 change.
1745 (create_pseudo_type_info): First parameter is an int.
1746
1747 2005-06-15 Nathan Sidwell <nathan@codesourcery.com>
1748
1749 PR c++/20678
1750 * error.c (dump_expr) <COMPONENT_REF case>: Check DECL_NAME is not
1751 null.
1752
1753 * Make-lang.in: Reformat some long lines.
1754 (gt-cp-rtti.h): New target.
1755 (cp/rtti.o): Add dependency.
1756 * config-lang.in (gtfiles): Add cp/rtti.c.
1757 * cp-tree.h (CPTI_TI_DESC_TYPE, CPTI_BLTN_DESC_TYPE,
1758 CPTI_PTR_DESC_TYPE, CPTI_ARY_DESC_TYPE, CPTI_FUNC_DESC_TYPE,
1759 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE,
1760 CPTI_SI_CLASS_DESC_TYPE, CPTI_VMI_CLASS_DESC_TYPE,
1761 CPTI_PTM_DESC_TYPE, CPTI_BASE_DESC_TYPE): Remove.
1762 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
1763 ary_desc_type_node, func_desc_type_node, enum_desc_type_node,
1764 class_desc_type_node, si_class_desc_type_node,
1765 vmi_class_desc_type_node, ptm_desc_type_node,
1766 base_desc_type_node): Remove.
1767 * decl.c: Adjust documentation of global trees.
1768 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL,
1769 TINFO_REAL_NAME): Remove.
1770 (struct tinfo_s): New.
1771 (enum tinfo_kind): New.
1772 (tinfo_descs): New.
1773 (get_tinfo_decl): Adjust use of tinfo descriptor.
1774 (tinfo_base_init, generic_initializer, ptr_initializer,
1775 ptm_initializer, class_initializer): Likewise.
1776 (get_pseudo_ti_init): Take descriptor index. Adjust.
1777 (create_pseudo_type_info): Likewise.
1778 (get_pseudo_ti_desc): Return descriptor index. Adjust.
1779 (create_tinfo_types): Adjust use of create_pseudo_type_info.
1780 (emit_tinfo_decl): Adjust use of tinfo descriptor.
1781
1782 2005-06-14 Roger Sayle <roger@eyesopen.com>
1783
1784 * decl.c (grokdeclarator): Only check TREE_OVERFLOW on INTEGER_CST.
1785
1786 2005-06-13 Geoffrey Keating <geoffk@apple.com>
1787
1788 * Make-lang.in (c++.install-man): Doesn't really depend on installdirs.
1789 (rule for installing g++.1 manpage): Does depend on installdirs.
1790
1791 2005-06-13 Nathan Sidwell <nathan@codesourcery.com>
1792
1793 PR c++/20789
1794 * decl.c (cp_finish_decl): Clear runtime runtime initialization if
1795 in-class decl's initializer is bad.
1796
1797 PR c++/21929
1798 * parser.c (struct cp_parser): Document that scope could be
1799 error_mark.
1800 (cp_parser_diagnose_invalid_type_name): Cope with error_mark for
1801 scope.
1802 (cp_parser_nested_name_specifier): Return NULL_TREE on error.
1803 (cp_parser_postfix_expression): Deal with null or error_mark
1804 scope.
1805 (cp_parser_elaborated_type_specifier): Adjust
1806 cp_parser_nested_name_specifier call.
1807
1808 * parser (cp_parser_skip_to_end_of_block_or_statement): Cleanup.
1809
1810 2005-06-12 Roger Sayle <roger@eyesopen.com>
1811
1812 PR c++/21930
1813 * error.c (dump_expr): UNARY_PLUS_EXPR need not handle void types.
1814 Treat CONVERT_EXPR identically to NOP_EXPR.
1815
1816 2005-06-10 Aldy Hernandez <aldyh@redhat.com>
1817
1818 PR c++/10611
1819 * cvt.c (build_expr_type_conversion): Same.
1820 * typeck.c (build_binary_op): Handle vectors.
1821 (common_type): Same.
1822 (type_after_usual_arithmetic_conversions): Same.
1823
1824 2005-06-08 Nathan Sidwell <nathan@codesourcery.com>
1825
1826 PR c++/19497
1827 * cp-tree.def (USING_DECL): Update documentation.
1828 * cp-tree.h (DECL_DEPENDENT_P): New.
1829 (USING_DECL_DECLS, USING_DECL_SCOPE): New.
1830 * class.c (handle_using_decl): Move most of the processing to ...
1831 * name-lookup.c (do_class_using_decl): ... here. Make stricter.
1832 (push_using_decl): Use USING_DECL_SCOPE.
1833 (cp_emit_debug_info_for_using): Make extern.
1834 * cxx-pretty-print.c (pp_cxx_statement) <USING_DECL case>: Adjust.
1835 * name-lookup.h (cp_emit_debug_info_for_using): Declare.
1836 * pt.c (tsubst_decl) <USING_DECL case>: Use do_class_using_decl
1837 when tsubsting.
1838 (tsubst_expr): Use USING_DECL_SCOPE.
1839 * search.c (lookup_field_1): Use DECL_DEPENDENT_P.
1840 * semantics.c (finish_member_declaration): Likewise.
1841
1842 2005-06-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1843
1844 PR c++/19894
1845 * pt.c (tsubst): Reject pointer-to-member of type void.
1846
1847 PR c++/20563
1848 * parser.c (cp_parser_label_declaration): Deal with invalid/missing
1849 identifiers.
1850
1851 2005-06-07 Nathan Sidwell <nathan@codesourcery.com>
1852
1853 * cp-tree.def (DEFAULT_ARG): Adjust documentation.
1854 * cp-tree.h (DEFARG_INSTANTIATIONS): New.
1855 (struct tree_default_arg): Add instantiations member.
1856 * parser.c (cp_parser_late_parsing_default_args): Adjust to use a
1857 VEC.
1858 * pt.c (tsubst_arg_types): Likewise.
1859
1860 * parser.c (cp_parser_late_parsing_default_args): Fix overeager
1861 assert in previous patch.
1862
1863 2005-06-06 Jakub Jelinek <jakub@redhat.com>
1864
1865 * error.c (locate_error): Use gmsgid instead of msgid for argument
1866 name.
1867 (cp_error_at, cp_warning_at, cp_pedwarn_at): Likewise.
1868
1869 2005-06-06 Nathan Sidwell <nathan@codesourcery.com>
1870
1871 PR 21903
1872 * cp-tree.def (DEFAULT_ARG): Document TREE_CHAIN use.
1873 * parser.c (cp_parser_late_parsing_default_args): Propagate parsed
1874 argument to any early instantiations.
1875 * pt.c (tsubst_arg_types): Chain early instantiation of default arg.
1876
1877 PR c++/20637
1878 * cp-tree.h (add_method): Add using_decl parameter.
1879 * class.c (add_method): Add using_decl parameter. Adjust error
1880 messages.
1881 (handle_using_decl): Pass the using decl to add_method.
1882 (clone_function_decl): Adjust add_member calls.
1883 * decl2.c (check_classfn): Likewise.
1884 * method.c (lazily_declare_fn): Likewise.
1885 * semantics.c (finish_member_declaration): Likewise.
1886
1887 * method.c (synthesize_method): Use inform, not warning.
1888
1889 2005-06-06 Hans-Peter Nilsson <hp@axis.se>
1890
1891 * config-lang.in (target_libs): Remove target-gperf.
1892
1893 2005-06-05 Mark Mitchell <mark@codesourcery.com>
1894
1895 PR c++/21619
1896 * cp-tree.h (DECL_IS_BUILTIN_CONSTANT_P): New macro.
1897 * parser.c (cp_parser_postfix_expression): Allow non-constant
1898 expressions as arguments to __builtin_constant_p.
1899 * tree.c (builtin_valid_in_constant_expr_p): Use
1900 DECL_IS_BUILTIN_CONSTANT_P.
1901
1902 2005-06-03 Mark Mitchell <mark@codesourcery.com>
1903
1904 PR c++/21853
1905 * typeck.c (casts_away_constness_r): Do not drop cv-qualifiers on
1906 the pointed-to type for a pointer-to-member.
1907
1908 PR c++/21336
1909 * cp-tree.h (grok_op_properties): Remove friendp parameter.
1910 * decl.c (grokfndecl): Adjust call.
1911 (grok_op_properties): Determine the class of which the function is
1912 a member by looking at its DECL_CONTEXT, not current_class_type.
1913 * pt.c (tsubst_decl): Adjust call to grok_op_properties.
1914
1915 2005-06-02 Nathan Sidwell <nathan@codesourcery.com>
1916
1917 * method.c (synthesize_method): Add addtional arg to warning call.
1918
1919 PR c++/21280
1920 * Make-lang.in (method.o): Add diagnostic.h
1921 * decl.c (start_preparsed_function): Use decl's location for file
1922 info.
1923 * decl2.c (cp_finish_file): Set input_location before synthesizing
1924 a function.
1925 (mark_used): When deferring a synthesized function, save current
1926 location. Do not set function's location when actually
1927 synthesizing it.
1928 * method.c: #include diagnostic.h.
1929 (synthesize_method): Set the functions source location. Show
1930 needed location if errors are emitted.
1931
1932 * decl.c (start_decl): Simplify specialization handling. Remove
1933 unneeded CLASSTYPE_TEMPLATE_INSTANTIATION check.
1934 * mangle.c (discriminator_for_local_entity): Use VEC_index.
1935
1936 PR c++/20350
1937 * decl.c (duplicate_decls): Copy all of DECL_USE_TEMPLATE.
1938
1939 PR c++/21151
1940 * name-lookup.c (pushtag): Push local class even in a template.
1941
1942 2005-05-31 Nathan Sidwell <nathan@codesourcery.com>
1943
1944 PR c++/21165
1945 * init.c (integral_constant_value): Check the type of the
1946 initializer, not the decl.
1947
1948 2005-05-30 Mark Mitchell <mark@codesourcery.com>
1949
1950 PR c++/21784
1951 * name-lookup.c (do_nonmember_using_decl): Ignore builtin
1952 functions, even when the used name is not a function.
1953
1954 2005-05-30 Kazu Hirata <kazu@cs.umass.edu>
1955
1956 * operators.def, optimize.c: Update copyright.
1957
1958 2005-05-28 Mark Mitchell <mark@codesourcery.com>
1959
1960 PR c++/21210
1961 * call.c (standard_conversion): Permit conversions to complex
1962 types if conversion to the corresponding scalar type would be
1963 permitted.
1964
1965 PR c++/21340
1966 * method.c (implicitly_declare_fn): Clear processing_template_decl
1967 when generating implicit declaration.
1968
1969 2005-05-27 Mark Mitchell <mark@codesourcery.com>
1970
1971 PR c++/21614
1972 * typeck.c (get_member_function_from_ptrfunc): Do not attempt
1973 conversions to base classes of incomplete types.
1974
1975 2005-05-27 Ian Lance Taylor <ian@airs.com>
1976
1977 * semantics.c (add_stmt): Add C++ frontend specific version.
1978 * cp-tree.h (STMT_IS_FULL_EXPR_P): Define.
1979 (stmts_are_full_exprs_p): Declare.
1980
1981 2005-05-27 Roger Sayle <roger@eyesopen.com>
1982 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1983
1984 * cp-tree.def (UNARY_PLUS_EXPR): New C++ unary tree code.
1985 * parser.c (cp_parser_unary_expression): Use UNARY_PLUS_EXPR instead
1986 of CONVERT_EXPR.
1987 (cp_parser_unary_expression): Likewise.
1988 * typeck.c (build_unary_op): Likewise.
1989 * call.c (add_builtin_candidate, build_new_op): Likewise.
1990 * error.c (dump_expr): Likewise.
1991 * pt.c (tsubst_copy, tsubst_copy_and_build): Likewise.
1992 * decl.c (ambi_op_p, grok_op_properties): Likewise.
1993 * dump.c (dump_op): Likewise.
1994 * lex.c (init_operators): Likewise.
1995 * operators.def ("+"): Likewise.
1996 * cp-gimplify.c (cp_gimplify_expr): Handle UNARY_PLUS_EXPR like a
1997 conversion, if the result and argument types differ.
1998 * tree.c (fold_if_not_in_template): Fold UNARY_PLUS_EXPR much
1999 like a NOP_EXPR when !processing_template_decl.
2000
2001 * cxx-pretty-print.c (pp_cxx_cast_expression): Prototype.
2002 (pp_cxx_unary_expression): Handle new UNARY_PLUS_EXPR tree code.
2003
2004 2005-05-27 Nathan Sidwell <nathan@codesourcery.com>
2005
2006 PR c++/21455
2007 * typeck.c (get_delta_difference): Cope with incomplete but equal
2008 classes. Reorder if.
2009
2010 PR c++/21681
2011 * parser.c (cp_parser_late_parsing_for_member): Disable access
2012 checking for template functions.
2013
2014 2005-05-26 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2015
2016 PR c++/21768
2017 * pt.c (redeclare_class_template): Change error message according
2018 to coding conventions.
2019
2020 2005-05-26 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2021
2022 * call.c (build_op_delete_call): Fix quoting in error message.
2023
2024 2005-05-25 Richard Henderson <rth@redhat.com>
2025
2026 PR libgcj/21692
2027 * cp-tree.h (make_alias_for): Declare.
2028 * decl2.c (build_java_method_aliases): New.
2029 (cp_finish_file): Call it.
2030 * method.c (make_alias_for): Split out from ...
2031 (make_alias_for_thunk): ... here.
2032
2033 2005-05-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2034
2035 PR c++/21686
2036 * semantics.c (finish_id_expression): Fix quoting in error message.
2037
2038 2005-05-25 DJ Delorie <dj@redhat.com>
2039
2040 * decl.c (duplicate_decls): Move warning control from if() to
2041 warning(OPT_*).
2042 * name-lookup.c (parse_using_directive): Likewise.
2043 * parser.c (cp_parser_elaborated_type_specifier): Likewise.
2044 (cp_parser_init_declarator): Likewise.
2045 * tree.c (handle_com_interface_attribute): Likewise.
2046
2047 2005-05-24 Ziemowit Laski <zlaski@apple.com>
2048
2049 * class.c (layout_class_type): Do not issue C++ ABI warnings
2050 for ObjC structs.
2051 * decl.c (objc_mark_locals_volatile): Streamline by calling
2052 objc_volatilize_decl().
2053 * parser.c (cp_parser_objc_message_expression): Allow simple
2054 type specifiers (instead of merely type names) as message
2055 receivers.
2056 * pt.c (template_args_equal): Do not call objc_comptypes().
2057 * typeck.c (composite_pointer_type): If both pointers are
2058 ObjC-esque, arbitrarily choose the first; do not call
2059 objc_comptypes().
2060 (comptypes): Do not call objc_comptypes().
2061 (convert_for_assignment): Call objc_compare_types().
2062 (comp_ptr_ttypes_real): Call objc_type_quals_match() before
2063 concluding that types do not match.
2064
2065 2005-05-24 Andrew Pinski <pinskia@physics.uc.edu>
2066
2067 PR C++/21645
2068 * optimize.c (update_cloned_parm): Copy the TYPE also from the
2069 original one.
2070
2071 2005-05-19 Jakub Jelinek <jakub@redhat.com>
2072
2073 PR c++/21495
2074 * decl.c (grokdeclarator): Fix "storage class specified for"
2075 error reporting.
2076
2077 2005-05-19 Kazu Hirata <kazu@cs.umass.edu>
2078
2079 * parser.c: Fix comment typos.
2080
2081 2005-05-18 Geoffrey Keating <geoffk@apple.com>
2082
2083 * Make-lang.in (cc1plus-dummy): New.
2084 (cc1plus-checksum.c): New.
2085 (cc1plus-checksum.o): New.
2086 (cc1plus): Add cc1plus-checksum.o.
2087
2088 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
2089
2090 PR C++/19664
2091 * decl2.c (determine_visibility): Don't set visibility to
2092 hidden if it has been set explicitly by user.
2093
2094 2005-05-17 Ziemowit Laski <zlaski@apple.com>
2095 Mike Stump <mrs@apple.com>
2096
2097 Yet more Objective-C++...
2098
2099 * cp-objcp-common.h (cxx_get_alias_set): Move from
2100 here...
2101 (cxx_warn_unused_global_decl): Likewise.
2102 (cp_expr_size): Likewise.
2103 (cp_tree_size): Likewise.
2104 (cp_var_mod_type_p): Likewise.
2105 (cxx_initialize_diagnostics): Likewise.
2106 (cxx_types_compatible_p): Likewise.
2107 * cp-tree.h: to here.
2108 (do_poplevel): Add.
2109 * lex.c (D_OBJC): Add.
2110 (init_reswords): Add.
2111 * Make-lang.in (cp/pt.o): Add cp/cp-objcp-common.h.
2112 * parser.c: Add c-common.h include.
2113 * pt.c: Add c-common.h and cp-objcp-common.h includes.
2114 (template_args_equal): Use objc_comptypes as well.
2115 (tsubst_copy_and_build): Use objcp_tsubst_copy_and_build as well.
2116 * semantics.c (do_poplevel): Remove static.
2117
2118 * decl.c (objc_mark_locals_volatile): Don't change decls that are
2119 already ok.
2120 * decl2.c (generate_ctor_or_dtor_function): Add code to initialize
2121 Objective C++ early enough.
2122 * lex.c (struct resword reswords): Add Objective-C++ support.
2123 * parser.c (cp_lexer_get_preprocessor_token): Add Objective-C++.
2124 (cp_parser_objc_message_receiver): Add.
2125 (cp_parser_objc_message_args): Likewise.
2126 (cp_parser_objc_message_expression): Likewise.
2127 (cp_parser_objc_encode_expression): Likewise.
2128 (cp_parser_objc_defs_expression): Likewise.
2129 (cp_parser_objc_protocol_expression): Likewise.
2130 (cp_parser_objc_selector_expression): Likewise.
2131 (cp_parser_objc_expression): Likewise.
2132 (cp_parser_objc_visibility_spec): Likewise.
2133 (cp_parser_objc_method_type): Likewise.
2134 (cp_parser_objc_protocol_qualifiers): Likewise.
2135 (cp_parser_objc_typename): Likewise.
2136 (cp_parser_objc_selector_p): Likewise.
2137 (cp_parser_objc_selector): Likewise.
2138 (cp_parser_objc_method_keyword_params): Likewise.
2139 (cp_parser_objc_method_tail_params_opt): Likewise.
2140 (cp_parser_objc_interstitial_code): Likewise.
2141 (cp_parser_objc_method_signature): Likewise.
2142 (cp_parser_objc_method_prototype_list): Likewise.
2143 (cp_parser_objc_method_definition_list): Likewise.
2144 (cp_parser_objc_class_ivars): Likewise.
2145 (cp_parser_objc_identifier_list): Likewise.
2146 (cp_parser_objc_alias_declaration): Likewise.
2147 (cp_parser_objc_class_declaration): Likewise.
2148 (cp_parser_objc_protocol_declaration): Likewise.
2149 (cp_parser_objc_protocol_refs_opt): Likewise.
2150 (cp_parser_objc_superclass_or_category): Likewise.
2151 (cp_parser_objc_class_interface): Likewise.
2152 (cp_parser_objc_class_implementation): Likewise.
2153 (cp_parser_objc_end_implementation): Likewise.
2154 (cp_parser_objc_declaration): Likewise.
2155 (cp_parser_objc_try_catch_finally_statement): Likewise.
2156 (cp_parser_objc_synchronized_statement): Likewise.
2157 (cp_parser_objc_throw_statement): Likewise.
2158 (cp_parser_objc_statement): Likewise.
2159 (cp_parser_primary_expression): Add Objective-C++.
2160 (cp_parser_statement): Likewise.
2161 (cp_parser_declaration): Likewise.
2162 (cp_parser_simple_type_specifier): Likewise.
2163 (cp_parser_type_name): Likewise.
2164 (cp_parser_parameter_declaration_list): Likewise.
2165 (cp_parser_member_declaration) Likewise.
2166 * tree.c: Include debug.h.
2167 * typeck.c (composite_pointer_type): Add Objective-C++ support.
2168 (finish_class_member_access_expr): Likewise.
2169 (build_function_call): Allow objc to rewrite FUNCTION_DECLs.
2170 (build_modify_expr): Allow objc to generate write barriers.
2171
2172 * Make-lang.in (cp/tree.o): Add debug.h.
2173 * tree.c (lvalue_p_1, case CONST_DECL): Add.
2174
2175 2005-05-18 Jan Hubicka <jh@suse.cz>
2176
2177 * method.c: Include tree-pass.h
2178 (use_thunk): Lower body before expanding.
2179
2180 2005-05-17 Jakub Jelinek <jakub@redhat.com>
2181
2182 PR c++/21454
2183 * decl.c (maybe_deduce_size_from_array_init): Call
2184 cp_apply_type_quals_to_decl after completing array type.
2185
2186 2005-05-16 Richard Henderson <rth@redhat.com>
2187
2188 * decl.c (build_library_fn_1): Move setting TREE_NOTHROW ...
2189 (build_library_fn): ... here.
2190
2191 2005-05-12 Ian Lance Taylor <ian@airs.com>
2192
2193 * cp-tree.h (cp_stmt_codes): Don't define.
2194 (statement_code_p): Declare.
2195 (STATEMENT_CODE_P): Define.
2196 * lex.c (statement_code_p): Define.
2197 (cxx_init): Use actual codes in stmt_codes initializer, not
2198 cp_stmt_codes macro. Initialize statement_code_p directly, rather
2199 than using INIT_STATEMENT_CODES.
2200
2201 2005-05-09 Mark Mitchell <mark@codesourcery.com>
2202
2203 * typeck.c (build_unary_op): Do not resort to address arithmetic
2204 when taking the address of a COMPONENT_REF.
2205
2206 2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
2207
2208 * class.c (vtbl_init_data_s): Change the type of fns to
2209 VEC(tree,gc)*.
2210 (build_vtbl_initializer, add_vcall_offset, add_vcall_offset):
2211 Use VEC instead of VARRAY.
2212
2213 2005-05-07 Richard Sandiford <rsandifo@redhat.com>
2214
2215 * mangle.c: Remove a reference to the MIPS -mint64 option.
2216
2217 2005-05-07 Kazu Hirata <kazu@cs.umass.edu>
2218
2219 * decl.c (wrapup_globals_for_namespace): Use VEC instead of
2220 VARRAY.
2221 * name-lookup.c (add_decl_to_level, begin_scope): Likewise.
2222 * name-lookup.h (cp_binding_level): Change the type of
2223 static_decls to VEC(tree,gc)*.
2224
2225 * mangle.c (globals): Change the type of substitutions to
2226 VEC(tree,gc)*.
2227 (dump_substitution_candidates, add_substitution,
2228 find_substitution, finish_mangling, init_mangle): Use VEC
2229 instead of VARRAY.
2230
2231 2005-05-06 Kazu Hirata <kazu@cs.umass.edu>
2232
2233 * decl2.c (spew_debug): Remove.
2234
2235 * decl2.c (ssdf_decls, start_static_storage_duration_function,
2236 generate_ctor_or_dtor_function): Use VEC instead of VARRAY.
2237
2238 * decl2.c (pending_statics, note_vague_linkage_var,
2239 cp_finish_file): Use VEC instead of VARRAY.
2240 (pending_statics_used): Remove.
2241
2242 2005-05-05 Kazu Hirata <kazu@cs.umass.edu>
2243
2244 * decl2.c (deferred_fns, note_vague_linkage_fn,
2245 cp_finish_file): Use VEC instead of VARRAY.
2246
2247 2005-05-05 Mark Mitchell <mark@codesourcery.com>
2248
2249 PR c++/21352
2250 * pt.c (build_non_dependent_expr): Use is_overloaded_fn.
2251
2252 2005-05-05 Kazu Hirata <kazu@cs.umass.edu>
2253
2254 * pt.c: Fix a comment typo.
2255
2256 2005-05-04 Kazu Hirata <kazu@cs.umass.edu>
2257
2258 * cp-tree.h (language_function): Change the type of
2259 x_local_names to VEC.
2260 * decl.c (push_local_name): Adjust uses of local_names.
2261
2262 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
2263
2264 * friend.c, lex.c, mangle.c, repo.c: Update copyright.
2265
2266 2005-05-02 Kazu Hirata <kazu@cs.umass.edu>
2267
2268 * class.c (local_classes, init_class_processing): Use VEC
2269 instead of VARRAY.
2270 * cp-tree.h (local_classes): Likewise.
2271 * mangle.c (discriminator_for_local_entity): Likewise.
2272 * name-lookup.c (pushtag): Likewise.
2273
2274 * class.c (current_lang_depth, push_lang_context,
2275 pop_lang_context): Use VEC instead of VARRAY.
2276 * cp-tree.h (saved_scope): Use VEC for lang_base instead of
2277 VARRAY.
2278 * name-lookup.c (push_to_top_level): Use VEC instead of
2279 VARRAY.
2280
2281 2005-05-02 Paolo Bonzini <bonzini@gnu.org>
2282
2283 * semantics.c (finish_call_expr): Call resolve_overloaded_builtin
2284 for BUILT_IN_MD built-ins.
2285
2286 2005-05-02 Michael Matz <matz@suse.de>
2287
2288 PR c++/19542
2289 * cp-tree.h (cp_tree_index): Remove CPTI_NULL, to be defined in C
2290 common frontend.
2291 (null_node): Remove.
2292 * lex.c (cxx_init): Move null_node initialisation to C common frontend.
2293
2294 2005-04-25 Ian Lance Taylor <ian@airs.com>
2295
2296 * cp-tree.def: Add EXPR_STMT.
2297 * cp-tree.h (cp_stmt_codes): Add EXPR_STMT.
2298 (EXPR_STMT_EXPR): Define.
2299 * cp-gimplify.c: Include "flags.h".
2300 (gimplify_expr_stmt): New static function.
2301 (cp_gimplify_expr): Handle EXPR_STMT.
2302 * cxx-pretty-print.c (pp_cxx_statement): Use pp_cxx_expression
2303 rather than pp_expression.
2304 (pp_cxx_statement): Handle EXPR_STMT.
2305 * dump.c (cp_dump_tree): Handle EXPR_STMT.
2306 * lex.c (cxx_init): Don't use c_common_stmt_codes in stmt_codes
2307 initializer.
2308
2309 2005-04-25 Andrew Pinski <pinskia@physics.uc.edu>
2310
2311 PR C++/21188
2312 * rtti.c (ifnonnull): Cast the zero comparison operand
2313 to the correct type.
2314
2315 2005-04-24 Jakub Jelinek <jakub@redhat.com>
2316
2317 PR middle-end/20991
2318 * class.c: Include cgraph.h.
2319 (cp_fold_obj_type_ref): Set node->local.vtable_method.
2320 * Make-lang.in (cgraph.o): Depend on $(CGRAPH_H).
2321
2322 2005-04-12 Markus F.X.J. Oberhumer <markus@oberhumer.com>
2323
2324 * mangle.c (write_builtin_type): Handle integer types which are
2325 not one of the shared integer type nodes and emit a "vendor
2326 extended builtin type" with an encoding in the form of "u5int96".
2327
2328 2005-04-24 Ian Lance Taylor <ian@airs.com>
2329
2330 * cp-tree.def (USING_STMT): Change class to tcc_statement.
2331 (TRY_BLOCK, EH_SPEC_BLOCK, HANDLER, CLEANUP_STMT): Likewise.
2332 (IF_STMT, FOR_STMT, WHILE_STMT, DO_STMT): Likewise.
2333 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
2334
2335 2005-04-23 DJ Delorie <dj@redhat.com>
2336
2337 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, friend.c,
2338 init.c, lex.c, mangle.c, method.c, name-lookup.c, parser.c,
2339 repo.c, rtti.c, tree.c, typeck.c, typeck2.c: Adjust warning()
2340 callers.
2341
2342 2005-04-22 Per Bothner <per@bothner.com>
2343
2344 * decl.c (make_rtl_for_nonlocal_decl): Don't try get_fileinfo if
2345 input_filename is NULL, as it is for (say) __PRETTY_FUNCTION__.
2346
2347 2005-04-22 Alexandre Oliva <aoliva@redhat.com>
2348
2349 PR c++/21087
2350 * name-lookup.c (push_overloaded_decl): Do not overload with
2351 non-duplicate anticipated built-in.
2352
2353 2005-04-21 Kazu Hirata <kazu@cs.umass.edu>
2354
2355 * cp-tree.h (THROW_NAME, AUTO_VTABLE_NAME, AUTO_TEMP_FORMAT,
2356 VTABLE_BASE, VTABLE_NAME_PREFIX, STATIC_NAME_FORMAT): Remove.
2357
2358 2005-04-21 Nathan Sidwell <nathan@codesourcery.com>
2359
2360 * cp-tree.h: Adjust for new VEC API.
2361 Define VEC(tree_pair_s,gc).
2362 (struct save_scope): Adjust.
2363 (struct lang_type_class): Adjust.
2364 (unemitted_tinfo_decls): Adjust.
2365 * class.c (add_method, resort_type_method_vec,
2366 finish_struct_methods, struct find_final_overrider_data,
2367 dfs_find_final_overrider_pre, find_final_overrider,
2368 get_vcall_index, warn_hidden, walk_subobject_offsets,
2369 check_methods, fixup_inline_methods, end_of_class,
2370 warn_about_ambiguous_bases, finish_struct, build_vtbl_initializer,
2371 add_vcall_offset): Adjust.
2372 * decl.c (xref_basetypes, finish_method): Adjust.
2373 * decl2.c (check_classfn): Adjust.
2374 * init.c (sort_mem_initializers, push_base_cleanups): Adjust.
2375 * method.c (do_build_copy_constructor): Adjust.
2376 * name-lookup.c (new_class_binding, store_binding,
2377 store_bindings, store_class_bindings): Adjust.
2378 * name-lookup.h: Define VEC(cxx_saved_binding,gc),
2379 VEC(cp_class_binding,gc).
2380 (struct cp_binding_level): Adjust.
2381 * parser.c: Define VEC(cp_token_position,heap).
2382 (struct cp_lexer): Adjust.
2383 (cp_lexer_new_main, cp_lexer_new_from_tokens, cp_lexer_destroy,
2384 cp_lexer_save_tokens): Adjust.
2385 * pt.c (retrieve_specialization,
2386 check_explicit_specialization): Adjust.
2387 * rtti.c (unemitted_tinfo_decls): Adjust.
2388 (init_rtti_processing, get_tinfo_decl, get_pseudo_ti_init,
2389 get_pseudo_ti_desc): Adjust.
2390 * search.c (dfs_access_in_type, lookup_conversion_operator,
2391 lookup_fnfields_1, dfs_walk_once, dfs_walk_once_accessible,
2392 dfs_get_pure_virtuals, lookup_conversions_r, binfo_for_vbase): Adjust.
2393 * semantics.c: Define VEC(deferred_access,gc).
2394 (push_deferring_access_checks): Adjust.
2395 * typeck2.c (abstract_virtuals_error): Adjust.
2396
2397 2005-04-20 Ian Lance Taylor <ian@airs.com>
2398
2399 * cp-tree.def: Add STMT_EXPR.
2400 * cp-tree.h (STMT_EXPR_NO_SCOPE): Define.
2401 (STMT_EXPR_STMT): Define.
2402 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
2403 STMT_EXPR.
2404 (pp_cxx_expression): Likewise.
2405 (pp_cxx_statement): Call pp_cxx_statement, not pp_statement.
2406 * dump.c (cp_dump_tree): Handle STMT_EXPR.
2407
2408 2005-04-18 Kazu Hirata <kazu@cs.umass.edu>
2409
2410 * decl.c (expand_static_init): Call build2 and build3 instead
2411 of build.
2412
2413 * cp-tree.h (VPTR_NAME, VPTR_NAME_P): Remove.
2414
2415 2005-04-17 Ian Lance Taylor <ian@airs.com>
2416
2417 * cp-tree.def: Add SIZEOF_EXPR, ARROW_EXPR and ALIGNOF_EXPR.
2418 * cxx-pretty-print.c (pp_cxx_postfix_expression): Handle
2419 ARROW_EXPR.
2420 (pp_cxx_unary_expression): Handle SIZEOF_EXPR and ALIGNOF_EXPR.
2421 (pp_cxx_expression): Handle ARROW_EXPR, SIZEOF_EXPR, and
2422 ALIGNOF_EXPR.
2423 * typeck.c (cxx_sizeof_or_alignof_type): Update call to
2424 c_sizeof_or_alignof_type for change in parameter type.
2425
2426 2005-04-16 Mark Mitchell <mark@codesourcery.com>
2427
2428 PR c++/21025
2429 * typeck.c (cxx_sizeof_or_alignof_type): Check whether the type to
2430 which sizeof/alignof is dependent, rather than just whether we are
2431 processing_template_decl.
2432
2433 2005-04-17 Kazu Hirata <kazu@cs.umass.edu>
2434
2435 * cp-tree.h (LOOKUP_GLOBAL): Remove.
2436 (LOOKUP_ONLYCONVERTING, DIRECT_BIND, LOOKUP_NO_CONVERSION,
2437 LOOKUP_DESTRUCTOR, LOOKUP_NO_TEMP_BIND, LOOKUP_PREFER_TYPES,
2438 LOOKUP_PREFER_NAMESPACES, LOOKUP_CONSTRUCTOR_CALLABLE): Adjust
2439 their values.
2440
2441 2005-04-15 Richard Henderson <rth@redhat.com>
2442
2443 PR middle-end/14311
2444 * semantics.c (finish_call_expr): Call resolve_overloaded_builtin.
2445
2446 2005-04-15 Kazu Hirata <kazu@cs.umass.edu>
2447
2448 * cp-tree.h (lang_type_class): Remove redefined. Move
2449 java_interface into where redefined was. Increment the width
2450 of dummy.
2451 (TYPE_REDEFINED): Remove.
2452
2453 2005-04-14 Kazu Hirata <kazu@cs.umass.edu>
2454
2455 * cp-tree.h (SET_TMPL_ARG, ENUM_TI_TEMPLATE, ENUM_TI_ARGS,
2456 CLASSTYPE_TEMPLATE_LEVEL): Remove.
2457
2458 2005-04-11 Mark Mitchell <mark@codesourcery.com>
2459
2460 * decl2.c (determine_visibility): Don't use export_class_data.
2461 (import_export_decl): Honor TARGET_CXX_CLASS_DATA_ALWAYS_WEAK and
2462 TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY.
2463
2464 2005-04-09 Kazu Hirata <kazu@cs.umass.edu>
2465
2466 * cp-tree.h (cxx_alignof): Remove.
2467
2468 * cp-tree.h (DECL_ARRAY_DELETE_OPERATOR_P): Remove.
2469
2470 * cp-tree.h (EXCEPTION_CLEANUP_NAME, B_SET, B_CLR, B_TST,
2471 CONV_STATIC_CAST): Remove.
2472
2473 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Remove.
2474
2475 * cp-tree.h (VF_BINFO_VALUE, VF_BASETYPE_VALUE): Remove.
2476
2477 * cp-tree.h (cp_deprecated): Remove.
2478
2479 2005-04-08 Ian Lance Taylor <ian@airs.com>
2480
2481 * cp-tree.def: Define FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT,
2482 CONTINUE_STMT, SWITCH_STMT.
2483 * cp-tree.h (cp_stmt_codes): Add FOR_STMT, WHILE_STMT, DO_STMT,
2484 BREAK_STMT, CONTINUE_STMT, SWITCH_STMT.
2485 (WHILE_COND, WHILE_BODY): Define.
2486 (DO_COND, DO_BODY): Define.
2487 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Define.
2488 (SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Define.
2489 * cp-gimplify.c (enum bc_t): Define.
2490 (struct cp_gimplify_ctx, ctxp): Define.
2491 (push_context, pop_context): New static functions.
2492 (begin_bc_block, finish_bc_block): New static functions.
2493 (build_bc_goto): New static function.
2494 (gimplify_cp_loop, gimplify_for_stmt): New static functions.
2495 (gimplify_while_stmt, gimplify_do_stmt): Likewise.
2496 (gimplify_switch_stmt): Likewise.
2497 (cp_gimplify_expr): Handle FOR_STMT, WHILE_STMT, DO_STMT,
2498 SWITCH_STMT, CONTINUE_STMT, BREAK_STMT.
2499 (cp_genericize): Call push_context and pop_context.
2500 * semantics.c (finish_break_stmt): Just call build_stmt
2501 (BREAK_STMT) rather than build_break_stmt.
2502 (finish_continue_stmt): Corresponding change.
2503 * decl.c (pop_switch): Update call to c_do_switch_warnings for new
2504 parameters.
2505 * cxx-pretty-print.c (pp_cxx_statement): Handle SWITCH_STMT,
2506 WHILE_STMT, DO_STMT, FOR_STMT, BREAK_STMT, CONTINUE_STMT.
2507 * dump.c (cp_dump_tree): Likewise.
2508
2509 2005-04-08 Mark Mitchell <mark@codesourcery.com>
2510
2511 PR c++/20905
2512 * parser.c (cp_parser_type_specifier_seq): Add is_condition
2513 parameter.
2514 (cp_parser_new_type_id): Pass it.
2515 (cp_parser_condition): Likewise.
2516 (cp_parser_conversion_type_id): Likewise.
2517 (cp_parser_type_id): Likewise.
2518 (cp_parser_type_specifier_seq): In a condition, do not allow
2519 invalid type-specifier combinations.
2520 (cp_parser_exception_declaration): Adjust call to
2521 cp_parser_type_specifier_seq.
2522
2523 * cp-tree.def (TINST_LEVEL): Document TINST_IN_SYSTEM_HEADER_P.
2524 * cp-tree.h (struct tinst_level): Add in_system_header_p.
2525 (TINST_IN_SYSTEM_HEADER_P): New macro.
2526 (make_tinst_level): Remove.
2527 * pt.c (lookup_template_class): Preserve DECL_IN_SYSTEM_HEADER on
2528 the instantiated class.
2529 (push_tinst_level): Do not use make_tinst_level. Set
2530 TINST_IN_SYSTEM_HEADER_P.
2531 (pop_tinst_level): Likewise.
2532 (instantiate_class_template): Set in_system_header.
2533 (instantiate_pending_templates): Likewise.
2534 * tree.c (make_tinst_level): Remove.
2535
2536 2005-04-06 Joseph S. Myers <joseph@codesourcery.com>
2537
2538 * decl.c (start_decl): Apply pending #pragma weak regardless of
2539 scope.
2540
2541 2005-04-06 Mark Mitchell <mark@codesourcery.com>
2542
2543 PR c++/20212
2544 * pt.c (regenerate_decl_from_template): Copy attributes for
2545 parameters from the pattern to the instantiation.
2546
2547 2005-04-05 Mark Mitchell <mark@codesourcery.com>
2548
2549 PR c++/20734
2550 * cp-tree.def (OFFSET_REF): Correct comments.
2551 * init.c (build_offset_ref): Remove misleading comment.
2552 * typeck.c (build_unary_op): Handle pointer-to-member creation
2553 here, rather than ...
2554 (unary_complex_lvalue): ... here.
2555
2556 2005-04-06 Jason Merrill <jason@redhat.com>
2557
2558 PR c++/19312
2559 * tree.c (stabilize_init): Don't bother trying to stabilize
2560 something with no side-effects.
2561
2562 2005-04-05 Mark Mitchell <mark@codesourcery.com>
2563
2564 PR c++/20763
2565 * decl.c (grokdeclarator): Correct attribute handling.
2566
2567 2005-04-05 Mark Mitchell <mark@codesourcery.com>
2568
2569 PR c++/19159
2570 * decl2.c (import_export_decl): Use non-COMDAT external linkage
2571 for virtual tables, typeinfo, etc. that will be emitted in only
2572 one translation unit on systems without weak symbols.
2573
2574 2005-04-04 Mark Mitchell <mark@codesourcery.com>
2575
2576 PR c++/20679
2577 * parser.c (cp_parser_template_name): Fix thinko.
2578
2579 2005-04-04 Nathan Sidwell <nathan@codesourcery.com>
2580
2581 PR c++/20746
2582 * method.c (use_thunk): Protect covariant pointer return
2583 adjustments from NULL pointers.
2584
2585 2005-04-04 Jan Hubicka <jh@suse.cz>
2586
2587 * decl2.c (finish_objects): Revert my previous patch.
2588 (cp_finish_file): Likewise.
2589
2590 2005-04-03 Kazu Hirata <kazu@cs.umass.edu>
2591
2592 * pt.c: Fix comment typos.
2593
2594 2005-04-03 Nathan Sidwell <nathan@codesourcery.com>
2595
2596 PR c++/20723
2597 * pt.c (more_specialized_fn): Member functions are unordered wrt
2598 non-members. Conversion operators are unordered wrt other
2599 functions.
2600
2601 2005-04-01 Nathan Sidwell <nathan@codesourcery.com>
2602
2603 * call.c (add_template_candidates_real): Remove length parameter
2604 from fn_type_unification call.
2605 * class.c (resolve_address_of_overloaded_function): Likewise
2606 * cp-tree.h (fn_type_unification): Remove length parameter.
2607 * pt.c (get_bindings_overload): Remove.
2608 (get_bindings_real): Rename to ...
2609 (get_bindings): ... here. Remove length and strict
2610 parameters. Change return type flag to boolean. Remove original
2611 forwarding function.
2612 (determine_specialization): Adjust get_bindings call.
2613 (fn_type_unification): Remove length parameter. Adjust.
2614 (type_unification_real): Remove length parameter. Adjust.
2615 (resolve_overloaded_unification): Adjust get_bindings call.
2616 (try_one_overload): Simplify confusing cascaded if control flow.
2617 (unify): Remove length paramter from type_unification_real call.
2618 (most_specialized_instantiation): Adjust get_bindings calls.
2619 (most_specialized): Likewise.
2620
2621 2005-03-31 Nathan Sidwell <nathan@codesourcery.com>
2622
2623 PR c++/19203, implement DR 214
2624 * call.c (joust): Use more_specialized_fn.
2625 * cp-tree.h (DEDUCE_ORDER): Remove.
2626 (more_specialized): Replace with ...
2627 (more_specialized_fn): ... this.
2628 * pt.c (maybe_adjust_types_for_deduction): Remove DEDUCE_ORDER
2629 case.
2630 (type_unification_real): Remove DEDUCE_ORDER case.
2631 (more_specialized): Replace with ...
2632 (more_specialized_fn): ... this. Implement DR 214.
2633 (most_specialized_instantiation): Use get_bindings_real directly.
2634
2635 2005-03-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2636
2637 PR c++/18644
2638 * call.c (build_new_op): Remove check for -Wsynth.
2639
2640 2005-03-31 Jan Hubicka <jh@suse.cz>
2641
2642 * decl2.c (finish_objects): Mark ctor as needed.
2643 (cp_finish_file): Output variables only in nonunit-at-a-time.
2644
2645 2005-03-29 Richard Henderson <rth@redhat.com>
2646
2647 PR c/20519
2648 * decl.c (cp_complete_array_type): Rename from complete_array_type.
2649 Use the new complete_array_type in c-common.c. Update all callers.
2650 * cp-tree.h (cp_complete_array_type): Update to match.
2651
2652 2005-03-24 Geoffrey Keating <geoffk@apple.com>
2653
2654 * typeck.c (build_static_cast_1): Allow scalar_cast between
2655 any integral, floating, or enumeration type.
2656
2657 2005-03-24 Steven Bosscher <stevenb@suse.de>
2658
2659 * typeck.c (comptypes): First determine if the types are compatible
2660 from a target-independent point of view. Check target attributes
2661 last.
2662
2663 * class.c (build_base_path):
2664 (build_vbase_offset_vtbl_entries):
2665 (add_vcall_offset): Replace fold (buildN (...)) with fold_buildN.
2666 * error.c (dump_expr): Likewise.
2667 * init.c (build_zero_init, expand_cleanup_for_base,
2668 build_vec_delete_1): Likewise.
2669 * mangle.c (write_integer_cst): Likewise.
2670 * method.c (thunk_adjust): Likewise.
2671 * pt.c (convert_nontype_argument, tsubst, unify): Likewise.
2672 * tree.c (cxx_print_statistics, array_type_nelts_total): Likewise.
2673 * typeck.c (build_ptrmemfunc_access_expr,
2674 (get_member_function_from_ptrfunc): Likewise.
2675
2676 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
2677
2678 * cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
2679
2680 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
2681
2682 * cp-tree.h (perform_integral_promotions): Remove.
2683 (default_conversion): Add.
2684
2685 2005-03-22 Mark Mitchell <mark@codesourcery.com>
2686
2687 * parser.c (cp_parser_warn_min_max): New function.
2688 (cp_parser_binary_expression): Use it.
2689 (cp_parser_assignment_operator_opt): Likewise.
2690 (cp_parser_operator): Likewise.
2691
2692 2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2693
2694 PR c++/19980
2695 * decl.c (start_preparsed_function): Robustify.
2696
2697 2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2698
2699 PR c++/20499
2700 * parser.c (cp_parser_class_head): Return NULL_TREE when
2701 encountering a redefinition.
2702
2703 2005-03-22 Nathan Sidwell <nathan@codesourcery.com>
2704
2705 PR c++/20465
2706 PR c++/20381
2707 * typeck.c (build_ptrmemfunc): Allow OFFSET_REF when processing a
2708 template.
2709
2710 2005-03-21 Paolo Carlini <pcarlini@suse.de>
2711
2712 PR c++/20461
2713 PR c++/20536
2714 * init.c (emit_mem_initializers): Don't crash on undefined
2715 types.
2716
2717 2005-03-21 Paolo Carlini <pcarlini@suse.de>
2718
2719 PR c++/20147
2720 * semantics.c (finish_stmt_expr_expr): Return immediately
2721 if error_operand_p (expr).
2722
2723 2005-03-21 Joseph S. Myers <joseph@codesourcery.com>
2724
2725 * cp-tree.h (lvalue_or_else, lvalue_p): New.
2726 * typeck.c (lvalue_or_else): New. Call lvalue_error.
2727
2728 2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2729
2730 PR c++/20240
2731 * decl.c (decls_match): Compare context of VAR_DECL.
2732
2733 2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2734
2735 PR c++/20333
2736 * parser.c (cp_parser_postfix_expression) <case RID_TYPENAME>:
2737 Check the return value of cp_parser_nested_name_specifier.
2738
2739 2005-03-18 Dale Johannesen <dalej@apple.com>
2740
2741 * cp/tree.c (cp_tree_equal): Handle SSA_NAME.
2742
2743 2005-03-18 Paolo Carlini <pcarlini@suse.de>
2744
2745 PR c++/20463
2746 * parser.c (cp_parser_diagnose_invalid_type_name):
2747 Check TYPE_BINFO (current_class_type) before attempting
2748 to emit inform messages.
2749
2750 2005-03-17 Paolo Carlini <pcarlini@suse.de>
2751
2752 PR c++/19966
2753 * cp-tree.h (grok_op_properties): Change return type to void.
2754 * decl.c (grok_op_properties): Return early - don't check the
2755 arity - in case of a static member or an operator that cannot
2756 be non-member; tidy a bit.
2757
2758 2005-03-17 Nathan Sidwell <nathan@codesourcery.com>
2759
2760 PR c++/20186
2761 * pt.c (contains_dependent_cast_p): Remove.
2762 (fold_non_dependent_expr): Don't use it.
2763 (value_dependent_expression_p): Use a switch statement.
2764 reference_exprs can be dependent.
2765
2766 2005-03-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2767
2768 PR c++/4403
2769 PR c++/9783, DR433
2770 * name-lookup.c (pushtag): Skip template parameter scope when
2771 scope is ts_global. Don't push tag into template parameter
2772 scope.
2773 * pt.c (instantiate_class_template): Reorder friend class
2774 template substitution to handle non-dependent friend class
2775 that hasn't been previously declared.
2776
2777 2005-03-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2778
2779 Friend class name lookup 5/n
2780 PR c++/1016
2781 * cp-tree.h (pushtag): Adjust declaration.
2782 * decl.c (lookup_and_check_tag): Call lookup_type_scope if
2783 lookup_name fails.
2784 (xref_tag): Adjust call to pushtag. Make hidden class visible.
2785 (start_enum): Adjust call to pushtag.
2786 * name-lookup.c (ambiguous_decl): Ignore hidden names.
2787 (qualify_lookup): Change return type to bool.
2788 (hidden_name_p): New function.
2789 (lookup_namespace_name, unqualified_namespace_lookup,
2790 lookup_name_real): Use it.
2791 (lookup_type_scope): Update comments.
2792 (maybe_process_template_type_declaration): Change parameter name
2793 from globalize to is_friend.
2794 (pushtag): Change globalize parameter of type int to tag_scope.
2795 Hide name if introduced by friend declaration.
2796 * name-lookup.h (hidden_name_p): Add declaration.
2797 * parser.c (cp_parser_lookup_name): Don't deal with hidden name
2798 here.
2799 * pt.c (push_template_decl_real): Make hidden class template
2800 visible.
2801 (lookup_template_class, instantiate_class_template): Adjust call
2802 to pushtag.
2803 * semantics.c (begin_class_definition): Likewise.
2804 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
2805 tinfo_base_init, emit_support_tinfos): Use ts_current instead of
2806 ts_global.
2807
2808 2005-03-13 Mark Mitchell <mark@codesourcery.com>
2809
2810 PR c++/20157
2811 * pt.c (determine_specialization): Reject non-specializations.
2812
2813 2005-03-11 Per Bothner <per@bothner.com>
2814
2815 * cp-tree.h (struct cp_declarator): New id_loc field.
2816 * cp/parser.c (cp_lexer_get_preprocessor_token): Set cp_token's
2817 location using c_lex_with_flags, instead of input_location.
2818 (cp_parser_direct_declarator): Set declarator's id_loc from
2819 cp_token's id_loc.
2820
2821 2005-03-10 Jakub Jelinek <jakub@redhat.com>
2822
2823 PR c++/18384, c++/18327
2824 * decl.c (reshape_init_array): Use UHWI type for max_index_cst
2825 and index. Convert max_index to size_type_node if it isn't
2826 host_integerp (, 1).
2827
2828 2005-03-09 Mark Mitchell <mark@codesourcery.com>
2829
2830 PR c++/20208
2831 * pt.c (tsubst_decl): Apply array-to-pointer and
2832 function-to-pointer conversions to function arguments.
2833 (regenerate_decl_from_template): Likewise.
2834
2835 2005-03-09 Paolo Carlini <pcarlini@suse.de>
2836
2837 PR c++/16859
2838 * decl.c (complete_array_type): In pedantic mode, return
2839 3 for an empty initializer list as the initializer for an
2840 array of unknown bound (8.5.1/4).
2841 (maybe_deduce_size_from_array_init): Fix final test to use
2842 the above.
2843
2844 2005-03-08 Nathan Sidwell <nathan@codesourcery.com>
2845
2846 PR c++/20186
2847 * pt.c (contains_dependent_cast_p): New.
2848 (fold_non_dependent_expr): Call it.
2849
2850 2005-03-08 Mark Mitchell <mark@codesourcery.com>
2851
2852 PR c++/20142
2853 * cp-tree.h (target_type): Remove.
2854 * decl.c (layout_var_decl): Remove #if 0'd code.
2855 (cp_finish_decl): Remove dead code.
2856 * init.c (build_vec_init): When determining whether or not the
2857 element type has an asignment operator, look through all array
2858 dimensions.
2859 * typeck.c (target_type): Remove.
2860
2861 2005-03-07 Mark Mitchell <mark@codesourcery.com>
2862
2863 * class.c (finish_struct_1): Do not warn about non-virtual
2864 destructors in Java classes.
2865
2866 2005-03-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2867
2868 PR c++/19311
2869 * init.c (build_offset_ref): Don't build non-dependent SCOPE_REF.
2870 * pt.c (build_non_dependent_expr): Don't build NON_DEPENDENT_EXPR
2871 for OFFSET_TYPE.
2872 * typeck.c (build_x_unary_op): Don't build non-dependent SCOPE_REF.
2873 Also set PTRMEM_OK_P for NON_DEPENDENT_EXPR.
2874 (build_unary_op): Handle building ADDR_EXPR of OFFSET_REF inside
2875 template.
2876
2877 2005-03-02 Alexandre Oliva <aoliva@redhat.com>
2878
2879 * name-lookup.c (push_overloaded_decl): Don't error if the new
2880 decl matches the old one.
2881 * decl.c (redeclaration_error_message): Likewise.
2882
2883 2005-03-01 Per Bothner <per@bothner.com>
2884
2885 * decl.c (finish_function): Use SET_EXPR_LOCATION instead of
2886 unavailable annotate_with_file_line, if USE_MAPPED_LOCATION.
2887
2888 2005-03-01 Nathan Sidwell <nathan@codesourcery.com>
2889
2890 PR c++/20232
2891 * class.c (update_vtable_entry_for_fn): Don't crash on invalid
2892 covariancy.
2893
2894 * cp-tree.g (THUNK_TARGET): Expand comment.
2895 * method.c (use_thunk): Make sure we also use the target, if that
2896 is a thunk.
2897
2898 2005-02-27 Jakub Jelinek <jakub@redhat.com>
2899
2900 PR c++/20206
2901 * decl.c (cxx_comdat_group): Put thunks for
2902 TARGET_USE_LOCAL_THUNK_ALIAS_P (function) functions into the same
2903 comdat group as the thunk target.
2904
2905 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2906
2907 * call.c, class.c, cp-tree.h, decl2.c, error.c, init.c, mangle.c,
2908 parser.c: Fix comment typo(s).
2909
2910 2005-02-24 Jakub Jelinek <jakub@redhat.com>
2911
2912 PR c++/20175
2913 * decl.c (reshape_init): Don't warn about missing braces if STRING_CST
2914 initializes a char/wchar_t array.
2915
2916 2005-02-23 Mark Mitchell <mark@codesourcery.com>
2917
2918 PR c++/19878
2919 * decl.c (grokvardecl): Set DECL_INTERFACE_KNOWN for declarations
2920 with internal linkage.
2921
2922 2005-02-23 Alexandre Oliva <aoliva@redhat.com>
2923
2924 * decl.c (grokvardecl): Don't exempt anonymous types from having
2925 linkage for variables that have linkage other than "C".
2926
2927 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
2928
2929 * cp-objcp-common.h, error.c: Update copyright.
2930
2931 2005-02-22 Mark Mitchell <mark@codesourcery.com>
2932
2933 PR c++/20073
2934 * decl.c (start_decl_1): Don't clear TREE_READONLY.
2935 (cp_finish_decl): Likewise.
2936 (complete_vars): Call cp_apply_type_quals_to_decl.
2937 * typeck.c (cp_apply_type_quals): Avoid setting TREE_READONLY in
2938 cases where that's not valid.
2939
2940 PR c++/19991
2941 * init.c (integral_constant_value): Iterate if the value of a decl
2942 is itself a constant.
2943
2944 PR c++/20152
2945 * parser.c (cp_parser_class_head): Check for redefintions here.
2946 * semantics.c (begin_class_definition): Not here.
2947
2948 PR c++/20153
2949 * decl2.c (build_anon_union_vars): Add type parameter.
2950 (finish_anon_union): Pass it.
2951
2952 PR c++/20148
2953 * error.c (dump_expr): Do not print the body of a BIND_EXPR.
2954 Handle STATEMENT_LIST.
2955
2956 PR c++/19883
2957 * parser.c (cp_parser_direct_declarator): Always complain about
2958 non-constant array bounds when in a function scope.
2959 * semantics.c (finish_id_expression): Do not mark dependent names
2960 as non-constant.
2961
2962 2005-02-21 Douglas Gregor <dgregor@cs.indiana.edu>
2963
2964 PR c++/19076
2965 PR c++/6628
2966 * cp-tree.h (cp_apply_type_quals_to_decl): Declared.
2967 * decl.c (grokdeclarator): Pedwarn about qualifying a function
2968 type.
2969 Add qualifiers when declaring a typedef of a function type.
2970 Member function pointers pick up the qualifiers of the typedef
2971 used to declare them.
2972 Don't complain about creating cv-qualified function types.
2973 Complain about qualified function typedefs that are used to
2974 declare non-static member functions or free functions.
2975 Use cp_apply_type_quals_to_decl.
2976 (start_preparsed_function): Use cp_apply_type_quals_to_decl.
2977 (grokclassfn): Use cp_apply_type_quals_to_decl.
2978 * error.c (dump_type_suffix): Print qualifiers for function
2979 types.
2980 * pt.c (tsubst_decl): Use cp_apply_type_quals_to_decl.
2981 (tsubst): When substituting a function type into a member
2982 pointer type, pass along the qualifiers.
2983 (unify): Unify member pointers to member function pointers.
2984 * tree.c (cp_build_qualified_type_real): Function types may be
2985 qualified. This includes restrict qualifiers.
2986 * typeck.c (cp_apply_type_quals_to_decl): New function to replace
2987 use of c_apply_type_quals_to_decl. Drops qualifiers that are being
2988 added to function types.
2989
2990 2005-02-20 Zack Weinberg <zack@codesourcery.com>
2991
2992 PR 18785
2993 * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to
2994 c_common_to_target_charset. Delete bogus comment.
2995
2996 2005-02-18 Richard Henderson <rth@redhat.com>
2997
2998 PR libstdc++/10606
2999 * except.c (do_get_exception_ptr): New.
3000 (expand_start_catch_block): Use it.
3001
3002 2005-02-19 Jakub Jelinek <jakub@redhat.com>
3003
3004 * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING
3005 if type is not error_mark_node.
3006
3007 2005-01-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3008
3009 PR c++/19508
3010 * decl2.c (grokfield): Do not apply attributes to template parameters
3011 as they are ignored by tsubst anyway.
3012
3013 2005-02-18 Jakub Jelinek <jakub@redhat.com>
3014
3015 PR c++/19813
3016 * decl.c (start_decl_1): Clear TREE_READONLY flag if
3017 its type has TYPE_NEEDS_CONSTRUCTING.
3018 (complete_vars): Likewise.
3019
3020 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
3021
3022 PR c++/20028
3023 * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
3024 template along with TYPE_SIZE.
3025
3026 PR c++/20022
3027 * semantics.c (perform_deferred_access_checks): Use
3028 get_deferred_access_checks to get the top of the stack.
3029
3030 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
3031
3032 PR c++/17788
3033 * class.c (add_implicitly_declared_members, check_field_decl)
3034 (check_field_decls, check_bases): Remove arguments, tests and
3035 assignments of cant_have_default_ctor-related variables.
3036
3037 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
3038
3039 * decl2.c (mark_used): Set the source location of the used decl to
3040 the current input location here...
3041 * method.c (synthesize_method): ... not here. Set input_location
3042 from the decl instead.
3043
3044 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
3045
3046 PR c++/19608
3047 * parser.c (cp_parser_late_parsing_for_member): Use
3048 current_function_decl as scope to push to and from.
3049
3050 PR c++/19884
3051 * pt.c (check_explicit_specialization): Make sure namespace
3052 binding lookup found an overloaded function.
3053 (lookup_template_function): Just assert FNS is an overloaded
3054 function.
3055
3056 PR c++/19895
3057 * decl.c (grokdeclarator): Check for error mark node in ptrmem
3058 construction.
3059
3060 2005-02-14 Alexandre Oliva <aoliva@redhat.com>
3061
3062 PR c++/17816
3063 * decl.c (redeclaration_error_message): Report redefinition of
3064 pure virtual function.
3065
3066 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
3067
3068 PR c++/19891
3069 * class.c (build_simple_base_path): Build the component_ref
3070 directly.
3071 (update_vtable_entry_for_fn): Walk the covariant's binfo chain
3072 rather than using lookup_base.
3073 * search.c (dfs_walk_once): Add non-recursive assert check.
3074 * typeck.c (build_class_member_access_expr): It is possible for
3075 the member type to be both const and volatile.
3076
3077 2005-02-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3078
3079 PR c++/14479
3080 PR c++/19487
3081 * pt.c (maybe_check_template_type): Remove.
3082 * cp-tree.h (maybe_check_template_type): Remove prototype.
3083 * name-lookup.c (maybe_process_template_type_declaration): Don't
3084 use maybe_check_template_type.
3085
3086 2005-02-11 Richard Henderson <rth@redhat.com>
3087
3088 PR c++/19632
3089 * pt.c (get_mostly_instantiated_function_type): Save and restore
3090 flag_access_control instead of push/pop_access_scope.
3091
3092 2005-02-10 Mark Mitchell <mark@codesourcery.com>
3093
3094 PR c++/19755
3095 * decl.c (reshape_init): Issue warnings about missing braces.
3096
3097 2005-02-11 Kazu Hirata <kazu@cs.umass.edu>
3098
3099 * cp-tree.def, except.c, ptree.c: Update copyright.
3100
3101 2005-02-09 Mark Mitchell <mark@codesourcery.com>
3102
3103 PR c++/19811
3104 * call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
3105 attempting name lookup.
3106
3107 * parser.c (cp_parser_unqualified_id): Initialize type_decl.
3108
3109 PR c++/19787
3110 * call.c (initialize_reference): Robustify.
3111
3112 PR ++/19732
3113 * decl.c (grokdeclarator): Check for invalid use of destructor
3114 names.
3115
3116 PR c++/19762
3117 * parser.c (cp_parser_unqualified_id): Avoid creating destructor
3118 names with invalid types.
3119
3120 PR c++/19826
3121 * parser.c (cp_parser_direct_declarator): Allow type-dependent
3122 expressions as array bounds.
3123
3124 PR c++/19739
3125 * parser.c (cp_parser_attributes_list): Allow empty lists.
3126
3127 2005-02-08 Mark Mitchell <mark@codesourcery.com>
3128
3129 PR c++/19733
3130 * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
3131 (check_bases): Give warnings about a base class with a
3132 non-virtual destructor, even if it is implicit.
3133 (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
3134 (maybe_warn_about_overly_private_class): Don't use
3135 TYPE_HAS_DESTRUCTOR.
3136 (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
3137 (check_for_override): Give it external linkage.
3138 (add_implicitly_declared_members): Generate destructors lazily.
3139 (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
3140 TYPE_HAS_DESTRUCTOR.
3141 (check_bases_and_members): Call check_methods before
3142 check_field_decls.
3143 (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
3144 TYPE_HAS_DESTRUCTOR.
3145 (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
3146 * cp-tree.def (PSEUDO_DTOR_EXPR): Document.
3147 * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
3148 (lang_type_class): Add lazy_destructor.
3149 (CLASSTYPE_LAZY_DESTRUCTOR): New macro.
3150 (CLASSTYPE_DESTRUCTORS): Robustify.
3151 (TYPE_HAS_DESTRUCTOR): Remove.
3152 (check_for_override): Declare.
3153 (build_vbase_delete): Remove.
3154 * cvt.c (convert_to_void): Issue errors about pseudo-destructor
3155 expressions.
3156 * decl.c (cxx_maybe_build_cleanup): Remove dead code.
3157 * except.c (dtor_nothrow): Lazily create destructors if necessary.
3158 (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
3159 * init.c (build_delete): Lazily create destructors, if necessary.
3160 (build_vbase_delete): Remove.
3161 * method.c (locate_dtor): Simplify.
3162 (implicitly_declare_fn): Add support for destructors.
3163 * parser.c (cp_parser_lookup_name): Lazily create destructors, if
3164 necessary.
3165 * pt.c (check_explicit_specialization): Don't use
3166 TYPE_HAS_DESTRUCTOR.
3167 (instantiate_class_template): Likewise.
3168 * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
3169 * rtti.c (emit_support_tinfos): Robustify.
3170 * search.c (lookup_fnfields_1): Lazily create destructors.
3171 * typeck.c (build_class_member_access_expr): Remove
3172 PSEUDO_DTOR_EXPR handling.
3173 (lookup_destructor): Likewise.
3174
3175 2005-02-08 Kazu Hirata <kazu@cs.umass.edu>
3176
3177 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update
3178 copyright.
3179
3180 2005-02-07 Mark Mitchell <mark@codesourcery.com>
3181
3182 * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
3183 on boolean variables.
3184 (cp_lexer_stop_debugging): Likewise.
3185
3186 2005-02-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3187
3188 PR c++/17401
3189 * parser.c (cp_parser_pure_specifier): Emit a specific error
3190 message with an invalid pure specifier.
3191 * decl2.c (grok_function_init): Remove.
3192 (grokfield): An initializer for a method is a always a pure
3193 specifier.
3194
3195 2005-02-02 Matt Austern <austern@apple.com>
3196
3197 PR c++/19628
3198 * cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
3199 * parser.c (cp_parser_postfix_expression): Accept function call in
3200 constant expression if builtin_valid_in_constant_expr_p is true
3201 for that function.
3202 * pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
3203 * semantics.c (finish_id_expression): Accept function call in constant
3204 expression if builtin_valid_in_constant_expr_p is true for that
3205 function.
3206 * tree.c (builtin_valid_in_constant_expr_p): New.
3207
3208 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3209
3210 PR c++/17413
3211 * pt.c (check_instantiated_args): Improve error message.
3212 Fix logic when to print its second part.
3213
3214 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3215
3216 * cp-tree.h (complete_type_or_else): Remove macro.
3217 (complete_type_or_diagnostic): Rename to complete_type_or_else
3218 and remove last argument.
3219 * typeck.c (complete_type_or_diagnostic): Rename to
3220 complete_type_or_else and remove last argument.
3221
3222 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3223
3224 * cp-tree.h (commonparms): Remove prototype.
3225 (convert_arguments): Likewise.
3226 (PFN_FROM_PTRMEMFUNC): Remove.
3227 * typeck.c (commonparms): Make static.
3228 (convert_arguments): Add prototype. Make static.
3229 (PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc.
3230
3231 2005-01-31 Mark Mitchell <mark@codesourcery.com>
3232
3233 * parser.c (cp_parser_primary_expression): Don't complain about
3234 floating-point literals in integral constant expressions when
3235 !pedantic.
3236
3237 2005-02-01 Alexandre Oliva <aoliva@redhat.com>
3238
3239 * parser.c (cp_parser_template_id): Revert comment patch too.
3240
3241 PR c++/18757
3242 PR c++/19366
3243 PR c++/19499
3244 * parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
3245 Issue an error when creating the template id.
3246 * pt.c (fn_type_unification): Return early if the explicit
3247 template arg list is an error_mark_node.
3248
3249 2005-01-31 Mark Mitchell <mark@codesourcery.com>
3250
3251 * decl.c (build_enumerator): Do not issue duplicate error messages
3252 about invalid enumeration constants.
3253 * parser.c (cp_parser_non_integral_constant_expression): Always
3254 set parser->non_integral_constant_expression_p.
3255 (cp_parser_primary_expression): Add cast_p parameter. Issue
3256 errors about invalid uses of floating-point literals in
3257 cast-expressions.
3258 (cp_parser_postfix_expression): Add cast_p parameter.
3259 (cp_parser_open_square_expression): Pass it.
3260 (cp_parser_parenthesized_expression_list): Add cast_p parameter.
3261 (cp_parser_unary_expression): Likewise.
3262 (cp_parser_new_placement): Pass it.
3263 (cp_parser_direct_new_declarator): Likewise.
3264 (cp_parser_new_initializer): Likewise.
3265 (cp_parser_cast_expression): Add cast_p parameter.
3266 (cp_parser_binary_expression): Likewise.
3267 (cp_parser_question_colon_clause): Likewise.
3268 (cp_parser_assignment_expression): Likewise.
3269 (cp_parser_expression): Likewise.
3270 (cp_parser_constant_expression): If an integral constant
3271 expression is invalid, return error_mark_node.
3272 (cp_parser_expression_statement): Pass cast_p.
3273 (cp_parser_condition): Likewise.
3274 (cp_parser_iteration_statement): Likewise.
3275 (cp_parser_jump_statement): Likewise.
3276 (cp_parser_mem_initializer): Likewise.
3277 (cp_parser_template_argument): Likewise.
3278 (cp_parser_parameter_declaration): Likewise.
3279 (cp_parser_initializer): Likewise.
3280 (cp_parser_throw_expression): Likewise.
3281 (cp_parser_attribute_list): Likewise.
3282 (cp_parser_simple_cast_expression): Likewise.
3283 (cp_parser_functional_cast): Likewise.
3284 (cp_parser_late_parsing_default_args): Likewise.
3285 (cp_parser_sizeof_operand): Save/restore
3286 non_integral_constant_expression_p.
3287
3288 2005-01-31 Mike Stump <mrs@apple.com>
3289
3290 * parser.c (cp_lexer_new_main): Get the first token, first, before
3291 doing anything.
3292
3293 2005-01-31 Mark Mitchell <mark@codesourcery.com>
3294
3295 * decl.c (start_decl): Add missing parentheses.
3296
3297 2005-01-30 Mark Mitchell <mark@codesourcery.com>
3298
3299 PR c++/19555
3300 * cp-tree.h (DECL_USE_TEMPLATE): Expand documentation.
3301 * decl.c (duplicate_decls): Do not discard
3302 DECL_IMPLICIT_INSTANTIATION when merging declarations.
3303 (start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for
3304 variables that do not have DECL_USE_TEMPLATE.
3305
3306 PR c++/19395
3307 * decl.c (grokdeclarator): Refactor code so that qualified names
3308 are never allowed as the declarator in a typedef.
3309
3310 PR c++/19367
3311 * name-lookup.c (do_nonmember_using_decl): Avoid overloading
3312 builtin declarations.
3313
3314 PR c++/19457
3315 * call.c (convert_like_real): Inline call to
3316 dubious_conversion_warnings here.
3317 * cp-tree.h (dubious_conversion_warnings): Remove.
3318 * semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before
3319 setting TREE_NEGATED_INT.
3320 * typeck.c (dubious_conversion_warnings): Remove.
3321
3322 PR c++/19349
3323 * name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd
3324 memory.
3325
3326 2005-01-28 Mark Mitchell <mark@codesourcery.com>
3327
3328 PR c++/19253
3329 * parser.c (cp_parser_diagnose_invalid_type_name): Commit to
3330 tentative parses.
3331
3332 PR c++/19667
3333 * pt.c (redeclare_class_template): Robustify.
3334
3335 2005-01-27 Steven Bosscher <stevenb@suse.de>
3336
3337 * decl.c (finish_case_label): Use SWITCH_STMT accessor macros
3338 instead of SWITCH_EXPR ones.
3339 * pt.c (tsubst_expr): Likewise.
3340 * semantics.c (begin_switch_stmt, finish_switch_cond,
3341 finish_switch_stmt): Likewise.
3342
3343 2005-01-26 J"orn Rennecke <joern.rennecke@st.com>
3344
3345 PR c++/18370
3346 * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
3347
3348 2005-01-25 Andrew Pinski <pinskia@physics.uc.edu>
3349
3350 * class.c (abort_fndecl_addr): New variable.
3351 (build_vtbl_initializer): If we have a pure virtual function
3352 share the abort function's address.
3353 Include gt-cp-class.h at the end.
3354 * config-lang.in (gtfiles): Add cp/class.c.
3355
3356 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3357
3358 * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
3359 (pp_cxx_function_definition): Make static.
3360 * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
3361 (pp_cxx_function_definition): Likewise.
3362
3363 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3364
3365 * name-lookup.c (print_binding_level): Make static.
3366 (constructor_name_full): Make static inline.
3367 (current_decl_namespace): Make static.
3368 * name-lookup.h (constructor_name_full): Remove prototype.
3369 (print_binding_level): Likewise.
3370 (current_decl_namespace): Likewise.
3371
3372 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3373
3374 * decl.h (debug_bindings_indentation): Remove.
3375
3376 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
3377
3378 * typeck.c: Fix a comment typo.
3379
3380 2005-01-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3381
3382 PR c++/19208
3383 * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
3384 at least once.
3385 (tsubst): Use fold_decl_constant_value in place of a bare call to
3386 integral_constant_value.
3387
3388 2005-01-20 Kazu Hirata <kazu@cs.umass.edu>
3389
3390 * typeck.c (more_qualified_p): Remove.
3391 * cp-tree.h: Remove the corresponding prototype.
3392
3393 2005-01-19 Matt Austern <austern@apple.com>
3394
3395 * typeck.c (comptypes): Handle return code from objc_comptypes
3396 correctly.
3397
3398 2005-01-19 Kazu Hirata <kazu@cs.umass.edu>
3399
3400 * cp-tree.h, name-lookup.h: Remove unused prototypes.
3401
3402 2005-01-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3403
3404 PR c++/19375
3405 * semantics.c (finish_id_expression): Disable access checking for
3406 already lookuped FIELD_DECL.
3407
3408 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
3409
3410 * decl.c (delete_block): Remove.
3411 * cp-tree.h: Remove the corresponding prototype.
3412
3413 * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
3414 walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
3415 Remove.
3416 * cp-tree.h: Remove the corresponding prototypes.
3417
3418 * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
3419 cp_update_decl_after_saving, name_p): Remove.
3420 * cp-tree.h: Remove the corresponding prototypes.
3421
3422 2005-01-18 Andrew Pinski <pinskia@physics.uc.edu>
3423
3424 PR c/19472
3425 * semantics.c (finish_asm_stmt): Strip nops off
3426 input memory operands.
3427
3428 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
3429
3430 * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
3431 typeck2.c: Update copyright.
3432
3433 2005-01-16 Kazu Hirata <kazu@cs.umass.edu>
3434
3435 * class.c (get_enclosing_class): Remove.
3436 * cp-tree.h: Remove the corresponding prototypes.
3437
3438 * cvt.c (convert_lvalue): Remove.
3439 * cp-tree.h: Remove the corresponding prototype.
3440
3441 * pt.c (tinst_for_decl): Remove.
3442 * cp-tree.h: Remove the corresponding prototypes.
3443
3444 * tree.c (hash_chainon): Remove.
3445 * cp-tree.h: Remove the corresponding prototypes.
3446
3447 2005-01-15 Jakub Jelinek <jakub@redhat.com>
3448
3449 PR c++/19263
3450 * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
3451 of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
3452
3453 2005-01-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3454
3455 * Make-lang.in (cp-warn): Don't append $(WERROR).
3456
3457 2005-01-10 Kazu Hirata <kazu@cs.umass.edu>
3458
3459 * cp-tree.h: Fix a comment typo.
3460
3461 2005-01-07 Nathan Sidwell <nathan@codesourcery.com>
3462
3463 PR c++/19298
3464 * pt.c (tsubst_qualified_id): Call convert_from_reference.
3465
3466 2005-01-06 Mark Mitchell <mark@codesourcery.com>
3467
3468 PR c++/19244
3469 * class.c (add_implicitly_declared_members): Remove dead code.
3470 * decl.c (grokfndecl): Add sfk parameter. Use it do set
3471 DECL_CONSTRUCTOR_P.
3472 (grokdeclarator): Adjust calls to grokfndecl.
3473 * method.c (implicitly_declare_fn): Improve documentation.
3474 * parser.c (cp_parser_direct_declarator): Do not consider a
3475 function to be a constructor if the containing class was
3476 originally anonymous.
3477
3478 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3479
3480 PR c++/17154
3481 * search.c (lookup_field_1): Handle using declaration in
3482 class template partial specialization.
3483
3484 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3485
3486 PR c++/19258
3487 * pt.c (push_access_scope): Handle friend defined in class.
3488 (pop_access_scope): Likewise.
3489
3490 2005-01-06 Nathan Sidwell <nathan@codesourcery.com>
3491
3492 PR c++/19270
3493 * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
3494 (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
3495 array-new handling code. Use build_x_binary_op.
3496
3497 2005-01-05 Nathan Sidwell <nathan@codesourcery.com>
3498
3499 PR c++/19030
3500 * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
3501 * name-lookup.h (push_scope): Return pushed scope, not flag.
3502 * name-lookup.c (push_scope): Return scope that should be popped,
3503 not a flag.
3504 * decl.c (start_decl): Adjust.
3505 (grokfndecl): Adjust scope push and pop.
3506 * decl2.c (check_classfn): Likewise.
3507 * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
3508 cp_parser_init_declarator, cp_parser_direct_declarator,
3509 cp_parser_class_specifier, cp_parser_class_head,
3510 cp_parser_lookup_name,
3511 cp_parser_constructor_declarator_p): Likewise.
3512 * pt.c (instantiate_class_template,
3513 resolve_typename_type): Likewise.
3514
3515 2005-01-03 Volker Reichelt <reichelt@igpm.rwth-aaachen.de>
3516
3517 PR c++/14136
3518 * parser.c (cp_parser_unqualified_id): Do not issue error message
3519 for typedef-name as destructor declarator when performing an
3520 uncommitted tentative parse.
3521
3522 2005-01-01 Steven Bosscher <stevenb@suse.de>
3523
3524 PR middle-end/17544
3525 * decl.c (finish_function): Fix comment. Annotate the compiler
3526 generated return with the current file name and line 0.
3527