1 2008-05-21 Tom Tromey <tromey@redhat.com>
3 * mangle.c (save_partially_mangled_name): Remove.
4 (restore_partially_mangled_name): Likewise.
5 (write_encoding): Update.
6 (write_unqualified_name): Likewise.
7 (start_mangling): Always use name_obstack. Remove 'ident_p'
9 (get_identifier_nocopy): Remove.
10 (finish_mangling_internal): Rename from finish_mangling.
11 (finish_mangling): New function.
12 (finish_mangling_get_identifier): Likewise.
13 (partially_mangled_name, partially_mangled_name_len): Remove.
14 (mangle_decl_string): Change return type. Update.
15 (mangle_decl, mangle_type_string, mangle_special_for_type,
16 mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
17 mangle_ref_init_variable): Update.
19 2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
22 * semantics.c (begin_class_definition): Extend checks on the first
25 2008-05-12 Tomas Bily <tbily@suse.cz>
27 * typeck2.c (digest_init): Use CONVERT_EXPR_P.
28 * call.c (build_over_call): Likewise.
29 * error.c (dump_expr): Use CASE_CONVERT.
30 * class.c (fixed_type_or_null): Likewise.
32 2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
34 * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
36 (cp_parser_omp_clause_schedule): Remove superfluous "expected"
39 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
41 * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
42 DECL_LOOPING_CONST_OR_PURE_P attributes.
43 * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
46 2008-05-02 Simon Baldwin <simonb@google.com>
49 * typeck.c (build_array_ref): Remove warn_array_subscript_range.
51 2008-05-01 Simon Baldwin <simonb@google.com>
53 * typeck.c (build_array_ref): Call warn_array_subscript_range.
55 2008-04-30 Jakub Jelinek <jakub@redhat.com>
58 * pt.c (more_specialized_fn): Stop the loop even if there are no
59 arguments before ellipsis.
61 2008-04-29 Jakub Jelinek <jakub@redhat.com>
64 * parser.c (cp_parser_lookup_name): Look through single function
68 * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
69 COMPOUND_EXPR if the second argument would be error_mark_node.
71 2008-04-28 Jason Merrill <jason@redhat.com>
72 Liu Guanwei <liu_gw@163.com>
75 * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
78 2008-04-25 Jan Hubicka <jh@suse.cz>
80 * typeck.c (check_return_expr): Update.
81 * decl.c (start_preparsed_function): Update.
82 * method.c (use_thunk): Update.
84 2008-04-24 Jakub Jelinek <jakub@redhat.com>
87 * cp-tree.h (cp_reconstruct_complex_type): New prototype.
88 * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
89 * decl2.c (is_late_template_attribute): Only make vector_size
90 late tmpl attribute if argument is type or value dependent.
91 (cp_reconstruct_complex_type): New function.
93 2008-04-24 Richard Guenther <rguenther@suse.de>
95 * typeck.c (cp_build_function_call): Call
96 check_builtin_function_arguments.
98 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
100 * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
101 (build_ptrmemfunc1): Don't set TREE_INVARIANT.
102 * init.c (build_zero_init): Don't set TREE_INVARIANT.
103 * class.c (build_base_path): Don't set TREE_INVARIANT.
104 (build_vtbl_ref_1): Don't set TREE_INVARIANT.
105 (build_vtbl_initializer): Don't set TREE_INVARIANT.
106 * decl.c (build_enumerator): Don't set TREE_INVARIANT.
107 * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
108 (generic_initializer): Don't set TREE_INVARIANT.
109 (ptr_initializer): Don't set TREE_INVARIANT.
110 (ptm_initializer): Don't set TREE_INVARIANT.
111 (class_initializer): Don't set TREE_INVARIANT.
112 * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
113 * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
114 (build_template_parm_index): Don't set TREE_INVARIANT.
115 (reduce_template_parm_level): Don't set TREE_INVARIANT.
116 (process_template_parm): Don't set TREE_INVARIANT.
118 2008-04-22 Jason Merrill <jason@redhat.com>
121 * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
122 to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
123 * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
125 2008-04-22 Jakub Jelinek <jakub@redhat.com>
128 * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
129 expression is errorneous.
131 2008-04-21 Jason Merrill <jason@redhat.com>
134 * tree.c (cp_tree_equal): Handle FIXED_CST.
137 * pt.c (template_template_parm_bindings_ok_p): Set
138 processing_template_decl while in this function.
140 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
142 * cvt.c (type_promotes_to): Support char16_t and char32_t.
143 * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
144 char16_t and char32_t.
145 * lex.c (reswords): Add char16_t and char32_t (for c++0x).
146 * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
147 extended builtin type "u8char{16,32}_t".
148 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
150 (cp_lexer_print_token): Support CPP_STRING{16,32}.
151 (cp_parser_is_string_literal): Idem.
152 (cp_parser_string_literal): Idem.
153 (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
155 (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
156 * tree.c (char_type_p): Support char16_t and char32_t as char types.
157 * typeck.c (string_conv_p): Support char16_t and char32_t.
159 2008-04-17 Jason Merrill <jason@redhat.com>
162 * call.c (build_user_type_conversion_1): Represent second step of
163 copy-init with an rvalue conversion.
164 (convert_like_real) [ck_user]: Don't implicitly add it here.
166 2008-04-15 Jakub Jelinek <jakub@redhat.com>
169 * decl.c (layout_var_decl): If extern or static var has variable
170 size, set TREE_TYPE (decl) to error_mark_node.
172 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
175 * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
178 2008-04-09 Jason Merrill <jason@redhat.com>
181 * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
182 not a pushed variable.
184 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
186 * call.c (build_op_delete_call): Fix quotation in warning message.
187 * decl.c (grokdeclarator): Quote keyword in error message.
188 * pt.c (check_for_bare_parameter_packs): Fix quotation in error
191 * parser.c (cp_parser_check_type_definition): Print error string
192 directly rather than using "%s".
193 (cp_parser_postfix_expression): Fix quotation.
194 (cp_parser_decltype): Likewise.
195 (cp_parser_sizeof_operand): Fix quotation. Simplify.
197 * parser.c (cp_parser_non_integral_constant_expression): Build error
198 message with CONCAT rather than using "%s".
199 (cp_parser_primary_expression): Fix quotation.
200 (cp_parser_postfix_expression): Likewise.
201 (cp_parser_postfix_dot_deref_expression): Likewise.
202 (cp_parser_unary_expression): Likewise.
203 (cp_parser_new_expression): Likewise.
204 (cp_parser_delete_expression): Likewise.
206 * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
207 as `)', not as `('. Fix quotation.
208 (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
209 (cp_parser_primary_expression): Likewise.
210 (cp_parser_nested_name_specifier_opt): Likewise.
211 (cp_parser_postfix_expression): Likewise.
212 (cp_parser_postfix_open_square_expression): Likewise.
213 (cp_parser_parenthesized_expression_list): Likewise.
214 (cp_parser_pseudo_destructor_name): Likewise.
215 (cp_parser_new_expression): Likewise.
216 (cp_parser_direct_new_declarator): Likewise.
217 (cp_parser_delete_expression): Likewise.
218 (cp_parser_cast_expression): Likewise.
219 (cp_parser_question_colon_clause): Likewise.
220 (cp_parser_builtin_offsetof): Likewise.
221 (cp_parser_trait_expr): Likewise.
222 (cp_parser_label_for_labeled_statement): Likewise.
223 (cp_parser_compound_statement): Likewise.
224 (cp_parser_selection_statement): Likewise.
225 (cp_parser_condition): Likewise.
226 (cp_parser_iteration_statement): Likewise.
227 (cp_parser_already_scoped_statement): Likewise.
228 (cp_parser_simple_declaration): Likewise.
229 (cp_parser_linkage_specification): Likewise.
230 (cp_parser_static_assert): Likewise.
231 (cp_parser_decltype): Likewise.
232 (cp_parser_conversion_function_id): Likewise.
233 (cp_parser_operator_function_id): Likewise.
234 (cp_parser_operator): Likewise.
235 (cp_parser_type_parameter): Likewise.
236 (cp_parser_template_id): Likewise.
237 (cp_parser_explicit_instantiation): Likewise.
238 (cp_parser_explicit_specialization): Likewise.
239 (cp_parser_enum_specifier): Likewise.
240 (cp_parser_namespace_definition): Likewise.
241 (cp_parser_namespace_alias_definition): Likewise.
242 (cp_parser_using_declaration): Likewise.
243 (cp_parser_using_directive): Likewise.
244 (cp_parser_asm_definition): Likewise.
245 (cp_parser_direct_declarator): Likewise.
246 (cp_parser_ptr_operator): Likewise.
247 (cp_parser_parameter_declaration_clause): Likewise.
248 (cp_parser_initializer_clause): Likewise.
249 (cp_parser_class_specifier): Likewise.
250 (cp_parser_member_specification_opt): Likewise.
251 (cp_parser_member_declaration): Likewise.
252 (cp_parser_pure_specifier): Likewise.
253 (cp_parser_constant_initializer): Likewise.
254 (cp_parser_base_clause): Likewise.
255 (cp_parser_exception_specification_opt): Likewise.
256 (cp_parser_try_block): Likewise.
257 (cp_parser_function_try_block): Likewise.
258 (cp_parser_handler): Likewise.
259 (cp_parser_throw_expression): Likewise.
260 (cp_parser_asm_operand_list): Likewise.
261 (cp_parser_attributes_opt): Likewise.
262 (cp_parser_label_declaration): Likewise.
263 (cp_parser_constructor_declarator_p): Likewise.
264 (cp_parser_template_declaration_after_export): Likewise.
265 (cp_parser_single_declaration): Likewise.
266 (cp_parser_objc_message_expression): Likewise.
267 (cp_parser_objc_message_args): Likewise.
268 (cp_parser_objc_encode_expression): Likewise.
269 (cp_parser_objc_defs_expression): Likewise.
270 (cp_parser_objc_protocol_expression): Likewise.
271 (cp_parser_objc_selector_expression): Likewise.
272 (cp_parser_objc_protocol_refs_opt): Likewise.
273 (cp_parser_objc_typename): Likewise.
274 (cp_parser_objc_method_keyword_params): Likewise.
275 (cp_parser_objc_superclass_or_category): Likewise.
276 (cp_parser_objc_try_catch_finally_statement): Likewise.
277 (cp_parser_objc_synchronized_statement): Likewise.
278 (cp_parser_objc_throw_statement): Likewise.
279 (cp_parser_omp_var_list_no_open): Likewise.
280 (cp_parser_omp_clause_default): Likewise.
281 (cp_parser_omp_clause_if): Likewise.
282 (cp_parser_omp_clause_num_threads): Likewise.
283 (cp_parser_omp_clause_reduction): Likewise.
284 (cp_parser_omp_clause_schedule): Likewise.
285 (cp_parser_omp_critical): Likewise.
286 (cp_parser_omp_for_loop): Likewise.
287 (cp_parser_omp_sections_scope): Likewise.
289 * parser.c (cp_parser_template_parameter_list): Simplify.
291 2008-04-07 James E. Wilson <wilson@tuliptree.org>
293 * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
295 2008-04-07 Jason Merrill <jason@redhat.com>
298 * class.c (type_has_user_nondefault_constructor): A template
299 counts as a nondefault constructor.
301 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
303 * decl.c (cxx_push_function_context): Delete.
304 (cxx_pop_function_context): Delete.
305 (start_preparsed_function): Merge cxx_push_function_context (!f->decl
307 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
308 LANG_HOOKS_FUNCTION_FINAL): Delete.
309 (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
310 LANG_HOOKS_MISSING_NORETURN_OK_P.
311 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
313 * semantics.c (current_stmt_tree): Fix comment.
315 2008-04-03 Jakub Jelinek <jakub@redhat.com>
318 * semantics.c (finish_offsetof): Undo effect of convert_from_reference
319 before calling fold_offsetof.
321 2008-04-03 Tom Tromey <tromey@redhat.com>
323 * Make-lang.in (c++_OBJS): New variable.
325 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
327 * optimize.c (clone_body): New, from tree-inline.c.
329 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
331 * method.c (synthesize_method): Use {push,pop}_function_context.
332 * name-lookup.c (push_to_top_level): Likewise.
333 * parser.c (cp_parser_late_parsing_for_member): Likewise.
335 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
338 * parser.c (cp_parser_decl_specifier_seq): Add location to error
341 2008-03-27 Tom Tromey <tromey@redhat.com>
343 * Make-lang.in: Revert automatic dependency patch.
345 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
348 * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
349 (build_compound_expr): New, for compatibility with C
351 (cp_build_compound_expr): Renamed from build_compound_expr.
352 (build_c_cast): New, for compatibility with C build_c_cast.
353 (cp_build_c_cast): Renamed from build_c_cast.
354 * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
355 * decl.c (cxx_maybe_build_cleanup): Ditto.
356 * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
357 (cp_build_compound_expr): Renamed from build_compound_expr.
358 (build_c_cast): Add C-compatible prototype.
359 (cp_build_c_cast): Renamed from build_c_cast.
360 * typeck2.c (build_functional_cast): Use cp_build_c_cast.
361 * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
363 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
365 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
366 tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
367 ending in a pack expansion, both of which can occur when
368 substituting into a nested template.
369 (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
370 instantiating the sizeof...(X) form, make tsubst_copy do the work.
371 * parser.c (cp_parser_template_parameter): Deal with unnamed
372 non-type template parameter packs identified by pack expansions in
375 2008-03-26 Jakub Jelinek <jakub@redhat.com>
378 * pt.c (apply_late_template_attributes): Don't call tsubst on
379 first attribute argument if it is IDENTIFIER_NODE.
382 * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
383 and LTGT_EXPR to pp_expression.
385 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
387 * pt.c (coerce_template_template_parm): Moved the body of the loop
388 of coerce_template_template_parms here, to make iteration over a
389 template argument pack simpler.
390 Also, allow matching of a template parameter pack in the template
391 template parameter to a template parameter in the template
393 (coerce_template_template_parms): Deal with variadic template
394 template parameters. Use coerce_template_template_parm.
395 (unify): Make sure we coerce the template template argument's
396 template arguments to the template template parameter's template
397 parameters, not the other way around.
399 2008-03-25 Tom Tromey <tromey@redhat.com>
401 * Make-lang.in: Remove .o targets.
402 (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
404 (c++_OBJS): New variable.
405 (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
407 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
409 * typeck.c (composite_pointer_type_r): Add SFINAE support.
410 (composite_pointer_type): Ditto.
411 (common_type): Fix call to composite_pointer_type.
412 (cxx_sizeof_nowarn): New; used to be a macro.
413 (cxx_sizeof_expr): Add SFINAE support.
414 (cxx_alignof_expr): Ditto.
415 (decay_conversion): Fix calls for SFINAE support.
416 (rationalize_conditional_expr): Add SFINAE support.
417 (build_class_member_access_expr): Ditto.
418 (finish_class_member_access_expr): Ditto.
419 (build_x_indirect_ref): Ditto.
420 (build_indirect_ref): Original version renamed to
421 cp_build_indirect_ref; new version provides a bridge from
423 (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
425 (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
426 (build_function_call): Original version renamed to
427 cp_build_function_call; new version provides a bridge from
429 (cp_build_function_call): Was build_function_call; added SFINAE
431 (convert_arguments): Add SFINAE support.
432 (build_x_binary_op): Ditto.
433 (build_binary_op): Original version renamed to cp_build_binary_op;
434 new version provides a bridge from c-common.
435 (cp_build_binary_op): Was build_binary_op; added SFINAE support.
436 (pointer_diff): Fix calls for SFINAE.
437 (build_x_unary_op): Add SFINAE support.
438 (condition_conversion): Fix calls for SFINAE.
439 (build_unary_op): Original version renamed to cp_build_unary_op;
440 new version provides a bridge from c-common.
441 (cp_build_unary_op): Was build_unary_op; added SFINAE support.
442 (unary_complex_lvalue): Fix calls for SFINAE.
443 (build_x_conditional_expr): Add SFINAE support.
444 (build_x_compound_expr_from_list): Fix calls for SFINAE.
445 (build_x_compound_expr): Add SFINAE support.
446 (convert_ptrmem): Fix calls for SFINAE.
447 (build_static_cast_1): Add SFINAE support.
448 (build_static_cast): Ditto.
449 (build_reinterpret_cast_1): Ditto.
450 (build_reinterpret_cast): Ditto.
451 (build_const_cast_1): Ditto.
452 (build_const_cast): Ditto.
453 (build_c_cast): Ditto.
454 (build_modify_expr): Original version renamed to
455 cp_build_modify_expr; new version provides a bridge from c-common.
456 (cp_build_modify_expr): Was build_modify_expr; added SFINAE
458 (build_x_modify_expr): Add SFINAE support.
459 (build_ptrmemfunc): Fix calls for SFINAE.
460 (convert_for_assignment): Add SFINAE support.
461 (convert_for_initialization): Ditto.
462 (check_return_expr): Fix calls for SFINAE.
463 (lvalue_or_else): Add SFINAE support.
464 * init.c (perform_member_init): Fix calls for SFINAE.
465 (emit_mem_initializers): Ditto.
466 (expand_virtual_init): Ditto.
467 (expand_cleanup_for_base): Ditto.
468 (build_aggr_init): Add SFINAE support.
469 (expand_default_init): Ditto.
470 (expand_aggr_init_1): Fix calls for SFINAE.
471 (build_offset_ref): Ditto.
472 (build_new_1): Add SFINAE support.
474 (build_vec_delete_1): Fix calls for SFINAE.
475 (get_temp_regvar): Ditto.
476 (build_vec_init): Add SFINAE support.
477 (build_dtor_call): Fix calls for SFINAE.
478 (build_delete): Ditto.
479 (push_base_cleanups): Ditto.
480 (build_vec_delete_1): Ditto.
481 * class.c (build_base_path): Fix calls for SFINAE.
482 (build_simple_base_path): Ditto.
483 (convert_to_base_statically): Ditto.
484 (build_vfn_ref): Ditto.
485 (resolve_address_of_overloaded_function): Ditto.
486 * decl.c (check_initializer): Fix calls for SFINAE.
487 (register_dtor_fn): Ditto.
488 (compute_array_index_type): Ditto.
489 (finish_enum): Ditto.
490 (start_preparsed_function): Ditto.
491 (cxx_maybe_build_cleanup): Ditto.
492 * call.c (convert_like): Add COMPLAIN argument.
493 (convert_like_with_context): Ditto.
494 (build_this): Fix calls for SFINAE.
495 (build_user_type_conversion): Ditto.
496 (resolve_args): Ditto.
497 (build_new_function_call): Add SFINAE support.
498 (build_operator_new_call): Fix calls for SFINAE.
499 (build_object_call): Add SFINAE support.
500 (build_conditional_expr): Ditto.
501 (build_new_op): Ditto.
502 (build_op_delete_call): Fix calls for SFINAE.
504 (convert_like_real): Add SFINAE support.
505 (build_x_va_arg): Fix calls for SFINAE.
506 (convert_default_arg): Ditto.
507 (build_over_call): Add SFINAE support.
508 (build_java_interface_fn_ref): Fix calls for SFINAE.
509 (build_special_member_call): Add SFINAE support.
510 (build_new_method_call): Ditto.
511 (perform_implicit_conversion): Ditto.
512 (perform_direct_initialization_if_possible): Ditto.
513 (initialize_reference): Fix calls for SFINAE.
514 * method.c (do_build_assign_ref): Fix calls for SFINAE.
515 * rtti.c (build_headof): Fix calls for SFINAE.
516 (get_tinfo_decl_dynamic): Ditto.
518 (build_dynamic_cast_1): Add SFINAE support.
519 (build_dynamic_cast): Ditto.
520 (tinfo_base_init): Fix calls for SFINAE.
521 * except.c (do_get_exception_ptr): Fix calls for SFINAE.
522 (do_end_catch): Ditto.
523 (initialize_handler_parm): Ditto.
524 (expand_start_catch_block): Ditto.
525 (do_allocate_exception): Ditto.
526 (do_free_exception): Ditto.
527 (build_throw): Ditto.
528 * cvt.c (build_up_reference): Fix calls for SFINAE.
529 (convert_to_reference): Ditto.
530 (ocp_convert): Ditto.
531 (convert_to_void): Add SFINAE support.
532 * tree.c (build_dummy_object): Fix calls for SFINAE.
533 (stabilize_expr): Ditto.
534 * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
536 (build_new_method_call): Ditto.
537 (build_special_member_call): Ditto.
538 (build_new_op): Ditto.
539 (perform_implicit_conversion): Ditto.
540 (perform_direct_initialization_if_possible): Ditto.
541 (convert_to_void): Ditto.
542 (build_aggr_init): Ditto.
544 (build_vec_init): Ditto.
545 (build_dynamic_cast): Ditto.
546 (finish_call_expr): Ditto
547 (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
548 (cxx_sizeof_nowarn): Remove macro; add function declaration.
549 (build_class_member_access_expr): Add tsubst_flags_t parameter.
550 (finish_class_member_access_expr): Ditto.
551 (build_x_indirect_ref): Ditto.
552 (cp_build_indirect_ref): New.
553 (cp_build_function_call): Add tsubst_flags_t parameter.
554 (build_x_unary_op): Ditto.
555 (cp_build_unary_op): New.
556 (build_x_conditional_expr): Add tsubst_flags_t parameter.
557 (build_x_compound_expr): Ditto.
558 (build_compound_expr): Ditto.
559 (build_static_cast): Ditto.
560 (build_reinterpret_cast): Ditto.
561 (build_const_cast): Ditto.
562 (build_c_cast): Ditto.
563 (build_x_modify_expr): Ditto.
564 (cp_build_modify_expr): New.
565 (convert_for_initialization): Add tsubst_flags_t parameter.
566 (cp_build_binary_op): Remove macro; add function declaration.
567 (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
568 (lvalue_or_else): Ditto.
569 (build_functional_cast): Ditto.
570 * typeck2.c (digest_init): Fix calls for SFINAE.
571 (process_init_constructor_array): Ditto.
572 (process_init_constructor_record): Ditto.
573 (build_x_arrow): Ditto.
574 (build_m_component_ref): Ditto.
575 (build_functional_cast): Add SFINAE support.
576 * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
577 * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
578 (finish_expr_stmt): Ditto.
579 (finish_for_expr): Ditto.
580 (finish_asm_stmt): Ditto.
581 (finish_non_static_data_member): Ditto.
582 (finish_qualified_id_expr): Ditto.
583 (finish_call_expr): Add SFINAE support.
584 (finish_increment_expr): Fix calls for SFINAE.
585 (finish_unary_op_expr): Ditto.
586 (simplify_aggr_init_expr): Ditto.
587 (finish_omp_clauses): Ditto.
588 (finish_omp_for): Ditto.
589 (finish_omp_barrier): Ditto.
590 (finish_omo_flush): Ditto.
591 * decl2.c (grok_array_decl): Fix calls or SFINAE.
592 (build_anon_union_vars): Ditto.
593 (get_guard_cond): Ditto.
595 (one_static_initialization_or_destruction): Ditto.
596 (do_static_initialization_or_destruction): Ditto.
597 (generate_ctor_or_dtor_function): Ditto.
598 (build_offset_ref_call_from_tree): Ditto.
599 * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
600 (cp_parser_postfix_dot_deref_expression): Ditto.
601 (cp_parser_unary_expression): Ditto.
602 (cp_parser_new_expression): Ditto.
603 (cp_parser_cast_expression): Ditto.
604 (cp_parser_binary_expression): Ditto.
605 (cp_parser_question_colon_clause): Ditto.
606 (cp_parser_assignment_expression): Ditto.
607 (cp_parser_expression): Ditto.
608 (cp_parser_builtin_offsetof): Ditto.
609 (cp_parser_template_argument): Ditto.
610 (cp_parser_functional_cast): Ditto.
612 2008-03-24 Tom Tromey <tromey@redhat.com>
614 * lex.c (handle_pragma_interface): Don't copy the filename.
615 (handle_pragma_implementation): Copy filename using xstrdup.
617 2008-03-21 Paolo Carlini <pcarlini@suse.de>
619 * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
620 (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
621 (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
622 (PROMOTES_TO_AGGR_TYPE): Remove.
623 (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
624 * typeck.c (unary_complex_lvalue, build_modify_expr,
625 convert_for_initialization): Adjust.
626 * init.c (is_aggr_type): Remove.
627 (is_class_type): Add.
628 (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
629 build_delete): Adjust.
630 * lex.c (make_aggr_type): Remove.
631 (make_class_type): Add.
632 (cxx_make_type): Adjust.
633 * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
635 * decl.c (build_typename_type, make_typename_type,
636 make_unbound_class_template, cxx_init_decl_processing,
637 check_tag_decl, groktypename, start_decl_1, layout_var_decl,
638 check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
639 grok_op_properties, xref_tag, check_function_type): Adjust.
640 * call.c (check_dtor_name, standard_conversion, implicit_conversion,
641 add_builtin_candidate, add_builtin_candidates,
642 build_user_type_conversion_1, convert_like_real, build_cxx_call,
643 is_subseq, compare_ics): Adjust.
644 * method.c (use_thunk): Adjust.
645 * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
646 create_tinfo_types): Adjust.
647 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
648 build_up_reference, convert_to_reference, convert_from_reference,
649 ocp_convert, build_expr_type_conversion): Adjust.
650 * tree.c (bind_template_template_parm, error_type): Adjust.
651 * dump.c (cp_dump_tree): Adjust.
652 * search.c (lookup_member): Adjust.
653 * friend.c (make_friend_class, do_friend): Adjust.
654 * typeck2.c (store_init_value, process_init_constructor_array,
655 process_init_constructor_record, build_x_arrow, build_m_component_ref,
656 build_functional_cast): Adjust.
657 * pt.c (finish_member_template_decl, process_template_parm,
658 lookup_template_class, tsubst_function_type, tsubst,
659 tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
661 * semantics.c (begin_class_definition, finish_base_specifier,
662 finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
664 * name-lookup.c (constructor_name_p, push_overloaded_decl,
665 do_class_using_decl, lookup_qualified_name,
666 maybe_process_template_type_declaration): Adjust.
667 * decl2.c (grok_array_decl, check_member_template,
668 constrain_class_visibility): Adjust.
669 * parser.c (cp_parser_class_name): Adjust.
671 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
673 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
675 2008-03-17 Jason Merrill <jason@redhat.com>
678 * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
679 a temp directly to a reference as per DR391.
681 2008-03-12 Richard Guenther <rguenther@suse.de>
685 2008-02-04 Richard Guenther <rguenther@suse.de>
688 * decl.c (record_builtin_java_type): Make jboolean a
689 integer type again where its mode doesn't match that of bool.
691 2008-01-25 Richard Guenther <rguenther@suse.de>
694 * decl.c (record_builtin_java_type): Make __java_boolean
696 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
697 after TYPE_MAIN_VARIANT check.
699 2008-03-10 Jakub Jelinek <jakub@redhat.com>
702 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
706 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
707 DECL_P in not a variable and appears more than once error messages.
709 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
713 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
717 * typeck.c (structural_comptypes): Call cp_comptypes.
718 (comptypes): New; called from the C/C++ common bits to perform
720 (cp_comptypes): Renamed from comptypes, which is already used,
721 with a different signature, by the C++ front end.
722 (build_reinterpret_cast_1): Call cp_comptypes.
723 (ptr_reasonably_similar): Ditto.
724 * decl.c (decls_match): Ditto.
725 * cvt.c (convert_to_reference): Ditto.
726 * cp-tree.h (same_type_p): Ditto.
727 (same_or_base_type_p): Ditto.
728 (comptypes): Rename to cp_comptypes.
729 * pt.c (canonical_type_parameter): Call cp_comptypes.
731 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
733 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
734 test for equivalence between pointer and references.
736 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
739 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
740 (check_field_decls): Likewise.
741 (note_name_declared_in_class): Likewise.
742 * call.c (build_new_op): Likewise.
743 (convert_like_real): Likewise.
744 (build_over_call): Likewise.
745 * lex.c (unqualified_fn_lookup_error): Likewise.
746 * parser.c (cp_parser_template_id): Likewise.
747 * cvt.c (warn_ref_binding): Likewise.
748 (convert_to_reference): Likewise.
749 (ocp_convert): Likewise.
750 (convert_to_void): Use error instead of pedwarn.
751 * error.c (cp_cpp_error): Use pedantic_warning_kind.
752 * decl.c (compute_array_index_type): Use constant_expression_error.
754 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
756 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
757 that auto is either a storage class or a simple type specifier,
758 depending on the dialect.
759 (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
760 specifier in C++98 mode, error in C++0x mode (since we don't
761 support auto as a type specifier, yet).
762 (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
763 storage specifier in C++0x mode.
764 (cp_parser_simple_type_specifier): Parse `auto' as a
765 simple-type-specifier, but error because we don't support it yet.
767 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
769 * parser.c (cp_parser_nonclass_name): New.
770 (cp_parser_pseudo_destructor_name): Use it instead of
772 (cp_parser_type_name): Move code to cp_parser_nonclass_name.
774 2008-02-29 Tom Tromey <tromey@redhat.com>
776 * parser.c (struct cp_token) <input_file_stack_index>: Remove.
777 (cp_lexer_get_preprocessor_token): Update.
778 (cp_lexer_set_source_position_from_token): Don't call
779 restore_input_file_stack.
780 * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
782 2008-02-28 Richard Guenther <rguenther@suse.de>
785 2008-02-26 Richard Guenther <rguenther@suse.de>
787 * decl.c (duplicate_decls): Remove decl from global mapping
788 before ggc_freeing it.
790 2008-02-27 Jakub Jelinek <jakub@redhat.com>
793 * rtti.c: Include c-pragma.h.
794 (push_abi_namespace, pop_abi_namespace): New functions.
795 (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
796 create_tinfo_types, emit_support_tinfos): Use them.
797 * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
799 2008-02-26 Jason Merrill <jason@redhat.com>
802 * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
803 to name the struct for linkage purposes even if it has attributes.
804 (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
806 2008-02-26 Tom Tromey <tromey@redhat.com>
808 * parser.c (eof_token): Remove old location code.
809 (check_empty_body): Remove test of USE_MAPPED_LOCATION.
810 * decl2.c (generate_ctor_or_dtor_function): Remove old location
812 (cp_write_global_declarations): Likewise.
813 * lex.c (cxx_init): Remove old location code.
814 (handle_pragma_implementation): Remove test of
816 * pt.c (tsubst): Remove old location code.
817 * error.c (cp_print_error_function): Remove test of
819 * decl.c (pop_label): Remove old location code.
820 (finish_function): Likewise.
822 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
825 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
827 2008-02-26 Richard Guenther <rguenther@suse.de>
829 * decl.c (duplicate_decls): Remove decl from global mapping
830 before ggc_freeing it.
832 2008-02-26 Paolo Carlini <pcarlini@suse.de>
835 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
837 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
839 * typeck.c (build_class_member_access_expr): Add appropriate
840 OPT_W* parameter to warning.
841 (build_reinterpret_cast_1): Likewise.
842 * name-lookup.c (push_overloaded_decl): Likewise.
844 2008-02-25 Paolo Carlini <pcarlini@suse.de>
847 * error.c (dump_expr): Handle CONJ_EXPR.
849 2008-02-25 Paolo Carlini <pcarlini@suse.de>
852 * error.c (dump_type): Handle FIXED_POINT_TYPE.
853 (dump_expr): Handle FIXED_CST.
855 2008-02-24 Jason Merrill <jason@redhat.com>
857 * parser.c (cp_parser_declaration): Handle "inline namespace".
858 (cp_parser_namespace_definition): Likewise.
861 * name-lookup.c (arg_assoc_namespace): Look down into inline
864 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
866 * typeck.c (check_for_casting_away_constness): Use 1 single
867 argument, the type of cast, to decide what diagnostics generate.
868 (build_static_cast_1): Remove unused code. Update call to
869 check_for_casting_away_constness.
870 (build_reinterpret_cast_1): Update call to
871 check_for_casting_away_constness.
872 (build_const_cast_1): Likewise.
874 2008-02-24 Paolo Carlini <pcarlini@suse.de>
876 * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
877 VEC_NEW_EXPR), forward to pp_expression.
878 * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
880 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
883 * friend.c (do_friend): Call cplus_decl_attributes earlier.
885 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
888 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
889 template decls' function decl.
891 2008-02-22 Paolo Carlini <pcarlini@suse.de>
895 2008-02-14 Paolo Carlini <pcarlini@suse.de>
898 * pt.c (determine_specialization): In case of function templates,
899 when the type of DECL does not match FN there is no match.
901 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
904 * typeck.c (build_binary_op): Warn about floating point
905 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
907 2008-02-19 Jason Merrill <jason@redhat.com>
910 * pt.c (resolve_overloaded_unification): Set processing_template_decl
911 while we look for possible bindings.
913 2008-02-19 Jakub Jelinek <jakub@redhat.com>
916 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
920 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
921 vars. Afterwards ensure v is VAR_DECL.
924 * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
926 * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
929 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
934 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
935 is error_mark_node, return an error early.
936 (find_parameter_packs_r): Pass the pointer set along to recursive
937 calls of cp_walk_subtrees; don't try to manage the pointer set
939 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
940 (make_pack_expansion): Ditto.
941 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
942 a second pass through the tree with find_parameter_packs_r; that
943 second pass no longer does anything.
944 (push_template_decl_real): If we have an erroneous declaration,
945 set its type to error_mark_node before returning an error.
947 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
950 * pt.c (tsubst_initializer_list): Deal with the use of
951 VOID_TYPE_NODE to indicate value-initialization of the bases.
953 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
954 Jason Merrill <jason@redhat.com>
958 * class.c (type_has_user_nondefault_constructor): New fn.
959 * cp-tree.h: Declare it.
960 * init.c (emit_mem_initializers): Use it for -W warning about
961 missing base initializer.
963 2008-02-14 Paolo Carlini <pcarlini@suse.de>
966 * pt.c (determine_specialization): In case of function templates,
967 when the type of DECL does not match FN there is no match.
969 2008-02-13 Jakub Jelinek <jakub@redhat.com>
970 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
973 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
974 are not identifier :: ~, return before calling cp_parser_type_name.
976 2008-02-13 Jason Merrill <jason@redhat.com>
978 PR c++/34962, c++/34937, c++/34939
979 * decl2.c (is_late_template_attribute): Always defer attributes
980 vector_size and weak.
983 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
986 2008-02-12 Jason Merrill <jason@redhat.com>
989 * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
990 if we're doing conversions to call a user-defined conversion function.
992 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
995 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
998 2008-02-12 Jakub Jelinek <jakub@redhat.com>
1001 * init.c (build_new_1): Don't create placement_expr before
1002 constructing alloc_call. Verify that the pointer is passed by
1003 value to operator new.
1005 2008-02-11 Jason Merrill <jason@redhat.com>
1008 * pt.c (tsubst): Don't look up a template typedef in an explicit
1011 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
1014 * tree.c (cp_build_qualified_type_real): When building a
1015 cv-qualified array type, build it as a unique type with
1016 build_cplus_array_type_1 and then adopt the unqualified type's
1019 2008-02-11 Paolo Carlini <pcarlini@suse.de>
1022 * decl.c (groktypename): Check grokdeclarator return.
1024 2008-02-10 Jason Merrill <jason@redhat.com>
1027 * decl2.c (cp_write_global_declarations): Don't write out static
1028 data members with DECL_IN_AGGR_P set.
1030 2008-02-08 Jason Merrill <jason@redhat.com>
1033 * tree.c (build_target_expr_with_type): Handle void initializer.
1034 (bot_manip): Remap slot before recursing.
1036 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1039 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
1041 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
1044 * tree.c: Include tree-flow.h.
1045 (build_target_expr): Check type compatibility.
1046 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
1047 * call.c (convert_like_real): Convert bitfield to expected type.
1049 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
1053 * typeck.c (structural_comptypes): Call cp_comptypes.
1054 (comptypes): New; called from the C/C++ common bits to perform
1056 (cp_comptypes): Renamed from comptypes, which is already used,
1057 with a different signature, by the C++ front end.
1058 (build_reinterpret_cast_1): Call cp_comptypes.
1059 (ptr_reasonably_similar): Ditto.
1060 * decl.c (decls_match): Ditto.
1061 * cvt.c (convert_to_reference): Ditto.
1062 * cp-tree.h (same_type_p): Ditto.
1063 (same_or_base_type_p): Ditto.
1064 (comptypes): Rename to cp_comptypes.
1065 * pt.c (canonical_type_parameter): Call cp_comptypes.
1067 2008-02-05 Jakub Jelinek <jakub@redhat.com>
1070 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
1071 value dependent expression.
1073 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
1076 * decl2.c (save_template_attributes): When we're modifying the
1077 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
1078 all of the other variants to add those same attributes. Otherwise,
1079 the main variant will be inconsistent with those other variants.
1081 2008-02-04 Richard Guenther <rguenther@suse.de>
1084 * decl.c (record_builtin_java_type): Make jboolean a
1085 integer type again where its mode doesn't match that of bool.
1087 2008-02-02 Jason Merrill <jason@redhat.com>
1088 Mark Mitchell <mark@codesourcery.com>
1091 * init.c (build_value_init_1): New function.
1092 (build_value_init): New function.
1093 * typeck2.c (build_functional_cast): Call it.
1094 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
1096 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
1097 TYPE_HAS_CONSTRUCTOR.
1098 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
1099 add_implicitly_declared_members): Adjust.
1100 (check_field_decls): Adjust. Remove warnings about reference/const
1101 in class without constructor.
1102 (check_bases_and_members): Adjust. Give those warnings here instead.
1103 * decl.c (fixup_anonymous_aggr): Adjust.
1104 (check_initializer): Adjust, clarify logic slightly.
1105 (grok_special_member_properties): Adjust, only set if user-provided.
1106 * rtti.c (create_tinfo_types): Don't set.
1107 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
1108 Use same_type_ignoring_top_level_qualifiers_p.
1109 * pt.c (check_explicit_specialization): Adjust.
1110 (instantiate_class_template): Adjust.
1112 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
1113 Jakub Jelinek <jakub@redhat.com>
1117 * typeck.c (structural_comptypes): Handle comparisons of
1118 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
1120 * mangle.c (write_builtin_type): Map down to the canonical type,
1121 which will be one of the predefined type nodes.
1123 2008-01-29 Michael Meissner <michael.meissner@amd.com>
1126 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
1127 bits to allow for expansion of the number of middle end tree
1130 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
1141 * typeck.c (check_return_expr): Tweak call to
1142 check_for_bare_parameter_packs.
1143 * class.c (add_method): Be careful with error_mark_nodes.
1144 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
1146 * pt.c (struct find_parameter_pack_data): Remove
1148 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
1149 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
1150 (make_pack_expansion): Ditto.
1151 (check_for_bare_parameter_packs): Parameter is now a tree, not a
1153 (process_template_parm): Tweak call to
1154 check_for_bare_parameter_packs.
1155 (push_template_decl_real): Tweak calls to
1156 check_for_bare_parameter_packs. If bare parameter packs are found
1157 in the list of exceptions, clear out that list after giving an
1159 * semantics.c (finish_cond): Tweak call to
1160 check_for_bare_parameter_packs.
1161 (finish_expr_stmt): Ditto.
1162 (finish_for_expr): Ditto.
1163 (finish_switch_cond): Ditto.
1164 (finish_mem_initializers): Ditto.
1165 (finish_member_declaration): Ditto.
1166 (finish_static_assert): Check for bare parameter packs in the
1168 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
1169 attributes of a declaration.
1170 * parser.c (cp_parser_using_declaration): Tweak call to
1171 check_for_bare_parameter_packs.
1172 (cp_parser_base_clause): Ditto.
1174 2008-01-28 Jason Merrill <jason@redhat.com>
1177 * class.c (build_base_path): Fix !want_pointer case.
1179 2008-01-27 Jason Merrill <jason@redhat.com>
1182 * class.c (build_base_path): Fix previous change.
1184 2008-01-26 Jakub Jelinek <jakub@redhat.com>
1187 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
1190 2008-01-26 Richard Guenther <rguenther@suse.de>
1193 * typeck.c (build_binary_op): Remove code to shorten compares.
1195 2008-01-25 Richard Guenther <rguenther@suse.de>
1198 * decl.c (record_builtin_java_type): Make __java_boolean
1200 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
1201 after TYPE_MAIN_VARIANT check.
1203 2008-01-25 Jason Merrill <jason@redhat.com>
1206 * class.c (build_base_path): Don't mess with virtual access if
1208 * call.c (standard_conversion): Don't check whether source type
1211 * decl2.c (is_late_template_attribute): Don't defer attribute
1212 visibility just because the type is dependent.
1214 2008-01-25 Jason Merrill <jason@redhat.com>
1215 Mark Mitchell <mark@codesourcery.com>
1218 * call.c (standard_conversion): Allow conversion from integer/real
1220 (compare_ics): Such a conversion is worse than a normal arithmetic
1223 2008-01-25 Richard Guenther <rguenther@suse.de>
1226 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
1229 2008-01-24 Paolo Carlini <pcarlini@suse.de>
1232 * pt.c (push_template_decl_real): Return error_mark_node in case
1233 of template definition of non-template.
1235 2008-01-24 Jason Merrill <jason@redhat.com>
1238 * decl2.c (is_late_template_attribute): Defer any attribute with
1239 dependent args. Also defer type attributes if the type is dependent.
1241 2008-01-22 Jakub Jelinek <jakub@redhat.com>
1242 Alexandre Oliva <aoliva@redhat.com>
1245 * call.c (reference_binding): For bitfields use the declared bitfield
1247 (add_builtin_candidates): Likewise.
1248 * class.c (layout_class_type): For bitfields copy over the
1249 original type quals.
1251 2008-01-22 Jason Merrill <jason@redhat.com>
1254 * decl.c (groktypename): Also ignore attributes on dependent
1255 possibly-class types.
1258 * friend.c (do_friend): Check for prior declaration of a friend
1259 function of a local class.
1260 * name-lookup.c (lookup_name_innermost_nonclass_level):
1262 * name-lookup.h: Declare it.
1264 2008-01-22 Tom Tromey <tromey@redhat.com>
1267 * init.c (build_new_1): Only disallow Java aggregates.
1269 2008-01-22 Jakub Jelinek <jakub@redhat.com>
1272 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
1273 if decl or init is error_mark_node.
1276 * error.c (dump_expr): Handle VECTOR_CST.
1278 2008-01-21 Jason Merrill <jason@redhat.com>
1281 * pt.c (tsubst_aggr_type): Make sure our context is complete.
1284 * pt.c (retrieve_local_specialization): Robustify.
1285 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
1288 * pt.c (tsubst): Only call retrieve_local_specialization if the
1289 original typedef was in a function template.
1292 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
1294 2008-01-21 Richard Guenther <rguenther@suse.de>
1297 * error.c (cp_print_error_function): Deal with recursive
1300 2008-01-20 Paolo Carlini <pcarlini@suse.de>
1303 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
1305 2008-01-20 Paolo Carlini <pcarlini@suse.de>
1309 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
1310 on non-IS_AGGR_TYPE scope.
1311 (constructor_name_p): Assert IS_AGGR_TYPE.
1313 2008-01-18 Ian Lance Taylor <iant@google.com>
1316 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
1317 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
1318 DECL_IS_OPERATOR_NEW flag.
1320 2008-01-16 Richard Guenther <rguenther@suse.de>
1323 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
1324 for conversions to type variants.
1326 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
1328 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
1329 declaration and code. Update copyright year.
1331 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1334 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
1335 know we have a class type.
1337 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1340 * pt.c (coerce_template_parameter_pack): When substituting into
1341 the type of a non-type template parameter pack. use the
1342 deduced/substituted arguments.
1343 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
1344 can be a parameter pack with the ellipsis following it. When we
1345 have an erroneous declaration, allow it to be a parameter pack.
1346 (cp_parser_template_parameter): Complain about default
1347 arguments on non-type template parameter packs, and parse them
1348 using the new cp_parser_default_argument.
1349 (cp_parser_parameter_declaration): Complain about parameter packs
1350 with default arguments. Move parsing of default arguments into a
1351 new function, cp_parser_default_argument.
1352 (cp_parser_default_argument): New; extracted from
1353 cp_parser_parameter_declaration.
1355 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1361 * typeck.c (check_return_expr): If there are bare parameter packs
1362 in the return value, set it to error_mark_node.
1363 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
1364 * pt.c (find_parameter_packs_r): Look at the type of
1365 IDENTIFIER_NODEs (e.g., for user-defined conversions).
1366 (check_for_bare_parameter_packs): Flip the result: now returns
1367 TRUE when there were bare parameter packs, FALSE otherwise.
1368 (push_template_decl_real): Deal with flipped result of
1369 check_for_bare_parameter_packs.
1370 * semantics.c (finish_cond): If there are bare parameter packs in
1371 the conditional, set it to error_mark_node.
1372 (finish_expr_stmt): If there are bare parameter packs in the
1373 expression, set it to error_mark_node.
1374 (finish_for_expr): Ditto.
1375 (finish_switch_cond): If there are bare parameter packs in
1376 the conditional, set it to error_mark_node.
1377 (finish_mem_initializers): If there are bare parameter packs in
1378 the member initializer, set it to error_mark_node.
1379 (finish_member_declaration): Check the attributes of the
1380 declaration for bare parameter packs, and remove the attributes if
1381 any have bare parameter packs.
1382 * parser.c (cp_parser_using_declaration): Check the using
1383 declaration for bare parameter packs.
1384 (cp_parser_base_clause): If there are bare parameter packs in a
1385 base specifier, don't add it to the chain.
1387 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1390 * error.c (dump_simple_decl): Display ellipsis for template
1391 non-type parameter packs.
1392 (dump_decl): Display ellipsis for template type parameter packs.
1393 (dump_template_decl): Display ellipsis for template template
1395 * pt.c (redeclare_class_template): When redeclaring a class
1396 template, check for collisions between template parameters and
1397 template parameter packs.
1399 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1402 * pt.c (process_partial_specialization): Don't mark template
1403 parameters that occur in non-deduced contexts.
1404 (struct pair_fn_data): Add include_nondeduced_p.
1405 (for_each_template_parm_r): Only visit non-deduced contexts if
1406 include_nondeduced_p is set.
1407 (for_each_template_parm): Added parameter include_nondeduced_p,
1408 which states whether template parameters found in non-deduced
1409 contexts should be visited.
1410 (uses_template_parms): Visit all template parameters, even those
1411 in non-deduced contexts.
1413 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1416 * pt.c (check_default_tmpl_args): Check for parameter packs that
1417 aren't at the end of a primary template.
1418 (push_template_decl_real): Remove check for parameter packs that
1419 aren't at the end of a primary template; that now happens in
1420 check_default_tmpl_args.
1421 * semantics.c (finish_template_template_parm): Use
1422 check_default_tmpl_args to check for errors in the template
1425 2008-01-12 Doug Kwan <dougkwan@google.com>
1427 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
1428 instead of OPT_Wreturn_type in warning due to ignored return type
1430 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
1431 instead of OPT_Wreturn_type in warning due to ignored return type
1434 2008-01-08 Jakub Jelinek <jakub@redhat.com>
1437 * semantics.c (finish_omp_for): Don't call
1438 fold_build_cleanup_point_expr if processing_template_decl.
1440 2008-01-04 Paolo Carlini <pcarlini@suse.de>
1441 Jakub Jelinek <jakub@redhat.com>
1444 * error.c (dump_template_argument): Deal with TREE_LIST.
1446 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
1448 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
1449 long" in C++0x mode; change the warning to note that "long long"
1450 is only unsupported in C++98 mode.
1452 2007-12-20 Jason Merrill <jason@redhat.com>
1455 * call.c (standard_conversion): Derived-to-base is considered a
1456 standard conversion.
1458 2007-12-19 Jakub Jelinek <jakub@redhat.com>
1461 * parser.c (cp_parser_omp_parallel): For non-combined parallel
1462 call cp_parser_statement rather than
1463 cp_parser_already_scoped_statement.
1465 2007-12-18 Jason Merrill <jason@redhat.com>
1468 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
1470 (dependent_type_p_r): Handle the domain of an array.
1472 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
1473 Jakub Jelinek <jakub@redhat.com>
1478 * pt.c (template_template_parm_bindings_ok_p): New; verifies
1479 bindings of template template parameters after all template
1480 arguments have been deduced.
1481 (coerce_template_parms): Don't complain when COMPLAIN doesn't
1483 (fn_type_unification): Use template_template_parm_bindings_ok_p.
1484 (unify): Deal with variadic, bound template template parameters.
1485 (get_class_bindings): Use template_template_parm_bindings_ok_p.
1487 2007-12-18 Jakub Jelinek <jakub@redhat.com>
1490 * decl.c (grokdeclarator): Reject friend sfk_constructor
1493 2007-12-17 Jakub Jelinek <jakub@redhat.com>
1496 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
1499 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
1502 * cp-lang.c (cp_classify_record): New.
1503 (LANG_HOOKS_CLASSIFY_RECORD): Override.
1505 2007-12-11 Jakub Jelinek <jakub@redhat.com>
1508 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
1511 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
1512 dynamic_cast in a template.
1514 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
1517 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
1518 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
1520 2007-12-10 Jakub Jelinek <jakub@redhat.com>
1523 * error.c (dump_type_prefix, dump_type_suffix): Handle
1524 TYPE_PACK_EXPANSION.
1527 * error.c (dump_expr): Handle ABS_EXPR.
1529 2007-12-09 Jakub Jelinek <jakub@redhat.com>
1533 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
1534 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1535 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
1536 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
1537 flag_use_repository and repo_emit_p returned 2.
1539 2007-12-06 Jakub Jelinek <jakub@redhat.com>
1542 * tree.c (stabilize_call, stabilize_init): Do nothing if
1543 processing_template_decl.
1545 2007-12-05 Jakub Jelinek <jakub@redhat.com>
1548 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
1549 error instead of assertion failure.
1550 * parser.c (cp_parser_decltype): If closing paren is not found,
1551 return error_mark_node.
1553 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
1556 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
1558 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
1559 since arg_assoc_template_arg will deal with them (better).
1561 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
1564 * pt.c (tsubst_exception_specification): Handle substitutions into
1565 member templates, where tsubst_pack_expansion returns a
1566 TYPE_PACK_EXPANSION.
1568 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
1571 * pt.c (unify_pack_expansion): If we didn't deduce any actual
1572 bindings for the template parameter pack, don't try to keep the
1573 empty deduced arguments.
1574 (unify): If a parameter is a template-id whose template argument
1575 list contains a pack expansion that is not at the end, then we
1576 cannot unify against that template-id.
1578 2007-12-02 Paolo Carlini <pcarlini@suse.de>
1581 * pt.c (current_template_args): Use error_operand_p.
1583 2007-12-02 Paolo Carlini <pcarlini@suse.de>
1586 * error.c (dump_decl): Handle TREE_BINFO.
1588 2007-12-01 Ollie Wild <aaw@google.com>
1591 * typeck.c (build_binary_op): Add conversion of pointers to function
1592 members appearing as operands to the equality operators.
1594 2007-11-30 Jakub Jelinek <jakub@redhat.com>
1597 * error.c (dump_expr): Handle OBJ_TYPE_REF.
1599 2007-11-29 Jakub Jelinek <jakub@redhat.com>
1602 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
1604 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
1609 * parser.c (cp_parser_decltype): Don't call finish_id_expression
1611 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
1614 2007-11-27 Jakub Jelinek <jakub@redhat.com>
1616 PR tree-optimization/34181
1617 * method.c (use_thunk): Don't inline the call in the thunk.
1620 * tree.c (decl_linkage): Static data members and static member
1621 functions in anonymous ns classes are lk_external.
1623 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
1626 * decl.c (start_preparsed_function): Pass
1627 processing_template_decl for the new allocate_struct_function
1630 2007-11-25 Richard Guenther <rguenther@suse.de>
1632 * decl.c (poplevel): Use BLOCK_CHAIN.
1634 2007-11-24 Ollie Wild <aaw@google.com>
1636 * typeck.c (delta_from_ptrmemfunc): New function.
1637 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
1638 (build_binary_op): Call delta_from_ptrmemfunc.
1640 2007-11-23 Jakub Jelinek <jakub@redhat.com>
1644 * decl.c (cp_finish_decl): Disallow variable or field
1645 definitions if extern "Java" aggregates.
1646 (grokparms): Disallow parameters with extern "Java"
1648 (check_function_type): Disallow function return values
1649 with extern "Java" aggregates.
1650 * init.c (build_new_1): Disallow placement new with
1651 extern "Java" aggregates.
1653 2007-11-23 Mark Mitchell <mark@codesourcery.com>
1654 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1657 * call.c (convert_like_real): Build a zero constant when __null is
1658 converted to an integer type.
1660 2007-11-22 Jakub Jelinek <jakub@redhat.com>
1663 * decl2.c (cp_write_global_declarations): Issue error about static
1664 data members in anonymous namespace which are declared and used,
1667 2007-11-20 Jakub Jelinek <jakub@redhat.com>
1670 * parser.c (cp_parser_class_head): Reject function template ids.
1673 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
1674 when processing_template_decl to build_array_type.
1677 * pt.c (more_specialized_fn): Don't segfault if one or
1678 both argument list end with ellipsis.
1680 2007-11-18 Jakub Jelinek <jakub@redhat.com>
1683 * semantics.c (finish_call_expr): Set
1684 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
1685 or OVERLOAD with all noreturn functions.
1687 2007-11-16 Jakub Jelinek <jakub@redhat.com>
1690 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
1693 2007-11-13 Jakub Jelinek <jakub@redhat.com>
1700 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
1701 set to error_mark_node the outermost POINTER_TYPE to the pack if
1702 it is seen in a POINTER_TYPE.
1703 (push_template_decl_real): If check_for_bare_parameter_packs
1704 fails for function return type, set the return type to
1705 integer_type_node. If check_for_bare_parameter_packs failed
1706 for non-function, return error_mark_node.
1709 * call.c (build_new_op): Call resolve_args before calling
1712 2007-11-11 Tom Tromey <tromey@redhat.com>
1715 * lex.c (handle_pragma_implementation): Use cpp_included_before.
1717 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1720 * pt.c (redeclare_class_template): Update error message. Use a
1721 note to show the previous declaration.
1722 (tsubst_friend_class): Use the location of the friend template as
1723 the input location before calling redeclare_class_template.
1725 2007-11-11 Jakub Jelinek <jakub@redhat.com>
1728 * semantics.c (finish_pseudo_destructor_expr): Handle
1729 object == error_mark_node.
1731 2007-11-10 Jakub Jelinek <jakub@redhat.com>
1734 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
1735 is not scalar type, let finish_class_member_access_expr handle
1736 diagnostics. Pass BIT_NOT_EXPR argument to
1737 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
1739 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
1742 * decl.c (cp_complete_array_type): If any of the initializer
1743 elements are pack expansions, don't compute the array size yet.
1745 2007-11-08 Andrew Pinski <pinskia@gmail.com>
1748 * tree.c (decl_linkage): Fields have no linkage.
1750 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
1752 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
1754 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
1759 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
1760 Be careful with ERROR_MARK_NODEs.
1761 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
1764 2007-11-07 Jakub Jelinek <jakub@redhat.com>
1767 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
1770 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
1774 * tree.c (c_build_qualified_type): Define bridge to
1775 cp_build_qualified_type.
1777 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
1788 * typeck.c (check_return_expr): Pass address of retval to
1789 check_for_bare_parameter_packs.
1790 * class.c (build_base_field): Tolerate bases that have no layout
1792 (end_of_base): Ditto.
1793 * tree.c (canonical_type_variant): Be careful with
1795 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
1797 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
1798 which states whether parameter packs should be replaced with
1800 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
1801 possible. If set_packs_to_error is set true, replace the parameter
1802 pack with ERROR_MARK_NODE. Manage our own pointer sets.
1803 (uses_parameter_packs): Don't set parameter packs to
1805 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
1806 which may be modified (if it is a parameter pack). Instructs
1807 find_parameter_packs_r to replace parameter packs with
1808 ERROR_MARK_NODE (so that they won't cause errors later on).
1809 (process_template_parm): Pass pointer to
1810 check_for_bare_parameter_packs.
1811 (process_partial_specialization): Replace pack expansions before
1812 the end of the template argument list with ERROR_MARK_NODE.
1813 (push_template_decl_real): Pass pointer to
1814 check_for_bare_parameter_packs. Replace parameter packs not at the
1815 end of the template parameter list with ERROR_MARK_NODE.
1816 (convert_template_argument): Be more careful about using DECL_NAME
1817 on only declarations.
1818 (unify): Can't unify against ERROR_MARK_NODE.
1819 * semantics.c (finish_cond): Pass pointer to
1820 check_for_bare_parameter_packs.
1821 (finish_expr_stmt): Ditto.
1822 (finish_for_expr): Ditto.
1823 (finish_switch_cond): Pass pointer to
1824 check_for_bare_parameter_packs, and call it before we put the
1825 condition into the statement.
1826 (finish_mem_initializers): Pass pointer to
1827 check_for_bare_parameter_packs.
1828 (finish_member_declaration): Ditto.
1829 * parser.c (cp_parser_base_clause): Ditto.
1831 2007-11-06 Jakub Jelinek <jakub@redhat.com>
1834 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
1835 with the final TREE_READONLY flag in place. processing_template_decl
1836 is known to be 0 in this part of function.
1839 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
1840 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
1841 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
1842 * semantics.c (finish_omp_atomic): Revert most of the
1843 2007-02-05 changes, just keep the new representation of
1844 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
1846 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
1849 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
1852 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
1857 * typeck.c (merge_types): Don't lose rvalue references when
1859 * call.c (build_over_call): Don't elide move constructors just
1860 because the copy constructor is trivial (!).
1861 (compare_ics): If comparing cv-qualifiers fails, we can still order
1862 based on binding lvalues vs. rvalues.
1864 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
1867 * pt.c (unify_pack_expansion): bring handling of function call
1868 arguments into line with type_unification_real.
1870 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1872 * typeck.c (build_binary_op): Use pedwarn instead of error for
1875 2007-11-05 Jakub Jelinek <jakub@redhat.com>
1878 * parser.c (cp_parser_unary_expression): For &&label call
1879 cp_parser_non_integral_constant_expression and return error_mark_node
1880 if it returned true.
1883 * decl.c (grokdeclarator): Don't call build_memfn_type if type
1884 is neither FUNCTION_TYPE nor METHOD_TYPE.
1886 2007-11-02 Jakub Jelinek <jakub@redhat.com>
1889 * parser.c (cp_parser_nested_name_specifier_opt): Use
1890 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
1891 typedef of currently open class.
1893 2007-11-02 Paolo Carlini <pcarlini@suse.de>
1896 * error.c (dump_expr): Deal specially with statements.
1898 2007-11-01 Jason Merrill <jason@redhat.com>
1901 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
1903 (lookup_template_class): Use it to get the outer template args
1904 for instantiating one.
1907 * pt.c (reduce_template_parm_level): tsubst the parameters
1908 of a template template parm.
1910 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
1913 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
1915 2007-11-01 Jakub Jelinek <jakub@redhat.com>
1918 * parser.c (cp_parser_postfix_dot_deref_expression): If
1919 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
1920 first and if that succeeds and type is SCALAR_TYPE_P, create
1924 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
1925 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
1926 as for std::type_info.
1928 2007-10-31 Paolo Carlini <pcarlini@suse.de>
1931 * cxx-pretty-print.c (pp_cxx_typeid_expression,
1932 pp_cxx_delete_expression): Change to static linkage.
1933 * cxx-pretty-print.h: Adjust declarations.
1934 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
1935 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
1936 MODOP_EXPR): Forward to pp_expression.
1938 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
1941 2007-10-31 Christian Bruel <christian.bruel@st.com>
1942 Mark Mitchell <mark@codesourcery.com>
1945 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
1946 if retval is volatile.
1948 2007-10-30 Jakub Jelinek <jakub@redhat.com>
1951 * decl2.c (build_offset_ref_call_from_tree): Call
1952 build_non_dependent_expr on object prior to building ADDR_EXPR from it
1953 if FN is DOTSTAR_EXPR.
1955 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
1959 * pt.c (find_parameter_packs_r): Fix typo in comment.
1960 (convert_template_argument): Look at the pattern of a pack
1961 expansion to determine what kind of entity we're converting.
1962 (coerce_template_parameter_pack): When we have coerced a non-type
1963 template parameter pack, substitute into the type of that pack.
1964 (tsubst_pack_expansion): When our substitution of a parameter pack
1965 is a "trivial" substitution of itself, just substitute into the
1966 pack expansion rather than actually expanding.
1968 2007-10-29 Jakub Jelinek <jakub@redhat.com>
1971 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
1972 for non-integral type bitfields. Return true if bitfield is correct, false
1973 error has been diagnosed.
1974 (check_field_decls): If check_bitfield_decl returned false, call also
1977 2007-10-28 Paolo Carlini <pcarlini@suse.de>
1978 Mark Mitchell <mark@codesourcery.com>
1981 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
1982 class member error out and return.
1984 2007-10-27 Jakub Jelinek <jakub@redhat.com>
1986 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
1987 to current_function_decl rather than 0.
1990 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
1992 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
1994 2007-10-27 Jason Merrill <jason@redhat.com>
1997 * call.c (convert_default_arg): Detect recursion.
1999 2007-10-27 Jakub Jelinek <jakub@redhat.com>
2002 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
2003 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
2005 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
2007 * error.c (dump_expr): Handle OFFSETOF_EXPR.
2009 2007-10-26 Jason Merrill <jason@redhat.com>
2012 * pt.c (get_template_info): New fn.
2013 (template_class_depth): Use it.
2014 (push_template_decl_real): Check that the template args of the
2015 definition match the args of the previous declaration.
2017 2007-10-26 Paolo Carlini <pcarlini@suse.de>
2020 * decl2.c (coerce_new_type): Do not allow a default argument for
2021 the first parameter.
2023 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
2026 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
2027 don't see the leading '('. Only lookup names if we get an
2030 2007-10-26 Jakub Jelinek <jakub@redhat.com>
2033 * parser.c (cp_parser_parenthesized_expression_list): Set
2034 greater_than_is_operator_p to true in between the parens.
2036 2007-10-26 Paolo Carlini <pcarlini@suse.de>
2039 * decl.c (grokdeclarator): In case of conflicting specifiers
2040 just return error_mark_node.
2042 2007-10-26 Ollie Wild <aaw@google.com>
2044 * expr.c (cxx_expand_expr): Removed.
2045 * cp-tree.h (exx_expand_expr): Removed.
2046 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
2049 2007-10-25 Paolo Carlini <pcarlini@suse.de>
2052 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
2054 2007-10-23 Jason Merrill <jason@redhat.com>
2056 PR c++/25950 (DR 391)
2057 * call.c (struct conversion): Remove check_copy_constructor_p.
2058 (reference_binding): Always bind a reference directly to a
2059 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
2061 (check_constructor_callable): Remove.
2062 (convert_like_real): Don't call it.
2063 (initialize_reference): Don't call check_constructor_callable.
2064 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
2065 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
2066 conversions if LOOKUP_NO_TEMP_BIND.
2067 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
2068 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
2070 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
2072 2007-10-22 Jakub Jelinek <jakub@redhat.com>
2075 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
2076 before checking if its type is integral.
2078 2007-10-22 Jason Merrill <jason@redhat.com>
2081 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
2082 * pt.c (apply_late_template_attributes): Splice out dependent
2083 attributes from DECL_ATTRIBUTES.
2085 * decl.c (cxx_maybe_build_cleanup): Use build_address.
2087 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2089 * typeck.c (build_binary_op) : Use appropriate warning option
2090 instead of unnamed warning.
2092 2007-10-16 Paolo Carlini <pcarlini@suse.de>
2095 * pt.c (current_template_args): Do not change TREE_LIST elements
2096 with a TREE_VALUE of error_mark_node.
2098 2007-10-16 Mark Mitchell <mark@codesourcery.com>
2100 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
2101 * decl.c (start_decl): Tidy.
2102 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
2104 (grokdeclarator): Clarify comment.
2106 2007-10-14 Andrew Pinski <pinskia@gmail.com>
2109 * decl.c (grokfndecl): Return NULL after the "definition of
2110 implicitly-declared" error happened.
2112 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
2115 * call.c (build_user_type_conversion_1): Do not consider conversion
2116 functions to convert a (possibly cv-qualified) object to the (possibly
2117 cv-qualified) same object type (or a reference to it), to a (possibly
2118 cv-qualified) base class of that type (or a reference to it).
2120 2007-10-12 Paolo Carlini <pcarlini@suse.de>
2122 * pt.c (tsubst): Use template_parm_level_and_index.
2124 2007-10-12 Jakub Jelinek <jakub@redhat.com>
2127 * parser.c (cp_parser_compound_statement): Handle label-declarations
2128 at the beginning of the compound statement.
2129 (cp_parser_block_declaration): Issue diagnostics about __label__
2130 not at the beginning of a block.
2132 2007-10-11 Paolo Carlini <pcarlini@suse.de>
2135 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
2136 to convert_template_argument.
2137 (coerce_template_parms): Return error_mark_node after fixed-length
2139 (tsubst_decl): Check for error_mark_node the return value of the
2140 first tsubst in 'case VAR_DECL'.
2142 2007-10-08 Ollie Wild <aaw@google.com>
2144 * typeck2.c (digest_init): Call cplus_expand_constant after
2145 convert_for_initialization.
2146 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
2147 * expr.c (cplus_expand_constant): Updated function description.
2149 2007-10-04 Jason Merrill <jason@redhat.com>
2152 * call.c (initialize_reference): Handle local static reference
2155 2007-10-03 Jason Merrill <jason@redhat.com>
2158 * name-lookup.c (push_namespace_with_attrs): Fold back into...
2159 (push_namespace): Here.
2160 (handle_namespace_attrs): New fn for the attr code.
2161 (leave_scope): Don't pop_visibility.
2162 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
2163 * parser.c (cp_parser_namespace_definition): Call
2164 handle_namespace_attrs and pop_visibility as appropriate.
2167 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
2169 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
2171 * decl.c (duplicate_decls): Preserve linkage flags for mere
2172 redeclarations of gnu_inline definitions.
2174 2007-10-03 Jason Merrill <jason@redhat.com>
2177 * decl.c (wrap_cleanups_r): New fn.
2178 (wrap_temporary_cleanups): New fn.
2179 (initialize_local_var): Call it.
2181 2007-09-29 Jason Merrill <jason@redhat.com>
2184 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
2185 constant to not have DECL_EXTERNAL if it's file-local.
2187 2007-09-28 Ollie Wild <aaw@google.com>
2190 2007-09-27 Ollie Wild <aaw@google.com>
2192 * typeck2.c (digest_init): Call cplus_expand_constant after
2193 convert_for_initialization.
2194 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
2195 * expr.c (cplus_expand_constant): Updated function description.
2197 2007-09-28 Jason Merrill <jason@redhat.com>
2200 * class.c (layout_empty_base): Take rli parameter, update
2201 rli->record_align if empty base has user-specified alignment.
2202 (build_base_field): Pass rli to it.
2204 2007-09-28 Paolo Carlini <pcarlini@suse.de>
2207 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
2209 2007-09-28 Paolo Carlini <pcarlini@suse.de>
2212 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
2213 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
2214 (dump_parameters): Just call dump_type for argument packs too.
2216 2007-09-28 Jakub Jelinek <jakub@redhat.com>
2219 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
2220 qualification by creating qualified PACK_EXPANSION_PATTERN and
2221 then calling make_pack_expansion on it.
2223 2007-09-27 Ollie Wild <aaw@google.com>
2225 * typeck2.c (digest_init): Call cplus_expand_constant after
2226 convert_for_initialization.
2227 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
2228 * expr.c (cplus_expand_constant): Updated function description.
2230 2007-09-27 Jason Merrill <jason@redhat.com>
2233 * decl2.c (is_late_template_attribute): Don't crash on unknown
2236 2007-09-27 Paolo Carlini <pcarlini@suse.de>
2239 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
2240 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
2241 spaces in the formatting.
2242 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
2244 2007-09-27 Jakub Jelinek <jakub@redhat.com>
2246 * error.c (cxx_print_error_function): Add third argument, pass
2247 it over to lhd_print_error_function.
2248 (cp_print_error_function): If diagnostic->abstract_origin, print
2250 * cp-tree.h (struct diagnostic_info): New forward decl.
2251 (cxx_print_error_function): Add third argument.
2253 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
2256 * name-lookup.c (pushtag): Do not create an implicit typedef before
2257 the associated type declaration is known to be valid.
2259 2007-09-25 Jakub Jelinek <jakub@redhat.com>
2261 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
2262 rather than pointers.
2264 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
2267 * search.c (check_final_overrider): Fail if
2268 targetm.comp_type_attributes returns 0.
2270 2007-09-24 Jason Merrill <jason@redhat.com>
2273 * pt.c (resolve_typename_type): Don't look things up in the original
2274 template if it would mean losing template arguments.
2276 2007-09-24 Jakub Jelinek <jakub@redhat.com>
2279 * cp-tree.h (cxx_type_hash_eq): New prototype.
2280 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
2281 * tree.c (cxx_type_hash_eq): New function.
2283 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
2286 * tree.c (cp_build_qualified_type_real): Build a canonical
2287 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
2289 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
2293 * tree.c (cplus_array_compare): Compare pointers, not types.
2294 (build_cplus_array_type_1): Store new array type into the hash
2295 table before building the canonical type; build the canonical type
2297 (cp_build_qualified_type_real): Put all of the array types with
2298 cv-qualified element types into the C++ array hash table, built as
2299 variants of the unqualified versions.
2301 2007-09-23 Jason Merrill <jason@redhat.com>
2304 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
2305 for deprecation warnings.
2307 2007-09-22 Jason Merrill <jason@redhat.com>
2310 * call.c (build_over_call): Warn about deprecated virtuals.
2313 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
2314 (MAYBE_TAGGED_TYPE_P): Remove.
2315 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
2316 instead of calling is_late_template_attribute again.
2317 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
2318 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
2319 Don't crash on typedefs from non-template classes.
2320 * decl2.c (grokfield): Don't sorry about attrs on template parms.
2321 (is_late_template_attribute): All attributes applied to template
2322 parms or typename types are dependent. Static.
2323 (splice_template_attributes): Pass decl through.
2324 (save_template_attributes): Likewise.
2326 2007-09-20 Jakub Jelinek <jakub@redhat.com>
2329 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
2330 returned from tsubst_pack_expansion.
2331 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
2332 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
2334 2007-09-20 Paolo Carlini <pcarlini@suse.de>
2337 * semantics.c (finish_id_expression): Use consistently
2338 context_for_name_lookup.
2339 * decl.c (fixup_anonymous_aggr): Fix error message for
2340 anonymous struct (vs union).
2342 2007-09-19 Jason Merrill <jason@redhat.com>
2345 * pt.c (tsubst): Handle typedefs by looking for the specialization.
2346 (retrieve_specialization): Only tagged types use
2347 DECL_TEMPLATE_INSTANTIATIONS.
2348 (instantiate_class_template): Push nested classes too.
2349 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
2351 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
2352 * init.c (is_aggr_type): Remove redundant tests.
2353 * class.c (push_nested_class): Use CLASS_TYPE_P.
2355 2007-09-20 Paolo Carlini <pcarlini@suse.de>
2358 * init.c (build_zero_init): If, recursively, build_zero_init
2359 returns a NULL_TREE, do not append it to the VEC of constructors.
2361 2007-09-18 Jason Merrill <jason@redhat.com>
2364 * pt.c (apply_late_template_attributes): Set processing_template_decl.
2365 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
2366 ATTR_FLAG_TYPE_IN_PLACE.
2367 (tsubst): Do unqualified lookup to find typedefs from current class.
2368 [ARRAY_TYPE]: Propagate alignment info.
2369 * decl2.c (is_late_template_attribute): Only defer handling of
2370 attribute aligned if the expression is dependent.
2371 (save_template_attributes): If we're deferring any attributes,
2372 make this a naming typedef.
2374 2007-09-18 Paolo Carlini <pcarlini@suse.de>
2376 PR c++/33462 (again)
2377 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
2378 va_arg instead of __builtin_va_arg.
2380 2007-09-18 Paolo Carlini <pcarlini@suse.de>
2383 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
2384 (pp_cxx_primary_expression): Use it.
2385 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
2386 * error.c (dump_expr): Use it.
2388 2007-09-18 Paolo Carlini <pcarlini@suse.de>
2391 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
2392 out case TYPEID_EXPR to...
2393 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
2394 and pp_cxx_right_paren.
2395 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
2396 * error.c (dump_expr): Use it.
2398 2007-09-18 Paolo Carlini <pcarlini@suse.de>
2401 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
2402 (pp_cxx_primary_expression): Use it.
2403 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
2404 * error.c (dump_expr): Use it.
2406 2007-09-16 Paolo Carlini <pcarlini@suse.de>
2409 * init.c (build_new): Remove warning for zero-element
2412 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
2415 * call.c (maybe_handle_implicit_object): Set this_p, clear
2416 rvaluedness_matches_p.
2417 (compare_ics): Do not compare rvaluedness matching when one of the
2418 operands is an implicit object.
2420 2007-09-14 Jason Merrill <jason@redhat.com>
2422 PR c++/17743, c++/19163
2423 * decl2.c (is_late_template_attribute): New fn.
2424 (splice_template_attributes, save_template_attributes): New fns.
2425 (cplus_decl_attributes): Call save_template_attributes.
2426 * pt.c (apply_late_template_attributes): New fn.
2427 (instantiate_class_template, tsubst_decl): Use it.
2428 * cp-tree.h: Declare is_late_template_attribute.
2430 2007-09-13 Tom Tromey <tromey@redhat.com>
2432 * parser.c (cp_lexer_new_main): Don't use
2433 c_lex_return_raw_strings.
2434 (cp_lexer_get_preprocessor_token): Update. Add special case when
2437 2007-09-11 Jan Hubicka <jh@suse.cz>
2439 * method.c (use_thunk): Use tree_rest_of_compilation
2440 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
2441 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
2442 * cp-tree.h (expand_body): Kill.
2443 (emit_associated_thunks): Declare.
2444 * semantics.c (emit_associated_thunks): Export.
2445 (expand_body): Kill.
2447 2007-09-09 David Daney <ddaney@avtrex.com>
2450 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
2451 to calculate cookie_ptr.
2453 2007-09-08 Jason Merrill <jason@redhat.com>
2456 * pt.c (most_specialized_class): Set processing_template_decl
2457 while tsubsting partial spec args.
2459 2007-09-06 Jason Merrill <jason@redhat.com>
2461 * decl2.c (get_guard): Copy visibility from the guarded variable.
2463 2007-09-06 Jan Hubicka <jh@suse.cz>
2465 * semantics.c (expand_body): Do not mark arguments of clones used.
2467 2007-09-06 Paolo Carlini <pcarlini@suse.de>
2470 * decl.c (cp_finish_decl): When processing_template_decl,
2471 deal correctly with init as TREE_LIST.
2473 2007-09-06 Tom Tromey <tromey@redhat.com>
2475 * decl.c (finish_function): Put return's location on line zero of
2478 2007-09-05 Jason Merrill <jason@redhat.com>
2481 * except.c (prepare_eh_type): Use type_decays_to.
2484 * init.c (build_delete): Use build_headof to get the address of the
2485 complete object if we aren't using the deleting destructor.
2486 * rtti.c (build_headof): No longer static.
2487 * cp-tree.h: Declare it.
2489 2007-09-06 Jakub Jelinek <jakub@redhat.com>
2491 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
2492 decl if a prototype for XX is provided with throw().
2495 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
2496 on __*_chk non-__builtin_* decls.
2498 2007-09-05 Paolo Carlini <pcarlini@suse.de>
2501 * semantics.c (finish_id_expression): Use context_for_name_lookup
2502 insted of DECL_CONTEXT, to see through anonymous structs and unions.
2503 * class.c (finish_struct_anon): Deal correctly with anonymous
2504 structs (vs unions, as GNU extension) in error messages.
2506 2007-09-05 Jan Hubicka <jh@suse.cz>
2508 * sematics.c (expand_body): Remove unnecesary import_export_decl
2509 call, DECL_EXTERNAL checks and current_function_decl saving.
2511 2007-09-05 Paolo Carlini <pcarlini@suse.de>
2513 PR c++/29731 (again)
2514 * parser.c (cp_parser_primary_expression): Return error_mark_node
2515 when a statement-expression is found in a template-argument list.
2517 2007-09-04 Jason Merrill <jason@redhat.com>
2519 * except.c (initialize_handler_parm): Use
2520 fold_build_cleanup_point_expr.
2523 * call.c (reference_binding): Don't look for user-defined conversions
2527 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
2528 the MUST_NOT_THROW_EXPR.
2530 2007-09-04 Richard Sandiford <richard@codesourcery.com>
2532 * decl.c (cp_finish_decl): Call determine_visibility before
2533 make_rtl_for_nonlocal_decl.
2535 2007-09-04 Jason Merrill <jason@redhat.com>
2538 * pt.c (most_specialized_class): Substitute outer template
2539 arguments into the arguments of a member template partial
2541 (strip_innermost_template_args): New fn.
2543 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
2545 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
2547 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2549 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
2550 * decl.c (cp_make_fname_decl): Likewise,
2551 * parser.c (cp_parser_string_literal): Likewise,
2552 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
2553 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
2556 2007-09-02 Paolo Carlini <pcarlini@suse.de>
2559 * typeck.c (build_unary_op): Fix error message for
2560 Boolean expression as operand to operator--.
2562 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2564 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
2565 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
2568 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
2571 * init.c (build_default_init): Make extern.
2572 * cp-tree.h (build_default_init): Declare here.
2573 * pt.c (tsubst_expr): When the instantiation of the initializer of
2574 a variable results in an empty list, default-initialize the
2576 (tsubst_copy_and_build): When the instantiation of the initializer
2577 in a new expression results in an empty initializer list,
2578 default-initialize it.
2580 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
2582 * mangle.c (write_type): Change mangling of rvalue reference from
2585 2007-08-31 Jakub Jelinek <jakub@redhat.com>
2587 * decl.c (duplicate_decls): Remove duplicated line.
2589 2007-08-31 Paolo Carlini <pcarlini@suse.de>
2592 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
2593 BOUND_TEMPLATE_TEMPLATE_PARM.
2595 2007-08-31 Paolo Carlini <pcarlini@suse.de>
2598 * search.c (lookup_member): Check the name argument for
2601 2007-08-31 Paolo Carlini <pcarlini@suse.de>
2604 * parser.c (cp_parser_trait_expr): Check rerurn value of
2607 2007-08-30 Ollie Wild <aaw@google.com>
2609 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
2610 convert_ptrmem for pointer to member conversions.
2611 (convert_to_pointer_force): Update cp_convert_to_pointer call.
2612 (ocp_convert): Update cp_convert_to_pointer call.
2613 * typeck.c (convert_ptrmem): Add conditional for null pointers to
2615 (build_static_cast_1): Check can_convert for conversions in either
2617 (get_delta_difference_1): New function.
2618 (get_delta_difference): Refactor to call get_delta_difference_1.
2620 2007-08-30 Jakub Jelinek <jakub@redhat.com>
2622 * decl.c (start_preparsed_function): Set
2623 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
2625 2007-08-28 Paolo Carlini <pcarlini@suse.de>
2628 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
2629 BOUND_TEMPLATE_TEMPLATE_PARM.
2631 2007-08-28 Jakub Jelinek <jakub@redhat.com>
2635 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
2636 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
2638 2007-08-27 Jason Merrill <jason@redhat.com>
2641 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
2642 Look inside STMT_EXPR.
2643 * semantics.c (stmt_expr_value_expr): New fn.
2644 * cp-tree.h: Declare it.
2647 * decl.c (groktypename): Ignore attributes applied to class type.
2649 2007-08-28 Richard Guenther <rguenther@suse.de>
2651 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
2653 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
2655 * error.c (dump_expr): Handle COMPLEX_CST.
2656 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
2657 (pp_cxx_expression): Likewise.
2659 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
2661 * decl.c (GNU_INLINE_P): New.
2662 (duplicate_decls): Handle gnu_inline. Merge attributes and
2663 some flags in overriding definitions.
2664 (redeclaration_error_message): Handle gnu_inline.
2665 (start_preparsed_function): Likewise.
2667 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2669 * call.c (sufficient_parms_p): Constify.
2670 * class.c (same_signature_p): Likewise.
2671 * cp-gimplify.c (is_invisiref_parm,
2672 cxx_omp_privatize_by_reference): Likewise.
2673 * cp-objcp-common.c (has_c_linkage): Likewise.
2674 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
2675 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
2676 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
2677 num_artificial_parms_for, comp_template_parms,
2678 template_parameter_pack_p, any_dependent_template_arguments_p,
2679 any_type_dependent_arguments_p, any_value_dependent_elements_p,
2680 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
2681 zero_init_p, member_p, cp_lvalue_kind,
2682 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
2683 varargs_function_p, is_dummy_object, special_function_kind,
2684 string_conv_p, type_unknown_p, comp_except_specs, compparms,
2685 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
2686 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
2687 cp_has_mutable_p, at_least_as_qualified_p,
2688 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
2689 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
2690 * except.c (nothrow_libfn_p): Likewise.
2691 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
2693 * pt.c (comp_template_parms, template_parameter_pack_p,
2694 any_type_dependent_arguments_p, any_value_dependent_elements_p,
2695 any_dependent_template_arguments_p): Likewise.
2696 * repo.c (repo_export_class_p): Likewise.
2697 * semantics.c (anon_aggr_type_p): Likewise.
2698 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
2699 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
2700 varargs_function_p, member_p, is_dummy_object, pod_type_p,
2701 zero_init_p, special_function_p): Likewise.
2702 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
2703 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
2704 compparms, invalid_nonstatic_memfn_p,
2705 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
2706 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
2707 cp_has_mutable_p, lvalue_or_else): Likewise.
2709 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
2711 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
2712 * cp-objcp-common.c (cp_tree_size): Ditto.
2713 * tree.c (cp_walk_subtrees): Ditto
2714 * cp-tree.def (TINST_LEVEL): Go away.
2715 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
2716 move together with other non-tree structs.
2717 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
2718 (union lang_tree_node): Eliminate tinst_level field.
2719 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
2720 (current_instantiation, outermost_tinst_level): Return
2721 a "struct tinst_level *".
2723 * error.c (print_instantiation_partial_context): Change second
2724 parameter to a "struct tinst_level *". Replace accessor macros
2726 (print_instantiation_full_context): Likewise.
2727 * lex.c (in_main_input_context): Likewise.
2729 * pt.c (struct pending_templates): New.
2730 (pending_templates, last_pending_template): Use it as a type.
2731 (current_tinst_level): Change typo to "struct tinst_level *"
2732 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
2733 (add_pending_template): Construct a "struct pending_template".
2734 Replace TINST_LEVEL accessor macros with field access.
2735 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
2736 (pop_tinst_level): Likewise.
2737 (instantiate_pending_templates): Likewise. Factor common code used
2738 when an instantiation has been done.
2739 (outermost_tinst_level): Replace tree_last with loop.
2740 (current_instantiation): Return a "struct tinst_level *".
2742 2007-08-24 Ollie Wild <aaw@google.com>
2744 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
2745 * name-lookup.h (cp_binding_level): Remove vtables member.
2747 2007-08-24 Richard Guenther <rguenther@suse.de>
2749 * tree.c (cp_cannot_inline_tree_fn): Remove.
2750 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
2751 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
2754 2007-08-24 Jakub Jelinek <jakub@redhat.com>
2757 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
2758 error_mark_node right away if build_expr_type_conversion
2762 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
2763 is error_mark_node rather than NULL_TREE.
2764 * pt.c (check_explicit_specialization): Likewise.
2767 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
2768 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
2770 2007-08-22 Jason Merrill <jason@redhat.com>
2773 * pt.c (outermost_tinst_level): New function.
2774 * lex.c (in_main_input_context): New function.
2775 * cp-tree.h: Declare it.
2776 * decl2.c (constrain_class_visibility): Use it to avoid warning
2777 about uses of the anonymous namespace in the main input file.
2779 2007-08-21 Jakub Jelinek <jakub@redhat.com>
2781 * init.c (build_new_1): Use get_target_expr instead of save_expr.
2783 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
2786 * class.c (finish_struct_1): Warn when a class has virtual
2787 functions and accessible non-virtual destructor.
2789 2007-08-20 Richard Guenther <rguenther@suse.de>
2793 * call.c (build_new_method_call): Convert initializer to
2795 * init.c (build_aggr_init): Do not fiddle with types.
2796 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
2797 * except.c (build_throw): Do not drop qualifiers for the
2799 * typeck.c (get_member_function_from_ptrfunc): Do not
2800 fiddle with types, instead convert.
2801 (build_ptrmemfunc1): Convert to the target type for
2803 (gfc_trans_allocate): Convert result to target type.
2804 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
2805 pointer-to-member structures shall have alias set zero as well.
2807 2007-08-20 Richard Guenther <rguenther@suse.de>
2809 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
2811 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
2812 (nonstatic_local_decl_p): Likewise.
2813 * tree.c (cp_auto_var_in_fn_p): Remove.
2814 * decl.c (nonstatic_local_decl_p): Remove.
2816 2007-08-20 Richard Guenther <rguenther@suse.de>
2818 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
2820 * tree.h (cp_walk_tree): New define to walk_tree_1 with
2821 cp_walk_subtrees lh parameter.
2822 (cp_walk_tree_without_duplicates): New define to
2823 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
2824 * tree.c (count_trees): Call
2825 cp_walk_tree_without_duplicates.
2826 (verify_stmt_tree): Call cp_walk_tree.
2827 (break_out_target_exprs): Likewise.
2828 (WALK_SUBTREE): Likewise.
2829 * cp-gimplify.c (cp_genericize): Likewise.
2830 * cp-pt.c (find_parameter_packs_r): Likewise.
2831 (uses_parameter_packs): Likewise.
2832 (make_pack_expansion): Likewise.
2833 (check_for_bare_parameter_packs): Likewise.
2834 (for_each_template_parm): Likewise.
2835 * decl.c (check_default_argument): Call
2836 cp_walk_tree_without_duplicates.
2837 * except.c (build_throw): Likewise.
2838 * decl2.c (type_visibility): Likewise.
2839 * semantics.c (expand_or_defer_fn): Likewise.
2840 (finalize_nrv): Call cp_walk_tree.
2842 2007-08-20 Jakub Jelinek <jakub@redhat.com>
2845 * init.c (build_new_1): Rename placement_var variable to placement_expr.
2846 Initialize it with save_expr rather than get_temp_regvar.
2848 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
2851 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
2854 2007-08-17 Ollie Wild <aaw@google.com>
2857 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
2858 declarations into appropriate slots for comparison. Fix type
2861 2007-08-17 Paolo Carlini <pcarlini@suse.de>
2864 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
2865 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
2867 2007-08-17 Paolo Carlini <pcarlini@suse.de>
2870 * parser.c (cp_parser_class_head): Improve error message.
2872 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
2874 * pt.c (instantiate_decl): Set input_location
2875 for the function end.
2877 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2879 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
2881 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
2882 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
2883 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
2884 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
2885 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
2886 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
2887 * typeck.c (cp_type_quals): Likewise.
2888 * typeck2.c (cxx_incomplete_type_diagnostic,
2889 cxx_incomplete_type_error): Likewise.
2891 2007-08-16 Paolo Carlini <pcarlini@suse.de>
2894 * pt.c (tsubst_friend_function): When check_classfn
2895 returns error_mark_node likewise return it.
2897 2007-08-15 Jakub Jelinek <jakub@redhat.com>
2900 * typeck.c (check_return_expr): Don't NRV optimize vars in
2902 * decl.c (finish_function): Comment fix.
2904 2007-08-15 Paolo Carlini <pcarlini@suse.de>
2907 * pt.c (push_template_decl_real): Depending on TYPE_P
2908 use either TYPE_CONTEXT or DECL_CONTEXT.
2910 2007-08-14 Mark Mitchell <mark@codesourcery.com>
2912 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
2913 constructors and destructors return this.
2915 2007-08-14 Paolo Carlini <pcarlini@suse.de>
2918 * decl2.c (check_classfn): Return error_mark_node in case of error;
2919 in that case, do not call add_method.
2920 * decl.c (start_decl): Deal with check_classfn returning
2922 (grokfndecl): Likewise.
2923 * pt.c (tsubst_friend_function): Likewise.
2925 2007-08-14 Andrew Pinski <pinskia@gmail.com>
2928 * typeck.c (build_binary_op): Disallow vector float types with
2929 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
2931 2007-08-11 Ian Lance Taylor <iant@google.com>
2933 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
2935 * cp-tree.h (cxx_get_alias_set): Update declaration.
2937 2007-08-10 Ollie Wild <aaw@google.com>
2939 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
2941 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
2943 (unqualified_namespace_lookup): Fix ambiguous_decl call.
2944 (lookup_using_namespace): Fix ambiguous_decl call.
2945 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
2947 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2949 * call.c (name_as_c_string): Use CONST_CAST.
2950 * decl.c (build_decl): Likewise.
2951 * parser.c (cp_parser_string_literal): Likewise.
2953 2007-08-10 Paolo Carlini <pcarlini@suse.de>
2956 * error.c (dump_expr): Consistently use the *_cxx_*
2957 variants of the pretty-print functions.
2959 2007-08-10 Paolo Carlini <pcarlini@suse.de>
2962 * decl.c (check_special_function_return_type): Just error
2963 on return type specified for conversion operator.
2965 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
2967 * typeck2.c (readonly_error): Handle general expressions.
2968 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
2970 2007-08-06 Dan Hipschman <dsh@google.com>
2972 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
2973 access function name.
2975 2007-08-04 Alfred Minarik <a.minarik@aon.at>
2978 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
2979 * g++spec.c (lang_specific_driver): Check them.
2981 2007-08-06 Paolo Carlini <pcarlini@suse.de>
2984 * pt.c (inline_needs_template_parms): Fix comment; change return type
2987 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
2990 2007-03-26 Dirk Mueller <dmueller@suse.de>
2992 * parser.c (cp_parser_member_declaration): Pedwarn
2993 about stray semicolons after member declarations.
2995 2007-08-02 Lee Millward <lee.millward@gmail.com>
3000 * parser.c (cp_parser_asm_definition): Detect and discard asm
3001 statements with invalid inputs or outputs.
3002 (cp_parser_asm_operand_list): Return error mark node if any
3003 of the operands are invalid. Adjust documentation.
3005 2007-08-02 Nick Clifton <nickc@redhat.com>
3007 * typeck.c: Change copyright header to refer to version 3 of the
3008 GNU General Public License and to point readers at the COPYING3
3009 file and the FSF's license web page.
3010 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
3011 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
3012 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
3013 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
3014 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
3015 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
3016 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
3017 name-lookup.h, parser.c: Likewise.
3019 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3022 * call.c (magic_varargs_p): Honor the "type generic" attribute.
3024 2007-07-30 Paolo Carlini <pcarlini@suse.de>
3027 * semantics.c (finish_label_stmt): Reject the __label__
3028 extension outside function scopes.
3030 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3032 * parser.c (eof_token): Un-constify.
3033 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
3034 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
3037 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
3039 * pt.c, tree.c, typeck2.c: Fix comment typos.
3041 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
3042 Mark Mitchell <mark@codesourcery.com>
3045 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
3046 hidden due to friend declarations in local classes.
3048 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
3050 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
3051 * cp-tree.def (DECLTYPE_TYPE): New.
3052 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
3053 (dump_type_prefix): Ditto.
3054 (dump_type_suffix): Ditto.
3055 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
3056 * mangle.c (write_type): Handle DECLTYPE_TYPE.
3057 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
3059 (DECLTYPE_TYPE_EXPR): New.
3060 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
3061 (finish_declared_type): Declare.
3062 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
3063 DECLTYPE_TYPE nodes.
3064 (pp_cxx_type_id): Ditto.
3065 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
3066 (tsubst): Substitute into a DECLTYPE_TYPE node.
3067 (tsubst_copy): Ditto.
3068 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
3070 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
3071 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
3072 structural equality (because we can't hash the expressions).
3073 (finish_declared_type): New.
3074 * lex.c (reswords): Add "decltype" keyword.
3075 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
3076 (cp_parser_postfix_expression): Add member_access_only_p to
3077 restrict postfix expression to member access expressions.
3078 (cp_parser_unary_expression): Update call to
3079 cp_parser_postfix_expression to reflect new parameter.
3080 (cp_parser_declared_type): New.
3081 (cp_parser_simple_type_specifier): Parse decltype types.
3083 2007-07-27 Mark Mitchell <mark@codesourcery.com>
3086 * call.c (convert_for_arg_passing): Only widen bitfields to their
3087 declared types if necessary.
3089 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3091 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
3094 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3096 * decl.c (typename_hash, typename_compare): Constify.
3097 * mangle.c (hash_type, compare_type): Likewise.
3098 * pt.c (eq_local_specializations, hash_local_specialization):
3100 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
3101 list_hash): Likewise.
3102 * typeck2.c (pat_compare): Likewise.
3104 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
3106 * method.c (implicitly_declare_fn): Increase alignment if member
3107 function pointer format requires it.
3109 2007-07-24 Paolo Carlini <pcarlini@suse.de>
3112 * typeck.c (check_return_expr): Do not pass a null argument
3115 2007-07-24 Paolo Carlini <pcarlini@suse.de>
3118 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
3121 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
3124 * typeck.c (convert_arguments): Only use default args if we have
3128 * typeck.c (structural_comptypes): No need to check
3129 resolve_typename_type return value here.
3130 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
3131 * pt.c (resolve_typename_type): Follow typename typedefs. Return
3132 original type rather than error_mark_node in case of failure.
3133 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
3134 resolve_typename_type result check.
3135 (cp_parser_direct_declarator, cp_parser_head,
3136 cp_parser_constructor_declarator_p): Likewise.
3138 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
3140 * pt.c (template_parms_variadic_p): Remove.
3141 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
3143 2007-07-12 Jakub Jelinek <jakub@redhat.com>
3146 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
3147 argument to dump_aggr_init_expr_args instead of false.
3149 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
3151 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
3152 canonical types; otherwise, fall back to structural type
3153 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
3154 internal compiler error if the canonical types are wrong.
3156 2007-07-11 Paolo Carlini <pcarlini@suse.de>
3159 * parser.c (cp_parser_make_indirect_declarator): When the
3160 the code argument is ERROR_MARK return cp_error_declarator.
3162 2007-07-09 Geoffrey Keating <geoffk@apple.com>
3165 * decl.c (cxx_init_decl_processing): Don't set
3166 force_align_functions_log.
3167 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
3168 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
3169 FUNCTION_DECL, return its alignment.
3171 2007-07-09 Richard Guenther <rguenther@suse.de>
3173 * decl.c (start_preparsed_function): Do not promote return type.
3175 2007-07-08 Paolo Carlini <pcarlini@suse.de>
3178 * pt.c (unify): Never pass error_mark_node to template_decl_level.
3180 2007-07-07 Mark Mitchell <mark@codesourcery.com>
3183 * pt.c (resolve_overloaded_unification): Robustify. Return a
3185 (type_unification_real): Adjust accordingly.
3187 2007-07-06 Richard Guenther <rguenther@suse.de>
3189 * init.c (build_new_1): Use the correct pointer type.
3190 * typeck2.c (build_m_component_ref): Likewise.
3192 2007-07-05 Mark Mitchell <mark@codesourcery.com>
3195 * init.c (build_zero_init): Always build an initializer for
3197 * typeck2.c (build_functional_cast): Use build_zero_init.
3200 * init.c (build_new_1): Always pass the allocation function to
3201 build_op_delete_call.
3202 * call.c (build_op_delete_call): Handle operator delete with a
3203 variable-argument list. Do not issue an error when no matching
3204 deallocation function is available for a new operator.
3207 * cp-tree.h (any_value_dependent_elements_p): Declare it.
3208 * decl.c (value_dependent_init_p): New function.
3209 (cp_finish_decl): Use it.
3210 * pt.c (value_dependent_expression_p): Use
3211 any_value_dependent_elements_p.
3212 * parser.c (cp_parser_primary_expression): Add comment about
3213 treating dependent qualified names as integral
3214 constant-expressions.
3216 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
3218 * decl.c (build_ptrmemfunc_type): Always use structural equality
3219 tests when comparing pointer-to-member-function types, because the
3220 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
3223 2007-07-03 Mark Mitchell <mark@codesourcery.com>
3225 * init.c (build_new): Tweak comment.
3227 2007-06-29 Dave Brolley <brolley@redhat.com>
3230 * parser.c (cp_parser_new_type_id): Don't reduce a named array
3231 type to its base type and number of elements here.
3232 * init.c (build_new): Call complete_type_or_else to ensure that the
3233 type is complete and to issue a diagnostic if it is not.
3234 (build_new_1): Don't call complete_type_or_else here.
3236 2007-07-03 Richard Guenther <rguenther@suse.de>
3239 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
3242 2007-07-02 Simon Baldwin <simonb@google.com>
3244 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
3245 for inner-style nested forward declarations that don't declare
3248 2007-07-02 Jakub Jelinek <jakub@redhat.com>
3251 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
3252 DECL_P in not a variable and appears more than once error messages.
3254 2007-07-01 Ollie Wild <aaw@google.com>
3256 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
3257 (select_decl): Remove function.
3258 (unqualified_namespace_lookup): Populate binding by calling
3259 ambiguous_decl. Remove select_decl call.
3260 (lookup_qualified_name): Remove select_decl call.
3261 * decl.c (lookup_and_check_tag): Check for ambiguous references.
3262 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
3263 generation when name lookup is ambiguous.
3265 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
3268 * init.c (build_new_1): Use structural equality on the copy of the
3271 2007-06-28 Geoffrey Keating <geoffk@apple.com>
3273 * decl2.c (determine_visibility): Implement
3274 flag_visibility_ms_compat effect on type info.
3275 * decl.c (cxx_init_decl_processing): Implement
3276 global effect of flag_visibility_ms_compat.
3278 2007-06-28 Geoffrey Keating <geoffk@apple.com>
3280 * decl2.c (start_objects): Mark constructor-running function
3283 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
3286 * decl.c (grokdeclarator): Reset friendp for member functions declared
3287 friend of their own class.
3289 2007-06-23 Mark Mitchell <mark@codesourcery.com>
3291 * decl2.c (determine_visibility): Don't look for dllexport here.
3292 (determine_visibility_from_class): Tidy.
3294 2007-06-18 Simon Baldwin <simonb@google.com>
3297 * parser.c (cp_parser_single_declaration): Added check for storage
3298 class other than sc_none in parsed declaration, and a flag to indicate
3299 if the call is part of an explicit template specialization parse.
3300 * (cp_parser_explicit_specialization): Specialization check flag added
3301 to call to cp_parser_single_declaration(), set true.
3302 * (cp_parser_template_declaration_after_export): Specialization check
3303 flag added to call to cp_parser_single_declaration(), set false.
3304 * pt.c (check_explicit_specialization): Added code to copy visiblity
3305 and linkage from the templated function to the explicit specialization.
3307 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
3309 * typeck.c (build_binary_op): For templates build the
3310 expression in pieces to avoid the assert in build2_stat.
3311 (get_member_function_from_ptrfunc):
3312 Change over to using POINTER_PLUS_EXPR and convert
3313 the second operand to sizetype.
3314 * typeck2.c (build_m_component_ref): Likewise.
3315 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
3316 instead of PLUS_EXPR for pointers.
3317 (build_new_1): Likewise.
3318 (build_vec_delete_1): Likewise.
3319 (build_vec_delete): Likewise.
3320 * class.c (build_base_path): Likewise.
3321 (build_base_path): Likewise.
3322 (convert_to_base_statically): Likewise.
3323 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
3324 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
3325 instead of PLUS_EXPR.
3326 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
3327 instead of PLUS_EXPR for pointers.
3328 * call.c (build_special_member_call): Likewise.
3329 * rtti.c (build_headof): Likewise.
3330 Use sizetype instead of ptrdiff_type_node.
3331 (tinfo_base_init): Create a POINTER_PLUS_EXPR
3332 instead of PLUS_EXPR for pointers.
3333 * except.c (expand_start_catch_block): Do a
3334 NEGATIVE and then a POINTER_PLUS_EXPR instead
3336 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
3337 PLUS_EXPR on pointer types over to use
3338 POINTER_PLUS_EXPR and remove the conversion
3339 to the pointer types.
3340 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
3341 adding to a pointer type. Use size_int instead of
3342 ssize_int. Convert the index to sizetype before
3343 adding it to the pointer.
3345 2007-06-15 Mark Mitchell <mark@codesourcery.com>
3347 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
3348 (DECL_ANON_UNION_VAR_P): New macro.
3349 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
3350 than DECL_VAR_MARKED_P, to keep track of which variables we have
3352 * decl.c (redeclaration_error_message): Complain about redeclaring
3353 anonymous union members at namespace scope.
3354 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
3356 2007-06-14 Geoff Keating <geoffk@apple.com>
3358 * decl2.c (determine_visibility): Ensure that functions with
3359 hidden types as parameters are hidden.
3362 * decl2.c (determine_visibility): Remove duplicate code for
3365 2007-06-12 Ian Lance Taylor <iant@google.com>
3368 * init.c (avoid_placement_new_aliasing): New static function.
3369 (build_new_1): Call it.
3371 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
3373 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
3374 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
3376 2007-06-08 Jakub Jelinek <jakub@redhat.com>
3379 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
3380 on init, the non-decl cond operand and increment value.
3382 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
3385 * decl.c (check_initializer): Report an error when a brace enclosed
3386 initializer is used for a non-aggregate type in C++98.
3387 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
3389 (grokdeclarator): Likewise.
3390 (move_fn_p): Likewise.
3391 * typeck.c (check_return_expr): Likewise.
3392 * call.c (reference_binding): Likewise.
3393 * error.c (cp_cpp_error): Likewise.
3394 * pt.c (check_default_tmpl_args): Likewise.
3396 * lex.c (init_reswords): Likewise.
3397 * parser.c (p_parser_primary_expression): Likewise.
3398 (TOKEN_PRECEDENCE): Likewise.
3399 (cp_parser_init_declarator): Likewise.
3400 (cp_parser_ptr_operator): Likewise.
3401 (cp_parser_parameter_declaration): Likewise.
3402 (cp_parser_enclosed_template_argument_list): Likewise.
3403 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
3404 (cp_parser_next_token_ends_template_argument_p): Likewise.
3406 2007-06-04 Simon Baldwin <simonb@google.com>
3408 * decl.c (grokdeclarator): Readability change. Moved case labels
3409 into direct switch statement scope.
3411 2007-06-04 Paolo Carlini <pcarlini@suse.de>
3413 * call.c (convert_like_real): Remove pointless code.
3415 2007-05-31 Mark Mitchell <mark@codesourcery.com>
3417 * decl.c (get_atexit_fn_ptr_type): New function.
3418 (get_atexit_node): Use it.
3419 (start_cleanup_fn): Likewise.
3420 (register_dtor_fn): Use the object's destructor, instead of a
3421 separate cleanup function, where possible.
3422 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
3423 (atexit_fn_ptr_type_node): New macro.
3424 * decl2.c (build_cleanup): Use build_address.
3426 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
3428 * typeck.c (build_binary_op): Include types in error.
3430 2007-05-31 Jakub Jelinek <jakub@redhat.com>
3433 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
3434 needs runtime initialization.
3436 2007-05-31 Paolo Carlini <pcarlini@suse.de>
3439 * semantics.c (finish_trait_expr): Complete the types.
3441 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
3442 Douglas Gregor <doug.gregor@gmail.com>
3443 Pedro Lamarao <pedro.lamarao@mndfck.org>
3444 Howard Hinnant <howard.hinnant@gmail.com>
3448 * typeck.c (comptypes): Don't consider rvalue and lvalue
3449 reference types to be equivalent.
3450 (check_return_expr): Move from certain lvalues when returning
3452 * decl.c (grokdeclarator): Implement reference collapsing.
3453 (copy_fn_p): Don't consider constructors taking rvalue references
3454 to be copy constructors.
3456 * call.c (conversion): New "rvaluedness_matches_p" member.
3457 (convert_class_to_reference): Require reference type as first
3458 parameter instead of base type.
3459 (reference_binding): Add logic to handle rvalue references.
3460 (implicit_conversion): Update inaccurate comment.
3461 (convert_like_real): Disable creation of temporaries that are
3462 impossible to initialize for types with move constructors.
3463 (build_over_call): Elide move constructors when possible.
3464 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
3465 (maybe_handle_ref_bind): Return conversion instead of type node.
3466 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
3467 determine preferred conversion sequences