1 2008-04-30 Jakub Jelinek <jakub@redhat.com>
4 * pt.c (more_specialized_fn): Stop the loop even if there are no
5 arguments before ellipsis.
7 2008-04-29 Jakub Jelinek <jakub@redhat.com>
10 * parser.c (cp_parser_lookup_name): Look through single function
14 * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
15 COMPOUND_EXPR if the second argument would be error_mark_node.
17 2008-04-28 Jason Merrill <jason@redhat.com>
18 Liu Guanwei <liu_gw@163.com>
21 * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
24 2008-04-25 Jan Hubicka <jh@suse.cz>
26 * typeck.c (check_return_expr): Update.
27 * decl.c (start_preparsed_function): Update.
28 * method.c (use_thunk): Update.
30 2008-04-24 Jakub Jelinek <jakub@redhat.com>
33 * cp-tree.h (cp_reconstruct_complex_type): New prototype.
34 * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
35 * decl2.c (is_late_template_attribute): Only make vector_size
36 late tmpl attribute if argument is type or value dependent.
37 (cp_reconstruct_complex_type): New function.
39 2008-04-24 Richard Guenther <rguenther@suse.de>
41 * typeck.c (cp_build_function_call): Call
42 check_builtin_function_arguments.
44 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
46 * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
47 (build_ptrmemfunc1): Don't set TREE_INVARIANT.
48 * init.c (build_zero_init): Don't set TREE_INVARIANT.
49 * class.c (build_base_path): Don't set TREE_INVARIANT.
50 (build_vtbl_ref_1): Don't set TREE_INVARIANT.
51 (build_vtbl_initializer): Don't set TREE_INVARIANT.
52 * decl.c (build_enumerator): Don't set TREE_INVARIANT.
53 * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
54 (generic_initializer): Don't set TREE_INVARIANT.
55 (ptr_initializer): Don't set TREE_INVARIANT.
56 (ptm_initializer): Don't set TREE_INVARIANT.
57 (class_initializer): Don't set TREE_INVARIANT.
58 * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
59 * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
60 (build_template_parm_index): Don't set TREE_INVARIANT.
61 (reduce_template_parm_level): Don't set TREE_INVARIANT.
62 (process_template_parm): Don't set TREE_INVARIANT.
64 2008-04-22 Jason Merrill <jason@redhat.com>
67 * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
68 to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
69 * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
71 2008-04-22 Jakub Jelinek <jakub@redhat.com>
74 * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
75 expression is errorneous.
77 2008-04-21 Jason Merrill <jason@redhat.com>
80 * tree.c (cp_tree_equal): Handle FIXED_CST.
83 * pt.c (template_template_parm_bindings_ok_p): Set
84 processing_template_decl while in this function.
86 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
88 * cvt.c (type_promotes_to): Support char16_t and char32_t.
89 * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
90 char16_t and char32_t.
91 * lex.c (reswords): Add char16_t and char32_t (for c++0x).
92 * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
93 extended builtin type "u8char{16,32}_t".
94 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
96 (cp_lexer_print_token): Support CPP_STRING{16,32}.
97 (cp_parser_is_string_literal): Idem.
98 (cp_parser_string_literal): Idem.
99 (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
101 (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
102 * tree.c (char_type_p): Support char16_t and char32_t as char types.
103 * typeck.c (string_conv_p): Support char16_t and char32_t.
105 2008-04-17 Jason Merrill <jason@redhat.com>
108 * call.c (build_user_type_conversion_1): Represent second step of
109 copy-init with an rvalue conversion.
110 (convert_like_real) [ck_user]: Don't implicitly add it here.
112 2008-04-15 Jakub Jelinek <jakub@redhat.com>
115 * decl.c (layout_var_decl): If extern or static var has variable
116 size, set TREE_TYPE (decl) to error_mark_node.
118 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
121 * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
124 2008-04-09 Jason Merrill <jason@redhat.com>
127 * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
128 not a pushed variable.
130 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
132 * call.c (build_op_delete_call): Fix quotation in warning message.
133 * decl.c (grokdeclarator): Quote keyword in error message.
134 * pt.c (check_for_bare_parameter_packs): Fix quotation in error
137 * parser.c (cp_parser_check_type_definition): Print error string
138 directly rather than using "%s".
139 (cp_parser_postfix_expression): Fix quotation.
140 (cp_parser_decltype): Likewise.
141 (cp_parser_sizeof_operand): Fix quotation. Simplify.
143 * parser.c (cp_parser_non_integral_constant_expression): Build error
144 message with CONCAT rather than using "%s".
145 (cp_parser_primary_expression): Fix quotation.
146 (cp_parser_postfix_expression): Likewise.
147 (cp_parser_postfix_dot_deref_expression): Likewise.
148 (cp_parser_unary_expression): Likewise.
149 (cp_parser_new_expression): Likewise.
150 (cp_parser_delete_expression): Likewise.
152 * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
153 as `)', not as `('. Fix quotation.
154 (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
155 (cp_parser_primary_expression): Likewise.
156 (cp_parser_nested_name_specifier_opt): Likewise.
157 (cp_parser_postfix_expression): Likewise.
158 (cp_parser_postfix_open_square_expression): Likewise.
159 (cp_parser_parenthesized_expression_list): Likewise.
160 (cp_parser_pseudo_destructor_name): Likewise.
161 (cp_parser_new_expression): Likewise.
162 (cp_parser_direct_new_declarator): Likewise.
163 (cp_parser_delete_expression): Likewise.
164 (cp_parser_cast_expression): Likewise.
165 (cp_parser_question_colon_clause): Likewise.
166 (cp_parser_builtin_offsetof): Likewise.
167 (cp_parser_trait_expr): Likewise.
168 (cp_parser_label_for_labeled_statement): Likewise.
169 (cp_parser_compound_statement): Likewise.
170 (cp_parser_selection_statement): Likewise.
171 (cp_parser_condition): Likewise.
172 (cp_parser_iteration_statement): Likewise.
173 (cp_parser_already_scoped_statement): Likewise.
174 (cp_parser_simple_declaration): Likewise.
175 (cp_parser_linkage_specification): Likewise.
176 (cp_parser_static_assert): Likewise.
177 (cp_parser_decltype): Likewise.
178 (cp_parser_conversion_function_id): Likewise.
179 (cp_parser_operator_function_id): Likewise.
180 (cp_parser_operator): Likewise.
181 (cp_parser_type_parameter): Likewise.
182 (cp_parser_template_id): Likewise.
183 (cp_parser_explicit_instantiation): Likewise.
184 (cp_parser_explicit_specialization): Likewise.
185 (cp_parser_enum_specifier): Likewise.
186 (cp_parser_namespace_definition): Likewise.
187 (cp_parser_namespace_alias_definition): Likewise.
188 (cp_parser_using_declaration): Likewise.
189 (cp_parser_using_directive): Likewise.
190 (cp_parser_asm_definition): Likewise.
191 (cp_parser_direct_declarator): Likewise.
192 (cp_parser_ptr_operator): Likewise.
193 (cp_parser_parameter_declaration_clause): Likewise.
194 (cp_parser_initializer_clause): Likewise.
195 (cp_parser_class_specifier): Likewise.
196 (cp_parser_member_specification_opt): Likewise.
197 (cp_parser_member_declaration): Likewise.
198 (cp_parser_pure_specifier): Likewise.
199 (cp_parser_constant_initializer): Likewise.
200 (cp_parser_base_clause): Likewise.
201 (cp_parser_exception_specification_opt): Likewise.
202 (cp_parser_try_block): Likewise.
203 (cp_parser_function_try_block): Likewise.
204 (cp_parser_handler): Likewise.
205 (cp_parser_throw_expression): Likewise.
206 (cp_parser_asm_operand_list): Likewise.
207 (cp_parser_attributes_opt): Likewise.
208 (cp_parser_label_declaration): Likewise.
209 (cp_parser_constructor_declarator_p): Likewise.
210 (cp_parser_template_declaration_after_export): Likewise.
211 (cp_parser_single_declaration): Likewise.
212 (cp_parser_objc_message_expression): Likewise.
213 (cp_parser_objc_message_args): Likewise.
214 (cp_parser_objc_encode_expression): Likewise.
215 (cp_parser_objc_defs_expression): Likewise.
216 (cp_parser_objc_protocol_expression): Likewise.
217 (cp_parser_objc_selector_expression): Likewise.
218 (cp_parser_objc_protocol_refs_opt): Likewise.
219 (cp_parser_objc_typename): Likewise.
220 (cp_parser_objc_method_keyword_params): Likewise.
221 (cp_parser_objc_superclass_or_category): Likewise.
222 (cp_parser_objc_try_catch_finally_statement): Likewise.
223 (cp_parser_objc_synchronized_statement): Likewise.
224 (cp_parser_objc_throw_statement): Likewise.
225 (cp_parser_omp_var_list_no_open): Likewise.
226 (cp_parser_omp_clause_default): Likewise.
227 (cp_parser_omp_clause_if): Likewise.
228 (cp_parser_omp_clause_num_threads): Likewise.
229 (cp_parser_omp_clause_reduction): Likewise.
230 (cp_parser_omp_clause_schedule): Likewise.
231 (cp_parser_omp_critical): Likewise.
232 (cp_parser_omp_for_loop): Likewise.
233 (cp_parser_omp_sections_scope): Likewise.
235 * parser.c (cp_parser_template_parameter_list): Simplify.
237 2008-04-07 James E. Wilson <wilson@tuliptree.org>
239 * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
241 2008-04-07 Jason Merrill <jason@redhat.com>
244 * class.c (type_has_user_nondefault_constructor): A template
245 counts as a nondefault constructor.
247 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
249 * decl.c (cxx_push_function_context): Delete.
250 (cxx_pop_function_context): Delete.
251 (start_preparsed_function): Merge cxx_push_function_context (!f->decl
253 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
254 LANG_HOOKS_FUNCTION_FINAL): Delete.
255 (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
256 LANG_HOOKS_MISSING_NORETURN_OK_P.
257 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
259 * semantics.c (current_stmt_tree): Fix comment.
261 2008-04-03 Jakub Jelinek <jakub@redhat.com>
264 * semantics.c (finish_offsetof): Undo effect of convert_from_reference
265 before calling fold_offsetof.
267 2008-04-03 Tom Tromey <tromey@redhat.com>
269 * Make-lang.in (c++_OBJS): New variable.
271 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
273 * optimize.c (clone_body): New, from tree-inline.c.
275 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
277 * method.c (synthesize_method): Use {push,pop}_function_context.
278 * name-lookup.c (push_to_top_level): Likewise.
279 * parser.c (cp_parser_late_parsing_for_member): Likewise.
281 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
284 * parser.c (cp_parser_decl_specifier_seq): Add location to error
287 2008-03-27 Tom Tromey <tromey@redhat.com>
289 * Make-lang.in: Revert automatic dependency patch.
291 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
294 * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
295 (build_compound_expr): New, for compatibility with C
297 (cp_build_compound_expr): Renamed from build_compound_expr.
298 (build_c_cast): New, for compatibility with C build_c_cast.
299 (cp_build_c_cast): Renamed from build_c_cast.
300 * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
301 * decl.c (cxx_maybe_build_cleanup): Ditto.
302 * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
303 (cp_build_compound_expr): Renamed from build_compound_expr.
304 (build_c_cast): Add C-compatible prototype.
305 (cp_build_c_cast): Renamed from build_c_cast.
306 * typeck2.c (build_functional_cast): Use cp_build_c_cast.
307 * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
309 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
311 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
312 tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
313 ending in a pack expansion, both of which can occur when
314 substituting into a nested template.
315 (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
316 instantiating the sizeof...(X) form, make tsubst_copy do the work.
317 * parser.c (cp_parser_template_parameter): Deal with unnamed
318 non-type template parameter packs identified by pack expansions in
321 2008-03-26 Jakub Jelinek <jakub@redhat.com>
324 * pt.c (apply_late_template_attributes): Don't call tsubst on
325 first attribute argument if it is IDENTIFIER_NODE.
328 * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
329 and LTGT_EXPR to pp_expression.
331 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
333 * pt.c (coerce_template_template_parm): Moved the body of the loop
334 of coerce_template_template_parms here, to make iteration over a
335 template argument pack simpler.
336 Also, allow matching of a template parameter pack in the template
337 template parameter to a template parameter in the template
339 (coerce_template_template_parms): Deal with variadic template
340 template parameters. Use coerce_template_template_parm.
341 (unify): Make sure we coerce the template template argument's
342 template arguments to the template template parameter's template
343 parameters, not the other way around.
345 2008-03-25 Tom Tromey <tromey@redhat.com>
347 * Make-lang.in: Remove .o targets.
348 (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
350 (c++_OBJS): New variable.
351 (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
353 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
355 * typeck.c (composite_pointer_type_r): Add SFINAE support.
356 (composite_pointer_type): Ditto.
357 (common_type): Fix call to composite_pointer_type.
358 (cxx_sizeof_nowarn): New; used to be a macro.
359 (cxx_sizeof_expr): Add SFINAE support.
360 (cxx_alignof_expr): Ditto.
361 (decay_conversion): Fix calls for SFINAE support.
362 (rationalize_conditional_expr): Add SFINAE support.
363 (build_class_member_access_expr): Ditto.
364 (finish_class_member_access_expr): Ditto.
365 (build_x_indirect_ref): Ditto.
366 (build_indirect_ref): Original version renamed to
367 cp_build_indirect_ref; new version provides a bridge from
369 (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
371 (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
372 (build_function_call): Original version renamed to
373 cp_build_function_call; new version provides a bridge from
375 (cp_build_function_call): Was build_function_call; added SFINAE
377 (convert_arguments): Add SFINAE support.
378 (build_x_binary_op): Ditto.
379 (build_binary_op): Original version renamed to cp_build_binary_op;
380 new version provides a bridge from c-common.
381 (cp_build_binary_op): Was build_binary_op; added SFINAE support.
382 (pointer_diff): Fix calls for SFINAE.
383 (build_x_unary_op): Add SFINAE support.
384 (condition_conversion): Fix calls for SFINAE.
385 (build_unary_op): Original version renamed to cp_build_unary_op;
386 new version provides a bridge from c-common.
387 (cp_build_unary_op): Was build_unary_op; added SFINAE support.
388 (unary_complex_lvalue): Fix calls for SFINAE.
389 (build_x_conditional_expr): Add SFINAE support.
390 (build_x_compound_expr_from_list): Fix calls for SFINAE.
391 (build_x_compound_expr): Add SFINAE support.
392 (convert_ptrmem): Fix calls for SFINAE.
393 (build_static_cast_1): Add SFINAE support.
394 (build_static_cast): Ditto.
395 (build_reinterpret_cast_1): Ditto.
396 (build_reinterpret_cast): Ditto.
397 (build_const_cast_1): Ditto.
398 (build_const_cast): Ditto.
399 (build_c_cast): Ditto.
400 (build_modify_expr): Original version renamed to
401 cp_build_modify_expr; new version provides a bridge from c-common.
402 (cp_build_modify_expr): Was build_modify_expr; added SFINAE
404 (build_x_modify_expr): Add SFINAE support.
405 (build_ptrmemfunc): Fix calls for SFINAE.
406 (convert_for_assignment): Add SFINAE support.
407 (convert_for_initialization): Ditto.
408 (check_return_expr): Fix calls for SFINAE.
409 (lvalue_or_else): Add SFINAE support.
410 * init.c (perform_member_init): Fix calls for SFINAE.
411 (emit_mem_initializers): Ditto.
412 (expand_virtual_init): Ditto.
413 (expand_cleanup_for_base): Ditto.
414 (build_aggr_init): Add SFINAE support.
415 (expand_default_init): Ditto.
416 (expand_aggr_init_1): Fix calls for SFINAE.
417 (build_offset_ref): Ditto.
418 (build_new_1): Add SFINAE support.
420 (build_vec_delete_1): Fix calls for SFINAE.
421 (get_temp_regvar): Ditto.
422 (build_vec_init): Add SFINAE support.
423 (build_dtor_call): Fix calls for SFINAE.
424 (build_delete): Ditto.
425 (push_base_cleanups): Ditto.
426 (build_vec_delete_1): Ditto.
427 * class.c (build_base_path): Fix calls for SFINAE.
428 (build_simple_base_path): Ditto.
429 (convert_to_base_statically): Ditto.
430 (build_vfn_ref): Ditto.
431 (resolve_address_of_overloaded_function): Ditto.
432 * decl.c (check_initializer): Fix calls for SFINAE.
433 (register_dtor_fn): Ditto.
434 (compute_array_index_type): Ditto.
435 (finish_enum): Ditto.
436 (start_preparsed_function): Ditto.
437 (cxx_maybe_build_cleanup): Ditto.
438 * call.c (convert_like): Add COMPLAIN argument.
439 (convert_like_with_context): Ditto.
440 (build_this): Fix calls for SFINAE.
441 (build_user_type_conversion): Ditto.
442 (resolve_args): Ditto.
443 (build_new_function_call): Add SFINAE support.
444 (build_operator_new_call): Fix calls for SFINAE.
445 (build_object_call): Add SFINAE support.
446 (build_conditional_expr): Ditto.
447 (build_new_op): Ditto.
448 (build_op_delete_call): Fix calls for SFINAE.
450 (convert_like_real): Add SFINAE support.
451 (build_x_va_arg): Fix calls for SFINAE.
452 (convert_default_arg): Ditto.
453 (build_over_call): Add SFINAE support.
454 (build_java_interface_fn_ref): Fix calls for SFINAE.
455 (build_special_member_call): Add SFINAE support.
456 (build_new_method_call): Ditto.
457 (perform_implicit_conversion): Ditto.
458 (perform_direct_initialization_if_possible): Ditto.
459 (initialize_reference): Fix calls for SFINAE.
460 * method.c (do_build_assign_ref): Fix calls for SFINAE.
461 * rtti.c (build_headof): Fix calls for SFINAE.
462 (get_tinfo_decl_dynamic): Ditto.
464 (build_dynamic_cast_1): Add SFINAE support.
465 (build_dynamic_cast): Ditto.
466 (tinfo_base_init): Fix calls for SFINAE.
467 * except.c (do_get_exception_ptr): Fix calls for SFINAE.
468 (do_end_catch): Ditto.
469 (initialize_handler_parm): Ditto.
470 (expand_start_catch_block): Ditto.
471 (do_allocate_exception): Ditto.
472 (do_free_exception): Ditto.
473 (build_throw): Ditto.
474 * cvt.c (build_up_reference): Fix calls for SFINAE.
475 (convert_to_reference): Ditto.
476 (ocp_convert): Ditto.
477 (convert_to_void): Add SFINAE support.
478 * tree.c (build_dummy_object): Fix calls for SFINAE.
479 (stabilize_expr): Ditto.
480 * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
482 (build_new_method_call): Ditto.
483 (build_special_member_call): Ditto.
484 (build_new_op): Ditto.
485 (perform_implicit_conversion): Ditto.
486 (perform_direct_initialization_if_possible): Ditto.
487 (convert_to_void): Ditto.
488 (build_aggr_init): Ditto.
490 (build_vec_init): Ditto.
491 (build_dynamic_cast): Ditto.
492 (finish_call_expr): Ditto
493 (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
494 (cxx_sizeof_nowarn): Remove macro; add function declaration.
495 (build_class_member_access_expr): Add tsubst_flags_t parameter.
496 (finish_class_member_access_expr): Ditto.
497 (build_x_indirect_ref): Ditto.
498 (cp_build_indirect_ref): New.
499 (cp_build_function_call): Add tsubst_flags_t parameter.
500 (build_x_unary_op): Ditto.
501 (cp_build_unary_op): New.
502 (build_x_conditional_expr): Add tsubst_flags_t parameter.
503 (build_x_compound_expr): Ditto.
504 (build_compound_expr): Ditto.
505 (build_static_cast): Ditto.
506 (build_reinterpret_cast): Ditto.
507 (build_const_cast): Ditto.
508 (build_c_cast): Ditto.
509 (build_x_modify_expr): Ditto.
510 (cp_build_modify_expr): New.
511 (convert_for_initialization): Add tsubst_flags_t parameter.
512 (cp_build_binary_op): Remove macro; add function declaration.
513 (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
514 (lvalue_or_else): Ditto.
515 (build_functional_cast): Ditto.
516 * typeck2.c (digest_init): Fix calls for SFINAE.
517 (process_init_constructor_array): Ditto.
518 (process_init_constructor_record): Ditto.
519 (build_x_arrow): Ditto.
520 (build_m_component_ref): Ditto.
521 (build_functional_cast): Add SFINAE support.
522 * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
523 * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
524 (finish_expr_stmt): Ditto.
525 (finish_for_expr): Ditto.
526 (finish_asm_stmt): Ditto.
527 (finish_non_static_data_member): Ditto.
528 (finish_qualified_id_expr): Ditto.
529 (finish_call_expr): Add SFINAE support.
530 (finish_increment_expr): Fix calls for SFINAE.
531 (finish_unary_op_expr): Ditto.
532 (simplify_aggr_init_expr): Ditto.
533 (finish_omp_clauses): Ditto.
534 (finish_omp_for): Ditto.
535 (finish_omp_barrier): Ditto.
536 (finish_omo_flush): Ditto.
537 * decl2.c (grok_array_decl): Fix calls or SFINAE.
538 (build_anon_union_vars): Ditto.
539 (get_guard_cond): Ditto.
541 (one_static_initialization_or_destruction): Ditto.
542 (do_static_initialization_or_destruction): Ditto.
543 (generate_ctor_or_dtor_function): Ditto.
544 (build_offset_ref_call_from_tree): Ditto.
545 * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
546 (cp_parser_postfix_dot_deref_expression): Ditto.
547 (cp_parser_unary_expression): Ditto.
548 (cp_parser_new_expression): Ditto.
549 (cp_parser_cast_expression): Ditto.
550 (cp_parser_binary_expression): Ditto.
551 (cp_parser_question_colon_clause): Ditto.
552 (cp_parser_assignment_expression): Ditto.
553 (cp_parser_expression): Ditto.
554 (cp_parser_builtin_offsetof): Ditto.
555 (cp_parser_template_argument): Ditto.
556 (cp_parser_functional_cast): Ditto.
558 2008-03-24 Tom Tromey <tromey@redhat.com>
560 * lex.c (handle_pragma_interface): Don't copy the filename.
561 (handle_pragma_implementation): Copy filename using xstrdup.
563 2008-03-21 Paolo Carlini <pcarlini@suse.de>
565 * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
566 (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
567 (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
568 (PROMOTES_TO_AGGR_TYPE): Remove.
569 (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
570 * typeck.c (unary_complex_lvalue, build_modify_expr,
571 convert_for_initialization): Adjust.
572 * init.c (is_aggr_type): Remove.
573 (is_class_type): Add.
574 (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
575 build_delete): Adjust.
576 * lex.c (make_aggr_type): Remove.
577 (make_class_type): Add.
578 (cxx_make_type): Adjust.
579 * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
581 * decl.c (build_typename_type, make_typename_type,
582 make_unbound_class_template, cxx_init_decl_processing,
583 check_tag_decl, groktypename, start_decl_1, layout_var_decl,
584 check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
585 grok_op_properties, xref_tag, check_function_type): Adjust.
586 * call.c (check_dtor_name, standard_conversion, implicit_conversion,
587 add_builtin_candidate, add_builtin_candidates,
588 build_user_type_conversion_1, convert_like_real, build_cxx_call,
589 is_subseq, compare_ics): Adjust.
590 * method.c (use_thunk): Adjust.
591 * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
592 create_tinfo_types): Adjust.
593 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
594 build_up_reference, convert_to_reference, convert_from_reference,
595 ocp_convert, build_expr_type_conversion): Adjust.
596 * tree.c (bind_template_template_parm, error_type): Adjust.
597 * dump.c (cp_dump_tree): Adjust.
598 * search.c (lookup_member): Adjust.
599 * friend.c (make_friend_class, do_friend): Adjust.
600 * typeck2.c (store_init_value, process_init_constructor_array,
601 process_init_constructor_record, build_x_arrow, build_m_component_ref,
602 build_functional_cast): Adjust.
603 * pt.c (finish_member_template_decl, process_template_parm,
604 lookup_template_class, tsubst_function_type, tsubst,
605 tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
607 * semantics.c (begin_class_definition, finish_base_specifier,
608 finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
610 * name-lookup.c (constructor_name_p, push_overloaded_decl,
611 do_class_using_decl, lookup_qualified_name,
612 maybe_process_template_type_declaration): Adjust.
613 * decl2.c (grok_array_decl, check_member_template,
614 constrain_class_visibility): Adjust.
615 * parser.c (cp_parser_class_name): Adjust.
617 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
619 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
621 2008-03-17 Jason Merrill <jason@redhat.com>
624 * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
625 a temp directly to a reference as per DR391.
627 2008-03-12 Richard Guenther <rguenther@suse.de>
631 2008-02-04 Richard Guenther <rguenther@suse.de>
634 * decl.c (record_builtin_java_type): Make jboolean a
635 integer type again where its mode doesn't match that of bool.
637 2008-01-25 Richard Guenther <rguenther@suse.de>
640 * decl.c (record_builtin_java_type): Make __java_boolean
642 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
643 after TYPE_MAIN_VARIANT check.
645 2008-03-10 Jakub Jelinek <jakub@redhat.com>
648 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
652 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
653 DECL_P in not a variable and appears more than once error messages.
655 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
659 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
663 * typeck.c (structural_comptypes): Call cp_comptypes.
664 (comptypes): New; called from the C/C++ common bits to perform
666 (cp_comptypes): Renamed from comptypes, which is already used,
667 with a different signature, by the C++ front end.
668 (build_reinterpret_cast_1): Call cp_comptypes.
669 (ptr_reasonably_similar): Ditto.
670 * decl.c (decls_match): Ditto.
671 * cvt.c (convert_to_reference): Ditto.
672 * cp-tree.h (same_type_p): Ditto.
673 (same_or_base_type_p): Ditto.
674 (comptypes): Rename to cp_comptypes.
675 * pt.c (canonical_type_parameter): Call cp_comptypes.
677 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
679 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
680 test for equivalence between pointer and references.
682 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
685 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
686 (check_field_decls): Likewise.
687 (note_name_declared_in_class): Likewise.
688 * call.c (build_new_op): Likewise.
689 (convert_like_real): Likewise.
690 (build_over_call): Likewise.
691 * lex.c (unqualified_fn_lookup_error): Likewise.
692 * parser.c (cp_parser_template_id): Likewise.
693 * cvt.c (warn_ref_binding): Likewise.
694 (convert_to_reference): Likewise.
695 (ocp_convert): Likewise.
696 (convert_to_void): Use error instead of pedwarn.
697 * error.c (cp_cpp_error): Use pedantic_warning_kind.
698 * decl.c (compute_array_index_type): Use constant_expression_error.
700 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
702 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
703 that auto is either a storage class or a simple type specifier,
704 depending on the dialect.
705 (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
706 specifier in C++98 mode, error in C++0x mode (since we don't
707 support auto as a type specifier, yet).
708 (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
709 storage specifier in C++0x mode.
710 (cp_parser_simple_type_specifier): Parse `auto' as a
711 simple-type-specifier, but error because we don't support it yet.
713 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
715 * parser.c (cp_parser_nonclass_name): New.
716 (cp_parser_pseudo_destructor_name): Use it instead of
718 (cp_parser_type_name): Move code to cp_parser_nonclass_name.
720 2008-02-29 Tom Tromey <tromey@redhat.com>
722 * parser.c (struct cp_token) <input_file_stack_index>: Remove.
723 (cp_lexer_get_preprocessor_token): Update.
724 (cp_lexer_set_source_position_from_token): Don't call
725 restore_input_file_stack.
726 * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
728 2008-02-28 Richard Guenther <rguenther@suse.de>
731 2008-02-26 Richard Guenther <rguenther@suse.de>
733 * decl.c (duplicate_decls): Remove decl from global mapping
734 before ggc_freeing it.
736 2008-02-27 Jakub Jelinek <jakub@redhat.com>
739 * rtti.c: Include c-pragma.h.
740 (push_abi_namespace, pop_abi_namespace): New functions.
741 (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
742 create_tinfo_types, emit_support_tinfos): Use them.
743 * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
745 2008-02-26 Jason Merrill <jason@redhat.com>
748 * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
749 to name the struct for linkage purposes even if it has attributes.
750 (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
752 2008-02-26 Tom Tromey <tromey@redhat.com>
754 * parser.c (eof_token): Remove old location code.
755 (check_empty_body): Remove test of USE_MAPPED_LOCATION.
756 * decl2.c (generate_ctor_or_dtor_function): Remove old location
758 (cp_write_global_declarations): Likewise.
759 * lex.c (cxx_init): Remove old location code.
760 (handle_pragma_implementation): Remove test of
762 * pt.c (tsubst): Remove old location code.
763 * error.c (cp_print_error_function): Remove test of
765 * decl.c (pop_label): Remove old location code.
766 (finish_function): Likewise.
768 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
771 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
773 2008-02-26 Richard Guenther <rguenther@suse.de>
775 * decl.c (duplicate_decls): Remove decl from global mapping
776 before ggc_freeing it.
778 2008-02-26 Paolo Carlini <pcarlini@suse.de>
781 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
783 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
785 * typeck.c (build_class_member_access_expr): Add appropriate
786 OPT_W* parameter to warning.
787 (build_reinterpret_cast_1): Likewise.
788 * name-lookup.c (push_overloaded_decl): Likewise.
790 2008-02-25 Paolo Carlini <pcarlini@suse.de>
793 * error.c (dump_expr): Handle CONJ_EXPR.
795 2008-02-25 Paolo Carlini <pcarlini@suse.de>
798 * error.c (dump_type): Handle FIXED_POINT_TYPE.
799 (dump_expr): Handle FIXED_CST.
801 2008-02-24 Jason Merrill <jason@redhat.com>
803 * parser.c (cp_parser_declaration): Handle "inline namespace".
804 (cp_parser_namespace_definition): Likewise.
807 * name-lookup.c (arg_assoc_namespace): Look down into inline
810 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
812 * typeck.c (check_for_casting_away_constness): Use 1 single
813 argument, the type of cast, to decide what diagnostics generate.
814 (build_static_cast_1): Remove unused code. Update call to
815 check_for_casting_away_constness.
816 (build_reinterpret_cast_1): Update call to
817 check_for_casting_away_constness.
818 (build_const_cast_1): Likewise.
820 2008-02-24 Paolo Carlini <pcarlini@suse.de>
822 * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
823 VEC_NEW_EXPR), forward to pp_expression.
824 * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
826 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
829 * friend.c (do_friend): Call cplus_decl_attributes earlier.
831 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
834 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
835 template decls' function decl.
837 2008-02-22 Paolo Carlini <pcarlini@suse.de>
841 2008-02-14 Paolo Carlini <pcarlini@suse.de>
844 * pt.c (determine_specialization): In case of function templates,
845 when the type of DECL does not match FN there is no match.
847 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
850 * typeck.c (build_binary_op): Warn about floating point
851 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
853 2008-02-19 Jason Merrill <jason@redhat.com>
856 * pt.c (resolve_overloaded_unification): Set processing_template_decl
857 while we look for possible bindings.
859 2008-02-19 Jakub Jelinek <jakub@redhat.com>
862 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
866 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
867 vars. Afterwards ensure v is VAR_DECL.
870 * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
872 * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
875 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
880 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
881 is error_mark_node, return an error early.
882 (find_parameter_packs_r): Pass the pointer set along to recursive
883 calls of cp_walk_subtrees; don't try to manage the pointer set
885 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
886 (make_pack_expansion): Ditto.
887 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
888 a second pass through the tree with find_parameter_packs_r; that
889 second pass no longer does anything.
890 (push_template_decl_real): If we have an erroneous declaration,
891 set its type to error_mark_node before returning an error.
893 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
896 * pt.c (tsubst_initializer_list): Deal with the use of
897 VOID_TYPE_NODE to indicate value-initialization of the bases.
899 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
900 Jason Merrill <jason@redhat.com>
904 * class.c (type_has_user_nondefault_constructor): New fn.
905 * cp-tree.h: Declare it.
906 * init.c (emit_mem_initializers): Use it for -W warning about
907 missing base initializer.
909 2008-02-14 Paolo Carlini <pcarlini@suse.de>
912 * pt.c (determine_specialization): In case of function templates,
913 when the type of DECL does not match FN there is no match.
915 2008-02-13 Jakub Jelinek <jakub@redhat.com>
916 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
919 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
920 are not identifier :: ~, return before calling cp_parser_type_name.
922 2008-02-13 Jason Merrill <jason@redhat.com>
924 PR c++/34962, c++/34937, c++/34939
925 * decl2.c (is_late_template_attribute): Always defer attributes
926 vector_size and weak.
929 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
932 2008-02-12 Jason Merrill <jason@redhat.com>
935 * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
936 if we're doing conversions to call a user-defined conversion function.
938 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
941 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
944 2008-02-12 Jakub Jelinek <jakub@redhat.com>
947 * init.c (build_new_1): Don't create placement_expr before
948 constructing alloc_call. Verify that the pointer is passed by
949 value to operator new.
951 2008-02-11 Jason Merrill <jason@redhat.com>
954 * pt.c (tsubst): Don't look up a template typedef in an explicit
957 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
960 * tree.c (cp_build_qualified_type_real): When building a
961 cv-qualified array type, build it as a unique type with
962 build_cplus_array_type_1 and then adopt the unqualified type's
965 2008-02-11 Paolo Carlini <pcarlini@suse.de>
968 * decl.c (groktypename): Check grokdeclarator return.
970 2008-02-10 Jason Merrill <jason@redhat.com>
973 * decl2.c (cp_write_global_declarations): Don't write out static
974 data members with DECL_IN_AGGR_P set.
976 2008-02-08 Jason Merrill <jason@redhat.com>
979 * tree.c (build_target_expr_with_type): Handle void initializer.
980 (bot_manip): Remap slot before recursing.
982 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
985 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
987 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
990 * tree.c: Include tree-flow.h.
991 (build_target_expr): Check type compatibility.
992 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
993 * call.c (convert_like_real): Convert bitfield to expected type.
995 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
999 * typeck.c (structural_comptypes): Call cp_comptypes.
1000 (comptypes): New; called from the C/C++ common bits to perform
1002 (cp_comptypes): Renamed from comptypes, which is already used,
1003 with a different signature, by the C++ front end.
1004 (build_reinterpret_cast_1): Call cp_comptypes.
1005 (ptr_reasonably_similar): Ditto.
1006 * decl.c (decls_match): Ditto.
1007 * cvt.c (convert_to_reference): Ditto.
1008 * cp-tree.h (same_type_p): Ditto.
1009 (same_or_base_type_p): Ditto.
1010 (comptypes): Rename to cp_comptypes.
1011 * pt.c (canonical_type_parameter): Call cp_comptypes.
1013 2008-02-05 Jakub Jelinek <jakub@redhat.com>
1016 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
1017 value dependent expression.
1019 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
1022 * decl2.c (save_template_attributes): When we're modifying the
1023 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
1024 all of the other variants to add those same attributes. Otherwise,
1025 the main variant will be inconsistent with those other variants.
1027 2008-02-04 Richard Guenther <rguenther@suse.de>
1030 * decl.c (record_builtin_java_type): Make jboolean a
1031 integer type again where its mode doesn't match that of bool.
1033 2008-02-02 Jason Merrill <jason@redhat.com>
1034 Mark Mitchell <mark@codesourcery.com>
1037 * init.c (build_value_init_1): New function.
1038 (build_value_init): New function.
1039 * typeck2.c (build_functional_cast): Call it.
1040 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
1042 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
1043 TYPE_HAS_CONSTRUCTOR.
1044 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
1045 add_implicitly_declared_members): Adjust.
1046 (check_field_decls): Adjust. Remove warnings about reference/const
1047 in class without constructor.
1048 (check_bases_and_members): Adjust. Give those warnings here instead.
1049 * decl.c (fixup_anonymous_aggr): Adjust.
1050 (check_initializer): Adjust, clarify logic slightly.
1051 (grok_special_member_properties): Adjust, only set if user-provided.
1052 * rtti.c (create_tinfo_types): Don't set.
1053 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
1054 Use same_type_ignoring_top_level_qualifiers_p.
1055 * pt.c (check_explicit_specialization): Adjust.
1056 (instantiate_class_template): Adjust.
1058 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
1059 Jakub Jelinek <jakub@redhat.com>
1063 * typeck.c (structural_comptypes): Handle comparisons of
1064 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
1066 * mangle.c (write_builtin_type): Map down to the canonical type,
1067 which will be one of the predefined type nodes.
1069 2008-01-29 Michael Meissner <michael.meissner@amd.com>
1072 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
1073 bits to allow for expansion of the number of middle end tree
1076 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
1087 * typeck.c (check_return_expr): Tweak call to
1088 check_for_bare_parameter_packs.
1089 * class.c (add_method): Be careful with error_mark_nodes.
1090 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
1092 * pt.c (struct find_parameter_pack_data): Remove
1094 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
1095 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
1096 (make_pack_expansion): Ditto.
1097 (check_for_bare_parameter_packs): Parameter is now a tree, not a
1099 (process_template_parm): Tweak call to
1100 check_for_bare_parameter_packs.
1101 (push_template_decl_real): Tweak calls to
1102 check_for_bare_parameter_packs. If bare parameter packs are found
1103 in the list of exceptions, clear out that list after giving an
1105 * semantics.c (finish_cond): Tweak call to
1106 check_for_bare_parameter_packs.
1107 (finish_expr_stmt): Ditto.
1108 (finish_for_expr): Ditto.
1109 (finish_switch_cond): Ditto.
1110 (finish_mem_initializers): Ditto.
1111 (finish_member_declaration): Ditto.
1112 (finish_static_assert): Check for bare parameter packs in the
1114 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
1115 attributes of a declaration.
1116 * parser.c (cp_parser_using_declaration): Tweak call to
1117 check_for_bare_parameter_packs.
1118 (cp_parser_base_clause): Ditto.
1120 2008-01-28 Jason Merrill <jason@redhat.com>
1123 * class.c (build_base_path): Fix !want_pointer case.
1125 2008-01-27 Jason Merrill <jason@redhat.com>
1128 * class.c (build_base_path): Fix previous change.
1130 2008-01-26 Jakub Jelinek <jakub@redhat.com>
1133 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
1136 2008-01-26 Richard Guenther <rguenther@suse.de>
1139 * typeck.c (build_binary_op): Remove code to shorten compares.
1141 2008-01-25 Richard Guenther <rguenther@suse.de>
1144 * decl.c (record_builtin_java_type): Make __java_boolean
1146 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
1147 after TYPE_MAIN_VARIANT check.
1149 2008-01-25 Jason Merrill <jason@redhat.com>
1152 * class.c (build_base_path): Don't mess with virtual access if
1154 * call.c (standard_conversion): Don't check whether source type
1157 * decl2.c (is_late_template_attribute): Don't defer attribute
1158 visibility just because the type is dependent.
1160 2008-01-25 Jason Merrill <jason@redhat.com>
1161 Mark Mitchell <mark@codesourcery.com>
1164 * call.c (standard_conversion): Allow conversion from integer/real
1166 (compare_ics): Such a conversion is worse than a normal arithmetic
1169 2008-01-25 Richard Guenther <rguenther@suse.de>
1172 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
1175 2008-01-24 Paolo Carlini <pcarlini@suse.de>
1178 * pt.c (push_template_decl_real): Return error_mark_node in case
1179 of template definition of non-template.
1181 2008-01-24 Jason Merrill <jason@redhat.com>
1184 * decl2.c (is_late_template_attribute): Defer any attribute with
1185 dependent args. Also defer type attributes if the type is dependent.
1187 2008-01-22 Jakub Jelinek <jakub@redhat.com>
1188 Alexandre Oliva <aoliva@redhat.com>
1191 * call.c (reference_binding): For bitfields use the declared bitfield
1193 (add_builtin_candidates): Likewise.
1194 * class.c (layout_class_type): For bitfields copy over the
1195 original type quals.
1197 2008-01-22 Jason Merrill <jason@redhat.com>
1200 * decl.c (groktypename): Also ignore attributes on dependent
1201 possibly-class types.
1204 * friend.c (do_friend): Check for prior declaration of a friend
1205 function of a local class.
1206 * name-lookup.c (lookup_name_innermost_nonclass_level):
1208 * name-lookup.h: Declare it.
1210 2008-01-22 Tom Tromey <tromey@redhat.com>
1213 * init.c (build_new_1): Only disallow Java aggregates.
1215 2008-01-22 Jakub Jelinek <jakub@redhat.com>
1218 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
1219 if decl or init is error_mark_node.
1222 * error.c (dump_expr): Handle VECTOR_CST.
1224 2008-01-21 Jason Merrill <jason@redhat.com>
1227 * pt.c (tsubst_aggr_type): Make sure our context is complete.
1230 * pt.c (retrieve_local_specialization): Robustify.
1231 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
1234 * pt.c (tsubst): Only call retrieve_local_specialization if the
1235 original typedef was in a function template.
1238 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
1240 2008-01-21 Richard Guenther <rguenther@suse.de>
1243 * error.c (cp_print_error_function): Deal with recursive
1246 2008-01-20 Paolo Carlini <pcarlini@suse.de>
1249 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
1251 2008-01-20 Paolo Carlini <pcarlini@suse.de>
1255 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
1256 on non-IS_AGGR_TYPE scope.
1257 (constructor_name_p): Assert IS_AGGR_TYPE.
1259 2008-01-18 Ian Lance Taylor <iant@google.com>
1262 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
1263 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
1264 DECL_IS_OPERATOR_NEW flag.
1266 2008-01-16 Richard Guenther <rguenther@suse.de>
1269 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
1270 for conversions to type variants.
1272 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
1274 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
1275 declaration and code. Update copyright year.
1277 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1280 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
1281 know we have a class type.
1283 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1286 * pt.c (coerce_template_parameter_pack): When substituting into
1287 the type of a non-type template parameter pack. use the
1288 deduced/substituted arguments.
1289 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
1290 can be a parameter pack with the ellipsis following it. When we
1291 have an erroneous declaration, allow it to be a parameter pack.
1292 (cp_parser_template_parameter): Complain about default
1293 arguments on non-type template parameter packs, and parse them
1294 using the new cp_parser_default_argument.
1295 (cp_parser_parameter_declaration): Complain about parameter packs
1296 with default arguments. Move parsing of default arguments into a
1297 new function, cp_parser_default_argument.
1298 (cp_parser_default_argument): New; extracted from
1299 cp_parser_parameter_declaration.
1301 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1307 * typeck.c (check_return_expr): If there are bare parameter packs
1308 in the return value, set it to error_mark_node.
1309 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
1310 * pt.c (find_parameter_packs_r): Look at the type of
1311 IDENTIFIER_NODEs (e.g., for user-defined conversions).
1312 (check_for_bare_parameter_packs): Flip the result: now returns
1313 TRUE when there were bare parameter packs, FALSE otherwise.
1314 (push_template_decl_real): Deal with flipped result of
1315 check_for_bare_parameter_packs.
1316 * semantics.c (finish_cond): If there are bare parameter packs in
1317 the conditional, set it to error_mark_node.
1318 (finish_expr_stmt): If there are bare parameter packs in the
1319 expression, set it to error_mark_node.
1320 (finish_for_expr): Ditto.
1321 (finish_switch_cond): If there are bare parameter packs in
1322 the conditional, set it to error_mark_node.
1323 (finish_mem_initializers): If there are bare parameter packs in
1324 the member initializer, set it to error_mark_node.
1325 (finish_member_declaration): Check the attributes of the
1326 declaration for bare parameter packs, and remove the attributes if
1327 any have bare parameter packs.
1328 * parser.c (cp_parser_using_declaration): Check the using
1329 declaration for bare parameter packs.
1330 (cp_parser_base_clause): If there are bare parameter packs in a
1331 base specifier, don't add it to the chain.
1333 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1336 * error.c (dump_simple_decl): Display ellipsis for template
1337 non-type parameter packs.
1338 (dump_decl): Display ellipsis for template type parameter packs.
1339 (dump_template_decl): Display ellipsis for template template
1341 * pt.c (redeclare_class_template): When redeclaring a class
1342 template, check for collisions between template parameters and
1343 template parameter packs.
1345 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1348 * pt.c (process_partial_specialization): Don't mark template
1349 parameters that occur in non-deduced contexts.
1350 (struct pair_fn_data): Add include_nondeduced_p.
1351 (for_each_template_parm_r): Only visit non-deduced contexts if
1352 include_nondeduced_p is set.
1353 (for_each_template_parm): Added parameter include_nondeduced_p,
1354 which states whether template parameters found in non-deduced
1355 contexts should be visited.
1356 (uses_template_parms): Visit all template parameters, even those
1357 in non-deduced contexts.
1359 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1362 * pt.c (check_default_tmpl_args): Check for parameter packs that
1363 aren't at the end of a primary template.
1364 (push_template_decl_real): Remove check for parameter packs that
1365 aren't at the end of a primary template; that now happens in
1366 check_default_tmpl_args.
1367 * semantics.c (finish_template_template_parm): Use
1368 check_default_tmpl_args to check for errors in the template
1371 2008-01-12 Doug Kwan <dougkwan@google.com>
1373 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
1374 instead of OPT_Wreturn_type in warning due to ignored return type
1376 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
1377 instead of OPT_Wreturn_type in warning due to ignored return type
1380 2008-01-08 Jakub Jelinek <jakub@redhat.com>
1383 * semantics.c (finish_omp_for): Don't call
1384 fold_build_cleanup_point_expr if processing_template_decl.
1386 2008-01-04 Paolo Carlini <pcarlini@suse.de>
1387 Jakub Jelinek <jakub@redhat.com>
1390 * error.c (dump_template_argument): Deal with TREE_LIST.
1392 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
1394 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
1395 long" in C++0x mode; change the warning to note that "long long"
1396 is only unsupported in C++98 mode.
1398 2007-12-20 Jason Merrill <jason@redhat.com>
1401 * call.c (standard_conversion): Derived-to-base is considered a
1402 standard conversion.
1404 2007-12-19 Jakub Jelinek <jakub@redhat.com>
1407 * parser.c (cp_parser_omp_parallel): For non-combined parallel
1408 call cp_parser_statement rather than
1409 cp_parser_already_scoped_statement.
1411 2007-12-18 Jason Merrill <jason@redhat.com>
1414 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
1416 (dependent_type_p_r): Handle the domain of an array.
1418 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
1419 Jakub Jelinek <jakub@redhat.com>
1424 * pt.c (template_template_parm_bindings_ok_p): New; verifies
1425 bindings of template template parameters after all template
1426 arguments have been deduced.
1427 (coerce_template_parms): Don't complain when COMPLAIN doesn't
1429 (fn_type_unification): Use template_template_parm_bindings_ok_p.
1430 (unify): Deal with variadic, bound template template parameters.
1431 (get_class_bindings): Use template_template_parm_bindings_ok_p.
1433 2007-12-18 Jakub Jelinek <jakub@redhat.com>
1436 * decl.c (grokdeclarator): Reject friend sfk_constructor
1439 2007-12-17 Jakub Jelinek <jakub@redhat.com>
1442 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
1445 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
1448 * cp-lang.c (cp_classify_record): New.
1449 (LANG_HOOKS_CLASSIFY_RECORD): Override.
1451 2007-12-11 Jakub Jelinek <jakub@redhat.com>
1454 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
1457 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
1458 dynamic_cast in a template.
1460 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
1463 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
1464 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
1466 2007-12-10 Jakub Jelinek <jakub@redhat.com>
1469 * error.c (dump_type_prefix, dump_type_suffix): Handle
1470 TYPE_PACK_EXPANSION.
1473 * error.c (dump_expr): Handle ABS_EXPR.
1475 2007-12-09 Jakub Jelinek <jakub@redhat.com>
1479 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
1480 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1481 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
1482 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
1483 flag_use_repository and repo_emit_p returned 2.
1485 2007-12-06 Jakub Jelinek <jakub@redhat.com>
1488 * tree.c (stabilize_call, stabilize_init): Do nothing if
1489 processing_template_decl.
1491 2007-12-05 Jakub Jelinek <jakub@redhat.com>
1494 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
1495 error instead of assertion failure.
1496 * parser.c (cp_parser_decltype): If closing paren is not found,
1497 return error_mark_node.
1499 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
1502 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
1504 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
1505 since arg_assoc_template_arg will deal with them (better).
1507 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
1510 * pt.c (tsubst_exception_specification): Handle substitutions into
1511 member templates, where tsubst_pack_expansion returns a
1512 TYPE_PACK_EXPANSION.
1514 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
1517 * pt.c (unify_pack_expansion): If we didn't deduce any actual
1518 bindings for the template parameter pack, don't try to keep the
1519 empty deduced arguments.
1520 (unify): If a parameter is a template-id whose template argument
1521 list contains a pack expansion that is not at the end, then we
1522 cannot unify against that template-id.
1524 2007-12-02 Paolo Carlini <pcarlini@suse.de>
1527 * pt.c (current_template_args): Use error_operand_p.
1529 2007-12-02 Paolo Carlini <pcarlini@suse.de>
1532 * error.c (dump_decl): Handle TREE_BINFO.
1534 2007-12-01 Ollie Wild <aaw@google.com>
1537 * typeck.c (build_binary_op): Add conversion of pointers to function
1538 members appearing as operands to the equality operators.
1540 2007-11-30 Jakub Jelinek <jakub@redhat.com>
1543 * error.c (dump_expr): Handle OBJ_TYPE_REF.
1545 2007-11-29 Jakub Jelinek <jakub@redhat.com>
1548 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
1550 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
1555 * parser.c (cp_parser_decltype): Don't call finish_id_expression
1557 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
1560 2007-11-27 Jakub Jelinek <jakub@redhat.com>
1562 PR tree-optimization/34181
1563 * method.c (use_thunk): Don't inline the call in the thunk.
1566 * tree.c (decl_linkage): Static data members and static member
1567 functions in anonymous ns classes are lk_external.
1569 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
1572 * decl.c (start_preparsed_function): Pass
1573 processing_template_decl for the new allocate_struct_function
1576 2007-11-25 Richard Guenther <rguenther@suse.de>
1578 * decl.c (poplevel): Use BLOCK_CHAIN.
1580 2007-11-24 Ollie Wild <aaw@google.com>
1582 * typeck.c (delta_from_ptrmemfunc): New function.
1583 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
1584 (build_binary_op): Call delta_from_ptrmemfunc.
1586 2007-11-23 Jakub Jelinek <jakub@redhat.com>
1590 * decl.c (cp_finish_decl): Disallow variable or field
1591 definitions if extern "Java" aggregates.
1592 (grokparms): Disallow parameters with extern "Java"
1594 (check_function_type): Disallow function return values
1595 with extern "Java" aggregates.
1596 * init.c (build_new_1): Disallow placement new with
1597 extern "Java" aggregates.
1599 2007-11-23 Mark Mitchell <mark@codesourcery.com>
1600 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1603 * call.c (convert_like_real): Build a zero constant when __null is
1604 converted to an integer type.
1606 2007-11-22 Jakub Jelinek <jakub@redhat.com>
1609 * decl2.c (cp_write_global_declarations): Issue error about static
1610 data members in anonymous namespace which are declared and used,
1613 2007-11-20 Jakub Jelinek <jakub@redhat.com>
1616 * parser.c (cp_parser_class_head): Reject function template ids.
1619 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
1620 when processing_template_decl to build_array_type.
1623 * pt.c (more_specialized_fn): Don't segfault if one or
1624 both argument list end with ellipsis.
1626 2007-11-18 Jakub Jelinek <jakub@redhat.com>
1629 * semantics.c (finish_call_expr): Set
1630 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
1631 or OVERLOAD with all noreturn functions.
1633 2007-11-16 Jakub Jelinek <jakub@redhat.com>
1636 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
1639 2007-11-13 Jakub Jelinek <jakub@redhat.com>
1646 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
1647 set to error_mark_node the outermost POINTER_TYPE to the pack if
1648 it is seen in a POINTER_TYPE.
1649 (push_template_decl_real): If check_for_bare_parameter_packs
1650 fails for function return type, set the return type to
1651 integer_type_node. If check_for_bare_parameter_packs failed
1652 for non-function, return error_mark_node.
1655 * call.c (build_new_op): Call resolve_args before calling
1658 2007-11-11 Tom Tromey <tromey@redhat.com>
1661 * lex.c (handle_pragma_implementation): Use cpp_included_before.
1663 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1666 * pt.c (redeclare_class_template): Update error message. Use a
1667 note to show the previous declaration.
1668 (tsubst_friend_class): Use the location of the friend template as
1669 the input location before calling redeclare_class_template.
1671 2007-11-11 Jakub Jelinek <jakub@redhat.com>
1674 * semantics.c (finish_pseudo_destructor_expr): Handle
1675 object == error_mark_node.
1677 2007-11-10 Jakub Jelinek <jakub@redhat.com>
1680 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
1681 is not scalar type, let finish_class_member_access_expr handle
1682 diagnostics. Pass BIT_NOT_EXPR argument to
1683 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
1685 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
1688 * decl.c (cp_complete_array_type): If any of the initializer
1689 elements are pack expansions, don't compute the array size yet.
1691 2007-11-08 Andrew Pinski <pinskia@gmail.com>
1694 * tree.c (decl_linkage): Fields have no linkage.
1696 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
1698 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
1700 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
1705 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
1706 Be careful with ERROR_MARK_NODEs.
1707 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
1710 2007-11-07 Jakub Jelinek <jakub@redhat.com>
1713 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
1716 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
1720 * tree.c (c_build_qualified_type): Define bridge to
1721 cp_build_qualified_type.
1723 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
1734 * typeck.c (check_return_expr): Pass address of retval to
1735 check_for_bare_parameter_packs.
1736 * class.c (build_base_field): Tolerate bases that have no layout
1738 (end_of_base): Ditto.
1739 * tree.c (canonical_type_variant): Be careful with
1741 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
1743 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
1744 which states whether parameter packs should be replaced with
1746 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
1747 possible. If set_packs_to_error is set true, replace the parameter
1748 pack with ERROR_MARK_NODE. Manage our own pointer sets.
1749 (uses_parameter_packs): Don't set parameter packs to
1751 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
1752 which may be modified (if it is a parameter pack). Instructs
1753 find_parameter_packs_r to replace parameter packs with
1754 ERROR_MARK_NODE (so that they won't cause errors later on).
1755 (process_template_parm): Pass pointer to
1756 check_for_bare_parameter_packs.
1757 (process_partial_specialization): Replace pack expansions before
1758 the end of the template argument list with ERROR_MARK_NODE.
1759 (push_template_decl_real): Pass pointer to
1760 check_for_bare_parameter_packs. Replace parameter packs not at the
1761 end of the template parameter list with ERROR_MARK_NODE.
1762 (convert_template_argument): Be more careful about using DECL_NAME
1763 on only declarations.
1764 (unify): Can't unify against ERROR_MARK_NODE.
1765 * semantics.c (finish_cond): Pass pointer to
1766 check_for_bare_parameter_packs.
1767 (finish_expr_stmt): Ditto.
1768 (finish_for_expr): Ditto.
1769 (finish_switch_cond): Pass pointer to
1770 check_for_bare_parameter_packs, and call it before we put the
1771 condition into the statement.
1772 (finish_mem_initializers): Pass pointer to
1773 check_for_bare_parameter_packs.
1774 (finish_member_declaration): Ditto.
1775 * parser.c (cp_parser_base_clause): Ditto.
1777 2007-11-06 Jakub Jelinek <jakub@redhat.com>
1780 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
1781 with the final TREE_READONLY flag in place. processing_template_decl
1782 is known to be 0 in this part of function.
1785 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
1786 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
1787 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
1788 * semantics.c (finish_omp_atomic): Revert most of the
1789 2007-02-05 changes, just keep the new representation of
1790 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
1792 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
1795 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
1798 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
1803 * typeck.c (merge_types): Don't lose rvalue references when
1805 * call.c (build_over_call): Don't elide move constructors just
1806 because the copy constructor is trivial (!).
1807 (compare_ics): If comparing cv-qualifiers fails, we can still order
1808 based on binding lvalues vs. rvalues.
1810 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
1813 * pt.c (unify_pack_expansion): bring handling of function call
1814 arguments into line with type_unification_real.
1816 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1818 * typeck.c (build_binary_op): Use pedwarn instead of error for
1821 2007-11-05 Jakub Jelinek <jakub@redhat.com>
1824 * parser.c (cp_parser_unary_expression): For &&label call
1825 cp_parser_non_integral_constant_expression and return error_mark_node
1826 if it returned true.
1829 * decl.c (grokdeclarator): Don't call build_memfn_type if type
1830 is neither FUNCTION_TYPE nor METHOD_TYPE.
1832 2007-11-02 Jakub Jelinek <jakub@redhat.com>
1835 * parser.c (cp_parser_nested_name_specifier_opt): Use
1836 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
1837 typedef of currently open class.
1839 2007-11-02 Paolo Carlini <pcarlini@suse.de>
1842 * error.c (dump_expr): Deal specially with statements.
1844 2007-11-01 Jason Merrill <jason@redhat.com>
1847 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
1849 (lookup_template_class): Use it to get the outer template args
1850 for instantiating one.
1853 * pt.c (reduce_template_parm_level): tsubst the parameters
1854 of a template template parm.
1856 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
1859 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
1861 2007-11-01 Jakub Jelinek <jakub@redhat.com>
1864 * parser.c (cp_parser_postfix_dot_deref_expression): If
1865 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
1866 first and if that succeeds and type is SCALAR_TYPE_P, create
1870 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
1871 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
1872 as for std::type_info.
1874 2007-10-31 Paolo Carlini <pcarlini@suse.de>
1877 * cxx-pretty-print.c (pp_cxx_typeid_expression,
1878 pp_cxx_delete_expression): Change to static linkage.
1879 * cxx-pretty-print.h: Adjust declarations.
1880 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
1881 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
1882 MODOP_EXPR): Forward to pp_expression.
1884 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
1887 2007-10-31 Christian Bruel <christian.bruel@st.com>
1888 Mark Mitchell <mark@codesourcery.com>
1891 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
1892 if retval is volatile.
1894 2007-10-30 Jakub Jelinek <jakub@redhat.com>
1897 * decl2.c (build_offset_ref_call_from_tree): Call
1898 build_non_dependent_expr on object prior to building ADDR_EXPR from it
1899 if FN is DOTSTAR_EXPR.
1901 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
1905 * pt.c (find_parameter_packs_r): Fix typo in comment.
1906 (convert_template_argument): Look at the pattern of a pack
1907 expansion to determine what kind of entity we're converting.
1908 (coerce_template_parameter_pack): When we have coerced a non-type
1909 template parameter pack, substitute into the type of that pack.
1910 (tsubst_pack_expansion): When our substitution of a parameter pack
1911 is a "trivial" substitution of itself, just substitute into the
1912 pack expansion rather than actually expanding.
1914 2007-10-29 Jakub Jelinek <jakub@redhat.com>
1917 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
1918 for non-integral type bitfields. Return true if bitfield is correct, false
1919 error has been diagnosed.
1920 (check_field_decls): If check_bitfield_decl returned false, call also
1923 2007-10-28 Paolo Carlini <pcarlini@suse.de>
1924 Mark Mitchell <mark@codesourcery.com>
1927 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
1928 class member error out and return.
1930 2007-10-27 Jakub Jelinek <jakub@redhat.com>
1932 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
1933 to current_function_decl rather than 0.
1936 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
1938 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
1940 2007-10-27 Jason Merrill <jason@redhat.com>
1943 * call.c (convert_default_arg): Detect recursion.
1945 2007-10-27 Jakub Jelinek <jakub@redhat.com>
1948 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
1949 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
1951 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
1953 * error.c (dump_expr): Handle OFFSETOF_EXPR.
1955 2007-10-26 Jason Merrill <jason@redhat.com>
1958 * pt.c (get_template_info): New fn.
1959 (template_class_depth): Use it.
1960 (push_template_decl_real): Check that the template args of the
1961 definition match the args of the previous declaration.
1963 2007-10-26 Paolo Carlini <pcarlini@suse.de>
1966 * decl2.c (coerce_new_type): Do not allow a default argument for
1967 the first parameter.
1969 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
1972 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
1973 don't see the leading '('. Only lookup names if we get an
1976 2007-10-26 Jakub Jelinek <jakub@redhat.com>
1979 * parser.c (cp_parser_parenthesized_expression_list): Set
1980 greater_than_is_operator_p to true in between the parens.
1982 2007-10-26 Paolo Carlini <pcarlini@suse.de>
1985 * decl.c (grokdeclarator): In case of conflicting specifiers
1986 just return error_mark_node.
1988 2007-10-26 Ollie Wild <aaw@google.com>
1990 * expr.c (cxx_expand_expr): Removed.
1991 * cp-tree.h (exx_expand_expr): Removed.
1992 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
1995 2007-10-25 Paolo Carlini <pcarlini@suse.de>
1998 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
2000 2007-10-23 Jason Merrill <jason@redhat.com>
2002 PR c++/25950 (DR 391)
2003 * call.c (struct conversion): Remove check_copy_constructor_p.
2004 (reference_binding): Always bind a reference directly to a
2005 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
2007 (check_constructor_callable): Remove.
2008 (convert_like_real): Don't call it.
2009 (initialize_reference): Don't call check_constructor_callable.
2010 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
2011 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
2012 conversions if LOOKUP_NO_TEMP_BIND.
2013 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
2014 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
2016 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
2018 2007-10-22 Jakub Jelinek <jakub@redhat.com>
2021 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
2022 before checking if its type is integral.
2024 2007-10-22 Jason Merrill <jason@redhat.com>
2027 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
2028 * pt.c (apply_late_template_attributes): Splice out dependent
2029 attributes from DECL_ATTRIBUTES.
2031 * decl.c (cxx_maybe_build_cleanup): Use build_address.
2033 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2035 * typeck.c (build_binary_op) : Use appropriate warning option
2036 instead of unnamed warning.
2038 2007-10-16 Paolo Carlini <pcarlini@suse.de>
2041 * pt.c (current_template_args): Do not change TREE_LIST elements
2042 with a TREE_VALUE of error_mark_node.
2044 2007-10-16 Mark Mitchell <mark@codesourcery.com>
2046 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
2047 * decl.c (start_decl): Tidy.
2048 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
2050 (grokdeclarator): Clarify comment.
2052 2007-10-14 Andrew Pinski <pinskia@gmail.com>
2055 * decl.c (grokfndecl): Return NULL after the "definition of
2056 implicitly-declared" error happened.
2058 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
2061 * call.c (build_user_type_conversion_1): Do not consider conversion
2062 functions to convert a (possibly cv-qualified) object to the (possibly
2063 cv-qualified) same object type (or a reference to it), to a (possibly
2064 cv-qualified) base class of that type (or a reference to it).
2066 2007-10-12 Paolo Carlini <pcarlini@suse.de>
2068 * pt.c (tsubst): Use template_parm_level_and_index.
2070 2007-10-12 Jakub Jelinek <jakub@redhat.com>
2073 * parser.c (cp_parser_compound_statement): Handle label-declarations
2074 at the beginning of the compound statement.
2075 (cp_parser_block_declaration): Issue diagnostics about __label__
2076 not at the beginning of a block.
2078 2007-10-11 Paolo Carlini <pcarlini@suse.de>
2081 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
2082 to convert_template_argument.
2083 (coerce_template_parms): Return error_mark_node after fixed-length
2085 (tsubst_decl): Check for error_mark_node the return value of the
2086 first tsubst in 'case VAR_DECL'.
2088 2007-10-08 Ollie Wild <aaw@google.com>
2090 * typeck2.c (digest_init): Call cplus_expand_constant after
2091 convert_for_initialization.
2092 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
2093 * expr.c (cplus_expand_constant): Updated function description.
2095 2007-10-04 Jason Merrill <jason@redhat.com>
2098 * call.c (initialize_reference): Handle local static reference
2101 2007-10-03 Jason Merrill <jason@redhat.com>
2104 * name-lookup.c (push_namespace_with_attrs): Fold back into...
2105 (push_namespace): Here.
2106 (handle_namespace_attrs): New fn for the attr code.
2107 (leave_scope): Don't pop_visibility.
2108 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
2109 * parser.c (cp_parser_namespace_definition): Call
2110 handle_namespace_attrs and pop_visibility as appropriate.
2113 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
2115 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
2117 * decl.c (duplicate_decls): Preserve linkage flags for mere
2118 redeclarations of gnu_inline definitions.
2120 2007-10-03 Jason Merrill <jason@redhat.com>
2123 * decl.c (wrap_cleanups_r): New fn.
2124 (wrap_temporary_cleanups): New fn.
2125 (initialize_local_var): Call it.
2127 2007-09-29 Jason Merrill <jason@redhat.com>
2130 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
2131 constant to not have DECL_EXTERNAL if it's file-local.
2133 2007-09-28 Ollie Wild <aaw@google.com>
2136 2007-09-27 Ollie Wild <aaw@google.com>
2138 * typeck2.c (digest_init): Call cplus_expand_constant after
2139 convert_for_initialization.
2140 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
2141 * expr.c (cplus_expand_constant): Updated function description.
2143 2007-09-28 Jason Merrill <jason@redhat.com>
2146 * class.c (layout_empty_base): Take rli parameter, update
2147 rli->record_align if empty base has user-specified alignment.
2148 (build_base_field): Pass rli to it.
2150 2007-09-28 Paolo Carlini <pcarlini@suse.de>
2153 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
2155 2007-09-28 Paolo Carlini <pcarlini@suse.de>
2158 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
2159 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
2160 (dump_parameters): Just call dump_type for argument packs too.
2162 2007-09-28 Jakub Jelinek <jakub@redhat.com>
2165 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
2166 qualification by creating qualified PACK_EXPANSION_PATTERN and
2167 then calling make_pack_expansion on it.
2169 2007-09-27 Ollie Wild <aaw@google.com>
2171 * typeck2.c (digest_init): Call cplus_expand_constant after
2172 convert_for_initialization.
2173 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
2174 * expr.c (cplus_expand_constant): Updated function description.
2176 2007-09-27 Jason Merrill <jason@redhat.com>
2179 * decl2.c (is_late_template_attribute): Don't crash on unknown
2182 2007-09-27 Paolo Carlini <pcarlini@suse.de>
2185 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
2186 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
2187 spaces in the formatting.
2188 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
2190 2007-09-27 Jakub Jelinek <jakub@redhat.com>
2192 * error.c (cxx_print_error_function): Add third argument, pass
2193 it over to lhd_print_error_function.
2194 (cp_print_error_function): If diagnostic->abstract_origin, print
2196 * cp-tree.h (struct diagnostic_info): New forward decl.
2197 (cxx_print_error_function): Add third argument.
2199 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
2202 * name-lookup.c (pushtag): Do not create an implicit typedef before
2203 the associated type declaration is known to be valid.
2205 2007-09-25 Jakub Jelinek <jakub@redhat.com>
2207 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
2208 rather than pointers.
2210 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
2213 * search.c (check_final_overrider): Fail if
2214 targetm.comp_type_attributes returns 0.
2216 2007-09-24 Jason Merrill <jason@redhat.com>
2219 * pt.c (resolve_typename_type): Don't look things up in the original
2220 template if it would mean losing template arguments.
2222 2007-09-24 Jakub Jelinek <jakub@redhat.com>
2225 * cp-tree.h (cxx_type_hash_eq): New prototype.
2226 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
2227 * tree.c (cxx_type_hash_eq): New function.
2229 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
2232 * tree.c (cp_build_qualified_type_real): Build a canonical
2233 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
2235 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
2239 * tree.c (cplus_array_compare): Compare pointers, not types.
2240 (build_cplus_array_type_1): Store new array type into the hash
2241 table before building the canonical type; build the canonical type
2243 (cp_build_qualified_type_real): Put all of the array types with
2244 cv-qualified element types into the C++ array hash table, built as
2245 variants of the unqualified versions.
2247 2007-09-23 Jason Merrill <jason@redhat.com>
2250 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
2251 for deprecation warnings.
2253 2007-09-22 Jason Merrill <jason@redhat.com>
2256 * call.c (build_over_call): Warn about deprecated virtuals.
2259 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
2260 (MAYBE_TAGGED_TYPE_P): Remove.
2261 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
2262 instead of calling is_late_template_attribute again.
2263 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
2264 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
2265 Don't crash on typedefs from non-template classes.
2266 * decl2.c (grokfield): Don't sorry about attrs on template parms.
2267 (is_late_template_attribute): All attributes applied to template
2268 parms or typename types are dependent. Static.
2269 (splice_template_attributes): Pass decl through.
2270 (save_template_attributes): Likewise.
2272 2007-09-20 Jakub Jelinek <jakub@redhat.com>
2275 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
2276 returned from tsubst_pack_expansion.
2277 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
2278 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
2280 2007-09-20 Paolo Carlini <pcarlini@suse.de>
2283 * semantics.c (finish_id_expression): Use consistently
2284 context_for_name_lookup.
2285 * decl.c (fixup_anonymous_aggr): Fix error message for
2286 anonymous struct (vs union).
2288 2007-09-19 Jason Merrill <jason@redhat.com>
2291 * pt.c (tsubst): Handle typedefs by looking for the specialization.
2292 (retrieve_specialization): Only tagged types use
2293 DECL_TEMPLATE_INSTANTIATIONS.
2294 (instantiate_class_template): Push nested classes too.
2295 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
2297 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
2298 * init.c (is_aggr_type): Remove redundant tests.
2299 * class.c (push_nested_class): Use CLASS_TYPE_P.
2301 2007-09-20 Paolo Carlini <pcarlini@suse.de>
2304 * init.c (build_zero_init): If, recursively, build_zero_init
2305 returns a NULL_TREE, do not append it to the VEC of constructors.
2307 2007-09-18 Jason Merrill <jason@redhat.com>
2310 * pt.c (apply_late_template_attributes): Set processing_template_decl.
2311 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
2312 ATTR_FLAG_TYPE_IN_PLACE.
2313 (tsubst): Do unqualified lookup to find typedefs from current class.
2314 [ARRAY_TYPE]: Propagate alignment info.
2315 * decl2.c (is_late_template_attribute): Only defer handling of
2316 attribute aligned if the expression is dependent.
2317 (save_template_attributes): If we're deferring any attributes,
2318 make this a naming typedef.
2320 2007-09-18 Paolo Carlini <pcarlini@suse.de>
2322 PR c++/33462 (again)
2323 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
2324 va_arg instead of __builtin_va_arg.
2326 2007-09-18 Paolo Carlini <pcarlini@suse.de>
2329 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
2330 (pp_cxx_primary_expression): Use it.
2331 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
2332 * error.c (dump_expr): Use it.
2334 2007-09-18 Paolo Carlini <pcarlini@suse.de>
2337 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
2338 out case TYPEID_EXPR to...
2339 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
2340 and pp_cxx_right_paren.
2341 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
2342 * error.c (dump_expr): Use it.
2344 2007-09-18 Paolo Carlini <pcarlini@suse.de>
2347 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
2348 (pp_cxx_primary_expression): Use it.
2349 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
2350 * error.c (dump_expr): Use it.
2352 2007-09-16 Paolo Carlini <pcarlini@suse.de>
2355 * init.c (build_new): Remove warning for zero-element
2358 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
2361 * call.c (maybe_handle_implicit_object): Set this_p, clear
2362 rvaluedness_matches_p.
2363 (compare_ics): Do not compare rvaluedness matching when one of the
2364 operands is an implicit object.
2366 2007-09-14 Jason Merrill <jason@redhat.com>
2368 PR c++/17743, c++/19163
2369 * decl2.c (is_late_template_attribute): New fn.
2370 (splice_template_attributes, save_template_attributes): New fns.
2371 (cplus_decl_attributes): Call save_template_attributes.
2372 * pt.c (apply_late_template_attributes): New fn.
2373 (instantiate_class_template, tsubst_decl): Use it.
2374 * cp-tree.h: Declare is_late_template_attribute.
2376 2007-09-13 Tom Tromey <tromey@redhat.com>
2378 * parser.c (cp_lexer_new_main): Don't use
2379 c_lex_return_raw_strings.
2380 (cp_lexer_get_preprocessor_token): Update. Add special case when
2383 2007-09-11 Jan Hubicka <jh@suse.cz>
2385 * method.c (use_thunk): Use tree_rest_of_compilation
2386 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
2387 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
2388 * cp-tree.h (expand_body): Kill.
2389 (emit_associated_thunks): Declare.
2390 * semantics.c (emit_associated_thunks): Export.
2391 (expand_body): Kill.
2393 2007-09-09 David Daney <ddaney@avtrex.com>
2396 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
2397 to calculate cookie_ptr.
2399 2007-09-08 Jason Merrill <jason@redhat.com>
2402 * pt.c (most_specialized_class): Set processing_template_decl
2403 while tsubsting partial spec args.
2405 2007-09-06 Jason Merrill <jason@redhat.com>
2407 * decl2.c (get_guard): Copy visibility from the guarded variable.
2409 2007-09-06 Jan Hubicka <jh@suse.cz>
2411 * semantics.c (expand_body): Do not mark arguments of clones used.
2413 2007-09-06 Paolo Carlini <pcarlini@suse.de>
2416 * decl.c (cp_finish_decl): When processing_template_decl,
2417 deal correctly with init as TREE_LIST.
2419 2007-09-06 Tom Tromey <tromey@redhat.com>
2421 * decl.c (finish_function): Put return's location on line zero of
2424 2007-09-05 Jason Merrill <jason@redhat.com>
2427 * except.c (prepare_eh_type): Use type_decays_to.
2430 * init.c (build_delete): Use build_headof to get the address of the
2431 complete object if we aren't using the deleting destructor.
2432 * rtti.c (build_headof): No longer static.
2433 * cp-tree.h: Declare it.
2435 2007-09-06 Jakub Jelinek <jakub@redhat.com>
2437 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
2438 decl if a prototype for XX is provided with throw().
2441 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
2442 on __*_chk non-__builtin_* decls.
2444 2007-09-05 Paolo Carlini <pcarlini@suse.de>
2447 * semantics.c (finish_id_expression): Use context_for_name_lookup
2448 insted of DECL_CONTEXT, to see through anonymous structs and unions.
2449 * class.c (finish_struct_anon): Deal correctly with anonymous
2450 structs (vs unions, as GNU extension) in error messages.
2452 2007-09-05 Jan Hubicka <jh@suse.cz>
2454 * sematics.c (expand_body): Remove unnecesary import_export_decl
2455 call, DECL_EXTERNAL checks and current_function_decl saving.
2457 2007-09-05 Paolo Carlini <pcarlini@suse.de>
2459 PR c++/29731 (again)
2460 * parser.c (cp_parser_primary_expression): Return error_mark_node
2461 when a statement-expression is found in a template-argument list.
2463 2007-09-04 Jason Merrill <jason@redhat.com>
2465 * except.c (initialize_handler_parm): Use
2466 fold_build_cleanup_point_expr.
2469 * call.c (reference_binding): Don't look for user-defined conversions
2473 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
2474 the MUST_NOT_THROW_EXPR.
2476 2007-09-04 Richard Sandiford <richard@codesourcery.com>
2478 * decl.c (cp_finish_decl): Call determine_visibility before
2479 make_rtl_for_nonlocal_decl.
2481 2007-09-04 Jason Merrill <jason@redhat.com>
2484 * pt.c (most_specialized_class): Substitute outer template
2485 arguments into the arguments of a member template partial
2487 (strip_innermost_template_args): New fn.
2489 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
2491 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
2493 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2495 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
2496 * decl.c (cp_make_fname_decl): Likewise,
2497 * parser.c (cp_parser_string_literal): Likewise,
2498 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
2499 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
2502 2007-09-02 Paolo Carlini <pcarlini@suse.de>
2505 * typeck.c (build_unary_op): Fix error message for
2506 Boolean expression as operand to operator--.
2508 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2510 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
2511 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
2514 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
2517 * init.c (build_default_init): Make extern.
2518 * cp-tree.h (build_default_init): Declare here.
2519 * pt.c (tsubst_expr): When the instantiation of the initializer of
2520 a variable results in an empty list, default-initialize the
2522 (tsubst_copy_and_build): When the instantiation of the initializer
2523 in a new expression results in an empty initializer list,
2524 default-initialize it.
2526 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
2528 * mangle.c (write_type): Change mangling of rvalue reference from
2531 2007-08-31 Jakub Jelinek <jakub@redhat.com>
2533 * decl.c (duplicate_decls): Remove duplicated line.
2535 2007-08-31 Paolo Carlini <pcarlini@suse.de>
2538 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
2539 BOUND_TEMPLATE_TEMPLATE_PARM.
2541 2007-08-31 Paolo Carlini <pcarlini@suse.de>
2544 * search.c (lookup_member): Check the name argument for
2547 2007-08-31 Paolo Carlini <pcarlini@suse.de>
2550 * parser.c (cp_parser_trait_expr): Check rerurn value of
2553 2007-08-30 Ollie Wild <aaw@google.com>
2555 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
2556 convert_ptrmem for pointer to member conversions.
2557 (convert_to_pointer_force): Update cp_convert_to_pointer call.
2558 (ocp_convert): Update cp_convert_to_pointer call.
2559 * typeck.c (convert_ptrmem): Add conditional for null pointers to
2561 (build_static_cast_1): Check can_convert for conversions in either
2563 (get_delta_difference_1): New function.
2564 (get_delta_difference): Refactor to call get_delta_difference_1.
2566 2007-08-30 Jakub Jelinek <jakub@redhat.com>
2568 * decl.c (start_preparsed_function): Set
2569 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
2571 2007-08-28 Paolo Carlini <pcarlini@suse.de>
2574 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
2575 BOUND_TEMPLATE_TEMPLATE_PARM.
2577 2007-08-28 Jakub Jelinek <jakub@redhat.com>
2581 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
2582 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
2584 2007-08-27 Jason Merrill <jason@redhat.com>
2587 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
2588 Look inside STMT_EXPR.
2589 * semantics.c (stmt_expr_value_expr): New fn.
2590 * cp-tree.h: Declare it.
2593 * decl.c (groktypename): Ignore attributes applied to class type.
2595 2007-08-28 Richard Guenther <rguenther@suse.de>
2597 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
2599 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
2601 * error.c (dump_expr): Handle COMPLEX_CST.
2602 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
2603 (pp_cxx_expression): Likewise.
2605 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
2607 * decl.c (GNU_INLINE_P): New.
2608 (duplicate_decls): Handle gnu_inline. Merge attributes and
2609 some flags in overriding definitions.
2610 (redeclaration_error_message): Handle gnu_inline.
2611 (start_preparsed_function): Likewise.
2613 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2615 * call.c (sufficient_parms_p): Constify.
2616 * class.c (same_signature_p): Likewise.
2617 * cp-gimplify.c (is_invisiref_parm,
2618 cxx_omp_privatize_by_reference): Likewise.
2619 * cp-objcp-common.c (has_c_linkage): Likewise.
2620 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
2621 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
2622 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
2623 num_artificial_parms_for, comp_template_parms,
2624 template_parameter_pack_p, any_dependent_template_arguments_p,
2625 any_type_dependent_arguments_p, any_value_dependent_elements_p,
2626 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
2627 zero_init_p, member_p, cp_lvalue_kind,
2628 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
2629 varargs_function_p, is_dummy_object, special_function_kind,
2630 string_conv_p, type_unknown_p, comp_except_specs, compparms,
2631 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
2632 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
2633 cp_has_mutable_p, at_least_as_qualified_p,
2634 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
2635 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
2636 * except.c (nothrow_libfn_p): Likewise.
2637 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
2639 * pt.c (comp_template_parms, template_parameter_pack_p,
2640 any_type_dependent_arguments_p, any_value_dependent_elements_p,
2641 any_dependent_template_arguments_p): Likewise.
2642 * repo.c (repo_export_class_p): Likewise.
2643 * semantics.c (anon_aggr_type_p): Likewise.
2644 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
2645 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
2646 varargs_function_p, member_p, is_dummy_object, pod_type_p,
2647 zero_init_p, special_function_p): Likewise.
2648 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
2649 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
2650 compparms, invalid_nonstatic_memfn_p,
2651 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
2652 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
2653 cp_has_mutable_p, lvalue_or_else): Likewise.
2655 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
2657 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
2658 * cp-objcp-common.c (cp_tree_size): Ditto.
2659 * tree.c (cp_walk_subtrees): Ditto
2660 * cp-tree.def (TINST_LEVEL): Go away.
2661 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
2662 move together with other non-tree structs.
2663 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
2664 (union lang_tree_node): Eliminate tinst_level field.
2665 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
2666 (current_instantiation, outermost_tinst_level): Return
2667 a "struct tinst_level *".
2669 * error.c (print_instantiation_partial_context): Change second
2670 parameter to a "struct tinst_level *". Replace accessor macros
2672 (print_instantiation_full_context): Likewise.
2673 * lex.c (in_main_input_context): Likewise.
2675 * pt.c (struct pending_templates): New.
2676 (pending_templates, last_pending_template): Use it as a type.
2677 (current_tinst_level): Change typo to "struct tinst_level *"
2678 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
2679 (add_pending_template): Construct a "struct pending_template".
2680 Replace TINST_LEVEL accessor macros with field access.
2681 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
2682 (pop_tinst_level): Likewise.
2683 (instantiate_pending_templates): Likewise. Factor common code used
2684 when an instantiation has been done.
2685 (outermost_tinst_level): Replace tree_last with loop.
2686 (current_instantiation): Return a "struct tinst_level *".
2688 2007-08-24 Ollie Wild <aaw@google.com>
2690 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
2691 * name-lookup.h (cp_binding_level): Remove vtables member.
2693 2007-08-24 Richard Guenther <rguenther@suse.de>
2695 * tree.c (cp_cannot_inline_tree_fn): Remove.
2696 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
2697 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
2700 2007-08-24 Jakub Jelinek <jakub@redhat.com>
2703 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
2704 error_mark_node right away if build_expr_type_conversion
2708 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
2709 is error_mark_node rather than NULL_TREE.
2710 * pt.c (check_explicit_specialization): Likewise.
2713 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
2714 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
2716 2007-08-22 Jason Merrill <jason@redhat.com>
2719 * pt.c (outermost_tinst_level): New function.
2720 * lex.c (in_main_input_context): New function.
2721 * cp-tree.h: Declare it.
2722 * decl2.c (constrain_class_visibility): Use it to avoid warning
2723 about uses of the anonymous namespace in the main input file.
2725 2007-08-21 Jakub Jelinek <jakub@redhat.com>
2727 * init.c (build_new_1): Use get_target_expr instead of save_expr.
2729 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
2732 * class.c (finish_struct_1): Warn when a class has virtual
2733 functions and accessible non-virtual destructor.
2735 2007-08-20 Richard Guenther <rguenther@suse.de>
2739 * call.c (build_new_method_call): Convert initializer to
2741 * init.c (build_aggr_init): Do not fiddle with types.
2742 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
2743 * except.c (build_throw): Do not drop qualifiers for the
2745 * typeck.c (get_member_function_from_ptrfunc): Do not
2746 fiddle with types, instead convert.
2747 (build_ptrmemfunc1): Convert to the target type for
2749 (gfc_trans_allocate): Convert result to target type.
2750 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
2751 pointer-to-member structures shall have alias set zero as well.
2753 2007-08-20 Richard Guenther <rguenther@suse.de>
2755 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
2757 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
2758 (nonstatic_local_decl_p): Likewise.
2759 * tree.c (cp_auto_var_in_fn_p): Remove.
2760 * decl.c (nonstatic_local_decl_p): Remove.
2762 2007-08-20 Richard Guenther <rguenther@suse.de>
2764 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
2766 * tree.h (cp_walk_tree): New define to walk_tree_1 with
2767 cp_walk_subtrees lh parameter.
2768 (cp_walk_tree_without_duplicates): New define to
2769 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
2770 * tree.c (count_trees): Call
2771 cp_walk_tree_without_duplicates.
2772 (verify_stmt_tree): Call cp_walk_tree.
2773 (break_out_target_exprs): Likewise.
2774 (WALK_SUBTREE): Likewise.
2775 * cp-gimplify.c (cp_genericize): Likewise.
2776 * cp-pt.c (find_parameter_packs_r): Likewise.
2777 (uses_parameter_packs): Likewise.
2778 (make_pack_expansion): Likewise.
2779 (check_for_bare_parameter_packs): Likewise.
2780 (for_each_template_parm): Likewise.
2781 * decl.c (check_default_argument): Call
2782 cp_walk_tree_without_duplicates.
2783 * except.c (build_throw): Likewise.
2784 * decl2.c (type_visibility): Likewise.
2785 * semantics.c (expand_or_defer_fn): Likewise.
2786 (finalize_nrv): Call cp_walk_tree.
2788 2007-08-20 Jakub Jelinek <jakub@redhat.com>
2791 * init.c (build_new_1): Rename placement_var variable to placement_expr.
2792 Initialize it with save_expr rather than get_temp_regvar.
2794 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
2797 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
2800 2007-08-17 Ollie Wild <aaw@google.com>
2803 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
2804 declarations into appropriate slots for comparison. Fix type
2807 2007-08-17 Paolo Carlini <pcarlini@suse.de>
2810 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
2811 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
2813 2007-08-17 Paolo Carlini <pcarlini@suse.de>
2816 * parser.c (cp_parser_class_head): Improve error message.
2818 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
2820 * pt.c (instantiate_decl): Set input_location
2821 for the function end.
2823 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2825 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
2827 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
2828 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
2829 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
2830 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
2831 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
2832 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
2833 * typeck.c (cp_type_quals): Likewise.
2834 * typeck2.c (cxx_incomplete_type_diagnostic,
2835 cxx_incomplete_type_error): Likewise.
2837 2007-08-16 Paolo Carlini <pcarlini@suse.de>
2840 * pt.c (tsubst_friend_function): When check_classfn
2841 returns error_mark_node likewise return it.
2843 2007-08-15 Jakub Jelinek <jakub@redhat.com>
2846 * typeck.c (check_return_expr): Don't NRV optimize vars in
2848 * decl.c (finish_function): Comment fix.
2850 2007-08-15 Paolo Carlini <pcarlini@suse.de>
2853 * pt.c (push_template_decl_real): Depending on TYPE_P
2854 use either TYPE_CONTEXT or DECL_CONTEXT.
2856 2007-08-14 Mark Mitchell <mark@codesourcery.com>
2858 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
2859 constructors and destructors return this.
2861 2007-08-14 Paolo Carlini <pcarlini@suse.de>
2864 * decl2.c (check_classfn): Return error_mark_node in case of error;
2865 in that case, do not call add_method.
2866 * decl.c (start_decl): Deal with check_classfn returning
2868 (grokfndecl): Likewise.
2869 * pt.c (tsubst_friend_function): Likewise.
2871 2007-08-14 Andrew Pinski <pinskia@gmail.com>
2874 * typeck.c (build_binary_op): Disallow vector float types with
2875 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
2877 2007-08-11 Ian Lance Taylor <iant@google.com>
2879 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
2881 * cp-tree.h (cxx_get_alias_set): Update declaration.
2883 2007-08-10 Ollie Wild <aaw@google.com>
2885 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
2887 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
2889 (unqualified_namespace_lookup): Fix ambiguous_decl call.
2890 (lookup_using_namespace): Fix ambiguous_decl call.
2891 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
2893 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2895 * call.c (name_as_c_string): Use CONST_CAST.
2896 * decl.c (build_decl): Likewise.
2897 * parser.c (cp_parser_string_literal): Likewise.
2899 2007-08-10 Paolo Carlini <pcarlini@suse.de>
2902 * error.c (dump_expr): Consistently use the *_cxx_*
2903 variants of the pretty-print functions.
2905 2007-08-10 Paolo Carlini <pcarlini@suse.de>
2908 * decl.c (check_special_function_return_type): Just error
2909 on return type specified for conversion operator.
2911 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
2913 * typeck2.c (readonly_error): Handle general expressions.
2914 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
2916 2007-08-06 Dan Hipschman <dsh@google.com>
2918 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
2919 access function name.
2921 2007-08-04 Alfred Minarik <a.minarik@aon.at>
2924 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
2925 * g++spec.c (lang_specific_driver): Check them.
2927 2007-08-06 Paolo Carlini <pcarlini@suse.de>
2930 * pt.c (inline_needs_template_parms): Fix comment; change return type
2933 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
2936 2007-03-26 Dirk Mueller <dmueller@suse.de>
2938 * parser.c (cp_parser_member_declaration): Pedwarn
2939 about stray semicolons after member declarations.
2941 2007-08-02 Lee Millward <lee.millward@gmail.com>
2946 * parser.c (cp_parser_asm_definition): Detect and discard asm
2947 statements with invalid inputs or outputs.
2948 (cp_parser_asm_operand_list): Return error mark node if any
2949 of the operands are invalid. Adjust documentation.
2951 2007-08-02 Nick Clifton <nickc@redhat.com>
2953 * typeck.c: Change copyright header to refer to version 3 of the
2954 GNU General Public License and to point readers at the COPYING3
2955 file and the FSF's license web page.
2956 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
2957 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
2958 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
2959 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
2960 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
2961 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
2962 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
2963 name-lookup.h, parser.c: Likewise.
2965 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2968 * call.c (magic_varargs_p): Honor the "type generic" attribute.
2970 2007-07-30 Paolo Carlini <pcarlini@suse.de>
2973 * semantics.c (finish_label_stmt): Reject the __label__
2974 extension outside function scopes.
2976 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2978 * parser.c (eof_token): Un-constify.
2979 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
2980 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
2983 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
2985 * pt.c, tree.c, typeck2.c: Fix comment typos.
2987 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
2988 Mark Mitchell <mark@codesourcery.com>
2991 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
2992 hidden due to friend declarations in local classes.
2994 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
2996 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
2997 * cp-tree.def (DECLTYPE_TYPE): New.
2998 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
2999 (dump_type_prefix): Ditto.
3000 (dump_type_suffix): Ditto.
3001 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
3002 * mangle.c (write_type): Handle DECLTYPE_TYPE.
3003 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
3005 (DECLTYPE_TYPE_EXPR): New.
3006 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
3007 (finish_declared_type): Declare.
3008 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
3009 DECLTYPE_TYPE nodes.
3010 (pp_cxx_type_id): Ditto.
3011 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
3012 (tsubst): Substitute into a DECLTYPE_TYPE node.
3013 (tsubst_copy): Ditto.
3014 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
3016 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
3017 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
3018 structural equality (because we can't hash the expressions).
3019 (finish_declared_type): New.
3020 * lex.c (reswords): Add "decltype" keyword.
3021 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
3022 (cp_parser_postfix_expression): Add member_access_only_p to
3023 restrict postfix expression to member access expressions.
3024 (cp_parser_unary_expression): Update call to
3025 cp_parser_postfix_expression to reflect new parameter.
3026 (cp_parser_declared_type): New.
3027 (cp_parser_simple_type_specifier): Parse decltype types.
3029 2007-07-27 Mark Mitchell <mark@codesourcery.com>
3032 * call.c (convert_for_arg_passing): Only widen bitfields to their
3033 declared types if necessary.
3035 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3037 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
3040 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3042 * decl.c (typename_hash, typename_compare): Constify.
3043 * mangle.c (hash_type, compare_type): Likewise.
3044 * pt.c (eq_local_specializations, hash_local_specialization):
3046 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
3047 list_hash): Likewise.
3048 * typeck2.c (pat_compare): Likewise.
3050 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
3052 * method.c (implicitly_declare_fn): Increase alignment if member
3053 function pointer format requires it.
3055 2007-07-24 Paolo Carlini <pcarlini@suse.de>
3058 * typeck.c (check_return_expr): Do not pass a null argument
3061 2007-07-24 Paolo Carlini <pcarlini@suse.de>
3064 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
3067 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
3070 * typeck.c (convert_arguments): Only use default args if we have
3074 * typeck.c (structural_comptypes): No need to check
3075 resolve_typename_type return value here.
3076 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
3077 * pt.c (resolve_typename_type): Follow typename typedefs. Return
3078 original type rather than error_mark_node in case of failure.
3079 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
3080 resolve_typename_type result check.
3081 (cp_parser_direct_declarator, cp_parser_head,
3082 cp_parser_constructor_declarator_p): Likewise.
3084 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
3086 * pt.c (template_parms_variadic_p): Remove.
3087 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
3089 2007-07-12 Jakub Jelinek <jakub@redhat.com>
3092 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
3093 argument to dump_aggr_init_expr_args instead of false.
3095 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
3097 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
3098 canonical types; otherwise, fall back to structural type
3099 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
3100 internal compiler error if the canonical types are wrong.
3102 2007-07-11 Paolo Carlini <pcarlini@suse.de>
3105 * parser.c (cp_parser_make_indirect_declarator): When the
3106 the code argument is ERROR_MARK return cp_error_declarator.
3108 2007-07-09 Geoffrey Keating <geoffk@apple.com>
3111 * decl.c (cxx_init_decl_processing): Don't set
3112 force_align_functions_log.
3113 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
3114 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
3115 FUNCTION_DECL, return its alignment.
3117 2007-07-09 Richard Guenther <rguenther@suse.de>
3119 * decl.c (start_preparsed_function): Do not promote return type.
3121 2007-07-08 Paolo Carlini <pcarlini@suse.de>
3124 * pt.c (unify): Never pass error_mark_node to template_decl_level.
3126 2007-07-07 Mark Mitchell <mark@codesourcery.com>
3129 * pt.c (resolve_overloaded_unification): Robustify. Return a
3131 (type_unification_real): Adjust accordingly.
3133 2007-07-06 Richard Guenther <rguenther@suse.de>
3135 * init.c (build_new_1): Use the correct pointer type.
3136 * typeck2.c (build_m_component_ref): Likewise.
3138 2007-07-05 Mark Mitchell <mark@codesourcery.com>
3141 * init.c (build_zero_init): Always build an initializer for
3143 * typeck2.c (build_functional_cast): Use build_zero_init.
3146 * init.c (build_new_1): Always pass the allocation function to
3147 build_op_delete_call.
3148 * call.c (build_op_delete_call): Handle operator delete with a
3149 variable-argument list. Do not issue an error when no matching
3150 deallocation function is available for a new operator.
3153 * cp-tree.h (any_value_dependent_elements_p): Declare it.
3154 * decl.c (value_dependent_init_p): New function.
3155 (cp_finish_decl): Use it.
3156 * pt.c (value_dependent_expression_p): Use
3157 any_value_dependent_elements_p.
3158 * parser.c (cp_parser_primary_expression): Add comment about
3159 treating dependent qualified names as integral
3160 constant-expressions.
3162 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
3164 * decl.c (build_ptrmemfunc_type): Always use structural equality
3165 tests when comparing pointer-to-member-function types, because the
3166 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
3169 2007-07-03 Mark Mitchell <mark@codesourcery.com>
3171 * init.c (build_new): Tweak comment.
3173 2007-06-29 Dave Brolley <brolley@redhat.com>
3176 * parser.c (cp_parser_new_type_id): Don't reduce a named array
3177 type to its base type and number of elements here.
3178 * init.c (build_new): Call complete_type_or_else to ensure that the
3179 type is complete and to issue a diagnostic if it is not.
3180 (build_new_1): Don't call complete_type_or_else here.
3182 2007-07-03 Richard Guenther <rguenther@suse.de>
3185 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
3188 2007-07-02 Simon Baldwin <simonb@google.com>
3190 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
3191 for inner-style nested forward declarations that don't declare
3194 2007-07-02 Jakub Jelinek <jakub@redhat.com>
3197 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
3198 DECL_P in not a variable and appears more than once error messages.
3200 2007-07-01 Ollie Wild <aaw@google.com>
3202 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
3203 (select_decl): Remove function.
3204 (unqualified_namespace_lookup): Populate binding by calling
3205 ambiguous_decl. Remove select_decl call.
3206 (lookup_qualified_name): Remove select_decl call.
3207 * decl.c (lookup_and_check_tag): Check for ambiguous references.
3208 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
3209 generation when name lookup is ambiguous.
3211 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
3214 * init.c (build_new_1): Use structural equality on the copy of the
3217 2007-06-28 Geoffrey Keating <geoffk@apple.com>
3219 * decl2.c (determine_visibility): Implement
3220 flag_visibility_ms_compat effect on type info.
3221 * decl.c (cxx_init_decl_processing): Implement
3222 global effect of flag_visibility_ms_compat.
3224 2007-06-28 Geoffrey Keating <geoffk@apple.com>
3226 * decl2.c (start_objects): Mark constructor-running function
3229 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
3232 * decl.c (grokdeclarator): Reset friendp for member functions declared
3233 friend of their own class.
3235 2007-06-23 Mark Mitchell <mark@codesourcery.com>
3237 * decl2.c (determine_visibility): Don't look for dllexport here.
3238 (determine_visibility_from_class): Tidy.
3240 2007-06-18 Simon Baldwin <simonb@google.com>
3243 * parser.c (cp_parser_single_declaration): Added check for storage
3244 class other than sc_none in parsed declaration, and a flag to indicate
3245 if the call is part of an explicit template specialization parse.
3246 * (cp_parser_explicit_specialization): Specialization check flag added
3247 to call to cp_parser_single_declaration(), set true.
3248 * (cp_parser_template_declaration_after_export): Specialization check
3249 flag added to call to cp_parser_single_declaration(), set false.
3250 * pt.c (check_explicit_specialization): Added code to copy visiblity
3251 and linkage from the templated function to the explicit specialization.
3253 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
3255 * typeck.c (build_binary_op): For templates build the
3256 expression in pieces to avoid the assert in build2_stat.
3257 (get_member_function_from_ptrfunc):
3258 Change over to using POINTER_PLUS_EXPR and convert
3259 the second operand to sizetype.
3260 * typeck2.c (build_m_component_ref): Likewise.
3261 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
3262 instead of PLUS_EXPR for pointers.
3263 (build_new_1): Likewise.
3264 (build_vec_delete_1): Likewise.
3265 (build_vec_delete): Likewise.
3266 * class.c (build_base_path): Likewise.
3267 (build_base_path): Likewise.
3268 (convert_to_base_statically): Likewise.
3269 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
3270 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
3271 instead of PLUS_EXPR.
3272 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
3273 instead of PLUS_EXPR for pointers.
3274 * call.c (build_special_member_call): Likewise.
3275 * rtti.c (build_headof): Likewise.
3276 Use sizetype instead of ptrdiff_type_node.
3277 (tinfo_base_init): Create a POINTER_PLUS_EXPR
3278 instead of PLUS_EXPR for pointers.
3279 * except.c (expand_start_catch_block): Do a
3280 NEGATIVE and then a POINTER_PLUS_EXPR instead
3282 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
3283 PLUS_EXPR on pointer types over to use
3284 POINTER_PLUS_EXPR and remove the conversion
3285 to the pointer types.
3286 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
3287 adding to a pointer type. Use size_int instead of
3288 ssize_int. Convert the index to sizetype before
3289 adding it to the pointer.
3291 2007-06-15 Mark Mitchell <mark@codesourcery.com>
3293 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
3294 (DECL_ANON_UNION_VAR_P): New macro.
3295 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
3296 than DECL_VAR_MARKED_P, to keep track of which variables we have
3298 * decl.c (redeclaration_error_message): Complain about redeclaring
3299 anonymous union members at namespace scope.
3300 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
3302 2007-06-14 Geoff Keating <geoffk@apple.com>
3304 * decl2.c (determine_visibility): Ensure that functions with
3305 hidden types as parameters are hidden.
3308 * decl2.c (determine_visibility): Remove duplicate code for
3311 2007-06-12 Ian Lance Taylor <iant@google.com>
3314 * init.c (avoid_placement_new_aliasing): New static function.
3315 (build_new_1): Call it.
3317 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
3319 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
3320 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
3322 2007-06-08 Jakub Jelinek <jakub@redhat.com>
3325 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
3326 on init, the non-decl cond operand and increment value.
3328 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
3331 * decl.c (check_initializer): Report an error when a brace enclosed
3332 initializer is used for a non-aggregate type in C++98.
3333 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
3335 (grokdeclarator): Likewise.
3336 (move_fn_p): Likewise.
3337 * typeck.c (check_return_expr): Likewise.
3338 * call.c (reference_binding): Likewise.
3339 * error.c (cp_cpp_error): Likewise.
3340 * pt.c (check_default_tmpl_args): Likewise.
3342 * lex.c (init_reswords): Likewise.
3343 * parser.c (p_parser_primary_expression): Likewise.
3344 (TOKEN_PRECEDENCE): Likewise.
3345 (cp_parser_init_declarator): Likewise.
3346 (cp_parser_ptr_operator): Likewise.
3347 (cp_parser_parameter_declaration): Likewise.
3348 (cp_parser_enclosed_template_argument_list): Likewise.
3349 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
3350 (cp_parser_next_token_ends_template_argument_p): Likewise.
3352 2007-06-04 Simon Baldwin <simonb@google.com>
3354 * decl.c (grokdeclarator): Readability change. Moved case labels
3355 into direct switch statement scope.
3357 2007-06-04 Paolo Carlini <pcarlini@suse.de>
3359 * call.c (convert_like_real): Remove pointless code.
3361 2007-05-31 Mark Mitchell <mark@codesourcery.com>
3363 * decl.c (get_atexit_fn_ptr_type): New function.
3364 (get_atexit_node): Use it.
3365 (start_cleanup_fn): Likewise.
3366 (register_dtor_fn): Use the object's destructor, instead of a
3367 separate cleanup function, where possible.
3368 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
3369 (atexit_fn_ptr_type_node): New macro.
3370 * decl2.c (build_cleanup): Use build_address.
3372 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
3374 * typeck.c (build_binary_op): Include types in error.
3376 2007-05-31 Jakub Jelinek <jakub@redhat.com>
3379 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
3380 needs runtime initialization.
3382 2007-05-31 Paolo Carlini <pcarlini@suse.de>
3385 * semantics.c (finish_trait_expr): Complete the types.
3387 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
3388 Douglas Gregor <doug.gregor@gmail.com>
3389 Pedro Lamarao <pedro.lamarao@mndfck.org>
3390 Howard Hinnant <howard.hinnant@gmail.com>
3394 * typeck.c (comptypes): Don't consider rvalue and lvalue
3395 reference types to be equivalent.
3396 (check_return_expr): Move from certain lvalues when returning
3398 * decl.c (grokdeclarator): Implement reference collapsing.
3399 (copy_fn_p): Don't consider constructors taking rvalue references
3400 to be copy constructors.
3402 * call.c (conversion): New "rvaluedness_matches_p" member.
3403 (convert_class_to_reference): Require reference type as first
3404 parameter instead of base type.
3405 (reference_binding): Add logic to handle rvalue references.
3406 (implicit_conversion): Update inaccurate comment.
3407 (convert_like_real): Disable creation of temporaries that are
3408 impossible to initialize for types with move constructors.
3409 (build_over_call): Elide move constructors when possible.
3410 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
3411 (maybe_handle_ref_bind): Return conversion instead of type node.
3412 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
3413 determine preferred conversion sequences.
3414 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
3415 (LOOKUP_PREFER_RVALUE): New.
3416 (DECL_MOVE_CONSTRUCTOR_P): New.
3417 (struct cp_declarator): Add "reference" member for reference
3418 types, with new "rvalue_ref" flag.
3419 (cp_build_reference_type): Declare.
3420 (move_fn_p): Declare.
3421 * error.c (dump_type_prefix): Format rvalue reference types
3422 correctly in error messages.
3423 * except.c (build_throw): Move from certain lvalues when
3425 * mangle.c (write_type): Mangle rvalue references differently
3426 than regular references.
3427 * parser.c (make_reference_declarator): Add boolean parameter for
3429 (cp_parser_make_indirect_declarator): New.
3430 (cp_parser_new_declarator_opt): Call
3431 cp_parser_make_indirect_declarator.
3432 (cp_parser_conversion_declarator_opt): Ditto.
3433 (cp_parser_declarator): Ditto.
3434 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
3436 * pt.c (tsubst): Implement reference collapsing.
3437 (maybe_adjust_types_for_deduction): Implement special template
3438 parameter deduction rule for rvalue references.
3439 (type_unification_real): Update calls to
3440 maybe_adjust_types_for_deduction.
3441 (try_one_overload): Ditto.
3442 (unify_pack_expansion): Ditto.
3443 * tree.c (lvalue_p_1): Handle rvalue reference types.
3444 (cp_build_reference_type): New.
3446 2007-05-30 Jakub Jelinek <jakub@redhat.com>
3449 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
3450 variables that need runtime initialization.
3452 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
3455 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
3456 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
3457 case POSTDECREMENT_EXPR>): Return the error_mark_node
3458 if either the real or imaginary parts would an
3461 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
3462 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3465 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
3466 token is a closing brace, false if there are no tokens left.
3467 (cp_parser_namespace_alias_definition): Only consume the next token if
3468 it is a closing brace.
3470 * parser.c (cp_parser_class_specifier): Likewise.
3472 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
3474 * semantics.c (finish_member_declaration): Fix a typo in the
3477 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
3489 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
3490 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
3491 * pt.c (check_for_bare_parameter_packs): Return bool indicated
3492 whether everything was okay. Fix indentation.
3493 (push_template_decl_real): Check for bare parameter packs in
3494 function parameters; where errors occur, mark the parameter types
3495 with ERROR_MARK_NODEs to avert ICEs.
3496 (coerce_template_parameter_pack): New.
3497 (coerce_template_parms): Moved parameter pack coercion into
3498 coerce_template_parameter_pack, and permit it anywhere in the
3499 template parameter list (not just at the end). Parameter and
3500 argument indices can vary (somewhat) separately now, so add
3501 PARM_IDX and ARG_IDX.
3502 (fn_type_unification): Don't set an argument pack as incomplete if
3503 no argument pack was deduced.
3504 (type_unification_real): If a type parameter is a parameter pack
3505 and has not otherwise been deduced, it will be deduced to an empty
3507 (more_specialized_fn): Use the actual lengths of the argument
3508 lists when comparing against expansions.
3509 * semantics.c (finish_member_declaration): If a field's type has
3510 bare parameter packs, error and set its type to ERROR_MARK_NODE.
3512 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
3515 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
3517 2007-05-22 Ollie Wild <aaw@google.com>
3519 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
3520 (unqualified_namespace_lookup): Adds check for hidden types.
3522 2007-05-22 Ollie Wild <aaw@google.com>
3524 * decl.c (duplicate_decls): Verify namespace names are unique.
3526 2007-05-21 Mark Mitchell <mark@codesourcery.com>
3528 * decl.c (cxx_maybe_build_cleanup): Handle
3529 __attribute__((cleanup)).
3531 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3533 * cvt.c (cp_convert_and_check): Don't check warnings if the
3536 2007-05-18 Geoffrey Keating <geoffk@apple.com>
3538 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
3540 2007-05-14 Paolo Carlini <pcarlini@suse.de>
3543 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
3544 type only if is a class type (5.2.8/4).
3546 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
3548 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
3549 * decl.c (grokdeclarator): Use unsigned_type_for instead of
3550 c_common_unsigned_type.
3552 2007-05-11 Silvius Rus <rus@google.com>
3554 * typeck.c (build_indirect_ref): Add call to
3555 strict_aliasing_warning.
3556 (build_reinterpret_cast_1): Condition call to
3557 strict_aliasing_warning.
3559 2007-05-11 Jan Hubicka <jh@suse.cz>
3561 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
3562 * decl2.c (start_objects): ctors and dtors are no longer public.
3563 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
3565 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
3567 * typeck.c (build_unary_op): Remove code that used to
3568 handle non lvalue increments/decrements.
3570 2007-05-07 Mike Stump <mrs@apple.com>
3572 * parser.c (check_empty_body): Add.
3573 (cp_parser_iteration_statement): Add call to check_empty_body.
3575 2007-05-05 Geoffrey Keating <geoffk@apple.com>
3578 * mangle.c (write_mangled_name): Mangle static variable names.
3579 (write_unqualified_name): Use local-source-name for
3580 namespace-scope static variables.
3582 2007-05-04 Dirk Mueller <dmueller@suse.de>
3584 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
3587 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
3590 * decl2.c (constrain_class_visibility):
3591 Use strip_pointer_or_array_types instead of strip_array_types.
3593 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
3596 * decl.c (reshape_init_r): Don't reshape the first element if it
3597 is a pointer to member function.
3599 2007-04-27 Simon Baldwin <simonb@google.com>
3601 * decl.c (grokparms): Changed message format from %qD to %qE.
3603 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
3605 * error.c (maybe_warn_variadic_templates): Variadic templates are
3606 now in C++0x, so only warn about them in C++98 mode.
3608 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
3611 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
3612 integeral types from vectors types.
3614 2007-04-26 Jakub Jelinek <jakub@redhat.com>
3617 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
3618 for type dependent OMP_CLAUSE_DECLs.
3620 2007-04-24 Mark Mitchell <mark@codesourcery.com>
3623 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
3624 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
3625 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
3626 * init.c (build_zero_init): Adjust, as
3627 COMPLEX_TYPE is now a SCALAR_TYPE.
3628 * typeck2.c (digest_init): Allow brace-enclosed initializers for
3629 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
3631 2007-04-25 Paolo Carlini <pcarlini@suse.de>
3633 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
3634 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
3635 (trait_expr_value): Adjust.
3637 2007-04-23 Simon Baldwin <simonb@google.com>
3639 * decl.c (grokparms): Added new error for duplicate function
3640 parameters names in function prototypes, to match gcc behavior.
3642 2007-04-23 Jan Hubicka <jh@suse.cz>
3644 * decl2.c (finish_objects): Do not call target constructor/destructor
3647 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
3649 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
3650 instead of checking GIMPLE_STMT_P in chain_next.
3652 2007-04-17 Mark Mitchell <mark@codesourcery.com>
3655 * call.c (convert_for_arg_passing): Convert bitfields to their
3658 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
3661 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
3663 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
3666 * decl2.c (constrain_class_visibility):
3667 Do not warn about the use of anonymous namespace in the main input file.
3669 2007-04-15 Mark Mitchell <mark@codesourcery.com>
3671 * cp-tree.h (current_template_parms): Fix typo in comment.
3673 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
3675 * cp-tree.h, error.c: Fix comment typos.
3677 2007-04-13 Jason Merrill <jason@redhat.com>
3680 * call.c (reference_binding): Add c_cast_p parm. If true,
3681 add quals to TO as needed to make it reference-compatible.
3683 2007-04-11 Jan Hubicka <jh@suse.cz>
3685 * class.c (convert_to_base_statically): Fold produced tree; verify
3686 that we are not processing template_decl.
3688 2007-04-09 Mark Mitchell <mark@codesourcery.com>
3691 * class.c (build_base_path): Ensure that the converted pointer has
3692 the same cv-qualification as the input.
3694 2007-04-09 Paolo Carlini <pcarlini@suse.de>
3696 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
3698 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
3700 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
3702 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
3703 * tree.c (cp_add_pending_fn_decls): Remove.
3704 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
3706 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
3708 Revert change removing staticp.
3710 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
3712 * cp-objcp-common.c (cxx_staticp): Remove.
3713 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
3714 * cp-tree.h (cxx_staticp):
3716 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
3718 * class.c (check_for_override): Don't remove dllmport attribute
3721 2007-04-03 Jakub Jelinek <jakub@redhat.com>
3724 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
3725 type issue error and return early.
3727 2007-03-30 Jason Merrill <jason@redhat.com>
3730 * typeck.c (cp_type_readonly): New fn.
3731 * cp-tree.h: Declare it.
3732 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
3733 (cp_finish_decl): Not here.
3735 2007-03-31 Richard Guenther <rguenther@suse.de>
3737 * optimize.c (maybe_clone_body): Replace splay-tree usage by
3740 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
3745 * parser.c (declarator_can_be_parameter_pack): New.
3746 (cp_parser_template_parameter): Only parse the `...' if the
3747 declarator can be a parameter pack.
3748 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
3750 * pt.c (find_parameter_packs_r): Look into the bounds on integer
3751 types (they could be used as array bounds).
3752 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
3753 (tsubst_pack_expansion): Handle failure to expand parameter
3756 2007-03-30 Paolo Carlini <pcarlini@suse.de>
3759 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
3760 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
3761 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
3762 (CLASS_TYPE_NON_UNION_P): Add.
3763 (struct lang_type_class): Add has_complex_dflt.
3764 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
3765 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
3766 * cp-tree.def: Add TRAIT_EXPR.
3767 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
3768 * lex.c (struct resword): Add __has_nothrow_assign,
3769 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
3770 __has_trivial_constructor, __has_trivial_copy,
3771 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
3772 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
3773 __is_pod, __is_polymorphic, __is_union.
3774 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
3775 (cp_parser_trait_expr): New.
3776 * semantics.c (finish_trait_expr, trait_expr_value
3777 classtype_has_nothrow_copy_or_assign_p): New.
3778 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
3780 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
3781 * class.c (check_bases, check_field_decl, check_bases_and_members):
3782 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
3783 * pt.c (uses_template_parms, tsubst_copy_and_build,
3784 value_dependent_expression_p, type_dependent_expression_p): Deal with
3786 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
3788 2007-03-29 Richard Guenther <rguenther@suse.de>
3790 * tree.c (cp_walk_subtrees): Do not set input_location.
3792 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
3795 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
3798 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
3800 * parser.c (struct cp_parser): Update comment for
3801 greater_than_is_operator_p.
3802 (cp_parser_primary_expression): In C++0x mode, a cast operator can
3803 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
3804 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
3805 !GREATER_THAN_IS_OPERATOR_P.
3806 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
3807 `>>' operators that will become two `>' tokens in C++0x.
3808 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
3809 mode, allowing it to terminate default arguments.
3810 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
3811 `>>' like two consecutive `>' tokens.
3812 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
3813 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
3814 ends a template argument.
3816 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
3818 * decl.c (redeclaration_error_message): Complain when redeclaring
3819 a friend function with default template arguments (C++0x mode only).
3820 * cp-tree.h (check_default_tmpl_args): Declare.
3821 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
3822 template arguments in function templates. Add support for checking
3823 the default template arguments of friend templates.
3824 (push_template_decl_real): Fix call to check_default_tmpl_args.
3825 (type_unification_real): If a template parameter has not been
3826 deduced but provides a default template argument, substitute into
3827 that default template argument.
3828 * parser.c (cp_parser_init_declarator): When declaring (but not
3829 defining!) a function template in C++0x mode, check for default
3832 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
3835 * decl.c (grokdeclarator): Deal with cv-qualified function type
3836 typedefs in the same way for member and non-member functions.
3838 2007-03-26 Dirk Mueller <dmueller@suse.de>
3840 * parser.c (cp_parser_member_declaration): Pedwarn
3841 about stray semicolons after member declarations.
3843 2007-03-26 Paolo Carlini <pcarlini@suse.de>
3846 * pt.c (instantiate_decl): Set in_system_header.
3848 2007-03-22 Mark Mitchell <mark@codesourcery.com>
3850 * cp-tree.h (current_tempalte_parms): Improve documentation.
3851 * pt.c (current_template_args): Likewise.
3854 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
3855 not consume tokens when failing.
3857 2007-03-22 Jim Wilson <wilson@specifix.com>
3858 Mark Mitchell <mark@codesourcery.com>
3861 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
3862 consistent with FROM.
3864 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3866 * error.c (dump_expr): Handle dependent names that designate types.
3867 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
3869 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
3871 * cp-tree.def, parser.c, pt.c: Fix comment typos.
3873 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3875 * cvt.c (cp_convert_and_check) : Define.
3876 * cp-tree.h (cp_convert_and_check): Declare.
3877 * call.c (convert_conversion_warnings): Rename to
3878 conversion_null_warnings. The warning for floating-point to
3879 integer is handled by convert_and_check in convert_like_real.
3880 (convert_like_real): convert_conversion_warnings was renamed as
3881 conversion_null_warnings.
3882 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
3883 overflow and changes of value during conversion.
3885 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3888 * parser.c (cp_parser_statement): If 'namespace' is found, this
3889 only can be a namespace alias definition, so parse it now.
3890 (cp_parser_namespace_alias_definition): if we find an open brace
3891 instead of '=', then this is actually a misplaced namespace
3894 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3897 * decl.c (cxx_init_decl_processing): Move command-line options
3898 processing to c-opts.c.
3900 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
3902 * ptree.c (cxx_print_type): Use formatting markup for integers
3903 when printing template parameter index/level/orig level.
3904 (cxx_print_xnode): Ditto.
3905 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
3906 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
3907 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
3909 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
3910 rather than a HOST_WIDE_INT.
3911 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
3912 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
3914 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
3915 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
3916 IN_BASE_INITIALIZER bool bitfields.
3917 (struct cp_declarator): Make KIND a 4-bit field. Make
3918 PARAMETER_PACK_P a bool bitfield just after KIND.
3919 * pt.c (uses_parameter_packs): Destroy the pointer set.
3920 (make_pack_expansion): Ditto.
3921 (check_for_bare_parameter_packs): Ditto.
3922 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
3924 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
3927 * call.c (convert_default_arg): Instead of copying the node,
3930 2007-03-15 Dirk Mueller <dmueller@suse.de>
3933 * call.c (convert_conversion_warnings): New..
3934 (convert_like_real): .. factored out from here.
3935 (convert_conversion_warnings): Add warning about
3936 false being converted to NULL in argument passing.
3938 2007-03-14 Dirk Mueller <dmueller@suse.de>
3940 * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
3941 (finish_do_body): Warn about empty body in do/while statement.
3943 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3945 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
3947 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3950 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
3953 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
3955 * repo.c (init_repo): Initialize random_seed saved options.
3956 (finish_repo): Adjust.
3958 2007-03-13 Mark Mitchell <mark@codesourcery.com>
3961 * Make-lang.in (doc/g++.1): Use $< to specify the location from
3964 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
3966 * decl.c (compute_array_index_type): New warning flag warn_vla.
3968 2007-03-12 Mark Mitchell <mark@codesourcery.com>
3971 * call.c (convert_default_arg): Copy non-constant arguments.
3973 2007-03-11 Mark Mitchell <mark@codesourcery.com>
3976 * parser.c (cp_parser_postfix_expression): Disallow compound
3977 literals in constant expressions.
3980 * semantics.c (finish_typeof): Use unlowered_expr_type.
3982 2007-03-10 Mark Mitchell <mark@codesourcery.com>
3985 * cp-tree.h (unlowered_expr_type): New function.
3986 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
3987 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
3988 (unlowered_expr_type): New function.
3989 (build_unary_op): Disallow predecrements of bool bitfields.
3990 * call.c (build_conditional_expr): Use unlowered_expr_type.
3991 * pt.c (type_unification_real): Likewise.
3993 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
3996 * typeck.c (check_return_expr): Check for bare parameter packs.
3997 (comptypes): Compare template parameter packs and
3998 type pack expansions.
3999 * decl.c (grokdeclarator): Deal with the declaration of function
4001 (grokparms): Verify that the (optional) function parameter pack is
4002 at the end of the parameter list.
4003 (xref_basetypes): Handle pack expansions in the base class.
4004 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
4005 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
4006 (NONTYPE_ARGUMENT_PACK): New.
4007 (TYPE_PACK_EXPANSION): New.
4008 (EXPR_PACK_EXPANSION): New.
4009 (ARGUMENT_PACK_SELECT): New.
4010 * cp-objcp-common.c (cp_tree_size): Compute size of
4011 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
4012 ARGUMENT_PACK_SELECT.
4013 * error.c (dump_template_argument): Print template argument packs.
4014 (dump_template_argument_list): Ditto.
4015 (dump_template_parameter): Dump `...' for template type parameter
4017 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
4018 (dump_parameters): Print function parameter packs.
4019 (dump_template_parms): Print template argument packs.
4020 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
4021 (maybe_warn_variadic_templates): New.
4022 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
4023 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
4024 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
4026 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
4027 (write_template_arg): Write argument packs as separate arguments.
4028 * cp-tree.h (struct template_parm_index_s): Add flag that
4029 indicates that the template parameter is actually a parameter
4031 (struct tree_argument_pack_select): New.
4032 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
4033 (union lang_tree_node): Add argument_pack_select.
4034 (FUNCTION_PARAMETER_PACK_P): New.
4035 (PACK_EXPANSION_P): New.
4036 (PACK_EXPANSION_PATTERN): New.
4037 (SET_PACK_EXPANSION_PATTERN): New.
4038 (PACK_EXPANSION_PARAMETER_PACKS): New.
4039 (ARGUMENT_PACK_P): New.
4040 (ARGUMENT_PACK_ARGS): New.
4041 (SET_ARGUMENT_PACK_ARGS): New.
4042 (ARGUMENT_PACK_INCOMPLETE_P): New.
4043 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
4044 (TEMPLATE_PARM_PARAMETER_PACK): New.
4045 (TEMPLATE_TYPE_PARAMETER_PACK): New.
4046 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
4047 (ARGUMENT_PACK_SELECT_INDEX): New.
4048 (ARGUMENT_PACK_SELECT_ARG): New.
4049 (struct cp_declarator): Add parameter_pack_p flag.
4050 (maybe_warn_variadic_templates): Declare.
4051 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
4052 indicate a template parameter pack.
4053 (uses_parameter_packs): Declare.
4054 (template_parameter_pack_p): Declare.
4055 (template_parms_variadic_p): Declare.
4056 (make_pack_expansion): Declare.
4057 (check_for_bare_parameter_packs): Declare.
4058 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
4059 sizeof... expressions.
4060 (pp_cxx_expression): Print pack expansions and non-type argument
4062 (pp_cxx_exception_specification): Print pack expansions.
4063 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
4064 (pp_cxx_ctor_initializer): Print pack expansions.
4065 (pp_cxx_type_id): Print pack expansions.
4066 (pp_cxx_template_argument_list): Print argument packs.
4067 (pp_cxx_template_parameter): Print ellipsis for template parameter
4069 * pt.c (comp_template_parms): Compare template parameter packs.
4070 (template_parameter_pack_p): New.
4071 (template_parms_variadic_p): New.
4072 (template_args_variadic_p): New.
4073 (make_ith_pack_parameter_name): New.
4074 (struct find_parameter_pack_data): New.
4075 (find_parameter_packs_r): New.
4076 (uses_parameter_packs): New.
4077 (make_pack_expansion): New.
4078 (check_for_bare_parameter_packs): New.
4079 (expand_template_argument_pack): New.
4080 (reduce_template_parm_level): Propagate parameter pack flag.
4081 (process_template_parm): Add is_parameter_pack parameter to state
4082 when the parameter is actually a parameter pack. Create template
4083 parameter packs when is_parameter_pack is true.
4084 (current_template_args): The argument for a template parameter
4085 pack is an argument pack containing a single pack expansion.
4086 (process_partial_specialization): When checking that non-type
4087 argument expressions do not involve template parameters, loop over
4088 the arguments in argument packs separately.
4089 (push_template_decl_real): Check that the type of the declaration
4090 does not have any bare parameter packs. Check that primary
4091 templates have no more than one parameter pack, and that it comes
4092 at the end of the template parameter list.
4093 (convert_template_argument): Handle coercions for pack expansion
4094 expressions by coercing the pattern then rebuilding the expansion.
4095 (coerce_template_parms): When coercing the arguments for a
4096 variadic template, pack "extra" arguments into an argument pack.
4097 (coerce_template_template_parms): Cannot coerce between parameter
4098 packs and non-pack parameters.
4099 (template_args_equal): Compare PACK_EXPANSION_P expressions.
4100 (comp_template_args): Expand all template arguments packs before
4101 comparing template argument lists.
4102 (mangle_class_name_for_template): Make argument packs as separate
4104 (for_each_template_parm_r): No need to handle BASELINK.
4105 (instantiate_class_template): Handle pack expansions in the base
4107 (tsubst_pack_expansion): New.
4108 (tsubst_template_args): Handle substitutions of argument packs and
4109 pack expansion into template argument lists.
4110 (tsubst_decl): Expand function parameter packs into separate
4111 function parameters.
4112 (tsubst_arg_types): Expand a type pack expansion into separate
4114 (tsubst_exception_specification): Handle pack expansions in
4115 exception specifiers.
4116 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
4117 replacing a template parameter with its argument. If we encounter
4118 a substitution for an argument pack, just return the parameter
4120 (tsubst_copy): sizeof(X...) returns the number of elements in
4121 parameter pack X. See through ARGUMENT_PACK_SELECT when the
4122 PARM_DECL is a parameter pack.
4123 (tsubst_expr): Expression pack expansions and argument packs
4124 cannot show up here; they will all be handled through function
4125 calls, sizeof, and template argument lists.
4126 (tsubst_copy_and_build): sizeof(X...) returns the number of
4127 elements in parameter pack X. Handle pack expansions in TREE_LIST
4128 and CONSTRUCTOR nodes.
4129 (fn_type_unification): Handle "incomplete" explicit template
4130 argument lists that specify some of the arguments for a template
4132 (type_unification_real): Unify arguments against pack expansions.
4133 (template_parm_level_and_index): New, helper function.
4134 (unify_pack_expansion): New.
4135 (unify): Unify argument packs on an argument-by-argument basis,
4136 handling variadic argument packs as well.
4137 (more_specialized_fn): Handle unification of function parameter
4138 packs. All things being equal, prefer non-variadic function
4139 templates to variadic function templates.
4140 (more_specialized_class): Prefer the variadic class template
4141 partial specialization that binds fewer arguments to a parameter
4143 (regenerate_decl_from_template): Expand function parameter packs
4144 into separate parameters.
4145 (instantiate_decl): Ditto.
4146 (tsubst_initializer_list): Handle pack expansions for base-class
4148 (dependent_type_p_r): Determine dependent types in argument packs
4149 and pack expansions.
4150 (value_dependent_expression_p): Determine value-dependence of
4151 non-type argument packs.
4152 (dependent_template_arg_p): Handle argument packs.
4153 * semantics.c (finish_cond): Check for bare parameter packs.
4154 (finish_expr_stmt): Ditto.
4155 (finish_for_expr): Ditto.
4156 (finish_switch_cond): Ditto.
4157 (finish_mem_initializers): Ditto.
4158 * name-lookup.c (arg_assoc_type): Handle pack expansions and
4160 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
4161 * parser.c (make_declarator): Declarator is not an expansion.
4162 (make_pointer_declarator): Transfer parameter pack flag to outer
4164 (make_reference_declarator): Ditto.
4165 (make_ptrmem_declarator): Ditto.
4166 (make_call_declarator): Ditto.
4167 (make_array_declarator): Ditto.
4168 (cp_parser_postfix_expression): Allow pack expansion expressions
4169 in the argument list for a call expression.
4170 (cp_parser_parenthesized_expression_list): Add new parameter
4171 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
4172 into separate arguments."
4173 (cp_parser_new_placement): Allow pack expansion expressions.
4174 (cp_parser_new_initializer): Ditto.
4175 (cp_parser_mem_initializer_list): Allow ellipsis to create a
4176 base-class initializer expansion.
4177 (cp_parser_mem_initializer): Ditto.
4178 (cp_parser_template_parameter_list): Keep track of whether the
4179 template parameter is a template parameter pack.
4180 (cp_parser_template_parameter): Parse the ellipsis to indicate a
4181 template parameter pack.
4182 (cp_parser_type_parameter): Ditto.
4183 (cp_parser_template_argument_list): Parse the ellipsis to indicate
4185 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
4186 this declarator is a parameter pack.
4187 (cp_parser_parameter_declaration): The ellipsis does not end the
4188 parameter declaration, because it might be a parameter pack. Parse
4189 the ellipsis to indicate a parameter pack.
4190 (cp_parser_initializer): Allow pack expansions.
4191 (cp_parser_initializer_list): Allow ellipsis to create an
4192 initializer expansion.
4193 (cp_parser_base_clause): Allow ellipsis to create a base specifier
4195 (cp_parser_type_id_list): Allow ellipsis to create an exception
4196 specifier expansion.
4197 (cp_parser_attribute_list): Don't allow pack expansions.
4198 (cp_parser_functional_cast): Allow pack expansions.
4199 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
4200 compute the length of a parameter pack.
4201 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
4202 end a template argument.
4203 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
4204 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
4207 2007-03-09 Dirk Mueller <dmueller@suse.de>
4209 * call.c (build_new_op): Call warn_logical_operator.
4211 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
4214 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
4217 * pt.c (any_template_arguments_need_structural_equality_p):
4220 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
4222 * decl.c (grokdeclarator): Disable warnings for anonymous
4225 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
4227 * typeck2.c (readonly_error): Always emit a hard error.
4228 Remove last argument.
4229 * cp-tree.h (readonly_error): Adjust prototype.
4230 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
4231 * typeck.c (build_unary_op): Likewise.
4232 (build_modify_expr): Likewise.
4234 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
4237 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
4239 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4242 * parser.c (struct cp_parser): New IN_IF_STMT.
4243 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
4244 returning if parsing the body of an 'if' statement or issuing an
4245 error and continuing.
4246 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
4248 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
4250 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
4253 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
4256 2007-03-02 Geoffrey Keating <geoffk@apple.com>
4258 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
4259 Objective-C++. Don't exit early if -shared-libgcc needs to be
4262 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4264 * typeck.c (common_base_type): Delete unused function.
4266 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
4268 * Make-lang.in: Add dummy lang.install-pdf target.
4270 2007-03-01 Simon Baldwin <simonb@google.com>
4273 * decl.c (check_tag_decl): Added new warning for typedef ignored
4274 when it precedes an otherwise valid non-typedef declaration.
4276 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
4278 * typeck.c (build_function_call): Store converted arguments
4279 in a stack-allocated array instead of building a list.
4280 (convert_arguments): Store arguments in the array passed in as an
4281 argument, and return the actual number of arguments.
4282 * call.c (build_call): Delete, and replace with...
4283 (build_call_n, build_call_a): New.
4284 (build_op_delete_call): Rewrite to avoid constructing argument lists.
4285 (build_over_call): Store converted arguments in a stack-allocated
4286 array instead of building a list.
4287 (build_cxx_call): Pass arguments in an array instead of as a list.
4288 (build_java_interface_fn_ref): Rewrite to avoid constructing
4290 * tree.h: Update declarations to reflect above changes.
4291 * method.c (use_thunk): Use a stack-allocated array to hold
4292 the arguments instead of a list.
4293 * rtti.c (throw_bad_cast): Update call to cxx_call.
4294 (throw_bad_typeid): Likewise.
4295 (build_dynamic_cast_1): Likewise.
4296 * init.c (build_builtin_delete_call): Use build_call_n.
4297 * decl.c (expand_static_init): Likewise.
4298 * except.c (cp_protect_cleanup_actions): Likewise.
4299 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
4300 (gimplify_must_not_throw_expr): Likewise.
4301 (cxx_omp_apply_fn): Use build_call_a.
4303 2007-02-26 Mark Mitchell <mark@codesourcery.com>
4305 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
4306 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
4308 2007-02-25 Mark Mitchell <mark@codesourcery.com>
4310 * cp-tree.h (static_ctors): Remove.
4311 * cp-tree.h (static_dtors): Likewise.
4312 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
4313 refactoring of tree_map hierarchy.
4314 (decl_shadowed_for_var_insert): Likewise.
4315 * semantics.c (expand_body): Use c_expand_body.
4316 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
4317 * decl2.c (static_ctors): Remove.
4318 (static_dtors): Likewise.
4319 (generate_ctor_or_dtor_function): Pass NULL_TREE to
4320 objc_generate_static_init_call. Do not call static_[cd]tors.
4321 (generate_ctor_and_dtor_functions_for_priority): Do not check for
4323 (cp_write_global_declarations): Likewise.
4325 2007-02-23 Richard Guenther <rguenther@suse.de>
4327 * class.c (note_name_declared_in_class): Make declaration
4328 changes meaning a pedwarn.
4330 2007-02-22 Michael Matz <matz@suse.de>
4333 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
4334 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
4335 dump_function_decl): Guard emitting outer scopes by new flag.
4336 * cp-lang.c (cxx_dwarf_name): New function.
4337 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
4338 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
4340 (push_template_decl_real, lookup_template_class): Remove calls
4343 2007-02-19 Mark Mitchell <mark@codesourcery.com>
4345 * call.c (build_new_method_call): Ensure that explicit calls of
4346 destructors have type "void".
4348 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4350 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
4351 and -Walways-true with -Waddress.
4352 * cvt.c (convert_to_void): Replace unconditional warning with
4355 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
4357 * decl.c, tree.c: Fix comment typos.
4359 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
4362 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
4363 statement expression if we had an error mark node.
4365 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
4366 Brooks Moses <brooks.moses@codesourcery.com>
4367 Lee Millward <lee.millward@codesourcery.com>
4369 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
4370 Change class to tcc_vl_exp.
4372 * call.c (build_call): Use build_call_list instead
4374 (build_over_call): Likewise.
4375 (build_new_method_call): Use build_min_non_dep_call_list
4376 instead of build_min_non_dep.
4378 * error.c (dump_call_expr_args): New function.
4379 (dump_aggr_init_expr_args): New function.
4380 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
4381 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
4383 * cvt.c (convert_to_void): Use build_call_array instead
4384 of build3; use new AGGR_INIT_EXPR accessor macros.
4386 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
4387 instead of TREE_CODE_LENGTH.
4389 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
4390 AGGR_INIT_EXPR accessor macros.
4392 * cp-gimplify.c (cp_gimplify_init_expr): Use
4393 AGGR_INIT_EXPR_SLOT to set the slot operand.
4395 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
4396 (AGGR_INIT_EXPR_SLOT): New macro.
4397 (AGGR_INIT_EXPR_ARG): New macro.
4398 (aggr_init_expr_nargs): New macro.
4399 (AGGR_INIT_EXPR_ARGP): New macro.
4400 (aggr_init_expr_arg_iterator): New.
4401 (init_aggr_init_expr_arg_iterator): New.
4402 (next_aggr_init_expr_arg): New.
4403 (first_aggr_init_expr_arg): New.
4404 (more_aggr_init_expr_args_p): New.
4405 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
4406 (stabilize_aggr_init): New declaration.
4407 (build_min_non_dep_call_list): Likewise.
4409 * tree.c (process_aggr_init_operands): New function.
4410 (build_aggr_init_array) New function.
4411 (build_cplus_new): Update to use new CALL_EXPR and
4412 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
4413 build_aggr_init_array.
4414 (build_min_non_dep_call_list) New function.
4415 (build_min_nt): Assert input code parameter is not a variable
4416 length expression class.
4417 (build_min, build_min_non_dep): Likewise.
4418 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
4419 to check for equality instead of recursing. Handle tcc_vl_exp
4421 (stabilize_call): Update to only handle CALL_EXPRs, not
4422 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
4423 (stabilize_aggr_init): New function.
4424 (stabilize_init): Use it.
4426 * cxx-pretty-print.c (pp_cxx_postfix_expression)
4427 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
4428 AGGR_INIT_EXPR accessor macros and argument iterators.
4430 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
4431 build_vl_exp. Iterate through the operands, recursively
4432 processing each one.
4433 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
4434 CALL_EXPR accessor macros.
4435 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
4436 tree code classes. Use TREE_OPERAND_LENGTH instead of
4439 * semantics.c (finish_call_expr): Use build_nt_call_list
4440 instead of build_nt.
4441 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
4442 accessor macros. Use build_call_array to construct the
4443 CALL_EXPR node instead of build3
4445 * decl2.c (build_offset_ref_call_from_tree): Use
4446 build_nt_call_list and build_min_non_dep_call_list instead
4447 of build_min_nt and build_min_non_dep.
4449 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
4450 Use build_nt_call_list instead of build_min_nt.
4452 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4455 * call.c (build_conditional_expr): Improve error message.
4457 2007-02-13 Dirk Mueller <dmueller@suse.de>
4459 * friend.c (do_friend): Annotate warning about friend
4460 declarations in templates with OPT_Wnon_template_friend.
4461 Convert informal message from warning() to inform().
4463 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
4464 Mark Mitchell <mark@codesourcery.com>
4467 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
4468 instantiations for variables.
4470 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4473 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
4474 Check warn_unused_value just once.
4476 2007-02-11 Mark Mitchell <mark@codesourcery.com>
4479 * pt.c (determine_specialization): Use skip_artificial_parms_for.
4480 (fn_type_unificiation): Likewise.
4481 (get_bindings): Likewise.
4483 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
4486 * decl.c (finish_function): Use DECL_REPLACEABLE.
4487 * tree.c (cp_cannot_inline_tree_fn): Likewise.
4489 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
4491 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
4493 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
4495 * decl.c (grokvardecl): Don't error if !have_tls.
4496 (grokdeclarator): Likewise.
4497 * parser.c (cp_parser_omp_threadprivate): Likewise.
4499 2007-02-07 Jakub Jelinek <jakub@redhat.com>
4502 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
4503 parameters and result decls in omp clauses.
4504 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
4507 2007-02-05 Dirk Mueller <dmueller@suse.de>
4510 * parser.c (cp_parser_class_specifier): Always initialize bases.
4512 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
4514 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
4515 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
4516 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
4518 * semantics.c (finish_omp_atomic): Store a whole expression node
4519 in operand 1, and integer_zero_node in operand 0, for dependent
4520 OMP_ATOMIC. Rewrite to make flow easier to understand.
4522 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4524 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
4526 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
4528 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
4529 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
4531 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
4533 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
4534 keyword warning to -Wc++0x-compat.
4536 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4538 * decl.c (grokdeclarator): Update documentation.
4540 2007-02-02 Jakub Jelinek <jakub@redhat.com>
4543 * decl.c (grokdeclarator): If __thread is used together with
4544 a storage class other than extern and static, clear thread_p
4545 after issuing diagnostics and fall through to checking the
4548 2007-01-30 Roger Sayle <roger@eyesopen.com>
4550 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
4551 calculating the size of an array (to avoid recursive errors).
4553 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4556 * typeck.c (build_binary_op): Fix logic for warning. Move warning
4558 * call.c (convert_like_real): Don't warn when converting to
4561 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4563 * decl.c (pop_label): Replace warning with call to
4564 warn_for_unused_label.
4566 2007-01-28 Andrew Pinski <pinskia@gmail.com>
4569 * semantics.c (finish_pseudo_destructor_expr): Check the
4570 destrutor name by calling check_dtor_name.
4572 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
4574 * lex.c (D_CPP0X): Rename.
4576 (reswords): D_CPP0X -> D_CXX0X.
4577 (init_reswords): Ditto.
4578 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
4579 of C++0x keywords as identifiers.
4581 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
4584 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
4587 2007-01-23 Ian Lance Taylor <iant@google.com>
4589 * typeck.c (convert_for_assignment): Only warn about a = b = c
4590 when converting to bool.
4592 2007-01-23 Roger Sayle <roger@eyesopen.com>
4594 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
4596 * typeck.c (ignore_overflows): Remove the remaining uses of
4597 TREE_CONSTANT_OVERFLOW.
4599 2007-01-20 Jan Hubicka <jh@suse.cz>
4601 * decl2.c (start_objects, start_static_storage_duration_function):
4602 Do not make the functions uninlinable.
4604 2007-01-17 Ian Lance Taylor <iant@google.com>
4606 * class.c (add_method): Call VEC_reserve_exact rather than passing
4607 a negative size to VEC_reserve.
4609 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
4612 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
4614 2007-01-10 Mark Mitchell <mark@codesourcery.com>
4617 * decl.c (make_typename_type): If the qualified name is not a
4618 type, issue an error.
4619 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
4622 2007-01-08 Geoffrey Keating <geoffk@apple.com>
4624 * rtti.c: Include target.h.
4625 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
4626 don't emit typeinfo for fundamental types as weak.
4627 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
4629 2007-01-08 Richard Guenther <rguenther@suse.de>
4631 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
4633 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
4635 * call.c (standard_conversion): Pass flag to
4636 vector_types_convertible_p to disallow emission of note.
4637 * typeck.c (convert_for_assignment): Pass flag to
4638 vector_types_convertible_p to allow emission of note.
4639 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
4640 to disallow emission of note.
4642 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4645 * typeck.c (build_binary_op): Call overflow_warning if
4646 TREE_OVERFLOW_P is true for the result and not for any of the
4649 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
4652 * class.c (add_method): Don't wait until template
4653 instantiation time to complain about duplicate methods.
4655 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4658 * semantics.c (finish_unary_op_expr): Warn only if result
4659 overflowed and operands did not.
4661 2007-01-05 Ian Lance Taylor <iant@google.com>
4663 * typeck.c (build_binary_op): Warn about comparing a non-weak
4666 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
4668 * pt.c (tsubst): Propagate the need for structural equality checks
4669 when reducing the level of template parameters.
4671 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
4673 * pt.c: Fix a comment typo.
4675 2007-01-02 Ian Lance Taylor <iant@google.com>
4677 * semantics.c (maybe_convert_cond): Optionally warn when using an
4678 assignment as a condition.
4679 * typeck.c (convert_for_assignment): Optionally warn about
4680 assigning the result of an assignment to a bool.
4682 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
4684 * pt.c (canonical_template_parms): Correct typo in comment.
4686 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
4688 * typeck.c (structural_comptypes): Renamed from "comptypes".
4689 (comptypes): Use canonical type information to perform fast type
4690 comparison. When VERIFY_CANONICAL_TYPES, verify that the
4691 canonical type comparison returns the same results as we would see
4692 from the current, structural check. Support COMPARE_STRUCTURAL
4693 when we need structural checks.
4694 * decl.c (typename_compare): Fix comment.
4695 (build_typename_type): TYPENAME_TYPE nodes require structural
4696 equality checks, because they resolve different based on the
4698 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
4699 require structural equality checks (for now).
4700 (build_ptrmemfunc_type): Build the canonical pointer to member
4702 (compute_array_index_type): Whenever we build a new index type
4703 to represent the size of an array in a template, we need to mark
4704 this index type as requiring structural equality. This goes for
4705 arrays with value-dependent sizes with the current ABI, or all
4707 * tree.c (cplus_array_hash): New.
4708 (struct cplus_array_info): New.
4709 (cplus_array_compare): New.
4710 (cplus_array_htab): New.
4711 (build_cplus_array_type_1): Use a hash table to cache the array
4712 types we build. Build the canonical array type for each array
4714 (cp_build_qualified_type_real): When building a cv-qualified array
4715 type, use the hash table of array types and build canonical array
4717 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
4718 use structural equality (for now).
4719 * cp-tree.h (COMPARE_STRUCTURAL): New.
4720 * pt.c (canonical_template_parms): New.
4721 (canonical_type_parameter): New.
4722 (process_template_parm): Find the canonical type parameter.
4723 (lookup_template_class): When we have named the primary template
4724 type, set the canonical type for our template class to the primary
4725 template type. If any of the template arguments need structural
4726 equality checks, the template class needs structural equality
4728 (tsubst): When reducing the level of a template template
4729 parameter, we require structural equality tests for the resulting
4730 parameter because its template parameters have not had their types
4731 canonicalized. When reducing a template type parameter, find the
4732 canonical reduced type parameter.
4733 (any_template_arguments_need_structural_equality_p): New.