./:
[official-gcc.git] / gcc / cp / ChangeLog
blobac33477482d56d1bba6f4eb28f38ee141108d153
1 2008-07-11  Tom Tromey  <tromey@redhat.com>
2             Ian Lance Taylor  <iant@google.com>
4         * lex.c (struct resword, reswords): Don't define.
5         (D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
6         (init_reswords): Clarify mask code.  Use c_common_reswords rather
7         than reswords.
9 2008-07-11  Dodji Seketeli  <dseketel@redhat.com>
11         PR c++/13101
12         * decl.c (grokdeclarator): Warn about initializing variables
13           of storage class 'extern' only after the type of the declarator
14           has been properly computed.
16 2008-07-11  Dodji Seketeli  <dseketel@redhat.com>
18         PR c++/31754
19         * cp-tree.h (struct cp_decl_specifier_seq): add a location field. It
20         carries the location of the primary type.
21         * parser.c (cp_parser_check_type_definition): update documentation.
22         (cp_parser_check_for_definition_in_return_type,
23         cp_parser_check_for_invalid_template_id,
24         cp_parser_set_decl_spec_type,
25         cp_parser_check_for_definition_in_return_type,
26         cp_parser_diagnose_invalid_type_name,
27         cp_parser_new_expression, cp_parser_explicit_instantiation,
28         cp_parser_type_specifier, cp_parser_simple_type_specifier,
29         cp_parser_omp_for_loop, cp_parser_pragma): use location in error messages.
32 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
34         PR c++/31754
35         * pt.c, semantic.c:
36         * semantic.c (qualified_name_lookup_error, finish_id_expression):
37         add a location_t parameter so that
38         error message can have a more accurate location.
39         * cp-tree.h: updated prototype
40         * pt.c (tsubst_qualified_id): use location in error messages.
41         * parser.c (cp_parser_postfix_expression,
42         cp_parser_objc_statement, cp_parser_trait_expr,
43         cp_parser_token_is_class_key,
44         cp_parser_uncommitted_to_tentative_parse_p,
45         cp_parser_check_for_invalid_template_id, cp_parser_is_string_literal,
46         cp_parser_error, cp_parser_name_lookup_error,
47         cp_parser_simulate_error, cp_parser_check_decl_spec,
48         cp_parser_check_decl_spec, cp_parser_non_integral_constant_expression,
49         cp_parser_diagnose_invalid_type_name,
50         cp_parser_parse_and_diagnose_invalid_type_name,
51         cp_parser_require_pragma_eol, cp_parser_make_typename_type,
52         cp_parser_string_literal, cp_parser_primary_expression,
53         cp_parser_primary_expression, cp_parser_unqualified_id,
54         cp_parser_nested_name_specifier_opt, cp_parser_postfix_expression,
55         cp_parser_postfix_dot_deref_expression, cp_parser_new_expression,
56         cp_parser_direct_new_declarator, cp_parser_builtin_offsetof,
57         cp_parser_label_for_labeled_statement, cp_parser_statement_seq_opt,
58         cp_parser_jump_statement, cp_parser_block_declaration,
59         cp_parser_simple_declaration, cp_parser_decl_specifier_seq,
60         cp_parser_function_specifier_opt, cp_parser_decltype,
61         cp_parser_mem_initializer_list, cp_parser_mem_initializer,
62         cp_parser_mem_initializer_id, cp_parser_template_parameter,
63         cp_parser_type_parameter, cp_parser_template_id, cp_parser_template_name,
64         cp_parser_template_argument): likewise.
66 2008-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
68         PR c++/36760
69         * pt.c (tsubst_function_type): Remove warning for type qualifiers
70         on function return type.
72 2008-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
74         PR c++/36760
75         * pt.c (tsubst_function_type): Don't warn for type qualifiers
76         on function return type in case of system header.
78 2008-07-09  Raksit Ashok <raksit@google.com>
80         * parser.c (cp_parser_postfix_expression): New warning based on flag
81         warn_disallowed_functions.
83 2008-07-08  Simon Martin  <simartin@users.sourceforge.net>
85         PR c++/34963
86         * decl.c (grokdeclarator): Reset storage_class and staticp for friend
87         functions declared with a storage class qualifier.
89 2008-07-03  Richard Guenther  <rguenther@suse.de>
91         PR c++/36128
92         * typeck.c (cp_build_function_call): Move code to verify
93         builtin function arguments ...
94         * call.c (build_cxx_call): ... here.
96 2008-07-02  Jason Merrill  <jason@redhat.com>
98         * Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
100         Implement WG21 N2672, Initializer List proposed wording
101         * cp-tree.h (enum cp_tree_index): Add CPTI_INIT_LIST_TYPE.
102         (struct lang_type_class): Add has_list_ctor bitfield.
103         (TYPE_HAS_LIST_CTOR): New macro.
104         (BRACE_ENCLOSED_INITIALIZER_P): Expect init_list_type_node.
105         (CONSTRUCTOR_IS_DIRECT_INIT): New macro.
106         (LOOKUP_NO_NARROWING): New macro.
107         (LOOKUP_NO_COPY_CTOR_CONVERSION): New macro.
108         * parser.c (cp_parse_braced_list): Split out from...
109         (cp_parser_initializer_clause): ...here.
110         (cp_parser_postfix_expression): Build up CONSTRUCTOR for compound 
111         literal here.
112         (cp_lexer_next_token_is_not_keyword): New fn.
113         (cp_parser_parenthesized_expression_list): Handle { }.
114         (cp_parser_new_expression, cp_parser_new_initializer): Likewise.
115         (cp_parser_assignment_expression, cp_parser_condition): Likewise.
116         (cp_parser_jump_statement, cp_parser_simple_declaration): Likewise.
117         (cp_parser_mem_initializer, cp_parser_init_declarator): Likewise.
118         (cp_parser_initializer, cp_parser_functional_cast): Likewise.
119         (cp_parser_omp_for_loop, cp_parser_cache_group): Likewise.
120         (cp_parser_save_member_function_body): Likewise.
121         * call.c (conversion_kind): Add ck_list, ck_aggr.
122         (struct conversion): Add check_narrowing bitfield, conversion list.
123         (build_list_conv): New fn.
124         (build_aggr_conv): New fn.
125         (implicit_conversion): Call them.
126         (standard_conversion): Set check_narrowing if appropriate.
127         (add_function_candidate): Handle LOOKUP_NO_COPY_CTOR_CONVERSION.
128         (build_user_type_conversion_1): When converting from an init list,
129         we allow additional conversions except when calling a copy ctor.
130         (convert_like_real): Calling an explicit ctor for an init list is 
131         ill-formed.  Handle ck_list and ck_addr.  Check narrowing.
132         (build_new_method_call): If CONSTRUCTOR_IS_DIRECT_INIT is set and
133         class doesn't have a list ctor, break the {} into a TREE_LIST.
134         (compare_ics): ck_list is better than other UDCs.
135         (set_up_extended_ref_temp): Split out from initialize_reference.
136         (is_std_init_list): New fn.
137         (is_list_ctor): New fn.
138         * decl.c (cxx_init_decl_processing): Create init_list_type_node.
139         (reshape_init_array_1): Pass it to build_constructor.
140         (reshape_init_class): Ditto.
141         (initialize_artificial_var): Pass the appropriate type.
142         (build_aggr_init_full_exprs): Split out from...
143         (check_initializer): ...here.  Handle new semantics.
144         (build_init_list_var_init): New subroutine of check_initializer.
145         (grokdeclarator): Converting constructors can have more than one parm.
146         (grok_special_member_properties): Set TYPE_HAS_LIST_CTOR.
147         * init.c (expand_default_init): Only do digest_init for aggregates.
148         * rtti.c (tinfo_base_init): Pass init_list_type_node to 
149         build_constructor_from_list.
150         (generic_initializer, ptr_initializer): Ditto.
151         (ptm_initializer, class_initializer): Ditto.
152         (get_pseudo_ti_init): Ditto.
153         * error.c (dump_type): Handle init_list_type_node.
154         (maybe_warn_cpp0x): New fn.
155         (maybe_varn_variadic_templates): Call it.
156         * cvt.c (ocp_convert): Handle conversion from { }.
157         * tree.c (build_array_of_n_type): New fn.
158         * typeck2.c (store_init_value): Use init_list_type_node.
159         (digest_init): Likewise.
160         (check_narrowing): New fn.
161         * semantics.c: (finish_compound_literal): Take CONSTRUCTOR instead 
162         of vector of constructor elts.  Handle non-aggregate types.  Make
163         constant literals static.
164         * pt.c: (tsubst_copy_and_build): Adjust.
165         (unify): Handle { }.
166         * name-lookup.c (arg_assoc_type): Handle init_list_type_node.
168 2008-07-01  Daniel Jacobowitz  <dan@codesourcery.com>
170         * typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
171         (comp_ptr_ttypes_const): Likewise.
173 2008-07-01  Andrew Haley  <aph@redhat.com>
175         * decl.c (finish_constructor_body): Don't set the return value of
176         the constructor if the constructor is that of a Java type.
178 2008-06-30  Jakub Jelinek  <jakub@redhat.com>
180         PR c++/36662
181         * decl2.c (is_late_template_attribute): If the first attribute
182         argument is IDENTIFIER_NODE, don't consider it when checking
183         if arguments are value or type dependent.
185 2008-06-29  Paolo Carlini  <paolo.carlini@oracle.com>
187         PR c++/36655
188         * pt.c (do_type_instantiation): In c++0x mode do not warn for
189         extern template.
191 2008-06-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
193         * Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
195 2008-06-28  Jakub Jelinek  <jakub@redhat.com>
197         PR c++/36364
198         * repo.c (repo_emit_p): Put const static data members initialized
199         by const expr into *.rpo file, just return 2 if IDENTIFIER_REPO_CHOSEN
200         for it is 0.
202 2008-06-27  Paolo Carlini  <paolo.carlini@oracle.com>
204         PR c++/36655
205         * pt.c (do_decl_instantiation): In c++0x mode do not warn for
206         extern template.
208 2008-06-24  Jonathan Wakely  <jwakely.gcc@gmail.com>
210         PR c++/23194
211         * typeck.c (cp_build_function_call): Show example syntax in
212         diagnostic.
214 2008-06-21  Jonathan Wakely  <jwakely.gcc@gmail.com>
216         * typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
217         cxx_alignof_expr, check_template_keyword, cp_build_binary_op,
218         pointer_diff, cp_build_unary_op, build_x_compound_expr_from_list,
219         build_reinterpret_cast_1, cp_build_c_cast, check_return_expr): Change
220         pedwarn to permerror.
221         * init.c (perform_member_init, build_new_1, build_new): Likewise.
222         * decl.c (warn_extern_redeclared_static, duplicate_decls,
223         * identify_goto, check_previous_goto_1, check_goto, define_label,
224         check_tag_decl, start_decl, check_class_member_definition_namespace,
225         grokfndecl, grokdeclarator): Likewise.
226         * except.c (check_handlers): Likewise.
227         * typeck2.c (digest_init): Likewise.
228         * pt.c (check_specialization_namespace,
229         check_explicit_instantiation_namespace,
230         maybe_process_partial_specialization, check_explicit_specialization,
231         convert_template_argument, do_decl_instantiation,
232         do_type_instantiation, instantiate_decl): Likewise.
233         * semantics.c (finish_template_type_parm): Likewise.
234         * name-lookup.c (pushdecl_maybe_friend,
235         check_for_out_of_scope_variable): Likewise.
236         * decl2.c (finish_static_data_member_decl, build_anon_union_vars,
237         coerce_new_type): Likewise.
238         * parser.c (cp_parser_nested_name_specifier_opt,
239         cp_parser_mem_initializer, cp_parser_elaborated_type_specifier,
240         cp_parser_class_head, cp_parser_check_class_key): Likewise.
241         (cp_parser_parameter_declaration): Check flag_permissive instead of
242         flag_pedantic_errors.
243         * call.c (joust): Change pedwarn to warning.
244         * friend.c (make_friend_class): Likewise.
246 2008-06-16  Jan Hubicka  <jh@suse.cz>
248         * method.c: Include cgraph.h.
249         (use_thunk): Use cgraph_add_new_function instead of calling backend
250         directly.
252 2008-06-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
254         * parser.c: Fix comment typo.
256 2008-06-14  Simon Martin  <simartin@users.sourceforge.net>
258         PR c++/35320
259         * decl2.c (grokbitfield): Receive the list of attributes, pass it to
260         grokdeclarator and apply it to the created declaration.
261         * cp-tree.h (grokbitfield): Update prototype.
262         * parser.c (cp_parser_member_declaration): Don't apply the attributes
263         since they are now applied in grokbitfield. Adjusted the call to
264         grokbitfield.
265         (cp_parser_objc_class_ivars): Likewise.
267 2008-06-14  Simon Martin  <simartin@users.sourceforge.net>
269         PR c++/35317
270         * class.c (type_requires_array_cookie): Do not consider delete[]
271         operators with an ellipsis as second argument.
273 2008-06-09  Jakub Jelinek  <jakub@redhat.com>
275         PR c++/36408
276         * semantics.c (stmt_expr_value_expr): Don't crash on empty
277         STATEMENT_LIST.
279 2008-06-08  Paolo Carlini  <paolo.carlini@oracle.com>
281         PR c++/35242
282         * pt.c (maybe_process_partial_specialization): Check the tree
283         returned by push_template_decl for error_mark_node.
284         * parser.c (cp_parser_class_head): Likewise, check the tree
285         returned by the latter. 
287 2008-06-07  Paolo Carlini  <paolo.carlini@oracle.com>
289         PR c++/35327
290         * decl.c (grokdeclarator): In case of wrong return type return
291         immediately error_mark_node.
293 2008-06-06  Jakub Jelinek  <jakub@redhat.com>
295         * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
296         dependent_omp_for_p, begin_omp_task, finish_omp_task,
297         finish_omp_taskwait): New prototypes.
298         (cxx_omp_clause_default_ctor): Add outer argument.
299         (finish_omp_for): Add new clauses argument.
300         * cp-gimplify.c (cxx_omp_finish_clause): New function.
301         (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
302         (cxx_omp_clause_default_ctor): Add outer argument.
303         (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
304         * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
305         * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
306         Add par_clauses argument.  If decl is present in parallel's
307         lastprivate clause, change that clause to shared and add
308         a lastprivate clause for decl to OMP_FOR_CLAUSES.
309         Fix wording of error messages.  Adjust finish_omp_for caller.
310         Add clauses argument.  Parse loops with random access iterators.
311         (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
312         functions.
313         (cp_parser_omp_for, cp_parser_omp_parallel): Adjust
314         cp_parser_omp_for_loop callers.
315         (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
316         functions.
317         (cp_parser_omp_clause_name): Handle collapse and untied
318         clauses.
319         (cp_parser_omp_clause_schedule): Handle auto schedule.
320         (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
321         and PRAGMA_OMP_CLAUSE_UNTIED.
322         (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
323         (OMP_TASK_CLAUSE_MASK): Define.
324         (cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
325         (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
326         (cp_parser_pragma): Handle PRAGMA_OMP_TASK and
327         PRAGMA_OMP_TASKWAIT.
328         * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
329         OMP_CLAUSE_UNTIED.  Handle OMP_CLAUSE_LASTPRIVATE_STMT.
330         (tsubst_omp_for_iterator): New function.
331         (dependent_omp_for_p): New function.
332         (tsubst_expr) <case OMP_FOR>: Use it.  Handle collapsed OMP_FOR
333         loops.  Adjust finish_omp_for caller.  Handle loops with random
334         access iterators.  Adjust for OMP_FOR_{INIT,COND,INCR} changes.
335         (tsubst_expr): Handle OMP_TASK.
336         * semantics.c (cxx_omp_create_clause_info): New function.
337         (finish_omp_clauses): Call it.  Handle OMP_CLAUSE_UNTIED and
338         OMP_CLAUSE_COLLAPSE.
339         (cxx_omp_predetermined_sharing): Removed.
340         * semantics.c (finish_omp_for): Allow pointer iterators.  Use
341         handle_omp_for_class_iterator and dependent_omp_for_p.  Handle
342         collapsed for loops.  Adjust c_finish_omp_for caller.  Add new
343         clauses argument.  Fix check for type dependent cond or incr.
344         Set OMP_FOR_CLAUSES to clauses.  Use cp_convert instead of
345         fold_convert to convert incr amount to difference_type.  Only
346         fold if not in template.  If decl is mentioned in lastprivate
347         clause, set OMP_CLAUSE_LASTPRIVATE_STMT.  Handle loops with random
348         access iterators.  Adjust for OMP_FOR_{INIT,COND,INCR}
349         changes.
350         (finish_omp_threadprivate): Allow static class members of the
351         current class.
352         (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
353         finish_omp_taskwait): New functions.
355         * parser.c (cp_parser_binary_expression): Add prec argument.
356         (cp_parser_assignment_expression): Adjust caller.
357         * cp-tree.h (outer_curly_brace_block): New prototype.
358         * decl.c (outer_curly_brace_block): No longer static.
360 2008-06-02  Paolo Carlini  <paolo.carlini@oracle.com>
362         PR c++/36404
363         * pt.c (push_template_decl_real): Consistently return error_mark_node
364         on error.
366 2008-06-02  Tomas Bily  <tbily@suse.cz>
368         * typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
369         (cp_build_unary_op): Likewise.
370         (cp_build_indirect_ref): Use CONVERT_EXPR_P.
371         (maybe_warn_about_returning_address_of_local): Likewise.
373 2008-05-29  Paolo Carlini  <paolo.carlini@oracle.com>
375         PR c++/35243
376         * pt.c (tsubst_initializer_list): Consistently check the tree
377         returned by tsubst_pack_expansion for error_mark_node.
379 2008-05-27  Michael Matz  <matz@suse.de>
381         PR c++/27975
382         * call.c (build_new_op): Make warning conditional on
383         OPT_Wenum_compare.
385 2008-05-27  Alexandre Oliva  <aoliva@redhat.com>
387         PR c++/35909
388         * call.c (convert_like_real): Convert bitfield to desired type
389         before creating temporary.
391 2008-05-26  Daniel Franke  <franke.daniel@gmail.com>
393         * Makefile.in: Adjusted dependencies on c-incpath.o.
395 2008-05-23  Jakub Jelinek  <jakub@redhat.com>
397         PR c++/36237
398         * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
399         fold_build_cleanup_point_expr on build_call_a results.
401         PR c++/36308
402         * semantics.c (omp_clause_info_fndecl): New function.
403         (finish_omp_clauses): Use it.
405 2008-05-21  Jakub Jelinek  <jakub@redhat.com>
407         PR c++/36023
408         * cp-tree.h (check_array_initializer): New prototype.
409         * decl.c (check_array_initializer): New function.
410         (check_initializer): Call it.
411         * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
413 2008-05-21  Tom Tromey  <tromey@redhat.com>
415         * mangle.c (save_partially_mangled_name): Remove.
416         (restore_partially_mangled_name): Likewise.
417         (write_encoding): Update.
418         (write_unqualified_name): Likewise.
419         (start_mangling): Always use name_obstack.  Remove 'ident_p'
420         argument.
421         (get_identifier_nocopy): Remove.
422         (finish_mangling_internal): Rename from finish_mangling.
423         (finish_mangling): New function.
424         (finish_mangling_get_identifier): Likewise.
425         (partially_mangled_name, partially_mangled_name_len): Remove.
426         (mangle_decl_string): Change return type.  Update.
427         (mangle_decl, mangle_type_string, mangle_special_for_type,
428         mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
429         mangle_ref_init_variable): Update.
431 2008-05-12  Paolo Carlini  <paolo.carlini@oracle.com>
433         PR c++/35331
434         * semantics.c (begin_class_definition): Extend checks on the first
435         argument.
437 2008-05-12  Tomas Bily  <tbily@suse.cz>
439         * typeck2.c (digest_init): Use CONVERT_EXPR_P.
440         * call.c (build_over_call): Likewise.
441         * error.c (dump_expr): Use CASE_CONVERT.
442         * class.c (fixed_type_or_null): Likewise.
444 2008-05-11  Volker Reichelt  <v.reichelt@netcologne.de>
446         * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
447         in error message.
448         (cp_parser_omp_clause_schedule): Remove superfluous "expected"
449         in error message.
451 2008-05-07  Kenneth Zadeck  <zadeck@naturalbridge.com>
453         * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
454         DECL_LOOPING_CONST_OR_PURE_P attributes.
455         * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
456         DECL_PURE_P.
458 2008-05-02  Simon Baldwin  <simonb@google.com>
460         PR bootstrap/36108
461         * typeck.c (build_array_ref): Remove warn_array_subscript_range.
463 2008-05-01  Simon Baldwin  <simonb@google.com>
465         * typeck.c (build_array_ref): Call warn_array_subscript_range.
467 2008-04-30  Jakub Jelinek  <jakub@redhat.com>
469         PR c++/35986
470         * pt.c (more_specialized_fn): Stop the loop even if there are no
471         arguments before ellipsis.
473 2008-04-29  Jakub Jelinek  <jakub@redhat.com>
475         PR c++/35650
476         * parser.c (cp_parser_lookup_name): Look through single function
477         OVERLOAD.
479         PR c++/35987
480         * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
481         COMPOUND_EXPR if the second argument would be error_mark_node.
483 2008-04-28  Jason Merrill  <jason@redhat.com>
484             Liu Guanwei <liu_gw@163.com>
486         PR c++/57
487         * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
488         in default arguments.
490 2008-04-25  Jan Hubicka  <jh@suse.cz>
492         * typeck.c (check_return_expr): Update.
493         * decl.c (start_preparsed_function): Update.
494         * method.c (use_thunk): Update.
496 2008-04-24  Jakub Jelinek  <jakub@redhat.com>
498         PR c++/35758
499         * cp-tree.h (cp_reconstruct_complex_type): New prototype.
500         * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
501         * decl2.c (is_late_template_attribute): Only make vector_size
502         late tmpl attribute if argument is type or value dependent.
503         (cp_reconstruct_complex_type): New function.
505 2008-04-24  Richard Guenther  <rguenther@suse.de>
507         * typeck.c (cp_build_function_call): Call
508         check_builtin_function_arguments.
510 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
512         * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
513         (build_ptrmemfunc1): Don't set TREE_INVARIANT.
514         * init.c (build_zero_init): Don't set TREE_INVARIANT.
515         * class.c (build_base_path): Don't set TREE_INVARIANT.
516         (build_vtbl_ref_1): Don't set TREE_INVARIANT.
517         (build_vtbl_initializer): Don't set TREE_INVARIANT.
518         * decl.c (build_enumerator): Don't set TREE_INVARIANT.
519         * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
520         (generic_initializer): Don't set TREE_INVARIANT.
521         (ptr_initializer): Don't set TREE_INVARIANT.
522         (ptm_initializer): Don't set TREE_INVARIANT.
523         (class_initializer): Don't set TREE_INVARIANT.
524         * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
525         * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
526         (build_template_parm_index): Don't set TREE_INVARIANT.
527         (reduce_template_parm_level): Don't set TREE_INVARIANT.
528         (process_template_parm): Don't set TREE_INVARIANT.
530 2008-04-22  Jason Merrill  <jason@redhat.com>
532         PR c++/35316
533         * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
534         to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
535         * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
537 2008-04-22  Jakub Jelinek  <jakub@redhat.com>
539         PR c++/35747
540         * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
541         expression is errorneous.
543 2008-04-21  Jason Merrill  <jason@redhat.com>
545         PR c++/35325
546         * tree.c (cp_tree_equal): Handle FIXED_CST.
548         PR c++/35678
549         * pt.c (template_template_parm_bindings_ok_p): Set 
550         processing_template_decl while in this function.
552 2008-04-18  Kris Van Hees <kris.van.hees@oracle.com>
554         * cvt.c (type_promotes_to): Support char16_t and char32_t.
555         * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
556         char16_t and char32_t.
557         * lex.c (reswords): Add char16_t and char32_t (for c++0x).
558         * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
559         extended builtin type "u8char{16,32}_t".
560         * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
561         RID_CHAR{16,32}.
562         (cp_lexer_print_token): Support CPP_STRING{16,32}.
563         (cp_parser_is_string_literal): Idem.
564         (cp_parser_string_literal): Idem.
565         (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
566         CPP_STRING{16,32}.
567         (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}. 
568         * tree.c (char_type_p): Support char16_t and char32_t as char types.
569         * typeck.c (string_conv_p): Support char16_t and char32_t.
571 2008-04-17  Jason Merrill  <jason@redhat.com>
573         PR c++/35773
574         * call.c (build_user_type_conversion_1): Represent second step of 
575         copy-init with an rvalue conversion.
576         (convert_like_real) [ck_user]: Don't implicitly add it here.
578 2008-04-15  Jakub Jelinek  <jakub@redhat.com>
580         PR c/35751
581         * decl.c (layout_var_decl): If extern or static var has variable
582         size, set TREE_TYPE (decl) to error_mark_node.
584 2008-04-16  Danny Smith  <dannysmith@users.sourceforge.net>
586        PR target/35921
587        * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
588        to clone.
590 2008-04-09  Jason Merrill  <jason@redhat.com>
592         PR c++/35708
593         * semantics.c (finish_compound_literal): Return a TARGET_EXPR, 
594         not a pushed variable.
596 2008-04-09  Volker Reichelt  <v.reichelt@netcologne.de>
598         * call.c (build_op_delete_call): Fix quotation in warning message.
599         * decl.c (grokdeclarator): Quote keyword in error message.
600         * pt.c (check_for_bare_parameter_packs): Fix quotation in error
601         message.
603         * parser.c (cp_parser_check_type_definition): Print error string
604         directly rather than using "%s".
605         (cp_parser_postfix_expression): Fix quotation.
606         (cp_parser_decltype): Likewise.
607         (cp_parser_sizeof_operand): Fix quotation. Simplify.
609         * parser.c (cp_parser_non_integral_constant_expression): Build error
610         message with CONCAT rather than using "%s".
611         (cp_parser_primary_expression): Fix quotation.
612         (cp_parser_postfix_expression): Likewise.
613         (cp_parser_postfix_dot_deref_expression): Likewise.
614         (cp_parser_unary_expression): Likewise.
615         (cp_parser_new_expression): Likewise.
616         (cp_parser_delete_expression): Likewise.
618         * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
619         as `)', not as `('.  Fix quotation.
620         (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
621         (cp_parser_primary_expression): Likewise.
622         (cp_parser_nested_name_specifier_opt): Likewise.
623         (cp_parser_postfix_expression): Likewise.
624         (cp_parser_postfix_open_square_expression): Likewise.
625         (cp_parser_parenthesized_expression_list): Likewise.
626         (cp_parser_pseudo_destructor_name): Likewise.
627         (cp_parser_new_expression): Likewise.
628         (cp_parser_direct_new_declarator): Likewise.
629         (cp_parser_delete_expression): Likewise.
630         (cp_parser_cast_expression): Likewise.
631         (cp_parser_question_colon_clause): Likewise.
632         (cp_parser_builtin_offsetof): Likewise.
633         (cp_parser_trait_expr): Likewise.
634         (cp_parser_label_for_labeled_statement): Likewise.
635         (cp_parser_compound_statement): Likewise.
636         (cp_parser_selection_statement): Likewise.
637         (cp_parser_condition): Likewise.
638         (cp_parser_iteration_statement): Likewise.
639         (cp_parser_already_scoped_statement): Likewise.
640         (cp_parser_simple_declaration): Likewise.
641         (cp_parser_linkage_specification): Likewise.
642         (cp_parser_static_assert): Likewise.
643         (cp_parser_decltype): Likewise.
644         (cp_parser_conversion_function_id): Likewise.
645         (cp_parser_operator_function_id): Likewise.
646         (cp_parser_operator): Likewise.
647         (cp_parser_type_parameter): Likewise.
648         (cp_parser_template_id): Likewise.
649         (cp_parser_explicit_instantiation): Likewise.
650         (cp_parser_explicit_specialization): Likewise.
651         (cp_parser_enum_specifier): Likewise.
652         (cp_parser_namespace_definition): Likewise.
653         (cp_parser_namespace_alias_definition): Likewise.
654         (cp_parser_using_declaration): Likewise.
655         (cp_parser_using_directive): Likewise.
656         (cp_parser_asm_definition): Likewise.
657         (cp_parser_direct_declarator): Likewise.
658         (cp_parser_ptr_operator): Likewise.
659         (cp_parser_parameter_declaration_clause): Likewise.
660         (cp_parser_initializer_clause): Likewise.
661         (cp_parser_class_specifier): Likewise.
662         (cp_parser_member_specification_opt): Likewise.
663         (cp_parser_member_declaration): Likewise.
664         (cp_parser_pure_specifier): Likewise.
665         (cp_parser_constant_initializer): Likewise.
666         (cp_parser_base_clause): Likewise.
667         (cp_parser_exception_specification_opt): Likewise.
668         (cp_parser_try_block): Likewise.
669         (cp_parser_function_try_block): Likewise.
670         (cp_parser_handler): Likewise.
671         (cp_parser_throw_expression): Likewise.
672         (cp_parser_asm_operand_list): Likewise.
673         (cp_parser_attributes_opt): Likewise.
674         (cp_parser_label_declaration): Likewise.
675         (cp_parser_constructor_declarator_p): Likewise.
676         (cp_parser_template_declaration_after_export): Likewise.
677         (cp_parser_single_declaration): Likewise.
678         (cp_parser_objc_message_expression): Likewise.
679         (cp_parser_objc_message_args): Likewise.
680         (cp_parser_objc_encode_expression): Likewise.
681         (cp_parser_objc_defs_expression): Likewise.
682         (cp_parser_objc_protocol_expression): Likewise.
683         (cp_parser_objc_selector_expression): Likewise.
684         (cp_parser_objc_protocol_refs_opt): Likewise.
685         (cp_parser_objc_typename): Likewise.
686         (cp_parser_objc_method_keyword_params): Likewise.
687         (cp_parser_objc_superclass_or_category): Likewise.
688         (cp_parser_objc_try_catch_finally_statement): Likewise.
689         (cp_parser_objc_synchronized_statement): Likewise.
690         (cp_parser_objc_throw_statement): Likewise.
691         (cp_parser_omp_var_list_no_open): Likewise.
692         (cp_parser_omp_clause_default): Likewise.
693         (cp_parser_omp_clause_if): Likewise.
694         (cp_parser_omp_clause_num_threads): Likewise.
695         (cp_parser_omp_clause_reduction): Likewise.
696         (cp_parser_omp_clause_schedule): Likewise.
697         (cp_parser_omp_critical): Likewise.
698         (cp_parser_omp_for_loop): Likewise.
699         (cp_parser_omp_sections_scope): Likewise.
701         * parser.c (cp_parser_template_parameter_list): Simplify.
703 2008-04-07  James E. Wilson  <wilson@tuliptree.org>
705         * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
707 2008-04-07  Jason Merrill  <jason@redhat.com>
709         PR c++/35734
710         * class.c (type_has_user_nondefault_constructor): A template 
711         counts as a nondefault constructor.
713 2008-04-04  Paolo Bonzini  <bonzini@gnu.org>
715         * decl.c (cxx_push_function_context): Delete.
716         (cxx_pop_function_context): Delete.
717         (start_preparsed_function): Merge cxx_push_function_context (!f->decl
718         code only).
719         * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
720         LANG_HOOKS_FUNCTION_FINAL): Delete.
721         (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
722         LANG_HOOKS_MISSING_NORETURN_OK_P.
723         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
724         Delete prototype.
725         * semantics.c (current_stmt_tree): Fix comment.
727 2008-04-03  Jakub Jelinek  <jakub@redhat.com>
729         PR c++/35741
730         * semantics.c (finish_offsetof): Undo effect of convert_from_reference
731         before calling fold_offsetof.
733 2008-04-03  Tom Tromey  <tromey@redhat.com>
735         * Make-lang.in (c++_OBJS): New variable.
737 2008-04-03  Paolo Bonzini  <bonzini@gnu.org>
738     
739         * optimize.c (clone_body): New, from tree-inline.c.
741 2008-04-03  Paolo Bonzini  <bonzini@gnu.org>
743         * method.c (synthesize_method): Use {push,pop}_function_context.
744         * name-lookup.c (push_to_top_level): Likewise.
745         * parser.c (cp_parser_late_parsing_for_member): Likewise.
747 2008-03-30  Volker Reichelt  <v.reichelt@netcologne.de>
749         PR c++/35578
750         * parser.c (cp_parser_decl_specifier_seq): Add location to error
751         message.
753 2008-03-27  Tom Tromey  <tromey@redhat.com>
755         * Make-lang.in: Revert automatic dependency patch.
757 2008-03-27  Douglas Gregor  <doug.gregor@gmail.com>
759         PR obj-c++/35704
760         * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
761         (build_compound_expr): New, for compatibility with C
762         build_compound_expr.
763         (cp_build_compound_expr): Renamed from build_compound_expr.
764         (build_c_cast): New, for compatibility with C build_c_cast.
765         (cp_build_c_cast): Renamed from build_c_cast.
766         * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
767         * decl.c (cxx_maybe_build_cleanup): Ditto.
768         * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
769         (cp_build_compound_expr): Renamed from build_compound_expr.
770         (build_c_cast): Add C-compatible prototype.
771         (cp_build_c_cast): Renamed from build_c_cast.
772         * typeck2.c (build_functional_cast): Use cp_build_c_cast.
773         * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
775 2008-03-27  Douglas Gregor  <doug.gregor@gmail.com>
777         * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
778         tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
779         ending in a pack expansion, both of which can occur when
780         substituting into a nested template.
781         (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
782         instantiating the sizeof...(X) form, make tsubst_copy do the work.
783         * parser.c (cp_parser_template_parameter): Deal with unnamed
784         non-type template parameter packs identified by pack expansions in
785         the parameter type.
787 2008-03-26  Jakub Jelinek  <jakub@redhat.com>
789         PR c++/35546
790         * pt.c (apply_late_template_attributes): Don't call tsubst on
791         first attribute argument if it is IDENTIFIER_NODE.
793         PR c++/35332
794         * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
795         and LTGT_EXPR to pp_expression.
797 2008-03-26  Douglas Gregor  <doug.gregor@gmail.com>
799        * pt.c (coerce_template_template_parm): Moved the body of the loop
800        of coerce_template_template_parms here, to make iteration over a
801        template argument pack simpler.
802        Also, allow matching of a template parameter pack in the template
803        template parameter to a template parameter in the template
804        template argument.
805        (coerce_template_template_parms): Deal with variadic template
806        template parameters. Use coerce_template_template_parm.
807        (unify): Make sure we coerce the template template argument's
808        template arguments to the template template parameter's template
809        parameters, not the other way around.
811 2008-03-25  Tom Tromey  <tromey@redhat.com>
813         * Make-lang.in: Remove .o targets.
814         (cp/g++spec.o): Moved to cp/.  Reduce to variable setting.
815         (GXX_OBJS): Update.
816         (c++_OBJS): New variable.
817         (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
819 2008-03-25  Douglas Gregor  <doug.gregor@gmail.com>
821        * typeck.c (composite_pointer_type_r): Add SFINAE support.
822        (composite_pointer_type): Ditto.
823        (common_type): Fix call to composite_pointer_type.
824        (cxx_sizeof_nowarn): New; used to be a macro.
825        (cxx_sizeof_expr): Add SFINAE support.
826        (cxx_alignof_expr): Ditto.
827        (decay_conversion): Fix calls for SFINAE support.
828        (rationalize_conditional_expr): Add SFINAE support.
829        (build_class_member_access_expr): Ditto.
830        (finish_class_member_access_expr): Ditto.
831        (build_x_indirect_ref): Ditto.
832        (build_indirect_ref): Original version renamed to
833        cp_build_indirect_ref; new version provides a bridge from
834        c-common.
835        (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
836        support.
837        (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
838        (build_function_call): Original version renamed to
839        cp_build_function_call; new version provides a bridge from
840        c-common.
841        (cp_build_function_call): Was build_function_call; added SFINAE
842        support.
843        (convert_arguments): Add SFINAE support.
844        (build_x_binary_op): Ditto.
845        (build_binary_op): Original version renamed to cp_build_binary_op;
846        new version provides a bridge from c-common.
847        (cp_build_binary_op): Was build_binary_op; added SFINAE support.
848        (pointer_diff): Fix calls for SFINAE.
849        (build_x_unary_op): Add SFINAE support.
850        (condition_conversion): Fix calls for SFINAE.
851        (build_unary_op): Original version renamed to cp_build_unary_op;
852        new version provides a bridge from c-common.
853        (cp_build_unary_op): Was build_unary_op; added SFINAE support.
854        (unary_complex_lvalue): Fix calls for SFINAE.
855        (build_x_conditional_expr): Add SFINAE support.
856        (build_x_compound_expr_from_list): Fix calls for SFINAE.
857        (build_x_compound_expr): Add SFINAE support.
858        (convert_ptrmem): Fix calls for SFINAE.
859        (build_static_cast_1): Add SFINAE support.
860        (build_static_cast): Ditto.
861        (build_reinterpret_cast_1): Ditto.
862        (build_reinterpret_cast): Ditto.
863        (build_const_cast_1): Ditto.
864        (build_const_cast): Ditto.
865        (build_c_cast): Ditto.
866        (build_modify_expr): Original version renamed to
867        cp_build_modify_expr; new version provides a bridge from c-common.
868        (cp_build_modify_expr): Was build_modify_expr; added SFINAE
869        support.
870        (build_x_modify_expr): Add SFINAE support.
871        (build_ptrmemfunc): Fix calls for SFINAE.
872        (convert_for_assignment): Add SFINAE support.
873        (convert_for_initialization): Ditto.
874        (check_return_expr): Fix calls for SFINAE.
875        (lvalue_or_else): Add SFINAE support.
876        * init.c (perform_member_init): Fix calls for SFINAE.
877        (emit_mem_initializers): Ditto.
878        (expand_virtual_init): Ditto.
879        (expand_cleanup_for_base): Ditto.
880        (build_aggr_init): Add SFINAE support.
881        (expand_default_init): Ditto.
882        (expand_aggr_init_1): Fix calls for SFINAE.
883        (build_offset_ref): Ditto.
884        (build_new_1): Add SFINAE support.
885        (build_new): Ditto.
886        (build_vec_delete_1): Fix calls for SFINAE.
887        (get_temp_regvar): Ditto.
888        (build_vec_init): Add SFINAE support.
889        (build_dtor_call): Fix calls for SFINAE.
890        (build_delete): Ditto.
891        (push_base_cleanups): Ditto.
892        (build_vec_delete_1): Ditto.
893        * class.c (build_base_path): Fix calls for SFINAE.
894        (build_simple_base_path): Ditto.
895        (convert_to_base_statically): Ditto.
896        (build_vfn_ref): Ditto.
897        (resolve_address_of_overloaded_function): Ditto.
898        * decl.c (check_initializer): Fix calls for SFINAE.
899        (register_dtor_fn): Ditto.
900        (compute_array_index_type): Ditto.
901        (finish_enum): Ditto.
902        (start_preparsed_function): Ditto.
903        (cxx_maybe_build_cleanup): Ditto.
904        * call.c (convert_like): Add COMPLAIN argument.
905        (convert_like_with_context): Ditto.
906        (build_this): Fix calls for SFINAE.
907        (build_user_type_conversion): Ditto.
908        (resolve_args): Ditto.
909        (build_new_function_call): Add SFINAE support.
910        (build_operator_new_call): Fix calls for SFINAE.
911        (build_object_call): Add SFINAE support.
912        (build_conditional_expr): Ditto.
913        (build_new_op): Ditto.
914        (build_op_delete_call): Fix calls for SFINAE.
915        (build_temp): Ditto.
916        (convert_like_real): Add SFINAE support.
917        (build_x_va_arg): Fix calls for SFINAE.
918        (convert_default_arg): Ditto.
919        (build_over_call): Add SFINAE support.
920        (build_java_interface_fn_ref): Fix calls for SFINAE.
921        (build_special_member_call): Add SFINAE support.
922        (build_new_method_call): Ditto.
923        (perform_implicit_conversion): Ditto.
924        (perform_direct_initialization_if_possible): Ditto.
925        (initialize_reference): Fix calls for SFINAE.
926        * method.c (do_build_assign_ref): Fix calls for SFINAE.
927        * rtti.c (build_headof): Fix calls for SFINAE.
928        (get_tinfo_decl_dynamic): Ditto.
929        (get_typeid): Ditto.
930        (build_dynamic_cast_1): Add SFINAE support.
931        (build_dynamic_cast): Ditto.
932        (tinfo_base_init): Fix calls for SFINAE.
933        * except.c (do_get_exception_ptr): Fix calls for SFINAE.
934        (do_end_catch): Ditto.
935        (initialize_handler_parm): Ditto.
936        (expand_start_catch_block): Ditto.
937        (do_allocate_exception): Ditto.
938        (do_free_exception): Ditto.
939        (build_throw): Ditto.
940        * cvt.c (build_up_reference): Fix calls for SFINAE.
941        (convert_to_reference): Ditto.
942        (ocp_convert): Ditto.
943        (convert_to_void): Add SFINAE support.
944        * tree.c (build_dummy_object): Fix calls for SFINAE.
945        (stabilize_expr): Ditto.
946        * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
947        parameter.
948        (build_new_method_call): Ditto.
949        (build_special_member_call): Ditto.
950        (build_new_op): Ditto.
951        (perform_implicit_conversion): Ditto.
952        (perform_direct_initialization_if_possible): Ditto.
953        (convert_to_void): Ditto.
954        (build_aggr_init): Ditto.
955        (build_new): Ditto.
956        (build_vec_init): Ditto.
957        (build_dynamic_cast): Ditto.
958        (finish_call_expr): Ditto
959        (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
960        (cxx_sizeof_nowarn): Remove macro; add function declaration.
961        (build_class_member_access_expr): Add tsubst_flags_t parameter.
962        (finish_class_member_access_expr): Ditto.
963        (build_x_indirect_ref): Ditto.
964        (cp_build_indirect_ref): New.
965        (cp_build_function_call): Add tsubst_flags_t parameter.
966        (build_x_unary_op): Ditto.
967        (cp_build_unary_op): New.
968        (build_x_conditional_expr): Add tsubst_flags_t parameter.
969        (build_x_compound_expr): Ditto.
970        (build_compound_expr): Ditto.
971        (build_static_cast): Ditto.
972        (build_reinterpret_cast): Ditto.
973        (build_const_cast): Ditto.
974        (build_c_cast): Ditto.
975        (build_x_modify_expr): Ditto.
976        (cp_build_modify_expr): New.
977        (convert_for_initialization): Add tsubst_flags_t parameter.
978        (cp_build_binary_op): Remove macro; add function declaration.
979        (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
980        (lvalue_or_else): Ditto.
981        (build_functional_cast): Ditto.
982        * typeck2.c (digest_init): Fix calls for SFINAE.
983        (process_init_constructor_array): Ditto.
984        (process_init_constructor_record): Ditto.
985        (build_x_arrow): Ditto.
986        (build_m_component_ref): Ditto.
987        (build_functional_cast): Add SFINAE support.
988        * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
989        * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
990        (finish_expr_stmt): Ditto.
991        (finish_for_expr): Ditto.
992        (finish_asm_stmt): Ditto.
993        (finish_non_static_data_member): Ditto.
994        (finish_qualified_id_expr): Ditto.
995        (finish_call_expr): Add SFINAE support.
996        (finish_increment_expr): Fix calls for SFINAE.
997        (finish_unary_op_expr): Ditto.
998        (simplify_aggr_init_expr): Ditto.
999        (finish_omp_clauses): Ditto.
1000        (finish_omp_for): Ditto.
1001        (finish_omp_barrier): Ditto.
1002        (finish_omo_flush): Ditto.
1003        * decl2.c (grok_array_decl): Fix calls or SFINAE.
1004        (build_anon_union_vars): Ditto.
1005        (get_guard_cond): Ditto.
1006        (set_guard): Ditto.
1007        (one_static_initialization_or_destruction): Ditto.
1008        (do_static_initialization_or_destruction): Ditto.
1009        (generate_ctor_or_dtor_function): Ditto.
1010        (build_offset_ref_call_from_tree): Ditto.
1011        * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
1012        (cp_parser_postfix_dot_deref_expression): Ditto.
1013        (cp_parser_unary_expression): Ditto.
1014        (cp_parser_new_expression): Ditto.
1015        (cp_parser_cast_expression): Ditto.
1016        (cp_parser_binary_expression): Ditto.
1017        (cp_parser_question_colon_clause): Ditto.
1018        (cp_parser_assignment_expression): Ditto.
1019        (cp_parser_expression): Ditto.
1020        (cp_parser_builtin_offsetof): Ditto.
1021        (cp_parser_template_argument): Ditto.
1022        (cp_parser_functional_cast): Ditto.
1024 2008-03-24  Tom Tromey  <tromey@redhat.com>
1026         * lex.c (handle_pragma_interface): Don't copy the filename.
1027         (handle_pragma_implementation): Copy filename using xstrdup.
1029 2008-03-21  Paolo Carlini  <pcarlini@suse.de>
1031         * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
1032         (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
1033         (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
1034         (PROMOTES_TO_AGGR_TYPE): Remove.
1035         (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
1036         * typeck.c (unary_complex_lvalue, build_modify_expr,
1037         convert_for_initialization): Adjust.
1038         * init.c (is_aggr_type): Remove.
1039         (is_class_type): Add.
1040         (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
1041         build_delete): Adjust.
1042         * lex.c (make_aggr_type): Remove.
1043         (make_class_type): Add.
1044         (cxx_make_type): Adjust.
1045         * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
1046         Adjust.
1047         * decl.c (build_typename_type, make_typename_type,
1048         make_unbound_class_template, cxx_init_decl_processing,
1049         check_tag_decl, groktypename, start_decl_1, layout_var_decl,
1050         check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
1051         grok_op_properties, xref_tag, check_function_type): Adjust.
1052         * call.c (check_dtor_name, standard_conversion, implicit_conversion,
1053         add_builtin_candidate, add_builtin_candidates,
1054         build_user_type_conversion_1, convert_like_real, build_cxx_call,
1055         is_subseq, compare_ics): Adjust.
1056         * method.c (use_thunk): Adjust.
1057         * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
1058         create_tinfo_types): Adjust.
1059         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
1060         build_up_reference, convert_to_reference, convert_from_reference,
1061         ocp_convert, build_expr_type_conversion): Adjust.
1062         * tree.c (bind_template_template_parm, error_type): Adjust.
1063         * dump.c (cp_dump_tree): Adjust.
1064         * search.c (lookup_member): Adjust.
1065         * friend.c (make_friend_class, do_friend): Adjust.
1066         * typeck2.c (store_init_value, process_init_constructor_array,
1067         process_init_constructor_record, build_x_arrow, build_m_component_ref,
1068         build_functional_cast): Adjust.
1069         * pt.c (finish_member_template_decl, process_template_parm,
1070         lookup_template_class, tsubst_function_type, tsubst,
1071         tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
1072         Adjust.
1073         * semantics.c (begin_class_definition, finish_base_specifier,
1074         finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
1075         Adjust.
1076         * name-lookup.c (constructor_name_p, push_overloaded_decl,
1077         do_class_using_decl, lookup_qualified_name,
1078         maybe_process_template_type_declaration): Adjust.
1079         * decl2.c (grok_array_decl, check_member_template,
1080         constrain_class_visibility): Adjust.
1081         * parser.c (cp_parser_class_name): Adjust.
1083 2008-03-18  Paolo Bonzini  <bonzini@gnu.org>
1085         * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
1086         
1087 2008-03-17  Jason Merrill  <jason@redhat.com>
1089         PR c++/35548
1090         * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
1091         a temp directly to a reference as per DR391.
1093 2008-03-12  Richard Guenther  <rguenther@suse.de>
1095         PR c++/35469
1096         Revert:
1097         2008-02-04  Richard Guenther  <rguenther@suse.de>
1099         PR java/35035
1100         * decl.c (record_builtin_java_type): Make jboolean a
1101         integer type again where its mode doesn't match that of bool.
1103         2008-01-25  Richard Guenther  <rguenther@suse.de>
1105         PR c++/33887
1106         * decl.c (record_builtin_java_type): Make __java_boolean
1107         a variant of bool.
1108         * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
1109         after TYPE_MAIN_VARIANT check.
1111 2008-03-10  Jakub Jelinek  <jakub@redhat.com>
1113         PR c++/35328
1114         * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
1115         if errorcount.
1117         PR c++/35337
1118         * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
1119         DECL_P in not a variable and appears more than once error messages.
1121 2008-03-07  Paolo Bonzini  <bonzini@gnu.org>
1123         Revert:
1125         2008-02-06  Douglas Gregor  <doug.gregor@gmail.com>
1127         PR c++/35049
1128         PR c++/35096
1129         * typeck.c (structural_comptypes): Call cp_comptypes.
1130         (comptypes): New; called from the C/C++ common bits to perform
1131         strict checks.
1132         (cp_comptypes): Renamed from comptypes, which is already used,
1133         with a different signature, by the C++ front end.
1134         (build_reinterpret_cast_1): Call cp_comptypes.
1135         (ptr_reasonably_similar): Ditto.
1136         * decl.c (decls_match): Ditto.
1137         * cvt.c (convert_to_reference): Ditto.
1138         * cp-tree.h (same_type_p): Ditto.
1139         (same_or_base_type_p): Ditto.
1140         (comptypes): Rename to cp_comptypes.
1141         * pt.c (canonical_type_parameter): Call cp_comptypes.
1143 2008-03-07  Paolo Bonzini  <bonzini@gnu.org>
1145         * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
1146         test for equivalence between pointer and references.
1148 2008-03-02  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1150         PR 24924
1151         * class.c (finish_struct_anon): Use permerror instead of pedwarn.
1152         (check_field_decls): Likewise.
1153         (note_name_declared_in_class): Likewise.
1154         * call.c (build_new_op): Likewise.
1155         (convert_like_real): Likewise.
1156         (build_over_call): Likewise.
1157         * lex.c (unqualified_fn_lookup_error): Likewise.
1158         * parser.c (cp_parser_template_id): Likewise.
1159         * cvt.c (warn_ref_binding): Likewise.
1160         (convert_to_reference): Likewise.
1161         (ocp_convert): Likewise.
1162         (convert_to_void): Use error instead of pedwarn.
1163         * error.c (cp_cpp_error): Use pedantic_warning_kind.
1164         * decl.c (compute_array_index_type): Use constant_expression_error.
1165         
1166 2008-03-01  Douglas Gregor  <doug.gregor@gmail.com>
1168         * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
1169         that auto is either a storage class or a simple type specifier,
1170         depending on the dialect.
1171         (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
1172         specifier in C++98 mode, error in C++0x mode (since we don't
1173         support auto as a type specifier, yet).
1174         (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
1175         storage specifier in C++0x mode.
1176         (cp_parser_simple_type_specifier): Parse `auto' as a
1177         simple-type-specifier, but error because we don't support it yet.
1179 2008-02-29  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1181         * parser.c (cp_parser_nonclass_name): New.
1182         (cp_parser_pseudo_destructor_name): Use it instead of
1183         cp_parser_type_name.
1184         (cp_parser_type_name): Move code to cp_parser_nonclass_name.
1186 2008-02-29  Tom Tromey  <tromey@redhat.com>
1188         * parser.c (struct cp_token) <input_file_stack_index>: Remove.
1189         (cp_lexer_get_preprocessor_token): Update.
1190         (cp_lexer_set_source_position_from_token): Don't call
1191         restore_input_file_stack.
1192         * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
1194 2008-02-28  Richard Guenther  <rguenther@suse.de>
1196         Revert:
1197         2008-02-26  Richard Guenther  <rguenther@suse.de>
1199         * decl.c (duplicate_decls): Remove decl from global mapping
1200         before ggc_freeing it.
1202 2008-02-27  Jakub Jelinek  <jakub@redhat.com>
1204         PR c++/35368
1205         * rtti.c: Include c-pragma.h.
1206         (push_abi_namespace, pop_abi_namespace): New functions.
1207         (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
1208         create_tinfo_types, emit_support_tinfos): Use them.
1209         * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
1211 2008-02-26  Jason Merrill  <jason@redhat.com>
1213         PR c++/35315
1214         * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
1215         to name the struct for linkage purposes even if it has attributes.
1216         (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
1218 2008-02-26  Tom Tromey  <tromey@redhat.com>
1220         * parser.c (eof_token): Remove old location code.
1221         (check_empty_body): Remove test of USE_MAPPED_LOCATION.
1222         * decl2.c (generate_ctor_or_dtor_function): Remove old location
1223         code.
1224         (cp_write_global_declarations): Likewise.
1225         * lex.c (cxx_init): Remove old location code.
1226         (handle_pragma_implementation): Remove test of
1227         USE_MAPPED_LOCATION.
1228         * pt.c (tsubst): Remove old location code.
1229         * error.c (cp_print_error_function): Remove test of
1230         USE_MAPPED_LOCATION.
1231         * decl.c (pop_label): Remove old location code.
1232         (finish_function): Likewise.
1234 2008-02-26  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1236         PR 26264
1237         * call.c (magic_varargs_p):  Remove BUILT_IN_STDARG_START.
1238         
1239 2008-02-26  Richard Guenther  <rguenther@suse.de>
1241         * decl.c (duplicate_decls): Remove decl from global mapping
1242         before ggc_freeing it.
1244 2008-02-26  Paolo Carlini  <pcarlini@suse.de>
1246         PR c++/35323
1247         * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
1249 2008-02-26  Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1250         
1251         * typeck.c (build_class_member_access_expr): Add appropriate
1252         OPT_W* parameter to warning.
1253         (build_reinterpret_cast_1): Likewise.
1254         * name-lookup.c (push_overloaded_decl): Likewise.
1255         
1256 2008-02-25  Paolo Carlini  <pcarlini@suse.de>
1258         PR c++/35333
1259         * error.c (dump_expr): Handle CONJ_EXPR.
1261 2008-02-25  Paolo Carlini  <pcarlini@suse.de>
1263         PR c++/35338
1264         * error.c (dump_type): Handle FIXED_POINT_TYPE.
1265         (dump_expr): Handle FIXED_CST.
1267 2008-02-24  Jason Merrill  <jason@redhat.com>
1269         * parser.c (cp_parser_declaration): Handle "inline namespace".
1270         (cp_parser_namespace_definition): Likewise.
1272         PR c++/33486
1273         * name-lookup.c (arg_assoc_namespace): Look down into inline 
1274         namespaces, too.
1276 2008-02-23  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1278         * typeck.c (check_for_casting_away_constness): Use 1 single
1279         argument, the type of cast, to decide what diagnostics generate.
1280         (build_static_cast_1): Remove unused code. Update call to
1281         check_for_casting_away_constness.
1282         (build_reinterpret_cast_1): Update call to
1283         check_for_casting_away_constness.
1284         (build_const_cast_1): Likewise.
1285         
1286 2008-02-24  Paolo Carlini  <pcarlini@suse.de>
1288         * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
1289         VEC_NEW_EXPR), forward to pp_expression.
1290         * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
1292 2008-02-24  Danny Smith  <dannysmith@users.sourceforge.net>
1294         PR c++/34749
1295         * friend.c (do_friend): Call cplus_decl_attributes earlier.
1297 2008-02-22  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1299         PR C++/34715
1300         * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
1301         template decls' function decl.
1303 2008-02-22  Paolo Carlini  <pcarlini@suse.de>
1305         PR c++/35282
1306         Revert:
1307         2008-02-14  Paolo Carlini  <pcarlini@suse.de>
1309         PR c++/28743
1310         * pt.c (determine_specialization): In case of function templates,
1311         when the type of DECL does not match FN there is no match.
1313 2008-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1315         PR c/19999
1316         * typeck.c (build_binary_op): Warn about floating point
1317         comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
1319 2008-02-19  Jason Merrill  <jason@redhat.com>
1321         PR c++/34950
1322         * pt.c (resolve_overloaded_unification): Set processing_template_decl
1323         while we look for possible bindings.
1325 2008-02-19  Jakub Jelinek  <jakub@redhat.com>
1327         PR c++/35028
1328         * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
1330         PR c++/34964
1331         PR c++/35244
1332         * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
1333         vars.  Afterwards ensure v is VAR_DECL.
1335         PR c++/35078
1336         * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
1337         call cp_finish_decl.
1338         * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
1339         early.
1341 2008-02-15  Douglas Gregor  <doug.gregor@gmail.com>
1343         PR c++/35023
1344         PR c++/35024
1345         PR c++/35026
1346         * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
1347         is error_mark_node, return an error early.
1348         (find_parameter_packs_r): Pass the pointer set along to recursive
1349         calls of cp_walk_subtrees; don't try to manage the pointer set
1350         ourselves.
1351         (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
1352         (make_pack_expansion): Ditto.
1353         (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
1354         a second pass through the tree with find_parameter_packs_r; that
1355         second pass no longer does anything.
1356         (push_template_decl_real): If we have an erroneous declaration,
1357         set its type to error_mark_node before returning an error.
1359 2008-02-14  Douglas Gregor  <doug.gregor@gmail.com>
1361         PR c++/34050
1362         * pt.c (tsubst_initializer_list): Deal with the use of
1363         VOID_TYPE_NODE to indicate value-initialization of the bases.
1365 2008-02-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1366             Jason Merrill  <jason@redhat.com>
1368         PR c++/5645
1369         PR c++/11159
1370         * class.c (type_has_user_nondefault_constructor): New fn.
1371         * cp-tree.h: Declare it.
1372         * init.c (emit_mem_initializers): Use it for -W warning about
1373         missing base initializer.
1375 2008-02-14  Paolo Carlini  <pcarlini@suse.de>
1377         PR c++/28743
1378         * pt.c (determine_specialization): In case of function templates,
1379         when the type of DECL does not match FN there is no match.
1381 2008-02-13  Jakub Jelinek  <jakub@redhat.com>
1382             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1384         PR c++/35138
1385         * parser.c (cp_parser_pseudo_destructor_name): If next tokens
1386         are not identifier :: ~, return before calling cp_parser_type_name.
1388 2008-02-13  Jason Merrill  <jason@redhat.com>
1390         PR c++/34962, c++/34937, c++/34939
1391         * decl2.c (is_late_template_attribute): Always defer attributes 
1392         vector_size and weak.
1394         PR c++/34774
1395         * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
1396         of enumerators, too.
1398 2008-02-12  Jason Merrill  <jason@redhat.com>
1400         PR c++/34824
1401         * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
1402         if we're doing conversions to call a user-defined conversion function.
1404 2008-02-12  Steven Bosscher  <steven@gcc.gnu.org>
1406         PR c++/29048
1407         * semantics.c (finish_qualified_id_expr): Avoid duplicate access
1408         check here, too.
1410 2008-02-12  Jakub Jelinek  <jakub@redhat.com>
1412         PR c++/34862
1413         * init.c (build_new_1): Don't create placement_expr before
1414         constructing alloc_call.  Verify that the pointer is passed by
1415         value to operator new.
1417 2008-02-11  Jason Merrill  <jason@redhat.com>
1419         PR c++/35097
1420         * pt.c (tsubst): Don't look up a template typedef in an explicit
1421         specialization.
1423 2008-02-11  Douglas Gregor  <doug.gregor@gmail.com>
1425        PR c++/35113
1426        * tree.c (cp_build_qualified_type_real): When building a
1427        cv-qualified array type, build it as a unique type with
1428        build_cplus_array_type_1 and then adopt the unqualified type's
1429        main variant.
1430         
1431 2008-02-11  Paolo Carlini  <pcarlini@suse.de>
1433         PR c++/35077
1434         * decl.c (groktypename): Check grokdeclarator return.
1436 2008-02-10  Jason Merrill  <jason@redhat.com>
1438         PR c++/34094
1439         * decl2.c (cp_write_global_declarations): Don't write out static 
1440         data members with DECL_IN_AGGR_P set.
1442 2008-02-08  Jason Merrill  <jason@redhat.com>
1444         PR c++/35116
1445         * tree.c (build_target_expr_with_type): Handle void initializer.
1446         (bot_manip): Remap slot before recursing.
1448 2008-02-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1450         PR other/35107
1451         * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
1453 2008-02-06  Alexandre Oliva  <aoliva@redhat.com>
1455         PR c++/35056
1456         * tree.c: Include tree-flow.h.
1457         (build_target_expr): Check type compatibility.
1458         * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
1459         * call.c (convert_like_real): Convert bitfield to expected type.
1461 2008-02-06  Douglas Gregor  <doug.gregor@gmail.com>
1463         PR c++/35049
1464         PR c++/35096
1465         * typeck.c (structural_comptypes): Call cp_comptypes.
1466         (comptypes): New; called from the C/C++ common bits to perform
1467         strict checks.
1468         (cp_comptypes): Renamed from comptypes, which is already used,
1469         with a different signature, by the C++ front end.
1470         (build_reinterpret_cast_1): Call cp_comptypes.
1471         (ptr_reasonably_similar): Ditto.
1472         * decl.c (decls_match): Ditto.
1473         * cvt.c (convert_to_reference): Ditto.
1474         * cp-tree.h (same_type_p): Ditto.
1475         (same_or_base_type_p): Ditto.
1476         (comptypes): Rename to cp_comptypes.
1477         * pt.c (canonical_type_parameter): Call cp_comptypes.
1479 2008-02-05  Jakub Jelinek  <jakub@redhat.com>
1481         PR c++/33553
1482         * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
1483         value dependent expression.
1485 2008-02-05  Douglas Gregor  <doug.gregor@gmail.com>
1487         PR c++/35074
1488         * decl2.c (save_template_attributes): When we're modifying the
1489         TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
1490         all of the other variants to add those same attributes. Otherwise,
1491         the main variant will be inconsistent with those other variants.
1492         
1493 2008-02-04  Richard Guenther  <rguenther@suse.de>
1495         PR java/35035
1496         * decl.c (record_builtin_java_type): Make jboolean a
1497         integer type again where its mode doesn't match that of bool.
1499 2008-02-02  Jason Merrill  <jason@redhat.com>
1500             Mark Mitchell  <mark@codesourcery.com>
1502         PR c++/33916
1503         * init.c (build_value_init_1): New function.
1504         (build_value_init): New function.
1505         * typeck2.c (build_functional_cast): Call it.
1506         * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
1508         * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from 
1509         TYPE_HAS_CONSTRUCTOR.
1510         * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
1511         add_implicitly_declared_members): Adjust.
1512         (check_field_decls): Adjust. Remove warnings about reference/const
1513         in class without constructor.
1514         (check_bases_and_members): Adjust.  Give those warnings here instead.
1515         * decl.c (fixup_anonymous_aggr): Adjust.
1516         (check_initializer): Adjust, clarify logic slightly.
1517         (grok_special_member_properties): Adjust, only set if user-provided.
1518         * rtti.c (create_tinfo_types): Don't set.
1519         * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
1520         Use same_type_ignoring_top_level_qualifiers_p.
1521         * pt.c (check_explicit_specialization): Adjust.
1522         (instantiate_class_template): Adjust.
1524 2008-01-31  Douglas Gregor  <doug.gregor@gmail.com>
1525            Jakub Jelinek  <jakub@redhat.com>
1527        PR c++/34935
1528        PR c++/34936
1529        * typeck.c (structural_comptypes): Handle comparisons of
1530        VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
1531        REAL_TYPE nodes.
1532        * mangle.c (write_builtin_type): Map down to the canonical type,
1533        which will be one of the predefined type nodes.
1535 2008-01-29  Michael Meissner  <michael.meissner@amd.com>
1537         PR 35004
1538         * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
1539         bits to allow for expansion of the number of middle end tree
1540         codes.
1542 2008-01-29  Douglas Gregor  <doug.gregor@gmail.com>
1544         PR c++/34055
1545         PR c++/34103
1546         PR c++/34219
1547         PR c++/34606
1548         PR c++/34753
1549         PR c++/34754
1550         PR c++/34755
1551         PR c++/34919
1552         PR c++/34961
1553         * typeck.c (check_return_expr): Tweak call to
1554         check_for_bare_parameter_packs.
1555         * class.c (add_method): Be careful with error_mark_nodes.
1556         * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
1557         signature.
1558         * pt.c (struct find_parameter_pack_data): Remove
1559         SET_PACKS_TO_ERROR.
1560         (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
1561         (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
1562         (make_pack_expansion): Ditto.
1563         (check_for_bare_parameter_packs): Parameter is now a tree, not a
1564         tree*.
1565         (process_template_parm): Tweak call to
1566         check_for_bare_parameter_packs.  
1567         (push_template_decl_real): Tweak calls to
1568         check_for_bare_parameter_packs. If bare parameter packs are found
1569         in the list of exceptions, clear out that list after giving an
1570         error.
1571         * semantics.c (finish_cond): Tweak call to
1572         check_for_bare_parameter_packs.
1573         (finish_expr_stmt): Ditto.
1574         (finish_for_expr): Ditto.
1575         (finish_switch_cond): Ditto.
1576         (finish_mem_initializers): Ditto.
1577         (finish_member_declaration): Ditto.
1578         (finish_static_assert): Check for bare parameter packs in the
1579         condition.
1580         * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
1581         attributes of a declaration.
1582         * parser.c (cp_parser_using_declaration): Tweak call to
1583         check_for_bare_parameter_packs.
1584         (cp_parser_base_clause): Ditto.
1586 2008-01-28  Jason Merrill  <jason@redhat.com>
1588         PR c++/35007
1589         * class.c (build_base_path): Fix !want_pointer case.
1591 2008-01-27  Jason Merrill  <jason@redhat.com>
1593         PR c++/27177
1594         * class.c (build_base_path): Fix previous change.
1596 2008-01-26  Jakub Jelinek  <jakub@redhat.com>
1598         PR c++/34965
1599         * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
1600         and TRUTH_XOR_EXPR.
1602 2008-01-26  Richard Guenther  <rguenther@suse.de>
1604         PR c++/34235
1605         * typeck.c (build_binary_op): Remove code to shorten compares.
1607 2008-01-25  Richard Guenther  <rguenther@suse.de>
1609         PR c++/33887
1610         * decl.c (record_builtin_java_type): Make __java_boolean
1611         a variant of bool.
1612         * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
1613         after TYPE_MAIN_VARIANT check.
1615 2008-01-25  Jason Merrill  <jason@redhat.com>
1617         PR c++/27177
1618         * class.c (build_base_path): Don't mess with virtual access if
1619         skip_evaluation.
1620         * call.c (standard_conversion): Don't check whether source type
1621         is complete.
1623         * decl2.c (is_late_template_attribute): Don't defer attribute
1624         visibility just because the type is dependent.
1626 2008-01-25  Jason Merrill  <jason@redhat.com>
1627             Mark Mitchell  <mark@codesourcery.com>
1629         PR c++/31780
1630         * call.c (standard_conversion): Allow conversion from integer/real
1631         to complex.
1632         (compare_ics): Such a conversion is worse than a normal arithmetic
1633         conversion.
1634         
1635 2008-01-25  Richard Guenther  <rguenther@suse.de>
1637         PR c++/33887
1638         * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
1639         to true.
1641 2008-01-24  Paolo Carlini  <pcarlini@suse.de>
1643         PR c++/34603
1644         * pt.c (push_template_decl_real): Return error_mark_node in case
1645         of template definition of non-template.
1647 2008-01-24  Jason Merrill  <jason@redhat.com>
1649         PR c++/34913
1650         * decl2.c (is_late_template_attribute): Defer any attribute with 
1651         dependent args.  Also defer type attributes if the type is dependent.
1653 2008-01-22  Jakub Jelinek  <jakub@redhat.com>
1654             Alexandre Oliva  <aoliva@redhat.com>
1656         PR c++/33984
1657         * call.c (reference_binding): For bitfields use the declared bitfield
1658         type.
1659         (add_builtin_candidates): Likewise.
1660         * class.c (layout_class_type): For bitfields copy over the
1661         original type quals.
1663 2008-01-22  Jason Merrill  <jason@redhat.com>
1665         PR c++/28560
1666         * decl.c (groktypename): Also ignore attributes on dependent 
1667         possibly-class types.
1669         PR c++/34912
1670         * friend.c (do_friend): Check for prior declaration of a friend 
1671         function of a local class.
1672         * name-lookup.c (lookup_name_innermost_nonclass_level): 
1673         No longer static.
1674         * name-lookup.h: Declare it.
1676 2008-01-22  Tom Tromey  <tromey@redhat.com>
1678         PR c++/34829:
1679         * init.c (build_new_1): Only disallow Java aggregates.
1681 2008-01-22  Jakub Jelinek  <jakub@redhat.com>
1683         PR c++/34607
1684         * semantics.c (finish_omp_for): Don't call c_finish_omp_for
1685         if decl or init is error_mark_node.
1687         PR c++/34918
1688         * error.c (dump_expr): Handle VECTOR_CST.
1690 2008-01-21  Jason Merrill  <jason@redhat.com>
1692         PR c++/33959
1693         * pt.c (tsubst_aggr_type): Make sure our context is complete.
1695         PR c++/34573
1696         * pt.c (retrieve_local_specialization): Robustify.
1697         (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
1699         PR c++/34846
1700         * pt.c (tsubst): Only call retrieve_local_specialization if the
1701         original typedef was in a function template.
1703         PR c++/34196
1704         * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
1706 2008-01-21  Richard Guenther  <rguenther@suse.de>
1708         PR c++/34850
1709         * error.c (cp_print_error_function): Deal with recursive
1710         BLOCK trees.
1712 2008-01-20  Paolo Carlini  <pcarlini@suse.de>
1714         PR c++/34891
1715         * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
1717 2008-01-20  Paolo Carlini  <pcarlini@suse.de>
1719         PR c++/34776
1720         PR c++/34486
1721         * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
1722         on non-IS_AGGR_TYPE scope.
1723         (constructor_name_p): Assert IS_AGGR_TYPE.
1725 2008-01-18  Ian Lance Taylor  <iant@google.com>
1727         PR c++/33407
1728         * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
1729         (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
1730         DECL_IS_OPERATOR_NEW flag.
1732 2008-01-16  Richard Guenther  <rguenther@suse.de>
1734         PR c++/33819
1735         * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
1736         for conversions to type variants.
1738 2008-01-15  Andreas Tobler  <a.tobler@schweiz.org>
1740         * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
1741         declaration and code.  Update copyright year.
1743 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
1745         PR c++/34399
1746         * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
1747         know we have a class type.
1749 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
1751         PR c++/34751
1752         * pt.c (coerce_template_parameter_pack): When substituting into
1753         the type of a non-type template parameter pack. use the
1754         deduced/substituted arguments.
1755         * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
1756         can be a parameter pack with the ellipsis following it.  When we
1757         have an erroneous declaration, allow it to be a parameter pack.
1758         (cp_parser_template_parameter): Complain about default
1759         arguments on non-type template parameter packs, and parse them
1760         using the new cp_parser_default_argument.
1761         (cp_parser_parameter_declaration): Complain about parameter packs
1762         with default arguments. Move parsing of default arguments into a
1763         new function, cp_parser_default_argument.
1764         (cp_parser_default_argument): New; extracted from
1765         cp_parser_parameter_declaration.
1767 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
1769         PR c++/34051
1770         PR c++/34055
1771         PR c++/34102
1772         PR c++/34103
1773         * typeck.c (check_return_expr): If there are bare parameter packs
1774         in the return value, set it to error_mark_node.
1775         * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
1776         * pt.c (find_parameter_packs_r): Look at the type of
1777         IDENTIFIER_NODEs (e.g., for user-defined conversions).
1778         (check_for_bare_parameter_packs): Flip the result: now returns
1779         TRUE when there were bare parameter packs, FALSE otherwise.
1780         (push_template_decl_real): Deal with flipped result of
1781         check_for_bare_parameter_packs.
1782         * semantics.c (finish_cond): If there are bare parameter packs in
1783         the conditional, set it to error_mark_node.
1784         (finish_expr_stmt): If there are bare parameter packs in the
1785         expression, set it to error_mark_node.
1786         (finish_for_expr): Ditto.
1787         (finish_switch_cond): If there are bare parameter packs in
1788         the conditional, set it to error_mark_node.
1789         (finish_mem_initializers): If there are bare parameter packs in
1790         the member initializer, set it to error_mark_node.
1791         (finish_member_declaration): Check the attributes of the
1792         declaration for bare parameter packs, and remove the attributes if
1793         any have bare parameter packs.
1794         * parser.c (cp_parser_using_declaration): Check the using
1795         declaration for bare parameter packs.
1796         (cp_parser_base_clause): If there are bare parameter packs in a
1797         base specifier, don't add it to the chain.
1799 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
1801        PR c++/34314
1802        * error.c (dump_simple_decl): Display ellipsis for template
1803        non-type parameter packs.
1804        (dump_decl): Display ellipsis for template type parameter packs.
1805        (dump_template_decl): Display ellipsis for template template
1806        parameter packs.
1807        * pt.c (redeclare_class_template): When redeclaring a class
1808        template, check for collisions between template parameters and
1809        template parameter packs.
1811 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
1813        PR c++/33964
1814        * pt.c (process_partial_specialization): Don't mark template
1815        parameters that occur in non-deduced contexts.
1816        (struct pair_fn_data): Add include_nondeduced_p.
1817        (for_each_template_parm_r): Only visit non-deduced contexts if
1818        include_nondeduced_p is set.
1819        (for_each_template_parm): Added parameter include_nondeduced_p,
1820        which states whether template parameters found in non-deduced
1821        contexts should be visited.
1822        (uses_template_parms): Visit all template parameters, even those
1823        in non-deduced contexts.
1825 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
1827        PR c++/34052
1828        * pt.c (check_default_tmpl_args): Check for parameter packs that
1829        aren't at the end of a primary template.
1830        (push_template_decl_real): Remove check for parameter packs that
1831        aren't at the end of a primary template; that now happens in
1832        check_default_tmpl_args.
1833        * semantics.c (finish_template_template_parm): Use
1834        check_default_tmpl_args to check for errors in the template
1835        parameter list.
1836         
1837 2008-01-12  Doug Kwan  <dougkwan@google.com>
1839         * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
1840         instead of OPT_Wreturn_type in warning due to ignored return type
1841         qualifiers.
1842         * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
1843         instead of OPT_Wreturn_type in warning due to ignored return type
1844         qualifiers.
1846 2008-01-08  Jakub Jelinek  <jakub@redhat.com>
1848         PR c++/33890
1849         * semantics.c (finish_omp_for): Don't call
1850         fold_build_cleanup_point_expr if processing_template_decl.
1852 2008-01-04  Paolo Carlini  <pcarlini@suse.de>
1853             Jakub Jelinek  <jakub@redhat.com>
1855         PR c++/34611
1856         * error.c (dump_template_argument): Deal with TREE_LIST.
1858 2008-01-01  Douglas Gregor  <doug.gregor@gmail.com>
1860        * parser.c (cp_parser_check_decl_spec): Don't warn about "long
1861        long" in C++0x mode; change the warning to note that "long long"
1862        is only unsupported in C++98 mode.
1864 2007-12-20  Jason Merrill  <jason@redhat.com>
1866         PR c++/34111
1867         * call.c (standard_conversion): Derived-to-base is considered a
1868         standard conversion.
1870 2007-12-19  Jakub Jelinek  <jakub@redhat.com>
1872         PR c++/34513
1873         * parser.c (cp_parser_omp_parallel): For non-combined parallel
1874         call cp_parser_statement rather than
1875         cp_parser_already_scoped_statement.
1877 2007-12-18  Jason Merrill  <jason@redhat.com>
1879         PR c++/34206
1880         * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't 
1881         use template parms.
1882         (dependent_type_p_r): Handle the domain of an array.
1884 2007-12-18  Douglas Gregor  <doug.gregor@gmail.com>
1885             Jakub Jelinek  <jakub@redhat.com>
1886         
1887         PR c++/32565
1888         PR c++/33943
1889         PR c++/33965
1890         * pt.c (template_template_parm_bindings_ok_p): New; verifies
1891         bindings of template template parameters after all template
1892         arguments have been deduced.
1893         (coerce_template_parms): Don't complain when COMPLAIN doesn't
1894         include tf_error.
1895         (fn_type_unification): Use template_template_parm_bindings_ok_p. 
1896         (unify): Deal with variadic, bound template template parameters. 
1897         (get_class_bindings): Use template_template_parm_bindings_ok_p. 
1899 2007-12-18  Jakub Jelinek  <jakub@redhat.com>
1901         PR c++/34488
1902         * decl.c (grokdeclarator): Reject friend sfk_constructor
1903         FUNCTION_TYPE.
1905 2007-12-17  Jakub Jelinek  <jakub@redhat.com>
1907         PR c/34506
1908         * parser.c (cp_parser_omp_all_clauses): Accept optional comma
1909         in between clauses.
1911 2007-12-15  Alexandre Oliva  <aoliva@redhat.com>
1913         PR debug/7081
1914         * cp-lang.c (cp_classify_record): New.
1915         (LANG_HOOKS_CLASSIFY_RECORD): Override.
1917 2007-12-11  Jakub Jelinek  <jakub@redhat.com>
1919         PR c++/34238
1920         * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
1922         PR c++/34364
1923         * rtti.c (build_dynamic_cast): Call convert_from_reference even for
1924         dynamic_cast in a template.
1926 2007-12-10  Simon Martin  <simartin@users.sourceforge.net>
1928         PR c++/34059
1929         * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
1930         MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
1932 2007-12-10  Jakub Jelinek  <jakub@redhat.com>
1934         PR c++/34395
1935         * error.c (dump_type_prefix, dump_type_suffix): Handle
1936         TYPE_PACK_EXPANSION.
1938         PR c++/34394
1939         * error.c (dump_expr): Handle ABS_EXPR.
1941 2007-12-09  Jakub Jelinek  <jakub@redhat.com>
1943         PR c++/34178
1944         PR c++/34340
1945         * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
1946         in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1947         Return 2 also if DECL_EXPLICIT_INSTANTIATION.
1948         * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
1949         flag_use_repository and repo_emit_p returned 2.
1951 2007-12-06  Jakub Jelinek  <jakub@redhat.com>
1953         PR c++/34336
1954         * tree.c (stabilize_call, stabilize_init): Do nothing if
1955         processing_template_decl.
1957 2007-12-05  Jakub Jelinek  <jakub@redhat.com>
1959         PR c++/34271
1960         * semantics.c (finish_decltype_type): For SCOPE_REF issue an
1961         error instead of assertion failure.
1962         * parser.c (cp_parser_decltype): If closing paren is not found,
1963         return error_mark_node.
1965 2007-12-04  Douglas Gregor  <doug.gregor@gmail.com>
1967        PR c++/34101
1968        * name-lookup.c (arg_assoc_template_arg): Recurse on argument
1969        packs.
1970        (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
1971        since arg_assoc_template_arg will deal with them (better).
1973 2007-12-04  Douglas Gregor  <doug.gregor@gmail.com>
1975        PR c++/33509
1976        * pt.c (tsubst_exception_specification): Handle substitutions into
1977        member templates, where tsubst_pack_expansion returns a
1978        TYPE_PACK_EXPANSION.
1980 2007-12-04  Douglas Gregor  <doug.gregor@gmail.com>
1982        PR c++/33091
1983        * pt.c (unify_pack_expansion): If we didn't deduce any actual
1984        bindings for the template parameter pack, don't try to keep the
1985        empty deduced arguments.
1986        (unify): If a parameter is a template-id whose template argument
1987        list contains a pack expansion that is not at the end, then we
1988        cannot unify against that template-id.
1990 2007-12-02  Paolo Carlini  <pcarlini@suse.de>
1992         PR c++/34061
1993         * pt.c (current_template_args): Use error_operand_p.
1995 2007-12-02  Paolo Carlini  <pcarlini@suse.de>
1997         PR c++/34273
1998         * error.c (dump_decl): Handle TREE_BINFO.
2000 2007-12-01  Ollie Wild  <aaw@google.com>
2002         PR c++/8171
2003         * typeck.c (build_binary_op): Add conversion of pointers to function
2004         members appearing as operands to the equality operators.
2006 2007-11-30  Jakub Jelinek  <jakub@redhat.com>
2008         PR c++/34275
2009         * error.c (dump_expr): Handle OBJ_TYPE_REF.
2011 2007-11-29  Jakub Jelinek  <jakub@redhat.com>
2013         PR c++/34270
2014         * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
2015         in templates.
2016         * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
2017         Likewise.
2019         PR c++/34267
2020         PR c++/34268
2021         * parser.c (cp_parser_decltype): Don't call finish_id_expression
2022         on ~type.
2023         * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
2024         and ~type early.
2026 2007-11-27  Jakub Jelinek  <jakub@redhat.com>
2028         PR tree-optimization/34181
2029         * method.c (use_thunk): Don't inline the call in the thunk.
2031         PR c++/34213
2032         * tree.c (decl_linkage): Static data members and static member
2033         functions in anonymous ns classes are lk_external.
2035 2007-11-26  Andreas Krebbel  <krebbel1@de.ibm.com>
2037         PR c++/34081
2038         * decl.c (start_preparsed_function): Pass 
2039         processing_template_decl for the new allocate_struct_function
2040         parameter.
2042 2007-11-25  Richard Guenther  <rguenther@suse.de>
2044         * decl.c (poplevel): Use BLOCK_CHAIN.
2046 2007-11-24  Ollie Wild  <aaw@google.com>
2048         * typeck.c (delta_from_ptrmemfunc): New function.
2049         (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
2050         (build_binary_op): Call delta_from_ptrmemfunc.
2052 2007-11-23  Jakub Jelinek  <jakub@redhat.com>
2054         PR c++/30293
2055         PR c++/30294
2056         * decl.c (cp_finish_decl): Disallow variable or field
2057         definitions if extern "Java" aggregates.
2058         (grokparms): Disallow parameters with extern "Java"
2059         aggregates.
2060         (check_function_type): Disallow function return values
2061         with extern "Java" aggregates.
2062         * init.c (build_new_1): Disallow placement new with
2063         extern "Java" aggregates.
2065 2007-11-23  Mark Mitchell  <mark@codesourcery.com>
2066             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2067         
2068         PR c++/5310
2069         * call.c (convert_like_real): Build a zero constant when __null is
2070         converted to an integer type.
2071         
2072 2007-11-22  Jakub Jelinek  <jakub@redhat.com>
2074         PR c++/34094
2075         * decl2.c (cp_write_global_declarations): Issue error about static
2076         data members in anonymous namespace which are declared and used,
2077         but not defined.
2079 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
2081         PR c++/34089
2082         * parser.c (cp_parser_class_head): Reject function template ids.
2084         PR c++/28879
2085         * tree.c (build_cplus_array_type_1): Don't pass any VLA types
2086         when processing_template_decl to build_array_type.
2088         PR c++/33962
2089         * pt.c (more_specialized_fn): Don't segfault if one or
2090         both argument list end with ellipsis.
2092 2007-11-18  Jakub Jelinek  <jakub@redhat.com>
2094         PR c++/30988
2095         * semantics.c (finish_call_expr): Set
2096         current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
2097         or OVERLOAD with all noreturn functions.
2099 2007-11-16  Jakub Jelinek  <jakub@redhat.com>
2101         PR c++/34100
2102         * pt.c (apply_late_template_attributes): Do nothing if decl's type is
2103         error_mark_node.
2105 2007-11-13  Jakub Jelinek  <jakub@redhat.com>
2107         PR c++/34054
2108         PR c++/34056
2109         PR c++/34057
2110         PR c++/34058
2111         PR c++/34060
2112         * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
2113         set to error_mark_node the outermost POINTER_TYPE to the pack if
2114         it is seen in a POINTER_TYPE.
2115         (push_template_decl_real): If check_for_bare_parameter_packs
2116         fails for function return type, set the return type to
2117         integer_type_node.  If check_for_bare_parameter_packs failed
2118         for non-function, return error_mark_node.
2120         PR c++/29225
2121         * call.c (build_new_op): Call resolve_args before calling
2122         build_over_call.
2124 2007-11-11  Tom Tromey  <tromey@redhat.com>
2126         PR c++/17577:
2127         * lex.c (handle_pragma_implementation): Use cpp_included_before.
2129 2007-11-12  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2131         PR c++/8570
2132         * pt.c (redeclare_class_template): Update error message. Use a
2133         note to show the previous declaration.
2134         (tsubst_friend_class): Use the location of the friend template as
2135         the input location before calling redeclare_class_template.
2137 2007-11-11  Jakub Jelinek  <jakub@redhat.com>
2139         PR c++/34068
2140         * semantics.c (finish_pseudo_destructor_expr): Handle
2141         object == error_mark_node.
2143 2007-11-10  Jakub Jelinek  <jakub@redhat.com>
2145         PR c++/32241
2146         * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
2147         is not scalar type, let finish_class_member_access_expr handle
2148         diagnostics.  Pass BIT_NOT_EXPR argument to
2149         finish_pseudo_destructor_expr.  Handle SCOPE_REF properly.
2151 2007-11-09  Douglas Gregor  <doug.gregor@gmail.com>
2153         PR c++/33510
2154         * decl.c (cp_complete_array_type): If any of the initializer
2155         elements are pack expansions, don't compute the array size yet.
2157 2007-11-08  Andrew Pinski  <pinskia@gmail.com>
2159         PR c++/30297:
2160         * tree.c (decl_linkage): Fields have no linkage.
2162 2007-11-08  Daniel Jacobowitz  <dan@codesourcery.com>
2164         * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
2166 2007-11-07  Douglas Gregor  <doug.gregor@gmail.com>
2168         PR c++/33045
2169         PR c++/33837
2170         PR c++/33838
2171         * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
2172         Be careful with ERROR_MARK_NODEs.
2173         * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
2174         argument.
2176 2007-11-07  Jakub Jelinek  <jakub@redhat.com>
2178         PR c++/33501
2179         * call.c (build_over_call): Don't check TREE_ADDRESSABLE
2180         on incomplete type.
2182 2007-11-06  Douglas Gregor  <doug.gregor@gmail.com>
2184         PR c++/33977
2185         PR c++/33886
2186         * tree.c (c_build_qualified_type): Define bridge to
2187         cp_build_qualified_type.
2189 2007-11-06  Douglas Gregor  <doug.gregor@gmail.com>
2191         PR c++/31439
2192         PR c++/32114
2193         PR c++/32115
2194         PR c++/32125
2195         PR c++/32126
2196         PR c++/32127
2197         PR c++/32128
2198         PR c++/32253
2199         PR c++/32566
2200         * typeck.c (check_return_expr): Pass address of retval to
2201         check_for_bare_parameter_packs.
2202         * class.c (build_base_field): Tolerate bases that have no layout
2203         due to errors.
2204         (end_of_base): Ditto.
2205         * tree.c (canonical_type_variant): Be careful with
2206         ERROR_MARK_NODE.
2207         * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
2208         tree*.
2209         * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
2210         which states whether parameter packs should be replaced with
2211         ERROR_MARK_NODE.
2212         (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
2213         possible. If set_packs_to_error is set true, replace the parameter
2214         pack with ERROR_MARK_NODE. Manage our own pointer sets.
2215         (uses_parameter_packs): Don't set parameter packs to
2216         ERROR_MARK_NODE.
2217         (check_for_bare_parameter_packs): Now takes a pointer to a tree,
2218         which may be modified (if it is a parameter pack). Instructs
2219         find_parameter_packs_r to replace parameter packs with
2220         ERROR_MARK_NODE (so that they won't cause errors later on).
2221         (process_template_parm): Pass pointer to
2222         check_for_bare_parameter_packs.
2223         (process_partial_specialization): Replace pack expansions before
2224         the end of the template argument list with ERROR_MARK_NODE.
2225         (push_template_decl_real): Pass pointer to
2226         check_for_bare_parameter_packs. Replace parameter packs not at the
2227         end of the template parameter list with ERROR_MARK_NODE.
2228         (convert_template_argument): Be more careful about using DECL_NAME
2229         on only declarations.
2230         (unify): Can't unify against ERROR_MARK_NODE.
2231         * semantics.c (finish_cond): Pass pointer to
2232         check_for_bare_parameter_packs.
2233         (finish_expr_stmt): Ditto.
2234         (finish_for_expr): Ditto.
2235         (finish_switch_cond): Pass pointer to
2236         check_for_bare_parameter_packs, and call it before we put the
2237         condition into the statement.
2238         (finish_mem_initializers): Pass pointer to
2239         check_for_bare_parameter_packs.
2240         (finish_member_declaration): Ditto.
2241         * parser.c (cp_parser_base_clause): Ditto.
2242         
2243 2007-11-06  Jakub Jelinek  <jakub@redhat.com>
2245         PR target/33168
2246         * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
2247         with the final TREE_READONLY flag in place.  processing_template_decl
2248         is known to be 0 in this part of function.
2250         PR c++/33894
2251         * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
2252         OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
2253         * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
2254         * semantics.c (finish_omp_atomic): Revert most of the
2255         2007-02-05 changes, just keep the new representation of
2256         OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
2258 2007-11-05  H.J. Lu  <hongjiu.lu@intel.com>
2260         PR c++/33871
2261         * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
2262         local.
2264 2007-11-05  Douglas Gregor  <doug.gregor@gmail.com>
2266         PR c++/33996
2267         PR c++/33235
2268         PR c++/33930
2269         * typeck.c (merge_types): Don't lose rvalue references when
2270         merging types.
2271         * call.c (build_over_call): Don't elide move constructors just
2272         because the copy constructor is trivial (!).
2273         (compare_ics): If comparing cv-qualifiers fails, we can still order
2274         based on binding lvalues vs. rvalues.
2276 2007-11-05  Douglas Gregor  <doug.gregor@gmail.com>
2278         PR c++/33939
2279         * pt.c (unify_pack_expansion): bring handling of function call
2280         arguments into line with type_unification_real. 
2282 2007-11-05  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2284         * typeck.c (build_binary_op): Use pedwarn instead of error for
2285         consistency.
2287 2007-11-05  Jakub Jelinek  <jakub@redhat.com>
2289         PR c++/33836
2290         * parser.c (cp_parser_unary_expression): For &&label call
2291         cp_parser_non_integral_constant_expression and return error_mark_node
2292         if it returned true.
2294         PR c++/33969
2295         * decl.c (grokdeclarator): Don't call build_memfn_type if type
2296         is neither FUNCTION_TYPE nor METHOD_TYPE.
2298 2007-11-02  Jakub Jelinek  <jakub@redhat.com>
2300         PR c++/33516
2301         * parser.c (cp_parser_nested_name_specifier_opt): Use
2302         TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
2303         typedef of currently open class.
2305 2007-11-02  Paolo Carlini  <pcarlini@suse.de>
2307         PR c++/33495
2308         * error.c (dump_expr): Deal specially with statements.
2310 2007-11-01  Jason Merrill  <jason@redhat.com>
2312         PR c++/30897
2313         * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
2314         template parms.
2315         (lookup_template_class): Use it to get the outer template args
2316         for instantiating one.
2318         PR c++/29236
2319         * pt.c (reduce_template_parm_level): tsubst the parameters
2320         of a template template parm.
2322 2007-11-01  Douglas Gregor  <doug.gregor@gmail.com>
2324         PR c++/33955
2325         * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
2327 2007-11-01  Jakub Jelinek  <jakub@redhat.com>
2329         PR c++/32384
2330         * parser.c (cp_parser_postfix_dot_deref_expression): If
2331         POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
2332         first and if that succeeds and type is SCALAR_TYPE_P, create
2333         PSEUDO_DTOR_EXPR.
2335         PR c++/32260
2336         * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
2337         (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
2338         as for std::type_info.
2340 2007-10-31  Paolo Carlini  <pcarlini@suse.de>
2342         PR c++/33494
2343         * cxx-pretty-print.c (pp_cxx_typeid_expression,
2344         pp_cxx_delete_expression): Change to static linkage.
2345         * cxx-pretty-print.h: Adjust declarations.
2346         * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
2347         MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
2348         MODOP_EXPR): Forward to pp_expression.
2350         * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
2351         Fix typo.
2353 2007-10-31 Christian Bruel  <christian.bruel@st.com>
2354            Mark Mitchell  <mark@codesourcery.com>
2356         PR c++/19531
2357         * typeck.c (check_return_expr): Don't set named_return_value_okay_p
2358         if retval is volatile. 
2359         
2360 2007-10-30  Jakub Jelinek  <jakub@redhat.com>
2362         PR c++/33616
2363         * decl2.c (build_offset_ref_call_from_tree): Call
2364         build_non_dependent_expr on object prior to building ADDR_EXPR from it
2365         if FN is DOTSTAR_EXPR.
2367 2007-10-30  Douglas Gregor  <doug.gregor@gmail.com>
2369         PR c++/31993
2370         PR c++/32252
2371         * pt.c (find_parameter_packs_r): Fix typo in comment.
2372         (convert_template_argument): Look at the pattern of a pack
2373         expansion to determine what kind of entity we're converting.
2374         (coerce_template_parameter_pack): When we have coerced a non-type
2375         template parameter pack, substitute into the type of that pack.
2376         (tsubst_pack_expansion): When our substitution of a parameter pack
2377         is a "trivial" substitution of itself, just substitute into the
2378         pack expansion rather than actually expanding.
2380 2007-10-29  Jakub Jelinek  <jakub@redhat.com>
2382         PR c++/33841
2383         * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
2384         for non-integral type bitfields.  Return true if bitfield is correct, false
2385         error has been diagnosed.
2386         (check_field_decls): If check_bitfield_decl returned false, call also
2387         check_field_decl.
2389 2007-10-28  Paolo Carlini  <pcarlini@suse.de>
2390             Mark Mitchell  <mark@codesourcery.com>
2392         PR c++/30659
2393         * pt.c (do_decl_instantiation): If the VAR_DECL is not a
2394         class member error out and return.
2396 2007-10-27  Jakub Jelinek  <jakub@redhat.com>
2398         * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
2399         to current_function_decl rather than 0.
2401         PR c++/33844
2402         * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
2403         ->* rather than .*.
2404         * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
2406 2007-10-27  Jason Merrill  <jason@redhat.com>
2408         PR c++/5247
2409         * call.c (convert_default_arg): Detect recursion.
2411 2007-10-27  Jakub Jelinek  <jakub@redhat.com>
2413         PR c++/33842
2414         * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
2415         * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
2416         OFFSETOF_EXPR.
2417         (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
2418         functions.
2419         * error.c (dump_expr): Handle OFFSETOF_EXPR.
2421 2007-10-26  Jason Merrill  <jason@redhat.com>
2423         PR c++/24791
2424         * pt.c (get_template_info): New fn.
2425         (template_class_depth): Use it.
2426         (push_template_decl_real): Check that the template args of the 
2427         definition match the args of the previous declaration.
2429 2007-10-26  Paolo Carlini  <pcarlini@suse.de>
2431         PR c++/31988
2432         * decl2.c (coerce_new_type): Do not allow a default argument for
2433         the first parameter.
2435 2007-10-26  Douglas Gregor  <doug.gregor@gmail.com>
2437         PR c++/33839
2438         * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
2439         don't see the leading '('. Only lookup names if we get an
2440         IDENTIFIER_NODE.
2442 2007-10-26  Jakub Jelinek  <jakub@redhat.com>
2444         PR c++/33744
2445         * parser.c (cp_parser_parenthesized_expression_list): Set
2446         greater_than_is_operator_p to true in between the parens.
2448 2007-10-26  Paolo Carlini  <pcarlini@suse.de>
2450         PR c++/31747
2451         * decl.c (grokdeclarator): In case of conflicting specifiers
2452         just return error_mark_node.
2454 2007-10-26  Ollie Wild  <aaw@google.com>
2456         * expr.c (cxx_expand_expr): Removed.
2457         * cp-tree.h (exx_expand_expr): Removed.
2458         * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
2459         with c_expand_expr.
2461 2007-10-25  Paolo Carlini  <pcarlini@suse.de>
2463         PR c++/33843
2464         * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
2466 2007-10-23  Jason Merrill  <jason@redhat.com>
2468         PR c++/25950 (DR 391)
2469         * call.c (struct conversion): Remove check_copy_constructor_p.
2470         (reference_binding): Always bind a reference directly to a 
2471         compatible class rvalue.  Pass down LOOKUP_NO_TEMP_BIND during 
2472         temporary creation.
2473         (check_constructor_callable): Remove.
2474         (convert_like_real): Don't call it.
2475         (initialize_reference): Don't call check_constructor_callable.
2476         (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
2477         LOOKUP_CONSTRUCTOR_CALLABLE.  Don't require a temporary for base
2478         conversions if LOOKUP_NO_TEMP_BIND.
2479         (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
2480         (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
2481         second conversion.
2482         * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
2484 2007-10-22  Jakub Jelinek  <jakub@redhat.com>
2486         PR c++/33372
2487         * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
2488         before checking if its type is integral.
2490 2007-10-22  Jason Merrill  <jason@redhat.com>
2492         PR c++/33620
2493         * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
2494         * pt.c (apply_late_template_attributes): Splice out dependent
2495         attributes from DECL_ATTRIBUTES.
2497         * decl.c (cxx_maybe_build_cleanup): Use build_address.
2499 2007-10-17  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2501         * typeck.c (build_binary_op) : Use appropriate warning option
2502         instead of unnamed warning.
2504 2007-10-16  Paolo Carlini  <pcarlini@suse.de>
2506         PR c++/31446
2507         * pt.c (current_template_args): Do not change TREE_LIST elements
2508         with a TREE_VALUE of error_mark_node.
2510 2007-10-16  Mark Mitchell  <mark@codesourcery.com>
2512         * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
2513         * decl.c (start_decl): Tidy.
2514         (start_decl_1): Call cp_apply_type_quals_to_decl after completing
2515         the type.
2516         (grokdeclarator): Clarify comment.
2518 2007-10-14  Andrew Pinski  <pinskia@gmail.com>
2520         PR c++/30303
2521         * decl.c (grokfndecl): Return NULL after the "definition of
2522         implicitly-declared" error happened.
2524 2007-10-12  Simon Martin  <simartin@users.sourceforge.net>
2526         PR c++/26698
2527         * call.c (build_user_type_conversion_1): Do not consider conversion
2528         functions to convert a (possibly cv-qualified) object to the (possibly
2529         cv-qualified) same object type (or a reference to it), to a (possibly
2530         cv-qualified) base class of that type (or a reference to it).
2532 2007-10-12  Paolo Carlini  <pcarlini@suse.de>
2534         * pt.c (tsubst): Use template_parm_level_and_index.
2536 2007-10-12  Jakub Jelinek  <jakub@redhat.com>
2538         PR c++/32121
2539         * parser.c (cp_parser_compound_statement): Handle label-declarations
2540         at the beginning of the compound statement.
2541         (cp_parser_block_declaration): Issue diagnostics about __label__
2542         not at the beginning of a block.
2544 2007-10-11  Paolo Carlini  <pcarlini@suse.de>
2546         PR c++/33461
2547         * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
2548         to convert_template_argument.
2549         (coerce_template_parms): Return error_mark_node after fixed-length
2550         error.
2551         (tsubst_decl): Check for error_mark_node the return value of the
2552         first tsubst in 'case VAR_DECL'.
2554 2007-10-08  Ollie Wild  <aaw@google.com>
2556         * typeck2.c (digest_init): Call cplus_expand_constant after
2557         convert_for_initialization.
2558         * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
2559         * expr.c (cplus_expand_constant): Updated function description.
2561 2007-10-04  Jason Merrill  <jason@redhat.com>
2563         PR c++/20416
2564         * call.c (initialize_reference): Handle local static reference
2565         temps properly.
2567 2007-10-03  Jason Merrill  <jason@redhat.com>
2569         PR c++/32470
2570         * name-lookup.c (push_namespace_with_attrs): Fold back into...
2571         (push_namespace): Here.
2572         (handle_namespace_attrs): New fn for the attr code.
2573         (leave_scope): Don't pop_visibility.
2574         * name-lookup.h (struct cp_binding_level): Remove has_visibility.
2575         * parser.c (cp_parser_namespace_definition): Call
2576         handle_namespace_attrs and pop_visibility as appropriate. 
2578         PR c++/11756
2579         * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
2581 2007-10-03  Alexandre Oliva  <aoliva@redhat.com>
2583         * decl.c (duplicate_decls): Preserve linkage flags for mere
2584         redeclarations of gnu_inline definitions.
2586 2007-10-03  Jason Merrill  <jason@redhat.com>
2588         PR c++/15764
2589         * decl.c (wrap_cleanups_r): New fn.
2590         (wrap_temporary_cleanups): New fn.
2591         (initialize_local_var): Call it.
2593 2007-09-29  Jason Merrill  <jason@redhat.com>
2595         PR c++/33094
2596         * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member 
2597         constant to not have DECL_EXTERNAL if it's file-local.
2599 2007-09-28  Ollie Wild  <aaw@google.com>
2601         Revert
2602         2007-09-27  Ollie Wild  <aaw@google.com>
2604         * typeck2.c (digest_init): Call cplus_expand_constant after
2605         convert_for_initialization.
2606         * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
2607         * expr.c (cplus_expand_constant): Updated function description.
2609 2007-09-28  Jason Merrill  <jason@redhat.com>
2611         PR c++/10179
2612         * class.c (layout_empty_base): Take rli parameter, update
2613         rli->record_align if empty base has user-specified alignment.
2614         (build_base_field): Pass rli to it.
2616 2007-09-28  Paolo Carlini  <pcarlini@suse.de>
2618         PR c++/33213
2619         * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
2621 2007-09-28  Paolo Carlini  <pcarlini@suse.de>
2623         PR c++/33118
2624         * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
2625         (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
2626         (dump_parameters): Just call dump_type for argument packs too.
2628 2007-09-28  Jakub Jelinek  <jakub@redhat.com>
2630         PR c++/31434
2631         * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
2632         qualification by creating qualified PACK_EXPANSION_PATTERN and
2633         then calling make_pack_expansion on it.
2635 2007-09-27  Ollie Wild  <aaw@google.com>
2637         * typeck2.c (digest_init): Call cplus_expand_constant after
2638         convert_for_initialization.
2639         * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
2640         * expr.c (cplus_expand_constant): Updated function description.
2642 2007-09-27  Jason Merrill  <jason@redhat.com>
2644         PR c++/33571
2645         * decl2.c (is_late_template_attribute): Don't crash on unknown
2646         attribute.
2648 2007-09-27  Paolo Carlini  <pcarlini@suse.de>
2650         PR c++/33493
2651         * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
2652         * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
2653         spaces in the formatting.
2654         * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
2656 2007-09-27  Jakub Jelinek  <jakub@redhat.com>
2658         * error.c (cxx_print_error_function): Add third argument, pass
2659         it over to lhd_print_error_function.
2660         (cp_print_error_function): If diagnostic->abstract_origin, print
2661         virtual backtrace.
2662         * cp-tree.h (struct diagnostic_info): New forward decl.
2663         (cxx_print_error_function): Add third argument.
2665 2007-09-25  Simon Martin  <simartin@users.sourceforge.net>
2667         PR c++/33207
2668         * name-lookup.c (pushtag): Do not create an implicit typedef before
2669         the associated type declaration is known to be valid.
2671 2007-09-25  Jakub Jelinek  <jakub@redhat.com>
2673         * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
2674         rather than pointers.
2676 2007-09-24  Danny Smith  <dannysmith@user.sourceforge.net>
2678         PR c++/14688
2679         * search.c (check_final_overrider): Fail if
2680         targetm.comp_type_attributes returns 0.
2682 2007-09-24  Jason Merrill  <jason@redhat.com>
2684         PR c++/33239
2685         * pt.c (resolve_typename_type): Don't look things up in the original
2686         template if it would mean losing template arguments.    
2688 2007-09-24  Jakub Jelinek  <jakub@redhat.com>
2690         PR c++/33506
2691         * cp-tree.h (cxx_type_hash_eq): New prototype.
2692         * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
2693         * tree.c (cxx_type_hash_eq): New function.
2695 2007-09-24  Douglas Gregor  <doug.gregor@gmail.com>
2697         PR c++/33185    
2698         * tree.c (cp_build_qualified_type_real): Build a canonical
2699         ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
2700         
2701 2007-09-24  Douglas Gregor  <doug.gregor@gmail.com>
2703         PR c++/33112
2704         PR c++/33185    
2705         * tree.c (cplus_array_compare): Compare pointers, not types.
2706         (build_cplus_array_type_1): Store new array type into the hash
2707         table before building the canonical type; build the canonical type
2708         correctly.
2709         (cp_build_qualified_type_real): Put all of the array types with
2710         cv-qualified element types into the C++ array hash table, built as 
2711         variants of the unqualified versions.
2712         
2713 2007-09-23  Jason Merrill  <jason@redhat.com>
2715         PR c++/16370
2716         * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
2717         for deprecation warnings.
2719 2007-09-22  Jason Merrill  <jason@redhat.com>
2721         PR c++/15269
2722         * call.c (build_over_call): Warn about deprecated virtuals.
2724         PR c++/19407
2725         * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
2726         (MAYBE_TAGGED_TYPE_P): Remove.
2727         * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
2728         instead of calling is_late_template_attribute again.
2729         (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
2730         (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
2731         Don't crash on typedefs from non-template classes.
2732         * decl2.c (grokfield): Don't sorry about attrs on template parms.
2733         (is_late_template_attribute): All attributes applied to template
2734         parms or typename types are dependent.  Static.
2735         (splice_template_attributes): Pass decl through.
2736         (save_template_attributes): Likewise.
2738 2007-09-20  Jakub Jelinek  <jakub@redhat.com>
2740         PR c++/33496
2741         * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
2742         returned from tsubst_pack_expansion.
2743         (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
2744         (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
2746 2007-09-20  Paolo Carlini  <pcarlini@suse.de>
2748         PR c++/33460
2749         * semantics.c (finish_id_expression): Use consistently
2750         context_for_name_lookup.
2751         * decl.c (fixup_anonymous_aggr): Fix error message for
2752         anonymous struct (vs union).
2754 2007-09-19  Jason Merrill  <jason@redhat.com>
2756         PR c++/7586
2757         * pt.c (tsubst): Handle typedefs by looking for the specialization.
2758         (retrieve_specialization): Only tagged types use 
2759         DECL_TEMPLATE_INSTANTIATIONS.
2760         (instantiate_class_template): Push nested classes too.
2761         (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
2762         tagged types.
2763         * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
2764         * init.c (is_aggr_type): Remove redundant tests.
2765         * class.c (push_nested_class): Use CLASS_TYPE_P.
2767 2007-09-20  Paolo Carlini  <pcarlini@suse.de>
2769         PR c++/33459
2770         * init.c (build_zero_init): If, recursively, build_zero_init
2771         returns a NULL_TREE, do not append it to the VEC of constructors.
2773 2007-09-18  Jason Merrill  <jason@redhat.com>
2775         PR c++/17743
2776         * pt.c (apply_late_template_attributes): Set processing_template_decl.
2777         (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
2778         ATTR_FLAG_TYPE_IN_PLACE.
2779         (tsubst): Do unqualified lookup to find typedefs from current class.
2780         [ARRAY_TYPE]: Propagate alignment info.
2781         * decl2.c (is_late_template_attribute): Only defer handling of
2782         attribute aligned if the expression is dependent.
2783         (save_template_attributes): If we're deferring any attributes,
2784         make this a naming typedef.
2786 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
2788         PR c++/33462 (again)
2789         * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
2790         va_arg instead of __builtin_va_arg.
2792 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
2794         PR c++/33462
2795         * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
2796         (pp_cxx_primary_expression): Use it.
2797         * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
2798         * error.c (dump_expr): Use it.
2800 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
2802         PR c++/33463
2803         * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
2804         out case TYPEID_EXPR to...
2805         (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
2806         and pp_cxx_right_paren.
2807         * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
2808         * error.c (dump_expr): Use it.
2810 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
2812         PR c++/33464
2813         * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
2814         (pp_cxx_primary_expression): Use it.
2815         * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
2816         * error.c (dump_expr): Use it.
2818 2007-09-16  Paolo Carlini  <pcarlini@suse.de>
2820         PR c++/33124
2821         * init.c (build_new): Remove warning for zero-element
2822         allocations.
2824 2007-09-16  Nathan Sidwell  <nathan@codesourcery.com>
2826         PR c++/32756
2827         * call.c (maybe_handle_implicit_object): Set this_p, clear
2828         rvaluedness_matches_p.
2829         (compare_ics): Do not compare rvaluedness matching when one of the
2830         operands is an implicit object.
2832 2007-09-14  Jason Merrill  <jason@redhat.com>
2834         PR c++/17743, c++/19163
2835         * decl2.c (is_late_template_attribute): New fn.
2836         (splice_template_attributes, save_template_attributes): New fns.
2837         (cplus_decl_attributes): Call save_template_attributes.
2838         * pt.c (apply_late_template_attributes): New fn.
2839         (instantiate_class_template, tsubst_decl): Use it.
2840         * cp-tree.h: Declare is_late_template_attribute.
2842 2007-09-13  Tom Tromey  <tromey@redhat.com>
2844         * parser.c (cp_lexer_new_main): Don't use
2845         c_lex_return_raw_strings.
2846         (cp_lexer_get_preprocessor_token): Update.  Add special case when
2847         lexer is NULL.
2849 2007-09-11  Jan Hubicka <jh@suse.cz>
2851         * method.c (use_thunk): Use tree_rest_of_compilation
2852         * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
2853         (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
2854         * cp-tree.h (expand_body): Kill.
2855         (emit_associated_thunks): Declare.
2856         * semantics.c (emit_associated_thunks): Export.
2857         (expand_body): Kill.
2859 2007-09-09  David Daney  <ddaney@avtrex.com>
2861         PR c++/33324
2862         * init.c (build_new_1):  Use POINTER_PLUS_EXPR instead of MINUS_EXPR
2863         to calculate cookie_ptr.
2865 2007-09-08  Jason Merrill  <jason@redhat.com>
2867         PR c++/33342
2868         * pt.c (most_specialized_class): Set processing_template_decl
2869         while tsubsting partial spec args.
2871 2007-09-06  Jason Merrill  <jason@redhat.com>
2873         * decl2.c (get_guard): Copy visibility from the guarded variable.
2875 2007-09-06  Jan Hubicka  <jh@suse.cz>
2877         * semantics.c (expand_body): Do not mark arguments of clones used.
2879 2007-09-06  Paolo Carlini  <pcarlini@suse.de>
2881         PR c++/32674
2882         * decl.c (cp_finish_decl): When processing_template_decl,
2883         deal correctly with init as TREE_LIST.
2885 2007-09-06  Tom Tromey  <tromey@redhat.com>
2887         * decl.c (finish_function): Put return's location on line zero of
2888         file.
2890 2007-09-05  Jason Merrill  <jason@redhat.com>
2892         PR c++/15745
2893         * except.c (prepare_eh_type): Use type_decays_to.
2895         PR c++/15097
2896         * init.c (build_delete): Use build_headof to get the address of the
2897         complete object if we aren't using the deleting destructor.
2898         * rtti.c (build_headof): No longer static.
2899         * cp-tree.h: Declare it.
2901 2007-09-06  Jakub Jelinek  <jakub@redhat.com>
2903         * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
2904         decl if a prototype for XX is provided with throw().
2906         PR c++/33289
2907         * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
2908         on __*_chk non-__builtin_* decls.
2910 2007-09-05  Paolo Carlini  <pcarlini@suse.de>
2912         PR c++/30302
2913         * semantics.c (finish_id_expression): Use context_for_name_lookup
2914         insted of DECL_CONTEXT, to see through anonymous structs and unions.
2915         * class.c (finish_struct_anon): Deal correctly with anonymous
2916         structs (vs unions, as GNU extension) in error messages.
2918 2007-09-05  Jan Hubicka  <jh@suse.cz>
2920         * sematics.c (expand_body): Remove unnecesary import_export_decl
2921         call, DECL_EXTERNAL checks and current_function_decl saving.
2923 2007-09-05  Paolo Carlini  <pcarlini@suse.de>
2925         PR c++/29731 (again)
2926         * parser.c (cp_parser_primary_expression): Return error_mark_node
2927         when a statement-expression is found in a template-argument list.
2929 2007-09-04  Jason Merrill  <jason@redhat.com>
2931         * except.c (initialize_handler_parm): Use
2932         fold_build_cleanup_point_expr.
2934         PR c++/31419
2935         * call.c (reference_binding): Don't look for user-defined conversions
2936         to the same type.
2938         PR c++/31411
2939         * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
2940         the MUST_NOT_THROW_EXPR.
2942 2007-09-04  Richard Sandiford  <richard@codesourcery.com>
2944         * decl.c (cp_finish_decl): Call determine_visibility before
2945         make_rtl_for_nonlocal_decl.
2947 2007-09-04  Jason Merrill  <jason@redhat.com>
2949         PR c++/14032
2950         * pt.c (most_specialized_class): Substitute outer template
2951         arguments into the arguments of a member template partial
2952         specialization.
2953         (strip_innermost_template_args): New fn.
2955 2007-09-03  Daniel Jacobowitz  <dan@codesourcery.com>
2957         * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
2959 2007-09-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2961         * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
2962         * decl.c (cp_make_fname_decl): Likewise,
2963         * parser.c (cp_parser_string_literal): Likewise,
2964         * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
2965         * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
2966         Likewise,
2968 2007-09-02  Paolo Carlini  <pcarlini@suse.de>
2970         PR c++/33208
2971         * typeck.c (build_unary_op): Fix error message for
2972         Boolean expression as operand to operator--.
2974 2007-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2976         * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
2977         * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
2978         Likewise.
2980 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
2982         PR c++/32597
2983         * init.c (build_default_init): Make extern.
2984         * cp-tree.h (build_default_init): Declare here.
2985         * pt.c (tsubst_expr): When the instantiation of the initializer of
2986         a variable results in an empty list, default-initialize the
2987         variable.
2988         (tsubst_copy_and_build): When the instantiation of the initializer
2989         in a new expression results in an empty initializer list,
2990         default-initialize it.
2992 2007-08-31  Douglas Gregor  <doug.gregor@gmail.com>
2994         * mangle.c (write_type): Change mangling of rvalue reference from
2995         `RR' to `O'. 
2997 2007-08-31  Jakub Jelinek  <jakub@redhat.com>
2999         * decl.c (duplicate_decls): Remove duplicated line.
3001 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
3003         PR c++/33210
3004         * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
3005         BOUND_TEMPLATE_TEMPLATE_PARM.
3007 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
3009         PR c++/32113
3010         * search.c (lookup_member): Check the name argument for
3011         error_mark_node.
3013 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
3015         PR c++/33212
3016         * parser.c (cp_parser_trait_expr): Check rerurn value of
3017         cp_parser_type_id.
3019 2007-08-30  Ollie Wild  <aaw@google.com>
3021         * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
3022         convert_ptrmem for pointer to member conversions.
3023         (convert_to_pointer_force): Update cp_convert_to_pointer call.
3024         (ocp_convert): Update cp_convert_to_pointer call.
3025         * typeck.c (convert_ptrmem): Add conditional for null pointers to
3026         members.
3027         (build_static_cast_1): Check can_convert for conversions in either
3028         direction.
3029         (get_delta_difference_1): New function.
3030         (get_delta_difference): Refactor to call get_delta_difference_1.
3032 2007-08-30  Jakub Jelinek  <jakub@redhat.com>
3034         * decl.c (start_preparsed_function): Set
3035         DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
3037 2007-08-28  Paolo Carlini  <pcarlini@suse.de>
3039         PR c++/33209
3040         * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
3041         BOUND_TEMPLATE_TEMPLATE_PARM.
3043 2007-08-28  Jakub Jelinek  <jakub@redhat.com>
3045         PR c++/32596
3046         PR c++/32400
3047         * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
3048         and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
3050 2007-08-27  Jason Merrill  <jason@redhat.com>
3052         PR c++/29000
3053         * pt.c (build_non_dependent_expr, type_dependent_expression_p): 
3054         Look inside STMT_EXPR.
3055         * semantics.c (stmt_expr_value_expr): New fn.
3056         * cp-tree.h: Declare it.
3058         PR c++/28558
3059         * decl.c (groktypename): Ignore attributes applied to class type.
3061 2007-08-28  Richard Guenther  <rguenther@suse.de>
3063         * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
3065 2007-08-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3066         
3067         * error.c (dump_expr): Handle COMPLEX_CST.
3068         * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
3069         (pp_cxx_expression): Likewise.
3071 2007-08-27  Alexandre Oliva  <aoliva@redhat.com>
3073         * decl.c (GNU_INLINE_P): New.
3074         (duplicate_decls): Handle gnu_inline.  Merge attributes and
3075         some flags in overriding definitions.
3076         (redeclaration_error_message): Handle gnu_inline.
3077         (start_preparsed_function): Likewise.
3079 2007-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3081         * call.c (sufficient_parms_p): Constify.
3082         * class.c (same_signature_p): Likewise.
3083         * cp-gimplify.c (is_invisiref_parm,
3084         cxx_omp_privatize_by_reference): Likewise.
3085         * cp-objcp-common.c (has_c_linkage): Likewise.
3086         * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
3087         sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
3088         grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
3089         num_artificial_parms_for, comp_template_parms,
3090         template_parameter_pack_p, any_dependent_template_arguments_p,
3091         any_type_dependent_arguments_p, any_value_dependent_elements_p,
3092         repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
3093         zero_init_p, member_p, cp_lvalue_kind,
3094         builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
3095         varargs_function_p, is_dummy_object, special_function_kind,
3096         string_conv_p, type_unknown_p, comp_except_specs, compparms,
3097         comp_cv_qualification, is_bitfield_expr_with_lowered_type,
3098         unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
3099         cp_has_mutable_p, at_least_as_qualified_p,
3100         invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
3101         * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
3102         * except.c (nothrow_libfn_p): Likewise.
3103         * method.c (skip_artificial_parms_for, num_artificial_parms_for):
3104         Likewise.
3105         * pt.c (comp_template_parms, template_parameter_pack_p,
3106         any_type_dependent_arguments_p, any_value_dependent_elements_p,
3107         any_dependent_template_arguments_p): Likewise.
3108         * repo.c (repo_export_class_p): Likewise.
3109         * semantics.c (anon_aggr_type_p): Likewise.
3110         * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
3111         builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
3112         varargs_function_p, member_p, is_dummy_object, pod_type_p,
3113         zero_init_p, special_function_p): Likewise.
3114         * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
3115         comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
3116         compparms, invalid_nonstatic_memfn_p,
3117         is_bitfield_expr_with_lowered_type, unlowered_expr_type,
3118         string_conv_p, ptr_reasonably_similar, cp_type_readonly,
3119         cp_has_mutable_p, lvalue_or_else): Likewise.
3121 2007-08-25  Paolo Bonzini  <bonzini@gnu.org>
3123         * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
3124         * cp-objcp-common.c (cp_tree_size): Ditto.
3125         * tree.c (cp_walk_subtrees): Ditto
3126         * cp-tree.def (TINST_LEVEL): Go away.
3127         * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
3128         move together with other non-tree structs.
3129         (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
3130         (union lang_tree_node): Eliminate tinst_level field.
3131         (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
3132         (current_instantiation, outermost_tinst_level): Return
3133         a "struct tinst_level *".
3135         * error.c (print_instantiation_partial_context): Change second
3136         parameter to a "struct tinst_level *".  Replace accessor macros
3137         with field access.
3138         (print_instantiation_full_context): Likewise.
3139         * lex.c (in_main_input_context): Likewise.
3141         * pt.c (struct pending_templates): New.
3142         (pending_templates, last_pending_template): Use it as a type.
3143         (current_tinst_level): Change typo to "struct tinst_level *"
3144         (reopen_tinst_level): Accept "struct tinst_level *", return decl.
3145         (add_pending_template): Construct a "struct pending_template".
3146         Replace TINST_LEVEL accessor macros with field access.
3147         (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
3148         (pop_tinst_level): Likewise.
3149         (instantiate_pending_templates): Likewise.  Factor common code used
3150         when an instantiation has been done.
3151         (outermost_tinst_level): Replace tree_last with loop.
3152         (current_instantiation): Return a "struct tinst_level *".
3154 2007-08-24  Ollie Wild  <aaw@google.com>
3156         * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
3157         * name-lookup.h (cp_binding_level): Remove vtables member.
3159 2007-08-24  Richard Guenther  <rguenther@suse.de>
3161         * tree.c (cp_cannot_inline_tree_fn): Remove.
3162         * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
3163         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
3164         Remove define.
3166 2007-08-24  Jakub Jelinek  <jakub@redhat.com>
3168         PR c++/32567
3169         * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
3170         error_mark_node right away if build_expr_type_conversion
3171         returned it.
3173         PR c++/32898
3174         * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
3175         is error_mark_node rather than NULL_TREE.
3176         * pt.c (check_explicit_specialization): Likewise.
3178         PR c++/31941
3179         * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
3180         TARGET_VTABLE_USES_DESCRIPTORS targets properly.
3182 2007-08-22  Jason Merrill  <jason@redhat.com>
3184         PR c++/29365
3185         * pt.c (outermost_tinst_level): New function.
3186         * lex.c (in_main_input_context): New function.
3187         * cp-tree.h: Declare it.
3188         * decl2.c (constrain_class_visibility): Use it to avoid warning
3189         about uses of the anonymous namespace in the main input file.
3191 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
3193         * init.c (build_new_1): Use get_target_expr instead of save_expr.
3195 2007-08-20  Pawel Sikora  <pluto@pld-linux.org>
3197         PR c++/7302
3198         * class.c (finish_struct_1): Warn when a class has virtual
3199         functions and accessible non-virtual destructor.
3201 2007-08-20  Richard Guenther  <rguenther@suse.de>
3203         PR c++/22369
3204         PR c++/22451
3205         * call.c (build_new_method_call): Convert initializer to
3206         the basetype.
3207         * init.c (build_aggr_init): Do not fiddle with types.
3208         (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
3209         * except.c (build_throw): Do not drop qualifiers for the
3210         pointer type.
3211         * typeck.c (get_member_function_from_ptrfunc): Do not
3212         fiddle with types, instead convert.
3213         (build_ptrmemfunc1): Convert to the target type for
3214         initialization.
3215         (gfc_trans_allocate): Convert result to target type.
3216         * cp-objcp-common.c (cxx_get_alias_set): Pointers to
3217         pointer-to-member structures shall have alias set zero as well.
3219 2007-08-20  Richard Guenther  <rguenther@suse.de>
3221         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
3222         Remove.
3223         * cp-tree.h (cp_auto_var_in_fn_p): Remove.
3224         (nonstatic_local_decl_p): Likewise.
3225         * tree.c (cp_auto_var_in_fn_p): Remove.
3226         * decl.c (nonstatic_local_decl_p): Remove.
3228 2007-08-20  Richard Guenther  <rguenther@suse.de>
3230         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
3231         Remove define.
3232         * tree.h (cp_walk_tree): New define to walk_tree_1 with
3233         cp_walk_subtrees lh parameter.
3234         (cp_walk_tree_without_duplicates): New define to
3235         walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
3236         * tree.c (count_trees): Call
3237         cp_walk_tree_without_duplicates.
3238         (verify_stmt_tree): Call cp_walk_tree.
3239         (break_out_target_exprs): Likewise.
3240         (WALK_SUBTREE): Likewise.
3241         * cp-gimplify.c (cp_genericize): Likewise.
3242         * cp-pt.c (find_parameter_packs_r): Likewise.
3243         (uses_parameter_packs): Likewise.
3244         (make_pack_expansion): Likewise.
3245         (check_for_bare_parameter_packs): Likewise.
3246         (for_each_template_parm): Likewise.
3247         * decl.c (check_default_argument): Call
3248         cp_walk_tree_without_duplicates.
3249         * except.c (build_throw): Likewise.
3250         * decl2.c (type_visibility): Likewise.
3251         * semantics.c (expand_or_defer_fn): Likewise.
3252         (finalize_nrv): Call cp_walk_tree.
3254 2007-08-20  Jakub Jelinek  <jakub@redhat.com>
3256         PR c++/33025
3257         * init.c (build_new_1): Rename placement_var variable to placement_expr.
3258         Initialize it with save_expr rather than get_temp_regvar.
3260 2007-08-17  Andrew Pinski  <andrew_pinski@playstation.sony.com>
3262         PR c++/28989
3263         * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
3264         lvalues.
3266 2007-08-17  Ollie Wild  <aaw@google.com>
3268         PR c++/31749
3269         * name-lookup.c (do_nonmember_using_decl): Shift implicit type
3270         declarations into appropriate slots for comparison.  Fix type
3271         comparison.
3273 2007-08-17  Paolo Carlini  <pcarlini@suse.de>
3275         PR c++/32112
3276         * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
3277         * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
3279 2007-08-17  Paolo Carlini  <pcarlini@suse.de>
3281         PR c++/32870
3282         * parser.c (cp_parser_class_head): Improve error message.
3284 2007-08-16  Seongbae Park  <seongbae.park@gmail.com>
3286         * pt.c (instantiate_decl): Set input_location
3287         for the function end.
3289 2007-08-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3291         * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
3292         Constify.
3293         * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
3294         class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
3295         cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
3296         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
3297         * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
3298         * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
3299         * typeck.c (cp_type_quals): Likewise.
3300         * typeck2.c (cxx_incomplete_type_diagnostic,
3301         cxx_incomplete_type_error): Likewise.
3303 2007-08-16  Paolo Carlini  <pcarlini@suse.de>
3305         PR c++/31132
3306         * pt.c (tsubst_friend_function): When check_classfn
3307         returns error_mark_node likewise return it.
3309 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
3311         PR c++/32992
3312         * typeck.c (check_return_expr): Don't NRV optimize vars in
3313         anonymous unions.
3314         * decl.c (finish_function): Comment fix.
3316 2007-08-15  Paolo Carlini  <pcarlini@suse.de>
3318         PR c++/33035
3319         * pt.c (push_template_decl_real): Depending on TYPE_P
3320         use either TYPE_CONTEXT or DECL_CONTEXT.
3322 2007-08-14  Mark Mitchell  <mark@codesourcery.com>
3324         * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
3325         constructors and destructors return this.
3327 2007-08-14  Paolo Carlini  <pcarlini@suse.de>
3329         PR c++/27211
3330         * decl2.c (check_classfn): Return error_mark_node in case of error;
3331         in that case, do not call add_method.
3332         * decl.c (start_decl): Deal with check_classfn returning
3333         error_mark_node.
3334         (grokfndecl): Likewise.
3335         * pt.c (tsubst_friend_function): Likewise.
3337 2007-08-14  Andrew Pinski  <pinskia@gmail.com>
3339         PR c++/30428
3340         * typeck.c (build_binary_op): Disallow vector float types with
3341         BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
3343 2007-08-11  Ian Lance Taylor  <iant@google.com>
3345         * cp-objcp-common.c (cxx_get_alias_set): Change return type to
3346         alias_set_type.
3347         * cp-tree.h (cxx_get_alias_set): Update declaration.
3349 2007-08-10  Ollie Wild  <aaw@google.com>
3351         * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
3352         type lookups.
3353         (ambiguous_decl): Construct tree of ambiguous types.  Remove extaneous
3354         function parameter.
3355         (unqualified_namespace_lookup): Fix ambiguous_decl call.
3356         (lookup_using_namespace): Fix ambiguous_decl call.
3357         (qualified_lookup_using_namespace): Fix ambiguous_decl call.
3359 2007-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3361         * call.c (name_as_c_string): Use CONST_CAST.
3362         * decl.c (build_decl): Likewise.
3363         * parser.c (cp_parser_string_literal): Likewise.
3365 2007-08-10  Paolo Carlini  <pcarlini@suse.de>
3367         PR c++/17763
3368         * error.c (dump_expr): Consistently use the *_cxx_*
3369         variants of the pretty-print functions.
3371 2007-08-10  Paolo Carlini  <pcarlini@suse.de>
3373         PR c++/22256
3374         * decl.c (check_special_function_return_type): Just error
3375         on return type specified for conversion operator.
3377 2007-08-09  Daniel Berlin  <dberlin@dberlin.org>
3379         * typeck2.c (readonly_error): Handle general expressions.
3380         * error.c (dump_expr): Handle POINTER_PLUS_EXPR
3382 2007-08-06  Dan Hipschman  <dsh@google.com>
3384         * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
3385         access function name.
3387 2007-08-04  Alfred Minarik  <a.minarik@aon.at>
3389         PR pch/13676
3390         * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
3391         * g++spec.c (lang_specific_driver): Check them.
3393 2007-08-06  Paolo Carlini  <pcarlini@suse.de>
3395         PR c++/19532
3396         * pt.c (inline_needs_template_parms): Fix comment; change return type
3397         to bool.
3399 2007-08-05  Volker Reichelt  <v.reichelt@netcologne.de>
3401         Revert:
3402         2007-03-26  Dirk Mueller  <dmueller@suse.de>
3404         * parser.c (cp_parser_member_declaration): Pedwarn
3405         about stray semicolons after member declarations.
3407 2007-08-02  Lee Millward  <lee.millward@gmail.com>
3409         PR c++/30849
3410         PR c++/30850
3411         PR c++/30851
3412         * parser.c (cp_parser_asm_definition): Detect and discard asm
3413         statements with invalid inputs or outputs.
3414         (cp_parser_asm_operand_list): Return error mark node if any
3415         of the operands are invalid. Adjust documentation.
3416         
3417 2007-08-02  Nick Clifton  <nickc@redhat.com>
3419         * typeck.c: Change copyright header to refer to version 3 of the
3420         GNU General Public License and to point readers at the COPYING3
3421         file and the FSF's license web page.
3422         * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
3423         config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
3424         Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
3425         cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
3426         tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
3427         cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
3428         cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
3429         name-lookup.h, parser.c: Likewise.
3431 2007-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3433         PR middle-end/32668
3434         * call.c (magic_varargs_p): Honor the "type generic" attribute.
3436 2007-07-30  Paolo Carlini  <pcarlini@suse.de>
3438         PR c++/32108
3439         * semantics.c (finish_label_stmt): Reject the __label__
3440         extension outside function scopes.
3442 2007-07-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3444         * parser.c (eof_token): Un-constify.
3445         (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
3446         cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
3447         casts.
3449 2007-07-28  Kazu Hirata  <kazu@codesourcery.com>
3451         * pt.c, tree.c, typeck2.c: Fix comment typos.
3453 2007-07-28  Simon Martin  <simartin@users.sourceforge.net>
3454             Mark Mitchell  <mark@codesourcery.com>
3456         PR c++/30917
3457         * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
3458         hidden due to friend declarations in local classes.
3460 2007-07-27  Douglas Gregor  <doug.gregor@gmail.com>
3462         * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
3463         * cp-tree.def (DECLTYPE_TYPE): New.
3464         * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
3465         (dump_type_prefix): Ditto.
3466         (dump_type_suffix): Ditto.
3467         * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
3468         * mangle.c (write_type): Handle DECLTYPE_TYPE.
3469         * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
3470         types.
3471         (DECLTYPE_TYPE_EXPR): New.
3472         (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
3473         (finish_declared_type): Declare.
3474         * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
3475         DECLTYPE_TYPE nodes.
3476         (pp_cxx_type_id): Ditto.
3477         * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
3478         (tsubst): Substitute into a DECLTYPE_TYPE node.
3479         (tsubst_copy): Ditto.
3480         (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
3481         nodes.
3482         (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
3483         * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
3484         structural equality (because we can't hash the expressions).
3485         (finish_declared_type): New.
3486         * lex.c (reswords): Add "decltype" keyword.
3487         * parser.c cp_lexer_next_token_is_decl_specifier_keyword
3488         (cp_parser_postfix_expression): Add member_access_only_p to
3489         restrict postfix expression to member access expressions.
3490         (cp_parser_unary_expression): Update call to
3491         cp_parser_postfix_expression to reflect new parameter.
3492         (cp_parser_declared_type): New.
3493         (cp_parser_simple_type_specifier): Parse decltype types.
3495 2007-07-27  Mark Mitchell  <mark@codesourcery.com>
3497         PR c++/32346
3498         * call.c (convert_for_arg_passing): Only widen bitfields to their
3499         declared types if necessary.
3501 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3503         * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
3504         Constify.
3506 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3508         * decl.c (typename_hash, typename_compare): Constify.
3509         * mangle.c (hash_type, compare_type): Likewise.
3510         * pt.c (eq_local_specializations, hash_local_specialization):
3511         Likewise.
3512         * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
3513         list_hash): Likewise.
3514         * typeck2.c (pat_compare): Likewise.
3516 2007-07-24  Nathan Sidwell  <nathan@codesourcery.com>
3518         * method.c (implicitly_declare_fn): Increase alignment if member
3519         function pointer format requires it.
3521 2007-07-24  Paolo Carlini  <pcarlini@suse.de>
3523         PR c++/29001
3524         * typeck.c (check_return_expr): Do not pass a null argument
3525         to null_ptr_cst_p.
3527 2007-07-24  Paolo Carlini  <pcarlini@suse.de>
3529         PR c++/32561
3530         * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
3531         only on VAR_DECL.
3533 2007-07-22  Nathan Sidwell  <nathan@codesourcery.com>
3535         PR c++/32839
3536         * typeck.c (convert_arguments): Only use default args if we have
3537         a function decl.
3539         PR c++/30818
3540         * typeck.c (structural_comptypes): No need to check
3541         resolve_typename_type return value here.
3542         * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
3543         * pt.c (resolve_typename_type): Follow typename typedefs.  Return
3544         original type rather than error_mark_node in case of failure.
3545         * parser.c (cp_parser_nested_name_specifier_opt): Adjust
3546         resolve_typename_type result check.
3547         (cp_parser_direct_declarator, cp_parser_head,
3548         cp_parser_constructor_declarator_p): Likewise.
3550 2007-07-12  Kazu Hirata  <kazu@codesourcery.com>
3552         * pt.c (template_parms_variadic_p): Remove.
3553         * cp-tree.h: Remove the prototype for template_parms_variadic_p.
3555 2007-07-12  Jakub Jelinek  <jakub@redhat.com>
3557         PR c++/30854
3558         * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
3559         argument to dump_aggr_init_expr_args instead of false.
3561 2007-07-11  Douglas Gregor  <doug.gregor@gmail.com>
3563         * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
3564         canonical types; otherwise, fall back to structural type
3565         comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
3566         internal compiler error if the canonical types are wrong.
3567         
3568 2007-07-11  Paolo Carlini  <pcarlini@suse.de>
3570         PR c++/32560
3571         * parser.c (cp_parser_make_indirect_declarator): When the
3572         the code argument is ERROR_MARK return cp_error_declarator.
3574 2007-07-09  Geoffrey Keating  <geoffk@apple.com>
3576         PR 32617
3577         * decl.c (cxx_init_decl_processing): Don't set
3578         force_align_functions_log.
3579         (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
3580         * typeck.c (cxx_alignof_expr): When alignof is used on a plain
3581         FUNCTION_DECL, return its alignment.
3583 2007-07-09  Richard Guenther  <rguenther@suse.de>
3585         * decl.c (start_preparsed_function): Do not promote return type.
3587 2007-07-08  Paolo Carlini  <pcarlini@suse.de>
3589         PR c++/30535
3590         * pt.c (unify): Never pass error_mark_node to template_decl_level.
3592 2007-07-07  Mark Mitchell  <mark@codesourcery.com>
3594         PR c++/32232
3595         * pt.c (resolve_overloaded_unification): Robustify.  Return a
3596         bool, not an int.
3597         (type_unification_real): Adjust accordingly.
3599 2007-07-06  Richard Guenther  <rguenther@suse.de>
3601         * init.c (build_new_1): Use the correct pointer type.
3602         * typeck2.c (build_m_component_ref): Likewise.
3604 2007-07-05  Mark Mitchell  <mark@codesourcery.com>
3606         PR c++/32245
3607         * init.c (build_zero_init): Always build an initializer for
3608         non-static storage.
3609         * typeck2.c (build_functional_cast): Use build_zero_init.
3611         PR c++/32251
3612         * init.c (build_new_1): Always pass the allocation function to
3613         build_op_delete_call.
3614         * call.c (build_op_delete_call): Handle operator delete with a
3615         variable-argument list.  Do not issue an error when no matching
3616         deallocation function is available for a new operator.
3618         PR c++/31992
3619         * cp-tree.h (any_value_dependent_elements_p): Declare it.
3620         * decl.c (value_dependent_init_p): New function.
3621         (cp_finish_decl): Use it.
3622         * pt.c (value_dependent_expression_p): Use
3623         any_value_dependent_elements_p.
3624         * parser.c (cp_parser_primary_expression): Add comment about
3625         treating dependent qualified names as integral
3626         constant-expressions.
3628 2007-07-04  Douglas Gregor  <doug.gregor@gmail.com>
3630         * decl.c (build_ptrmemfunc_type): Always use structural equality
3631         tests when comparing pointer-to-member-function types, because the
3632         handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
3633         types.
3634         
3635 2007-07-03  Mark Mitchell  <mark@codesourcery.com>
3637         * init.c (build_new): Tweak comment.
3639 2007-06-29  Dave Brolley  <brolley@redhat.com>
3641         PR c++/31743
3642         * parser.c (cp_parser_new_type_id): Don't reduce a named array
3643         type to its base type and number of elements here.
3644         * init.c (build_new): Call complete_type_or_else to ensure that the
3645         type is complete and to issue a diagnostic if it is not.
3646         (build_new_1): Don't call complete_type_or_else here.
3648 2007-07-03  Richard Guenther  <rguenther@suse.de>
3650         PR c++/32609
3651         * class.c (fixed_type_or_null): Re-lookup the hashtable slot
3652         after recursing.
3654 2007-07-02  Simon Baldwin  <simonb@google.com>
3656         * parser.c (cp_parser_elaborated_type_specifier): Added a warning
3657         for inner-style nested forward declarations that don't declare
3658         anything useful.
3660 2007-07-02  Jakub Jelinek  <jakub@redhat.com>
3662         PR c++/31748
3663         * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
3664         DECL_P in not a variable and appears more than once error messages.
3666 2007-07-01  Ollie Wild  <aaw@google.com>
3668         * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
3669         (select_decl): Remove function.
3670         (unqualified_namespace_lookup): Populate binding by calling
3671         ambiguous_decl.  Remove select_decl call.
3672         (lookup_qualified_name): Remove select_decl call.
3673         * decl.c (lookup_and_check_tag): Check for ambiguous references.
3674         * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
3675         generation when name lookup is ambiguous.
3677 2007-06-29  Douglas Gregor  <doug.gregor@gmail.com>
3679         PR c++/31724
3680         * init.c (build_new_1): Use structural equality on the copy of the
3681         array type.
3683 2007-06-28  Geoffrey Keating  <geoffk@apple.com>
3685         * decl2.c (determine_visibility): Implement
3686         flag_visibility_ms_compat effect on type info.
3687         * decl.c (cxx_init_decl_processing): Implement
3688         global effect of flag_visibility_ms_compat.
3690 2007-06-28  Geoffrey Keating  <geoffk@apple.com>
3692         * decl2.c (start_objects): Mark constructor-running function
3693         as artificial.
3695 2007-06-26  Simon Martin  <simartin@users.sourceforge.net>
3697         PR c++/32111
3698         * decl.c (grokdeclarator): Reset friendp for member functions declared
3699         friend of their own class.
3701 2007-06-23  Mark Mitchell  <mark@codesourcery.com>
3703         * decl2.c (determine_visibility): Don't look for dllexport here.
3704         (determine_visibility_from_class): Tidy.
3706 2007-06-18  Simon Baldwin <simonb@google.com>
3708         PR c++/31923
3709         * parser.c (cp_parser_single_declaration): Added check for storage
3710         class other than sc_none in parsed declaration, and a flag to indicate
3711         if the call is part of an explicit template specialization parse.
3712         * (cp_parser_explicit_specialization): Specialization check flag added
3713         to call to cp_parser_single_declaration(), set true.
3714         * (cp_parser_template_declaration_after_export): Specialization check
3715         flag added to call to cp_parser_single_declaration(), set false.
3716         * pt.c (check_explicit_specialization): Added code to copy visiblity
3717         and linkage from the templated function to the explicit specialization.
3719 2007-06-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
3721         * typeck.c (build_binary_op): For templates build the
3722         expression in pieces to avoid the assert in build2_stat.
3723         (get_member_function_from_ptrfunc):
3724         Change over to using POINTER_PLUS_EXPR and convert
3725         the second operand to sizetype.
3726         * typeck2.c (build_m_component_ref):  Likewise.
3727         * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
3728         instead of PLUS_EXPR for pointers.
3729         (build_new_1): Likewise.
3730         (build_vec_delete_1): Likewise.
3731         (build_vec_delete): Likewise.
3732         * class.c (build_base_path): Likewise.
3733         (build_base_path): Likewise.
3734         (convert_to_base_statically): Likewise.
3735         (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
3736         (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
3737         instead of PLUS_EXPR.
3738         (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
3739         instead of PLUS_EXPR for pointers.
3740         * call.c (build_special_member_call): Likewise.
3741         * rtti.c (build_headof): Likewise.
3742         Use sizetype instead of ptrdiff_type_node.
3743         (tinfo_base_init): Create a POINTER_PLUS_EXPR
3744         instead of PLUS_EXPR for pointers.
3745         * except.c (expand_start_catch_block):  Do a
3746         NEGATIVE and then a POINTER_PLUS_EXPR instead
3747         of a MINUS_EXPR.
3748         * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
3749         PLUS_EXPR on pointer types over to use
3750         POINTER_PLUS_EXPR and remove the conversion
3751         to the pointer types.
3752         * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
3753         adding to a pointer type. Use size_int instead of
3754         ssize_int. Convert the index to sizetype before
3755         adding it to the pointer.
3757 2007-06-15  Mark Mitchell  <mark@codesourcery.com>
3759         * cp-tree.h (DECL_VAR_MARKED_P): Remove.
3760         (DECL_ANON_UNION_VAR_P): New macro.
3761         * class.c (fixed_type_or_null): Tidy.  Use a hash table, rather
3762         than DECL_VAR_MARKED_P, to keep track of which variables we have
3763         seen.
3764         * decl.c (redeclaration_error_message): Complain about redeclaring
3765         anonymous union members at namespace scope.
3766         * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
3768 2007-06-14  Geoff Keating  <geoffk@apple.com>
3770         * decl2.c (determine_visibility): Ensure that functions with
3771         hidden types as parameters are hidden.
3773         PR 31093
3774         * decl2.c (determine_visibility): Remove duplicate code for
3775         handling type info.
3777 2007-06-12  Ian Lance Taylor  <iant@google.com>
3779         PR libstdc++/29286
3780         * init.c (avoid_placement_new_aliasing): New static function.
3781         (build_new_1): Call it.
3783 2007-06-11  Rafael Avila de Espindola  <espindola@google.com>
3785         * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
3786         (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
3788 2007-06-08  Jakub Jelinek  <jakub@redhat.com>
3790         PR c++/32177
3791         * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
3792         on init, the non-decl cond operand and increment value.
3794 2007-06-07  Simon Martin  <simartin@users.sourceforge.net>
3796         PR c++/30759
3797         * decl.c (check_initializer): Report an error when a brace enclosed
3798         initializer is used for a non-aggregate type in C++98.
3799         (redeclaration_error_message): Rewrote flag_cpp0x in terms of
3800         cxx_dialect.
3801         (grokdeclarator): Likewise.
3802         (move_fn_p): Likewise.
3803         * typeck.c (check_return_expr): Likewise.
3804         * call.c (reference_binding): Likewise.
3805         * error.c (cp_cpp_error): Likewise.
3806         * pt.c (check_default_tmpl_args): Likewise.
3807         (tsubst): Likewise.
3808         * lex.c (init_reswords): Likewise.
3809         * parser.c (p_parser_primary_expression): Likewise.
3810         (TOKEN_PRECEDENCE): Likewise.
3811         (cp_parser_init_declarator): Likewise.
3812         (cp_parser_ptr_operator): Likewise.
3813         (cp_parser_parameter_declaration): Likewise.
3814         (cp_parser_enclosed_template_argument_list): Likewise.
3815         (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
3816         (cp_parser_next_token_ends_template_argument_p): Likewise.
3818 2007-06-04  Simon Baldwin  <simonb@google.com>
3820         * decl.c (grokdeclarator): Readability change.  Moved case labels
3821         into direct switch statement scope.
3823 2007-06-04  Paolo Carlini  <pcarlini@suse.de>
3825         * call.c (convert_like_real): Remove pointless code.
3827 2007-05-31  Mark Mitchell  <mark@codesourcery.com>
3829         * decl.c (get_atexit_fn_ptr_type): New function.
3830         (get_atexit_node): Use it.
3831         (start_cleanup_fn): Likewise.
3832         (register_dtor_fn): Use the object's destructor, instead of a
3833         separate cleanup function, where possible.
3834         * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
3835         (atexit_fn_ptr_type_node): New macro.
3836         * decl2.c (build_cleanup): Use build_address.
3838 2007-05-31  Daniel Berlin  <dberlin@dberlin.org>
3840         * typeck.c (build_binary_op): Include types in error.
3842 2007-05-31  Jakub Jelinek  <jakub@redhat.com>
3844         PR c++/31806
3845         * decl.c (cp_finish_decl): Also clear was_readonly if a static var
3846         needs runtime initialization.
3848 2007-05-31  Paolo Carlini  <pcarlini@suse.de>
3850         PR c++/32158
3851         * semantics.c (finish_trait_expr): Complete the types.
3853 2007-05-30  Russell Yanofsky <russ@yanofsky.org>
3854             Douglas Gregor <doug.gregor@gmail.com>
3855             Pedro Lamarao <pedro.lamarao@mndfck.org>
3856             Howard Hinnant <howard.hinnant@gmail.com>
3858         PR c++/7412
3859         PR c++/29939
3860         * typeck.c (comptypes): Don't consider rvalue and lvalue
3861         reference types to be equivalent.
3862         (check_return_expr): Move from certain lvalues when returning
3863         them.
3864         * decl.c (grokdeclarator): Implement reference collapsing.
3865         (copy_fn_p): Don't consider constructors taking rvalue references
3866         to be copy constructors.
3867         (move_fn_p): New.
3868         * call.c (conversion): New "rvaluedness_matches_p" member.
3869         (convert_class_to_reference): Require reference type as first
3870         parameter instead of base type.
3871         (reference_binding): Add logic to handle rvalue references.
3872         (implicit_conversion): Update inaccurate comment.
3873         (convert_like_real): Disable creation of temporaries that are
3874         impossible to initialize for types with move constructors.
3875         (build_over_call): Elide move constructors when possible.
3876         (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
3877         (maybe_handle_ref_bind): Return conversion instead of type node.
3878         (compare_ics): Add logic to use "rvaluedness_matches_p" values to
3879         determine preferred conversion sequences.
3880         * cp-tree.h (TYPE_REF_IS_RVALUE): New.
3881         (LOOKUP_PREFER_RVALUE): New.
3882         (DECL_MOVE_CONSTRUCTOR_P): New.
3883         (struct cp_declarator): Add "reference" member for reference
3884         types, with new "rvalue_ref" flag.
3885         (cp_build_reference_type): Declare.
3886         (move_fn_p): Declare.
3887         * error.c (dump_type_prefix): Format rvalue reference types
3888         correctly in error messages.
3889         * except.c (build_throw): Move from certain lvalues when
3890         throwing.
3891         * mangle.c (write_type): Mangle rvalue references differently
3892         than regular references.
3893         * parser.c (make_reference_declarator): Add boolean parameter for
3894         rvalue references.
3895         (cp_parser_make_indirect_declarator): New.
3896         (cp_parser_new_declarator_opt): Call
3897         cp_parser_make_indirect_declarator. 
3898         (cp_parser_conversion_declarator_opt): Ditto.
3899         (cp_parser_declarator): Ditto.
3900         (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
3901         declarators.
3902         * pt.c (tsubst): Implement reference collapsing.
3903         (maybe_adjust_types_for_deduction): Implement special template
3904         parameter deduction rule for rvalue references.
3905         (type_unification_real): Update calls to
3906         maybe_adjust_types_for_deduction.
3907         (try_one_overload): Ditto.
3908         (unify_pack_expansion): Ditto.
3909         * tree.c (lvalue_p_1): Handle rvalue reference types.
3910         (cp_build_reference_type): New.
3912 2007-05-30  Jakub Jelinek  <jakub@redhat.com>
3914         PR c++/31809
3915         * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
3916         variables that need runtime initialization.
3918 2007-05-28  Andrew Pinski  <Andrew_pinski@playstation.sony.com>
3920         PR c++/31339
3921         * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
3922         case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
3923         case POSTDECREMENT_EXPR>): Return the error_mark_node
3924         if either the real or imaginary parts would an
3925         error_mark_node.
3926         
3927 2007-05-25  Simon Martin  <simartin@users.sourceforge.net>
3928             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3930         PR c++/31745
3931         * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
3932         token is a closing brace, false if there are no tokens left.
3933         (cp_parser_namespace_alias_definition): Only consume the next token if
3934         it is a closing brace.
3936         * parser.c (cp_parser_class_specifier): Likewise.
3938 2007-05-25  H.J. Lu  <hongjiu.lu@intel.com>
3940         * semantics.c (finish_member_declaration): Fix a typo in the
3941         last checkin.
3943 2007-05-25  Douglas Gregor <doug.gregor@gmail.com>
3945         PR c++/31431
3946         PR c++/31432
3947         PR c++/31434
3948         PR c++/31435
3949         PR c++/31437
3950         PR c++/31438
3951         PR c++/31442
3952         PR c++/31443
3953         PR c++/31444
3954         PR c++/31445
3955         * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
3956         * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
3957         * pt.c (check_for_bare_parameter_packs): Return bool indicated
3958         whether everything was okay. Fix indentation.
3959         (push_template_decl_real): Check for bare parameter packs in
3960         function parameters; where errors occur, mark the parameter types
3961         with ERROR_MARK_NODEs to avert ICEs.
3962         (coerce_template_parameter_pack): New.
3963         (coerce_template_parms): Moved parameter pack coercion into
3964         coerce_template_parameter_pack, and permit it anywhere in the
3965         template parameter list (not just at the end). Parameter and
3966         argument indices can vary (somewhat) separately now, so add
3967         PARM_IDX and ARG_IDX.
3968         (fn_type_unification): Don't set an argument pack as incomplete if
3969         no argument pack was deduced.
3970         (type_unification_real): If a type parameter is a parameter pack
3971         and has not otherwise been deduced, it will be deduced to an empty
3972         parameter pack.
3973         (more_specialized_fn): Use the actual lengths of the argument
3974         lists when comparing against expansions.
3975         * semantics.c (finish_member_declaration): If a field's type has
3976         bare parameter packs, error and set its type to ERROR_MARK_NODE.
3978 2007-05-24  Danny Smith  <dannysmith@users.sourceforge.net>
3980         PR target/27067
3981         * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
3983 2007-05-22  Ollie Wild  <aaw@google.com>
3985         * name-lookup.c (ambiguous_decl): Adds check for hidden types.
3986         (unqualified_namespace_lookup): Adds check for hidden types.
3988 2007-05-22  Ollie Wild  <aaw@google.com>
3990         * decl.c (duplicate_decls): Verify namespace names are unique.
3992 2007-05-21  Mark Mitchell  <mark@codesourcery.com>
3994         * decl.c (cxx_maybe_build_cleanup): Handle
3995         __attribute__((cleanup)).
3997 2007-05-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3999         * cvt.c (cp_convert_and_check): Don't check warnings if the
4000         conversion failed.
4002 2007-05-18  Geoffrey Keating  <geoffk@apple.com>
4004         * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
4006 2007-05-14  Paolo Carlini  <pcarlini@suse.de>
4008         PR c++/29928
4009         * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
4010         type only if is a class type (5.2.8/4).
4012 2007-05-14  Rafael Avila de Espindola  <espindola@google.com>
4014         * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
4015         * decl.c (grokdeclarator): Use unsigned_type_for instead of
4016         c_common_unsigned_type.
4018 2007-05-11  Silvius Rus  <rus@google.com>
4020         * typeck.c (build_indirect_ref): Add call to
4021         strict_aliasing_warning.
4022         (build_reinterpret_cast_1): Condition call to
4023         strict_aliasing_warning. 
4025 2007-05-11  Jan Hubicka  <jh@suse.cz>
4027         * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
4028         * decl2.c (start_objects): ctors and dtors are no longer public.
4029         (cp_write_global_declarations): Do not call c_build_cdtor_fns.
4030         
4031 2007-05-07  Andrew Pinski  <andrew_pinski@playstation.sony.com>
4033         * typeck.c (build_unary_op): Remove code that used to
4034         handle non lvalue increments/decrements.
4036 2007-05-07  Mike Stump  <mrs@apple.com>
4038         * parser.c (check_empty_body): Add.
4039         (cp_parser_iteration_statement): Add call to check_empty_body.
4041 2007-05-05  Geoffrey Keating  <geoffk@apple.com>
4043         PR 31775
4044         * mangle.c (write_mangled_name): Mangle static variable names.
4045         (write_unqualified_name): Use local-source-name for
4046         namespace-scope static variables.
4048 2007-05-04  Dirk Mueller  <dmueller@suse.de>
4050         * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
4051         not in effect.
4053 2007-05-02  Seongbae Park  <seongbae.park@gmail.com>
4055         PR c++/31663
4056         * decl2.c (constrain_class_visibility): 
4057         Use strip_pointer_or_array_types instead of strip_array_types.
4059 2007-04-28  Andrew Pinski  <andrew_pinski@playstation.sony.com>
4061         PR C++/30221
4062         * decl.c (reshape_init_r): Don't reshape the first element if it
4063         is a pointer to member function.
4065 2007-04-27  Simon Baldwin  <simonb@google.com>
4067         * decl.c (grokparms): Changed message format from %qD to %qE.
4069 2007-04-27  Douglas Gregor  <doug.gregor@gmail.com>
4071         * error.c (maybe_warn_variadic_templates): Variadic templates are
4072        now in C++0x, so only warn about them in C++98 mode.
4073         
4074 2007-04-26  Andrew Pinski  <andrew_pinski@playstation.sony.com>
4076         PR C++/30016
4077         * typeck.c (build_reinterpret_cast_1): Only allow conversion to
4078         integeral types from vectors types.
4080 2007-04-26  Jakub Jelinek  <jakub@redhat.com>
4082         PR c++/31598
4083         * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
4084         for type dependent OMP_CLAUSE_DECLs.
4086 2007-04-24  Mark Mitchell  <mark@codesourcery.com>
4088         PR c++/31338
4089         * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
4090         * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
4091         COMPLEX_TYPE is now an ARITHMETIC_TYPE.
4092         * init.c (build_zero_init): Adjust, as
4093         COMPLEX_TYPE is now a SCALAR_TYPE.
4094         * typeck2.c (digest_init): Allow brace-enclosed initializers for
4095         COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
4097 2007-04-25  Paolo Carlini  <pcarlini@suse.de>
4099         * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
4100         per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
4101         (trait_expr_value): Adjust.
4103 2007-04-23  Simon Baldwin  <simonb@google.com>
4105         * decl.c (grokparms): Added new error for duplicate function
4106         parameters names in function prototypes, to match gcc behavior.
4108 2007-04-23  Jan Hubicka  <jh@suse.cz>
4110         * decl2.c (finish_objects): Do not call target constructor/destructor
4111         bits dirrectly.
4113 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
4115         * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
4116         instead of checking GIMPLE_STMT_P in chain_next.
4118 2007-04-17  Mark Mitchell  <mark@codesourcery.com>
4120         PR c++/31513
4121         * call.c (convert_for_arg_passing): Convert bitfields to their
4122         declared types.
4124 2007-04-17  Simon Martin  <simartin@users.sourceforge.net>
4126         PR c++/31517
4127         * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
4129 2007-04-16  Seongbae Park <seongbae.park@gmail.com>
4131         PR c++/29365
4132         * decl2.c (constrain_class_visibility):
4133         Do not warn about the use of anonymous namespace in the main input file.
4135 2007-04-15  Mark Mitchell  <mark@codesourcery.com>
4137         * cp-tree.h (current_template_parms): Fix typo in comment.
4139 2007-04-15  Kazu Hirata  <kazu@codesourcery.com>
4141         * cp-tree.h, error.c: Fix comment typos.
4143 2007-04-13  Jason Merrill  <jason@redhat.com>
4145         PR c++/31074
4146         * call.c (reference_binding): Add c_cast_p parm.  If true,
4147         add quals to TO as needed to make it reference-compatible.
4149 2007-04-11  Jan Hubicka  <jh@suse.cz>
4151         * class.c (convert_to_base_statically): Fold produced tree; verify
4152         that we are not processing template_decl.
4154 2007-04-09  Mark Mitchell  <mark@codesourcery.com>
4156         PR c++/31449
4157         * class.c (build_base_path): Ensure that the converted pointer has
4158         the same cv-qualification as the input.
4160 2007-04-09  Paolo Carlini  <pcarlini@suse.de>
4162         * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
4164 2007-04-08  Steven Bosscher  <steven@gcc.gnu.org>
4166         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
4167         Do not set it.
4168         (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
4169         * tree.c (cp_add_pending_fn_decls): Remove.
4170         * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
4172 2007-04-07  Daniel Berlin  <dberlin@dberlin.org>
4174         Revert change removing staticp.
4176 2007-04-06  Daniel Berlin  <dberlin@dberlin.org>
4178         * cp-objcp-common.c (cxx_staticp): Remove.
4179         * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
4180         * cp-tree.h (cxx_staticp):      
4182 2007-04-04  Danny Smith  <dannysmith.users.sourceforge.net>
4184         * class.c (check_for_override): Don't remove dllmport attribute
4185         of virtual methods.
4187 2007-04-03  Jakub Jelinek  <jakub@redhat.com>
4189         PR c++/30847
4190         * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
4191         type issue error and return early.
4193 2007-03-30  Jason Merrill  <jason@redhat.com>
4195         PR c++/31187
4196         * typeck.c (cp_type_readonly): New fn.
4197         * cp-tree.h: Declare it.
4198         * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
4199         (cp_finish_decl): Not here.
4201 2007-03-31  Richard Guenther  <rguenther@suse.de>
4203         * optimize.c (maybe_clone_body): Replace splay-tree usage by
4204         pointer-map.
4206 2007-03-31  Douglas Gregor  <doug.gregor@gmail.com>
4208         PR c++/31138
4209         PR c++/31140
4210         PR c++/31141
4211         * parser.c (declarator_can_be_parameter_pack): New.
4212         (cp_parser_template_parameter): Only parse the `...' if the
4213         declarator can be a parameter pack.
4214         (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
4215         is NULL.
4216         * pt.c (find_parameter_packs_r): Look into the bounds on integer
4217         types (they could be used as array bounds). 
4218         (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
4219         (tsubst_pack_expansion): Handle failure to expand parameter
4220         packs.
4221         
4222 2007-03-30  Paolo Carlini  <pcarlini@suse.de>
4224         PR c++/26099
4225         * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
4226         TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
4227         (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
4228         (CLASS_TYPE_NON_UNION_P): Add.
4229         (struct lang_type_class): Add has_complex_dflt.
4230         (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
4231         (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
4232         * cp-tree.def: Add TRAIT_EXPR.
4233         * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
4234         * lex.c (struct resword): Add __has_nothrow_assign,
4235         __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
4236         __has_trivial_constructor, __has_trivial_copy,
4237         __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
4238         __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
4239         __is_pod, __is_polymorphic, __is_union.
4240         * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
4241         (cp_parser_trait_expr): New.
4242         * semantics.c (finish_trait_expr, trait_expr_value
4243         classtype_has_nothrow_copy_or_assign_p): New.
4244         * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
4245         as static.
4246         * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
4247         * class.c (check_bases, check_field_decl, check_bases_and_members):
4248         Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
4249         * pt.c (uses_template_parms, tsubst_copy_and_build,
4250         value_dependent_expression_p, type_dependent_expression_p): Deal with
4251         TRAIT_EXPR.
4252         * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
4254 2007-03-29  Richard Guenther  <rguenther@suse.de>
4256         * tree.c (cp_walk_subtrees): Do not set input_location.
4258 2007-03-28  Simon Martin  <simartin@users.sourceforge.net>
4260         PR c++/29077
4261         * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
4262         destructor.
4264 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
4266         * parser.c (struct cp_parser): Update comment for
4267         greater_than_is_operator_p.
4268         (cp_parser_primary_expression): In C++0x mode, a cast operator can
4269         be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
4270         (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
4271         !GREATER_THAN_IS_OPERATOR_P.
4272         (cp_parser_binary_expression): When -Wc++0x-compat, warn about
4273         `>>' operators that will become two `>' tokens in C++0x.
4274         (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
4275         mode, allowing it to terminate default arguments.
4276         (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
4277         `>>' like two consecutive `>' tokens.
4278         (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
4279         (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
4280         ends a template argument.
4282 2007-03-28  Douglas Gregor  <doug.gregor@gmail.com>
4284         * decl.c (redeclaration_error_message): Complain when redeclaring
4285         a friend function with default template arguments (C++0x mode only).
4286         * cp-tree.h (check_default_tmpl_args): Declare.
4287         * pt.c (check_default_tmpl_args): In C++0x mode, permit default
4288         template arguments in function templates. Add support for checking
4289         the default template arguments of friend templates.
4290         (push_template_decl_real): Fix call to check_default_tmpl_args.
4291         (type_unification_real): If a template parameter has not been
4292         deduced but provides a default template argument, substitute into
4293         that default template argument.
4294         * parser.c (cp_parser_init_declarator): When declaring (but not
4295         defining!) a function template in C++0x mode, check for default
4296         template arguments.
4298 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
4300         PR c++/29993
4301         * decl.c (grokdeclarator): Deal with cv-qualified function type
4302         typedefs in the same way for member and non-member functions.
4304 2007-03-26  Dirk Mueller  <dmueller@suse.de>
4306         * parser.c (cp_parser_member_declaration): Pedwarn
4307         about stray semicolons after member declarations.
4309 2007-03-26  Paolo Carlini  <pcarlini@suse.de>
4311         PR c++/30500
4312         * pt.c (instantiate_decl): Set in_system_header.
4314 2007-03-22  Mark Mitchell  <mark@codesourcery.com>
4316         * cp-tree.h (current_tempalte_parms): Improve documentation.
4317         * pt.c (current_template_args): Likewise.
4319         PR c++/30863
4320         * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
4321         not consume tokens when failing.
4323 2007-03-22  Jim Wilson  <wilson@specifix.com>
4324             Mark Mitchell  <mark@codesourcery.com>
4326         PR c++/31273
4327         * call.c (standard_conversion): Use type_decays_to.  Keep FCODE
4328         consistent with FROM.
4330 2007-03-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4332         * error.c (dump_expr): Handle dependent names that designate types.
4333         * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
4335 2007-03-17  Kazu Hirata  <kazu@codesourcery.com>
4337         * cp-tree.def, parser.c, pt.c: Fix comment typos.
4339 2007-03-16  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4341         * cvt.c (cp_convert_and_check) : Define.
4342         * cp-tree.h (cp_convert_and_check): Declare.
4343         * call.c (convert_conversion_warnings): Rename to
4344         conversion_null_warnings.  The warning for floating-point to
4345         integer is handled by convert_and_check in convert_like_real.
4346         (convert_like_real): convert_conversion_warnings was renamed as
4347         conversion_null_warnings.
4348         * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
4349         overflow and changes of value during conversion.
4351 2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4353         PR c++/30891
4354         * parser.c (cp_parser_statement): If 'namespace' is found, this
4355         only can be a namespace alias definition, so parse it now.
4356         (cp_parser_namespace_alias_definition): if we find an open brace
4357         instead of '=', then this is actually a misplaced namespace
4358         definition.
4359         
4360 2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4362         PR c++/24924
4363         * decl.c (cxx_init_decl_processing): Move command-line options
4364         processing to c-opts.c.
4365         
4366 2007-03-15  Douglas Gregor  <doug.gregor@gmail.com>
4368         * ptree.c (cxx_print_type): Use formatting markup for integers
4369         when printing template parameter index/level/orig level.
4370         (cxx_print_xnode): Ditto.
4371         * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
4372         (struct template_parm_index_s): Remove the PARAMETER_PACK member.
4373         Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
4374         HOST_WIDE_INTs.
4375         (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
4376         rather than a HOST_WIDE_INT.
4377         Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
4378         NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
4379         better bit-packing.
4380         (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
4381         RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
4382         IN_BASE_INITIALIZER bool bitfields.
4383         (struct cp_declarator): Make KIND a 4-bit field. Make
4384         PARAMETER_PACK_P a bool bitfield just after KIND.
4385         * pt.c (uses_parameter_packs): Destroy the pointer set.
4386         (make_pack_expansion): Ditto.
4387         (check_for_bare_parameter_packs): Ditto.
4388         * name-lookup.c (push_to_top_level): Make need_pop a bool value.
4389         
4390 2007-03-14  Andrew Pinski  <andrew_pinski@playstation.sony.com>
4392         PR c++/31165
4393         * call.c  (convert_default_arg): Instead of copying the node,
4394         unshare it.
4396 2007-03-15  Dirk Mueller  <dmueller@suse.de>
4398         PR c++/30860
4399         * call.c (convert_conversion_warnings): New..
4400         (convert_like_real): .. factored out from here.
4401         (convert_conversion_warnings): Add warning about
4402         false being converted to NULL in argument passing.
4404 2007-03-14  Dirk Mueller  <dmueller@suse.de>
4406         * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
4407         (finish_do_body): Warn about empty body in do/while statement.
4409 2007-03-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4411         * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
4412         
4413 2007-03-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4415         PR c/21438
4416         * typeck.c (build_binary_op): Call warn_for_div_zero instead of
4417         warning.
4418         
4419 2007-03-13  Alexandre Oliva  <aoliva@redhat.com>
4421         * repo.c (init_repo): Initialize random_seed saved options.
4422         (finish_repo): Adjust.
4424 2007-03-13  Mark Mitchell  <mark@codesourcery.com>
4426         PR bootstrap/30899
4427         * Make-lang.in (doc/g++.1): Use $< to specify the location from
4428         which to copy.
4430 2007-03-12  Seongbae Park <seongbae.park@gmail.com>
4432         * decl.c (compute_array_index_type): New warning flag warn_vla.
4434 2007-03-12  Mark Mitchell  <mark@codesourcery.com>
4436         PR c++/30108
4437         * call.c (convert_default_arg): Copy non-constant arguments.
4439 2007-03-11  Mark Mitchell  <mark@codesourcery.com>
4441         PR c++/31038
4442         * parser.c (cp_parser_postfix_expression): Disallow compound
4443         literals in constant expressions.
4445         PR c++/30328
4446         * semantics.c (finish_typeof): Use unlowered_expr_type.
4447         
4448 2007-03-10  Mark Mitchell  <mark@codesourcery.com>
4450         PR c++/30274
4451         * cp-tree.h (unlowered_expr_type): New function.
4452         * typeck.c (is_bitfield_expr_with_lowered_type): Handle
4453         COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
4454         (unlowered_expr_type): New function.
4455         (build_unary_op): Disallow predecrements of bool bitfields.
4456         * call.c (build_conditional_expr): Use unlowered_expr_type.
4457         * pt.c (type_unification_real): Likewise.
4459 2007-03-09  Douglas Gregor  <doug.gregor@gmail.com>
4461         PR c++/20599
4462         * typeck.c (check_return_expr): Check for bare parameter packs.
4463         (comptypes): Compare template parameter packs and
4464         type pack expansions.
4465         * decl.c (grokdeclarator): Deal with the declaration of function
4466         parameter packs.
4467         (grokparms): Verify that the (optional) function parameter pack is
4468         at the end of the parameter list.
4469         (xref_basetypes): Handle pack expansions in the base class.
4470         (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
4471         * cp-tree.def (TYPE_ARGUMENT_PACK): New.
4472         (NONTYPE_ARGUMENT_PACK): New.
4473         (TYPE_PACK_EXPANSION): New.
4474         (EXPR_PACK_EXPANSION): New.
4475         (ARGUMENT_PACK_SELECT): New.
4476         * cp-objcp-common.c (cp_tree_size): Compute size of
4477         (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
4478         ARGUMENT_PACK_SELECT.
4479         * error.c (dump_template_argument): Print template argument packs.
4480         (dump_template_argument_list): Ditto.
4481         (dump_template_parameter): Dump `...' for template type parameter
4482         packs.
4483         (dump_type): Dump TYPE_PACK_EXPANSION nodes.
4484         (dump_parameters): Print function parameter packs.
4485         (dump_template_parms): Print template argument packs.
4486         (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
4487         (maybe_warn_variadic_templates): New.
4488         * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
4489         * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
4490         NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
4491         CAST_EXPR. 
4492         * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
4493         (write_template_arg): Write argument packs as separate arguments.
4494         * cp-tree.h (struct template_parm_index_s): Add flag that
4495         indicates that the template parameter is actually a parameter
4496         pack.
4497         (struct tree_argument_pack_select): New.
4498         (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
4499         (union lang_tree_node): Add argument_pack_select.
4500         (FUNCTION_PARAMETER_PACK_P): New.
4501         (PACK_EXPANSION_P): New.
4502         (PACK_EXPANSION_PATTERN): New.
4503         (SET_PACK_EXPANSION_PATTERN): New.
4504         (PACK_EXPANSION_PARAMETER_PACKS): New.
4505         (ARGUMENT_PACK_P): New.
4506         (ARGUMENT_PACK_ARGS): New.
4507         (SET_ARGUMENT_PACK_ARGS): New.
4508         (ARGUMENT_PACK_INCOMPLETE_P): New.
4509         (ARGUMENT_PACK_EXPLICIT_ARGS): New.
4510         (TEMPLATE_PARM_PARAMETER_PACK): New.
4511         (TEMPLATE_TYPE_PARAMETER_PACK): New.
4512         (ARGUMENT_PACK_SELECT_FROM_PACK): New.
4513         (ARGUMENT_PACK_SELECT_INDEX): New.
4514         (ARGUMENT_PACK_SELECT_ARG): New.
4515         (struct cp_declarator): Add parameter_pack_p flag.
4516         (maybe_warn_variadic_templates): Declare.
4517         (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
4518         indicate a template parameter pack. 
4519         (uses_parameter_packs): Declare.
4520         (template_parameter_pack_p): Declare.
4521         (template_parms_variadic_p): Declare.
4522         (make_pack_expansion): Declare.
4523         (check_for_bare_parameter_packs): Declare.
4524         * cxx-pretty-print.c (pp_cxx_unary_expression): Print
4525         sizeof... expressions. 
4526         (pp_cxx_expression): Print pack expansions and non-type argument
4527         packs.
4528         (pp_cxx_exception_specification): Print pack expansions. 
4529         (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
4530         (pp_cxx_ctor_initializer): Print pack expansions.
4531         (pp_cxx_type_id): Print pack expansions.
4532         (pp_cxx_template_argument_list): Print argument packs.
4533         (pp_cxx_template_parameter): Print ellipsis for template parameter
4534         packs.
4535         * pt.c (comp_template_parms): Compare template parameter packs.
4536         (template_parameter_pack_p): New.
4537         (template_parms_variadic_p): New.
4538         (template_args_variadic_p): New.
4539         (make_ith_pack_parameter_name): New.
4540         (struct find_parameter_pack_data): New.
4541         (find_parameter_packs_r): New.
4542         (uses_parameter_packs): New.
4543         (make_pack_expansion): New.
4544         (check_for_bare_parameter_packs): New.
4545         (expand_template_argument_pack): New.
4546         (reduce_template_parm_level): Propagate parameter pack flag.
4547         (process_template_parm): Add is_parameter_pack parameter to state
4548         when the parameter is actually a parameter pack. Create template
4549         parameter packs when is_parameter_pack is true.
4550         (current_template_args): The argument for a template parameter
4551         pack is an argument pack containing a single pack expansion.
4552         (process_partial_specialization): When checking that non-type
4553         argument expressions do not involve template parameters, loop over
4554         the arguments in argument packs separately.
4555         (push_template_decl_real): Check that the type of the declaration
4556         does not have any bare parameter packs. Check that primary
4557         templates have no more than one parameter pack, and that it comes
4558         at the end of the template parameter list.
4559         (convert_template_argument): Handle coercions for pack expansion
4560         expressions by coercing the pattern then rebuilding the expansion.
4561         (coerce_template_parms): When coercing the arguments for a
4562         variadic template, pack "extra" arguments into an argument pack.
4563         (coerce_template_template_parms): Cannot coerce between parameter
4564         packs and non-pack parameters.
4565         (template_args_equal): Compare PACK_EXPANSION_P expressions.
4566         (comp_template_args): Expand all template arguments packs before
4567         comparing template argument lists.
4568         (mangle_class_name_for_template): Make argument packs as separate
4569         template arguments.
4570         (for_each_template_parm_r): No need to handle BASELINK. 
4571         (instantiate_class_template): Handle pack expansions in the base
4572         class list.
4573         (tsubst_pack_expansion): New.
4574         (tsubst_template_args): Handle substitutions of argument packs and
4575         pack expansion into template argument lists.
4576         (tsubst_decl): Expand function parameter packs into separate
4577         function parameters.
4578         (tsubst_arg_types): Expand a type pack expansion into separate
4579         argument types.
4580         (tsubst_exception_specification): Handle pack expansions in
4581         exception specifiers.
4582         (tsubst): See through ARGUMENT_PACK_SELECT arguments when 
4583         replacing a template parameter with its argument. If we encounter
4584         a substitution for an argument pack, just return the parameter
4585         itself. 
4586         (tsubst_copy): sizeof(X...) returns the number of elements in
4587         parameter pack X.  See through ARGUMENT_PACK_SELECT when the
4588         PARM_DECL is a parameter pack.
4589         (tsubst_expr): Expression pack expansions and argument packs
4590         cannot show up here; they will all be handled through function
4591         calls, sizeof, and template argument lists.
4592         (tsubst_copy_and_build): sizeof(X...) returns the number of
4593         elements in parameter pack X.  Handle pack expansions in TREE_LIST
4594         and CONSTRUCTOR nodes.
4595         (fn_type_unification): Handle "incomplete" explicit template
4596         argument lists that specify some of the arguments for a template
4597         parameter pack.
4598         (type_unification_real): Unify arguments against pack expansions.
4599         (template_parm_level_and_index): New, helper function.
4600         (unify_pack_expansion): New.
4601         (unify): Unify argument packs on an argument-by-argument basis,
4602         handling variadic argument packs as well.
4603         (more_specialized_fn): Handle unification of function parameter
4604         packs. All things being equal, prefer non-variadic function
4605         templates to variadic function templates.
4606         (more_specialized_class): Prefer the variadic class template
4607         partial specialization that binds fewer arguments to a parameter
4608         pack.
4609         (regenerate_decl_from_template): Expand function parameter packs
4610         into separate parameters.
4611         (instantiate_decl): Ditto.
4612         (tsubst_initializer_list): Handle pack expansions for base-class
4613         initializers.
4614         (dependent_type_p_r): Determine dependent types in argument packs
4615         and pack expansions.
4616         (value_dependent_expression_p): Determine value-dependence of
4617         non-type argument packs.
4618         (dependent_template_arg_p): Handle argument packs.
4619         * semantics.c (finish_cond): Check for bare parameter packs.
4620         (finish_expr_stmt): Ditto.
4621         (finish_for_expr): Ditto.
4622         (finish_switch_cond): Ditto.
4623         (finish_mem_initializers): Ditto.
4624         * name-lookup.c (arg_assoc_type): Handle pack expansions and
4625         argument packs.
4626         * decl2.c (cp_build_parm_decl): Mark function parameter packs.
4627         * parser.c (make_declarator): Declarator is not an expansion.
4628         (make_pointer_declarator): Transfer parameter pack flag to outer
4629         declarator.
4630         (make_reference_declarator): Ditto.
4631         (make_ptrmem_declarator): Ditto.
4632         (make_call_declarator): Ditto.
4633         (make_array_declarator): Ditto.
4634         (cp_parser_postfix_expression): Allow pack expansion expressions
4635         in the argument list for a call expression.
4636         (cp_parser_parenthesized_expression_list): Add new parameter
4637         ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
4638         into separate arguments."
4639         (cp_parser_new_placement): Allow pack expansion expressions.
4640         (cp_parser_new_initializer): Ditto.
4641         (cp_parser_mem_initializer_list): Allow ellipsis to create a
4642         base-class initializer expansion.
4643         (cp_parser_mem_initializer): Ditto.
4644         (cp_parser_template_parameter_list): Keep track of whether the
4645         template parameter is a template parameter pack.
4646         (cp_parser_template_parameter): Parse the ellipsis to indicate a
4647         template parameter pack.
4648         (cp_parser_type_parameter): Ditto.
4649         (cp_parser_template_argument_list): Parse the ellipsis to indicate
4650         a pack expansion.
4651         (cp_parser_direct_declarator): Parse the ellipsis to indicate that
4652         this declarator is a parameter pack.
4653         (cp_parser_parameter_declaration): The ellipsis does not end the
4654         parameter declaration, because it might be a parameter pack. Parse
4655         the ellipsis to indicate a parameter pack.
4656         (cp_parser_initializer): Allow pack expansions.
4657         (cp_parser_initializer_list): Allow ellipsis to create an
4658         initializer expansion.
4659         (cp_parser_base_clause): Allow ellipsis to create a base specifier
4660         expansion.
4661         (cp_parser_type_id_list): Allow ellipsis to create an exception
4662         specifier expansion.
4663         (cp_parser_attribute_list): Don't allow pack expansions.
4664         (cp_parser_functional_cast): Allow pack expansions.
4665         (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
4666         compute the length of a parameter pack.
4667         (cp_parser_next_token_ends_template_argument_p): An ellipsis can
4668         end a template argument.
4669         * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
4670         NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
4671         CAST_EXPR. 
4673 2007-03-09  Dirk Mueller  <dmueller@suse.de>
4675         * call.c (build_new_op): Call warn_logical_operator.
4677 2007-03-08  Volker Reichelt  <reichelt@netcologne.de>
4679         PR c++/30852
4680         * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
4682         PR c++/30534
4683         * pt.c (any_template_arguments_need_structural_equality_p):
4684         Robustify.
4686 2007-03-08  Alexandre Oliva  <aoliva@redhat.com>
4688         * decl.c (grokdeclarator): Disable warnings for anonymous
4689         bitfields.
4691 2007-03-05  Volker Reichelt  <reichelt@netcologne.de>
4693         * typeck2.c (readonly_error): Always emit a hard error.
4694         Remove last argument.
4695         * cp-tree.h (readonly_error): Adjust prototype.
4696         * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
4697         * typeck.c (build_unary_op): Likewise.
4698         (build_modify_expr): Likewise.
4700 2007-03-04  Simon Martin  <simartin@users.sourceforge.net>
4702         PR c++/30895
4703         * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
4705 2007-03-03  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4707         PR c++/15787
4708         * parser.c (struct cp_parser): New IN_IF_STMT.
4709         (cp_parser_statement_seq_opt): Handle an unexpected 'else',
4710         returning if parsing the body of an 'if' statement or issuing an
4711         error and continuing.
4712         (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
4713         body of 'if'.
4714         (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
4715         
4716 2007-03-02  Simon Martin  <simartin@users.sourceforge.net>
4718         PR c++/28253
4719         * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
4720         for thunks.
4722 2007-03-02  Geoffrey Keating  <geoffk@apple.com>
4724         * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
4725         Objective-C++.  Don't exit early if -shared-libgcc needs to be
4726         added.
4728 2007-03-02  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4730         * typeck.c (common_base_type): Delete unused function.
4731         
4732 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
4734         * Make-lang.in: Add dummy lang.install-pdf target.
4736 2007-03-01  Simon Baldwin <simonb@google.com>
4738         PR c++/23689
4739         * decl.c (check_tag_decl): Added new warning for typedef ignored
4740         when it precedes an otherwise valid non-typedef declaration.
4742 2007-02-28  Sandra Loosemore  <sandra@codesourcery.com>
4744         * typeck.c (build_function_call): Store converted arguments
4745         in a stack-allocated array instead of building a list.
4746         (convert_arguments): Store arguments in the array passed in as an
4747         argument, and return the actual number of arguments.
4748         * call.c (build_call): Delete, and replace with...
4749         (build_call_n, build_call_a): New.
4750         (build_op_delete_call): Rewrite to avoid constructing argument lists.
4751         (build_over_call): Store converted arguments in a stack-allocated
4752         array instead of building a list.
4753         (build_cxx_call): Pass arguments in an array instead of as a list.
4754         (build_java_interface_fn_ref): Rewrite to avoid constructing
4755         argument lists.
4756         * tree.h: Update declarations to reflect above changes.
4757         * method.c (use_thunk): Use a stack-allocated array to hold
4758         the arguments instead of a list.
4759         * rtti.c (throw_bad_cast): Update call to cxx_call.
4760         (throw_bad_typeid): Likewise.
4761         (build_dynamic_cast_1): Likewise.
4762         * init.c (build_builtin_delete_call): Use build_call_n.
4763         * decl.c (expand_static_init): Likewise.
4764         * except.c (cp_protect_cleanup_actions): Likewise.
4765         * cp-gimplify.c (genericize_eh_spec_block): Likewise.
4766         (gimplify_must_not_throw_expr): Likewise.
4767         (cxx_omp_apply_fn): Use build_call_a.
4769 2007-02-26  Mark Mitchell  <mark@codesourcery.com>
4771         * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
4772         * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
4774 2007-02-25  Mark Mitchell  <mark@codesourcery.com>
4776         * cp-tree.h (static_ctors): Remove.
4777         * cp-tree.h (static_dtors): Likewise.
4778         * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
4779         refactoring of tree_map hierarchy.
4780         (decl_shadowed_for_var_insert): Likewise.
4781         * semantics.c (expand_body): Use c_expand_body.
4782         (expand_or_defer_fn): Don't update static_ctors or static_dtors.
4783         * decl2.c (static_ctors): Remove.
4784         (static_dtors): Likewise.
4785         (generate_ctor_or_dtor_function): Pass NULL_TREE to
4786         objc_generate_static_init_call.  Do not call static_[cd]tors.
4787         (generate_ctor_and_dtor_functions_for_priority): Do not check for
4788         static_[cd]tors.
4789         (cp_write_global_declarations): Likewise.
4791 2007-02-23  Richard Guenther  <rguenther@suse.de>
4793         * class.c (note_name_declared_in_class): Make declaration
4794         changes meaning a pedwarn.
4796 2007-02-22  Michael Matz  <matz@suse.de>
4798         PR c++/29433
4799         * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
4800         * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
4801         dump_function_decl): Guard emitting outer scopes by new flag.
4802         * cp-lang.c (cxx_dwarf_name): New function.
4803         (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
4804         * pt.c (classtype_mangled_name, mangle_class_name_for_template):
4805         Remove functions.
4806         (push_template_decl_real, lookup_template_class): Remove calls
4807         to above functions.
4809 2007-02-19  Mark Mitchell  <mark@codesourcery.com>
4811         * call.c (build_new_method_call): Ensure that explicit calls of
4812         destructors have type "void".
4814 2007-02-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4816         * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
4817         and -Walways-true with -Waddress.
4818         * cvt.c (convert_to_void): Replace unconditional warning with
4819         -Waddress.
4821 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
4823         * decl.c, tree.c: Fix comment typos.
4825 2007-02-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
4827         PR C++/30158
4828         * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the 
4829         statement expression if we had an error mark node.
4831 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
4832             Brooks Moses  <brooks.moses@codesourcery.com>
4833             Lee Millward  <lee.millward@codesourcery.com>
4835         * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
4836         Change class to tcc_vl_exp.
4838         * call.c (build_call): Use build_call_list instead 
4839         of build3. 
4840         (build_over_call): Likewise.
4841         (build_new_method_call): Use build_min_non_dep_call_list 
4842         instead of build_min_non_dep.
4844         * error.c (dump_call_expr_args): New function.
4845         (dump_aggr_init_expr_args): New function.
4846         (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them. 
4847         Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
4849         * cvt.c (convert_to_void): Use build_call_array instead
4850         of build3; use new AGGR_INIT_EXPR accessor macros.
4852         * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
4853         instead of TREE_CODE_LENGTH.
4855         * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
4856         AGGR_INIT_EXPR accessor macros.
4858         * cp-gimplify.c (cp_gimplify_init_expr): Use 
4859         AGGR_INIT_EXPR_SLOT to set the slot operand.
4861         * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
4862         (AGGR_INIT_EXPR_SLOT): New macro.
4863         (AGGR_INIT_EXPR_ARG): New macro.
4864         (aggr_init_expr_nargs): New macro.
4865         (AGGR_INIT_EXPR_ARGP): New macro.
4866         (aggr_init_expr_arg_iterator): New.
4867         (init_aggr_init_expr_arg_iterator): New.
4868         (next_aggr_init_expr_arg): New.
4869         (first_aggr_init_expr_arg): New.
4870         (more_aggr_init_expr_args_p): New.
4871         (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
4872         (stabilize_aggr_init): New declaration.
4873         (build_min_non_dep_call_list): Likewise.
4875         * tree.c (process_aggr_init_operands): New function.
4876         (build_aggr_init_array) New function.
4877         (build_cplus_new): Update to use new CALL_EXPR and
4878         AGGR_INIT_EXPR accessor macros. Replace use of build3 with
4879         build_aggr_init_array.
4880         (build_min_non_dep_call_list) New function.
4881         (build_min_nt): Assert input code parameter is not a variable
4882         length expression class.
4883         (build_min, build_min_non_dep): Likewise.
4884         (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
4885         to check for equality instead of recursing. Handle tcc_vl_exp
4886         tree code classes.
4887         (stabilize_call): Update to only handle CALL_EXPRs, not 
4888         AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
4889         (stabilize_aggr_init): New function.
4890         (stabilize_init): Use it.
4892         * cxx-pretty-print.c (pp_cxx_postfix_expression)
4893         <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
4894         AGGR_INIT_EXPR accessor macros and argument iterators.
4895         
4896         * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
4897         build_vl_exp. Iterate through the operands, recursively 
4898         processing each one.
4899         (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
4900         CALL_EXPR accessor macros.
4901         (value_dependent_expression_p) <default>: Handle tcc_vl_exp
4902         tree code classes. Use TREE_OPERAND_LENGTH instead of 
4903         TREE_CODE_LENGTH.
4905         * semantics.c (finish_call_expr): Use build_nt_call_list
4906         instead of build_nt.
4907         (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR 
4908         accessor macros. Use build_call_array to construct the 
4909         CALL_EXPR node instead of build3
4910         
4911         * decl2.c (build_offset_ref_call_from_tree): Use 
4912         build_nt_call_list and build_min_non_dep_call_list instead
4913         of build_min_nt and build_min_non_dep.
4915         * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
4916         Use build_nt_call_list instead of build_min_nt.
4918 2007-02-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4920         PR c++/28943
4921         * call.c (build_conditional_expr): Improve error message.
4922         
4923 2007-02-13  Dirk Mueller  <dmueller@suse.de>
4925         * friend.c (do_friend): Annotate warning about friend
4926         declarations in templates with OPT_Wnon_template_friend.
4927         Convert informal message from warning() to inform().
4929 2007-02-12  Simon Martin  <simartin@users.sourceforge.net>
4930             Mark Mitchell  <mark@codesourcery.com>
4932         PR c++/14622
4933         * pt.c (do_decl_instantiation): Detect type mismatches in explicit
4934         instantiations for variables.
4936 2007-02-12  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4938         PR middle-end/7651
4939         * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
4940         Check warn_unused_value just once.
4942 2007-02-11  Mark Mitchell  <mark@codesourcery.com>
4944         PR c++/26988
4945         * pt.c (determine_specialization): Use skip_artificial_parms_for.
4946         (fn_type_unificiation): Likewise.
4947         (get_bindings): Likewise.
4949 o2007-02-06  Mark Mitchell  <mark@codesourcery.com>
4951         PR target/29487
4952         * decl.c (finish_function): Use DECL_REPLACEABLE.
4953         * tree.c (cp_cannot_inline_tree_fn): Likewise.
4955 2007-02-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4957         * parser.c (cp_parser_primary_expression): Reformat overly long lines.
4959 2007-02-10  Richard Henderson  <rth@redhat.com>, Jakub Jelinek  <jakub@redhat.com>
4961         * decl.c (grokvardecl): Don't error if !have_tls.
4962         (grokdeclarator): Likewise.
4963         * parser.c (cp_parser_omp_threadprivate): Likewise.
4965 2007-02-07  Jakub Jelinek  <jakub@redhat.com>
4967         PR c++/30703
4968         * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
4969         parameters and result decls in omp clauses.
4970         (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
4971         by reference.
4973 2007-02-05  Dirk Mueller  <dmueller@suse.de>
4975         PR bootstrap/30510
4976         * parser.c (cp_parser_class_specifier): Always initialize bases.
4978 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
4980         * cp-tree.h (OMP_ATOMIC_CODE): Delete.
4981         (OMP_ATOMIC_DEPENDENT_P): Rewrite.
4982         * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
4983         expressions.
4984         * semantics.c (finish_omp_atomic): Store a whole expression node
4985         in operand 1, and integer_zero_node in operand 0, for dependent
4986         OMP_ATOMIC.  Rewrite to make flow easier to understand.
4988 2007-02-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4990         * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
4992 2007-02-04  Kazu Hirata  <kazu@codesourcery.com>
4994         * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
4995         parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
4997 2007-02-03  Douglas Gregor  <doug.gregor@gmail.com>
4999        * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
5000        keyword warning to -Wc++0x-compat.
5001         
5002 2007-02-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5004         * decl.c (grokdeclarator): Update documentation.
5006 2007-02-02  Jakub Jelinek  <jakub@redhat.com>
5008         PR c++/30536
5009         * decl.c (grokdeclarator): If __thread is used together with
5010         a storage class other than extern and static, clear thread_p
5011         after issuing diagnostics and fall through to checking the
5012         storage class.
5014 2007-01-30  Roger Sayle  <roger@eyesopen.com>
5016         * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
5017         calculating the size of an array (to avoid recursive errors).
5019 2007-01-30  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
5021         PR c++/24745
5022         * typeck.c (build_binary_op): Fix logic for warning. Move warning
5023         to -Wpointer-arith.
5024         * call.c (convert_like_real): Don't warn when converting to
5025         boolean type.
5026         
5027 2007-01-29  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
5029         * decl.c (pop_label): Replace warning with call to
5030         warn_for_unused_label.
5032 2007-01-28  Andrew Pinski  <pinskia@gmail.com>
5034         PR C++/28988
5035         * semantics.c (finish_pseudo_destructor_expr): Check the
5036         destrutor name by calling check_dtor_name.
5038 2007-01-24  Douglas Gregor  <dgregor@osl.iu.edu>
5040         * lex.c (D_CPP0X): Rename.
5041         (D_CXX0X): To this.
5042         (reswords): D_CPP0X -> D_CXX0X.
5043         (init_reswords): Ditto.
5044         * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
5045         of C++0x keywords as identifiers.
5047 2007-01-23  Simon Martin  <simartin@users.sourceforge.net>
5049         PR c++/27492
5050         * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
5051         function decls.
5053 2007-01-23  Ian Lance Taylor  <iant@google.com>
5055         * typeck.c (convert_for_assignment): Only warn about a = b = c
5056         when converting to bool.
5058 2007-01-23  Roger Sayle  <roger@eyesopen.com>
5060         * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
5061         TREE_OVERFLOW.
5062         * typeck.c (ignore_overflows): Remove the remaining uses of
5063         TREE_CONSTANT_OVERFLOW.
5065 2007-01-20  Jan Hubicka  <jh@suse.cz>
5067         * decl2.c (start_objects, start_static_storage_duration_function):
5068         Do not make the functions uninlinable.
5070 2007-01-17  Ian Lance Taylor  <iant@google.com>
5072         * class.c (add_method): Call VEC_reserve_exact rather than passing
5073         a negative size to VEC_reserve.
5075 2007-01-11  Simon Martin  <simartin@users.sourceforge.net>
5077         PR c++/29573
5078         * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
5080 2007-01-10  Mark Mitchell  <mark@codesourcery.com>
5082         PR c++/28999
5083         * decl.c (make_typename_type): If the qualified name is not a
5084         type, issue an error.
5085         * parser.c (cp_parser_elaborated_type_specifier): Fix comment
5086         formatting.
5088 2007-01-08  Geoffrey Keating  <geoffk@apple.com>
5090         * rtti.c: Include target.h.
5091         (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
5092         don't emit typeinfo for fundamental types as weak.
5093         * Make-lang.in (cp/rtti.o): Update and correct dependencies.
5095 2007-01-08  Richard Guenther  <rguenther@suse.de>
5097         * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
5099 2007-01-08  Mark Shinwell  <shinwell@codesourcery.com>
5101         * call.c (standard_conversion): Pass flag to
5102         vector_types_convertible_p to disallow emission of note.
5103         * typeck.c (convert_for_assignment): Pass flag to
5104         vector_types_convertible_p to allow emission of note.
5105         (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
5106         to disallow emission of note.
5108 2007-01-07  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
5110         PR c++/28986
5111         * typeck.c (build_binary_op): Call overflow_warning if
5112         TREE_OVERFLOW_P is true for the result and not for any of the
5113         operands.
5114         
5115 2007-01-06  Lee Millward  <lee.millward@codesourcery.com>
5117        PR c++/19439
5118        * class.c (add_method): Don't wait until template
5119        instantiation time to complain about duplicate methods.
5120         
5121 2007-01-05  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
5123         PR c/19978
5124         * semantics.c (finish_unary_op_expr): Warn only if result
5125         overflowed and operands did not.
5127 2007-01-05  Ian Lance Taylor  <iant@google.com>
5129         * typeck.c (build_binary_op): Warn about comparing a non-weak
5130         address to NULL.
5132 2007-01-05  Douglas Gregor  <doug.gregor@gmail.com>
5134         * pt.c (tsubst): Propagate the need for structural equality checks
5135         when reducing the level of template parameters.
5137 2007-01-03  Kazu Hirata  <kazu@codesourcery.com>
5139         * pt.c: Fix a comment typo.
5141 2007-01-02  Ian Lance Taylor  <iant@google.com>
5143         * semantics.c (maybe_convert_cond): Optionally warn when using an
5144         assignment as a condition.
5145         * typeck.c (convert_for_assignment): Optionally warn about
5146         assigning the result of an assignment to a bool.
5148 2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
5150         * pt.c (canonical_template_parms): Correct typo in comment.
5151         
5152 2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
5154         * typeck.c (structural_comptypes): Renamed from "comptypes".
5155         (comptypes): Use canonical type information to perform fast type
5156         comparison. When VERIFY_CANONICAL_TYPES, verify that the
5157         canonical type comparison returns the same results as we would see
5158         from the current, structural check. Support COMPARE_STRUCTURAL
5159         when we need structural checks.
5160         * decl.c (typename_compare): Fix comment.
5161         (build_typename_type): TYPENAME_TYPE nodes require structural
5162         equality checks, because they resolve different based on the
5163         current class type.
5164         (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
5165         require structural equality checks (for now).
5166         (build_ptrmemfunc_type): Build the canonical pointer to member
5167         function type.
5168         (compute_array_index_type): Whenever we build a new index type
5169         to represent the size of an array in a template, we need to mark
5170         this index type as requiring structural equality. This goes for
5171         arrays with value-dependent sizes with the current ABI, or all
5172         arrays with ABI-1.
5173         * tree.c (cplus_array_hash): New.
5174         (struct cplus_array_info): New.
5175         (cplus_array_compare): New.
5176         (cplus_array_htab): New.
5177         (build_cplus_array_type_1): Use a hash table to cache the array
5178         types we build. Build the canonical array type for each array
5179         type.
5180         (cp_build_qualified_type_real): When building a cv-qualified array
5181         type, use the hash table of array types and build canonical array
5182         types as necessary.
5183         (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
5184         use structural equality (for now).
5185         * cp-tree.h (COMPARE_STRUCTURAL): New.
5186         * pt.c (canonical_template_parms): New.
5187         (canonical_type_parameter): New.
5188         (process_template_parm): Find the canonical type parameter.
5189         (lookup_template_class): When we have named the primary template
5190         type, set the canonical type for our template class to the primary
5191         template type. If any of the template arguments need structural
5192         equality checks, the template class needs structural equality
5193         checks.
5194         (tsubst): When reducing the level of a template template
5195         parameter, we require structural equality tests for the resulting
5196         parameter because its template parameters have not had their types
5197         canonicalized. When reducing a template type parameter, find the
5198         canonical reduced type parameter.
5199         (any_template_arguments_need_structural_equality_p): New.