1 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3 * parser.c: Fix comment typo.
5 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
8 * decl2.c (grokbitfield): Receive the list of attributes, pass it to
9 grokdeclarator and apply it to the created declaration.
10 * cp-tree.h (grokbitfield): Update prototype.
11 * parser.c (cp_parser_member_declaration): Don't apply the attributes
12 since they are now applied in grokbitfield. Adjusted the call to
14 (cp_parser_objc_class_ivars): Likewise.
16 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
19 * class.c (type_requires_array_cookie): Do not consider delete[]
20 operators with an ellipsis as second argument.
22 2008-06-09 Jakub Jelinek <jakub@redhat.com>
25 * semantics.c (stmt_expr_value_expr): Don't crash on empty
28 2008-06-08 Paolo Carlini <paolo.carlini@oracle.com>
31 * pt.c (maybe_process_partial_specialization): Check the tree
32 returned by push_template_decl for error_mark_node.
33 * parser.c (cp_parser_class_head): Likewise, check the tree
34 returned by the latter.
36 2008-06-07 Paolo Carlini <paolo.carlini@oracle.com>
39 * decl.c (grokdeclarator): In case of wrong return type return
40 immediately error_mark_node.
42 2008-06-06 Jakub Jelinek <jakub@redhat.com>
44 * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
45 dependent_omp_for_p, begin_omp_task, finish_omp_task,
46 finish_omp_taskwait): New prototypes.
47 (cxx_omp_clause_default_ctor): Add outer argument.
48 (finish_omp_for): Add new clauses argument.
49 * cp-gimplify.c (cxx_omp_finish_clause): New function.
50 (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
51 (cxx_omp_clause_default_ctor): Add outer argument.
52 (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
53 * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
54 * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
55 Add par_clauses argument. If decl is present in parallel's
56 lastprivate clause, change that clause to shared and add
57 a lastprivate clause for decl to OMP_FOR_CLAUSES.
58 Fix wording of error messages. Adjust finish_omp_for caller.
59 Add clauses argument. Parse loops with random access iterators.
60 (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
62 (cp_parser_omp_for, cp_parser_omp_parallel): Adjust
63 cp_parser_omp_for_loop callers.
64 (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
66 (cp_parser_omp_clause_name): Handle collapse and untied
68 (cp_parser_omp_clause_schedule): Handle auto schedule.
69 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
70 and PRAGMA_OMP_CLAUSE_UNTIED.
71 (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
72 (OMP_TASK_CLAUSE_MASK): Define.
73 (cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
74 (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
75 (cp_parser_pragma): Handle PRAGMA_OMP_TASK and
77 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
78 OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT.
79 (tsubst_omp_for_iterator): New function.
80 (dependent_omp_for_p): New function.
81 (tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR
82 loops. Adjust finish_omp_for caller. Handle loops with random
83 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes.
84 (tsubst_expr): Handle OMP_TASK.
85 * semantics.c (cxx_omp_create_clause_info): New function.
86 (finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and
88 (cxx_omp_predetermined_sharing): Removed.
89 * semantics.c (finish_omp_for): Allow pointer iterators. Use
90 handle_omp_for_class_iterator and dependent_omp_for_p. Handle
91 collapsed for loops. Adjust c_finish_omp_for caller. Add new
92 clauses argument. Fix check for type dependent cond or incr.
93 Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of
94 fold_convert to convert incr amount to difference_type. Only
95 fold if not in template. If decl is mentioned in lastprivate
96 clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random
97 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR}
99 (finish_omp_threadprivate): Allow static class members of the
101 (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
102 finish_omp_taskwait): New functions.
104 * parser.c (cp_parser_binary_expression): Add prec argument.
105 (cp_parser_assignment_expression): Adjust caller.
106 * cp-tree.h (outer_curly_brace_block): New prototype.
107 * decl.c (outer_curly_brace_block): No longer static.
109 2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
112 * pt.c (push_template_decl_real): Consistently return error_mark_node
115 2008-06-02 Tomas Bily <tbily@suse.cz>
117 * typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
118 (cp_build_unary_op): Likewise.
119 (cp_build_indirect_ref): Use CONVERT_EXPR_P.
120 (maybe_warn_about_returning_address_of_local): Likewise.
122 2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
125 * pt.c (tsubst_initializer_list): Consistently check the tree
126 returned by tsubst_pack_expansion for error_mark_node.
128 2008-05-27 Michael Matz <matz@suse.de>
131 * call.c (build_new_op): Make warning conditional on
134 2008-05-27 Alexandre Oliva <aoliva@redhat.com>
137 * call.c (convert_like_real): Convert bitfield to desired type
138 before creating temporary.
140 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
142 * Makefile.in: Adjusted dependencies on c-incpath.o.
144 2008-05-23 Jakub Jelinek <jakub@redhat.com>
147 * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
148 fold_build_cleanup_point_expr on build_call_a results.
151 * semantics.c (omp_clause_info_fndecl): New function.
152 (finish_omp_clauses): Use it.
154 2008-05-21 Jakub Jelinek <jakub@redhat.com>
157 * cp-tree.h (check_array_initializer): New prototype.
158 * decl.c (check_array_initializer): New function.
159 (check_initializer): Call it.
160 * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
162 2008-05-21 Tom Tromey <tromey@redhat.com>
164 * mangle.c (save_partially_mangled_name): Remove.
165 (restore_partially_mangled_name): Likewise.
166 (write_encoding): Update.
167 (write_unqualified_name): Likewise.
168 (start_mangling): Always use name_obstack. Remove 'ident_p'
170 (get_identifier_nocopy): Remove.
171 (finish_mangling_internal): Rename from finish_mangling.
172 (finish_mangling): New function.
173 (finish_mangling_get_identifier): Likewise.
174 (partially_mangled_name, partially_mangled_name_len): Remove.
175 (mangle_decl_string): Change return type. Update.
176 (mangle_decl, mangle_type_string, mangle_special_for_type,
177 mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
178 mangle_ref_init_variable): Update.
180 2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
183 * semantics.c (begin_class_definition): Extend checks on the first
186 2008-05-12 Tomas Bily <tbily@suse.cz>
188 * typeck2.c (digest_init): Use CONVERT_EXPR_P.
189 * call.c (build_over_call): Likewise.
190 * error.c (dump_expr): Use CASE_CONVERT.
191 * class.c (fixed_type_or_null): Likewise.
193 2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
195 * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
197 (cp_parser_omp_clause_schedule): Remove superfluous "expected"
200 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
202 * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
203 DECL_LOOPING_CONST_OR_PURE_P attributes.
204 * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
207 2008-05-02 Simon Baldwin <simonb@google.com>
210 * typeck.c (build_array_ref): Remove warn_array_subscript_range.
212 2008-05-01 Simon Baldwin <simonb@google.com>
214 * typeck.c (build_array_ref): Call warn_array_subscript_range.
216 2008-04-30 Jakub Jelinek <jakub@redhat.com>
219 * pt.c (more_specialized_fn): Stop the loop even if there are no
220 arguments before ellipsis.
222 2008-04-29 Jakub Jelinek <jakub@redhat.com>
225 * parser.c (cp_parser_lookup_name): Look through single function
229 * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
230 COMPOUND_EXPR if the second argument would be error_mark_node.
232 2008-04-28 Jason Merrill <jason@redhat.com>
233 Liu Guanwei <liu_gw@163.com>
236 * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
237 in default arguments.
239 2008-04-25 Jan Hubicka <jh@suse.cz>
241 * typeck.c (check_return_expr): Update.
242 * decl.c (start_preparsed_function): Update.
243 * method.c (use_thunk): Update.
245 2008-04-24 Jakub Jelinek <jakub@redhat.com>
248 * cp-tree.h (cp_reconstruct_complex_type): New prototype.
249 * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
250 * decl2.c (is_late_template_attribute): Only make vector_size
251 late tmpl attribute if argument is type or value dependent.
252 (cp_reconstruct_complex_type): New function.
254 2008-04-24 Richard Guenther <rguenther@suse.de>
256 * typeck.c (cp_build_function_call): Call
257 check_builtin_function_arguments.
259 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
261 * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
262 (build_ptrmemfunc1): Don't set TREE_INVARIANT.
263 * init.c (build_zero_init): Don't set TREE_INVARIANT.
264 * class.c (build_base_path): Don't set TREE_INVARIANT.
265 (build_vtbl_ref_1): Don't set TREE_INVARIANT.
266 (build_vtbl_initializer): Don't set TREE_INVARIANT.
267 * decl.c (build_enumerator): Don't set TREE_INVARIANT.
268 * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
269 (generic_initializer): Don't set TREE_INVARIANT.
270 (ptr_initializer): Don't set TREE_INVARIANT.
271 (ptm_initializer): Don't set TREE_INVARIANT.
272 (class_initializer): Don't set TREE_INVARIANT.
273 * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
274 * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
275 (build_template_parm_index): Don't set TREE_INVARIANT.
276 (reduce_template_parm_level): Don't set TREE_INVARIANT.
277 (process_template_parm): Don't set TREE_INVARIANT.
279 2008-04-22 Jason Merrill <jason@redhat.com>
282 * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
283 to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
284 * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
286 2008-04-22 Jakub Jelinek <jakub@redhat.com>
289 * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
290 expression is errorneous.
292 2008-04-21 Jason Merrill <jason@redhat.com>
295 * tree.c (cp_tree_equal): Handle FIXED_CST.
298 * pt.c (template_template_parm_bindings_ok_p): Set
299 processing_template_decl while in this function.
301 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
303 * cvt.c (type_promotes_to): Support char16_t and char32_t.
304 * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
305 char16_t and char32_t.
306 * lex.c (reswords): Add char16_t and char32_t (for c++0x).
307 * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
308 extended builtin type "u8char{16,32}_t".
309 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
311 (cp_lexer_print_token): Support CPP_STRING{16,32}.
312 (cp_parser_is_string_literal): Idem.
313 (cp_parser_string_literal): Idem.
314 (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
316 (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
317 * tree.c (char_type_p): Support char16_t and char32_t as char types.
318 * typeck.c (string_conv_p): Support char16_t and char32_t.
320 2008-04-17 Jason Merrill <jason@redhat.com>
323 * call.c (build_user_type_conversion_1): Represent second step of
324 copy-init with an rvalue conversion.
325 (convert_like_real) [ck_user]: Don't implicitly add it here.
327 2008-04-15 Jakub Jelinek <jakub@redhat.com>
330 * decl.c (layout_var_decl): If extern or static var has variable
331 size, set TREE_TYPE (decl) to error_mark_node.
333 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
336 * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
339 2008-04-09 Jason Merrill <jason@redhat.com>
342 * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
343 not a pushed variable.
345 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
347 * call.c (build_op_delete_call): Fix quotation in warning message.
348 * decl.c (grokdeclarator): Quote keyword in error message.
349 * pt.c (check_for_bare_parameter_packs): Fix quotation in error
352 * parser.c (cp_parser_check_type_definition): Print error string
353 directly rather than using "%s".
354 (cp_parser_postfix_expression): Fix quotation.
355 (cp_parser_decltype): Likewise.
356 (cp_parser_sizeof_operand): Fix quotation. Simplify.
358 * parser.c (cp_parser_non_integral_constant_expression): Build error
359 message with CONCAT rather than using "%s".
360 (cp_parser_primary_expression): Fix quotation.
361 (cp_parser_postfix_expression): Likewise.
362 (cp_parser_postfix_dot_deref_expression): Likewise.
363 (cp_parser_unary_expression): Likewise.
364 (cp_parser_new_expression): Likewise.
365 (cp_parser_delete_expression): Likewise.
367 * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
368 as `)', not as `('. Fix quotation.
369 (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
370 (cp_parser_primary_expression): Likewise.
371 (cp_parser_nested_name_specifier_opt): Likewise.
372 (cp_parser_postfix_expression): Likewise.
373 (cp_parser_postfix_open_square_expression): Likewise.
374 (cp_parser_parenthesized_expression_list): Likewise.
375 (cp_parser_pseudo_destructor_name): Likewise.
376 (cp_parser_new_expression): Likewise.
377 (cp_parser_direct_new_declarator): Likewise.
378 (cp_parser_delete_expression): Likewise.
379 (cp_parser_cast_expression): Likewise.
380 (cp_parser_question_colon_clause): Likewise.
381 (cp_parser_builtin_offsetof): Likewise.
382 (cp_parser_trait_expr): Likewise.
383 (cp_parser_label_for_labeled_statement): Likewise.
384 (cp_parser_compound_statement): Likewise.
385 (cp_parser_selection_statement): Likewise.
386 (cp_parser_condition): Likewise.
387 (cp_parser_iteration_statement): Likewise.
388 (cp_parser_already_scoped_statement): Likewise.
389 (cp_parser_simple_declaration): Likewise.
390 (cp_parser_linkage_specification): Likewise.
391 (cp_parser_static_assert): Likewise.
392 (cp_parser_decltype): Likewise.
393 (cp_parser_conversion_function_id): Likewise.
394 (cp_parser_operator_function_id): Likewise.
395 (cp_parser_operator): Likewise.
396 (cp_parser_type_parameter): Likewise.
397 (cp_parser_template_id): Likewise.
398 (cp_parser_explicit_instantiation): Likewise.
399 (cp_parser_explicit_specialization): Likewise.
400 (cp_parser_enum_specifier): Likewise.
401 (cp_parser_namespace_definition): Likewise.
402 (cp_parser_namespace_alias_definition): Likewise.
403 (cp_parser_using_declaration): Likewise.
404 (cp_parser_using_directive): Likewise.
405 (cp_parser_asm_definition): Likewise.
406 (cp_parser_direct_declarator): Likewise.
407 (cp_parser_ptr_operator): Likewise.
408 (cp_parser_parameter_declaration_clause): Likewise.
409 (cp_parser_initializer_clause): Likewise.
410 (cp_parser_class_specifier): Likewise.
411 (cp_parser_member_specification_opt): Likewise.
412 (cp_parser_member_declaration): Likewise.
413 (cp_parser_pure_specifier): Likewise.
414 (cp_parser_constant_initializer): Likewise.
415 (cp_parser_base_clause): Likewise.
416 (cp_parser_exception_specification_opt): Likewise.
417 (cp_parser_try_block): Likewise.
418 (cp_parser_function_try_block): Likewise.
419 (cp_parser_handler): Likewise.
420 (cp_parser_throw_expression): Likewise.
421 (cp_parser_asm_operand_list): Likewise.
422 (cp_parser_attributes_opt): Likewise.
423 (cp_parser_label_declaration): Likewise.
424 (cp_parser_constructor_declarator_p): Likewise.
425 (cp_parser_template_declaration_after_export): Likewise.
426 (cp_parser_single_declaration): Likewise.
427 (cp_parser_objc_message_expression): Likewise.
428 (cp_parser_objc_message_args): Likewise.
429 (cp_parser_objc_encode_expression): Likewise.
430 (cp_parser_objc_defs_expression): Likewise.
431 (cp_parser_objc_protocol_expression): Likewise.
432 (cp_parser_objc_selector_expression): Likewise.
433 (cp_parser_objc_protocol_refs_opt): Likewise.
434 (cp_parser_objc_typename): Likewise.
435 (cp_parser_objc_method_keyword_params): Likewise.
436 (cp_parser_objc_superclass_or_category): Likewise.
437 (cp_parser_objc_try_catch_finally_statement): Likewise.
438 (cp_parser_objc_synchronized_statement): Likewise.
439 (cp_parser_objc_throw_statement): Likewise.
440 (cp_parser_omp_var_list_no_open): Likewise.
441 (cp_parser_omp_clause_default): Likewise.
442 (cp_parser_omp_clause_if): Likewise.
443 (cp_parser_omp_clause_num_threads): Likewise.
444 (cp_parser_omp_clause_reduction): Likewise.
445 (cp_parser_omp_clause_schedule): Likewise.
446 (cp_parser_omp_critical): Likewise.
447 (cp_parser_omp_for_loop): Likewise.
448 (cp_parser_omp_sections_scope): Likewise.
450 * parser.c (cp_parser_template_parameter_list): Simplify.
452 2008-04-07 James E. Wilson <wilson@tuliptree.org>
454 * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
456 2008-04-07 Jason Merrill <jason@redhat.com>
459 * class.c (type_has_user_nondefault_constructor): A template
460 counts as a nondefault constructor.
462 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
464 * decl.c (cxx_push_function_context): Delete.
465 (cxx_pop_function_context): Delete.
466 (start_preparsed_function): Merge cxx_push_function_context (!f->decl
468 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
469 LANG_HOOKS_FUNCTION_FINAL): Delete.
470 (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
471 LANG_HOOKS_MISSING_NORETURN_OK_P.
472 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
474 * semantics.c (current_stmt_tree): Fix comment.
476 2008-04-03 Jakub Jelinek <jakub@redhat.com>
479 * semantics.c (finish_offsetof): Undo effect of convert_from_reference
480 before calling fold_offsetof.
482 2008-04-03 Tom Tromey <tromey@redhat.com>
484 * Make-lang.in (c++_OBJS): New variable.
486 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
488 * optimize.c (clone_body): New, from tree-inline.c.
490 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
492 * method.c (synthesize_method): Use {push,pop}_function_context.
493 * name-lookup.c (push_to_top_level): Likewise.
494 * parser.c (cp_parser_late_parsing_for_member): Likewise.
496 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
499 * parser.c (cp_parser_decl_specifier_seq): Add location to error
502 2008-03-27 Tom Tromey <tromey@redhat.com>
504 * Make-lang.in: Revert automatic dependency patch.
506 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
509 * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
510 (build_compound_expr): New, for compatibility with C
512 (cp_build_compound_expr): Renamed from build_compound_expr.
513 (build_c_cast): New, for compatibility with C build_c_cast.
514 (cp_build_c_cast): Renamed from build_c_cast.
515 * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
516 * decl.c (cxx_maybe_build_cleanup): Ditto.
517 * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
518 (cp_build_compound_expr): Renamed from build_compound_expr.
519 (build_c_cast): Add C-compatible prototype.
520 (cp_build_c_cast): Renamed from build_c_cast.
521 * typeck2.c (build_functional_cast): Use cp_build_c_cast.
522 * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
524 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
526 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
527 tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
528 ending in a pack expansion, both of which can occur when
529 substituting into a nested template.
530 (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
531 instantiating the sizeof...(X) form, make tsubst_copy do the work.
532 * parser.c (cp_parser_template_parameter): Deal with unnamed
533 non-type template parameter packs identified by pack expansions in
536 2008-03-26 Jakub Jelinek <jakub@redhat.com>
539 * pt.c (apply_late_template_attributes): Don't call tsubst on
540 first attribute argument if it is IDENTIFIER_NODE.
543 * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
544 and LTGT_EXPR to pp_expression.
546 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
548 * pt.c (coerce_template_template_parm): Moved the body of the loop
549 of coerce_template_template_parms here, to make iteration over a
550 template argument pack simpler.
551 Also, allow matching of a template parameter pack in the template
552 template parameter to a template parameter in the template
554 (coerce_template_template_parms): Deal with variadic template
555 template parameters. Use coerce_template_template_parm.
556 (unify): Make sure we coerce the template template argument's
557 template arguments to the template template parameter's template
558 parameters, not the other way around.
560 2008-03-25 Tom Tromey <tromey@redhat.com>
562 * Make-lang.in: Remove .o targets.
563 (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
565 (c++_OBJS): New variable.
566 (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
568 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
570 * typeck.c (composite_pointer_type_r): Add SFINAE support.
571 (composite_pointer_type): Ditto.
572 (common_type): Fix call to composite_pointer_type.
573 (cxx_sizeof_nowarn): New; used to be a macro.
574 (cxx_sizeof_expr): Add SFINAE support.
575 (cxx_alignof_expr): Ditto.
576 (decay_conversion): Fix calls for SFINAE support.
577 (rationalize_conditional_expr): Add SFINAE support.
578 (build_class_member_access_expr): Ditto.
579 (finish_class_member_access_expr): Ditto.
580 (build_x_indirect_ref): Ditto.
581 (build_indirect_ref): Original version renamed to
582 cp_build_indirect_ref; new version provides a bridge from
584 (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
586 (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
587 (build_function_call): Original version renamed to
588 cp_build_function_call; new version provides a bridge from
590 (cp_build_function_call): Was build_function_call; added SFINAE
592 (convert_arguments): Add SFINAE support.
593 (build_x_binary_op): Ditto.
594 (build_binary_op): Original version renamed to cp_build_binary_op;
595 new version provides a bridge from c-common.
596 (cp_build_binary_op): Was build_binary_op; added SFINAE support.
597 (pointer_diff): Fix calls for SFINAE.
598 (build_x_unary_op): Add SFINAE support.
599 (condition_conversion): Fix calls for SFINAE.
600 (build_unary_op): Original version renamed to cp_build_unary_op;
601 new version provides a bridge from c-common.
602 (cp_build_unary_op): Was build_unary_op; added SFINAE support.
603 (unary_complex_lvalue): Fix calls for SFINAE.
604 (build_x_conditional_expr): Add SFINAE support.
605 (build_x_compound_expr_from_list): Fix calls for SFINAE.
606 (build_x_compound_expr): Add SFINAE support.
607 (convert_ptrmem): Fix calls for SFINAE.
608 (build_static_cast_1): Add SFINAE support.
609 (build_static_cast): Ditto.
610 (build_reinterpret_cast_1): Ditto.
611 (build_reinterpret_cast): Ditto.
612 (build_const_cast_1): Ditto.
613 (build_const_cast): Ditto.
614 (build_c_cast): Ditto.
615 (build_modify_expr): Original version renamed to
616 cp_build_modify_expr; new version provides a bridge from c-common.
617 (cp_build_modify_expr): Was build_modify_expr; added SFINAE
619 (build_x_modify_expr): Add SFINAE support.
620 (build_ptrmemfunc): Fix calls for SFINAE.
621 (convert_for_assignment): Add SFINAE support.
622 (convert_for_initialization): Ditto.
623 (check_return_expr): Fix calls for SFINAE.
624 (lvalue_or_else): Add SFINAE support.
625 * init.c (perform_member_init): Fix calls for SFINAE.
626 (emit_mem_initializers): Ditto.
627 (expand_virtual_init): Ditto.
628 (expand_cleanup_for_base): Ditto.
629 (build_aggr_init): Add SFINAE support.
630 (expand_default_init): Ditto.
631 (expand_aggr_init_1): Fix calls for SFINAE.
632 (build_offset_ref): Ditto.
633 (build_new_1): Add SFINAE support.
635 (build_vec_delete_1): Fix calls for SFINAE.
636 (get_temp_regvar): Ditto.
637 (build_vec_init): Add SFINAE support.
638 (build_dtor_call): Fix calls for SFINAE.
639 (build_delete): Ditto.
640 (push_base_cleanups): Ditto.
641 (build_vec_delete_1): Ditto.
642 * class.c (build_base_path): Fix calls for SFINAE.
643 (build_simple_base_path): Ditto.
644 (convert_to_base_statically): Ditto.
645 (build_vfn_ref): Ditto.
646 (resolve_address_of_overloaded_function): Ditto.
647 * decl.c (check_initializer): Fix calls for SFINAE.
648 (register_dtor_fn): Ditto.
649 (compute_array_index_type): Ditto.
650 (finish_enum): Ditto.
651 (start_preparsed_function): Ditto.
652 (cxx_maybe_build_cleanup): Ditto.
653 * call.c (convert_like): Add COMPLAIN argument.
654 (convert_like_with_context): Ditto.
655 (build_this): Fix calls for SFINAE.
656 (build_user_type_conversion): Ditto.
657 (resolve_args): Ditto.
658 (build_new_function_call): Add SFINAE support.
659 (build_operator_new_call): Fix calls for SFINAE.
660 (build_object_call): Add SFINAE support.
661 (build_conditional_expr): Ditto.
662 (build_new_op): Ditto.
663 (build_op_delete_call): Fix calls for SFINAE.
665 (convert_like_real): Add SFINAE support.
666 (build_x_va_arg): Fix calls for SFINAE.
667 (convert_default_arg): Ditto.
668 (build_over_call): Add SFINAE support.
669 (build_java_interface_fn_ref): Fix calls for SFINAE.
670 (build_special_member_call): Add SFINAE support.
671 (build_new_method_call): Ditto.
672 (perform_implicit_conversion): Ditto.
673 (perform_direct_initialization_if_possible): Ditto.
674 (initialize_reference): Fix calls for SFINAE.
675 * method.c (do_build_assign_ref): Fix calls for SFINAE.
676 * rtti.c (build_headof): Fix calls for SFINAE.
677 (get_tinfo_decl_dynamic): Ditto.
679 (build_dynamic_cast_1): Add SFINAE support.
680 (build_dynamic_cast): Ditto.
681 (tinfo_base_init): Fix calls for SFINAE.
682 * except.c (do_get_exception_ptr): Fix calls for SFINAE.
683 (do_end_catch): Ditto.
684 (initialize_handler_parm): Ditto.
685 (expand_start_catch_block): Ditto.
686 (do_allocate_exception): Ditto.
687 (do_free_exception): Ditto.
688 (build_throw): Ditto.
689 * cvt.c (build_up_reference): Fix calls for SFINAE.
690 (convert_to_reference): Ditto.
691 (ocp_convert): Ditto.
692 (convert_to_void): Add SFINAE support.
693 * tree.c (build_dummy_object): Fix calls for SFINAE.
694 (stabilize_expr): Ditto.
695 * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
697 (build_new_method_call): Ditto.
698 (build_special_member_call): Ditto.
699 (build_new_op): Ditto.
700 (perform_implicit_conversion): Ditto.
701 (perform_direct_initialization_if_possible): Ditto.
702 (convert_to_void): Ditto.
703 (build_aggr_init): Ditto.
705 (build_vec_init): Ditto.
706 (build_dynamic_cast): Ditto.
707 (finish_call_expr): Ditto
708 (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
709 (cxx_sizeof_nowarn): Remove macro; add function declaration.
710 (build_class_member_access_expr): Add tsubst_flags_t parameter.
711 (finish_class_member_access_expr): Ditto.
712 (build_x_indirect_ref): Ditto.
713 (cp_build_indirect_ref): New.
714 (cp_build_function_call): Add tsubst_flags_t parameter.
715 (build_x_unary_op): Ditto.
716 (cp_build_unary_op): New.
717 (build_x_conditional_expr): Add tsubst_flags_t parameter.
718 (build_x_compound_expr): Ditto.
719 (build_compound_expr): Ditto.
720 (build_static_cast): Ditto.
721 (build_reinterpret_cast): Ditto.
722 (build_const_cast): Ditto.
723 (build_c_cast): Ditto.
724 (build_x_modify_expr): Ditto.
725 (cp_build_modify_expr): New.
726 (convert_for_initialization): Add tsubst_flags_t parameter.
727 (cp_build_binary_op): Remove macro; add function declaration.
728 (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
729 (lvalue_or_else): Ditto.
730 (build_functional_cast): Ditto.
731 * typeck2.c (digest_init): Fix calls for SFINAE.
732 (process_init_constructor_array): Ditto.
733 (process_init_constructor_record): Ditto.
734 (build_x_arrow): Ditto.
735 (build_m_component_ref): Ditto.
736 (build_functional_cast): Add SFINAE support.
737 * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
738 * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
739 (finish_expr_stmt): Ditto.
740 (finish_for_expr): Ditto.
741 (finish_asm_stmt): Ditto.
742 (finish_non_static_data_member): Ditto.
743 (finish_qualified_id_expr): Ditto.
744 (finish_call_expr): Add SFINAE support.
745 (finish_increment_expr): Fix calls for SFINAE.
746 (finish_unary_op_expr): Ditto.
747 (simplify_aggr_init_expr): Ditto.
748 (finish_omp_clauses): Ditto.
749 (finish_omp_for): Ditto.
750 (finish_omp_barrier): Ditto.
751 (finish_omo_flush): Ditto.
752 * decl2.c (grok_array_decl): Fix calls or SFINAE.
753 (build_anon_union_vars): Ditto.
754 (get_guard_cond): Ditto.
756 (one_static_initialization_or_destruction): Ditto.
757 (do_static_initialization_or_destruction): Ditto.
758 (generate_ctor_or_dtor_function): Ditto.
759 (build_offset_ref_call_from_tree): Ditto.
760 * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
761 (cp_parser_postfix_dot_deref_expression): Ditto.
762 (cp_parser_unary_expression): Ditto.
763 (cp_parser_new_expression): Ditto.
764 (cp_parser_cast_expression): Ditto.
765 (cp_parser_binary_expression): Ditto.
766 (cp_parser_question_colon_clause): Ditto.
767 (cp_parser_assignment_expression): Ditto.
768 (cp_parser_expression): Ditto.
769 (cp_parser_builtin_offsetof): Ditto.
770 (cp_parser_template_argument): Ditto.
771 (cp_parser_functional_cast): Ditto.
773 2008-03-24 Tom Tromey <tromey@redhat.com>
775 * lex.c (handle_pragma_interface): Don't copy the filename.
776 (handle_pragma_implementation): Copy filename using xstrdup.
778 2008-03-21 Paolo Carlini <pcarlini@suse.de>
780 * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
781 (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
782 (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
783 (PROMOTES_TO_AGGR_TYPE): Remove.
784 (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
785 * typeck.c (unary_complex_lvalue, build_modify_expr,
786 convert_for_initialization): Adjust.
787 * init.c (is_aggr_type): Remove.
788 (is_class_type): Add.
789 (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
790 build_delete): Adjust.
791 * lex.c (make_aggr_type): Remove.
792 (make_class_type): Add.
793 (cxx_make_type): Adjust.
794 * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
796 * decl.c (build_typename_type, make_typename_type,
797 make_unbound_class_template, cxx_init_decl_processing,
798 check_tag_decl, groktypename, start_decl_1, layout_var_decl,
799 check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
800 grok_op_properties, xref_tag, check_function_type): Adjust.
801 * call.c (check_dtor_name, standard_conversion, implicit_conversion,
802 add_builtin_candidate, add_builtin_candidates,
803 build_user_type_conversion_1, convert_like_real, build_cxx_call,
804 is_subseq, compare_ics): Adjust.
805 * method.c (use_thunk): Adjust.
806 * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
807 create_tinfo_types): Adjust.
808 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
809 build_up_reference, convert_to_reference, convert_from_reference,
810 ocp_convert, build_expr_type_conversion): Adjust.
811 * tree.c (bind_template_template_parm, error_type): Adjust.
812 * dump.c (cp_dump_tree): Adjust.
813 * search.c (lookup_member): Adjust.
814 * friend.c (make_friend_class, do_friend): Adjust.
815 * typeck2.c (store_init_value, process_init_constructor_array,
816 process_init_constructor_record, build_x_arrow, build_m_component_ref,
817 build_functional_cast): Adjust.
818 * pt.c (finish_member_template_decl, process_template_parm,
819 lookup_template_class, tsubst_function_type, tsubst,
820 tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
822 * semantics.c (begin_class_definition, finish_base_specifier,
823 finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
825 * name-lookup.c (constructor_name_p, push_overloaded_decl,
826 do_class_using_decl, lookup_qualified_name,
827 maybe_process_template_type_declaration): Adjust.
828 * decl2.c (grok_array_decl, check_member_template,
829 constrain_class_visibility): Adjust.
830 * parser.c (cp_parser_class_name): Adjust.
832 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
834 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
836 2008-03-17 Jason Merrill <jason@redhat.com>
839 * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
840 a temp directly to a reference as per DR391.
842 2008-03-12 Richard Guenther <rguenther@suse.de>
846 2008-02-04 Richard Guenther <rguenther@suse.de>
849 * decl.c (record_builtin_java_type): Make jboolean a
850 integer type again where its mode doesn't match that of bool.
852 2008-01-25 Richard Guenther <rguenther@suse.de>
855 * decl.c (record_builtin_java_type): Make __java_boolean
857 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
858 after TYPE_MAIN_VARIANT check.
860 2008-03-10 Jakub Jelinek <jakub@redhat.com>
863 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
867 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
868 DECL_P in not a variable and appears more than once error messages.
870 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
874 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
878 * typeck.c (structural_comptypes): Call cp_comptypes.
879 (comptypes): New; called from the C/C++ common bits to perform
881 (cp_comptypes): Renamed from comptypes, which is already used,
882 with a different signature, by the C++ front end.
883 (build_reinterpret_cast_1): Call cp_comptypes.
884 (ptr_reasonably_similar): Ditto.
885 * decl.c (decls_match): Ditto.
886 * cvt.c (convert_to_reference): Ditto.
887 * cp-tree.h (same_type_p): Ditto.
888 (same_or_base_type_p): Ditto.
889 (comptypes): Rename to cp_comptypes.
890 * pt.c (canonical_type_parameter): Call cp_comptypes.
892 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
894 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
895 test for equivalence between pointer and references.
897 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
900 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
901 (check_field_decls): Likewise.
902 (note_name_declared_in_class): Likewise.
903 * call.c (build_new_op): Likewise.
904 (convert_like_real): Likewise.
905 (build_over_call): Likewise.
906 * lex.c (unqualified_fn_lookup_error): Likewise.
907 * parser.c (cp_parser_template_id): Likewise.
908 * cvt.c (warn_ref_binding): Likewise.
909 (convert_to_reference): Likewise.
910 (ocp_convert): Likewise.
911 (convert_to_void): Use error instead of pedwarn.
912 * error.c (cp_cpp_error): Use pedantic_warning_kind.
913 * decl.c (compute_array_index_type): Use constant_expression_error.
915 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
917 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
918 that auto is either a storage class or a simple type specifier,
919 depending on the dialect.
920 (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
921 specifier in C++98 mode, error in C++0x mode (since we don't
922 support auto as a type specifier, yet).
923 (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
924 storage specifier in C++0x mode.
925 (cp_parser_simple_type_specifier): Parse `auto' as a
926 simple-type-specifier, but error because we don't support it yet.
928 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
930 * parser.c (cp_parser_nonclass_name): New.
931 (cp_parser_pseudo_destructor_name): Use it instead of
933 (cp_parser_type_name): Move code to cp_parser_nonclass_name.
935 2008-02-29 Tom Tromey <tromey@redhat.com>
937 * parser.c (struct cp_token) <input_file_stack_index>: Remove.
938 (cp_lexer_get_preprocessor_token): Update.
939 (cp_lexer_set_source_position_from_token): Don't call
940 restore_input_file_stack.
941 * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
943 2008-02-28 Richard Guenther <rguenther@suse.de>
946 2008-02-26 Richard Guenther <rguenther@suse.de>
948 * decl.c (duplicate_decls): Remove decl from global mapping
949 before ggc_freeing it.
951 2008-02-27 Jakub Jelinek <jakub@redhat.com>
954 * rtti.c: Include c-pragma.h.
955 (push_abi_namespace, pop_abi_namespace): New functions.
956 (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
957 create_tinfo_types, emit_support_tinfos): Use them.
958 * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
960 2008-02-26 Jason Merrill <jason@redhat.com>
963 * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
964 to name the struct for linkage purposes even if it has attributes.
965 (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
967 2008-02-26 Tom Tromey <tromey@redhat.com>
969 * parser.c (eof_token): Remove old location code.
970 (check_empty_body): Remove test of USE_MAPPED_LOCATION.
971 * decl2.c (generate_ctor_or_dtor_function): Remove old location
973 (cp_write_global_declarations): Likewise.
974 * lex.c (cxx_init): Remove old location code.
975 (handle_pragma_implementation): Remove test of
977 * pt.c (tsubst): Remove old location code.
978 * error.c (cp_print_error_function): Remove test of
980 * decl.c (pop_label): Remove old location code.
981 (finish_function): Likewise.
983 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
986 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
988 2008-02-26 Richard Guenther <rguenther@suse.de>
990 * decl.c (duplicate_decls): Remove decl from global mapping
991 before ggc_freeing it.
993 2008-02-26 Paolo Carlini <pcarlini@suse.de>
996 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
998 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1000 * typeck.c (build_class_member_access_expr): Add appropriate
1001 OPT_W* parameter to warning.
1002 (build_reinterpret_cast_1): Likewise.
1003 * name-lookup.c (push_overloaded_decl): Likewise.
1005 2008-02-25 Paolo Carlini <pcarlini@suse.de>
1008 * error.c (dump_expr): Handle CONJ_EXPR.
1010 2008-02-25 Paolo Carlini <pcarlini@suse.de>
1013 * error.c (dump_type): Handle FIXED_POINT_TYPE.
1014 (dump_expr): Handle FIXED_CST.
1016 2008-02-24 Jason Merrill <jason@redhat.com>
1018 * parser.c (cp_parser_declaration): Handle "inline namespace".
1019 (cp_parser_namespace_definition): Likewise.
1022 * name-lookup.c (arg_assoc_namespace): Look down into inline
1025 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1027 * typeck.c (check_for_casting_away_constness): Use 1 single
1028 argument, the type of cast, to decide what diagnostics generate.
1029 (build_static_cast_1): Remove unused code. Update call to
1030 check_for_casting_away_constness.
1031 (build_reinterpret_cast_1): Update call to
1032 check_for_casting_away_constness.
1033 (build_const_cast_1): Likewise.
1035 2008-02-24 Paolo Carlini <pcarlini@suse.de>
1037 * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
1038 VEC_NEW_EXPR), forward to pp_expression.
1039 * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
1041 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
1044 * friend.c (do_friend): Call cplus_decl_attributes earlier.
1046 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
1049 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
1050 template decls' function decl.
1052 2008-02-22 Paolo Carlini <pcarlini@suse.de>
1056 2008-02-14 Paolo Carlini <pcarlini@suse.de>
1059 * pt.c (determine_specialization): In case of function templates,
1060 when the type of DECL does not match FN there is no match.
1062 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1065 * typeck.c (build_binary_op): Warn about floating point
1066 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
1068 2008-02-19 Jason Merrill <jason@redhat.com>
1071 * pt.c (resolve_overloaded_unification): Set processing_template_decl
1072 while we look for possible bindings.
1074 2008-02-19 Jakub Jelinek <jakub@redhat.com>
1077 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
1081 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
1082 vars. Afterwards ensure v is VAR_DECL.
1085 * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
1086 call cp_finish_decl.
1087 * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
1090 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
1095 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
1096 is error_mark_node, return an error early.
1097 (find_parameter_packs_r): Pass the pointer set along to recursive
1098 calls of cp_walk_subtrees; don't try to manage the pointer set
1100 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
1101 (make_pack_expansion): Ditto.
1102 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
1103 a second pass through the tree with find_parameter_packs_r; that
1104 second pass no longer does anything.
1105 (push_template_decl_real): If we have an erroneous declaration,
1106 set its type to error_mark_node before returning an error.
1108 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
1111 * pt.c (tsubst_initializer_list): Deal with the use of
1112 VOID_TYPE_NODE to indicate value-initialization of the bases.
1114 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1115 Jason Merrill <jason@redhat.com>
1119 * class.c (type_has_user_nondefault_constructor): New fn.
1120 * cp-tree.h: Declare it.
1121 * init.c (emit_mem_initializers): Use it for -W warning about
1122 missing base initializer.
1124 2008-02-14 Paolo Carlini <pcarlini@suse.de>
1127 * pt.c (determine_specialization): In case of function templates,
1128 when the type of DECL does not match FN there is no match.
1130 2008-02-13 Jakub Jelinek <jakub@redhat.com>
1131 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1134 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
1135 are not identifier :: ~, return before calling cp_parser_type_name.
1137 2008-02-13 Jason Merrill <jason@redhat.com>
1139 PR c++/34962, c++/34937, c++/34939
1140 * decl2.c (is_late_template_attribute): Always defer attributes
1141 vector_size and weak.
1144 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
1145 of enumerators, too.
1147 2008-02-12 Jason Merrill <jason@redhat.com>
1150 * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
1151 if we're doing conversions to call a user-defined conversion function.
1153 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
1156 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
1159 2008-02-12 Jakub Jelinek <jakub@redhat.com>
1162 * init.c (build_new_1): Don't create placement_expr before
1163 constructing alloc_call. Verify that the pointer is passed by
1164 value to operator new.
1166 2008-02-11 Jason Merrill <jason@redhat.com>
1169 * pt.c (tsubst): Don't look up a template typedef in an explicit
1172 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
1175 * tree.c (cp_build_qualified_type_real): When building a
1176 cv-qualified array type, build it as a unique type with
1177 build_cplus_array_type_1 and then adopt the unqualified type's
1180 2008-02-11 Paolo Carlini <pcarlini@suse.de>
1183 * decl.c (groktypename): Check grokdeclarator return.
1185 2008-02-10 Jason Merrill <jason@redhat.com>
1188 * decl2.c (cp_write_global_declarations): Don't write out static
1189 data members with DECL_IN_AGGR_P set.
1191 2008-02-08 Jason Merrill <jason@redhat.com>
1194 * tree.c (build_target_expr_with_type): Handle void initializer.
1195 (bot_manip): Remap slot before recursing.
1197 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1200 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
1202 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
1205 * tree.c: Include tree-flow.h.
1206 (build_target_expr): Check type compatibility.
1207 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
1208 * call.c (convert_like_real): Convert bitfield to expected type.
1210 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
1214 * typeck.c (structural_comptypes): Call cp_comptypes.
1215 (comptypes): New; called from the C/C++ common bits to perform
1217 (cp_comptypes): Renamed from comptypes, which is already used,
1218 with a different signature, by the C++ front end.
1219 (build_reinterpret_cast_1): Call cp_comptypes.
1220 (ptr_reasonably_similar): Ditto.
1221 * decl.c (decls_match): Ditto.
1222 * cvt.c (convert_to_reference): Ditto.
1223 * cp-tree.h (same_type_p): Ditto.
1224 (same_or_base_type_p): Ditto.
1225 (comptypes): Rename to cp_comptypes.
1226 * pt.c (canonical_type_parameter): Call cp_comptypes.
1228 2008-02-05 Jakub Jelinek <jakub@redhat.com>
1231 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
1232 value dependent expression.
1234 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
1237 * decl2.c (save_template_attributes): When we're modifying the
1238 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
1239 all of the other variants to add those same attributes. Otherwise,
1240 the main variant will be inconsistent with those other variants.
1242 2008-02-04 Richard Guenther <rguenther@suse.de>
1245 * decl.c (record_builtin_java_type): Make jboolean a
1246 integer type again where its mode doesn't match that of bool.
1248 2008-02-02 Jason Merrill <jason@redhat.com>
1249 Mark Mitchell <mark@codesourcery.com>
1252 * init.c (build_value_init_1): New function.
1253 (build_value_init): New function.
1254 * typeck2.c (build_functional_cast): Call it.
1255 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
1257 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
1258 TYPE_HAS_CONSTRUCTOR.
1259 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
1260 add_implicitly_declared_members): Adjust.
1261 (check_field_decls): Adjust. Remove warnings about reference/const
1262 in class without constructor.
1263 (check_bases_and_members): Adjust. Give those warnings here instead.
1264 * decl.c (fixup_anonymous_aggr): Adjust.
1265 (check_initializer): Adjust, clarify logic slightly.
1266 (grok_special_member_properties): Adjust, only set if user-provided.
1267 * rtti.c (create_tinfo_types): Don't set.
1268 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
1269 Use same_type_ignoring_top_level_qualifiers_p.
1270 * pt.c (check_explicit_specialization): Adjust.
1271 (instantiate_class_template): Adjust.
1273 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
1274 Jakub Jelinek <jakub@redhat.com>
1278 * typeck.c (structural_comptypes): Handle comparisons of
1279 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
1281 * mangle.c (write_builtin_type): Map down to the canonical type,
1282 which will be one of the predefined type nodes.
1284 2008-01-29 Michael Meissner <michael.meissner@amd.com>
1287 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
1288 bits to allow for expansion of the number of middle end tree
1291 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
1302 * typeck.c (check_return_expr): Tweak call to
1303 check_for_bare_parameter_packs.
1304 * class.c (add_method): Be careful with error_mark_nodes.
1305 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
1307 * pt.c (struct find_parameter_pack_data): Remove
1309 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
1310 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
1311 (make_pack_expansion): Ditto.
1312 (check_for_bare_parameter_packs): Parameter is now a tree, not a
1314 (process_template_parm): Tweak call to
1315 check_for_bare_parameter_packs.
1316 (push_template_decl_real): Tweak calls to
1317 check_for_bare_parameter_packs. If bare parameter packs are found
1318 in the list of exceptions, clear out that list after giving an
1320 * semantics.c (finish_cond): Tweak call to
1321 check_for_bare_parameter_packs.
1322 (finish_expr_stmt): Ditto.
1323 (finish_for_expr): Ditto.
1324 (finish_switch_cond): Ditto.
1325 (finish_mem_initializers): Ditto.
1326 (finish_member_declaration): Ditto.
1327 (finish_static_assert): Check for bare parameter packs in the
1329 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
1330 attributes of a declaration.
1331 * parser.c (cp_parser_using_declaration): Tweak call to
1332 check_for_bare_parameter_packs.
1333 (cp_parser_base_clause): Ditto.
1335 2008-01-28 Jason Merrill <jason@redhat.com>
1338 * class.c (build_base_path): Fix !want_pointer case.
1340 2008-01-27 Jason Merrill <jason@redhat.com>
1343 * class.c (build_base_path): Fix previous change.
1345 2008-01-26 Jakub Jelinek <jakub@redhat.com>
1348 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
1351 2008-01-26 Richard Guenther <rguenther@suse.de>
1354 * typeck.c (build_binary_op): Remove code to shorten compares.
1356 2008-01-25 Richard Guenther <rguenther@suse.de>
1359 * decl.c (record_builtin_java_type): Make __java_boolean
1361 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
1362 after TYPE_MAIN_VARIANT check.
1364 2008-01-25 Jason Merrill <jason@redhat.com>
1367 * class.c (build_base_path): Don't mess with virtual access if
1369 * call.c (standard_conversion): Don't check whether source type
1372 * decl2.c (is_late_template_attribute): Don't defer attribute
1373 visibility just because the type is dependent.
1375 2008-01-25 Jason Merrill <jason@redhat.com>
1376 Mark Mitchell <mark@codesourcery.com>
1379 * call.c (standard_conversion): Allow conversion from integer/real
1381 (compare_ics): Such a conversion is worse than a normal arithmetic
1384 2008-01-25 Richard Guenther <rguenther@suse.de>
1387 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
1390 2008-01-24 Paolo Carlini <pcarlini@suse.de>
1393 * pt.c (push_template_decl_real): Return error_mark_node in case
1394 of template definition of non-template.
1396 2008-01-24 Jason Merrill <jason@redhat.com>
1399 * decl2.c (is_late_template_attribute): Defer any attribute with
1400 dependent args. Also defer type attributes if the type is dependent.
1402 2008-01-22 Jakub Jelinek <jakub@redhat.com>
1403 Alexandre Oliva <aoliva@redhat.com>
1406 * call.c (reference_binding): For bitfields use the declared bitfield
1408 (add_builtin_candidates): Likewise.
1409 * class.c (layout_class_type): For bitfields copy over the
1410 original type quals.
1412 2008-01-22 Jason Merrill <jason@redhat.com>
1415 * decl.c (groktypename): Also ignore attributes on dependent
1416 possibly-class types.
1419 * friend.c (do_friend): Check for prior declaration of a friend
1420 function of a local class.
1421 * name-lookup.c (lookup_name_innermost_nonclass_level):
1423 * name-lookup.h: Declare it.
1425 2008-01-22 Tom Tromey <tromey@redhat.com>
1428 * init.c (build_new_1): Only disallow Java aggregates.
1430 2008-01-22 Jakub Jelinek <jakub@redhat.com>
1433 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
1434 if decl or init is error_mark_node.
1437 * error.c (dump_expr): Handle VECTOR_CST.
1439 2008-01-21 Jason Merrill <jason@redhat.com>
1442 * pt.c (tsubst_aggr_type): Make sure our context is complete.
1445 * pt.c (retrieve_local_specialization): Robustify.
1446 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
1449 * pt.c (tsubst): Only call retrieve_local_specialization if the
1450 original typedef was in a function template.
1453 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
1455 2008-01-21 Richard Guenther <rguenther@suse.de>
1458 * error.c (cp_print_error_function): Deal with recursive
1461 2008-01-20 Paolo Carlini <pcarlini@suse.de>
1464 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
1466 2008-01-20 Paolo Carlini <pcarlini@suse.de>
1470 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
1471 on non-IS_AGGR_TYPE scope.
1472 (constructor_name_p): Assert IS_AGGR_TYPE.
1474 2008-01-18 Ian Lance Taylor <iant@google.com>
1477 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
1478 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
1479 DECL_IS_OPERATOR_NEW flag.
1481 2008-01-16 Richard Guenther <rguenther@suse.de>
1484 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
1485 for conversions to type variants.
1487 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
1489 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
1490 declaration and code. Update copyright year.
1492 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1495 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
1496 know we have a class type.
1498 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1501 * pt.c (coerce_template_parameter_pack): When substituting into
1502 the type of a non-type template parameter pack. use the
1503 deduced/substituted arguments.
1504 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
1505 can be a parameter pack with the ellipsis following it. When we
1506 have an erroneous declaration, allow it to be a parameter pack.
1507 (cp_parser_template_parameter): Complain about default
1508 arguments on non-type template parameter packs, and parse them
1509 using the new cp_parser_default_argument.
1510 (cp_parser_parameter_declaration): Complain about parameter packs
1511 with default arguments. Move parsing of default arguments into a
1512 new function, cp_parser_default_argument.
1513 (cp_parser_default_argument): New; extracted from
1514 cp_parser_parameter_declaration.
1516 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1522 * typeck.c (check_return_expr): If there are bare parameter packs
1523 in the return value, set it to error_mark_node.
1524 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
1525 * pt.c (find_parameter_packs_r): Look at the type of
1526 IDENTIFIER_NODEs (e.g., for user-defined conversions).
1527 (check_for_bare_parameter_packs): Flip the result: now returns
1528 TRUE when there were bare parameter packs, FALSE otherwise.
1529 (push_template_decl_real): Deal with flipped result of
1530 check_for_bare_parameter_packs.
1531 * semantics.c (finish_cond): If there are bare parameter packs in
1532 the conditional, set it to error_mark_node.
1533 (finish_expr_stmt): If there are bare parameter packs in the
1534 expression, set it to error_mark_node.
1535 (finish_for_expr): Ditto.
1536 (finish_switch_cond): If there are bare parameter packs in
1537 the conditional, set it to error_mark_node.
1538 (finish_mem_initializers): If there are bare parameter packs in
1539 the member initializer, set it to error_mark_node.
1540 (finish_member_declaration): Check the attributes of the
1541 declaration for bare parameter packs, and remove the attributes if
1542 any have bare parameter packs.
1543 * parser.c (cp_parser_using_declaration): Check the using
1544 declaration for bare parameter packs.
1545 (cp_parser_base_clause): If there are bare parameter packs in a
1546 base specifier, don't add it to the chain.
1548 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1551 * error.c (dump_simple_decl): Display ellipsis for template
1552 non-type parameter packs.
1553 (dump_decl): Display ellipsis for template type parameter packs.
1554 (dump_template_decl): Display ellipsis for template template
1556 * pt.c (redeclare_class_template): When redeclaring a class
1557 template, check for collisions between template parameters and
1558 template parameter packs.
1560 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1563 * pt.c (process_partial_specialization): Don't mark template
1564 parameters that occur in non-deduced contexts.
1565 (struct pair_fn_data): Add include_nondeduced_p.
1566 (for_each_template_parm_r): Only visit non-deduced contexts if
1567 include_nondeduced_p is set.
1568 (for_each_template_parm): Added parameter include_nondeduced_p,
1569 which states whether template parameters found in non-deduced
1570 contexts should be visited.
1571 (uses_template_parms): Visit all template parameters, even those
1572 in non-deduced contexts.
1574 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1577 * pt.c (check_default_tmpl_args): Check for parameter packs that
1578 aren't at the end of a primary template.
1579 (push_template_decl_real): Remove check for parameter packs that
1580 aren't at the end of a primary template; that now happens in
1581 check_default_tmpl_args.
1582 * semantics.c (finish_template_template_parm): Use
1583 check_default_tmpl_args to check for errors in the template
1586 2008-01-12 Doug Kwan <dougkwan@google.com>
1588 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
1589 instead of OPT_Wreturn_type in warning due to ignored return type
1591 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
1592 instead of OPT_Wreturn_type in warning due to ignored return type
1595 2008-01-08 Jakub Jelinek <jakub@redhat.com>
1598 * semantics.c (finish_omp_for): Don't call
1599 fold_build_cleanup_point_expr if processing_template_decl.
1601 2008-01-04 Paolo Carlini <pcarlini@suse.de>
1602 Jakub Jelinek <jakub@redhat.com>
1605 * error.c (dump_template_argument): Deal with TREE_LIST.
1607 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
1609 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
1610 long" in C++0x mode; change the warning to note that "long long"
1611 is only unsupported in C++98 mode.
1613 2007-12-20 Jason Merrill <jason@redhat.com>
1616 * call.c (standard_conversion): Derived-to-base is considered a
1617 standard conversion.
1619 2007-12-19 Jakub Jelinek <jakub@redhat.com>
1622 * parser.c (cp_parser_omp_parallel): For non-combined parallel
1623 call cp_parser_statement rather than
1624 cp_parser_already_scoped_statement.
1626 2007-12-18 Jason Merrill <jason@redhat.com>
1629 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
1631 (dependent_type_p_r): Handle the domain of an array.
1633 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
1634 Jakub Jelinek <jakub@redhat.com>
1639 * pt.c (template_template_parm_bindings_ok_p): New; verifies
1640 bindings of template template parameters after all template
1641 arguments have been deduced.
1642 (coerce_template_parms): Don't complain when COMPLAIN doesn't
1644 (fn_type_unification): Use template_template_parm_bindings_ok_p.
1645 (unify): Deal with variadic, bound template template parameters.
1646 (get_class_bindings): Use template_template_parm_bindings_ok_p.
1648 2007-12-18 Jakub Jelinek <jakub@redhat.com>
1651 * decl.c (grokdeclarator): Reject friend sfk_constructor
1654 2007-12-17 Jakub Jelinek <jakub@redhat.com>
1657 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
1660 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
1663 * cp-lang.c (cp_classify_record): New.
1664 (LANG_HOOKS_CLASSIFY_RECORD): Override.
1666 2007-12-11 Jakub Jelinek <jakub@redhat.com>
1669 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
1672 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
1673 dynamic_cast in a template.
1675 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
1678 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
1679 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
1681 2007-12-10 Jakub Jelinek <jakub@redhat.com>
1684 * error.c (dump_type_prefix, dump_type_suffix): Handle
1685 TYPE_PACK_EXPANSION.
1688 * error.c (dump_expr): Handle ABS_EXPR.
1690 2007-12-09 Jakub Jelinek <jakub@redhat.com>
1694 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
1695 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1696 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
1697 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
1698 flag_use_repository and repo_emit_p returned 2.
1700 2007-12-06 Jakub Jelinek <jakub@redhat.com>
1703 * tree.c (stabilize_call, stabilize_init): Do nothing if
1704 processing_template_decl.
1706 2007-12-05 Jakub Jelinek <jakub@redhat.com>
1709 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
1710 error instead of assertion failure.
1711 * parser.c (cp_parser_decltype): If closing paren is not found,
1712 return error_mark_node.
1714 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
1717 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
1719 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
1720 since arg_assoc_template_arg will deal with them (better).
1722 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
1725 * pt.c (tsubst_exception_specification): Handle substitutions into
1726 member templates, where tsubst_pack_expansion returns a
1727 TYPE_PACK_EXPANSION.
1729 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
1732 * pt.c (unify_pack_expansion): If we didn't deduce any actual
1733 bindings for the template parameter pack, don't try to keep the
1734 empty deduced arguments.
1735 (unify): If a parameter is a template-id whose template argument
1736 list contains a pack expansion that is not at the end, then we
1737 cannot unify against that template-id.
1739 2007-12-02 Paolo Carlini <pcarlini@suse.de>
1742 * pt.c (current_template_args): Use error_operand_p.
1744 2007-12-02 Paolo Carlini <pcarlini@suse.de>
1747 * error.c (dump_decl): Handle TREE_BINFO.
1749 2007-12-01 Ollie Wild <aaw@google.com>
1752 * typeck.c (build_binary_op): Add conversion of pointers to function
1753 members appearing as operands to the equality operators.
1755 2007-11-30 Jakub Jelinek <jakub@redhat.com>
1758 * error.c (dump_expr): Handle OBJ_TYPE_REF.
1760 2007-11-29 Jakub Jelinek <jakub@redhat.com>
1763 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
1765 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
1770 * parser.c (cp_parser_decltype): Don't call finish_id_expression
1772 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
1775 2007-11-27 Jakub Jelinek <jakub@redhat.com>
1777 PR tree-optimization/34181
1778 * method.c (use_thunk): Don't inline the call in the thunk.
1781 * tree.c (decl_linkage): Static data members and static member
1782 functions in anonymous ns classes are lk_external.
1784 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
1787 * decl.c (start_preparsed_function): Pass
1788 processing_template_decl for the new allocate_struct_function
1791 2007-11-25 Richard Guenther <rguenther@suse.de>
1793 * decl.c (poplevel): Use BLOCK_CHAIN.
1795 2007-11-24 Ollie Wild <aaw@google.com>
1797 * typeck.c (delta_from_ptrmemfunc): New function.
1798 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
1799 (build_binary_op): Call delta_from_ptrmemfunc.
1801 2007-11-23 Jakub Jelinek <jakub@redhat.com>
1805 * decl.c (cp_finish_decl): Disallow variable or field
1806 definitions if extern "Java" aggregates.
1807 (grokparms): Disallow parameters with extern "Java"
1809 (check_function_type): Disallow function return values
1810 with extern "Java" aggregates.
1811 * init.c (build_new_1): Disallow placement new with
1812 extern "Java" aggregates.
1814 2007-11-23 Mark Mitchell <mark@codesourcery.com>
1815 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1818 * call.c (convert_like_real): Build a zero constant when __null is
1819 converted to an integer type.
1821 2007-11-22 Jakub Jelinek <jakub@redhat.com>
1824 * decl2.c (cp_write_global_declarations): Issue error about static
1825 data members in anonymous namespace which are declared and used,
1828 2007-11-20 Jakub Jelinek <jakub@redhat.com>
1831 * parser.c (cp_parser_class_head): Reject function template ids.
1834 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
1835 when processing_template_decl to build_array_type.
1838 * pt.c (more_specialized_fn): Don't segfault if one or
1839 both argument list end with ellipsis.
1841 2007-11-18 Jakub Jelinek <jakub@redhat.com>
1844 * semantics.c (finish_call_expr): Set
1845 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
1846 or OVERLOAD with all noreturn functions.
1848 2007-11-16 Jakub Jelinek <jakub@redhat.com>
1851 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
1854 2007-11-13 Jakub Jelinek <jakub@redhat.com>
1861 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
1862 set to error_mark_node the outermost POINTER_TYPE to the pack if
1863 it is seen in a POINTER_TYPE.
1864 (push_template_decl_real): If check_for_bare_parameter_packs
1865 fails for function return type, set the return type to
1866 integer_type_node. If check_for_bare_parameter_packs failed
1867 for non-function, return error_mark_node.
1870 * call.c (build_new_op): Call resolve_args before calling
1873 2007-11-11 Tom Tromey <tromey@redhat.com>
1876 * lex.c (handle_pragma_implementation): Use cpp_included_before.
1878 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1881 * pt.c (redeclare_class_template): Update error message. Use a
1882 note to show the previous declaration.
1883 (tsubst_friend_class): Use the location of the friend template as
1884 the input location before calling redeclare_class_template.
1886 2007-11-11 Jakub Jelinek <jakub@redhat.com>
1889 * semantics.c (finish_pseudo_destructor_expr): Handle
1890 object == error_mark_node.
1892 2007-11-10 Jakub Jelinek <jakub@redhat.com>
1895 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
1896 is not scalar type, let finish_class_member_access_expr handle
1897 diagnostics. Pass BIT_NOT_EXPR argument to
1898 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
1900 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
1903 * decl.c (cp_complete_array_type): If any of the initializer
1904 elements are pack expansions, don't compute the array size yet.
1906 2007-11-08 Andrew Pinski <pinskia@gmail.com>
1909 * tree.c (decl_linkage): Fields have no linkage.
1911 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
1913 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
1915 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
1920 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
1921 Be careful with ERROR_MARK_NODEs.
1922 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
1925 2007-11-07 Jakub Jelinek <jakub@redhat.com>
1928 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
1931 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
1935 * tree.c (c_build_qualified_type): Define bridge to
1936 cp_build_qualified_type.
1938 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
1949 * typeck.c (check_return_expr): Pass address of retval to
1950 check_for_bare_parameter_packs.
1951 * class.c (build_base_field): Tolerate bases that have no layout
1953 (end_of_base): Ditto.
1954 * tree.c (canonical_type_variant): Be careful with
1956 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
1958 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
1959 which states whether parameter packs should be replaced with
1961 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
1962 possible. If set_packs_to_error is set true, replace the parameter
1963 pack with ERROR_MARK_NODE. Manage our own pointer sets.
1964 (uses_parameter_packs): Don't set parameter packs to
1966 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
1967 which may be modified (if it is a parameter pack). Instructs
1968 find_parameter_packs_r to replace parameter packs with
1969 ERROR_MARK_NODE (so that they won't cause errors later on).
1970 (process_template_parm): Pass pointer to
1971 check_for_bare_parameter_packs.
1972 (process_partial_specialization): Replace pack expansions before
1973 the end of the template argument list with ERROR_MARK_NODE.
1974 (push_template_decl_real): Pass pointer to
1975 check_for_bare_parameter_packs. Replace parameter packs not at the
1976 end of the template parameter list with ERROR_MARK_NODE.
1977 (convert_template_argument): Be more careful about using DECL_NAME
1978 on only declarations.
1979 (unify): Can't unify against ERROR_MARK_NODE.
1980 * semantics.c (finish_cond): Pass pointer to
1981 check_for_bare_parameter_packs.
1982 (finish_expr_stmt): Ditto.
1983 (finish_for_expr): Ditto.
1984 (finish_switch_cond): Pass pointer to
1985 check_for_bare_parameter_packs, and call it before we put the
1986 condition into the statement.
1987 (finish_mem_initializers): Pass pointer to
1988 check_for_bare_parameter_packs.
1989 (finish_member_declaration): Ditto.
1990 * parser.c (cp_parser_base_clause): Ditto.
1992 2007-11-06 Jakub Jelinek <jakub@redhat.com>
1995 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
1996 with the final TREE_READONLY flag in place. processing_template_decl
1997 is known to be 0 in this part of function.
2000 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
2001 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
2002 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
2003 * semantics.c (finish_omp_atomic): Revert most of the
2004 2007-02-05 changes, just keep the new representation of
2005 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
2007 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
2010 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
2013 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
2018 * typeck.c (merge_types): Don't lose rvalue references when
2020 * call.c (build_over_call): Don't elide move constructors just
2021 because the copy constructor is trivial (!).
2022 (compare_ics): If comparing cv-qualifiers fails, we can still order
2023 based on binding lvalues vs. rvalues.
2025 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
2028 * pt.c (unify_pack_expansion): bring handling of function call
2029 arguments into line with type_unification_real.
2031 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2033 * typeck.c (build_binary_op): Use pedwarn instead of error for
2036 2007-11-05 Jakub Jelinek <jakub@redhat.com>
2039 * parser.c (cp_parser_unary_expression): For &&label call
2040 cp_parser_non_integral_constant_expression and return error_mark_node
2041 if it returned true.
2044 * decl.c (grokdeclarator): Don't call build_memfn_type if type
2045 is neither FUNCTION_TYPE nor METHOD_TYPE.
2047 2007-11-02 Jakub Jelinek <jakub@redhat.com>
2050 * parser.c (cp_parser_nested_name_specifier_opt): Use
2051 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
2052 typedef of currently open class.
2054 2007-11-02 Paolo Carlini <pcarlini@suse.de>
2057 * error.c (dump_expr): Deal specially with statements.
2059 2007-11-01 Jason Merrill <jason@redhat.com>
2062 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
2064 (lookup_template_class): Use it to get the outer template args
2065 for instantiating one.
2068 * pt.c (reduce_template_parm_level): tsubst the parameters
2069 of a template template parm.
2071 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
2074 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
2076 2007-11-01 Jakub Jelinek <jakub@redhat.com>
2079 * parser.c (cp_parser_postfix_dot_deref_expression): If
2080 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
2081 first and if that succeeds and type is SCALAR_TYPE_P, create
2085 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
2086 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
2087 as for std::type_info.
2089 2007-10-31 Paolo Carlini <pcarlini@suse.de>
2092 * cxx-pretty-print.c (pp_cxx_typeid_expression,
2093 pp_cxx_delete_expression): Change to static linkage.
2094 * cxx-pretty-print.h: Adjust declarations.
2095 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
2096 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
2097 MODOP_EXPR): Forward to pp_expression.
2099 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
2102 2007-10-31 Christian Bruel <christian.bruel@st.com>
2103 Mark Mitchell <mark@codesourcery.com>
2106 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
2107 if retval is volatile.
2109 2007-10-30 Jakub Jelinek <jakub@redhat.com>
2112 * decl2.c (build_offset_ref_call_from_tree): Call
2113 build_non_dependent_expr on object prior to building ADDR_EXPR from it
2114 if FN is DOTSTAR_EXPR.
2116 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
2120 * pt.c (find_parameter_packs_r): Fix typo in comment.
2121 (convert_template_argument): Look at the pattern of a pack
2122 expansion to determine what kind of entity we're converting.
2123 (coerce_template_parameter_pack): When we have coerced a non-type
2124 template parameter pack, substitute into the type of that pack.
2125 (tsubst_pack_expansion): When our substitution of a parameter pack
2126 is a "trivial" substitution of itself, just substitute into the
2127 pack expansion rather than actually expanding.
2129 2007-10-29 Jakub Jelinek <jakub@redhat.com>
2132 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
2133 for non-integral type bitfields. Return true if bitfield is correct, false
2134 error has been diagnosed.
2135 (check_field_decls): If check_bitfield_decl returned false, call also
2138 2007-10-28 Paolo Carlini <pcarlini@suse.de>
2139 Mark Mitchell <mark@codesourcery.com>
2142 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
2143 class member error out and return.
2145 2007-10-27 Jakub Jelinek <jakub@redhat.com>
2147 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
2148 to current_function_decl rather than 0.
2151 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
2153 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
2155 2007-10-27 Jason Merrill <jason@redhat.com>
2158 * call.c (convert_default_arg): Detect recursion.
2160 2007-10-27 Jakub Jelinek <jakub@redhat.com>
2163 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
2164 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
2166 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
2168 * error.c (dump_expr): Handle OFFSETOF_EXPR.
2170 2007-10-26 Jason Merrill <jason@redhat.com>
2173 * pt.c (get_template_info): New fn.
2174 (template_class_depth): Use it.
2175 (push_template_decl_real): Check that the template args of the
2176 definition match the args of the previous declaration.
2178 2007-10-26 Paolo Carlini <pcarlini@suse.de>
2181 * decl2.c (coerce_new_type): Do not allow a default argument for
2182 the first parameter.
2184 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
2187 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
2188 don't see the leading '('. Only lookup names if we get an
2191 2007-10-26 Jakub Jelinek <jakub@redhat.com>
2194 * parser.c (cp_parser_parenthesized_expression_list): Set
2195 greater_than_is_operator_p to true in between the parens.
2197 2007-10-26 Paolo Carlini <pcarlini@suse.de>
2200 * decl.c (grokdeclarator): In case of conflicting specifiers
2201 just return error_mark_node.
2203 2007-10-26 Ollie Wild <aaw@google.com>
2205 * expr.c (cxx_expand_expr): Removed.
2206 * cp-tree.h (exx_expand_expr): Removed.
2207 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
2210 2007-10-25 Paolo Carlini <pcarlini@suse.de>
2213 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
2215 2007-10-23 Jason Merrill <jason@redhat.com>
2217 PR c++/25950 (DR 391)
2218 * call.c (struct conversion): Remove check_copy_constructor_p.
2219 (reference_binding): Always bind a reference directly to a
2220 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
2222 (check_constructor_callable): Remove.
2223 (convert_like_real): Don't call it.
2224 (initialize_reference): Don't call check_constructor_callable.
2225 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
2226 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
2227 conversions if LOOKUP_NO_TEMP_BIND.
2228 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
2229 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
2231 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
2233 2007-10-22 Jakub Jelinek <jakub@redhat.com>
2236 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
2237 before checking if its type is integral.
2239 2007-10-22 Jason Merrill <jason@redhat.com>
2242 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
2243 * pt.c (apply_late_template_attributes): Splice out dependent
2244 attributes from DECL_ATTRIBUTES.
2246 * decl.c (cxx_maybe_build_cleanup): Use build_address.
2248 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2250 * typeck.c (build_binary_op) : Use appropriate warning option
2251 instead of unnamed warning.
2253 2007-10-16 Paolo Carlini <pcarlini@suse.de>
2256 * pt.c (current_template_args): Do not change TREE_LIST elements
2257 with a TREE_VALUE of error_mark_node.
2259 2007-10-16 Mark Mitchell <mark@codesourcery.com>
2261 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
2262 * decl.c (start_decl): Tidy.
2263 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
2265 (grokdeclarator): Clarify comment.
2267 2007-10-14 Andrew Pinski <pinskia@gmail.com>
2270 * decl.c (grokfndecl): Return NULL after the "definition of
2271 implicitly-declared" error happened.
2273 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
2276 * call.c (build_user_type_conversion_1): Do not consider conversion
2277 functions to convert a (possibly cv-qualified) object to the (possibly
2278 cv-qualified) same object type (or a reference to it), to a (possibly
2279 cv-qualified) base class of that type (or a reference to it).
2281 2007-10-12 Paolo Carlini <pcarlini@suse.de>
2283 * pt.c (tsubst): Use template_parm_level_and_index.
2285 2007-10-12 Jakub Jelinek <jakub@redhat.com>
2288 * parser.c (cp_parser_compound_statement): Handle label-declarations
2289 at the beginning of the compound statement.
2290 (cp_parser_block_declaration): Issue diagnostics about __label__
2291 not at the beginning of a block.
2293 2007-10-11 Paolo Carlini <pcarlini@suse.de>
2296 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
2297 to convert_template_argument.
2298 (coerce_template_parms): Return error_mark_node after fixed-length
2300 (tsubst_decl): Check for error_mark_node the return value of the
2301 first tsubst in 'case VAR_DECL'.
2303 2007-10-08 Ollie Wild <aaw@google.com>
2305 * typeck2.c (digest_init): Call cplus_expand_constant after
2306 convert_for_initialization.
2307 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
2308 * expr.c (cplus_expand_constant): Updated function description.
2310 2007-10-04 Jason Merrill <jason@redhat.com>
2313 * call.c (initialize_reference): Handle local static reference
2316 2007-10-03 Jason Merrill <jason@redhat.com>
2319 * name-lookup.c (push_namespace_with_attrs): Fold back into...
2320 (push_namespace): Here.
2321 (handle_namespace_attrs): New fn for the attr code.
2322 (leave_scope): Don't pop_visibility.
2323 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
2324 * parser.c (cp_parser_namespace_definition): Call
2325 handle_namespace_attrs and pop_visibility as appropriate.
2328 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
2330 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
2332 * decl.c (duplicate_decls): Preserve linkage flags for mere
2333 redeclarations of gnu_inline definitions.
2335 2007-10-03 Jason Merrill <jason@redhat.com>
2338 * decl.c (wrap_cleanups_r): New fn.
2339 (wrap_temporary_cleanups): New fn.
2340 (initialize_local_var): Call it.
2342 2007-09-29 Jason Merrill <jason@redhat.com>
2345 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
2346 constant to not have DECL_EXTERNAL if it's file-local.
2348 2007-09-28 Ollie Wild <aaw@google.com>
2351 2007-09-27 Ollie Wild <aaw@google.com>
2353 * typeck2.c (digest_init): Call cplus_expand_constant after
2354 convert_for_initialization.
2355 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
2356 * expr.c (cplus_expand_constant): Updated function description.
2358 2007-09-28 Jason Merrill <jason@redhat.com>
2361 * class.c (layout_empty_base): Take rli parameter, update
2362 rli->record_align if empty base has user-specified alignment.
2363 (build_base_field): Pass rli to it.
2365 2007-09-28 Paolo Carlini <pcarlini@suse.de>
2368 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
2370 2007-09-28 Paolo Carlini <pcarlini@suse.de>
2373 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
2374 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
2375 (dump_parameters): Just call dump_type for argument packs too.
2377 2007-09-28 Jakub Jelinek <jakub@redhat.com>
2380 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
2381 qualification by creating qualified PACK_EXPANSION_PATTERN and
2382 then calling make_pack_expansion on it.
2384 2007-09-27 Ollie Wild <aaw@google.com>
2386 * typeck2.c (digest_init): Call cplus_expand_constant after
2387 convert_for_initialization.
2388 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
2389 * expr.c (cplus_expand_constant): Updated function description.
2391 2007-09-27 Jason Merrill <jason@redhat.com>
2394 * decl2.c (is_late_template_attribute): Don't crash on unknown
2397 2007-09-27 Paolo Carlini <pcarlini@suse.de>
2400 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
2401 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
2402 spaces in the formatting.
2403 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
2405 2007-09-27 Jakub Jelinek <jakub@redhat.com>
2407 * error.c (cxx_print_error_function): Add third argument, pass
2408 it over to lhd_print_error_function.
2409 (cp_print_error_function): If diagnostic->abstract_origin, print
2411 * cp-tree.h (struct diagnostic_info): New forward decl.
2412 (cxx_print_error_function): Add third argument.
2414 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
2417 * name-lookup.c (pushtag): Do not create an implicit typedef before
2418 the associated type declaration is known to be valid.
2420 2007-09-25 Jakub Jelinek <jakub@redhat.com>
2422 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
2423 rather than pointers.
2425 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
2428 * search.c (check_final_overrider): Fail if
2429 targetm.comp_type_attributes returns 0.
2431 2007-09-24 Jason Merrill <jason@redhat.com>
2434 * pt.c (resolve_typename_type): Don't look things up in the original
2435 template if it would mean losing template arguments.
2437 2007-09-24 Jakub Jelinek <jakub@redhat.com>
2440 * cp-tree.h (cxx_type_hash_eq): New prototype.
2441 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
2442 * tree.c (cxx_type_hash_eq): New function.
2444 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
2447 * tree.c (cp_build_qualified_type_real): Build a canonical
2448 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
2450 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
2454 * tree.c (cplus_array_compare): Compare pointers, not types.
2455 (build_cplus_array_type_1): Store new array type into the hash
2456 table before building the canonical type; build the canonical type
2458 (cp_build_qualified_type_real): Put all of the array types with
2459 cv-qualified element types into the C++ array hash table, built as
2460 variants of the unqualified versions.
2462 2007-09-23 Jason Merrill <jason@redhat.com>
2465 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
2466 for deprecation warnings.
2468 2007-09-22 Jason Merrill <jason@redhat.com>
2471 * call.c (build_over_call): Warn about deprecated virtuals.
2474 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
2475 (MAYBE_TAGGED_TYPE_P): Remove.
2476 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
2477 instead of calling is_late_template_attribute again.
2478 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
2479 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
2480 Don't crash on typedefs from non-template classes.
2481 * decl2.c (grokfield): Don't sorry about attrs on template parms.
2482 (is_late_template_attribute): All attributes applied to template
2483 parms or typename types are dependent. Static.
2484 (splice_template_attributes): Pass decl through.
2485 (save_template_attributes): Likewise.
2487 2007-09-20 Jakub Jelinek <jakub@redhat.com>
2490 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
2491 returned from tsubst_pack_expansion.
2492 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
2493 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
2495 2007-09-20 Paolo Carlini <pcarlini@suse.de>
2498 * semantics.c (finish_id_expression): Use consistently
2499 context_for_name_lookup.
2500 * decl.c (fixup_anonymous_aggr): Fix error message for
2501 anonymous struct (vs union).
2503 2007-09-19 Jason Merrill <jason@redhat.com>
2506 * pt.c (tsubst): Handle typedefs by looking for the specialization.
2507 (retrieve_specialization): Only tagged types use
2508 DECL_TEMPLATE_INSTANTIATIONS.
2509 (instantiate_class_template): Push nested classes too.
2510 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
2512 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
2513 * init.c (is_aggr_type): Remove redundant tests.
2514 * class.c (push_nested_class): Use CLASS_TYPE_P.
2516 2007-09-20 Paolo Carlini <pcarlini@suse.de>
2519 * init.c (build_zero_init): If, recursively, build_zero_init
2520 returns a NULL_TREE, do not append it to the VEC of constructors.
2522 2007-09-18 Jason Merrill <jason@redhat.com>
2525 * pt.c (apply_late_template_attributes): Set processing_template_decl.
2526 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
2527 ATTR_FLAG_TYPE_IN_PLACE.
2528 (tsubst): Do unqualified lookup to find typedefs from current class.
2529 [ARRAY_TYPE]: Propagate alignment info.
2530 * decl2.c (is_late_template_attribute): Only defer handling of
2531 attribute aligned if the expression is dependent.
2532 (save_template_attributes): If we're deferring any attributes,
2533 make this a naming typedef.
2535 2007-09-18 Paolo Carlini <pcarlini@suse.de>
2537 PR c++/33462 (again)
2538 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
2539 va_arg instead of __builtin_va_arg.
2541 2007-09-18 Paolo Carlini <pcarlini@suse.de>
2544 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
2545 (pp_cxx_primary_expression): Use it.
2546 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
2547 * error.c (dump_expr): Use it.
2549 2007-09-18 Paolo Carlini <pcarlini@suse.de>
2552 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
2553 out case TYPEID_EXPR to...
2554 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
2555 and pp_cxx_right_paren.
2556 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
2557 * error.c (dump_expr): Use it.
2559 2007-09-18 Paolo Carlini <pcarlini@suse.de>
2562 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
2563 (pp_cxx_primary_expression): Use it.
2564 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
2565 * error.c (dump_expr): Use it.
2567 2007-09-16 Paolo Carlini <pcarlini@suse.de>
2570 * init.c (build_new): Remove warning for zero-element
2573 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
2576 * call.c (maybe_handle_implicit_object): Set this_p, clear
2577 rvaluedness_matches_p.
2578 (compare_ics): Do not compare rvaluedness matching when one of the
2579 operands is an implicit object.
2581 2007-09-14 Jason Merrill <jason@redhat.com>
2583 PR c++/17743, c++/19163
2584 * decl2.c (is_late_template_attribute): New fn.
2585 (splice_template_attributes, save_template_attributes): New fns.
2586 (cplus_decl_attributes): Call save_template_attributes.
2587 * pt.c (apply_late_template_attributes): New fn.
2588 (instantiate_class_template, tsubst_decl): Use it.
2589 * cp-tree.h: Declare is_late_template_attribute.
2591 2007-09-13 Tom Tromey <tromey@redhat.com>
2593 * parser.c (cp_lexer_new_main): Don't use
2594 c_lex_return_raw_strings.
2595 (cp_lexer_get_preprocessor_token): Update. Add special case when
2598 2007-09-11 Jan Hubicka <jh@suse.cz>
2600 * method.c (use_thunk): Use tree_rest_of_compilation
2601 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
2602 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
2603 * cp-tree.h (expand_body): Kill.
2604 (emit_associated_thunks): Declare.
2605 * semantics.c (emit_associated_thunks): Export.
2606 (expand_body): Kill.
2608 2007-09-09 David Daney <ddaney@avtrex.com>
2611 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
2612 to calculate cookie_ptr.
2614 2007-09-08 Jason Merrill <jason@redhat.com>
2617 * pt.c (most_specialized_class): Set processing_template_decl
2618 while tsubsting partial spec args.
2620 2007-09-06 Jason Merrill <jason@redhat.com>
2622 * decl2.c (get_guard): Copy visibility from the guarded variable.
2624 2007-09-06 Jan Hubicka <jh@suse.cz>
2626 * semantics.c (expand_body): Do not mark arguments of clones used.
2628 2007-09-06 Paolo Carlini <pcarlini@suse.de>
2631 * decl.c (cp_finish_decl): When processing_template_decl,
2632 deal correctly with init as TREE_LIST.
2634 2007-09-06 Tom Tromey <tromey@redhat.com>
2636 * decl.c (finish_function): Put return's location on line zero of
2639 2007-09-05 Jason Merrill <jason@redhat.com>
2642 * except.c (prepare_eh_type): Use type_decays_to.
2645 * init.c (build_delete): Use build_headof to get the address of the
2646 complete object if we aren't using the deleting destructor.
2647 * rtti.c (build_headof): No longer static.
2648 * cp-tree.h: Declare it.
2650 2007-09-06 Jakub Jelinek <jakub@redhat.com>
2652 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
2653 decl if a prototype for XX is provided with throw().
2656 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
2657 on __*_chk non-__builtin_* decls.
2659 2007-09-05 Paolo Carlini <pcarlini@suse.de>
2662 * semantics.c (finish_id_expression): Use context_for_name_lookup
2663 insted of DECL_CONTEXT, to see through anonymous structs and unions.
2664 * class.c (finish_struct_anon): Deal correctly with anonymous
2665 structs (vs unions, as GNU extension) in error messages.
2667 2007-09-05 Jan Hubicka <jh@suse.cz>
2669 * sematics.c (expand_body): Remove unnecesary import_export_decl
2670 call, DECL_EXTERNAL checks and current_function_decl saving.
2672 2007-09-05 Paolo Carlini <pcarlini@suse.de>
2674 PR c++/29731 (again)
2675 * parser.c (cp_parser_primary_expression): Return error_mark_node
2676 when a statement-expression is found in a template-argument list.
2678 2007-09-04 Jason Merrill <jason@redhat.com>
2680 * except.c (initialize_handler_parm): Use
2681 fold_build_cleanup_point_expr.
2684 * call.c (reference_binding): Don't look for user-defined conversions
2688 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
2689 the MUST_NOT_THROW_EXPR.
2691 2007-09-04 Richard Sandiford <richard@codesourcery.com>
2693 * decl.c (cp_finish_decl): Call determine_visibility before
2694 make_rtl_for_nonlocal_decl.
2696 2007-09-04 Jason Merrill <jason@redhat.com>
2699 * pt.c (most_specialized_class): Substitute outer template
2700 arguments into the arguments of a member template partial
2702 (strip_innermost_template_args): New fn.
2704 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
2706 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
2708 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2710 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
2711 * decl.c (cp_make_fname_decl): Likewise,
2712 * parser.c (cp_parser_string_literal): Likewise,
2713 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
2714 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
2717 2007-09-02 Paolo Carlini <pcarlini@suse.de>
2720 * typeck.c (build_unary_op): Fix error message for
2721 Boolean expression as operand to operator--.
2723 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2725 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
2726 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
2729 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
2732 * init.c (build_default_init): Make extern.
2733 * cp-tree.h (build_default_init): Declare here.
2734 * pt.c (tsubst_expr): When the instantiation of the initializer of
2735 a variable results in an empty list, default-initialize the
2737 (tsubst_copy_and_build): When the instantiation of the initializer
2738 in a new expression results in an empty initializer list,
2739 default-initialize it.
2741 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
2743 * mangle.c (write_type): Change mangling of rvalue reference from
2746 2007-08-31 Jakub Jelinek <jakub@redhat.com>
2748 * decl.c (duplicate_decls): Remove duplicated line.
2750 2007-08-31 Paolo Carlini <pcarlini@suse.de>
2753 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
2754 BOUND_TEMPLATE_TEMPLATE_PARM.
2756 2007-08-31 Paolo Carlini <pcarlini@suse.de>
2759 * search.c (lookup_member): Check the name argument for
2762 2007-08-31 Paolo Carlini <pcarlini@suse.de>
2765 * parser.c (cp_parser_trait_expr): Check rerurn value of
2768 2007-08-30 Ollie Wild <aaw@google.com>
2770 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
2771 convert_ptrmem for pointer to member conversions.
2772 (convert_to_pointer_force): Update cp_convert_to_pointer call.
2773 (ocp_convert): Update cp_convert_to_pointer call.
2774 * typeck.c (convert_ptrmem): Add conditional for null pointers to
2776 (build_static_cast_1): Check can_convert for conversions in either
2778 (get_delta_difference_1): New function.
2779 (get_delta_difference): Refactor to call get_delta_difference_1.
2781 2007-08-30 Jakub Jelinek <jakub@redhat.com>
2783 * decl.c (start_preparsed_function): Set
2784 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
2786 2007-08-28 Paolo Carlini <pcarlini@suse.de>
2789 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
2790 BOUND_TEMPLATE_TEMPLATE_PARM.
2792 2007-08-28 Jakub Jelinek <jakub@redhat.com>
2796 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
2797 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
2799 2007-08-27 Jason Merrill <jason@redhat.com>
2802 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
2803 Look inside STMT_EXPR.
2804 * semantics.c (stmt_expr_value_expr): New fn.
2805 * cp-tree.h: Declare it.
2808 * decl.c (groktypename): Ignore attributes applied to class type.
2810 2007-08-28 Richard Guenther <rguenther@suse.de>
2812 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
2814 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
2816 * error.c (dump_expr): Handle COMPLEX_CST.
2817 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
2818 (pp_cxx_expression): Likewise.
2820 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
2822 * decl.c (GNU_INLINE_P): New.
2823 (duplicate_decls): Handle gnu_inline. Merge attributes and
2824 some flags in overriding definitions.
2825 (redeclaration_error_message): Handle gnu_inline.
2826 (start_preparsed_function): Likewise.
2828 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2830 * call.c (sufficient_parms_p): Constify.
2831 * class.c (same_signature_p): Likewise.
2832 * cp-gimplify.c (is_invisiref_parm,
2833 cxx_omp_privatize_by_reference): Likewise.
2834 * cp-objcp-common.c (has_c_linkage): Likewise.
2835 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
2836 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
2837 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
2838 num_artificial_parms_for, comp_template_parms,
2839 template_parameter_pack_p, any_dependent_template_arguments_p,
2840 any_type_dependent_arguments_p, any_value_dependent_elements_p,
2841 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
2842 zero_init_p, member_p, cp_lvalue_kind,
2843 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
2844 varargs_function_p, is_dummy_object, special_function_kind,
2845 string_conv_p, type_unknown_p, comp_except_specs, compparms,
2846 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
2847 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
2848 cp_has_mutable_p, at_least_as_qualified_p,
2849 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
2850 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
2851 * except.c (nothrow_libfn_p): Likewise.
2852 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
2854 * pt.c (comp_template_parms, template_parameter_pack_p,
2855 any_type_dependent_arguments_p, any_value_dependent_elements_p,
2856 any_dependent_template_arguments_p): Likewise.
2857 * repo.c (repo_export_class_p): Likewise.
2858 * semantics.c (anon_aggr_type_p): Likewise.
2859 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
2860 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
2861 varargs_function_p, member_p, is_dummy_object, pod_type_p,
2862 zero_init_p, special_function_p): Likewise.
2863 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
2864 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
2865 compparms, invalid_nonstatic_memfn_p,
2866 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
2867 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
2868 cp_has_mutable_p, lvalue_or_else): Likewise.
2870 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
2872 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
2873 * cp-objcp-common.c (cp_tree_size): Ditto.
2874 * tree.c (cp_walk_subtrees): Ditto
2875 * cp-tree.def (TINST_LEVEL): Go away.
2876 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
2877 move together with other non-tree structs.
2878 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
2879 (union lang_tree_node): Eliminate tinst_level field.
2880 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
2881 (current_instantiation, outermost_tinst_level): Return
2882 a "struct tinst_level *".
2884 * error.c (print_instantiation_partial_context): Change second
2885 parameter to a "struct tinst_level *". Replace accessor macros
2887 (print_instantiation_full_context): Likewise.
2888 * lex.c (in_main_input_context): Likewise.
2890 * pt.c (struct pending_templates): New.
2891 (pending_templates, last_pending_template): Use it as a type.
2892 (current_tinst_level): Change typo to "struct tinst_level *"
2893 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
2894 (add_pending_template): Construct a "struct pending_template".
2895 Replace TINST_LEVEL accessor macros with field access.
2896 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
2897 (pop_tinst_level): Likewise.
2898 (instantiate_pending_templates): Likewise. Factor common code used
2899 when an instantiation has been done.
2900 (outermost_tinst_level): Replace tree_last with loop.
2901 (current_instantiation): Return a "struct tinst_level *".
2903 2007-08-24 Ollie Wild <aaw@google.com>
2905 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
2906 * name-lookup.h (cp_binding_level): Remove vtables member.
2908 2007-08-24 Richard Guenther <rguenther@suse.de>
2910 * tree.c (cp_cannot_inline_tree_fn): Remove.
2911 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
2912 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
2915 2007-08-24 Jakub Jelinek <jakub@redhat.com>
2918 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
2919 error_mark_node right away if build_expr_type_conversion
2923 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
2924 is error_mark_node rather than NULL_TREE.
2925 * pt.c (check_explicit_specialization): Likewise.
2928 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
2929 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
2931 2007-08-22 Jason Merrill <jason@redhat.com>
2934 * pt.c (outermost_tinst_level): New function.
2935 * lex.c (in_main_input_context): New function.
2936 * cp-tree.h: Declare it.
2937 * decl2.c (constrain_class_visibility): Use it to avoid warning
2938 about uses of the anonymous namespace in the main input file.
2940 2007-08-21 Jakub Jelinek <jakub@redhat.com>
2942 * init.c (build_new_1): Use get_target_expr instead of save_expr.
2944 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
2947 * class.c (finish_struct_1): Warn when a class has virtual
2948 functions and accessible non-virtual destructor.
2950 2007-08-20 Richard Guenther <rguenther@suse.de>
2954 * call.c (build_new_method_call): Convert initializer to
2956 * init.c (build_aggr_init): Do not fiddle with types.
2957 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
2958 * except.c (build_throw): Do not drop qualifiers for the
2960 * typeck.c (get_member_function_from_ptrfunc): Do not
2961 fiddle with types, instead convert.
2962 (build_ptrmemfunc1): Convert to the target type for
2964 (gfc_trans_allocate): Convert result to target type.
2965 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
2966 pointer-to-member structures shall have alias set zero as well.
2968 2007-08-20 Richard Guenther <rguenther@suse.de>
2970 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
2972 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
2973 (nonstatic_local_decl_p): Likewise.
2974 * tree.c (cp_auto_var_in_fn_p): Remove.
2975 * decl.c (nonstatic_local_decl_p): Remove.
2977 2007-08-20 Richard Guenther <rguenther@suse.de>
2979 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
2981 * tree.h (cp_walk_tree): New define to walk_tree_1 with
2982 cp_walk_subtrees lh parameter.
2983 (cp_walk_tree_without_duplicates): New define to
2984 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
2985 * tree.c (count_trees): Call
2986 cp_walk_tree_without_duplicates.
2987 (verify_stmt_tree): Call cp_walk_tree.
2988 (break_out_target_exprs): Likewise.
2989 (WALK_SUBTREE): Likewise.
2990 * cp-gimplify.c (cp_genericize): Likewise.
2991 * cp-pt.c (find_parameter_packs_r): Likewise.
2992 (uses_parameter_packs): Likewise.
2993 (make_pack_expansion): Likewise.
2994 (check_for_bare_parameter_packs): Likewise.
2995 (for_each_template_parm): Likewise.
2996 * decl.c (check_default_argument): Call
2997 cp_walk_tree_without_duplicates.
2998 * except.c (build_throw): Likewise.
2999 * decl2.c (type_visibility): Likewise.
3000 * semantics.c (expand_or_defer_fn): Likewise.
3001 (finalize_nrv): Call cp_walk_tree.
3003 2007-08-20 Jakub Jelinek <jakub@redhat.com>
3006 * init.c (build_new_1): Rename placement_var variable to placement_expr.
3007 Initialize it with save_expr rather than get_temp_regvar.
3009 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
3012 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
3015 2007-08-17 Ollie Wild <aaw@google.com>
3018 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
3019 declarations into appropriate slots for comparison. Fix type
3022 2007-08-17 Paolo Carlini <pcarlini@suse.de>
3025 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
3026 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
3028 2007-08-17 Paolo Carlini <pcarlini@suse.de>
3031 * parser.c (cp_parser_class_head): Improve error message.
3033 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
3035 * pt.c (instantiate_decl): Set input_location
3036 for the function end.
3038 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3040 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
3042 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
3043 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
3044 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
3045 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
3046 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
3047 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
3048 * typeck.c (cp_type_quals): Likewise.
3049 * typeck2.c (cxx_incomplete_type_diagnostic,
3050 cxx_incomplete_type_error): Likewise.
3052 2007-08-16 Paolo Carlini <pcarlini@suse.de>
3055 * pt.c (tsubst_friend_function): When check_classfn
3056 returns error_mark_node likewise return it.
3058 2007-08-15 Jakub Jelinek <jakub@redhat.com>
3061 * typeck.c (check_return_expr): Don't NRV optimize vars in
3063 * decl.c (finish_function): Comment fix.
3065 2007-08-15 Paolo Carlini <pcarlini@suse.de>
3068 * pt.c (push_template_decl_real): Depending on TYPE_P
3069 use either TYPE_CONTEXT or DECL_CONTEXT.
3071 2007-08-14 Mark Mitchell <mark@codesourcery.com>
3073 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
3074 constructors and destructors return this.
3076 2007-08-14 Paolo Carlini <pcarlini@suse.de>
3079 * decl2.c (check_classfn): Return error_mark_node in case of error;
3080 in that case, do not call add_method.
3081 * decl.c (start_decl): Deal with check_classfn returning
3083 (grokfndecl): Likewise.
3084 * pt.c (tsubst_friend_function): Likewise.
3086 2007-08-14 Andrew Pinski <pinskia@gmail.com>
3089 * typeck.c (build_binary_op): Disallow vector float types with
3090 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
3092 2007-08-11 Ian Lance Taylor <iant@google.com>
3094 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
3096 * cp-tree.h (cxx_get_alias_set): Update declaration.
3098 2007-08-10 Ollie Wild <aaw@google.com>
3100 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
3102 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
3104 (unqualified_namespace_lookup): Fix ambiguous_decl call.
3105 (lookup_using_namespace): Fix ambiguous_decl call.
3106 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
3108 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3110 * call.c (name_as_c_string): Use CONST_CAST.
3111 * decl.c (build_decl): Likewise.
3112 * parser.c (cp_parser_string_literal): Likewise.
3114 2007-08-10 Paolo Carlini <pcarlini@suse.de>
3117 * error.c (dump_expr): Consistently use the *_cxx_*
3118 variants of the pretty-print functions.
3120 2007-08-10 Paolo Carlini <pcarlini@suse.de>
3123 * decl.c (check_special_function_return_type): Just error
3124 on return type specified for conversion operator.
3126 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
3128 * typeck2.c (readonly_error): Handle general expressions.
3129 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
3131 2007-08-06 Dan Hipschman <dsh@google.com>
3133 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
3134 access function name.
3136 2007-08-04 Alfred Minarik <a.minarik@aon.at>
3139 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
3140 * g++spec.c (lang_specific_driver): Check them.
3142 2007-08-06 Paolo Carlini <pcarlini@suse.de>
3145 * pt.c (inline_needs_template_parms): Fix comment; change return type
3148 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
3151 2007-03-26 Dirk Mueller <dmueller@suse.de>
3153 * parser.c (cp_parser_member_declaration): Pedwarn
3154 about stray semicolons after member declarations.
3156 2007-08-02 Lee Millward <lee.millward@gmail.com>
3161 * parser.c (cp_parser_asm_definition): Detect and discard asm
3162 statements with invalid inputs or outputs.
3163 (cp_parser_asm_operand_list): Return error mark node if any
3164 of the operands are invalid. Adjust documentation.
3166 2007-08-02 Nick Clifton <nickc@redhat.com>
3168 * typeck.c: Change copyright header to refer to version 3 of the
3169 GNU General Public License and to point readers at the COPYING3
3170 file and the FSF's license web page.
3171 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
3172 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
3173 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
3174 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
3175 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
3176 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
3177 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
3178 name-lookup.h, parser.c: Likewise.
3180 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3183 * call.c (magic_varargs_p): Honor the "type generic" attribute.
3185 2007-07-30 Paolo Carlini <pcarlini@suse.de>
3188 * semantics.c (finish_label_stmt): Reject the __label__
3189 extension outside function scopes.
3191 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3193 * parser.c (eof_token): Un-constify.
3194 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
3195 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
3198 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
3200 * pt.c, tree.c, typeck2.c: Fix comment typos.
3202 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
3203 Mark Mitchell <mark@codesourcery.com>
3206 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
3207 hidden due to friend declarations in local classes.
3209 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
3211 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
3212 * cp-tree.def (DECLTYPE_TYPE): New.
3213 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
3214 (dump_type_prefix): Ditto.
3215 (dump_type_suffix): Ditto.
3216 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
3217 * mangle.c (write_type): Handle DECLTYPE_TYPE.
3218 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
3220 (DECLTYPE_TYPE_EXPR): New.
3221 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
3222 (finish_declared_type): Declare.
3223 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
3224 DECLTYPE_TYPE nodes.
3225 (pp_cxx_type_id): Ditto.
3226 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
3227 (tsubst): Substitute into a DECLTYPE_TYPE node.
3228 (tsubst_copy): Ditto.
3229 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
3231 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
3232 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
3233 structural equality (because we can't hash the expressions).
3234 (finish_declared_type): New.
3235 * lex.c (reswords): Add "decltype" keyword.
3236 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
3237 (cp_parser_postfix_expression): Add member_access_only_p to
3238 restrict postfix expression to member access expressions.
3239 (cp_parser_unary_expression): Update call to
3240 cp_parser_postfix_expression to reflect new parameter.
3241 (cp_parser_declared_type): New.
3242 (cp_parser_simple_type_specifier): Parse decltype types.
3244 2007-07-27 Mark Mitchell <mark@codesourcery.com>
3247 * call.c (convert_for_arg_passing): Only widen bitfields to their
3248 declared types if necessary.
3250 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3252 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
3255 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3257 * decl.c (typename_hash, typename_compare): Constify.
3258 * mangle.c (hash_type, compare_type): Likewise.
3259 * pt.c (eq_local_specializations, hash_local_specialization):
3261 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
3262 list_hash): Likewise.
3263 * typeck2.c (pat_compare): Likewise.
3265 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
3267 * method.c (implicitly_declare_fn): Increase alignment if member
3268 function pointer format requires it.
3270 2007-07-24 Paolo Carlini <pcarlini@suse.de>
3273 * typeck.c (check_return_expr): Do not pass a null argument
3276 2007-07-24 Paolo Carlini <pcarlini@suse.de>
3279 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
3282 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
3285 * typeck.c (convert_arguments): Only use default args if we have
3289 * typeck.c (structural_comptypes): No need to check
3290 resolve_typename_type return value here.
3291 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
3292 * pt.c (resolve_typename_type): Follow typename typedefs. Return
3293 original type rather than error_mark_node in case of failure.
3294 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
3295 resolve_typename_type result check.
3296 (cp_parser_direct_declarator, cp_parser_head,
3297 cp_parser_constructor_declarator_p): Likewise.
3299 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
3301 * pt.c (template_parms_variadic_p): Remove.
3302 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
3304 2007-07-12 Jakub Jelinek <jakub@redhat.com>
3307 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
3308 argument to dump_aggr_init_expr_args instead of false.
3310 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
3312 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
3313 canonical types; otherwise, fall back to structural type
3314 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
3315 internal compiler error if the canonical types are wrong.
3317 2007-07-11 Paolo Carlini <pcarlini@suse.de>
3320 * parser.c (cp_parser_make_indirect_declarator): When the
3321 the code argument is ERROR_MARK return cp_error_declarator.
3323 2007-07-09 Geoffrey Keating <geoffk@apple.com>
3326 * decl.c (cxx_init_decl_processing): Don't set
3327 force_align_functions_log.
3328 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
3329 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
3330 FUNCTION_DECL, return its alignment.
3332 2007-07-09 Richard Guenther <rguenther@suse.de>
3334 * decl.c (start_preparsed_function): Do not promote return type.
3336 2007-07-08 Paolo Carlini <pcarlini@suse.de>
3339 * pt.c (unify): Never pass error_mark_node to template_decl_level.
3341 2007-07-07 Mark Mitchell <mark@codesourcery.com>
3344 * pt.c (resolve_overloaded_unification): Robustify. Return a
3346 (type_unification_real): Adjust accordingly.
3348 2007-07-06 Richard Guenther <rguenther@suse.de>
3350 * init.c (build_new_1): Use the correct pointer type.
3351 * typeck2.c (build_m_component_ref): Likewise.
3353 2007-07-05 Mark Mitchell <mark@codesourcery.com>
3356 * init.c (build_zero_init): Always build an initializer for
3358 * typeck2.c (build_functional_cast): Use build_zero_init.
3361 * init.c (build_new_1): Always pass the allocation function to
3362 build_op_delete_call.
3363 * call.c (build_op_delete_call): Handle operator delete with a
3364 variable-argument list. Do not issue an error when no matching
3365 deallocation function is available for a new operator.
3368 * cp-tree.h (any_value_dependent_elements_p): Declare it.
3369 * decl.c (value_dependent_init_p): New function.
3370 (cp_finish_decl): Use it.
3371 * pt.c (value_dependent_expression_p): Use
3372 any_value_dependent_elements_p.
3373 * parser.c (cp_parser_primary_expression): Add comment about
3374 treating dependent qualified names as integral
3375 constant-expressions.
3377 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
3379 * decl.c (build_ptrmemfunc_type): Always use structural equality
3380 tests when comparing pointer-to-member-function types, because the
3381 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
3384 2007-07-03 Mark Mitchell <mark@codesourcery.com>
3386 * init.c (build_new): Tweak comment.
3388 2007-06-29 Dave Brolley <brolley@redhat.com>
3391 * parser.c (cp_parser_new_type_id): Don't reduce a named array
3392 type to its base type and number of elements here.
3393 * init.c (build_new): Call complete_type_or_else to ensure that the
3394 type is complete and to issue a diagnostic if it is not.
3395 (build_new_1): Don't call complete_type_or_else here.
3397 2007-07-03 Richard Guenther <rguenther@suse.de>
3400 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
3403 2007-07-02 Simon Baldwin <simonb@google.com>
3405 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
3406 for inner-style nested forward declarations that don't declare
3409 2007-07-02 Jakub Jelinek <jakub@redhat.com>
3412 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
3413 DECL_P in not a variable and appears more than once error messages.
3415 2007-07-01 Ollie Wild <aaw@google.com>
3417 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
3418 (select_decl): Remove function.
3419 (unqualified_namespace_lookup): Populate binding by calling
3420 ambiguous_decl. Remove select_decl call.
3421 (lookup_qualified_name): Remove select_decl call.
3422 * decl.c (lookup_and_check_tag): Check for ambiguous references.
3423 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
3424 generation when name lookup is ambiguous.
3426 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
3429 * init.c (build_new_1): Use structural equality on the copy of the
3432 2007-06-28 Geoffrey Keating <geoffk@apple.com>
3434 * decl2.c (determine_visibility): Implement
3435 flag_visibility_ms_compat effect on type info.
3436 * decl.c (cxx_init_decl_processing): Implement
3437 global effect of flag_visibility_ms_compat.
3439 2007-06-28 Geoffrey Keating <geoffk@apple.com>
3441 * decl2.c (start_objects): Mark constructor-running function
3444 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
3447 * decl.c (grokdeclarator): Reset friendp for member functions declared
3448 friend of their own class.
3450 2007-06-23 Mark Mitchell <mark@codesourcery.com>
3452 * decl2.c (determine_visibility): Don't look for dllexport here.
3453 (determine_visibility_from_class): Tidy.
3455 2007-06-18 Simon Baldwin <simonb@google.com>
3458 * parser.c (cp_parser_single_declaration): Added check for storage
3459 class other than sc_none in parsed declaration, and a flag to indicate
3460 if the call is part of an explicit template specialization parse.
3461 * (cp_parser_explicit_specialization): Specialization check flag added
3462 to call to cp_parser_single_declaration(), set true.
3463 * (cp_parser_template_declaration_after_export): Specialization check
3464 flag added to call to cp_parser_single_declaration(), set false.
3465 * pt.c (check_explicit_specialization): Added code to copy visiblity
3466 and linkage from the templated function to the explicit specialization.
3468 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
3470 * typeck.c (build_binary_op): For templates build the
3471 expression in pieces to avoid the assert in build2_stat.
3472 (get_member_function_from_ptrfunc):
3473 Change over to using POINTER_PLUS_EXPR and convert
3474 the second operand to sizetype.
3475 * typeck2.c (build_m_component_ref): Likewise.
3476 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
3477 instead of PLUS_EXPR for pointers.
3478 (build_new_1): Likewise.
3479 (build_vec_delete_1): Likewise.
3480 (build_vec_delete): Likewise.
3481 * class.c (build_base_path): Likewise.
3482 (build_base_path): Likewise.
3483 (convert_to_base_statically): Likewise.
3484 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
3485 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
3486 instead of PLUS_EXPR.
3487 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
3488 instead of PLUS_EXPR for pointers.
3489 * call.c (build_special_member_call): Likewise.
3490 * rtti.c (build_headof): Likewise.
3491 Use sizetype instead of ptrdiff_type_node.
3492 (tinfo_base_init): Create a POINTER_PLUS_EXPR
3493 instead of PLUS_EXPR for pointers.
3494 * except.c (expand_start_catch_block): Do a
3495 NEGATIVE and then a POINTER_PLUS_EXPR instead
3497 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
3498 PLUS_EXPR on pointer types over to use
3499 POINTER_PLUS_EXPR and remove the conversion
3500 to the pointer types.
3501 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
3502 adding to a pointer type. Use size_int instead of
3503 ssize_int. Convert the index to sizetype before
3504 adding it to the pointer.
3506 2007-06-15 Mark Mitchell <mark@codesourcery.com>
3508 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
3509 (DECL_ANON_UNION_VAR_P): New macro.
3510 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
3511 than DECL_VAR_MARKED_P, to keep track of which variables we have
3513 * decl.c (redeclaration_error_message): Complain about redeclaring
3514 anonymous union members at namespace scope.
3515 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
3517 2007-06-14 Geoff Keating <geoffk@apple.com>
3519 * decl2.c (determine_visibility): Ensure that functions with
3520 hidden types as parameters are hidden.
3523 * decl2.c (determine_visibility): Remove duplicate code for
3526 2007-06-12 Ian Lance Taylor <iant@google.com>
3529 * init.c (avoid_placement_new_aliasing): New static function.
3530 (build_new_1): Call it.
3532 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
3534 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
3535 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
3537 2007-06-08 Jakub Jelinek <jakub@redhat.com>
3540 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
3541 on init, the non-decl cond operand and increment value.
3543 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
3546 * decl.c (check_initializer): Report an error when a brace enclosed
3547 initializer is used for a non-aggregate type in C++98.
3548 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
3550 (grokdeclarator): Likewise.
3551 (move_fn_p): Likewise.
3552 * typeck.c (check_return_expr): Likewise.
3553 * call.c (reference_binding): Likewise.
3554 * error.c (cp_cpp_error): Likewise.
3555 * pt.c (check_default_tmpl_args): Likewise.
3557 * lex.c (init_reswords): Likewise.
3558 * parser.c (p_parser_primary_expression): Likewise.
3559 (TOKEN_PRECEDENCE): Likewise.
3560 (cp_parser_init_declarator): Likewise.
3561 (cp_parser_ptr_operator): Likewise.
3562 (cp_parser_parameter_declaration): Likewise.
3563 (cp_parser_enclosed_template_argument_list): Likewise.
3564 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
3565 (cp_parser_next_token_ends_template_argument_p): Likewise.
3567 2007-06-04 Simon Baldwin <simonb@google.com>
3569 * decl.c (grokdeclarator): Readability change. Moved case labels
3570 into direct switch statement scope.
3572 2007-06-04 Paolo Carlini <pcarlini@suse.de>
3574 * call.c (convert_like_real): Remove pointless code.
3576 2007-05-31 Mark Mitchell <mark@codesourcery.com>
3578 * decl.c (get_atexit_fn_ptr_type): New function.
3579 (get_atexit_node): Use it.
3580 (start_cleanup_fn): Likewise.
3581 (register_dtor_fn): Use the object's destructor, instead of a
3582 separate cleanup function, where possible.
3583 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
3584 (atexit_fn_ptr_type_node): New macro.
3585 * decl2.c (build_cleanup): Use build_address.
3587 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
3589 * typeck.c (build_binary_op): Include types in error.
3591 2007-05-31 Jakub Jelinek <jakub@redhat.com>
3594 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
3595 needs runtime initialization.
3597 2007-05-31 Paolo Carlini <pcarlini@suse.de>
3600 * semantics.c (finish_trait_expr): Complete the types.
3602 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
3603 Douglas Gregor <doug.gregor@gmail.com>
3604 Pedro Lamarao <pedro.lamarao@mndfck.org>
3605 Howard Hinnant <howard.hinnant@gmail.com>
3609 * typeck.c (comptypes): Don't consider rvalue and lvalue
3610 reference types to be equivalent.
3611 (check_return_expr): Move from certain lvalues when returning
3613 * decl.c (grokdeclarator): Implement reference collapsing.
3614 (copy_fn_p): Don't consider constructors taking rvalue references
3615 to be copy constructors.
3617 * call.c (conversion): New "rvaluedness_matches_p" member.
3618 (convert_class_to_reference): Require reference type as first
3619 parameter instead of base type.
3620 (reference_binding): Add logic to handle rvalue references.
3621 (implicit_conversion): Update inaccurate comment.
3622 (convert_like_real): Disable creation of temporaries that are
3623 impossible to initialize for types with move constructors.
3624 (build_over_call): Elide move constructors when possible.
3625 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
3626 (maybe_handle_ref_bind): Return conversion instead of type node.
3627 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
3628 determine preferred conversion sequences.
3629 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
3630 (LOOKUP_PREFER_RVALUE): New.
3631 (DECL_MOVE_CONSTRUCTOR_P): New.
3632 (struct cp_declarator): Add "reference" member for reference
3633 types, with new "rvalue_ref" flag.
3634 (cp_build_reference_type): Declare.
3635 (move_fn_p): Declare.
3636 * error.c (dump_type_prefix): Format rvalue reference types
3637 correctly in error messages.
3638 * except.c (build_throw): Move from certain lvalues when
3640 * mangle.c (write_type): Mangle rvalue references differently
3641 than regular references.
3642 * parser.c (make_reference_declarator): Add boolean parameter for
3644 (cp_parser_make_indirect_declarator): New.
3645 (cp_parser_new_declarator_opt): Call
3646 cp_parser_make_indirect_declarator.
3647 (cp_parser_conversion_declarator_opt): Ditto.
3648 (cp_parser_declarator): Ditto.
3649 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
3651 * pt.c (tsubst): Implement reference collapsing.
3652 (maybe_adjust_types_for_deduction): Implement special template
3653 parameter deduction rule for rvalue references.
3654 (type_unification_real): Update calls to
3655 maybe_adjust_types_for_deduction.
3656 (try_one_overload): Ditto.
3657 (unify_pack_expansion): Ditto.
3658 * tree.c (lvalue_p_1): Handle rvalue reference types.
3659 (cp_build_reference_type): New.
3661 2007-05-30 Jakub Jelinek <jakub@redhat.com>
3664 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
3665 variables that need runtime initialization.
3667 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
3670 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
3671 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
3672 case POSTDECREMENT_EXPR>): Return the error_mark_node
3673 if either the real or imaginary parts would an
3676 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
3677 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3680 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
3681 token is a closing brace, false if there are no tokens left.
3682 (cp_parser_namespace_alias_definition): Only consume the next token if
3683 it is a closing brace.
3685 * parser.c (cp_parser_class_specifier): Likewise.
3687 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
3689 * semantics.c (finish_member_declaration): Fix a typo in the
3692 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
3704 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
3705 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
3706 * pt.c (check_for_bare_parameter_packs): Return bool indicated
3707 whether everything was okay. Fix indentation.
3708 (push_template_decl_real): Check for bare parameter packs in
3709 function parameters; where errors occur, mark the parameter types
3710 with ERROR_MARK_NODEs to avert ICEs.
3711 (coerce_template_parameter_pack): New.
3712 (coerce_template_parms): Moved parameter pack coercion into
3713 coerce_template_parameter_pack, and permit it anywhere in the
3714 template parameter list (not just at the end). Parameter and
3715 argument indices can vary (somewhat) separately now, so add
3716 PARM_IDX and ARG_IDX.
3717 (fn_type_unification): Don't set an argument pack as incomplete if
3718 no argument pack was deduced.
3719 (type_unification_real): If a type parameter is a parameter pack
3720 and has not otherwise been deduced, it will be deduced to an empty
3722 (more_specialized_fn): Use the actual lengths of the argument
3723 lists when comparing against expansions.
3724 * semantics.c (finish_member_declaration): If a field's type has
3725 bare parameter packs, error and set its type to ERROR_MARK_NODE.
3727 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
3730 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
3732 2007-05-22 Ollie Wild <aaw@google.com>
3734 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
3735 (unqualified_namespace_lookup): Adds check for hidden types.
3737 2007-05-22 Ollie Wild <aaw@google.com>
3739 * decl.c (duplicate_decls): Verify namespace names are unique.
3741 2007-05-21 Mark Mitchell <mark@codesourcery.com>
3743 * decl.c (cxx_maybe_build_cleanup): Handle
3744 __attribute__((cleanup)).
3746 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3748 * cvt.c (cp_convert_and_check): Don't check warnings if the
3751 2007-05-18 Geoffrey Keating <geoffk@apple.com>
3753 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
3755 2007-05-14 Paolo Carlini <pcarlini@suse.de>
3758 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
3759 type only if is a class type (5.2.8/4).
3761 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
3763 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
3764 * decl.c (grokdeclarator): Use unsigned_type_for instead of
3765 c_common_unsigned_type.
3767 2007-05-11 Silvius Rus <rus@google.com>
3769 * typeck.c (build_indirect_ref): Add call to
3770 strict_aliasing_warning.
3771 (build_reinterpret_cast_1): Condition call to
3772 strict_aliasing_warning.
3774 2007-05-11 Jan Hubicka <jh@suse.cz>
3776 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
3777 * decl2.c (start_objects): ctors and dtors are no longer public.
3778 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
3780 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
3782 * typeck.c (build_unary_op): Remove code that used to
3783 handle non lvalue increments/decrements.
3785 2007-05-07 Mike Stump <mrs@apple.com>
3787 * parser.c (check_empty_body): Add.
3788 (cp_parser_iteration_statement): Add call to check_empty_body.
3790 2007-05-05 Geoffrey Keating <geoffk@apple.com>
3793 * mangle.c (write_mangled_name): Mangle static variable names.
3794 (write_unqualified_name): Use local-source-name for
3795 namespace-scope static variables.
3797 2007-05-04 Dirk Mueller <dmueller@suse.de>
3799 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
3802 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
3805 * decl2.c (constrain_class_visibility):
3806 Use strip_pointer_or_array_types instead of strip_array_types.
3808 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
3811 * decl.c (reshape_init_r): Don't reshape the first element if it
3812 is a pointer to member function.
3814 2007-04-27 Simon Baldwin <simonb@google.com>
3816 * decl.c (grokparms): Changed message format from %qD to %qE.
3818 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
3820 * error.c (maybe_warn_variadic_templates): Variadic templates are
3821 now in C++0x, so only warn about them in C++98 mode.
3823 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
3826 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
3827 integeral types from vectors types.
3829 2007-04-26 Jakub Jelinek <jakub@redhat.com>
3832 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
3833 for type dependent OMP_CLAUSE_DECLs.
3835 2007-04-24 Mark Mitchell <mark@codesourcery.com>
3838 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
3839 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
3840 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
3841 * init.c (build_zero_init): Adjust, as
3842 COMPLEX_TYPE is now a SCALAR_TYPE.
3843 * typeck2.c (digest_init): Allow brace-enclosed initializers for
3844 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
3846 2007-04-25 Paolo Carlini <pcarlini@suse.de>
3848 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
3849 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
3850 (trait_expr_value): Adjust.
3852 2007-04-23 Simon Baldwin <simonb@google.com>
3854 * decl.c (grokparms): Added new error for duplicate function
3855 parameters names in function prototypes, to match gcc behavior.
3857 2007-04-23 Jan Hubicka <jh@suse.cz>
3859 * decl2.c (finish_objects): Do not call target constructor/destructor
3862 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
3864 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
3865 instead of checking GIMPLE_STMT_P in chain_next.
3867 2007-04-17 Mark Mitchell <mark@codesourcery.com>
3870 * call.c (convert_for_arg_passing): Convert bitfields to their
3873 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
3876 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
3878 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
3881 * decl2.c (constrain_class_visibility):
3882 Do not warn about the use of anonymous namespace in the main input file.
3884 2007-04-15 Mark Mitchell <mark@codesourcery.com>
3886 * cp-tree.h (current_template_parms): Fix typo in comment.
3888 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
3890 * cp-tree.h, error.c: Fix comment typos.
3892 2007-04-13 Jason Merrill <jason@redhat.com>
3895 * call.c (reference_binding): Add c_cast_p parm. If true,
3896 add quals to TO as needed to make it reference-compatible.
3898 2007-04-11 Jan Hubicka <jh@suse.cz>
3900 * class.c (convert_to_base_statically): Fold produced tree; verify
3901 that we are not processing template_decl.
3903 2007-04-09 Mark Mitchell <mark@codesourcery.com>
3906 * class.c (build_base_path): Ensure that the converted pointer has
3907 the same cv-qualification as the input.
3909 2007-04-09 Paolo Carlini <pcarlini@suse.de>
3911 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
3913 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
3915 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
3917 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
3918 * tree.c (cp_add_pending_fn_decls): Remove.
3919 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
3921 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
3923 Revert change removing staticp.
3925 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
3927 * cp-objcp-common.c (cxx_staticp): Remove.
3928 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
3929 * cp-tree.h (cxx_staticp):
3931 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
3933 * class.c (check_for_override): Don't remove dllmport attribute
3936 2007-04-03 Jakub Jelinek <jakub@redhat.com>
3939 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
3940 type issue error and return early.
3942 2007-03-30 Jason Merrill <jason@redhat.com>
3945 * typeck.c (cp_type_readonly): New fn.
3946 * cp-tree.h: Declare it.
3947 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
3948 (cp_finish_decl): Not here.
3950 2007-03-31 Richard Guenther <rguenther@suse.de>
3952 * optimize.c (maybe_clone_body): Replace splay-tree usage by
3955 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
3960 * parser.c (declarator_can_be_parameter_pack): New.
3961 (cp_parser_template_parameter): Only parse the `...' if the
3962 declarator can be a parameter pack.
3963 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
3965 * pt.c (find_parameter_packs_r): Look into the bounds on integer
3966 types (they could be used as array bounds).
3967 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
3968 (tsubst_pack_expansion): Handle failure to expand parameter
3971 2007-03-30 Paolo Carlini <pcarlini@suse.de>
3974 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
3975 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
3976 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
3977 (CLASS_TYPE_NON_UNION_P): Add.
3978 (struct lang_type_class): Add has_complex_dflt.
3979 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
3980 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
3981 * cp-tree.def: Add TRAIT_EXPR.
3982 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
3983 * lex.c (struct resword): Add __has_nothrow_assign,
3984 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
3985 __has_trivial_constructor, __has_trivial_copy,
3986 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
3987 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
3988 __is_pod, __is_polymorphic, __is_union.
3989 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
3990 (cp_parser_trait_expr): New.
3991 * semantics.c (finish_trait_expr, trait_expr_value
3992 classtype_has_nothrow_copy_or_assign_p): New.
3993 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
3995 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
3996 * class.c (check_bases, check_field_decl, check_bases_and_members):
3997 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
3998 * pt.c (uses_template_parms, tsubst_copy_and_build,
3999 value_dependent_expression_p, type_dependent_expression_p): Deal with
4001 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
4003 2007-03-29 Richard Guenther <rguenther@suse.de>
4005 * tree.c (cp_walk_subtrees): Do not set input_location.
4007 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
4010 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
4013 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
4015 * parser.c (struct cp_parser): Update comment for
4016 greater_than_is_operator_p.
4017 (cp_parser_primary_expression): In C++0x mode, a cast operator can
4018 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
4019 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
4020 !GREATER_THAN_IS_OPERATOR_P.
4021 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
4022 `>>' operators that will become two `>' tokens in C++0x.
4023 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
4024 mode, allowing it to terminate default arguments.
4025 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
4026 `>>' like two consecutive `>' tokens.
4027 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
4028 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
4029 ends a template argument.
4031 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
4033 * decl.c (redeclaration_error_message): Complain when redeclaring
4034 a friend function with default template arguments (C++0x mode only).
4035 * cp-tree.h (check_default_tmpl_args): Declare.
4036 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
4037 template arguments in function templates. Add support for checking
4038 the default template arguments of friend templates.
4039 (push_template_decl_real): Fix call to check_default_tmpl_args.
4040 (type_unification_real): If a template parameter has not been
4041 deduced but provides a default template argument, substitute into
4042 that default template argument.
4043 * parser.c (cp_parser_init_declarator): When declaring (but not
4044 defining!) a function template in C++0x mode, check for default
4047 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
4050 * decl.c (grokdeclarator): Deal with cv-qualified function type
4051 typedefs in the same way for member and non-member functions.
4053 2007-03-26 Dirk Mueller <dmueller@suse.de>
4055 * parser.c (cp_parser_member_declaration): Pedwarn
4056 about stray semicolons after member declarations.
4058 2007-03-26 Paolo Carlini <pcarlini@suse.de>
4061 * pt.c (instantiate_decl): Set in_system_header.
4063 2007-03-22 Mark Mitchell <mark@codesourcery.com>
4065 * cp-tree.h (current_tempalte_parms): Improve documentation.
4066 * pt.c (current_template_args): Likewise.
4069 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
4070 not consume tokens when failing.
4072 2007-03-22 Jim Wilson <wilson@specifix.com>
4073 Mark Mitchell <mark@codesourcery.com>
4076 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
4077 consistent with FROM.
4079 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4081 * error.c (dump_expr): Handle dependent names that designate types.
4082 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
4084 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
4086 * cp-tree.def, parser.c, pt.c: Fix comment typos.
4088 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4090 * cvt.c (cp_convert_and_check) : Define.
4091 * cp-tree.h (cp_convert_and_check): Declare.
4092 * call.c (convert_conversion_warnings): Rename to
4093 conversion_null_warnings. The warning for floating-point to
4094 integer is handled by convert_and_check in convert_like_real.
4095 (convert_like_real): convert_conversion_warnings was renamed as
4096 conversion_null_warnings.
4097 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
4098 overflow and changes of value during conversion.
4100 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4103 * parser.c (cp_parser_statement): If 'namespace' is found, this
4104 only can be a namespace alias definition, so parse it now.
4105 (cp_parser_namespace_alias_definition): if we find an open brace
4106 instead of '=', then this is actually a misplaced namespace
4109 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4112 * decl.c (cxx_init_decl_processing): Move command-line options
4113 processing to c-opts.c.
4115 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
4117 * ptree.c (cxx_print_type): Use formatting markup for integers
4118 when printing template parameter index/level/orig level.
4119 (cxx_print_xnode): Ditto.
4120 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
4121 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
4122 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
4124 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
4125 rather than a HOST_WIDE_INT.
4126 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
4127 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
4129 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
4130 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
4131 IN_BASE_INITIALIZER bool bitfields.
4132 (struct cp_declarator): Make KIND a 4-bit field. Make
4133 PARAMETER_PACK_P a bool bitfield just after KIND.
4134 * pt.c (uses_parameter_packs): Destroy the pointer set.
4135 (make_pack_expansion): Ditto.
4136 (check_for_bare_parameter_packs): Ditto.
4137 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
4139 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
4142 * call.c (convert_default_arg): Instead of copying the node,
4145 2007-03-15 Dirk Mueller <dmueller@suse.de>
4148 * call.c (convert_conversion_warnings): New..
4149 (convert_like_real): .. factored out from here.
4150 (convert_conversion_warnings): Add warning about
4151 false being converted to NULL in argument passing.
4153 2007-03-14 Dirk Mueller <dmueller@suse.de>
4155 * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
4156 (finish_do_body): Warn about empty body in do/while statement.
4158 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4160 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
4162 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4165 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
4168 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
4170 * repo.c (init_repo): Initialize random_seed saved options.
4171 (finish_repo): Adjust.
4173 2007-03-13 Mark Mitchell <mark@codesourcery.com>
4176 * Make-lang.in (doc/g++.1): Use $< to specify the location from
4179 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
4181 * decl.c (compute_array_index_type): New warning flag warn_vla.
4183 2007-03-12 Mark Mitchell <mark@codesourcery.com>
4186 * call.c (convert_default_arg): Copy non-constant arguments.
4188 2007-03-11 Mark Mitchell <mark@codesourcery.com>
4191 * parser.c (cp_parser_postfix_expression): Disallow compound
4192 literals in constant expressions.
4195 * semantics.c (finish_typeof): Use unlowered_expr_type.
4197 2007-03-10 Mark Mitchell <mark@codesourcery.com>
4200 * cp-tree.h (unlowered_expr_type): New function.
4201 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
4202 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
4203 (unlowered_expr_type): New function.
4204 (build_unary_op): Disallow predecrements of bool bitfields.
4205 * call.c (build_conditional_expr): Use unlowered_expr_type.
4206 * pt.c (type_unification_real): Likewise.
4208 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
4211 * typeck.c (check_return_expr): Check for bare parameter packs.
4212 (comptypes): Compare template parameter packs and
4213 type pack expansions.
4214 * decl.c (grokdeclarator): Deal with the declaration of function
4216 (grokparms): Verify that the (optional) function parameter pack is
4217 at the end of the parameter list.
4218 (xref_basetypes): Handle pack expansions in the base class.
4219 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
4220 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
4221 (NONTYPE_ARGUMENT_PACK): New.
4222 (TYPE_PACK_EXPANSION): New.
4223 (EXPR_PACK_EXPANSION): New.
4224 (ARGUMENT_PACK_SELECT): New.
4225 * cp-objcp-common.c (cp_tree_size): Compute size of
4226 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
4227 ARGUMENT_PACK_SELECT.
4228 * error.c (dump_template_argument): Print template argument packs.
4229 (dump_template_argument_list): Ditto.
4230 (dump_template_parameter): Dump `...' for template type parameter
4232 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
4233 (dump_parameters): Print function parameter packs.
4234 (dump_template_parms): Print template argument packs.
4235 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
4236 (maybe_warn_variadic_templates): New.
4237 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
4238 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
4239 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
4241 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
4242 (write_template_arg): Write argument packs as separate arguments.
4243 * cp-tree.h (struct template_parm_index_s): Add flag that
4244 indicates that the template parameter is actually a parameter
4246 (struct tree_argument_pack_select): New.
4247 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
4248 (union lang_tree_node): Add argument_pack_select.
4249 (FUNCTION_PARAMETER_PACK_P): New.
4250 (PACK_EXPANSION_P): New.
4251 (PACK_EXPANSION_PATTERN): New.
4252 (SET_PACK_EXPANSION_PATTERN): New.
4253 (PACK_EXPANSION_PARAMETER_PACKS): New.
4254 (ARGUMENT_PACK_P): New.
4255 (ARGUMENT_PACK_ARGS): New.
4256 (SET_ARGUMENT_PACK_ARGS): New.
4257 (ARGUMENT_PACK_INCOMPLETE_P): New.
4258 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
4259 (TEMPLATE_PARM_PARAMETER_PACK): New.
4260 (TEMPLATE_TYPE_PARAMETER_PACK): New.
4261 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
4262 (ARGUMENT_PACK_SELECT_INDEX): New.
4263 (ARGUMENT_PACK_SELECT_ARG): New.
4264 (struct cp_declarator): Add parameter_pack_p flag.
4265 (maybe_warn_variadic_templates): Declare.
4266 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
4267 indicate a template parameter pack.
4268 (uses_parameter_packs): Declare.
4269 (template_parameter_pack_p): Declare.
4270 (template_parms_variadic_p): Declare.
4271 (make_pack_expansion): Declare.
4272 (check_for_bare_parameter_packs): Declare.
4273 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
4274 sizeof... expressions.
4275 (pp_cxx_expression): Print pack expansions and non-type argument
4277 (pp_cxx_exception_specification): Print pack expansions.
4278 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
4279 (pp_cxx_ctor_initializer): Print pack expansions.
4280 (pp_cxx_type_id): Print pack expansions.
4281 (pp_cxx_template_argument_list): Print argument packs.
4282 (pp_cxx_template_parameter): Print ellipsis for template parameter
4284 * pt.c (comp_template_parms): Compare template parameter packs.
4285 (template_parameter_pack_p): New.
4286 (template_parms_variadic_p): New.
4287 (template_args_variadic_p): New.
4288 (make_ith_pack_parameter_name): New.
4289 (struct find_parameter_pack_data): New.
4290 (find_parameter_packs_r): New.
4291 (uses_parameter_packs): New.
4292 (make_pack_expansion): New.
4293 (check_for_bare_parameter_packs): New.
4294 (expand_template_argument_pack): New.
4295 (reduce_template_parm_level): Propagate parameter pack flag.
4296 (process_template_parm): Add is_parameter_pack parameter to state
4297 when the parameter is actually a parameter pack. Create template
4298 parameter packs when is_parameter_pack is true.
4299 (current_template_args): The argument for a template parameter
4300 pack is an argument pack containing a single pack expansion.
4301 (process_partial_specialization): When checking that non-type
4302 argument expressions do not involve template parameters, loop over
4303 the arguments in argument packs separately.
4304 (push_template_decl_real): Check that the type of the declaration
4305 does not have any bare parameter packs. Check that primary
4306 templates have no more than one parameter pack, and that it comes
4307 at the end of the template parameter list.
4308 (convert_template_argument): Handle coercions for pack expansion
4309 expressions by coercing the pattern then rebuilding the expansion.
4310 (coerce_template_parms): When coercing the arguments for a
4311 variadic template, pack "extra" arguments into an argument pack.
4312 (coerce_template_template_parms): Cannot coerce between parameter
4313 packs and non-pack parameters.
4314 (template_args_equal): Compare PACK_EXPANSION_P expressions.
4315 (comp_template_args): Expand all template arguments packs before
4316 comparing template argument lists.
4317 (mangle_class_name_for_template): Make argument packs as separate
4319 (for_each_template_parm_r): No need to handle BASELINK.
4320 (instantiate_class_template): Handle pack expansions in the base
4322 (tsubst_pack_expansion): New.
4323 (tsubst_template_args): Handle substitutions of argument packs and
4324 pack expansion into template argument lists.
4325 (tsubst_decl): Expand function parameter packs into separate
4326 function parameters.
4327 (tsubst_arg_types): Expand a type pack expansion into separate
4329 (tsubst_exception_specification): Handle pack expansions in
4330 exception specifiers.
4331 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
4332 replacing a template parameter with its argument. If we encounter
4333 a substitution for an argument pack, just return the parameter
4335 (tsubst_copy): sizeof(X...) returns the number of elements in
4336 parameter pack X. See through ARGUMENT_PACK_SELECT when the
4337 PARM_DECL is a parameter pack.
4338 (tsubst_expr): Expression pack expansions and argument packs
4339 cannot show up here; they will all be handled through function
4340 calls, sizeof, and template argument lists.
4341 (tsubst_copy_and_build): sizeof(X...) returns the number of
4342 elements in parameter pack X. Handle pack expansions in TREE_LIST
4343 and CONSTRUCTOR nodes.
4344 (fn_type_unification): Handle "incomplete" explicit template
4345 argument lists that specify some of the arguments for a template
4347 (type_unification_real): Unify arguments against pack expansions.
4348 (template_parm_level_and_index): New, helper function.
4349 (unify_pack_expansion): New.
4350 (unify): Unify argument packs on an argument-by-argument basis,
4351 handling variadic argument packs as well.
4352 (more_specialized_fn): Handle unification of function parameter
4353 packs. All things being equal, prefer non-variadic function
4354 templates to variadic function templates.
4355 (more_specialized_class): Prefer the variadic class template
4356 partial specialization that binds fewer arguments to a parameter
4358 (regenerate_decl_from_template): Expand function parameter packs
4359 into separate parameters.
4360 (instantiate_decl): Ditto.
4361 (tsubst_initializer_list): Handle pack expansions for base-class
4363 (dependent_type_p_r): Determine dependent types in argument packs
4364 and pack expansions.
4365 (value_dependent_expression_p): Determine value-dependence of
4366 non-type argument packs.
4367 (dependent_template_arg_p): Handle argument packs.
4368 * semantics.c (finish_cond): Check for bare parameter packs.
4369 (finish_expr_stmt): Ditto.
4370 (finish_for_expr): Ditto.
4371 (finish_switch_cond): Ditto.
4372 (finish_mem_initializers): Ditto.
4373 * name-lookup.c (arg_assoc_type): Handle pack expansions and
4375 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
4376 * parser.c (make_declarator): Declarator is not an expansion.
4377 (make_pointer_declarator): Transfer parameter pack flag to outer
4379 (make_reference_declarator): Ditto.
4380 (make_ptrmem_declarator): Ditto.
4381 (make_call_declarator): Ditto.
4382 (make_array_declarator): Ditto.
4383 (cp_parser_postfix_expression): Allow pack expansion expressions
4384 in the argument list for a call expression.
4385 (cp_parser_parenthesized_expression_list): Add new parameter
4386 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
4387 into separate arguments."
4388 (cp_parser_new_placement): Allow pack expansion expressions.
4389 (cp_parser_new_initializer): Ditto.
4390 (cp_parser_mem_initializer_list): Allow ellipsis to create a
4391 base-class initializer expansion.
4392 (cp_parser_mem_initializer): Ditto.
4393 (cp_parser_template_parameter_list): Keep track of whether the
4394 template parameter is a template parameter pack.
4395 (cp_parser_template_parameter): Parse the ellipsis to indicate a
4396 template parameter pack.
4397 (cp_parser_type_parameter): Ditto.
4398 (cp_parser_template_argument_list): Parse the ellipsis to indicate
4400 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
4401 this declarator is a parameter pack.
4402 (cp_parser_parameter_declaration): The ellipsis does not end the
4403 parameter declaration, because it might be a parameter pack. Parse
4404 the ellipsis to indicate a parameter pack.
4405 (cp_parser_initializer): Allow pack expansions.
4406 (cp_parser_initializer_list): Allow ellipsis to create an
4407 initializer expansion.
4408 (cp_parser_base_clause): Allow ellipsis to create a base specifier
4410 (cp_parser_type_id_list): Allow ellipsis to create an exception
4411 specifier expansion.
4412 (cp_parser_attribute_list): Don't allow pack expansions.
4413 (cp_parser_functional_cast): Allow pack expansions.
4414 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
4415 compute the length of a parameter pack.
4416 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
4417 end a template argument.
4418 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
4419 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
4422 2007-03-09 Dirk Mueller <dmueller@suse.de>
4424 * call.c (build_new_op): Call warn_logical_operator.
4426 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
4429 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
4432 * pt.c (any_template_arguments_need_structural_equality_p):
4435 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
4437 * decl.c (grokdeclarator): Disable warnings for anonymous
4440 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
4442 * typeck2.c (readonly_error): Always emit a hard error.
4443 Remove last argument.
4444 * cp-tree.h (readonly_error): Adjust prototype.
4445 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
4446 * typeck.c (build_unary_op): Likewise.
4447 (build_modify_expr): Likewise.
4449 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
4452 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
4454 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4457 * parser.c (struct cp_parser): New IN_IF_STMT.
4458 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
4459 returning if parsing the body of an 'if' statement or issuing an
4460 error and continuing.
4461 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
4463 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
4465 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
4468 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
4471 2007-03-02 Geoffrey Keating <geoffk@apple.com>
4473 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
4474 Objective-C++. Don't exit early if -shared-libgcc needs to be
4477 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4479 * typeck.c (common_base_type): Delete unused function.
4481 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
4483 * Make-lang.in: Add dummy lang.install-pdf target.
4485 2007-03-01 Simon Baldwin <simonb@google.com>
4488 * decl.c (check_tag_decl): Added new warning for typedef ignored
4489 when it precedes an otherwise valid non-typedef declaration.
4491 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
4493 * typeck.c (build_function_call): Store converted arguments
4494 in a stack-allocated array instead of building a list.
4495 (convert_arguments): Store arguments in the array passed in as an
4496 argument, and return the actual number of arguments.
4497 * call.c (build_call): Delete, and replace with...
4498 (build_call_n, build_call_a): New.
4499 (build_op_delete_call): Rewrite to avoid constructing argument lists.
4500 (build_over_call): Store converted arguments in a stack-allocated
4501 array instead of building a list.
4502 (build_cxx_call): Pass arguments in an array instead of as a list.
4503 (build_java_interface_fn_ref): Rewrite to avoid constructing
4505 * tree.h: Update declarations to reflect above changes.
4506 * method.c (use_thunk): Use a stack-allocated array to hold
4507 the arguments instead of a list.
4508 * rtti.c (throw_bad_cast): Update call to cxx_call.
4509 (throw_bad_typeid): Likewise.
4510 (build_dynamic_cast_1): Likewise.
4511 * init.c (build_builtin_delete_call): Use build_call_n.
4512 * decl.c (expand_static_init): Likewise.
4513 * except.c (cp_protect_cleanup_actions): Likewise.
4514 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
4515 (gimplify_must_not_throw_expr): Likewise.
4516 (cxx_omp_apply_fn): Use build_call_a.
4518 2007-02-26 Mark Mitchell <mark@codesourcery.com>
4520 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
4521 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
4523 2007-02-25 Mark Mitchell <mark@codesourcery.com>
4525 * cp-tree.h (static_ctors): Remove.
4526 * cp-tree.h (static_dtors): Likewise.
4527 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
4528 refactoring of tree_map hierarchy.
4529 (decl_shadowed_for_var_insert): Likewise.
4530 * semantics.c (expand_body): Use c_expand_body.
4531 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
4532 * decl2.c (static_ctors): Remove.
4533 (static_dtors): Likewise.
4534 (generate_ctor_or_dtor_function): Pass NULL_TREE to
4535 objc_generate_static_init_call. Do not call static_[cd]tors.
4536 (generate_ctor_and_dtor_functions_for_priority): Do not check for
4538 (cp_write_global_declarations): Likewise.
4540 2007-02-23 Richard Guenther <rguenther@suse.de>
4542 * class.c (note_name_declared_in_class): Make declaration
4543 changes meaning a pedwarn.
4545 2007-02-22 Michael Matz <matz@suse.de>
4548 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
4549 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
4550 dump_function_decl): Guard emitting outer scopes by new flag.
4551 * cp-lang.c (cxx_dwarf_name): New function.
4552 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
4553 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
4555 (push_template_decl_real, lookup_template_class): Remove calls
4558 2007-02-19 Mark Mitchell <mark@codesourcery.com>
4560 * call.c (build_new_method_call): Ensure that explicit calls of
4561 destructors have type "void".
4563 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4565 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
4566 and -Walways-true with -Waddress.
4567 * cvt.c (convert_to_void): Replace unconditional warning with
4570 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
4572 * decl.c, tree.c: Fix comment typos.
4574 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
4577 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
4578 statement expression if we had an error mark node.
4580 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
4581 Brooks Moses <brooks.moses@codesourcery.com>
4582 Lee Millward <lee.millward@codesourcery.com>
4584 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
4585 Change class to tcc_vl_exp.
4587 * call.c (build_call): Use build_call_list instead
4589 (build_over_call): Likewise.
4590 (build_new_method_call): Use build_min_non_dep_call_list
4591 instead of build_min_non_dep.
4593 * error.c (dump_call_expr_args): New function.
4594 (dump_aggr_init_expr_args): New function.
4595 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
4596 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
4598 * cvt.c (convert_to_void): Use build_call_array instead
4599 of build3; use new AGGR_INIT_EXPR accessor macros.
4601 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
4602 instead of TREE_CODE_LENGTH.
4604 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
4605 AGGR_INIT_EXPR accessor macros.
4607 * cp-gimplify.c (cp_gimplify_init_expr): Use
4608 AGGR_INIT_EXPR_SLOT to set the slot operand.
4610 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
4611 (AGGR_INIT_EXPR_SLOT): New macro.
4612 (AGGR_INIT_EXPR_ARG): New macro.
4613 (aggr_init_expr_nargs): New macro.
4614 (AGGR_INIT_EXPR_ARGP): New macro.
4615 (aggr_init_expr_arg_iterator): New.
4616 (init_aggr_init_expr_arg_iterator): New.
4617 (next_aggr_init_expr_arg): New.
4618 (first_aggr_init_expr_arg): New.
4619 (more_aggr_init_expr_args_p): New.
4620 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
4621 (stabilize_aggr_init): New declaration.
4622 (build_min_non_dep_call_list): Likewise.
4624 * tree.c (process_aggr_init_operands): New function.
4625 (build_aggr_init_array) New function.
4626 (build_cplus_new): Update to use new CALL_EXPR and
4627 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
4628 build_aggr_init_array.
4629 (build_min_non_dep_call_list) New function.
4630 (build_min_nt): Assert input code parameter is not a variable
4631 length expression class.
4632 (build_min, build_min_non_dep): Likewise.
4633 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
4634 to check for equality instead of recursing. Handle tcc_vl_exp
4636 (stabilize_call): Update to only handle CALL_EXPRs, not
4637 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
4638 (stabilize_aggr_init): New function.
4639 (stabilize_init): Use it.
4641 * cxx-pretty-print.c (pp_cxx_postfix_expression)
4642 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
4643 AGGR_INIT_EXPR accessor macros and argument iterators.
4645 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
4646 build_vl_exp. Iterate through the operands, recursively
4647 processing each one.
4648 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
4649 CALL_EXPR accessor macros.
4650 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
4651 tree code classes. Use TREE_OPERAND_LENGTH instead of
4654 * semantics.c (finish_call_expr): Use build_nt_call_list
4655 instead of build_nt.
4656 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
4657 accessor macros. Use build_call_array to construct the
4658 CALL_EXPR node instead of build3
4660 * decl2.c (build_offset_ref_call_from_tree): Use
4661 build_nt_call_list and build_min_non_dep_call_list instead
4662 of build_min_nt and build_min_non_dep.
4664 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
4665 Use build_nt_call_list instead of build_min_nt.
4667 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4670 * call.c (build_conditional_expr): Improve error message.
4672 2007-02-13 Dirk Mueller <dmueller@suse.de>
4674 * friend.c (do_friend): Annotate warning about friend
4675 declarations in templates with OPT_Wnon_template_friend.
4676 Convert informal message from warning() to inform().
4678 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
4679 Mark Mitchell <mark@codesourcery.com>
4682 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
4683 instantiations for variables.
4685 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4688 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
4689 Check warn_unused_value just once.
4691 2007-02-11 Mark Mitchell <mark@codesourcery.com>
4694 * pt.c (determine_specialization): Use skip_artificial_parms_for.
4695 (fn_type_unificiation): Likewise.
4696 (get_bindings): Likewise.
4698 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
4701 * decl.c (finish_function): Use DECL_REPLACEABLE.
4702 * tree.c (cp_cannot_inline_tree_fn): Likewise.
4704 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
4706 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
4708 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
4710 * decl.c (grokvardecl): Don't error if !have_tls.
4711 (grokdeclarator): Likewise.
4712 * parser.c (cp_parser_omp_threadprivate): Likewise.
4714 2007-02-07 Jakub Jelinek <jakub@redhat.com>
4717 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
4718 parameters and result decls in omp clauses.
4719 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
4722 2007-02-05 Dirk Mueller <dmueller@suse.de>
4725 * parser.c (cp_parser_class_specifier): Always initialize bases.
4727 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
4729 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
4730 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
4731 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
4733 * semantics.c (finish_omp_atomic): Store a whole expression node
4734 in operand 1, and integer_zero_node in operand 0, for dependent
4735 OMP_ATOMIC. Rewrite to make flow easier to understand.
4737 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4739 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
4741 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
4743 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
4744 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
4746 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
4748 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
4749 keyword warning to -Wc++0x-compat.
4751 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4753 * decl.c (grokdeclarator): Update documentation.
4755 2007-02-02 Jakub Jelinek <jakub@redhat.com>
4758 * decl.c (grokdeclarator): If __thread is used together with
4759 a storage class other than extern and static, clear thread_p
4760 after issuing diagnostics and fall through to checking the
4763 2007-01-30 Roger Sayle <roger@eyesopen.com>
4765 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
4766 calculating the size of an array (to avoid recursive errors).
4768 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4771 * typeck.c (build_binary_op): Fix logic for warning. Move warning
4773 * call.c (convert_like_real): Don't warn when converting to
4776 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4778 * decl.c (pop_label): Replace warning with call to
4779 warn_for_unused_label.
4781 2007-01-28 Andrew Pinski <pinskia@gmail.com>
4784 * semantics.c (finish_pseudo_destructor_expr): Check the
4785 destrutor name by calling check_dtor_name.
4787 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
4789 * lex.c (D_CPP0X): Rename.
4791 (reswords): D_CPP0X -> D_CXX0X.
4792 (init_reswords): Ditto.
4793 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
4794 of C++0x keywords as identifiers.
4796 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
4799 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
4802 2007-01-23 Ian Lance Taylor <iant@google.com>
4804 * typeck.c (convert_for_assignment): Only warn about a = b = c
4805 when converting to bool.
4807 2007-01-23 Roger Sayle <roger@eyesopen.com>
4809 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
4811 * typeck.c (ignore_overflows): Remove the remaining uses of
4812 TREE_CONSTANT_OVERFLOW.
4814 2007-01-20 Jan Hubicka <jh@suse.cz>
4816 * decl2.c (start_objects, start_static_storage_duration_function):
4817 Do not make the functions uninlinable.
4819 2007-01-17 Ian Lance Taylor <iant@google.com>
4821 * class.c (add_method): Call VEC_reserve_exact rather than passing
4822 a negative size to VEC_reserve.
4824 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
4827 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
4829 2007-01-10 Mark Mitchell <mark@codesourcery.com>
4832 * decl.c (make_typename_type): If the qualified name is not a
4833 type, issue an error.
4834 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
4837 2007-01-08 Geoffrey Keating <geoffk@apple.com>
4839 * rtti.c: Include target.h.
4840 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
4841 don't emit typeinfo for fundamental types as weak.
4842 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
4844 2007-01-08 Richard Guenther <rguenther@suse.de>
4846 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
4848 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
4850 * call.c (standard_conversion): Pass flag to
4851 vector_types_convertible_p to disallow emission of note.
4852 * typeck.c (convert_for_assignment): Pass flag to
4853 vector_types_convertible_p to allow emission of note.
4854 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
4855 to disallow emission of note.
4857 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4860 * typeck.c (build_binary_op): Call overflow_warning if
4861 TREE_OVERFLOW_P is true for the result and not for any of the
4864 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
4867 * class.c (add_method): Don't wait until template
4868 instantiation time to complain about duplicate methods.
4870 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4873 * semantics.c (finish_unary_op_expr): Warn only if result
4874 overflowed and operands did not.
4876 2007-01-05 Ian Lance Taylor <iant@google.com>
4878 * typeck.c (build_binary_op): Warn about comparing a non-weak
4881 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
4883 * pt.c (tsubst): Propagate the need for structural equality checks
4884 when reducing the level of template parameters.
4886 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
4888 * pt.c: Fix a comment typo.
4890 2007-01-02 Ian Lance Taylor <iant@google.com>
4892 * semantics.c (maybe_convert_cond): Optionally warn when using an
4893 assignment as a condition.
4894 * typeck.c (convert_for_assignment): Optionally warn about
4895 assigning the result of an assignment to a bool.
4897 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
4899 * pt.c (canonical_template_parms): Correct typo in comment.
4901 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
4903 * typeck.c (structural_comptypes): Renamed from "comptypes".
4904 (comptypes): Use canonical type information to perform fast type
4905 comparison. When VERIFY_CANONICAL_TYPES, verify that the
4906 canonical type comparison returns the same results as we would see
4907 from the current, structural check. Support COMPARE_STRUCTURAL
4908 when we need structural checks.
4909 * decl.c (typename_compare): Fix comment.
4910 (build_typename_type): TYPENAME_TYPE nodes require structural
4911 equality checks, because they resolve different based on the
4913 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
4914 require structural equality checks (for now).
4915 (build_ptrmemfunc_type): Build the canonical pointer to member
4917 (compute_array_index_type): Whenever we build a new index type
4918 to represent the size of an array in a template, we need to mark
4919 this index type as requiring structural equality. This goes for
4920 arrays with value-dependent sizes with the current ABI, or all
4922 * tree.c (cplus_array_hash): New.
4923 (struct cplus_array_info): New.
4924 (cplus_array_compare): New.
4925 (cplus_array_htab): New.
4926 (build_cplus_array_type_1): Use a hash table to cache the array
4927 types we build. Build the canonical array type for each array
4929 (cp_build_qualified_type_real): When building a cv-qualified array
4930 type, use the hash table of array types and build canonical array
4932 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
4933 use structural equality (for now).
4934 * cp-tree.h (COMPARE_STRUCTURAL): New.
4935 * pt.c (canonical_template_parms): New.
4936 (canonical_type_parameter): New.
4937 (process_template_parm): Find the canonical type parameter.
4938 (lookup_template_class): When we have named the primary template
4939 type, set the canonical type for our template class to the primary
4940 template type. If any of the template arguments need structural
4941 equality checks, the template class needs structural equality
4943 (tsubst): When reducing the level of a template template
4944 parameter, we require structural equality tests for the resulting
4945 parameter because its template parameters have not had their types
4946 canonicalized. When reducing a template type parameter, find the
4947 canonical reduced type parameter.
4948 (any_template_arguments_need_structural_equality_p): New.