1 2008-08-12 Paolo Carlini <paolo.carlini@oracle.com>
4 * parser.c (cp_parser_class_head): Early return error_mark_node in
5 case of global qualification of class name or qualified name that
8 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
11 * cvt.c (ocp_convert): Warn for out-of-range conversions to enum.
13 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
16 * cp-tree.h (struct diagnostic_context, struct diagnostic_info):
17 Delete forward declarations. Check that toplev.h has not been
18 included before this file. Include toplev.h and diagnostic.h.
19 * error.c (cp_cpp_error): Use DK_PEDWARN.
20 (cxx_incomplete_type_diagnostic): Update declaration.
21 (cxx_incomplete_type_error): Use DK_ERROR.
22 * typeck2.c (cxx_incomplete_type_diagnostic): Take a diagnostic_t
23 as argument. Use emit_diagnostic.
24 (cxx_incomplete_type_error): Use DK_ERROR.
25 (add_exception_specifier): Use diagnostic_t instead of custom
27 * typeck.c (complete_type_or_else): Update call to
28 cxx_incomplete_type_diagnostic.
29 * init.c (build_delete): Likewise.
30 * call.c (diagnostic_fn_t): Remove unused typedef.
31 (build_temp): Pass a pointer to diagnostic_t.
32 (convert_like_real): Use emit_diagnostic.
33 (joust): Check return value of warning before giving informative
35 * friend.c (do_friend): Check return value of warning
36 before giving informative note.
37 * parser.c (cp_parser_template_id): Likewise.
39 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
42 * class.c (check_bases_and_members): Warn with -Wuninitialized
45 2008-08-08 Volker Reichelt <v.reichelt@netcologne.de>
48 * decl.c (xref_basetypes): Check base for MAYBE_CLASS_TYPE_P,
49 and make sure it is not a union.
51 2008-08-07 H.J. Lu <hongjiu.lu@intel.com>
53 * semantics.c (finish_decltype_type): Initialize type.
55 2008-08-07 Douglas Gregor <doug.gregor@gmail.com>
57 * semantics.c (finish_decltype_type): Handle calls to function
58 pointers and references to functions properly.
60 2008-08-06 Douglas Gregor <doug.gregor@gmail.com>
63 * parser.c (cp_parser_template_argument): Don't assume that '>>'
64 following a type-id is an error when in C++0x mode.
66 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
69 * decl.c (grokdeclarator): Use explicit location with permerror_at.
71 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
74 * typeck.c (cp_build_binary_op): Move code to c-common.c.
76 2008-08-05 Jason Merrill <jason@redhat.com>
79 * decl.c (build_ptrmemfunc_type): Don't require structural
80 comparison of PMF types.
81 * tree.c (cp_build_qualified_type_real): Don't clear
82 a valid TYPE_PTRMEMFUNC_TYPE.
83 * typeck.c (cp_build_unary_op): Still do build_ptrmemfunc in
86 2008-08-04 Jason Merrill <jason@redhat.com>
89 * typeck2.c (check_narrowing): Allow narrowing conversion
90 from an explicit floating-point constant.
93 * pt.c (tsubst_decl): Leave DECL_INITIAL set on deleted
96 2008-08-04 Simon Baldwin <simonb@google.com>
99 * parser.c (cp_parser_elaborated_type_specifier): Warn only when
100 the declaration's id is followed by a semicolon.
102 2008-07-31 Jakub Jelinek <jakub@redhat.com>
105 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Call
106 complete_type_or_else even for UNKNOWN_TYPE to get diagnostics.
108 2008-07-31 Jason Merrill <jason@redhat.com>
111 * init.c (build_new_1): Don't convert pointer to the data type
112 until we're actually going to treat it as that type.
115 * tree.c (build_aggr_init_expr): Split out...
116 (build_cplus_new): ...from here.
117 (stabilize_init): Don't mess with AGGR_INIT_EXPR either.
118 * init.c (build_new_1): new T() means value-initialization,
119 not default-initialization.
120 (build_vec_init): Likewise.
121 (build_value_init_1): Use build_aggr_init_expr.
123 2008-07-30 Dodji Seketeli <dseketel@redhat.com>
126 * decl2.c (fix_temporary_vars_context_r): New function.
127 (one_static_initialization_or_destruction): Make sure temporary
128 variables part of the initialiser have their DECL_CONTEXT()
131 2008-07-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
134 * typeck.c (build_binary_op): Encapsulate code into
137 2008-07-29 Jakub Jelinek <jakub@redhat.com>
140 * tree.c (cplus_array_hash, build_cplus_array_type_1): Hash on
141 TYPE_UID instead of pointers.
143 2008-07-29 Jan Hubicka <jh@suse.cz>
145 * optimize.c (maybe_clone_body): Remove DECL_INLINE.
146 * decl.c (duplicate_decls): Likewise.
147 (grokfndecl): Likewise.
148 (start_method): Likewise.
149 * method.c (make_thunk, make_alias_for, implicitly_declare_fn):
151 * pt.c (register_specialization, regenerate_decl_from_template):
153 * decl2.c (grokfield): Likewise.
155 2008-07-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
158 * decl.c (duplicate_decls): Merge USED flags.
160 2008-07-27 Jason Merrill <jason@redhat.com>
163 * decl.c (reshape_init_r): Allow C++0x initializer lists.
165 2008-07-28 Richard Guenther <rguenther@suse.de>
167 Merge from gimple-tuples-branch.
169 2008-07-22 Aldy Hernandez <aldyh@redhat.com>
171 * cp-gimplify.c (gimplify_if_stmt): Set location on newly created
174 2008-07-18 Jakub Jelinek <jakub@redhat.com>
176 * decl.c (finish_function): Call gimple_body after cp_genericize.
178 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
180 * optimize.c: Include gimple.h instead of tree-gimple.h.
181 * Make-lang.in (cp-gimplify.o): Depend on tree-iterator.h.
182 * cp-gimplify.c: Rename tree-gimple.h to gimple.h. Include
185 2008-07-16 Jakub Jelinek <jakub@redhat.com>
187 * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE for the clone.
189 2008-07-14 Jakub Jelinek <jakub@redhat.com>
191 * cp-gimplify.c (cp_gimplify_expr): Update comment.
193 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
195 * cp-tree.h (union lang_tree_node): Rename GENERIC_NEXT to
197 * cp-gimplify.c (cxx_omp_clause_apply_fn): Rename
198 GIMPLE_MODIFY_STMT to MODIFY_EXPR.
199 (cxx_omp_clause_copy_ctor): Same.
200 (cxx_omp_clause_assign_op): Same.
202 2008-05-28 Jakub Jelinek <jakub@redhat.com>
204 * cp-gimplify.c (cp_gimplify_omp_for): Add pre_p argument. Tuplify.
205 (cp_gimplify_expr): Adjust caller.
207 2008-05-11 Doug Kwan <dougkwan@google.com>
209 * init.c (build_vec_delete): Add type conversion for argument
210 0 of POINTER_PLUS_EXPR.
212 2008-04-29 Doug Kwan <dougkwan@google.com>
214 * decl2 (File): Include "gimple.h"
215 (cp_write_global_declarations): Use gimple_body instead of
217 * Make-lang.in (cp/decl2.o): Add $(GIMPLE_H)
219 2008-04-10 Diego Novillo <dnovillo@google.com>
221 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00913.html
223 * optimize.c (maybe_clone_body): Re-enable call to
225 * cp-gimplify.c (cp_gimplify_omp_for): Mark disabled
226 code with call to gimple_unreachable.
227 (cp_genericize): Fix handling of clone bodies.
229 2008-04-04 Diego Novillo <dnovillo@google.com>
231 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00413.html
233 * optimize.c (maybe_clone_body): Re-enable.
235 2008-02-19 Diego Novillo <dnovillo@google.com>
236 Oleg Ryjkov <olegr@google.com>
238 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
240 * cp-gimplify.c (gimplify_for_stmt): Change gimple_seq
241 argument to gimple_seq *. Update all users.
242 (gimplify_must_not_throw_expr): Likewise.
244 2008-02-04 Oleg Ryjkov <olegr@google.com>
246 * except.c: Include gimple.h
247 (cp_protect_cleanup_actions): Convert to tuples.
248 * Make-lang.in (cp/except.o): Add dependency on gimple.h
250 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
252 * cp-gimplify.c (gimplify_cp_loop): Call tree_annotate_all_with_locus
253 instead of annotating each block manually.
255 2007-10-30 Aldy Hernandez <aldyh@redhat.com>
257 * cp-gimplify.c (gimplify_cp_loop): Tuplify.
258 (gimplify_for_stmt): Same.
259 (gimplify_switch_stmt): Same.
260 (cp_gimplify_expr): [FOR_STMT]: Do not call gimplify_for_stmt. Return
262 [WHILE_STMT]: Return GS_OK.
264 [CONTINUE_STMT]: Same.
266 (cp_genericize): Set gimple_body() of cloned functions when needed.
268 2007-10-29 Aldy Hernandez <aldy@quesejoda.com>
270 * cp-gimplify.c: Move build_gimple_eh_filter_tree here.
271 (cp_gimplify_init_expr): Convert to tuples.
272 (gimplify_must_not_throw_expr): Make function return a
273 gimplify_status and convert to tuples.
275 2007-10-18 Aldy Hernandez <aldy@quesejoda.com>
277 * cp-gimplify.c (genericize_try_block): Enable and do not call
279 (genericize_catch_block): Same.
280 (genericize_eh_spec_block): Same.
281 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
282 (cp_gimplify_expr): Enable TRY_BLOCK, HANDLER, and EH_SPEC_BLOCK.
284 2007-10-16 Aldy Hernandez <aldy@quesejoda.com>
286 * optimize.c (maybe_clone_body): Comment out call to clone_body.
287 * decl.c (finish_function): Use gimple_body instead of
289 * cp-tree.h (cp_gimplify_expr): Last 2 arguments are sequences.
290 * cp-gimplify.c (genericize_try_block): Comment out.
291 (genericize_catch_block): Same.
292 (genericize_eh_spec_block): Same.
293 (gimplify_cp_loop): Comment out calls to gimplify_stmt.
294 (gimplify_for_stmt): Comment out.
295 (gimplify_switch_stmt): Comment out call to gimplify_stmt.
296 (cp_gimplify_omp_for): Same.
297 (gimplify_must_not_throw_expr): Argument pre_p is a sequence.
298 Comment out call to gimplify_stmt and append_to_statement_list.
299 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
300 (cp_gimplify_init_expr): Arguments pre_p and post_p are sequences.
301 (cp_gimplify_expr): Same.
302 Comment out calls to genericize_*_block. Comment out call to
305 2008-07-27 H.J. Lu <hongjiu.lu@intel.com>
308 * class.c (type_has_user_provided_default_constructor): Handle
311 2008-07-27 Paolo Carlini <paolo.carlini@oracle.com>
313 * decl.c (push_library_fn): Add a parameter for the exceptions that
314 the function may throw.
315 (push_void_library_fn, push_throw_library_fn, expand_static_init):
317 (build_library_fn): Change to static.
318 * cp-tree.h: Adjust declarations.
319 * except.c (declare_nothrow_library_fn): New.
320 (do_get_exception_ptr, do_begin_catch, do_free_exception,
321 do_allocate_exception): Use the latter, adjust the declarations
322 (ie, add empty exception-specification), consistently with the
323 actual implementation in libsupc++.
325 2008-07-25 Jan Hubicka <jh@suse.cz>
327 * typeck.c (inline_conversion): Remove.
328 (cp_build_function_call): Do not use inline_conversion.
329 * decl.c (duplicate_decls): Do not insist on inline being declared
331 (start_cleanup_fn): Do not assume that INLINE flags prevent function
332 from being output. We now remove static functions always.
333 (finish_function): Do return warning on all static functions.
334 * call.c (build_over_call): Do not use inline_conversion.
335 * cp-tree.h (possibly_inlined_p): Declare.
336 (inline_conversion): Remove.
337 * pt.c (instantiate_decl): Use possibly_inlined_p predicate.
338 * decl2.c (cp_write_global_declarations): Likewise.
339 (mark_used): Likewise.
340 (possibly_inlined_p): New functions.
342 2008-07-25 Jason Merrill <jason@redhat.com>
344 * class.c (type_has_user_provided_default_constructor): Handle
347 2008-07-23 Jan Hubicka <jh@suse.cz>
349 * decl.c (duplicate_decls): Update comment and unit-at-a-time.
350 (grogfndecl): Drop flag_inline_trees code.
351 * pt.c (instantiate_decl): Drop flag_iline_trees code.
352 * lex.c (cxx_init): Do not set unit-at-a-time.
354 2008-07-23 Jason Merrill <jason@redhat.com>
356 * mangle.c (write_unqualified_name): Avoid infinite recursion when
357 trying to mangle a decl with no name.
359 Implement defaulted/deleted functions as per N2346
360 * cp-tree.h (struct lang_decl_flags): Add defaulted_p bitfield.
361 (DECL_DELETED_FN): New macro.
362 (DECL_DEFAULTED_FN): New macro.
363 * class.c (user_provided_p): New fn.
364 (defaultable_fn_p): New fn.
365 (type_has_user_provided_constructor): New fn.
366 (type_has_user_provided_default_constructor): New fn.
367 (check_methods): A defaulted fn is still trivial.
368 (check_bases_and_members): Likewise.
369 * decl.c (grok_special_member_properties): Likewise.
370 (duplicate_decls): Complain about redeclaring a function as deleted.
371 (start_decl): initialized==2 means deleted.
372 (cp_finish_decl): Handle deleted/defaulted semantics.
373 * decl2.c (grokfield): Likewise.
374 (mark_used): Check DECL_DEFAULTED_FN instead of DECL_ARTIFICIAL.
375 Complain about using a deleted fn.
376 * init.c (build_value_init_1): Use type_has_user_provided_constructor.
377 (perform_member_init): Check for a user-provided default constructor
378 even if TYPE_NEEDS_CONSTRUCTING.
379 (build_new_1): Likewise.
380 * call.c (build_over_call): Don't call mark_used twice.
381 * method.c (implicitly_declare_fn): Set DECL_DEFAULTED_FN.
382 * search.c (check_final_overrider): Check for deleted mismatch.
383 * parser.c (cp_parser_init_declarator): Tell start_decl about =delete.
384 (cp_parser_pure_specifier): Handle =default and =delete.
386 * error.c (maybe_warn_cpp0x): Suggest -std=gnu++0x as well.
388 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
391 * typeck.c: All calls to pedwarn changed.
392 * decl.c: All calls to pedwarn changed.
393 * call.c: All calls to pedwarn changed.
394 * error.c: All calls to pedwarn changed.
395 * typeck2.c: All calls to pedwarn changed.
396 * pt.c: All calls to pedwarn changed.
397 * name-lookup.c: All calls to pedwarn changed.
398 * parser.c: All calls to pedwarn changed.
400 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
402 * call.c: Fix comment typos.
404 * cp-tree.h: Likewise.
405 * cxx-pretty-print.c: Likewise.
408 * name-lookup.c: Likewise.
409 * operators.def: Likewise.
410 * parser.c: Likewise.
413 * typeck.c: Likewise.
415 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
419 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Only check
420 copy constructors and copy assignment operators proper.
422 2008-07-21 Rafael Avila de Espindola <espindola@google.com>
424 * parser.c (cp_token): Remove in_system_header.
425 (eof_token): Remove in_system_header.
426 (cp_lexer_get_preprocessor_token): Don't set in_system_header.
427 (cp_lexer_set_source_position_from_token): Don't set in_system_header.
428 (cp_parser_member_declaration): Use in_system_header_at.
429 * pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
430 (pop_tinst_level): Don't set in_system_header.
431 (instantiate_class_template): Don't set in_system_header.
432 (instantiate_decl): Don't set in_system_header.
433 (instantiate_pending_templates): Don't set in_system_header.
435 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
438 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
439 TYPE_NOTHROW_P, not TREE_NOTHROW.
440 (trait_expr_value): Likewise.
442 2008-07-18 Dodji Seketeli <dseketel@redhat.com>
445 * call.c (convert_like_real): Don't take the error code path
446 when a rvalue or base conversion has the bad_p field set.
448 2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
450 * rtti.c (emit_support_tinfos): Add char16_type_node and
452 * typeck2.c (digest_init): Support char16_t and char32_t.
454 2008-07-18 Kavih R. Ghazi <ghazi@caip.rutgers.edu>
456 * cvt.c (convert_to_void): Avoid C++ keywords.
457 * decl.c (walk_namespaces_r, wrapup_globals_for_namespace):
459 * friend.c (is_friend): Likewise.
460 * init.c (perform_member_init): Likewise.
461 * mangle.c (write_template_prefix, write_template_template_param):
463 * name-lookup.c (do_namespace_alias, do_using_directive,
464 parse_using_directive, ambiguous_decl, arg_assoc): Likewise.
465 * parser.c (cp_parser_template_id, cp_parser_namespace_definition,
466 cp_parser_objc_typename, cp_parser_objc_method_keyword_params):
468 * pt.c (is_specialization_of_friend, lookup_template_class,
469 push_tinst_level, instantiate_class_template,
470 tsubst_copy_and_build): Likewise.
471 * tree.c (add_stmt_to_compound): Likewise.
472 * typeck.c (finish_class_member_access_expr): Likewise.
474 2008-07-17 Julian Brown <julian@codesourcery.com>
475 Mark Mitchell <mark@codesourcery.com>
477 * decl2.c (determine_visibility): Allow target to override
478 visibility of class data.
480 2008-07-17 Paolo Carlini <paolo.carlini@oracle.com>
483 * semantics.c (trait_expr_value): Update __has_trivial_destructor
484 semantics to the current WP (N2691).
486 2008-07-16 Dodji Seketeli <dseketel@redhat.com>
489 * name-lookup.c (lookup_extern_c_fun_binding_in_all_ns): New function.
490 (pushdecl_maybe_friend): Check if a redeclaration of extern C function
491 complies with exception specification constraints.
493 2008-07-14 Jason Merrill <jason@redhat.com>
495 * lex.c (init_reswords): Always set D_OBJC.
497 2008-07-11 Tom Tromey <tromey@redhat.com>
498 Ian Lance Taylor <iant@google.com>
500 * lex.c (struct resword, reswords): Don't define.
501 (D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
502 (init_reswords): Clarify mask code. Use c_common_reswords rather
505 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
508 * decl.c (grokdeclarator): Warn about initializing variables
509 of storage class 'extern' only after the type of the declarator
510 has been properly computed.
512 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
515 * cp-tree.h (struct cp_decl_specifier_seq): Add a location field. It
516 carries the location of the primary type.
517 * parser.c (cp_parser_check_type_definition): Update documentation.
518 (cp_parser_check_for_definition_in_return_type,
519 cp_parser_check_for_invalid_template_id,
520 cp_parser_set_decl_spec_type,
521 cp_parser_check_for_definition_in_return_type,
522 cp_parser_diagnose_invalid_type_name,
523 cp_parser_new_expression, cp_parser_explicit_instantiation,
524 cp_parser_type_specifier, cp_parser_simple_type_specifier,
525 cp_parser_omp_for_loop, cp_parser_pragma): Use location in error
528 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
532 * semantic.c (qualified_name_lookup_error, finish_id_expression):
533 Add a location_t parameter so that
534 error message can have a more accurate location.
535 * cp-tree.h: Updated prototype
536 * pt.c (tsubst_qualified_id): Use location in error messages.
537 * parser.c (cp_parser_postfix_expression,
538 cp_parser_objc_statement, cp_parser_trait_expr,
539 cp_parser_token_is_class_key,
540 cp_parser_uncommitted_to_tentative_parse_p,
541 cp_parser_check_for_invalid_template_id, cp_parser_is_string_literal,
542 cp_parser_error, cp_parser_name_lookup_error,
543 cp_parser_simulate_error, cp_parser_check_decl_spec,
544 cp_parser_check_decl_spec, cp_parser_non_integral_constant_expression,
545 cp_parser_diagnose_invalid_type_name,
546 cp_parser_parse_and_diagnose_invalid_type_name,
547 cp_parser_require_pragma_eol, cp_parser_make_typename_type,
548 cp_parser_string_literal, cp_parser_primary_expression,
549 cp_parser_primary_expression, cp_parser_unqualified_id,
550 cp_parser_nested_name_specifier_opt, cp_parser_postfix_expression,
551 cp_parser_postfix_dot_deref_expression, cp_parser_new_expression,
552 cp_parser_direct_new_declarator, cp_parser_builtin_offsetof,
553 cp_parser_label_for_labeled_statement, cp_parser_statement_seq_opt,
554 cp_parser_jump_statement, cp_parser_block_declaration,
555 cp_parser_simple_declaration, cp_parser_decl_specifier_seq,
556 cp_parser_function_specifier_opt, cp_parser_decltype,
557 cp_parser_mem_initializer_list, cp_parser_mem_initializer,
558 cp_parser_mem_initializer_id, cp_parser_template_parameter,
559 cp_parser_type_parameter, cp_parser_template_id,
560 cp_parser_template_name, cp_parser_template_argument): Likewise.
562 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
565 * pt.c (tsubst_function_type): Remove warning for type qualifiers
566 on function return type.
568 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
571 * pt.c (tsubst_function_type): Don't warn for type qualifiers
572 on function return type in case of system header.
574 2008-07-09 Raksit Ashok <raksit@google.com>
576 * parser.c (cp_parser_postfix_expression): New warning based on flag
577 warn_disallowed_functions.
579 2008-07-08 Simon Martin <simartin@users.sourceforge.net>
582 * decl.c (grokdeclarator): Reset storage_class and staticp for friend
583 functions declared with a storage class qualifier.
585 2008-07-03 Richard Guenther <rguenther@suse.de>
588 * typeck.c (cp_build_function_call): Move code to verify
589 builtin function arguments ...
590 * call.c (build_cxx_call): ... here.
592 2008-07-02 Jason Merrill <jason@redhat.com>
594 * Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
596 Implement WG21 N2672, Initializer List proposed wording
597 * cp-tree.h (enum cp_tree_index): Add CPTI_INIT_LIST_TYPE.
598 (struct lang_type_class): Add has_list_ctor bitfield.
599 (TYPE_HAS_LIST_CTOR): New macro.
600 (BRACE_ENCLOSED_INITIALIZER_P): Expect init_list_type_node.
601 (CONSTRUCTOR_IS_DIRECT_INIT): New macro.
602 (LOOKUP_NO_NARROWING): New macro.
603 (LOOKUP_NO_COPY_CTOR_CONVERSION): New macro.
604 * parser.c (cp_parse_braced_list): Split out from...
605 (cp_parser_initializer_clause): ...here.
606 (cp_parser_postfix_expression): Build up CONSTRUCTOR for compound
608 (cp_lexer_next_token_is_not_keyword): New fn.
609 (cp_parser_parenthesized_expression_list): Handle { }.
610 (cp_parser_new_expression, cp_parser_new_initializer): Likewise.
611 (cp_parser_assignment_expression, cp_parser_condition): Likewise.
612 (cp_parser_jump_statement, cp_parser_simple_declaration): Likewise.
613 (cp_parser_mem_initializer, cp_parser_init_declarator): Likewise.
614 (cp_parser_initializer, cp_parser_functional_cast): Likewise.
615 (cp_parser_omp_for_loop, cp_parser_cache_group): Likewise.
616 (cp_parser_save_member_function_body): Likewise.
617 * call.c (conversion_kind): Add ck_list, ck_aggr.
618 (struct conversion): Add check_narrowing bitfield, conversion list.
619 (build_list_conv): New fn.
620 (build_aggr_conv): New fn.
621 (implicit_conversion): Call them.
622 (standard_conversion): Set check_narrowing if appropriate.
623 (add_function_candidate): Handle LOOKUP_NO_COPY_CTOR_CONVERSION.
624 (build_user_type_conversion_1): When converting from an init list,
625 we allow additional conversions except when calling a copy ctor.
626 (convert_like_real): Calling an explicit ctor for an init list is
627 ill-formed. Handle ck_list and ck_addr. Check narrowing.
628 (build_new_method_call): If CONSTRUCTOR_IS_DIRECT_INIT is set and
629 class doesn't have a list ctor, break the {} into a TREE_LIST.
630 (compare_ics): ck_list is better than other UDCs.
631 (set_up_extended_ref_temp): Split out from initialize_reference.
632 (is_std_init_list): New fn.
633 (is_list_ctor): New fn.
634 * decl.c (cxx_init_decl_processing): Create init_list_type_node.
635 (reshape_init_array_1): Pass it to build_constructor.
636 (reshape_init_class): Ditto.
637 (initialize_artificial_var): Pass the appropriate type.
638 (build_aggr_init_full_exprs): Split out from...
639 (check_initializer): ...here. Handle new semantics.
640 (build_init_list_var_init): New subroutine of check_initializer.
641 (grokdeclarator): Converting constructors can have more than one parm.
642 (grok_special_member_properties): Set TYPE_HAS_LIST_CTOR.
643 * init.c (expand_default_init): Only do digest_init for aggregates.
644 * rtti.c (tinfo_base_init): Pass init_list_type_node to
645 build_constructor_from_list.
646 (generic_initializer, ptr_initializer): Ditto.
647 (ptm_initializer, class_initializer): Ditto.
648 (get_pseudo_ti_init): Ditto.
649 * error.c (dump_type): Handle init_list_type_node.
650 (maybe_warn_cpp0x): New fn.
651 (maybe_varn_variadic_templates): Call it.
652 * cvt.c (ocp_convert): Handle conversion from { }.
653 * tree.c (build_array_of_n_type): New fn.
654 * typeck2.c (store_init_value): Use init_list_type_node.
655 (digest_init): Likewise.
656 (check_narrowing): New fn.
657 * semantics.c: (finish_compound_literal): Take CONSTRUCTOR instead
658 of vector of constructor elts. Handle non-aggregate types. Make
659 constant literals static.
660 * pt.c: (tsubst_copy_and_build): Adjust.
662 * name-lookup.c (arg_assoc_type): Handle init_list_type_node.
664 2008-07-01 Daniel Jacobowitz <dan@codesourcery.com>
666 * typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
667 (comp_ptr_ttypes_const): Likewise.
669 2008-07-01 Andrew Haley <aph@redhat.com>
671 * decl.c (finish_constructor_body): Don't set the return value of
672 the constructor if the constructor is that of a Java type.
674 2008-06-30 Jakub Jelinek <jakub@redhat.com>
677 * decl2.c (is_late_template_attribute): If the first attribute
678 argument is IDENTIFIER_NODE, don't consider it when checking
679 if arguments are value or type dependent.
681 2008-06-29 Paolo Carlini <paolo.carlini@oracle.com>
684 * pt.c (do_type_instantiation): In c++0x mode do not warn for
687 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
689 * Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
691 2008-06-28 Jakub Jelinek <jakub@redhat.com>
694 * repo.c (repo_emit_p): Put const static data members initialized
695 by const expr into *.rpo file, just return 2 if IDENTIFIER_REPO_CHOSEN
698 2008-06-27 Paolo Carlini <paolo.carlini@oracle.com>
701 * pt.c (do_decl_instantiation): In c++0x mode do not warn for
704 2008-06-24 Jonathan Wakely <jwakely.gcc@gmail.com>
707 * typeck.c (cp_build_function_call): Show example syntax in
710 2008-06-21 Jonathan Wakely <jwakely.gcc@gmail.com>
712 * typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
713 cxx_alignof_expr, check_template_keyword, cp_build_binary_op,
714 pointer_diff, cp_build_unary_op, build_x_compound_expr_from_list,
715 build_reinterpret_cast_1, cp_build_c_cast, check_return_expr): Change
716 pedwarn to permerror.
717 * init.c (perform_member_init, build_new_1, build_new): Likewise.
718 * decl.c (warn_extern_redeclared_static, duplicate_decls,
719 * identify_goto, check_previous_goto_1, check_goto, define_label,
720 check_tag_decl, start_decl, check_class_member_definition_namespace,
721 grokfndecl, grokdeclarator): Likewise.
722 * except.c (check_handlers): Likewise.
723 * typeck2.c (digest_init): Likewise.
724 * pt.c (check_specialization_namespace,
725 check_explicit_instantiation_namespace,
726 maybe_process_partial_specialization, check_explicit_specialization,
727 convert_template_argument, do_decl_instantiation,
728 do_type_instantiation, instantiate_decl): Likewise.
729 * semantics.c (finish_template_type_parm): Likewise.
730 * name-lookup.c (pushdecl_maybe_friend,
731 check_for_out_of_scope_variable): Likewise.
732 * decl2.c (finish_static_data_member_decl, build_anon_union_vars,
733 coerce_new_type): Likewise.
734 * parser.c (cp_parser_nested_name_specifier_opt,
735 cp_parser_mem_initializer, cp_parser_elaborated_type_specifier,
736 cp_parser_class_head, cp_parser_check_class_key): Likewise.
737 (cp_parser_parameter_declaration): Check flag_permissive instead of
738 flag_pedantic_errors.
739 * call.c (joust): Change pedwarn to warning.
740 * friend.c (make_friend_class): Likewise.
742 2008-06-16 Jan Hubicka <jh@suse.cz>
744 * method.c: Include cgraph.h.
745 (use_thunk): Use cgraph_add_new_function instead of calling backend
748 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
750 * parser.c: Fix comment typo.
752 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
755 * decl2.c (grokbitfield): Receive the list of attributes, pass it to
756 grokdeclarator and apply it to the created declaration.
757 * cp-tree.h (grokbitfield): Update prototype.
758 * parser.c (cp_parser_member_declaration): Don't apply the attributes
759 since they are now applied in grokbitfield. Adjusted the call to
761 (cp_parser_objc_class_ivars): Likewise.
763 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
766 * class.c (type_requires_array_cookie): Do not consider delete[]
767 operators with an ellipsis as second argument.
769 2008-06-09 Jakub Jelinek <jakub@redhat.com>
772 * semantics.c (stmt_expr_value_expr): Don't crash on empty
775 2008-06-08 Paolo Carlini <paolo.carlini@oracle.com>
778 * pt.c (maybe_process_partial_specialization): Check the tree
779 returned by push_template_decl for error_mark_node.
780 * parser.c (cp_parser_class_head): Likewise, check the tree
781 returned by the latter.
783 2008-06-07 Paolo Carlini <paolo.carlini@oracle.com>
786 * decl.c (grokdeclarator): In case of wrong return type return
787 immediately error_mark_node.
789 2008-06-06 Jakub Jelinek <jakub@redhat.com>
791 * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
792 dependent_omp_for_p, begin_omp_task, finish_omp_task,
793 finish_omp_taskwait): New prototypes.
794 (cxx_omp_clause_default_ctor): Add outer argument.
795 (finish_omp_for): Add new clauses argument.
796 * cp-gimplify.c (cxx_omp_finish_clause): New function.
797 (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
798 (cxx_omp_clause_default_ctor): Add outer argument.
799 (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
800 * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
801 * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
802 Add par_clauses argument. If decl is present in parallel's
803 lastprivate clause, change that clause to shared and add
804 a lastprivate clause for decl to OMP_FOR_CLAUSES.
805 Fix wording of error messages. Adjust finish_omp_for caller.
806 Add clauses argument. Parse loops with random access iterators.
807 (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
809 (cp_parser_omp_for, cp_parser_omp_parallel): Adjust
810 cp_parser_omp_for_loop callers.
811 (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
813 (cp_parser_omp_clause_name): Handle collapse and untied
815 (cp_parser_omp_clause_schedule): Handle auto schedule.
816 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
817 and PRAGMA_OMP_CLAUSE_UNTIED.
818 (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
819 (OMP_TASK_CLAUSE_MASK): Define.
820 (cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
821 (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
822 (cp_parser_pragma): Handle PRAGMA_OMP_TASK and
824 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
825 OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT.
826 (tsubst_omp_for_iterator): New function.
827 (dependent_omp_for_p): New function.
828 (tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR
829 loops. Adjust finish_omp_for caller. Handle loops with random
830 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes.
831 (tsubst_expr): Handle OMP_TASK.
832 * semantics.c (cxx_omp_create_clause_info): New function.
833 (finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and
835 (cxx_omp_predetermined_sharing): Removed.
836 * semantics.c (finish_omp_for): Allow pointer iterators. Use
837 handle_omp_for_class_iterator and dependent_omp_for_p. Handle
838 collapsed for loops. Adjust c_finish_omp_for caller. Add new
839 clauses argument. Fix check for type dependent cond or incr.
840 Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of
841 fold_convert to convert incr amount to difference_type. Only
842 fold if not in template. If decl is mentioned in lastprivate
843 clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random
844 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR}
846 (finish_omp_threadprivate): Allow static class members of the
848 (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
849 finish_omp_taskwait): New functions.
851 * parser.c (cp_parser_binary_expression): Add prec argument.
852 (cp_parser_assignment_expression): Adjust caller.
853 * cp-tree.h (outer_curly_brace_block): New prototype.
854 * decl.c (outer_curly_brace_block): No longer static.
856 2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
859 * pt.c (push_template_decl_real): Consistently return error_mark_node
862 2008-06-02 Tomas Bily <tbily@suse.cz>
864 * typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
865 (cp_build_unary_op): Likewise.
866 (cp_build_indirect_ref): Use CONVERT_EXPR_P.
867 (maybe_warn_about_returning_address_of_local): Likewise.
869 2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
872 * pt.c (tsubst_initializer_list): Consistently check the tree
873 returned by tsubst_pack_expansion for error_mark_node.
875 2008-05-27 Michael Matz <matz@suse.de>
878 * call.c (build_new_op): Make warning conditional on
881 2008-05-27 Alexandre Oliva <aoliva@redhat.com>
884 * call.c (convert_like_real): Convert bitfield to desired type
885 before creating temporary.
887 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
889 * Makefile.in: Adjusted dependencies on c-incpath.o.
891 2008-05-23 Jakub Jelinek <jakub@redhat.com>
894 * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
895 fold_build_cleanup_point_expr on build_call_a results.
898 * semantics.c (omp_clause_info_fndecl): New function.
899 (finish_omp_clauses): Use it.
901 2008-05-21 Jakub Jelinek <jakub@redhat.com>
904 * cp-tree.h (check_array_initializer): New prototype.
905 * decl.c (check_array_initializer): New function.
906 (check_initializer): Call it.
907 * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
909 2008-05-21 Tom Tromey <tromey@redhat.com>
911 * mangle.c (save_partially_mangled_name): Remove.
912 (restore_partially_mangled_name): Likewise.
913 (write_encoding): Update.
914 (write_unqualified_name): Likewise.
915 (start_mangling): Always use name_obstack. Remove 'ident_p'
917 (get_identifier_nocopy): Remove.
918 (finish_mangling_internal): Rename from finish_mangling.
919 (finish_mangling): New function.
920 (finish_mangling_get_identifier): Likewise.
921 (partially_mangled_name, partially_mangled_name_len): Remove.
922 (mangle_decl_string): Change return type. Update.
923 (mangle_decl, mangle_type_string, mangle_special_for_type,
924 mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
925 mangle_ref_init_variable): Update.
927 2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
930 * semantics.c (begin_class_definition): Extend checks on the first
933 2008-05-12 Tomas Bily <tbily@suse.cz>
935 * typeck2.c (digest_init): Use CONVERT_EXPR_P.
936 * call.c (build_over_call): Likewise.
937 * error.c (dump_expr): Use CASE_CONVERT.
938 * class.c (fixed_type_or_null): Likewise.
940 2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
942 * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
944 (cp_parser_omp_clause_schedule): Remove superfluous "expected"
947 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
949 * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
950 DECL_LOOPING_CONST_OR_PURE_P attributes.
951 * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
954 2008-05-02 Simon Baldwin <simonb@google.com>
957 * typeck.c (build_array_ref): Remove warn_array_subscript_range.
959 2008-05-01 Simon Baldwin <simonb@google.com>
961 * typeck.c (build_array_ref): Call warn_array_subscript_range.
963 2008-04-30 Jakub Jelinek <jakub@redhat.com>
966 * pt.c (more_specialized_fn): Stop the loop even if there are no
967 arguments before ellipsis.
969 2008-04-29 Jakub Jelinek <jakub@redhat.com>
972 * parser.c (cp_parser_lookup_name): Look through single function
976 * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
977 COMPOUND_EXPR if the second argument would be error_mark_node.
979 2008-04-28 Jason Merrill <jason@redhat.com>
980 Liu Guanwei <liu_gw@163.com>
983 * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
984 in default arguments.
986 2008-04-25 Jan Hubicka <jh@suse.cz>
988 * typeck.c (check_return_expr): Update.
989 * decl.c (start_preparsed_function): Update.
990 * method.c (use_thunk): Update.
992 2008-04-24 Jakub Jelinek <jakub@redhat.com>
995 * cp-tree.h (cp_reconstruct_complex_type): New prototype.
996 * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
997 * decl2.c (is_late_template_attribute): Only make vector_size
998 late tmpl attribute if argument is type or value dependent.
999 (cp_reconstruct_complex_type): New function.
1001 2008-04-24 Richard Guenther <rguenther@suse.de>
1003 * typeck.c (cp_build_function_call): Call
1004 check_builtin_function_arguments.
1006 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1008 * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
1009 (build_ptrmemfunc1): Don't set TREE_INVARIANT.
1010 * init.c (build_zero_init): Don't set TREE_INVARIANT.
1011 * class.c (build_base_path): Don't set TREE_INVARIANT.
1012 (build_vtbl_ref_1): Don't set TREE_INVARIANT.
1013 (build_vtbl_initializer): Don't set TREE_INVARIANT.
1014 * decl.c (build_enumerator): Don't set TREE_INVARIANT.
1015 * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
1016 (generic_initializer): Don't set TREE_INVARIANT.
1017 (ptr_initializer): Don't set TREE_INVARIANT.
1018 (ptm_initializer): Don't set TREE_INVARIANT.
1019 (class_initializer): Don't set TREE_INVARIANT.
1020 * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
1021 * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
1022 (build_template_parm_index): Don't set TREE_INVARIANT.
1023 (reduce_template_parm_level): Don't set TREE_INVARIANT.
1024 (process_template_parm): Don't set TREE_INVARIANT.
1026 2008-04-22 Jason Merrill <jason@redhat.com>
1029 * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
1030 to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
1031 * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
1033 2008-04-22 Jakub Jelinek <jakub@redhat.com>
1036 * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
1037 expression is errorneous.
1039 2008-04-21 Jason Merrill <jason@redhat.com>
1042 * tree.c (cp_tree_equal): Handle FIXED_CST.
1045 * pt.c (template_template_parm_bindings_ok_p): Set
1046 processing_template_decl while in this function.
1048 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
1050 * cvt.c (type_promotes_to): Support char16_t and char32_t.
1051 * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
1052 char16_t and char32_t.
1053 * lex.c (reswords): Add char16_t and char32_t (for c++0x).
1054 * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
1055 extended builtin type "u8char{16,32}_t".
1056 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
1058 (cp_lexer_print_token): Support CPP_STRING{16,32}.
1059 (cp_parser_is_string_literal): Idem.
1060 (cp_parser_string_literal): Idem.
1061 (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
1063 (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
1064 * tree.c (char_type_p): Support char16_t and char32_t as char types.
1065 * typeck.c (string_conv_p): Support char16_t and char32_t.
1067 2008-04-17 Jason Merrill <jason@redhat.com>
1070 * call.c (build_user_type_conversion_1): Represent second step of
1071 copy-init with an rvalue conversion.
1072 (convert_like_real) [ck_user]: Don't implicitly add it here.
1074 2008-04-15 Jakub Jelinek <jakub@redhat.com>
1077 * decl.c (layout_var_decl): If extern or static var has variable
1078 size, set TREE_TYPE (decl) to error_mark_node.
1080 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
1083 * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
1086 2008-04-09 Jason Merrill <jason@redhat.com>
1089 * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
1090 not a pushed variable.
1092 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
1094 * call.c (build_op_delete_call): Fix quotation in warning message.
1095 * decl.c (grokdeclarator): Quote keyword in error message.
1096 * pt.c (check_for_bare_parameter_packs): Fix quotation in error
1099 * parser.c (cp_parser_check_type_definition): Print error string
1100 directly rather than using "%s".
1101 (cp_parser_postfix_expression): Fix quotation.
1102 (cp_parser_decltype): Likewise.
1103 (cp_parser_sizeof_operand): Fix quotation. Simplify.
1105 * parser.c (cp_parser_non_integral_constant_expression): Build error
1106 message with CONCAT rather than using "%s".
1107 (cp_parser_primary_expression): Fix quotation.
1108 (cp_parser_postfix_expression): Likewise.
1109 (cp_parser_postfix_dot_deref_expression): Likewise.
1110 (cp_parser_unary_expression): Likewise.
1111 (cp_parser_new_expression): Likewise.
1112 (cp_parser_delete_expression): Likewise.
1114 * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
1115 as `)', not as `('. Fix quotation.
1116 (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
1117 (cp_parser_primary_expression): Likewise.
1118 (cp_parser_nested_name_specifier_opt): Likewise.
1119 (cp_parser_postfix_expression): Likewise.
1120 (cp_parser_postfix_open_square_expression): Likewise.
1121 (cp_parser_parenthesized_expression_list): Likewise.
1122 (cp_parser_pseudo_destructor_name): Likewise.
1123 (cp_parser_new_expression): Likewise.
1124 (cp_parser_direct_new_declarator): Likewise.
1125 (cp_parser_delete_expression): Likewise.
1126 (cp_parser_cast_expression): Likewise.
1127 (cp_parser_question_colon_clause): Likewise.
1128 (cp_parser_builtin_offsetof): Likewise.
1129 (cp_parser_trait_expr): Likewise.
1130 (cp_parser_label_for_labeled_statement): Likewise.
1131 (cp_parser_compound_statement): Likewise.
1132 (cp_parser_selection_statement): Likewise.
1133 (cp_parser_condition): Likewise.
1134 (cp_parser_iteration_statement): Likewise.
1135 (cp_parser_already_scoped_statement): Likewise.
1136 (cp_parser_simple_declaration): Likewise.
1137 (cp_parser_linkage_specification): Likewise.
1138 (cp_parser_static_assert): Likewise.
1139 (cp_parser_decltype): Likewise.
1140 (cp_parser_conversion_function_id): Likewise.
1141 (cp_parser_operator_function_id): Likewise.
1142 (cp_parser_operator): Likewise.
1143 (cp_parser_type_parameter): Likewise.
1144 (cp_parser_template_id): Likewise.
1145 (cp_parser_explicit_instantiation): Likewise.
1146 (cp_parser_explicit_specialization): Likewise.
1147 (cp_parser_enum_specifier): Likewise.
1148 (cp_parser_namespace_definition): Likewise.
1149 (cp_parser_namespace_alias_definition): Likewise.
1150 (cp_parser_using_declaration): Likewise.
1151 (cp_parser_using_directive): Likewise.
1152 (cp_parser_asm_definition): Likewise.
1153 (cp_parser_direct_declarator): Likewise.
1154 (cp_parser_ptr_operator): Likewise.
1155 (cp_parser_parameter_declaration_clause): Likewise.
1156 (cp_parser_initializer_clause): Likewise.
1157 (cp_parser_class_specifier): Likewise.
1158 (cp_parser_member_specification_opt): Likewise.
1159 (cp_parser_member_declaration): Likewise.
1160 (cp_parser_pure_specifier): Likewise.
1161 (cp_parser_constant_initializer): Likewise.
1162 (cp_parser_base_clause): Likewise.
1163 (cp_parser_exception_specification_opt): Likewise.
1164 (cp_parser_try_block): Likewise.
1165 (cp_parser_function_try_block): Likewise.
1166 (cp_parser_handler): Likewise.
1167 (cp_parser_throw_expression): Likewise.
1168 (cp_parser_asm_operand_list): Likewise.
1169 (cp_parser_attributes_opt): Likewise.
1170 (cp_parser_label_declaration): Likewise.
1171 (cp_parser_constructor_declarator_p): Likewise.
1172 (cp_parser_template_declaration_after_export): Likewise.
1173 (cp_parser_single_declaration): Likewise.
1174 (cp_parser_objc_message_expression): Likewise.
1175 (cp_parser_objc_message_args): Likewise.
1176 (cp_parser_objc_encode_expression): Likewise.
1177 (cp_parser_objc_defs_expression): Likewise.
1178 (cp_parser_objc_protocol_expression): Likewise.
1179 (cp_parser_objc_selector_expression): Likewise.
1180 (cp_parser_objc_protocol_refs_opt): Likewise.
1181 (cp_parser_objc_typename): Likewise.
1182 (cp_parser_objc_method_keyword_params): Likewise.
1183 (cp_parser_objc_superclass_or_category): Likewise.
1184 (cp_parser_objc_try_catch_finally_statement): Likewise.
1185 (cp_parser_objc_synchronized_statement): Likewise.
1186 (cp_parser_objc_throw_statement): Likewise.
1187 (cp_parser_omp_var_list_no_open): Likewise.
1188 (cp_parser_omp_clause_default): Likewise.
1189 (cp_parser_omp_clause_if): Likewise.
1190 (cp_parser_omp_clause_num_threads): Likewise.
1191 (cp_parser_omp_clause_reduction): Likewise.
1192 (cp_parser_omp_clause_schedule): Likewise.
1193 (cp_parser_omp_critical): Likewise.
1194 (cp_parser_omp_for_loop): Likewise.
1195 (cp_parser_omp_sections_scope): Likewise.
1197 * parser.c (cp_parser_template_parameter_list): Simplify.
1199 2008-04-07 James E. Wilson <wilson@tuliptree.org>
1201 * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
1203 2008-04-07 Jason Merrill <jason@redhat.com>
1206 * class.c (type_has_user_nondefault_constructor): A template
1207 counts as a nondefault constructor.
1209 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
1211 * decl.c (cxx_push_function_context): Delete.
1212 (cxx_pop_function_context): Delete.
1213 (start_preparsed_function): Merge cxx_push_function_context (!f->decl
1215 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
1216 LANG_HOOKS_FUNCTION_FINAL): Delete.
1217 (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
1218 LANG_HOOKS_MISSING_NORETURN_OK_P.
1219 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
1221 * semantics.c (current_stmt_tree): Fix comment.
1223 2008-04-03 Jakub Jelinek <jakub@redhat.com>
1226 * semantics.c (finish_offsetof): Undo effect of convert_from_reference
1227 before calling fold_offsetof.
1229 2008-04-03 Tom Tromey <tromey@redhat.com>
1231 * Make-lang.in (c++_OBJS): New variable.
1233 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1235 * optimize.c (clone_body): New, from tree-inline.c.
1237 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1239 * method.c (synthesize_method): Use {push,pop}_function_context.
1240 * name-lookup.c (push_to_top_level): Likewise.
1241 * parser.c (cp_parser_late_parsing_for_member): Likewise.
1243 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
1246 * parser.c (cp_parser_decl_specifier_seq): Add location to error
1249 2008-03-27 Tom Tromey <tromey@redhat.com>
1251 * Make-lang.in: Revert automatic dependency patch.
1253 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
1256 * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
1257 (build_compound_expr): New, for compatibility with C
1258 build_compound_expr.
1259 (cp_build_compound_expr): Renamed from build_compound_expr.
1260 (build_c_cast): New, for compatibility with C build_c_cast.
1261 (cp_build_c_cast): Renamed from build_c_cast.
1262 * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
1263 * decl.c (cxx_maybe_build_cleanup): Ditto.
1264 * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
1265 (cp_build_compound_expr): Renamed from build_compound_expr.
1266 (build_c_cast): Add C-compatible prototype.
1267 (cp_build_c_cast): Renamed from build_c_cast.
1268 * typeck2.c (build_functional_cast): Use cp_build_c_cast.
1269 * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
1271 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
1273 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
1274 tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
1275 ending in a pack expansion, both of which can occur when
1276 substituting into a nested template.
1277 (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
1278 instantiating the sizeof...(X) form, make tsubst_copy do the work.
1279 * parser.c (cp_parser_template_parameter): Deal with unnamed
1280 non-type template parameter packs identified by pack expansions in
1283 2008-03-26 Jakub Jelinek <jakub@redhat.com>
1286 * pt.c (apply_late_template_attributes): Don't call tsubst on
1287 first attribute argument if it is IDENTIFIER_NODE.
1290 * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
1291 and LTGT_EXPR to pp_expression.
1293 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
1295 * pt.c (coerce_template_template_parm): Moved the body of the loop
1296 of coerce_template_template_parms here, to make iteration over a
1297 template argument pack simpler.
1298 Also, allow matching of a template parameter pack in the template
1299 template parameter to a template parameter in the template
1301 (coerce_template_template_parms): Deal with variadic template
1302 template parameters. Use coerce_template_template_parm.
1303 (unify): Make sure we coerce the template template argument's
1304 template arguments to the template template parameter's template
1305 parameters, not the other way around.
1307 2008-03-25 Tom Tromey <tromey@redhat.com>
1309 * Make-lang.in: Remove .o targets.
1310 (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
1312 (c++_OBJS): New variable.
1313 (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
1315 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
1317 * typeck.c (composite_pointer_type_r): Add SFINAE support.
1318 (composite_pointer_type): Ditto.
1319 (common_type): Fix call to composite_pointer_type.
1320 (cxx_sizeof_nowarn): New; used to be a macro.
1321 (cxx_sizeof_expr): Add SFINAE support.
1322 (cxx_alignof_expr): Ditto.
1323 (decay_conversion): Fix calls for SFINAE support.
1324 (rationalize_conditional_expr): Add SFINAE support.
1325 (build_class_member_access_expr): Ditto.
1326 (finish_class_member_access_expr): Ditto.
1327 (build_x_indirect_ref): Ditto.
1328 (build_indirect_ref): Original version renamed to
1329 cp_build_indirect_ref; new version provides a bridge from
1331 (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
1333 (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
1334 (build_function_call): Original version renamed to
1335 cp_build_function_call; new version provides a bridge from
1337 (cp_build_function_call): Was build_function_call; added SFINAE
1339 (convert_arguments): Add SFINAE support.
1340 (build_x_binary_op): Ditto.
1341 (build_binary_op): Original version renamed to cp_build_binary_op;
1342 new version provides a bridge from c-common.
1343 (cp_build_binary_op): Was build_binary_op; added SFINAE support.
1344 (pointer_diff): Fix calls for SFINAE.
1345 (build_x_unary_op): Add SFINAE support.
1346 (condition_conversion): Fix calls for SFINAE.
1347 (build_unary_op): Original version renamed to cp_build_unary_op;
1348 new version provides a bridge from c-common.
1349 (cp_build_unary_op): Was build_unary_op; added SFINAE support.
1350 (unary_complex_lvalue): Fix calls for SFINAE.
1351 (build_x_conditional_expr): Add SFINAE support.
1352 (build_x_compound_expr_from_list): Fix calls for SFINAE.
1353 (build_x_compound_expr): Add SFINAE support.
1354 (convert_ptrmem): Fix calls for SFINAE.
1355 (build_static_cast_1): Add SFINAE support.
1356 (build_static_cast): Ditto.
1357 (build_reinterpret_cast_1): Ditto.
1358 (build_reinterpret_cast): Ditto.
1359 (build_const_cast_1): Ditto.
1360 (build_const_cast): Ditto.
1361 (build_c_cast): Ditto.
1362 (build_modify_expr): Original version renamed to
1363 cp_build_modify_expr; new version provides a bridge from c-common.
1364 (cp_build_modify_expr): Was build_modify_expr; added SFINAE
1366 (build_x_modify_expr): Add SFINAE support.
1367 (build_ptrmemfunc): Fix calls for SFINAE.
1368 (convert_for_assignment): Add SFINAE support.
1369 (convert_for_initialization): Ditto.
1370 (check_return_expr): Fix calls for SFINAE.
1371 (lvalue_or_else): Add SFINAE support.
1372 * init.c (perform_member_init): Fix calls for SFINAE.
1373 (emit_mem_initializers): Ditto.
1374 (expand_virtual_init): Ditto.
1375 (expand_cleanup_for_base): Ditto.
1376 (build_aggr_init): Add SFINAE support.
1377 (expand_default_init): Ditto.
1378 (expand_aggr_init_1): Fix calls for SFINAE.
1379 (build_offset_ref): Ditto.
1380 (build_new_1): Add SFINAE support.
1382 (build_vec_delete_1): Fix calls for SFINAE.
1383 (get_temp_regvar): Ditto.
1384 (build_vec_init): Add SFINAE support.
1385 (build_dtor_call): Fix calls for SFINAE.
1386 (build_delete): Ditto.
1387 (push_base_cleanups): Ditto.
1388 (build_vec_delete_1): Ditto.
1389 * class.c (build_base_path): Fix calls for SFINAE.
1390 (build_simple_base_path): Ditto.
1391 (convert_to_base_statically): Ditto.
1392 (build_vfn_ref): Ditto.
1393 (resolve_address_of_overloaded_function): Ditto.
1394 * decl.c (check_initializer): Fix calls for SFINAE.
1395 (register_dtor_fn): Ditto.
1396 (compute_array_index_type): Ditto.
1397 (finish_enum): Ditto.
1398 (start_preparsed_function): Ditto.
1399 (cxx_maybe_build_cleanup): Ditto.
1400 * call.c (convert_like): Add COMPLAIN argument.
1401 (convert_like_with_context): Ditto.
1402 (build_this): Fix calls for SFINAE.
1403 (build_user_type_conversion): Ditto.
1404 (resolve_args): Ditto.
1405 (build_new_function_call): Add SFINAE support.
1406 (build_operator_new_call): Fix calls for SFINAE.
1407 (build_object_call): Add SFINAE support.
1408 (build_conditional_expr): Ditto.
1409 (build_new_op): Ditto.
1410 (build_op_delete_call): Fix calls for SFINAE.
1411 (build_temp): Ditto.
1412 (convert_like_real): Add SFINAE support.
1413 (build_x_va_arg): Fix calls for SFINAE.
1414 (convert_default_arg): Ditto.
1415 (build_over_call): Add SFINAE support.
1416 (build_java_interface_fn_ref): Fix calls for SFINAE.
1417 (build_special_member_call): Add SFINAE support.
1418 (build_new_method_call): Ditto.
1419 (perform_implicit_conversion): Ditto.
1420 (perform_direct_initialization_if_possible): Ditto.
1421 (initialize_reference): Fix calls for SFINAE.
1422 * method.c (do_build_assign_ref): Fix calls for SFINAE.
1423 * rtti.c (build_headof): Fix calls for SFINAE.
1424 (get_tinfo_decl_dynamic): Ditto.
1425 (get_typeid): Ditto.
1426 (build_dynamic_cast_1): Add SFINAE support.
1427 (build_dynamic_cast): Ditto.
1428 (tinfo_base_init): Fix calls for SFINAE.
1429 * except.c (do_get_exception_ptr): Fix calls for SFINAE.
1430 (do_end_catch): Ditto.
1431 (initialize_handler_parm): Ditto.
1432 (expand_start_catch_block): Ditto.
1433 (do_allocate_exception): Ditto.
1434 (do_free_exception): Ditto.
1435 (build_throw): Ditto.
1436 * cvt.c (build_up_reference): Fix calls for SFINAE.
1437 (convert_to_reference): Ditto.
1438 (ocp_convert): Ditto.
1439 (convert_to_void): Add SFINAE support.
1440 * tree.c (build_dummy_object): Fix calls for SFINAE.
1441 (stabilize_expr): Ditto.
1442 * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
1444 (build_new_method_call): Ditto.
1445 (build_special_member_call): Ditto.
1446 (build_new_op): Ditto.
1447 (perform_implicit_conversion): Ditto.
1448 (perform_direct_initialization_if_possible): Ditto.
1449 (convert_to_void): Ditto.
1450 (build_aggr_init): Ditto.
1452 (build_vec_init): Ditto.
1453 (build_dynamic_cast): Ditto.
1454 (finish_call_expr): Ditto
1455 (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
1456 (cxx_sizeof_nowarn): Remove macro; add function declaration.
1457 (build_class_member_access_expr): Add tsubst_flags_t parameter.
1458 (finish_class_member_access_expr): Ditto.
1459 (build_x_indirect_ref): Ditto.
1460 (cp_build_indirect_ref): New.
1461 (cp_build_function_call): Add tsubst_flags_t parameter.
1462 (build_x_unary_op): Ditto.
1463 (cp_build_unary_op): New.
1464 (build_x_conditional_expr): Add tsubst_flags_t parameter.
1465 (build_x_compound_expr): Ditto.
1466 (build_compound_expr): Ditto.
1467 (build_static_cast): Ditto.
1468 (build_reinterpret_cast): Ditto.
1469 (build_const_cast): Ditto.
1470 (build_c_cast): Ditto.
1471 (build_x_modify_expr): Ditto.
1472 (cp_build_modify_expr): New.
1473 (convert_for_initialization): Add tsubst_flags_t parameter.
1474 (cp_build_binary_op): Remove macro; add function declaration.
1475 (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
1476 (lvalue_or_else): Ditto.
1477 (build_functional_cast): Ditto.
1478 * typeck2.c (digest_init): Fix calls for SFINAE.
1479 (process_init_constructor_array): Ditto.
1480 (process_init_constructor_record): Ditto.
1481 (build_x_arrow): Ditto.
1482 (build_m_component_ref): Ditto.
1483 (build_functional_cast): Add SFINAE support.
1484 * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
1485 * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
1486 (finish_expr_stmt): Ditto.
1487 (finish_for_expr): Ditto.
1488 (finish_asm_stmt): Ditto.
1489 (finish_non_static_data_member): Ditto.
1490 (finish_qualified_id_expr): Ditto.
1491 (finish_call_expr): Add SFINAE support.
1492 (finish_increment_expr): Fix calls for SFINAE.
1493 (finish_unary_op_expr): Ditto.
1494 (simplify_aggr_init_expr): Ditto.
1495 (finish_omp_clauses): Ditto.
1496 (finish_omp_for): Ditto.
1497 (finish_omp_barrier): Ditto.
1498 (finish_omo_flush): Ditto.
1499 * decl2.c (grok_array_decl): Fix calls or SFINAE.
1500 (build_anon_union_vars): Ditto.
1501 (get_guard_cond): Ditto.
1503 (one_static_initialization_or_destruction): Ditto.
1504 (do_static_initialization_or_destruction): Ditto.
1505 (generate_ctor_or_dtor_function): Ditto.
1506 (build_offset_ref_call_from_tree): Ditto.
1507 * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
1508 (cp_parser_postfix_dot_deref_expression): Ditto.
1509 (cp_parser_unary_expression): Ditto.
1510 (cp_parser_new_expression): Ditto.
1511 (cp_parser_cast_expression): Ditto.
1512 (cp_parser_binary_expression): Ditto.
1513 (cp_parser_question_colon_clause): Ditto.
1514 (cp_parser_assignment_expression): Ditto.
1515 (cp_parser_expression): Ditto.
1516 (cp_parser_builtin_offsetof): Ditto.
1517 (cp_parser_template_argument): Ditto.
1518 (cp_parser_functional_cast): Ditto.
1520 2008-03-24 Tom Tromey <tromey@redhat.com>
1522 * lex.c (handle_pragma_interface): Don't copy the filename.
1523 (handle_pragma_implementation): Copy filename using xstrdup.
1525 2008-03-21 Paolo Carlini <pcarlini@suse.de>
1527 * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
1528 (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
1529 (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
1530 (PROMOTES_TO_AGGR_TYPE): Remove.
1531 (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
1532 * typeck.c (unary_complex_lvalue, build_modify_expr,
1533 convert_for_initialization): Adjust.
1534 * init.c (is_aggr_type): Remove.
1535 (is_class_type): Add.
1536 (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
1537 build_delete): Adjust.
1538 * lex.c (make_aggr_type): Remove.
1539 (make_class_type): Add.
1540 (cxx_make_type): Adjust.
1541 * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
1543 * decl.c (build_typename_type, make_typename_type,
1544 make_unbound_class_template, cxx_init_decl_processing,
1545 check_tag_decl, groktypename, start_decl_1, layout_var_decl,
1546 check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
1547 grok_op_properties, xref_tag, check_function_type): Adjust.
1548 * call.c (check_dtor_name, standard_conversion, implicit_conversion,
1549 add_builtin_candidate, add_builtin_candidates,
1550 build_user_type_conversion_1, convert_like_real, build_cxx_call,
1551 is_subseq, compare_ics): Adjust.
1552 * method.c (use_thunk): Adjust.
1553 * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
1554 create_tinfo_types): Adjust.
1555 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
1556 build_up_reference, convert_to_reference, convert_from_reference,
1557 ocp_convert, build_expr_type_conversion): Adjust.
1558 * tree.c (bind_template_template_parm, error_type): Adjust.
1559 * dump.c (cp_dump_tree): Adjust.
1560 * search.c (lookup_member): Adjust.
1561 * friend.c (make_friend_class, do_friend): Adjust.
1562 * typeck2.c (store_init_value, process_init_constructor_array,
1563 process_init_constructor_record, build_x_arrow, build_m_component_ref,
1564 build_functional_cast): Adjust.
1565 * pt.c (finish_member_template_decl, process_template_parm,
1566 lookup_template_class, tsubst_function_type, tsubst,
1567 tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
1569 * semantics.c (begin_class_definition, finish_base_specifier,
1570 finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
1572 * name-lookup.c (constructor_name_p, push_overloaded_decl,
1573 do_class_using_decl, lookup_qualified_name,
1574 maybe_process_template_type_declaration): Adjust.
1575 * decl2.c (grok_array_decl, check_member_template,
1576 constrain_class_visibility): Adjust.
1577 * parser.c (cp_parser_class_name): Adjust.
1579 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
1581 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
1583 2008-03-17 Jason Merrill <jason@redhat.com>
1586 * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
1587 a temp directly to a reference as per DR391.
1589 2008-03-12 Richard Guenther <rguenther@suse.de>
1593 2008-02-04 Richard Guenther <rguenther@suse.de>
1596 * decl.c (record_builtin_java_type): Make jboolean a
1597 integer type again where its mode doesn't match that of bool.
1599 2008-01-25 Richard Guenther <rguenther@suse.de>
1602 * decl.c (record_builtin_java_type): Make __java_boolean
1604 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
1605 after TYPE_MAIN_VARIANT check.
1607 2008-03-10 Jakub Jelinek <jakub@redhat.com>
1610 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
1614 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
1615 DECL_P in not a variable and appears more than once error messages.
1617 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
1621 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
1625 * typeck.c (structural_comptypes): Call cp_comptypes.
1626 (comptypes): New; called from the C/C++ common bits to perform
1628 (cp_comptypes): Renamed from comptypes, which is already used,
1629 with a different signature, by the C++ front end.
1630 (build_reinterpret_cast_1): Call cp_comptypes.
1631 (ptr_reasonably_similar): Ditto.
1632 * decl.c (decls_match): Ditto.
1633 * cvt.c (convert_to_reference): Ditto.
1634 * cp-tree.h (same_type_p): Ditto.
1635 (same_or_base_type_p): Ditto.
1636 (comptypes): Rename to cp_comptypes.
1637 * pt.c (canonical_type_parameter): Call cp_comptypes.
1639 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
1641 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
1642 test for equivalence between pointer and references.
1644 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1647 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
1648 (check_field_decls): Likewise.
1649 (note_name_declared_in_class): Likewise.
1650 * call.c (build_new_op): Likewise.
1651 (convert_like_real): Likewise.
1652 (build_over_call): Likewise.
1653 * lex.c (unqualified_fn_lookup_error): Likewise.
1654 * parser.c (cp_parser_template_id): Likewise.
1655 * cvt.c (warn_ref_binding): Likewise.
1656 (convert_to_reference): Likewise.
1657 (ocp_convert): Likewise.
1658 (convert_to_void): Use error instead of pedwarn.
1659 * error.c (cp_cpp_error): Use pedantic_warning_kind.
1660 * decl.c (compute_array_index_type): Use constant_expression_error.
1662 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
1664 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
1665 that auto is either a storage class or a simple type specifier,
1666 depending on the dialect.
1667 (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
1668 specifier in C++98 mode, error in C++0x mode (since we don't
1669 support auto as a type specifier, yet).
1670 (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
1671 storage specifier in C++0x mode.
1672 (cp_parser_simple_type_specifier): Parse `auto' as a
1673 simple-type-specifier, but error because we don't support it yet.
1675 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1677 * parser.c (cp_parser_nonclass_name): New.
1678 (cp_parser_pseudo_destructor_name): Use it instead of
1679 cp_parser_type_name.
1680 (cp_parser_type_name): Move code to cp_parser_nonclass_name.
1682 2008-02-29 Tom Tromey <tromey@redhat.com>
1684 * parser.c (struct cp_token) <input_file_stack_index>: Remove.
1685 (cp_lexer_get_preprocessor_token): Update.
1686 (cp_lexer_set_source_position_from_token): Don't call
1687 restore_input_file_stack.
1688 * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
1690 2008-02-28 Richard Guenther <rguenther@suse.de>
1693 2008-02-26 Richard Guenther <rguenther@suse.de>
1695 * decl.c (duplicate_decls): Remove decl from global mapping
1696 before ggc_freeing it.
1698 2008-02-27 Jakub Jelinek <jakub@redhat.com>
1701 * rtti.c: Include c-pragma.h.
1702 (push_abi_namespace, pop_abi_namespace): New functions.
1703 (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
1704 create_tinfo_types, emit_support_tinfos): Use them.
1705 * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
1707 2008-02-26 Jason Merrill <jason@redhat.com>
1710 * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
1711 to name the struct for linkage purposes even if it has attributes.
1712 (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
1714 2008-02-26 Tom Tromey <tromey@redhat.com>
1716 * parser.c (eof_token): Remove old location code.
1717 (check_empty_body): Remove test of USE_MAPPED_LOCATION.
1718 * decl2.c (generate_ctor_or_dtor_function): Remove old location
1720 (cp_write_global_declarations): Likewise.
1721 * lex.c (cxx_init): Remove old location code.
1722 (handle_pragma_implementation): Remove test of
1723 USE_MAPPED_LOCATION.
1724 * pt.c (tsubst): Remove old location code.
1725 * error.c (cp_print_error_function): Remove test of
1726 USE_MAPPED_LOCATION.
1727 * decl.c (pop_label): Remove old location code.
1728 (finish_function): Likewise.
1730 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1733 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
1735 2008-02-26 Richard Guenther <rguenther@suse.de>
1737 * decl.c (duplicate_decls): Remove decl from global mapping
1738 before ggc_freeing it.
1740 2008-02-26 Paolo Carlini <pcarlini@suse.de>
1743 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
1745 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1747 * typeck.c (build_class_member_access_expr): Add appropriate
1748 OPT_W* parameter to warning.
1749 (build_reinterpret_cast_1): Likewise.
1750 * name-lookup.c (push_overloaded_decl): Likewise.
1752 2008-02-25 Paolo Carlini <pcarlini@suse.de>
1755 * error.c (dump_expr): Handle CONJ_EXPR.
1757 2008-02-25 Paolo Carlini <pcarlini@suse.de>
1760 * error.c (dump_type): Handle FIXED_POINT_TYPE.
1761 (dump_expr): Handle FIXED_CST.
1763 2008-02-24 Jason Merrill <jason@redhat.com>
1765 * parser.c (cp_parser_declaration): Handle "inline namespace".
1766 (cp_parser_namespace_definition): Likewise.
1769 * name-lookup.c (arg_assoc_namespace): Look down into inline
1772 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1774 * typeck.c (check_for_casting_away_constness): Use 1 single
1775 argument, the type of cast, to decide what diagnostics generate.
1776 (build_static_cast_1): Remove unused code. Update call to
1777 check_for_casting_away_constness.
1778 (build_reinterpret_cast_1): Update call to
1779 check_for_casting_away_constness.
1780 (build_const_cast_1): Likewise.
1782 2008-02-24 Paolo Carlini <pcarlini@suse.de>
1784 * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
1785 VEC_NEW_EXPR), forward to pp_expression.
1786 * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
1788 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
1791 * friend.c (do_friend): Call cplus_decl_attributes earlier.
1793 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
1796 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
1797 template decls' function decl.
1799 2008-02-22 Paolo Carlini <pcarlini@suse.de>
1803 2008-02-14 Paolo Carlini <pcarlini@suse.de>
1806 * pt.c (determine_specialization): In case of function templates,
1807 when the type of DECL does not match FN there is no match.
1809 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1812 * typeck.c (build_binary_op): Warn about floating point
1813 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
1815 2008-02-19 Jason Merrill <jason@redhat.com>
1818 * pt.c (resolve_overloaded_unification): Set processing_template_decl
1819 while we look for possible bindings.
1821 2008-02-19 Jakub Jelinek <jakub@redhat.com>
1824 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
1828 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
1829 vars. Afterwards ensure v is VAR_DECL.
1832 * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
1833 call cp_finish_decl.
1834 * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
1837 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
1842 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
1843 is error_mark_node, return an error early.
1844 (find_parameter_packs_r): Pass the pointer set along to recursive
1845 calls of cp_walk_subtrees; don't try to manage the pointer set
1847 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
1848 (make_pack_expansion): Ditto.
1849 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
1850 a second pass through the tree with find_parameter_packs_r; that
1851 second pass no longer does anything.
1852 (push_template_decl_real): If we have an erroneous declaration,
1853 set its type to error_mark_node before returning an error.
1855 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
1858 * pt.c (tsubst_initializer_list): Deal with the use of
1859 VOID_TYPE_NODE to indicate value-initialization of the bases.
1861 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1862 Jason Merrill <jason@redhat.com>
1866 * class.c (type_has_user_nondefault_constructor): New fn.
1867 * cp-tree.h: Declare it.
1868 * init.c (emit_mem_initializers): Use it for -W warning about
1869 missing base initializer.
1871 2008-02-14 Paolo Carlini <pcarlini@suse.de>
1874 * pt.c (determine_specialization): In case of function templates,
1875 when the type of DECL does not match FN there is no match.
1877 2008-02-13 Jakub Jelinek <jakub@redhat.com>
1878 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1881 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
1882 are not identifier :: ~, return before calling cp_parser_type_name.
1884 2008-02-13 Jason Merrill <jason@redhat.com>
1886 PR c++/34962, c++/34937, c++/34939
1887 * decl2.c (is_late_template_attribute): Always defer attributes
1888 vector_size and weak.
1891 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
1892 of enumerators, too.
1894 2008-02-12 Jason Merrill <jason@redhat.com>
1897 * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
1898 if we're doing conversions to call a user-defined conversion function.
1900 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
1903 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
1906 2008-02-12 Jakub Jelinek <jakub@redhat.com>
1909 * init.c (build_new_1): Don't create placement_expr before
1910 constructing alloc_call. Verify that the pointer is passed by
1911 value to operator new.
1913 2008-02-11 Jason Merrill <jason@redhat.com>
1916 * pt.c (tsubst): Don't look up a template typedef in an explicit
1919 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
1922 * tree.c (cp_build_qualified_type_real): When building a
1923 cv-qualified array type, build it as a unique type with
1924 build_cplus_array_type_1 and then adopt the unqualified type's
1927 2008-02-11 Paolo Carlini <pcarlini@suse.de>
1930 * decl.c (groktypename): Check grokdeclarator return.
1932 2008-02-10 Jason Merrill <jason@redhat.com>
1935 * decl2.c (cp_write_global_declarations): Don't write out static
1936 data members with DECL_IN_AGGR_P set.
1938 2008-02-08 Jason Merrill <jason@redhat.com>
1941 * tree.c (build_target_expr_with_type): Handle void initializer.
1942 (bot_manip): Remap slot before recursing.
1944 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1947 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
1949 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
1952 * tree.c: Include tree-flow.h.
1953 (build_target_expr): Check type compatibility.
1954 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
1955 * call.c (convert_like_real): Convert bitfield to expected type.
1957 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
1961 * typeck.c (structural_comptypes): Call cp_comptypes.
1962 (comptypes): New; called from the C/C++ common bits to perform
1964 (cp_comptypes): Renamed from comptypes, which is already used,
1965 with a different signature, by the C++ front end.
1966 (build_reinterpret_cast_1): Call cp_comptypes.
1967 (ptr_reasonably_similar): Ditto.
1968 * decl.c (decls_match): Ditto.
1969 * cvt.c (convert_to_reference): Ditto.
1970 * cp-tree.h (same_type_p): Ditto.
1971 (same_or_base_type_p): Ditto.
1972 (comptypes): Rename to cp_comptypes.
1973 * pt.c (canonical_type_parameter): Call cp_comptypes.
1975 2008-02-05 Jakub Jelinek <jakub@redhat.com>
1978 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
1979 value dependent expression.
1981 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
1984 * decl2.c (save_template_attributes): When we're modifying the
1985 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
1986 all of the other variants to add those same attributes. Otherwise,
1987 the main variant will be inconsistent with those other variants.
1989 2008-02-04 Richard Guenther <rguenther@suse.de>
1992 * decl.c (record_builtin_java_type): Make jboolean a
1993 integer type again where its mode doesn't match that of bool.
1995 2008-02-02 Jason Merrill <jason@redhat.com>
1996 Mark Mitchell <mark@codesourcery.com>
1999 * init.c (build_value_init_1): New function.
2000 (build_value_init): New function.
2001 * typeck2.c (build_functional_cast): Call it.
2002 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
2004 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
2005 TYPE_HAS_CONSTRUCTOR.
2006 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
2007 add_implicitly_declared_members): Adjust.
2008 (check_field_decls): Adjust. Remove warnings about reference/const
2009 in class without constructor.
2010 (check_bases_and_members): Adjust. Give those warnings here instead.
2011 * decl.c (fixup_anonymous_aggr): Adjust.
2012 (check_initializer): Adjust, clarify logic slightly.
2013 (grok_special_member_properties): Adjust, only set if user-provided.
2014 * rtti.c (create_tinfo_types): Don't set.
2015 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
2016 Use same_type_ignoring_top_level_qualifiers_p.
2017 * pt.c (check_explicit_specialization): Adjust.
2018 (instantiate_class_template): Adjust.
2020 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
2021 Jakub Jelinek <jakub@redhat.com>
2025 * typeck.c (structural_comptypes): Handle comparisons of
2026 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
2028 * mangle.c (write_builtin_type): Map down to the canonical type,
2029 which will be one of the predefined type nodes.
2031 2008-01-29 Michael Meissner <michael.meissner@amd.com>
2034 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
2035 bits to allow for expansion of the number of middle end tree
2038 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
2049 * typeck.c (check_return_expr): Tweak call to
2050 check_for_bare_parameter_packs.
2051 * class.c (add_method): Be careful with error_mark_nodes.
2052 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
2054 * pt.c (struct find_parameter_pack_data): Remove
2056 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
2057 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
2058 (make_pack_expansion): Ditto.
2059 (check_for_bare_parameter_packs): Parameter is now a tree, not a
2061 (process_template_parm): Tweak call to
2062 check_for_bare_parameter_packs.
2063 (push_template_decl_real): Tweak calls to
2064 check_for_bare_parameter_packs. If bare parameter packs are found
2065 in the list of exceptions, clear out that list after giving an
2067 * semantics.c (finish_cond): Tweak call to
2068 check_for_bare_parameter_packs.
2069 (finish_expr_stmt): Ditto.
2070 (finish_for_expr): Ditto.
2071 (finish_switch_cond): Ditto.
2072 (finish_mem_initializers): Ditto.
2073 (finish_member_declaration): Ditto.
2074 (finish_static_assert): Check for bare parameter packs in the
2076 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
2077 attributes of a declaration.
2078 * parser.c (cp_parser_using_declaration): Tweak call to
2079 check_for_bare_parameter_packs.
2080 (cp_parser_base_clause): Ditto.
2082 2008-01-28 Jason Merrill <jason@redhat.com>
2085 * class.c (build_base_path): Fix !want_pointer case.
2087 2008-01-27 Jason Merrill <jason@redhat.com>
2090 * class.c (build_base_path): Fix previous change.
2092 2008-01-26 Jakub Jelinek <jakub@redhat.com>
2095 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
2098 2008-01-26 Richard Guenther <rguenther@suse.de>
2101 * typeck.c (build_binary_op): Remove code to shorten compares.
2103 2008-01-25 Richard Guenther <rguenther@suse.de>
2106 * decl.c (record_builtin_java_type): Make __java_boolean
2108 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
2109 after TYPE_MAIN_VARIANT check.
2111 2008-01-25 Jason Merrill <jason@redhat.com>
2114 * class.c (build_base_path): Don't mess with virtual access if
2116 * call.c (standard_conversion): Don't check whether source type
2119 * decl2.c (is_late_template_attribute): Don't defer attribute
2120 visibility just because the type is dependent.
2122 2008-01-25 Jason Merrill <jason@redhat.com>
2123 Mark Mitchell <mark@codesourcery.com>
2126 * call.c (standard_conversion): Allow conversion from integer/real
2128 (compare_ics): Such a conversion is worse than a normal arithmetic
2131 2008-01-25 Richard Guenther <rguenther@suse.de>
2134 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
2137 2008-01-24 Paolo Carlini <pcarlini@suse.de>
2140 * pt.c (push_template_decl_real): Return error_mark_node in case
2141 of template definition of non-template.
2143 2008-01-24 Jason Merrill <jason@redhat.com>
2146 * decl2.c (is_late_template_attribute): Defer any attribute with
2147 dependent args. Also defer type attributes if the type is dependent.
2149 2008-01-22 Jakub Jelinek <jakub@redhat.com>
2150 Alexandre Oliva <aoliva@redhat.com>
2153 * call.c (reference_binding): For bitfields use the declared bitfield
2155 (add_builtin_candidates): Likewise.
2156 * class.c (layout_class_type): For bitfields copy over the
2157 original type quals.
2159 2008-01-22 Jason Merrill <jason@redhat.com>
2162 * decl.c (groktypename): Also ignore attributes on dependent
2163 possibly-class types.
2166 * friend.c (do_friend): Check for prior declaration of a friend
2167 function of a local class.
2168 * name-lookup.c (lookup_name_innermost_nonclass_level):
2170 * name-lookup.h: Declare it.
2172 2008-01-22 Tom Tromey <tromey@redhat.com>
2175 * init.c (build_new_1): Only disallow Java aggregates.
2177 2008-01-22 Jakub Jelinek <jakub@redhat.com>
2180 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
2181 if decl or init is error_mark_node.
2184 * error.c (dump_expr): Handle VECTOR_CST.
2186 2008-01-21 Jason Merrill <jason@redhat.com>
2189 * pt.c (tsubst_aggr_type): Make sure our context is complete.
2192 * pt.c (retrieve_local_specialization): Robustify.
2193 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
2196 * pt.c (tsubst): Only call retrieve_local_specialization if the
2197 original typedef was in a function template.
2200 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
2202 2008-01-21 Richard Guenther <rguenther@suse.de>
2205 * error.c (cp_print_error_function): Deal with recursive
2208 2008-01-20 Paolo Carlini <pcarlini@suse.de>
2211 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
2213 2008-01-20 Paolo Carlini <pcarlini@suse.de>
2217 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
2218 on non-IS_AGGR_TYPE scope.
2219 (constructor_name_p): Assert IS_AGGR_TYPE.
2221 2008-01-18 Ian Lance Taylor <iant@google.com>
2224 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
2225 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
2226 DECL_IS_OPERATOR_NEW flag.
2228 2008-01-16 Richard Guenther <rguenther@suse.de>
2231 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
2232 for conversions to type variants.
2234 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
2236 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
2237 declaration and code. Update copyright year.
2239 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2242 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
2243 know we have a class type.
2245 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2248 * pt.c (coerce_template_parameter_pack): When substituting into
2249 the type of a non-type template parameter pack. use the
2250 deduced/substituted arguments.
2251 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
2252 can be a parameter pack with the ellipsis following it. When we
2253 have an erroneous declaration, allow it to be a parameter pack.
2254 (cp_parser_template_parameter): Complain about default
2255 arguments on non-type template parameter packs, and parse them
2256 using the new cp_parser_default_argument.
2257 (cp_parser_parameter_declaration): Complain about parameter packs
2258 with default arguments. Move parsing of default arguments into a
2259 new function, cp_parser_default_argument.
2260 (cp_parser_default_argument): New; extracted from
2261 cp_parser_parameter_declaration.
2263 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2269 * typeck.c (check_return_expr): If there are bare parameter packs
2270 in the return value, set it to error_mark_node.
2271 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
2272 * pt.c (find_parameter_packs_r): Look at the type of
2273 IDENTIFIER_NODEs (e.g., for user-defined conversions).
2274 (check_for_bare_parameter_packs): Flip the result: now returns
2275 TRUE when there were bare parameter packs, FALSE otherwise.
2276 (push_template_decl_real): Deal with flipped result of
2277 check_for_bare_parameter_packs.
2278 * semantics.c (finish_cond): If there are bare parameter packs in
2279 the conditional, set it to error_mark_node.
2280 (finish_expr_stmt): If there are bare parameter packs in the
2281 expression, set it to error_mark_node.
2282 (finish_for_expr): Ditto.
2283 (finish_switch_cond): If there are bare parameter packs in
2284 the conditional, set it to error_mark_node.
2285 (finish_mem_initializers): If there are bare parameter packs in
2286 the member initializer, set it to error_mark_node.
2287 (finish_member_declaration): Check the attributes of the
2288 declaration for bare parameter packs, and remove the attributes if
2289 any have bare parameter packs.
2290 * parser.c (cp_parser_using_declaration): Check the using
2291 declaration for bare parameter packs.
2292 (cp_parser_base_clause): If there are bare parameter packs in a
2293 base specifier, don't add it to the chain.
2295 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2298 * error.c (dump_simple_decl): Display ellipsis for template
2299 non-type parameter packs.
2300 (dump_decl): Display ellipsis for template type parameter packs.
2301 (dump_template_decl): Display ellipsis for template template
2303 * pt.c (redeclare_class_template): When redeclaring a class
2304 template, check for collisions between template parameters and
2305 template parameter packs.
2307 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2310 * pt.c (process_partial_specialization): Don't mark template
2311 parameters that occur in non-deduced contexts.
2312 (struct pair_fn_data): Add include_nondeduced_p.
2313 (for_each_template_parm_r): Only visit non-deduced contexts if
2314 include_nondeduced_p is set.
2315 (for_each_template_parm): Added parameter include_nondeduced_p,
2316 which states whether template parameters found in non-deduced
2317 contexts should be visited.
2318 (uses_template_parms): Visit all template parameters, even those
2319 in non-deduced contexts.
2321 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2324 * pt.c (check_default_tmpl_args): Check for parameter packs that
2325 aren't at the end of a primary template.
2326 (push_template_decl_real): Remove check for parameter packs that
2327 aren't at the end of a primary template; that now happens in
2328 check_default_tmpl_args.
2329 * semantics.c (finish_template_template_parm): Use
2330 check_default_tmpl_args to check for errors in the template
2333 2008-01-12 Doug Kwan <dougkwan@google.com>
2335 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
2336 instead of OPT_Wreturn_type in warning due to ignored return type
2338 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
2339 instead of OPT_Wreturn_type in warning due to ignored return type
2342 2008-01-08 Jakub Jelinek <jakub@redhat.com>
2345 * semantics.c (finish_omp_for): Don't call
2346 fold_build_cleanup_point_expr if processing_template_decl.
2348 2008-01-04 Paolo Carlini <pcarlini@suse.de>
2349 Jakub Jelinek <jakub@redhat.com>
2352 * error.c (dump_template_argument): Deal with TREE_LIST.
2354 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
2356 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
2357 long" in C++0x mode; change the warning to note that "long long"
2358 is only unsupported in C++98 mode.
2360 2007-12-20 Jason Merrill <jason@redhat.com>
2363 * call.c (standard_conversion): Derived-to-base is considered a
2364 standard conversion.
2366 2007-12-19 Jakub Jelinek <jakub@redhat.com>
2369 * parser.c (cp_parser_omp_parallel): For non-combined parallel
2370 call cp_parser_statement rather than
2371 cp_parser_already_scoped_statement.
2373 2007-12-18 Jason Merrill <jason@redhat.com>
2376 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
2378 (dependent_type_p_r): Handle the domain of an array.
2380 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
2381 Jakub Jelinek <jakub@redhat.com>
2386 * pt.c (template_template_parm_bindings_ok_p): New; verifies
2387 bindings of template template parameters after all template
2388 arguments have been deduced.
2389 (coerce_template_parms): Don't complain when COMPLAIN doesn't
2391 (fn_type_unification): Use template_template_parm_bindings_ok_p.
2392 (unify): Deal with variadic, bound template template parameters.
2393 (get_class_bindings): Use template_template_parm_bindings_ok_p.
2395 2007-12-18 Jakub Jelinek <jakub@redhat.com>
2398 * decl.c (grokdeclarator): Reject friend sfk_constructor
2401 2007-12-17 Jakub Jelinek <jakub@redhat.com>
2404 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
2407 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
2410 * cp-lang.c (cp_classify_record): New.
2411 (LANG_HOOKS_CLASSIFY_RECORD): Override.
2413 2007-12-11 Jakub Jelinek <jakub@redhat.com>
2416 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
2419 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
2420 dynamic_cast in a template.
2422 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
2425 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
2426 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
2428 2007-12-10 Jakub Jelinek <jakub@redhat.com>
2431 * error.c (dump_type_prefix, dump_type_suffix): Handle
2432 TYPE_PACK_EXPANSION.
2435 * error.c (dump_expr): Handle ABS_EXPR.
2437 2007-12-09 Jakub Jelinek <jakub@redhat.com>
2441 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
2442 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2443 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
2444 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
2445 flag_use_repository and repo_emit_p returned 2.
2447 2007-12-06 Jakub Jelinek <jakub@redhat.com>
2450 * tree.c (stabilize_call, stabilize_init): Do nothing if
2451 processing_template_decl.
2453 2007-12-05 Jakub Jelinek <jakub@redhat.com>
2456 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
2457 error instead of assertion failure.
2458 * parser.c (cp_parser_decltype): If closing paren is not found,
2459 return error_mark_node.
2461 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2464 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
2466 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
2467 since arg_assoc_template_arg will deal with them (better).
2469 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2472 * pt.c (tsubst_exception_specification): Handle substitutions into
2473 member templates, where tsubst_pack_expansion returns a
2474 TYPE_PACK_EXPANSION.
2476 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2479 * pt.c (unify_pack_expansion): If we didn't deduce any actual
2480 bindings for the template parameter pack, don't try to keep the
2481 empty deduced arguments.
2482 (unify): If a parameter is a template-id whose template argument
2483 list contains a pack expansion that is not at the end, then we
2484 cannot unify against that template-id.
2486 2007-12-02 Paolo Carlini <pcarlini@suse.de>
2489 * pt.c (current_template_args): Use error_operand_p.
2491 2007-12-02 Paolo Carlini <pcarlini@suse.de>
2494 * error.c (dump_decl): Handle TREE_BINFO.
2496 2007-12-01 Ollie Wild <aaw@google.com>
2499 * typeck.c (build_binary_op): Add conversion of pointers to function
2500 members appearing as operands to the equality operators.
2502 2007-11-30 Jakub Jelinek <jakub@redhat.com>
2505 * error.c (dump_expr): Handle OBJ_TYPE_REF.
2507 2007-11-29 Jakub Jelinek <jakub@redhat.com>
2510 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
2512 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
2517 * parser.c (cp_parser_decltype): Don't call finish_id_expression
2519 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
2522 2007-11-27 Jakub Jelinek <jakub@redhat.com>
2524 PR tree-optimization/34181
2525 * method.c (use_thunk): Don't inline the call in the thunk.
2528 * tree.c (decl_linkage): Static data members and static member
2529 functions in anonymous ns classes are lk_external.
2531 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
2534 * decl.c (start_preparsed_function): Pass
2535 processing_template_decl for the new allocate_struct_function
2538 2007-11-25 Richard Guenther <rguenther@suse.de>
2540 * decl.c (poplevel): Use BLOCK_CHAIN.
2542 2007-11-24 Ollie Wild <aaw@google.com>
2544 * typeck.c (delta_from_ptrmemfunc): New function.
2545 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
2546 (build_binary_op): Call delta_from_ptrmemfunc.
2548 2007-11-23 Jakub Jelinek <jakub@redhat.com>
2552 * decl.c (cp_finish_decl): Disallow variable or field
2553 definitions if extern "Java" aggregates.
2554 (grokparms): Disallow parameters with extern "Java"
2556 (check_function_type): Disallow function return values
2557 with extern "Java" aggregates.
2558 * init.c (build_new_1): Disallow placement new with
2559 extern "Java" aggregates.
2561 2007-11-23 Mark Mitchell <mark@codesourcery.com>
2562 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2565 * call.c (convert_like_real): Build a zero constant when __null is
2566 converted to an integer type.
2568 2007-11-22 Jakub Jelinek <jakub@redhat.com>
2571 * decl2.c (cp_write_global_declarations): Issue error about static
2572 data members in anonymous namespace which are declared and used,
2575 2007-11-20 Jakub Jelinek <jakub@redhat.com>
2578 * parser.c (cp_parser_class_head): Reject function template ids.
2581 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
2582 when processing_template_decl to build_array_type.
2585 * pt.c (more_specialized_fn): Don't segfault if one or
2586 both argument list end with ellipsis.
2588 2007-11-18 Jakub Jelinek <jakub@redhat.com>
2591 * semantics.c (finish_call_expr): Set
2592 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
2593 or OVERLOAD with all noreturn functions.
2595 2007-11-16 Jakub Jelinek <jakub@redhat.com>
2598 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
2601 2007-11-13 Jakub Jelinek <jakub@redhat.com>
2608 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
2609 set to error_mark_node the outermost POINTER_TYPE to the pack if
2610 it is seen in a POINTER_TYPE.
2611 (push_template_decl_real): If check_for_bare_parameter_packs
2612 fails for function return type, set the return type to
2613 integer_type_node. If check_for_bare_parameter_packs failed
2614 for non-function, return error_mark_node.
2617 * call.c (build_new_op): Call resolve_args before calling
2620 2007-11-11 Tom Tromey <tromey@redhat.com>
2623 * lex.c (handle_pragma_implementation): Use cpp_included_before.
2625 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2628 * pt.c (redeclare_class_template): Update error message. Use a
2629 note to show the previous declaration.
2630 (tsubst_friend_class): Use the location of the friend template as
2631 the input location before calling redeclare_class_template.
2633 2007-11-11 Jakub Jelinek <jakub@redhat.com>
2636 * semantics.c (finish_pseudo_destructor_expr): Handle
2637 object == error_mark_node.
2639 2007-11-10 Jakub Jelinek <jakub@redhat.com>
2642 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
2643 is not scalar type, let finish_class_member_access_expr handle
2644 diagnostics. Pass BIT_NOT_EXPR argument to
2645 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
2647 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
2650 * decl.c (cp_complete_array_type): If any of the initializer
2651 elements are pack expansions, don't compute the array size yet.
2653 2007-11-08 Andrew Pinski <pinskia@gmail.com>
2656 * tree.c (decl_linkage): Fields have no linkage.
2658 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
2660 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
2662 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
2667 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
2668 Be careful with ERROR_MARK_NODEs.
2669 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
2672 2007-11-07 Jakub Jelinek <jakub@redhat.com>
2675 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
2678 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
2682 * tree.c (c_build_qualified_type): Define bridge to
2683 cp_build_qualified_type.
2685 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
2696 * typeck.c (check_return_expr): Pass address of retval to
2697 check_for_bare_parameter_packs.
2698 * class.c (build_base_field): Tolerate bases that have no layout
2700 (end_of_base): Ditto.
2701 * tree.c (canonical_type_variant): Be careful with
2703 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
2705 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
2706 which states whether parameter packs should be replaced with
2708 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
2709 possible. If set_packs_to_error is set true, replace the parameter
2710 pack with ERROR_MARK_NODE. Manage our own pointer sets.
2711 (uses_parameter_packs): Don't set parameter packs to
2713 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
2714 which may be modified (if it is a parameter pack). Instructs
2715 find_parameter_packs_r to replace parameter packs with
2716 ERROR_MARK_NODE (so that they won't cause errors later on).
2717 (process_template_parm): Pass pointer to
2718 check_for_bare_parameter_packs.
2719 (process_partial_specialization): Replace pack expansions before
2720 the end of the template argument list with ERROR_MARK_NODE.
2721 (push_template_decl_real): Pass pointer to
2722 check_for_bare_parameter_packs. Replace parameter packs not at the
2723 end of the template parameter list with ERROR_MARK_NODE.
2724 (convert_template_argument): Be more careful about using DECL_NAME
2725 on only declarations.
2726 (unify): Can't unify against ERROR_MARK_NODE.
2727 * semantics.c (finish_cond): Pass pointer to
2728 check_for_bare_parameter_packs.
2729 (finish_expr_stmt): Ditto.
2730 (finish_for_expr): Ditto.
2731 (finish_switch_cond): Pass pointer to
2732 check_for_bare_parameter_packs, and call it before we put the
2733 condition into the statement.
2734 (finish_mem_initializers): Pass pointer to
2735 check_for_bare_parameter_packs.
2736 (finish_member_declaration): Ditto.
2737 * parser.c (cp_parser_base_clause): Ditto.
2739 2007-11-06 Jakub Jelinek <jakub@redhat.com>
2742 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
2743 with the final TREE_READONLY flag in place. processing_template_decl
2744 is known to be 0 in this part of function.
2747 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
2748 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
2749 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
2750 * semantics.c (finish_omp_atomic): Revert most of the
2751 2007-02-05 changes, just keep the new representation of
2752 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
2754 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
2757 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
2760 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
2765 * typeck.c (merge_types): Don't lose rvalue references when
2767 * call.c (build_over_call): Don't elide move constructors just
2768 because the copy constructor is trivial (!).
2769 (compare_ics): If comparing cv-qualifiers fails, we can still order
2770 based on binding lvalues vs. rvalues.
2772 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
2775 * pt.c (unify_pack_expansion): bring handling of function call
2776 arguments into line with type_unification_real.
2778 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2780 * typeck.c (build_binary_op): Use pedwarn instead of error for
2783 2007-11-05 Jakub Jelinek <jakub@redhat.com>
2786 * parser.c (cp_parser_unary_expression): For &&label call
2787 cp_parser_non_integral_constant_expression and return error_mark_node
2788 if it returned true.
2791 * decl.c (grokdeclarator): Don't call build_memfn_type if type
2792 is neither FUNCTION_TYPE nor METHOD_TYPE.
2794 2007-11-02 Jakub Jelinek <jakub@redhat.com>
2797 * parser.c (cp_parser_nested_name_specifier_opt): Use
2798 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
2799 typedef of currently open class.
2801 2007-11-02 Paolo Carlini <pcarlini@suse.de>
2804 * error.c (dump_expr): Deal specially with statements.
2806 2007-11-01 Jason Merrill <jason@redhat.com>
2809 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
2811 (lookup_template_class): Use it to get the outer template args
2812 for instantiating one.
2815 * pt.c (reduce_template_parm_level): tsubst the parameters
2816 of a template template parm.
2818 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
2821 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
2823 2007-11-01 Jakub Jelinek <jakub@redhat.com>
2826 * parser.c (cp_parser_postfix_dot_deref_expression): If
2827 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
2828 first and if that succeeds and type is SCALAR_TYPE_P, create
2832 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
2833 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
2834 as for std::type_info.
2836 2007-10-31 Paolo Carlini <pcarlini@suse.de>
2839 * cxx-pretty-print.c (pp_cxx_typeid_expression,
2840 pp_cxx_delete_expression): Change to static linkage.
2841 * cxx-pretty-print.h: Adjust declarations.
2842 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
2843 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
2844 MODOP_EXPR): Forward to pp_expression.
2846 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
2849 2007-10-31 Christian Bruel <christian.bruel@st.com>
2850 Mark Mitchell <mark@codesourcery.com>
2853 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
2854 if retval is volatile.
2856 2007-10-30 Jakub Jelinek <jakub@redhat.com>
2859 * decl2.c (build_offset_ref_call_from_tree): Call
2860 build_non_dependent_expr on object prior to building ADDR_EXPR from it
2861 if FN is DOTSTAR_EXPR.
2863 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
2867 * pt.c (find_parameter_packs_r): Fix typo in comment.
2868 (convert_template_argument): Look at the pattern of a pack
2869 expansion to determine what kind of entity we're converting.
2870 (coerce_template_parameter_pack): When we have coerced a non-type
2871 template parameter pack, substitute into the type of that pack.
2872 (tsubst_pack_expansion): When our substitution of a parameter pack
2873 is a "trivial" substitution of itself, just substitute into the
2874 pack expansion rather than actually expanding.
2876 2007-10-29 Jakub Jelinek <jakub@redhat.com>
2879 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
2880 for non-integral type bitfields. Return true if bitfield is correct, false
2881 error has been diagnosed.
2882 (check_field_decls): If check_bitfield_decl returned false, call also
2885 2007-10-28 Paolo Carlini <pcarlini@suse.de>
2886 Mark Mitchell <mark@codesourcery.com>
2889 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
2890 class member error out and return.
2892 2007-10-27 Jakub Jelinek <jakub@redhat.com>
2894 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
2895 to current_function_decl rather than 0.
2898 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
2900 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
2902 2007-10-27 Jason Merrill <jason@redhat.com>
2905 * call.c (convert_default_arg): Detect recursion.
2907 2007-10-27 Jakub Jelinek <jakub@redhat.com>
2910 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
2911 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
2913 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
2915 * error.c (dump_expr): Handle OFFSETOF_EXPR.
2917 2007-10-26 Jason Merrill <jason@redhat.com>
2920 * pt.c (get_template_info): New fn.
2921 (template_class_depth): Use it.
2922 (push_template_decl_real): Check that the template args of the
2923 definition match the args of the previous declaration.
2925 2007-10-26 Paolo Carlini <pcarlini@suse.de>
2928 * decl2.c (coerce_new_type): Do not allow a default argument for
2929 the first parameter.
2931 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
2934 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
2935 don't see the leading '('. Only lookup names if we get an
2938 2007-10-26 Jakub Jelinek <jakub@redhat.com>
2941 * parser.c (cp_parser_parenthesized_expression_list): Set
2942 greater_than_is_operator_p to true in between the parens.
2944 2007-10-26 Paolo Carlini <pcarlini@suse.de>
2947 * decl.c (grokdeclarator): In case of conflicting specifiers
2948 just return error_mark_node.
2950 2007-10-26 Ollie Wild <aaw@google.com>
2952 * expr.c (cxx_expand_expr): Removed.
2953 * cp-tree.h (exx_expand_expr): Removed.
2954 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
2957 2007-10-25 Paolo Carlini <pcarlini@suse.de>
2960 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
2962 2007-10-23 Jason Merrill <jason@redhat.com>
2964 PR c++/25950 (DR 391)
2965 * call.c (struct conversion): Remove check_copy_constructor_p.
2966 (reference_binding): Always bind a reference directly to a
2967 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
2969 (check_constructor_callable): Remove.
2970 (convert_like_real): Don't call it.
2971 (initialize_reference): Don't call check_constructor_callable.
2972 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
2973 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
2974 conversions if LOOKUP_NO_TEMP_BIND.
2975 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
2976 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
2978 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
2980 2007-10-22 Jakub Jelinek <jakub@redhat.com>
2983 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
2984 before checking if its type is integral.
2986 2007-10-22 Jason Merrill <jason@redhat.com>
2989 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
2990 * pt.c (apply_late_template_attributes): Splice out dependent
2991 attributes from DECL_ATTRIBUTES.
2993 * decl.c (cxx_maybe_build_cleanup): Use build_address.
2995 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2997 * typeck.c (build_binary_op) : Use appropriate warning option
2998 instead of unnamed warning.
3000 2007-10-16 Paolo Carlini <pcarlini@suse.de>
3003 * pt.c (current_template_args): Do not change TREE_LIST elements
3004 with a TREE_VALUE of error_mark_node.
3006 2007-10-16 Mark Mitchell <mark@codesourcery.com>
3008 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
3009 * decl.c (start_decl): Tidy.
3010 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
3012 (grokdeclarator): Clarify comment.
3014 2007-10-14 Andrew Pinski <pinskia@gmail.com>
3017 * decl.c (grokfndecl): Return NULL after the "definition of
3018 implicitly-declared" error happened.
3020 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
3023 * call.c (build_user_type_conversion_1): Do not consider conversion
3024 functions to convert a (possibly cv-qualified) object to the (possibly
3025 cv-qualified) same object type (or a reference to it), to a (possibly
3026 cv-qualified) base class of that type (or a reference to it).
3028 2007-10-12 Paolo Carlini <pcarlini@suse.de>
3030 * pt.c (tsubst): Use template_parm_level_and_index.
3032 2007-10-12 Jakub Jelinek <jakub@redhat.com>
3035 * parser.c (cp_parser_compound_statement): Handle label-declarations
3036 at the beginning of the compound statement.
3037 (cp_parser_block_declaration): Issue diagnostics about __label__
3038 not at the beginning of a block.
3040 2007-10-11 Paolo Carlini <pcarlini@suse.de>
3043 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
3044 to convert_template_argument.
3045 (coerce_template_parms): Return error_mark_node after fixed-length
3047 (tsubst_decl): Check for error_mark_node the return value of the
3048 first tsubst in 'case VAR_DECL'.
3050 2007-10-08 Ollie Wild <aaw@google.com>
3052 * typeck2.c (digest_init): Call cplus_expand_constant after
3053 convert_for_initialization.
3054 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
3055 * expr.c (cplus_expand_constant): Updated function description.
3057 2007-10-04 Jason Merrill <jason@redhat.com>
3060 * call.c (initialize_reference): Handle local static reference
3063 2007-10-03 Jason Merrill <jason@redhat.com>
3066 * name-lookup.c (push_namespace_with_attrs): Fold back into...
3067 (push_namespace): Here.
3068 (handle_namespace_attrs): New fn for the attr code.
3069 (leave_scope): Don't pop_visibility.
3070 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
3071 * parser.c (cp_parser_namespace_definition): Call
3072 handle_namespace_attrs and pop_visibility as appropriate.
3075 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
3077 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
3079 * decl.c (duplicate_decls): Preserve linkage flags for mere
3080 redeclarations of gnu_inline definitions.
3082 2007-10-03 Jason Merrill <jason@redhat.com>
3085 * decl.c (wrap_cleanups_r): New fn.
3086 (wrap_temporary_cleanups): New fn.
3087 (initialize_local_var): Call it.
3089 2007-09-29 Jason Merrill <jason@redhat.com>
3092 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
3093 constant to not have DECL_EXTERNAL if it's file-local.
3095 2007-09-28 Ollie Wild <aaw@google.com>
3098 2007-09-27 Ollie Wild <aaw@google.com>
3100 * typeck2.c (digest_init): Call cplus_expand_constant after
3101 convert_for_initialization.
3102 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
3103 * expr.c (cplus_expand_constant): Updated function description.
3105 2007-09-28 Jason Merrill <jason@redhat.com>
3108 * class.c (layout_empty_base): Take rli parameter, update
3109 rli->record_align if empty base has user-specified alignment.
3110 (build_base_field): Pass rli to it.
3112 2007-09-28 Paolo Carlini <pcarlini@suse.de>
3115 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
3117 2007-09-28 Paolo Carlini <pcarlini@suse.de>
3120 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
3121 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
3122 (dump_parameters): Just call dump_type for argument packs too.
3124 2007-09-28 Jakub Jelinek <jakub@redhat.com>
3127 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
3128 qualification by creating qualified PACK_EXPANSION_PATTERN and
3129 then calling make_pack_expansion on it.
3131 2007-09-27 Ollie Wild <aaw@google.com>
3133 * typeck2.c (digest_init): Call cplus_expand_constant after
3134 convert_for_initialization.
3135 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
3136 * expr.c (cplus_expand_constant): Updated function description.
3138 2007-09-27 Jason Merrill <jason@redhat.com>
3141 * decl2.c (is_late_template_attribute): Don't crash on unknown
3144 2007-09-27 Paolo Carlini <pcarlini@suse.de>
3147 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
3148 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
3149 spaces in the formatting.
3150 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
3152 2007-09-27 Jakub Jelinek <jakub@redhat.com>
3154 * error.c (cxx_print_error_function): Add third argument, pass
3155 it over to lhd_print_error_function.
3156 (cp_print_error_function): If diagnostic->abstract_origin, print
3158 * cp-tree.h (struct diagnostic_info): New forward decl.
3159 (cxx_print_error_function): Add third argument.
3161 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
3164 * name-lookup.c (pushtag): Do not create an implicit typedef before
3165 the associated type declaration is known to be valid.
3167 2007-09-25 Jakub Jelinek <jakub@redhat.com>
3169 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
3170 rather than pointers.
3172 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
3175 * search.c (check_final_overrider): Fail if
3176 targetm.comp_type_attributes returns 0.
3178 2007-09-24 Jason Merrill <jason@redhat.com>
3181 * pt.c (resolve_typename_type): Don't look things up in the original
3182 template if it would mean losing template arguments.
3184 2007-09-24 Jakub Jelinek <jakub@redhat.com>
3187 * cp-tree.h (cxx_type_hash_eq): New prototype.
3188 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
3189 * tree.c (cxx_type_hash_eq): New function.
3191 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
3194 * tree.c (cp_build_qualified_type_real): Build a canonical
3195 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
3197 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
3201 * tree.c (cplus_array_compare): Compare pointers, not types.
3202 (build_cplus_array_type_1): Store new array type into the hash
3203 table before building the canonical type; build the canonical type
3205 (cp_build_qualified_type_real): Put all of the array types with
3206 cv-qualified element types into the C++ array hash table, built as
3207 variants of the unqualified versions.
3209 2007-09-23 Jason Merrill <jason@redhat.com>
3212 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
3213 for deprecation warnings.
3215 2007-09-22 Jason Merrill <jason@redhat.com>
3218 * call.c (build_over_call): Warn about deprecated virtuals.
3221 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
3222 (MAYBE_TAGGED_TYPE_P): Remove.
3223 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
3224 instead of calling is_late_template_attribute again.
3225 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
3226 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
3227 Don't crash on typedefs from non-template classes.
3228 * decl2.c (grokfield): Don't sorry about attrs on template parms.
3229 (is_late_template_attribute): All attributes applied to template
3230 parms or typename types are dependent. Static.
3231 (splice_template_attributes): Pass decl through.
3232 (save_template_attributes): Likewise.
3234 2007-09-20 Jakub Jelinek <jakub@redhat.com>
3237 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
3238 returned from tsubst_pack_expansion.
3239 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
3240 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
3242 2007-09-20 Paolo Carlini <pcarlini@suse.de>
3245 * semantics.c (finish_id_expression): Use consistently
3246 context_for_name_lookup.
3247 * decl.c (fixup_anonymous_aggr): Fix error message for
3248 anonymous struct (vs union).
3250 2007-09-19 Jason Merrill <jason@redhat.com>
3253 * pt.c (tsubst): Handle typedefs by looking for the specialization.
3254 (retrieve_specialization): Only tagged types use
3255 DECL_TEMPLATE_INSTANTIATIONS.
3256 (instantiate_class_template): Push nested classes too.
3257 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
3259 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
3260 * init.c (is_aggr_type): Remove redundant tests.
3261 * class.c (push_nested_class): Use CLASS_TYPE_P.
3263 2007-09-20 Paolo Carlini <pcarlini@suse.de>
3266 * init.c (build_zero_init): If, recursively, build_zero_init
3267 returns a NULL_TREE, do not append it to the VEC of constructors.
3269 2007-09-18 Jason Merrill <jason@redhat.com>
3272 * pt.c (apply_late_template_attributes): Set processing_template_decl.
3273 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
3274 ATTR_FLAG_TYPE_IN_PLACE.
3275 (tsubst): Do unqualified lookup to find typedefs from current class.
3276 [ARRAY_TYPE]: Propagate alignment info.
3277 * decl2.c (is_late_template_attribute): Only defer handling of
3278 attribute aligned if the expression is dependent.
3279 (save_template_attributes): If we're deferring any attributes,
3280 make this a naming typedef.
3282 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3284 PR c++/33462 (again)
3285 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
3286 va_arg instead of __builtin_va_arg.
3288 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3291 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
3292 (pp_cxx_primary_expression): Use it.
3293 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
3294 * error.c (dump_expr): Use it.
3296 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3299 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
3300 out case TYPEID_EXPR to...
3301 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
3302 and pp_cxx_right_paren.
3303 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
3304 * error.c (dump_expr): Use it.
3306 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3309 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
3310 (pp_cxx_primary_expression): Use it.
3311 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
3312 * error.c (dump_expr): Use it.
3314 2007-09-16 Paolo Carlini <pcarlini@suse.de>
3317 * init.c (build_new): Remove warning for zero-element
3320 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
3323 * call.c (maybe_handle_implicit_object): Set this_p, clear
3324 rvaluedness_matches_p.
3325 (compare_ics): Do not compare rvaluedness matching when one of the
3326 operands is an implicit object.
3328 2007-09-14 Jason Merrill <jason@redhat.com>
3330 PR c++/17743, c++/19163
3331 * decl2.c (is_late_template_attribute): New fn.
3332 (splice_template_attributes, save_template_attributes): New fns.
3333 (cplus_decl_attributes): Call save_template_attributes.
3334 * pt.c (apply_late_template_attributes): New fn.
3335 (instantiate_class_template, tsubst_decl): Use it.
3336 * cp-tree.h: Declare is_late_template_attribute.
3338 2007-09-13 Tom Tromey <tromey@redhat.com>
3340 * parser.c (cp_lexer_new_main): Don't use
3341 c_lex_return_raw_strings.
3342 (cp_lexer_get_preprocessor_token): Update. Add special case when
3345 2007-09-11 Jan Hubicka <jh@suse.cz>
3347 * method.c (use_thunk): Use tree_rest_of_compilation
3348 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
3349 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
3350 * cp-tree.h (expand_body): Kill.
3351 (emit_associated_thunks): Declare.
3352 * semantics.c (emit_associated_thunks): Export.
3353 (expand_body): Kill.
3355 2007-09-09 David Daney <ddaney@avtrex.com>
3358 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
3359 to calculate cookie_ptr.
3361 2007-09-08 Jason Merrill <jason@redhat.com>
3364 * pt.c (most_specialized_class): Set processing_template_decl
3365 while tsubsting partial spec args.
3367 2007-09-06 Jason Merrill <jason@redhat.com>
3369 * decl2.c (get_guard): Copy visibility from the guarded variable.
3371 2007-09-06 Jan Hubicka <jh@suse.cz>
3373 * semantics.c (expand_body): Do not mark arguments of clones used.
3375 2007-09-06 Paolo Carlini <pcarlini@suse.de>
3378 * decl.c (cp_finish_decl): When processing_template_decl,
3379 deal correctly with init as TREE_LIST.
3381 2007-09-06 Tom Tromey <tromey@redhat.com>
3383 * decl.c (finish_function): Put return's location on line zero of
3386 2007-09-05 Jason Merrill <jason@redhat.com>
3389 * except.c (prepare_eh_type): Use type_decays_to.
3392 * init.c (build_delete): Use build_headof to get the address of the
3393 complete object if we aren't using the deleting destructor.
3394 * rtti.c (build_headof): No longer static.
3395 * cp-tree.h: Declare it.
3397 2007-09-06 Jakub Jelinek <jakub@redhat.com>
3399 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
3400 decl if a prototype for XX is provided with throw().
3403 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
3404 on __*_chk non-__builtin_* decls.
3406 2007-09-05 Paolo Carlini <pcarlini@suse.de>
3409 * semantics.c (finish_id_expression): Use context_for_name_lookup
3410 insted of DECL_CONTEXT, to see through anonymous structs and unions.
3411 * class.c (finish_struct_anon): Deal correctly with anonymous
3412 structs (vs unions, as GNU extension) in error messages.
3414 2007-09-05 Jan Hubicka <jh@suse.cz>
3416 * sematics.c (expand_body): Remove unnecesary import_export_decl
3417 call, DECL_EXTERNAL checks and current_function_decl saving.
3419 2007-09-05 Paolo Carlini <pcarlini@suse.de>
3421 PR c++/29731 (again)
3422 * parser.c (cp_parser_primary_expression): Return error_mark_node
3423 when a statement-expression is found in a template-argument list.
3425 2007-09-04 Jason Merrill <jason@redhat.com>
3427 * except.c (initialize_handler_parm): Use
3428 fold_build_cleanup_point_expr.
3431 * call.c (reference_binding): Don't look for user-defined conversions
3435 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
3436 the MUST_NOT_THROW_EXPR.
3438 2007-09-04 Richard Sandiford <richard@codesourcery.com>
3440 * decl.c (cp_finish_decl): Call determine_visibility before
3441 make_rtl_for_nonlocal_decl.
3443 2007-09-04 Jason Merrill <jason@redhat.com>
3446 * pt.c (most_specialized_class): Substitute outer template
3447 arguments into the arguments of a member template partial
3449 (strip_innermost_template_args): New fn.
3451 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
3453 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
3455 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3457 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
3458 * decl.c (cp_make_fname_decl): Likewise,
3459 * parser.c (cp_parser_string_literal): Likewise,
3460 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
3461 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
3464 2007-09-02 Paolo Carlini <pcarlini@suse.de>
3467 * typeck.c (build_unary_op): Fix error message for
3468 Boolean expression as operand to operator--.
3470 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3472 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
3473 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
3476 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
3479 * init.c (build_default_init): Make extern.
3480 * cp-tree.h (build_default_init): Declare here.
3481 * pt.c (tsubst_expr): When the instantiation of the initializer of
3482 a variable results in an empty list, default-initialize the
3484 (tsubst_copy_and_build): When the instantiation of the initializer
3485 in a new expression results in an empty initializer list,
3486 default-initialize it.
3488 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
3490 * mangle.c (write_type): Change mangling of rvalue reference from
3493 2007-08-31 Jakub Jelinek <jakub@redhat.com>
3495 * decl.c (duplicate_decls): Remove duplicated line.
3497 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3500 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
3501 BOUND_TEMPLATE_TEMPLATE_PARM.
3503 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3506 * search.c (lookup_member): Check the name argument for
3509 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3512 * parser.c (cp_parser_trait_expr): Check rerurn value of
3515 2007-08-30 Ollie Wild <aaw@google.com>
3517 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
3518 convert_ptrmem for pointer to member conversions.
3519 (convert_to_pointer_force): Update cp_convert_to_pointer call.
3520 (ocp_convert): Update cp_convert_to_pointer call.
3521 * typeck.c (convert_ptrmem): Add conditional for null pointers to
3523 (build_static_cast_1): Check can_convert for conversions in either
3525 (get_delta_difference_1): New function.
3526 (get_delta_difference): Refactor to call get_delta_difference_1.
3528 2007-08-30 Jakub Jelinek <jakub@redhat.com>
3530 * decl.c (start_preparsed_function): Set
3531 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
3533 2007-08-28 Paolo Carlini <pcarlini@suse.de>
3536 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
3537 BOUND_TEMPLATE_TEMPLATE_PARM.
3539 2007-08-28 Jakub Jelinek <jakub@redhat.com>
3543 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
3544 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
3546 2007-08-27 Jason Merrill <jason@redhat.com>
3549 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
3550 Look inside STMT_EXPR.
3551 * semantics.c (stmt_expr_value_expr): New fn.
3552 * cp-tree.h: Declare it.
3555 * decl.c (groktypename): Ignore attributes applied to class type.
3557 2007-08-28 Richard Guenther <rguenther@suse.de>
3559 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
3561 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
3563 * error.c (dump_expr): Handle COMPLEX_CST.
3564 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
3565 (pp_cxx_expression): Likewise.
3567 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
3569 * decl.c (GNU_INLINE_P): New.
3570 (duplicate_decls): Handle gnu_inline. Merge attributes and
3571 some flags in overriding definitions.
3572 (redeclaration_error_message): Handle gnu_inline.
3573 (start_preparsed_function): Likewise.
3575 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3577 * call.c (sufficient_parms_p): Constify.
3578 * class.c (same_signature_p): Likewise.
3579 * cp-gimplify.c (is_invisiref_parm,
3580 cxx_omp_privatize_by_reference): Likewise.
3581 * cp-objcp-common.c (has_c_linkage): Likewise.
3582 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
3583 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
3584 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
3585 num_artificial_parms_for, comp_template_parms,
3586 template_parameter_pack_p, any_dependent_template_arguments_p,
3587 any_type_dependent_arguments_p, any_value_dependent_elements_p,
3588 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
3589 zero_init_p, member_p, cp_lvalue_kind,
3590 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
3591 varargs_function_p, is_dummy_object, special_function_kind,
3592 string_conv_p, type_unknown_p, comp_except_specs, compparms,
3593 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
3594 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
3595 cp_has_mutable_p, at_least_as_qualified_p,
3596 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
3597 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
3598 * except.c (nothrow_libfn_p): Likewise.
3599 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
3601 * pt.c (comp_template_parms, template_parameter_pack_p,
3602 any_type_dependent_arguments_p, any_value_dependent_elements_p,
3603 any_dependent_template_arguments_p): Likewise.
3604 * repo.c (repo_export_class_p): Likewise.
3605 * semantics.c (anon_aggr_type_p): Likewise.
3606 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
3607 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
3608 varargs_function_p, member_p, is_dummy_object, pod_type_p,
3609 zero_init_p, special_function_p): Likewise.
3610 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
3611 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
3612 compparms, invalid_nonstatic_memfn_p,
3613 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
3614 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
3615 cp_has_mutable_p, lvalue_or_else): Likewise.
3617 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
3619 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
3620 * cp-objcp-common.c (cp_tree_size): Ditto.
3621 * tree.c (cp_walk_subtrees): Ditto
3622 * cp-tree.def (TINST_LEVEL): Go away.
3623 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
3624 move together with other non-tree structs.
3625 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
3626 (union lang_tree_node): Eliminate tinst_level field.
3627 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
3628 (current_instantiation, outermost_tinst_level): Return
3629 a "struct tinst_level *".
3631 * error.c (print_instantiation_partial_context): Change second
3632 parameter to a "struct tinst_level *". Replace accessor macros
3634 (print_instantiation_full_context): Likewise.
3635 * lex.c (in_main_input_context): Likewise.
3637 * pt.c (struct pending_templates): New.
3638 (pending_templates, last_pending_template): Use it as a type.
3639 (current_tinst_level): Change typo to "struct tinst_level *"
3640 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
3641 (add_pending_template): Construct a "struct pending_template".
3642 Replace TINST_LEVEL accessor macros with field access.
3643 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
3644 (pop_tinst_level): Likewise.
3645 (instantiate_pending_templates): Likewise. Factor common code used
3646 when an instantiation has been done.
3647 (outermost_tinst_level): Replace tree_last with loop.
3648 (current_instantiation): Return a "struct tinst_level *".
3650 2007-08-24 Ollie Wild <aaw@google.com>
3652 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
3653 * name-lookup.h (cp_binding_level): Remove vtables member.
3655 2007-08-24 Richard Guenther <rguenther@suse.de>
3657 * tree.c (cp_cannot_inline_tree_fn): Remove.
3658 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
3659 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
3662 2007-08-24 Jakub Jelinek <jakub@redhat.com>
3665 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
3666 error_mark_node right away if build_expr_type_conversion
3670 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
3671 is error_mark_node rather than NULL_TREE.
3672 * pt.c (check_explicit_specialization): Likewise.
3675 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
3676 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
3678 2007-08-22 Jason Merrill <jason@redhat.com>
3681 * pt.c (outermost_tinst_level): New function.
3682 * lex.c (in_main_input_context): New function.
3683 * cp-tree.h: Declare it.
3684 * decl2.c (constrain_class_visibility): Use it to avoid warning
3685 about uses of the anonymous namespace in the main input file.
3687 2007-08-21 Jakub Jelinek <jakub@redhat.com>
3689 * init.c (build_new_1): Use get_target_expr instead of save_expr.
3691 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
3694 * class.c (finish_struct_1): Warn when a class has virtual
3695 functions and accessible non-virtual destructor.
3697 2007-08-20 Richard Guenther <rguenther@suse.de>
3701 * call.c (build_new_method_call): Convert initializer to
3703 * init.c (build_aggr_init): Do not fiddle with types.
3704 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
3705 * except.c (build_throw): Do not drop qualifiers for the
3707 * typeck.c (get_member_function_from_ptrfunc): Do not
3708 fiddle with types, instead convert.
3709 (build_ptrmemfunc1): Convert to the target type for
3711 (gfc_trans_allocate): Convert result to target type.
3712 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
3713 pointer-to-member structures shall have alias set zero as well.
3715 2007-08-20 Richard Guenther <rguenther@suse.de>
3717 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
3719 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
3720 (nonstatic_local_decl_p): Likewise.
3721 * tree.c (cp_auto_var_in_fn_p): Remove.
3722 * decl.c (nonstatic_local_decl_p): Remove.
3724 2007-08-20 Richard Guenther <rguenther@suse.de>
3726 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
3728 * tree.h (cp_walk_tree): New define to walk_tree_1 with
3729 cp_walk_subtrees lh parameter.
3730 (cp_walk_tree_without_duplicates): New define to
3731 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
3732 * tree.c (count_trees): Call
3733 cp_walk_tree_without_duplicates.
3734 (verify_stmt_tree): Call cp_walk_tree.
3735 (break_out_target_exprs): Likewise.
3736 (WALK_SUBTREE): Likewise.
3737 * cp-gimplify.c (cp_genericize): Likewise.
3738 * cp-pt.c (find_parameter_packs_r): Likewise.
3739 (uses_parameter_packs): Likewise.
3740 (make_pack_expansion): Likewise.
3741 (check_for_bare_parameter_packs): Likewise.
3742 (for_each_template_parm): Likewise.
3743 * decl.c (check_default_argument): Call
3744 cp_walk_tree_without_duplicates.
3745 * except.c (build_throw): Likewise.
3746 * decl2.c (type_visibility): Likewise.
3747 * semantics.c (expand_or_defer_fn): Likewise.
3748 (finalize_nrv): Call cp_walk_tree.
3750 2007-08-20 Jakub Jelinek <jakub@redhat.com>
3753 * init.c (build_new_1): Rename placement_var variable to placement_expr.
3754 Initialize it with save_expr rather than get_temp_regvar.
3756 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
3759 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
3762 2007-08-17 Ollie Wild <aaw@google.com>
3765 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
3766 declarations into appropriate slots for comparison. Fix type
3769 2007-08-17 Paolo Carlini <pcarlini@suse.de>
3772 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
3773 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
3775 2007-08-17 Paolo Carlini <pcarlini@suse.de>
3778 * parser.c (cp_parser_class_head): Improve error message.
3780 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
3782 * pt.c (instantiate_decl): Set input_location
3783 for the function end.
3785 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3787 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
3789 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
3790 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
3791 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
3792 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
3793 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
3794 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
3795 * typeck.c (cp_type_quals): Likewise.
3796 * typeck2.c (cxx_incomplete_type_diagnostic,
3797 cxx_incomplete_type_error): Likewise.
3799 2007-08-16 Paolo Carlini <pcarlini@suse.de>
3802 * pt.c (tsubst_friend_function): When check_classfn
3803 returns error_mark_node likewise return it.
3805 2007-08-15 Jakub Jelinek <jakub@redhat.com>
3808 * typeck.c (check_return_expr): Don't NRV optimize vars in
3810 * decl.c (finish_function): Comment fix.
3812 2007-08-15 Paolo Carlini <pcarlini@suse.de>
3815 * pt.c (push_template_decl_real): Depending on TYPE_P
3816 use either TYPE_CONTEXT or DECL_CONTEXT.
3818 2007-08-14 Mark Mitchell <mark@codesourcery.com>
3820 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
3821 constructors and destructors return this.
3823 2007-08-14 Paolo Carlini <pcarlini@suse.de>
3826 * decl2.c (check_classfn): Return error_mark_node in case of error;
3827 in that case, do not call add_method.
3828 * decl.c (start_decl): Deal with check_classfn returning
3830 (grokfndecl): Likewise.
3831 * pt.c (tsubst_friend_function): Likewise.
3833 2007-08-14 Andrew Pinski <pinskia@gmail.com>
3836 * typeck.c (build_binary_op): Disallow vector float types with
3837 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
3839 2007-08-11 Ian Lance Taylor <iant@google.com>
3841 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
3843 * cp-tree.h (cxx_get_alias_set): Update declaration.
3845 2007-08-10 Ollie Wild <aaw@google.com>
3847 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
3849 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
3851 (unqualified_namespace_lookup): Fix ambiguous_decl call.
3852 (lookup_using_namespace): Fix ambiguous_decl call.
3853 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
3855 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3857 * call.c (name_as_c_string): Use CONST_CAST.
3858 * decl.c (build_decl): Likewise.
3859 * parser.c (cp_parser_string_literal): Likewise.
3861 2007-08-10 Paolo Carlini <pcarlini@suse.de>
3864 * error.c (dump_expr): Consistently use the *_cxx_*
3865 variants of the pretty-print functions.
3867 2007-08-10 Paolo Carlini <pcarlini@suse.de>
3870 * decl.c (check_special_function_return_type): Just error
3871 on return type specified for conversion operator.
3873 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
3875 * typeck2.c (readonly_error): Handle general expressions.
3876 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
3878 2007-08-06 Dan Hipschman <dsh@google.com>
3880 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
3881 access function name.
3883 2007-08-04 Alfred Minarik <a.minarik@aon.at>
3886 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
3887 * g++spec.c (lang_specific_driver): Check them.
3889 2007-08-06 Paolo Carlini <pcarlini@suse.de>
3892 * pt.c (inline_needs_template_parms): Fix comment; change return type
3895 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
3898 2007-03-26 Dirk Mueller <dmueller@suse.de>
3900 * parser.c (cp_parser_member_declaration): Pedwarn
3901 about stray semicolons after member declarations.
3903 2007-08-02 Lee Millward <lee.millward@gmail.com>
3908 * parser.c (cp_parser_asm_definition): Detect and discard asm
3909 statements with invalid inputs or outputs.
3910 (cp_parser_asm_operand_list): Return error mark node if any
3911 of the operands are invalid. Adjust documentation.
3913 2007-08-02 Nick Clifton <nickc@redhat.com>
3915 * typeck.c: Change copyright header to refer to version 3 of the
3916 GNU General Public License and to point readers at the COPYING3
3917 file and the FSF's license web page.
3918 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
3919 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
3920 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
3921 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
3922 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
3923 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
3924 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
3925 name-lookup.h, parser.c: Likewise.
3927 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3930 * call.c (magic_varargs_p): Honor the "type generic" attribute.
3932 2007-07-30 Paolo Carlini <pcarlini@suse.de>
3935 * semantics.c (finish_label_stmt): Reject the __label__
3936 extension outside function scopes.
3938 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3940 * parser.c (eof_token): Un-constify.
3941 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
3942 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
3945 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
3947 * pt.c, tree.c, typeck2.c: Fix comment typos.
3949 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
3950 Mark Mitchell <mark@codesourcery.com>
3953 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
3954 hidden due to friend declarations in local classes.
3956 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
3958 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
3959 * cp-tree.def (DECLTYPE_TYPE): New.
3960 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
3961 (dump_type_prefix): Ditto.
3962 (dump_type_suffix): Ditto.
3963 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
3964 * mangle.c (write_type): Handle DECLTYPE_TYPE.
3965 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
3967 (DECLTYPE_TYPE_EXPR): New.
3968 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
3969 (finish_declared_type): Declare.
3970 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
3971 DECLTYPE_TYPE nodes.
3972 (pp_cxx_type_id): Ditto.
3973 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
3974 (tsubst): Substitute into a DECLTYPE_TYPE node.
3975 (tsubst_copy): Ditto.
3976 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
3978 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
3979 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
3980 structural equality (because we can't hash the expressions).
3981 (finish_declared_type): New.
3982 * lex.c (reswords): Add "decltype" keyword.
3983 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
3984 (cp_parser_postfix_expression): Add member_access_only_p to
3985 restrict postfix expression to member access expressions.
3986 (cp_parser_unary_expression): Update call to
3987 cp_parser_postfix_expression to reflect new parameter.
3988 (cp_parser_declared_type): New.
3989 (cp_parser_simple_type_specifier): Parse decltype types.
3991 2007-07-27 Mark Mitchell <mark@codesourcery.com>
3994 * call.c (convert_for_arg_passing): Only widen bitfields to their
3995 declared types if necessary.
3997 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3999 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
4002 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4004 * decl.c (typename_hash, typename_compare): Constify.
4005 * mangle.c (hash_type, compare_type): Likewise.
4006 * pt.c (eq_local_specializations, hash_local_specialization):
4008 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
4009 list_hash): Likewise.
4010 * typeck2.c (pat_compare): Likewise.
4012 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
4014 * method.c (implicitly_declare_fn): Increase alignment if member
4015 function pointer format requires it.
4017 2007-07-24 Paolo Carlini <pcarlini@suse.de>
4020 * typeck.c (check_return_expr): Do not pass a null argument
4023 2007-07-24 Paolo Carlini <pcarlini@suse.de>
4026 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
4029 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
4032 * typeck.c (convert_arguments): Only use default args if we have
4036 * typeck.c (structural_comptypes): No need to check
4037 resolve_typename_type return value here.
4038 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
4039 * pt.c (resolve_typename_type): Follow typename typedefs. Return
4040 original type rather than error_mark_node in case of failure.
4041 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
4042 resolve_typename_type result check.
4043 (cp_parser_direct_declarator, cp_parser_head,
4044 cp_parser_constructor_declarator_p): Likewise.
4046 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
4048 * pt.c (template_parms_variadic_p): Remove.
4049 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
4051 2007-07-12 Jakub Jelinek <jakub@redhat.com>
4054 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
4055 argument to dump_aggr_init_expr_args instead of false.
4057 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
4059 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
4060 canonical types; otherwise, fall back to structural type
4061 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
4062 internal compiler error if the canonical types are wrong.
4064 2007-07-11 Paolo Carlini <pcarlini@suse.de>
4067 * parser.c (cp_parser_make_indirect_declarator): When the
4068 the code argument is ERROR_MARK return cp_error_declarator.
4070 2007-07-09 Geoffrey Keating <geoffk@apple.com>
4073 * decl.c (cxx_init_decl_processing): Don't set
4074 force_align_functions_log.
4075 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
4076 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
4077 FUNCTION_DECL, return its alignment.
4079 2007-07-09 Richard Guenther <rguenther@suse.de>
4081 * decl.c (start_preparsed_function): Do not promote return type.
4083 2007-07-08 Paolo Carlini <pcarlini@suse.de>
4086 * pt.c (unify): Never pass error_mark_node to template_decl_level.
4088 2007-07-07 Mark Mitchell <mark@codesourcery.com>
4091 * pt.c (resolve_overloaded_unification): Robustify. Return a
4093 (type_unification_real): Adjust accordingly.
4095 2007-07-06 Richard Guenther <rguenther@suse.de>
4097 * init.c (build_new_1): Use the correct pointer type.
4098 * typeck2.c (build_m_component_ref): Likewise.
4100 2007-07-05 Mark Mitchell <mark@codesourcery.com>
4103 * init.c (build_zero_init): Always build an initializer for
4105 * typeck2.c (build_functional_cast): Use build_zero_init.
4108 * init.c (build_new_1): Always pass the allocation function to
4109 build_op_delete_call.
4110 * call.c (build_op_delete_call): Handle operator delete with a
4111 variable-argument list. Do not issue an error when no matching
4112 deallocation function is available for a new operator.
4115 * cp-tree.h (any_value_dependent_elements_p): Declare it.
4116 * decl.c (value_dependent_init_p): New function.
4117 (cp_finish_decl): Use it.
4118 * pt.c (value_dependent_expression_p): Use
4119 any_value_dependent_elements_p.
4120 * parser.c (cp_parser_primary_expression): Add comment about
4121 treating dependent qualified names as integral
4122 constant-expressions.
4124 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
4126 * decl.c (build_ptrmemfunc_type): Always use structural equality
4127 tests when comparing pointer-to-member-function types, because the
4128 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
4131 2007-07-03 Mark Mitchell <mark@codesourcery.com>
4133 * init.c (build_new): Tweak comment.
4135 2007-06-29 Dave Brolley <brolley@redhat.com>
4138 * parser.c (cp_parser_new_type_id): Don't reduce a named array
4139 type to its base type and number of elements here.
4140 * init.c (build_new): Call complete_type_or_else to ensure that the
4141 type is complete and to issue a diagnostic if it is not.
4142 (build_new_1): Don't call complete_type_or_else here.
4144 2007-07-03 Richard Guenther <rguenther@suse.de>
4147 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
4150 2007-07-02 Simon Baldwin <simonb@google.com>
4152 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
4153 for inner-style nested forward declarations that don't declare
4156 2007-07-02 Jakub Jelinek <jakub@redhat.com>
4159 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
4160 DECL_P in not a variable and appears more than once error messages.
4162 2007-07-01 Ollie Wild <aaw@google.com>
4164 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
4165 (select_decl): Remove function.
4166 (unqualified_namespace_lookup): Populate binding by calling
4167 ambiguous_decl. Remove select_decl call.
4168 (lookup_qualified_name): Remove select_decl call.
4169 * decl.c (lookup_and_check_tag): Check for ambiguous references.
4170 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
4171 generation when name lookup is ambiguous.
4173 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
4176 * init.c (build_new_1): Use structural equality on the copy of the
4179 2007-06-28 Geoffrey Keating <geoffk@apple.com>
4181 * decl2.c (determine_visibility): Implement
4182 flag_visibility_ms_compat effect on type info.
4183 * decl.c (cxx_init_decl_processing): Implement
4184 global effect of flag_visibility_ms_compat.
4186 2007-06-28 Geoffrey Keating <geoffk@apple.com>
4188 * decl2.c (start_objects): Mark constructor-running function
4191 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
4194 * decl.c (grokdeclarator): Reset friendp for member functions declared
4195 friend of their own class.
4197 2007-06-23 Mark Mitchell <mark@codesourcery.com>
4199 * decl2.c (determine_visibility): Don't look for dllexport here.
4200 (determine_visibility_from_class): Tidy.
4202 2007-06-18 Simon Baldwin <simonb@google.com>
4205 * parser.c (cp_parser_single_declaration): Added check for storage
4206 class other than sc_none in parsed declaration, and a flag to indicate
4207 if the call is part of an explicit template specialization parse.
4208 * (cp_parser_explicit_specialization): Specialization check flag added
4209 to call to cp_parser_single_declaration(), set true.
4210 * (cp_parser_template_declaration_after_export): Specialization check
4211 flag added to call to cp_parser_single_declaration(), set false.
4212 * pt.c (check_explicit_specialization): Added code to copy visiblity
4213 and linkage from the templated function to the explicit specialization.
4215 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
4217 * typeck.c (build_binary_op): For templates build the
4218 expression in pieces to avoid the assert in build2_stat.
4219 (get_member_function_from_ptrfunc):
4220 Change over to using POINTER_PLUS_EXPR and convert
4221 the second operand to sizetype.
4222 * typeck2.c (build_m_component_ref): Likewise.
4223 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
4224 instead of PLUS_EXPR for pointers.
4225 (build_new_1): Likewise.
4226 (build_vec_delete_1): Likewise.
4227 (build_vec_delete): Likewise.
4228 * class.c (build_base_path): Likewise.
4229 (build_base_path): Likewise.
4230 (convert_to_base_statically): Likewise.
4231 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
4232 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
4233 instead of PLUS_EXPR.
4234 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
4235 instead of PLUS_EXPR for pointers.
4236 * call.c (build_special_member_call): Likewise.
4237 * rtti.c (build_headof): Likewise.
4238 Use sizetype instead of ptrdiff_type_node.
4239 (tinfo_base_init): Create a POINTER_PLUS_EXPR
4240 instead of PLUS_EXPR for pointers.
4241 * except.c (expand_start_catch_block): Do a
4242 NEGATIVE and then a POINTER_PLUS_EXPR instead
4244 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
4245 PLUS_EXPR on pointer types over to use
4246 POINTER_PLUS_EXPR and remove the conversion
4247 to the pointer types.
4248 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
4249 adding to a pointer type. Use size_int instead of
4250 ssize_int. Convert the index to sizetype before
4251 adding it to the pointer.
4253 2007-06-15 Mark Mitchell <mark@codesourcery.com>
4255 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
4256 (DECL_ANON_UNION_VAR_P): New macro.
4257 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
4258 than DECL_VAR_MARKED_P, to keep track of which variables we have
4260 * decl.c (redeclaration_error_message): Complain about redeclaring
4261 anonymous union members at namespace scope.
4262 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
4264 2007-06-14 Geoff Keating <geoffk@apple.com>
4266 * decl2.c (determine_visibility): Ensure that functions with
4267 hidden types as parameters are hidden.
4270 * decl2.c (determine_visibility): Remove duplicate code for
4273 2007-06-12 Ian Lance Taylor <iant@google.com>
4276 * init.c (avoid_placement_new_aliasing): New static function.
4277 (build_new_1): Call it.
4279 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
4281 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
4282 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
4284 2007-06-08 Jakub Jelinek <jakub@redhat.com>
4287 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
4288 on init, the non-decl cond operand and increment value.
4290 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
4293 * decl.c (check_initializer): Report an error when a brace enclosed
4294 initializer is used for a non-aggregate type in C++98.
4295 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
4297 (grokdeclarator): Likewise.
4298 (move_fn_p): Likewise.
4299 * typeck.c (check_return_expr): Likewise.
4300 * call.c (reference_binding): Likewise.
4301 * error.c (cp_cpp_error): Likewise.
4302 * pt.c (check_default_tmpl_args): Likewise.
4304 * lex.c (init_reswords): Likewise.
4305 * parser.c (p_parser_primary_expression): Likewise.
4306 (TOKEN_PRECEDENCE): Likewise.
4307 (cp_parser_init_declarator): Likewise.
4308 (cp_parser_ptr_operator): Likewise.
4309 (cp_parser_parameter_declaration): Likewise.
4310 (cp_parser_enclosed_template_argument_list): Likewise.
4311 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
4312 (cp_parser_next_token_ends_template_argument_p): Likewise.
4314 2007-06-04 Simon Baldwin <simonb@google.com>
4316 * decl.c (grokdeclarator): Readability change. Moved case labels
4317 into direct switch statement scope.
4319 2007-06-04 Paolo Carlini <pcarlini@suse.de>
4321 * call.c (convert_like_real): Remove pointless code.
4323 2007-05-31 Mark Mitchell <mark@codesourcery.com>
4325 * decl.c (get_atexit_fn_ptr_type): New function.
4326 (get_atexit_node): Use it.
4327 (start_cleanup_fn): Likewise.
4328 (register_dtor_fn): Use the object's destructor, instead of a
4329 separate cleanup function, where possible.
4330 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
4331 (atexit_fn_ptr_type_node): New macro.
4332 * decl2.c (build_cleanup): Use build_address.
4334 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
4336 * typeck.c (build_binary_op): Include types in error.
4338 2007-05-31 Jakub Jelinek <jakub@redhat.com>
4341 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
4342 needs runtime initialization.
4344 2007-05-31 Paolo Carlini <pcarlini@suse.de>
4347 * semantics.c (finish_trait_expr): Complete the types.
4349 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
4350 Douglas Gregor <doug.gregor@gmail.com>
4351 Pedro Lamarao <pedro.lamarao@mndfck.org>
4352 Howard Hinnant <howard.hinnant@gmail.com>
4356 * typeck.c (comptypes): Don't consider rvalue and lvalue
4357 reference types to be equivalent.
4358 (check_return_expr): Move from certain lvalues when returning
4360 * decl.c (grokdeclarator): Implement reference collapsing.
4361 (copy_fn_p): Don't consider constructors taking rvalue references
4362 to be copy constructors.
4364 * call.c (conversion): New "rvaluedness_matches_p" member.
4365 (convert_class_to_reference): Require reference type as first
4366 parameter instead of base type.
4367 (reference_binding): Add logic to handle rvalue references.
4368 (implicit_conversion): Update inaccurate comment.
4369 (convert_like_real): Disable creation of temporaries that are
4370 impossible to initialize for types with move constructors.
4371 (build_over_call): Elide move constructors when possible.
4372 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
4373 (maybe_handle_ref_bind): Return conversion instead of type node.
4374 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
4375 determine preferred conversion sequences.
4376 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
4377 (LOOKUP_PREFER_RVALUE): New.
4378 (DECL_MOVE_CONSTRUCTOR_P): New.
4379 (struct cp_declarator): Add "reference" member for reference
4380 types, with new "rvalue_ref" flag.
4381 (cp_build_reference_type): Declare.
4382 (move_fn_p): Declare.
4383 * error.c (dump_type_prefix): Format rvalue reference types
4384 correctly in error messages.
4385 * except.c (build_throw): Move from certain lvalues when
4387 * mangle.c (write_type): Mangle rvalue references differently
4388 than regular references.
4389 * parser.c (make_reference_declarator): Add boolean parameter for
4391 (cp_parser_make_indirect_declarator): New.
4392 (cp_parser_new_declarator_opt): Call
4393 cp_parser_make_indirect_declarator.
4394 (cp_parser_conversion_declarator_opt): Ditto.
4395 (cp_parser_declarator): Ditto.
4396 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
4398 * pt.c (tsubst): Implement reference collapsing.
4399 (maybe_adjust_types_for_deduction): Implement special template
4400 parameter deduction rule for rvalue references.
4401 (type_unification_real): Update calls to
4402 maybe_adjust_types_for_deduction.
4403 (try_one_overload): Ditto.
4404 (unify_pack_expansion): Ditto.
4405 * tree.c (lvalue_p_1): Handle rvalue reference types.
4406 (cp_build_reference_type): New.
4408 2007-05-30 Jakub Jelinek <jakub@redhat.com>
4411 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
4412 variables that need runtime initialization.
4414 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
4417 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
4418 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
4419 case POSTDECREMENT_EXPR>): Return the error_mark_node
4420 if either the real or imaginary parts would an
4423 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
4424 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4427 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
4428 token is a closing brace, false if there are no tokens left.
4429 (cp_parser_namespace_alias_definition): Only consume the next token if
4430 it is a closing brace.
4432 * parser.c (cp_parser_class_specifier): Likewise.
4434 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
4436 * semantics.c (finish_member_declaration): Fix a typo in the
4439 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
4451 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
4452 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
4453 * pt.c (check_for_bare_parameter_packs): Return bool indicated
4454 whether everything was okay. Fix indentation.
4455 (push_template_decl_real): Check for bare parameter packs in
4456 function parameters; where errors occur, mark the parameter types
4457 with ERROR_MARK_NODEs to avert ICEs.
4458 (coerce_template_parameter_pack): New.
4459 (coerce_template_parms): Moved parameter pack coercion into
4460 coerce_template_parameter_pack, and permit it anywhere in the
4461 template parameter list (not just at the end). Parameter and
4462 argument indices can vary (somewhat) separately now, so add
4463 PARM_IDX and ARG_IDX.
4464 (fn_type_unification): Don't set an argument pack as incomplete if
4465 no argument pack was deduced.
4466 (type_unification_real): If a type parameter is a parameter pack
4467 and has not otherwise been deduced, it will be deduced to an empty
4469 (more_specialized_fn): Use the actual lengths of the argument
4470 lists when comparing against expansions.
4471 * semantics.c (finish_member_declaration): If a field's type has
4472 bare parameter packs, error and set its type to ERROR_MARK_NODE.
4474 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
4477 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
4479 2007-05-22 Ollie Wild <aaw@google.com>
4481 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
4482 (unqualified_namespace_lookup): Adds check for hidden types.
4484 2007-05-22 Ollie Wild <aaw@google.com>
4486 * decl.c (duplicate_decls): Verify namespace names are unique.
4488 2007-05-21 Mark Mitchell <mark@codesourcery.com>
4490 * decl.c (cxx_maybe_build_cleanup): Handle
4491 __attribute__((cleanup)).
4493 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4495 * cvt.c (cp_convert_and_check): Don't check warnings if the
4498 2007-05-18 Geoffrey Keating <geoffk@apple.com>
4500 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
4502 2007-05-14 Paolo Carlini <pcarlini@suse.de>
4505 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
4506 type only if is a class type (5.2.8/4).
4508 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
4510 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
4511 * decl.c (grokdeclarator): Use unsigned_type_for instead of
4512 c_common_unsigned_type.
4514 2007-05-11 Silvius Rus <rus@google.com>
4516 * typeck.c (build_indirect_ref): Add call to
4517 strict_aliasing_warning.
4518 (build_reinterpret_cast_1): Condition call to
4519 strict_aliasing_warning.
4521 2007-05-11 Jan Hubicka <jh@suse.cz>
4523 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
4524 * decl2.c (start_objects): ctors and dtors are no longer public.
4525 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
4527 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
4529 * typeck.c (build_unary_op): Remove code that used to
4530 handle non lvalue increments/decrements.
4532 2007-05-07 Mike Stump <mrs@apple.com>
4534 * parser.c (check_empty_body): Add.
4535 (cp_parser_iteration_statement): Add call to check_empty_body.
4537 2007-05-05 Geoffrey Keating <geoffk@apple.com>
4540 * mangle.c (write_mangled_name): Mangle static variable names.
4541 (write_unqualified_name): Use local-source-name for
4542 namespace-scope static variables.
4544 2007-05-04 Dirk Mueller <dmueller@suse.de>
4546 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
4549 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
4552 * decl2.c (constrain_class_visibility):
4553 Use strip_pointer_or_array_types instead of strip_array_types.
4555 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
4558 * decl.c (reshape_init_r): Don't reshape the first element if it
4559 is a pointer to member function.
4561 2007-04-27 Simon Baldwin <simonb@google.com>
4563 * decl.c (grokparms): Changed message format from %qD to %qE.
4565 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
4567 * error.c (maybe_warn_variadic_templates): Variadic templates are
4568 now in C++0x, so only warn about them in C++98 mode.
4570 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
4573 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
4574 integeral types from vectors types.
4576 2007-04-26 Jakub Jelinek <jakub@redhat.com>
4579 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
4580 for type dependent OMP_CLAUSE_DECLs.
4582 2007-04-24 Mark Mitchell <mark@codesourcery.com>
4585 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
4586 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
4587 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
4588 * init.c (build_zero_init): Adjust, as
4589 COMPLEX_TYPE is now a SCALAR_TYPE.
4590 * typeck2.c (digest_init): Allow brace-enclosed initializers for
4591 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
4593 2007-04-25 Paolo Carlini <pcarlini@suse.de>
4595 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
4596 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
4597 (trait_expr_value): Adjust.
4599 2007-04-23 Simon Baldwin <simonb@google.com>
4601 * decl.c (grokparms): Added new error for duplicate function
4602 parameters names in function prototypes, to match gcc behavior.
4604 2007-04-23 Jan Hubicka <jh@suse.cz>
4606 * decl2.c (finish_objects): Do not call target constructor/destructor
4609 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
4611 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
4612 instead of checking GIMPLE_STMT_P in chain_next.
4614 2007-04-17 Mark Mitchell <mark@codesourcery.com>
4617 * call.c (convert_for_arg_passing): Convert bitfields to their
4620 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
4623 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
4625 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
4628 * decl2.c (constrain_class_visibility):
4629 Do not warn about the use of anonymous namespace in the main input file.
4631 2007-04-15 Mark Mitchell <mark@codesourcery.com>
4633 * cp-tree.h (current_template_parms): Fix typo in comment.
4635 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
4637 * cp-tree.h, error.c: Fix comment typos.
4639 2007-04-13 Jason Merrill <jason@redhat.com>
4642 * call.c (reference_binding): Add c_cast_p parm. If true,
4643 add quals to TO as needed to make it reference-compatible.
4645 2007-04-11 Jan Hubicka <jh@suse.cz>
4647 * class.c (convert_to_base_statically): Fold produced tree; verify
4648 that we are not processing template_decl.
4650 2007-04-09 Mark Mitchell <mark@codesourcery.com>
4653 * class.c (build_base_path): Ensure that the converted pointer has
4654 the same cv-qualification as the input.
4656 2007-04-09 Paolo Carlini <pcarlini@suse.de>
4658 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
4660 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
4662 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
4664 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
4665 * tree.c (cp_add_pending_fn_decls): Remove.
4666 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
4668 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
4670 Revert change removing staticp.
4672 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
4674 * cp-objcp-common.c (cxx_staticp): Remove.
4675 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
4676 * cp-tree.h (cxx_staticp):
4678 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
4680 * class.c (check_for_override): Don't remove dllmport attribute
4683 2007-04-03 Jakub Jelinek <jakub@redhat.com>
4686 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
4687 type issue error and return early.
4689 2007-03-30 Jason Merrill <jason@redhat.com>
4692 * typeck.c (cp_type_readonly): New fn.
4693 * cp-tree.h: Declare it.
4694 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
4695 (cp_finish_decl): Not here.
4697 2007-03-31 Richard Guenther <rguenther@suse.de>
4699 * optimize.c (maybe_clone_body): Replace splay-tree usage by
4702 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
4707 * parser.c (declarator_can_be_parameter_pack): New.
4708 (cp_parser_template_parameter): Only parse the `...' if the
4709 declarator can be a parameter pack.
4710 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
4712 * pt.c (find_parameter_packs_r): Look into the bounds on integer
4713 types (they could be used as array bounds).
4714 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
4715 (tsubst_pack_expansion): Handle failure to expand parameter
4718 2007-03-30 Paolo Carlini <pcarlini@suse.de>
4721 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
4722 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
4723 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
4724 (CLASS_TYPE_NON_UNION_P): Add.
4725 (struct lang_type_class): Add has_complex_dflt.
4726 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
4727 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
4728 * cp-tree.def: Add TRAIT_EXPR.
4729 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
4730 * lex.c (struct resword): Add __has_nothrow_assign,
4731 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
4732 __has_trivial_constructor, __has_trivial_copy,
4733 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
4734 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
4735 __is_pod, __is_polymorphic, __is_union.
4736 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
4737 (cp_parser_trait_expr): New.
4738 * semantics.c (finish_trait_expr, trait_expr_value
4739 classtype_has_nothrow_copy_or_assign_p): New.
4740 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
4742 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
4743 * class.c (check_bases, check_field_decl, check_bases_and_members):
4744 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
4745 * pt.c (uses_template_parms, tsubst_copy_and_build,
4746 value_dependent_expression_p, type_dependent_expression_p): Deal with
4748 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
4750 2007-03-29 Richard Guenther <rguenther@suse.de>
4752 * tree.c (cp_walk_subtrees): Do not set input_location.
4754 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
4757 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
4760 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
4762 * parser.c (struct cp_parser): Update comment for
4763 greater_than_is_operator_p.
4764 (cp_parser_primary_expression): In C++0x mode, a cast operator can
4765 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
4766 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
4767 !GREATER_THAN_IS_OPERATOR_P.
4768 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
4769 `>>' operators that will become two `>' tokens in C++0x.
4770 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
4771 mode, allowing it to terminate default arguments.
4772 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
4773 `>>' like two consecutive `>' tokens.
4774 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
4775 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
4776 ends a template argument.
4778 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
4780 * decl.c (redeclaration_error_message): Complain when redeclaring
4781 a friend function with default template arguments (C++0x mode only).
4782 * cp-tree.h (check_default_tmpl_args): Declare.
4783 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
4784 template arguments in function templates. Add support for checking
4785 the default template arguments of friend templates.
4786 (push_template_decl_real): Fix call to check_default_tmpl_args.
4787 (type_unification_real): If a template parameter has not been
4788 deduced but provides a default template argument, substitute into
4789 that default template argument.
4790 * parser.c (cp_parser_init_declarator): When declaring (but not
4791 defining!) a function template in C++0x mode, check for default
4794 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
4797 * decl.c (grokdeclarator): Deal with cv-qualified function type
4798 typedefs in the same way for member and non-member functions.
4800 2007-03-26 Dirk Mueller <dmueller@suse.de>
4802 * parser.c (cp_parser_member_declaration): Pedwarn
4803 about stray semicolons after member declarations.
4805 2007-03-26 Paolo Carlini <pcarlini@suse.de>
4808 * pt.c (instantiate_decl): Set in_system_header.
4810 2007-03-22 Mark Mitchell <mark@codesourcery.com>
4812 * cp-tree.h (current_tempalte_parms): Improve documentation.
4813 * pt.c (current_template_args): Likewise.
4816 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
4817 not consume tokens when failing.
4819 2007-03-22 Jim Wilson <wilson@specifix.com>
4820 Mark Mitchell <mark@codesourcery.com>
4823 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
4824 consistent with FROM.
4826 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4828 * error.c (dump_expr): Handle dependent names that designate types.
4829 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
4831 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
4833 * cp-tree.def, parser.c, pt.c: Fix comment typos.
4835 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4837 * cvt.c (cp_convert_and_check) : Define.
4838 * cp-tree.h (cp_convert_and_check): Declare.
4839 * call.c (convert_conversion_warnings): Rename to
4840 conversion_null_warnings. The warning for floating-point to
4841 integer is handled by convert_and_check in convert_like_real.
4842 (convert_like_real): convert_conversion_warnings was renamed as
4843 conversion_null_warnings.
4844 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
4845 overflow and changes of value during conversion.
4847 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4850 * parser.c (cp_parser_statement): If 'namespace' is found, this
4851 only can be a namespace alias definition, so parse it now.
4852 (cp_parser_namespace_alias_definition): if we find an open brace
4853 instead of '=', then this is actually a misplaced namespace
4856 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4859 * decl.c (cxx_init_decl_processing): Move command-line options
4860 processing to c-opts.c.
4862 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
4864 * ptree.c (cxx_print_type): Use formatting markup for integers
4865 when printing template parameter index/level/orig level.
4866 (cxx_print_xnode): Ditto.
4867 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
4868 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
4869 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
4871 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
4872 rather than a HOST_WIDE_INT.
4873 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
4874 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
4876 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
4877 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
4878 IN_BASE_INITIALIZER bool bitfields.
4879 (struct cp_declarator): Make KIND a 4-bit field. Make
4880 PARAMETER_PACK_P a bool bitfield just after KIND.
4881 * pt.c (uses_parameter_packs): Destroy the pointer set.
4882 (make_pack_expansion): Ditto.
4883 (check_for_bare_parameter_packs): Ditto.
4884 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
4886 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
4889 * call.c (convert_default_arg): Instead of copying the node,
4892 2007-03-15 Dirk Mueller <dmueller@suse.de>
4895 * call.c (convert_conversion_warnings): New..
4896 (convert_like_real): .. factored out from here.
4897 (convert_conversion_warnings): Add warning about
4898 false being converted to NULL in argument passing.
4900 2007-03-14 Dirk Mueller <dmueller@suse.de>
4902 * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
4903 (finish_do_body): Warn about empty body in do/while statement.
4905 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4907 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
4909 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4912 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
4915 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
4917 * repo.c (init_repo): Initialize random_seed saved options.
4918 (finish_repo): Adjust.
4920 2007-03-13 Mark Mitchell <mark@codesourcery.com>
4923 * Make-lang.in (doc/g++.1): Use $< to specify the location from
4926 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
4928 * decl.c (compute_array_index_type): New warning flag warn_vla.
4930 2007-03-12 Mark Mitchell <mark@codesourcery.com>
4933 * call.c (convert_default_arg): Copy non-constant arguments.
4935 2007-03-11 Mark Mitchell <mark@codesourcery.com>
4938 * parser.c (cp_parser_postfix_expression): Disallow compound
4939 literals in constant expressions.
4942 * semantics.c (finish_typeof): Use unlowered_expr_type.
4944 2007-03-10 Mark Mitchell <mark@codesourcery.com>
4947 * cp-tree.h (unlowered_expr_type): New function.
4948 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
4949 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
4950 (unlowered_expr_type): New function.
4951 (build_unary_op): Disallow predecrements of bool bitfields.
4952 * call.c (build_conditional_expr): Use unlowered_expr_type.
4953 * pt.c (type_unification_real): Likewise.
4955 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
4958 * typeck.c (check_return_expr): Check for bare parameter packs.
4959 (comptypes): Compare template parameter packs and
4960 type pack expansions.
4961 * decl.c (grokdeclarator): Deal with the declaration of function
4963 (grokparms): Verify that the (optional) function parameter pack is
4964 at the end of the parameter list.
4965 (xref_basetypes): Handle pack expansions in the base class.
4966 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
4967 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
4968 (NONTYPE_ARGUMENT_PACK): New.
4969 (TYPE_PACK_EXPANSION): New.
4970 (EXPR_PACK_EXPANSION): New.
4971 (ARGUMENT_PACK_SELECT): New.
4972 * cp-objcp-common.c (cp_tree_size): Compute size of
4973 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
4974 ARGUMENT_PACK_SELECT.
4975 * error.c (dump_template_argument): Print template argument packs.
4976 (dump_template_argument_list): Ditto.
4977 (dump_template_parameter): Dump `...' for template type parameter
4979 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
4980 (dump_parameters): Print function parameter packs.
4981 (dump_template_parms): Print template argument packs.
4982 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
4983 (maybe_warn_variadic_templates): New.
4984 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
4985 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
4986 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
4988 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
4989 (write_template_arg): Write argument packs as separate arguments.
4990 * cp-tree.h (struct template_parm_index_s): Add flag that
4991 indicates that the template parameter is actually a parameter
4993 (struct tree_argument_pack_select): New.
4994 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
4995 (union lang_tree_node): Add argument_pack_select.
4996 (FUNCTION_PARAMETER_PACK_P): New.
4997 (PACK_EXPANSION_P): New.
4998 (PACK_EXPANSION_PATTERN): New.
4999 (SET_PACK_EXPANSION_PATTERN): New.
5000 (PACK_EXPANSION_PARAMETER_PACKS): New.
5001 (ARGUMENT_PACK_P): New.
5002 (ARGUMENT_PACK_ARGS): New.
5003 (SET_ARGUMENT_PACK_ARGS): New.
5004 (ARGUMENT_PACK_INCOMPLETE_P): New.
5005 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
5006 (TEMPLATE_PARM_PARAMETER_PACK): New.
5007 (TEMPLATE_TYPE_PARAMETER_PACK): New.
5008 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
5009 (ARGUMENT_PACK_SELECT_INDEX): New.
5010 (ARGUMENT_PACK_SELECT_ARG): New.
5011 (struct cp_declarator): Add parameter_pack_p flag.
5012 (maybe_warn_variadic_templates): Declare.
5013 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
5014 indicate a template parameter pack.
5015 (uses_parameter_packs): Declare.
5016 (template_parameter_pack_p): Declare.
5017 (template_parms_variadic_p): Declare.
5018 (make_pack_expansion): Declare.
5019 (check_for_bare_parameter_packs): Declare.
5020 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
5021 sizeof... expressions.
5022 (pp_cxx_expression): Print pack expansions and non-type argument
5024 (pp_cxx_exception_specification): Print pack expansions.
5025 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
5026 (pp_cxx_ctor_initializer): Print pack expansions.
5027 (pp_cxx_type_id): Print pack expansions.
5028 (pp_cxx_template_argument_list): Print argument packs.
5029 (pp_cxx_template_parameter): Print ellipsis for template parameter
5031 * pt.c (comp_template_parms): Compare template parameter packs.
5032 (template_parameter_pack_p): New.
5033 (template_parms_variadic_p): New.
5034 (template_args_variadic_p): New.
5035 (make_ith_pack_parameter_name): New.
5036 (struct find_parameter_pack_data): New.
5037 (find_parameter_packs_r): New.
5038 (uses_parameter_packs): New.
5039 (make_pack_expansion): New.
5040 (check_for_bare_parameter_packs): New.
5041 (expand_template_argument_pack): New.
5042 (reduce_template_parm_level): Propagate parameter pack flag.
5043 (process_template_parm): Add is_parameter_pack parameter to state
5044 when the parameter is actually a parameter pack. Create template
5045 parameter packs when is_parameter_pack is true.
5046 (current_template_args): The argument for a template parameter
5047 pack is an argument pack containing a single pack expansion.
5048 (process_partial_specialization): When checking that non-type
5049 argument expressions do not involve template parameters, loop over
5050 the arguments in argument packs separately.
5051 (push_template_decl_real): Check that the type of the declaration
5052 does not have any bare parameter packs. Check that primary
5053 templates have no more than one parameter pack, and that it comes
5054 at the end of the template parameter list.
5055 (convert_template_argument): Handle coercions for pack expansion
5056 expressions by coercing the pattern then rebuilding the expansion.
5057 (coerce_template_parms): When coercing the arguments for a
5058 variadic template, pack "extra" arguments into an argument pack.
5059 (coerce_template_template_parms): Cannot coerce between parameter
5060 packs and non-pack parameters.
5061 (template_args_equal): Compare PACK_EXPANSION_P expressions.
5062 (comp_template_args): Expand all template arguments packs before
5063 comparing template argument lists.
5064 (mangle_class_name_for_template): Make argument packs as separate
5066 (for_each_template_parm_r): No need to handle BASELINK.
5067 (instantiate_class_template): Handle pack expansions in the base
5069 (tsubst_pack_expansion): New.
5070 (tsubst_template_args): Handle substitutions of argument packs and
5071 pack expansion into template argument lists.
5072 (tsubst_decl): Expand function parameter packs into separate
5073 function parameters.
5074 (tsubst_arg_types): Expand a type pack expansion into separate
5076 (tsubst_exception_specification): Handle pack expansions in
5077 exception specifiers.
5078 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
5079 replacing a template parameter with its argument. If we encounter
5080 a substitution for an argument pack, just return the parameter
5082 (tsubst_copy): sizeof(X...) returns the number of elements in
5083 parameter pack X. See through ARGUMENT_PACK_SELECT when the
5084 PARM_DECL is a parameter pack.
5085 (tsubst_expr): Expression pack expansions and argument packs
5086 cannot show up here; they will all be handled through function
5087 calls, sizeof, and template argument lists.
5088 (tsubst_copy_and_build): sizeof(X...) returns the number of
5089 elements in parameter pack X. Handle pack expansions in TREE_LIST
5090 and CONSTRUCTOR nodes.
5091 (fn_type_unification): Handle "incomplete" explicit template
5092 argument lists that specify some of the arguments for a template
5094 (type_unification_real): Unify arguments against pack expansions.
5095 (template_parm_level_and_index): New, helper function.
5096 (unify_pack_expansion): New.
5097 (unify): Unify argument packs on an argument-by-argument basis,
5098 handling variadic argument packs as well.
5099 (more_specialized_fn): Handle unification of function parameter
5100 packs. All things being equal, prefer non-variadic function
5101 templates to variadic function templates.
5102 (more_specialized_class): Prefer the variadic class template
5103 partial specialization that binds fewer arguments to a parameter
5105 (regenerate_decl_from_template): Expand function parameter packs
5106 into separate parameters.
5107 (instantiate_decl): Ditto.
5108 (tsubst_initializer_list): Handle pack expansions for base-class
5110 (dependent_type_p_r): Determine dependent types in argument packs
5111 and pack expansions.
5112 (value_dependent_expression_p): Determine value-dependence of
5113 non-type argument packs.
5114 (dependent_template_arg_p): Handle argument packs.
5115 * semantics.c (finish_cond): Check for bare parameter packs.
5116 (finish_expr_stmt): Ditto.
5117 (finish_for_expr): Ditto.
5118 (finish_switch_cond): Ditto.
5119 (finish_mem_initializers): Ditto.
5120 * name-lookup.c (arg_assoc_type): Handle pack expansions and
5122 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
5123 * parser.c (make_declarator): Declarator is not an expansion.
5124 (make_pointer_declarator): Transfer parameter pack flag to outer
5126 (make_reference_declarator): Ditto.
5127 (make_ptrmem_declarator): Ditto.
5128 (make_call_declarator): Ditto.
5129 (make_array_declarator): Ditto.
5130 (cp_parser_postfix_expression): Allow pack expansion expressions
5131 in the argument list for a call expression.
5132 (cp_parser_parenthesized_expression_list): Add new parameter
5133 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
5134 into separate arguments."
5135 (cp_parser_new_placement): Allow pack expansion expressions.
5136 (cp_parser_new_initializer): Ditto.
5137 (cp_parser_mem_initializer_list): Allow ellipsis to create a
5138 base-class initializer expansion.
5139 (cp_parser_mem_initializer): Ditto.
5140 (cp_parser_template_parameter_list): Keep track of whether the
5141 template parameter is a template parameter pack.
5142 (cp_parser_template_parameter): Parse the ellipsis to indicate a
5143 template parameter pack.
5144 (cp_parser_type_parameter): Ditto.
5145 (cp_parser_template_argument_list): Parse the ellipsis to indicate
5147 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
5148 this declarator is a parameter pack.
5149 (cp_parser_parameter_declaration): The ellipsis does not end the
5150 parameter declaration, because it might be a parameter pack. Parse
5151 the ellipsis to indicate a parameter pack.
5152 (cp_parser_initializer): Allow pack expansions.
5153 (cp_parser_initializer_list): Allow ellipsis to create an
5154 initializer expansion.
5155 (cp_parser_base_clause): Allow ellipsis to create a base specifier
5157 (cp_parser_type_id_list): Allow ellipsis to create an exception
5158 specifier expansion.
5159 (cp_parser_attribute_list): Don't allow pack expansions.
5160 (cp_parser_functional_cast): Allow pack expansions.
5161 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
5162 compute the length of a parameter pack.
5163 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
5164 end a template argument.
5165 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
5166 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
5169 2007-03-09 Dirk Mueller <dmueller@suse.de>
5171 * call.c (build_new_op): Call warn_logical_operator.
5173 2007-03-08 Volker Reichelt <v.reichelt@netcologne.de>
5176 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
5179 * pt.c (any_template_arguments_need_structural_equality_p):
5182 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
5184 * decl.c (grokdeclarator): Disable warnings for anonymous
5187 2007-03-05 Volker Reichelt <v.reichelt@netcologne.de>
5189 * typeck2.c (readonly_error): Always emit a hard error.
5190 Remove last argument.
5191 * cp-tree.h (readonly_error): Adjust prototype.
5192 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
5193 * typeck.c (build_unary_op): Likewise.
5194 (build_modify_expr): Likewise.
5196 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
5199 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
5201 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5204 * parser.c (struct cp_parser): New IN_IF_STMT.
5205 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
5206 returning if parsing the body of an 'if' statement or issuing an
5207 error and continuing.
5208 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
5210 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
5212 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
5215 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
5218 2007-03-02 Geoffrey Keating <geoffk@apple.com>
5220 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
5221 Objective-C++. Don't exit early if -shared-libgcc needs to be
5224 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5226 * typeck.c (common_base_type): Delete unused function.
5228 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
5230 * Make-lang.in: Add dummy lang.install-pdf target.
5232 2007-03-01 Simon Baldwin <simonb@google.com>
5235 * decl.c (check_tag_decl): Added new warning for typedef ignored
5236 when it precedes an otherwise valid non-typedef declaration.
5238 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
5240 * typeck.c (build_function_call): Store converted arguments
5241 in a stack-allocated array instead of building a list.
5242 (convert_arguments): Store arguments in the array passed in as an
5243 argument, and return the actual number of arguments.
5244 * call.c (build_call): Delete, and replace with...
5245 (build_call_n, build_call_a): New.
5246 (build_op_delete_call): Rewrite to avoid constructing argument lists.
5247 (build_over_call): Store converted arguments in a stack-allocated
5248 array instead of building a list.
5249 (build_cxx_call): Pass arguments in an array instead of as a list.
5250 (build_java_interface_fn_ref): Rewrite to avoid constructing
5252 * tree.h: Update declarations to reflect above changes.
5253 * method.c (use_thunk): Use a stack-allocated array to hold
5254 the arguments instead of a list.
5255 * rtti.c (throw_bad_cast): Update call to cxx_call.
5256 (throw_bad_typeid): Likewise.
5257 (build_dynamic_cast_1): Likewise.
5258 * init.c (build_builtin_delete_call): Use build_call_n.
5259 * decl.c (expand_static_init): Likewise.
5260 * except.c (cp_protect_cleanup_actions): Likewise.
5261 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
5262 (gimplify_must_not_throw_expr): Likewise.
5263 (cxx_omp_apply_fn): Use build_call_a.
5265 2007-02-26 Mark Mitchell <mark@codesourcery.com>
5267 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
5268 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
5270 2007-02-25 Mark Mitchell <mark@codesourcery.com>
5272 * cp-tree.h (static_ctors): Remove.
5273 * cp-tree.h (static_dtors): Likewise.
5274 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
5275 refactoring of tree_map hierarchy.
5276 (decl_shadowed_for_var_insert): Likewise.
5277 * semantics.c (expand_body): Use c_expand_body.
5278 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
5279 * decl2.c (static_ctors): Remove.
5280 (static_dtors): Likewise.
5281 (generate_ctor_or_dtor_function): Pass NULL_TREE to
5282 objc_generate_static_init_call. Do not call static_[cd]tors.
5283 (generate_ctor_and_dtor_functions_for_priority): Do not check for
5285 (cp_write_global_declarations): Likewise.
5287 2007-02-23 Richard Guenther <rguenther@suse.de>
5289 * class.c (note_name_declared_in_class): Make declaration
5290 changes meaning a pedwarn.
5292 2007-02-22 Michael Matz <matz@suse.de>
5295 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
5296 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
5297 dump_function_decl): Guard emitting outer scopes by new flag.
5298 * cp-lang.c (cxx_dwarf_name): New function.
5299 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
5300 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
5302 (push_template_decl_real, lookup_template_class): Remove calls
5305 2007-02-19 Mark Mitchell <mark@codesourcery.com>
5307 * call.c (build_new_method_call): Ensure that explicit calls of
5308 destructors have type "void".
5310 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5312 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
5313 and -Walways-true with -Waddress.
5314 * cvt.c (convert_to_void): Replace unconditional warning with
5317 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
5319 * decl.c, tree.c: Fix comment typos.
5321 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
5324 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
5325 statement expression if we had an error mark node.
5327 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
5328 Brooks Moses <brooks.moses@codesourcery.com>
5329 Lee Millward <lee.millward@codesourcery.com>
5331 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
5332 Change class to tcc_vl_exp.
5334 * call.c (build_call): Use build_call_list instead
5336 (build_over_call): Likewise.
5337 (build_new_method_call): Use build_min_non_dep_call_list
5338 instead of build_min_non_dep.
5340 * error.c (dump_call_expr_args): New function.
5341 (dump_aggr_init_expr_args): New function.
5342 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
5343 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
5345 * cvt.c (convert_to_void): Use build_call_array instead
5346 of build3; use new AGGR_INIT_EXPR accessor macros.
5348 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
5349 instead of TREE_CODE_LENGTH.
5351 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
5352 AGGR_INIT_EXPR accessor macros.
5354 * cp-gimplify.c (cp_gimplify_init_expr): Use
5355 AGGR_INIT_EXPR_SLOT to set the slot operand.
5357 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
5358 (AGGR_INIT_EXPR_SLOT): New macro.
5359 (AGGR_INIT_EXPR_ARG): New macro.
5360 (aggr_init_expr_nargs): New macro.
5361 (AGGR_INIT_EXPR_ARGP): New macro.
5362 (aggr_init_expr_arg_iterator): New.
5363 (init_aggr_init_expr_arg_iterator): New.
5364 (next_aggr_init_expr_arg): New.
5365 (first_aggr_init_expr_arg): New.
5366 (more_aggr_init_expr_args_p): New.
5367 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
5368 (stabilize_aggr_init): New declaration.
5369 (build_min_non_dep_call_list): Likewise.
5371 * tree.c (process_aggr_init_operands): New function.
5372 (build_aggr_init_array) New function.
5373 (build_cplus_new): Update to use new CALL_EXPR and
5374 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
5375 build_aggr_init_array.
5376 (build_min_non_dep_call_list) New function.
5377 (build_min_nt): Assert input code parameter is not a variable
5378 length expression class.
5379 (build_min, build_min_non_dep): Likewise.
5380 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
5381 to check for equality instead of recursing. Handle tcc_vl_exp
5383 (stabilize_call): Update to only handle CALL_EXPRs, not
5384 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
5385 (stabilize_aggr_init): New function.
5386 (stabilize_init): Use it.
5388 * cxx-pretty-print.c (pp_cxx_postfix_expression)
5389 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
5390 AGGR_INIT_EXPR accessor macros and argument iterators.
5392 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
5393 build_vl_exp. Iterate through the operands, recursively
5394 processing each one.
5395 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
5396 CALL_EXPR accessor macros.
5397 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
5398 tree code classes. Use TREE_OPERAND_LENGTH instead of
5401 * semantics.c (finish_call_expr): Use build_nt_call_list
5402 instead of build_nt.
5403 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
5404 accessor macros. Use build_call_array to construct the
5405 CALL_EXPR node instead of build3
5407 * decl2.c (build_offset_ref_call_from_tree): Use
5408 build_nt_call_list and build_min_non_dep_call_list instead
5409 of build_min_nt and build_min_non_dep.
5411 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
5412 Use build_nt_call_list instead of build_min_nt.
5414 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5417 * call.c (build_conditional_expr): Improve error message.
5419 2007-02-13 Dirk Mueller <dmueller@suse.de>
5421 * friend.c (do_friend): Annotate warning about friend
5422 declarations in templates with OPT_Wnon_template_friend.
5423 Convert informal message from warning() to inform().
5425 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
5426 Mark Mitchell <mark@codesourcery.com>
5429 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
5430 instantiations for variables.
5432 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5435 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
5436 Check warn_unused_value just once.
5438 2007-02-11 Mark Mitchell <mark@codesourcery.com>
5441 * pt.c (determine_specialization): Use skip_artificial_parms_for.
5442 (fn_type_unificiation): Likewise.
5443 (get_bindings): Likewise.
5445 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
5448 * decl.c (finish_function): Use DECL_REPLACEABLE.
5449 * tree.c (cp_cannot_inline_tree_fn): Likewise.
5451 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
5453 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
5455 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
5457 * decl.c (grokvardecl): Don't error if !have_tls.
5458 (grokdeclarator): Likewise.
5459 * parser.c (cp_parser_omp_threadprivate): Likewise.
5461 2007-02-07 Jakub Jelinek <jakub@redhat.com>
5464 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
5465 parameters and result decls in omp clauses.
5466 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
5469 2007-02-05 Dirk Mueller <dmueller@suse.de>
5472 * parser.c (cp_parser_class_specifier): Always initialize bases.
5474 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
5476 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
5477 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
5478 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
5480 * semantics.c (finish_omp_atomic): Store a whole expression node
5481 in operand 1, and integer_zero_node in operand 0, for dependent
5482 OMP_ATOMIC. Rewrite to make flow easier to understand.
5484 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5486 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
5488 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
5490 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
5491 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
5493 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
5495 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
5496 keyword warning to -Wc++0x-compat.
5498 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5500 * decl.c (grokdeclarator): Update documentation.
5502 2007-02-02 Jakub Jelinek <jakub@redhat.com>
5505 * decl.c (grokdeclarator): If __thread is used together with
5506 a storage class other than extern and static, clear thread_p
5507 after issuing diagnostics and fall through to checking the
5510 2007-01-30 Roger Sayle <roger@eyesopen.com>
5512 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
5513 calculating the size of an array (to avoid recursive errors).
5515 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5518 * typeck.c (build_binary_op): Fix logic for warning. Move warning
5520 * call.c (convert_like_real): Don't warn when converting to
5523 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5525 * decl.c (pop_label): Replace warning with call to
5526 warn_for_unused_label.
5528 2007-01-28 Andrew Pinski <pinskia@gmail.com>
5531 * semantics.c (finish_pseudo_destructor_expr): Check the
5532 destrutor name by calling check_dtor_name.
5534 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
5536 * lex.c (D_CPP0X): Rename.
5538 (reswords): D_CPP0X -> D_CXX0X.
5539 (init_reswords): Ditto.
5540 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
5541 of C++0x keywords as identifiers.
5543 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
5546 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
5549 2007-01-23 Ian Lance Taylor <iant@google.com>
5551 * typeck.c (convert_for_assignment): Only warn about a = b = c
5552 when converting to bool.
5554 2007-01-23 Roger Sayle <roger@eyesopen.com>
5556 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
5558 * typeck.c (ignore_overflows): Remove the remaining uses of
5559 TREE_CONSTANT_OVERFLOW.
5561 2007-01-20 Jan Hubicka <jh@suse.cz>
5563 * decl2.c (start_objects, start_static_storage_duration_function):
5564 Do not make the functions uninlinable.
5566 2007-01-17 Ian Lance Taylor <iant@google.com>
5568 * class.c (add_method): Call VEC_reserve_exact rather than passing
5569 a negative size to VEC_reserve.
5571 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
5574 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
5576 2007-01-10 Mark Mitchell <mark@codesourcery.com>
5579 * decl.c (make_typename_type): If the qualified name is not a
5580 type, issue an error.
5581 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
5584 2007-01-08 Geoffrey Keating <geoffk@apple.com>
5586 * rtti.c: Include target.h.
5587 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
5588 don't emit typeinfo for fundamental types as weak.
5589 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
5591 2007-01-08 Richard Guenther <rguenther@suse.de>
5593 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
5595 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
5597 * call.c (standard_conversion): Pass flag to
5598 vector_types_convertible_p to disallow emission of note.
5599 * typeck.c (convert_for_assignment): Pass flag to
5600 vector_types_convertible_p to allow emission of note.
5601 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
5602 to disallow emission of note.
5604 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5607 * typeck.c (build_binary_op): Call overflow_warning if
5608 TREE_OVERFLOW_P is true for the result and not for any of the
5611 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
5614 * class.c (add_method): Don't wait until template
5615 instantiation time to complain about duplicate methods.
5617 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5620 * semantics.c (finish_unary_op_expr): Warn only if result
5621 overflowed and operands did not.
5623 2007-01-05 Ian Lance Taylor <iant@google.com>
5625 * typeck.c (build_binary_op): Warn about comparing a non-weak
5628 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
5630 * pt.c (tsubst): Propagate the need for structural equality checks
5631 when reducing the level of template parameters.
5633 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
5635 * pt.c: Fix a comment typo.
5637 2007-01-02 Ian Lance Taylor <iant@google.com>
5639 * semantics.c (maybe_convert_cond): Optionally warn when using an
5640 assignment as a condition.
5641 * typeck.c (convert_for_assignment): Optionally warn about
5642 assigning the result of an assignment to a bool.
5644 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
5646 * pt.c (canonical_template_parms): Correct typo in comment.
5648 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
5650 * typeck.c (structural_comptypes): Renamed from "comptypes".
5651 (comptypes): Use canonical type information to perform fast type
5652 comparison. When VERIFY_CANONICAL_TYPES, verify that the
5653 canonical type comparison returns the same results as we would see
5654 from the current, structural check. Support COMPARE_STRUCTURAL
5655 when we need structural checks.
5656 * decl.c (typename_compare): Fix comment.
5657 (build_typename_type): TYPENAME_TYPE nodes require structural
5658 equality checks, because they resolve different based on the
5660 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
5661 require structural equality checks (for now).
5662 (build_ptrmemfunc_type): Build the canonical pointer to member
5664 (compute_array_index_type): Whenever we build a new index type
5665 to represent the size of an array in a template, we need to mark
5666 this index type as requiring structural equality. This goes for
5667 arrays with value-dependent sizes with the current ABI, or all
5669 * tree.c (cplus_array_hash): New.
5670 (struct cplus_array_info): New.
5671 (cplus_array_compare): New.
5672 (cplus_array_htab): New.
5673 (build_cplus_array_type_1): Use a hash table to cache the array
5674 types we build. Build the canonical array type for each array
5676 (cp_build_qualified_type_real): When building a cv-qualified array
5677 type, use the hash table of array types and build canonical array
5679 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
5680 use structural equality (for now).
5681 * cp-tree.h (COMPARE_STRUCTURAL): New.
5682 * pt.c (canonical_template_parms): New.
5683 (canonical_type_parameter): New.
5684 (process_template_parm): Find the canonical type parameter.
5685 (lookup_template_class): When we have named the primary template
5686 type, set the canonical type for our template class to the primary
5687 template type. If any of the template arguments need structural
5688 equality checks, the template class needs structural equality
5690 (tsubst): When reducing the level of a template template
5691 parameter, we require structural equality tests for the resulting
5692 parameter because its template parameters have not had their types
5693 canonicalized. When reducing a template type parameter, find the
5694 canonical reduced type parameter.
5695 (any_template_arguments_need_structural_equality_p): New.