re PR c++/46056 ([C++0x] range-based for loop does not destruct iterators)
[gcc.git] / gcc / cp / ChangeLog
1 2010-10-20 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
2
3 PR c++/46056
4 * parser.c (cp_convert_range_for): Call cp_finish_decl
5 instead of finish_expr_stmt.
6
7 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
8
9 * cp-lang.c (finish_file): Removed.
10 * decl2.c (cp_write_global_declarations): Call
11 objc_write_global_declarations when compiling Objective-C++.
12
13 2010-10-19 Paolo Carlini <paolo.carlini@oracle.com>
14
15 PR c++/46046
16 * pt.c (add_to_template_args): Check extra_args for error_mark_node.
17 (coerce_template_parms): Likewise for args.
18
19 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
20
21 Implemented parsing @synthesize and @dynamic for Objective-C++.
22 * parser.c (cp_parser_objc_method_definition_list): Recognize
23 RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
24 (cp_parser_objc_at_dynamic_declaration): New.
25 (cp_parser_objc_at_synthesize_declaration): New.
26
27 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
28
29 * parser.c (cp_parser_objc_identifier_list): Check the return
30 value of cp_parser_identifier and react if it is error_mark_node.
31
32 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
33
34 Merge from apple/trunk branch on FSF servers.
35
36 2005-03-01 Fariborz Jahanian <fjahanian@apple.com>
37
38 Radar 4451818
39 * call.c (standard_conversion, implicit_conversion): Ignore
40 'volatile' attribute of artificially volatized type in objc when
41 evaluating various conversion weights.
42
43 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
44
45 Radar 4330422
46 * typeck.c (comp_ptr_ttypes_real): Remove the hack. un-volatize the
47 artiificially 'volatized' type before doing pointer comparison.
48
49 2010-10-18 Jakub Jelinek <jakub@redhat.com>
50
51 PR c/46015
52 * semantics.c (finish_goto_stmt): Call mark_rvalue_use on computed
53 goto destination.
54
55 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
56
57 Merge from apple/trunk branch on FSF servers.
58
59 2006-04-19 Fariborz Jahanian <fjahanian@apple.com>
60
61 Radar 4516785
62 * parser.c (cp_parser_simple_type_specifier): Don't lookup for
63 objc object types if type is scope qualified.
64
65 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
66
67 Merge from apple/trunk branch on FSF servers.
68
69 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
70
71 Radar 4133425
72 * lex.c (unqualified_name_lookup_error): Issue diagnostic
73 for private 'ivar' access.
74
75 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
76
77 * parser.c (cp_parser_objc_visibility_spec): Update to use visibility
78 enum, and handle @package.
79
80 2010-10-15 Jason Merrill <jason@redhat.com>
81
82 PR c++/45983
83 * tree.c (cp_build_qualified_type_real): Don't reuse a variant
84 with a different typedef variant of the element type.
85
86 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
87
88 merge from FSF apple 'trunk' branch.
89 2006 Fariborz Jahanian <fjahanian@apple.com>
90
91 Radars 4436866, 4505126, 4506903, 4517826
92 * typeck.c (finish_class_member_access_expr): Handle CLASS.property
93 syntax.
94 (cp_build_modify_expr): Likewise.
95 * parser.c (cp_parser_objc_method_prototype_list): Handle @property.
96 (cp_parser_objc_method_definition_list): Likewise.
97 (cp_parser_objc_property_decl): New.
98 (cp_parser_objc_property_attrlist): New.
99 (cp_parser_objc_at_property): New.
100
101 2010-10-14 Richard Guenther <rguenther@suse.de>
102
103 PR lto/44561
104 * cp-tree.h (NULLPTR_TYPE_P): Adjust.
105 * decl.c (cxx_init_decl_processing): Build a NULLPTR_TYPE node,
106 use build_int_cst.
107 * error.c (dump_type): Handle NULLPTR_TYPE.
108 (dump_type_prefix): Likewise.
109 (dump_type_suffix): Likewise.
110 * mangle.c (write_type): Likewise.
111 * name-lookup.c (arg_assoc_type): Likewise.
112 * rtti.c (typeinfo_in_lib_p): Likewise.
113 * pt.c (tsubst): Likewise.
114
115 2010-10-13 Jason Merrill <jason@redhat.com>
116
117 PR c++/45984
118 * class.c (fixup_attribute_variants): New fn.
119 * cp-tree.h: Declare it.
120 * pt.c (instantiate_class_template): Call it.
121 * semantics.c (begin_class_definition): Call it.
122
123 2010-10-13 Richard Henderson <rth@redhat.com>
124
125 * cp-lang.c (cp_eh_personality): Update call to
126 build_personality_function.
127 * except.c (choose_personality_routine): Update function comment.
128
129 2010-10-13 Richard Guenther <rguenther@suse.de>
130
131 * tree.c (cp_free_lang_data): Free DECL_NAMESPACE_USERS and
132 clear DECL_CHAIN of NAMESPACE_DECLs.
133
134 2010-10-11 Martin Jambor <mjambor@suse.cz>
135
136 PR c++/45562
137 * cp-tree.h (current_class_ref): Check that cp_function_chain is
138 non-NULL.
139 * call.c (build_cxx_call): Likewise.
140
141 2010-10-10 Jason Merrill <jason@redhat.com>
142
143 * pt.c (tsubst_default_argument): Handle DEFAULT_ARG.
144 (tsubst_default_arguments): Only do this once for cloned fns.
145 (tsubst): Use typedef_variant_p. Handle LANG_TYPE. Don't
146 handle expressions.
147 (tsubst_expr): Avoid calling tsubst_expr for non-expressions.
148 (tsubst_copy_and_build): Likewise.
149 (tsubst_initializer_list): Likewise.
150 (tsubst_copy): Change default to gcc_unreachable. Handle
151 OVERLOAD and PTRMEM_CST.
152
153 2010-10-10 Jason Merrill <jason@redhat.com>
154
155 PR lto/45959
156 PR lto/45960
157 * pt.c (tsubst_copy) [INTEGER_CST]: Instantiate the type.
158
159 2010-10-07 Andi Kleen <ak@linux.intel.com>
160
161 * Make-lang.in (c++_OBJS): Remove dummy-checksum.o.
162 (cc1plus-dummy): Remove.
163 (cc1plus-checksum): Change to run checksum over object files
164 and options only.
165
166 2010-10-08 Joseph Myers <joseph@codesourcery.com>
167
168 * cp-objcp-common.h (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
169
170 2010-10-07 Nicola Pero <nicola.pero@meta-innovation.com>
171
172 * cp-tree.def: Changed type of AT_ENCODE_EXPR from tcc_unary to
173 tcc_expression.
174 * cxx-pretty-print.c (pp_cxx_unary_expression): Added case for
175 AT_ENCODE_EXPR.
176 * error.c (dump_expr): Added case for AT_ENCODE_EXPR.
177 * pt.c (tsubst_copy): Added case for AT_ENCODE_EXPR.
178 (value_dependent_expression_p): Added case for AT_ENCODE_EXPR.
179 (type_dependent_expression_p): Added case for AT_ENCODE_EXPR.
180 * parser.c (cp_parser_objc_encode_expression): Updated comment.
181
182 2010-10-07 Nicola Pero <nicola@nicola.brainstorm.co.uk>
183
184 Merge from apple/trunk branch on FSF servers.
185
186 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
187
188 Radar 4508851
189 * parser.c (cp_parser_objc_interstitial_code): Recognize
190 and parse RID_NAMESPACE keyword.
191
192 2010-10-07 Iain Sandoe <iains@gcc.gnu.org>
193
194 * parser.c (cp_parser_objc_method_tail_params_opt): Peek new token after
195 finding ellipsis, before checking for attributes.
196
197 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
198
199 Merge from apple/trunk branch on FSF servers.
200 * cp-tree.def: Added AT_ENCODE_EXPR here instead of to the no
201 longer existing gcc/c-common.def.
202
203 2005-12-14 Fariborz Jahanian <fjahanian@apple.com>
204
205 Radar 4278774
206 * pt.c (tsubst_copy_and_build): Instantiate @endcode(T).
207 * parser.c (cp_parser_objc_encode_expression): Build a templatized
208 parse tree for @encode(T).
209
210 2005-12-14 Fariborz Jahanian <fjahanian@apple.com>
211
212 Radar 4278774
213 * c-common.def: Add new expression code AT_ENCODE_EXPR.
214
215 2010-10-06 Eric Botcazou <ebotcazou@adacore.com>
216
217 PR c++/45908
218 * typeck.c (cp_build_addr_expr_1): Add check for incomplete types in
219 code folding offsetof-like computations.
220
221 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
222
223 PR objc++/31125
224 * parser.c (cp_parser_objc_class_interface): If no identifier
225 follows an @interface token, stop parsing the interface after
226 printing an error.
227 (cp_parser_objc_class_implementation): If no identifier follows an
228 @implementation token, stop parsing the implementation after
229 printing an error.
230
231 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
232
233 PR objc++/23707
234 * parser.c (cp_parser_objc_method_keyword_params): If the required
235 colon is not found while parsing parameters, stop parsing them.
236
237 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
238
239 PR objc++/31126
240 * parser.c (cp_parser_objc_class_ivars): Do not eat the EOF or
241 @end after detecting it. Print an error if @end is found without
242 a '}'.
243 (cp_parser_objc_method_prototype_list): Do not eat the EOF after
244 detecting it. Fixed reading the next token when continuing
245 because of an error in a method signature. Print an error if EOF
246 is found without an '@end'.
247 (cp_parser_objc_method_definition_list): Same change.
248
249 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
250
251 Merge from apple/trunk branch on FSF servers:
252
253 2005-10-17 Fariborz Jahanian <fjahanian@apple.com>
254
255 Radar 4290840
256 * parser.c (cp_parser_objc_method_keyword_params): Check for valid
257 method parameters and issue error.
258 (cp_parser_objc_method_definition_list): Check for invalid tokens
259 which cannot start a function definition.
260
261 2005-10-14 Fariborz Jahanian <fjahanian@apple.com>
262
263 Radar 4294425
264 * parser.c (cp_parser_objc_message_args): Check for missing message
265 arguments and syntax error.
266
267 2005-10-13 Fariborz Jahanian <fjahanian@apple.com>
268
269 Radar 4261146
270 * parser.c (cp_parser_objc_class_ivars): Check for @end/eof while
271 looking for '}'.
272
273 2005-08-15 Ziemowit Laski <zlaski@apple.com>
274
275 Radar 4093475
276 * parser.c (cp_parser_objc_interstitial_code): Catch stray
277 '{' and '}' tokens and issue appropriate errors.
278
279 2005-08-02 Ziemowit Laski <zlaski@apple.com>
280
281 Radar 4185810
282 (cp_parser_statement_seq_opt): In addition to '}' and
283 end-of-file, a statement sequence may also be terminated
284 by a stray '@end'.
285
286 2010-10-05 Joseph Myers <joseph@codesourcery.com>
287
288 * cp-tree.h (cxx_print_error_function,
289 cxx_initialize_diagnostics): Declare using diagnostic_context
290 typedef.
291
292 2010-10-04 Andi Kleen <ak@linux.intel.com>
293
294 * Make-lang.in (g++, cc1plus): Add + to build rule.
295
296 2010-10-04 Jason Merrill <jason@redhat.com>
297
298 * tree.c (decl_storage_duration): New.
299 * cp-tree.h: Declare it.
300 (duration_kind): Return values.
301
302 2010-10-03 Jason Merrill <jason@redhat.com>
303
304 * typeck.c (require_complete_type_sfinae): Add complain parm to...
305 (require_complete_type): ...this function.
306 (cp_build_array_ref, convert_arguments): Use it.
307 (convert_for_initialization, cp_build_modify_expr): Likewise.
308 * cp-tree.h: Declare it.
309 * call.c (build_over_call): Use it.
310
311 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
312
313 merge from FSF 'apple/trunk' branch.
314 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
315
316 Radar 4386773
317 * cp/parser.c (cp_parser_objc_interstitial_code): For
318 @optional/@required set the optional/required flag.
319
320 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
321
322 * parser.c (cp_lexer_get_preprocessor_token): Tidied up comments
323 and indentation when finding an Objective-C++ CPP_AT_NAME token.
324
325 2010-09-29 Richard Guenther <rguenther@suse.de>
326
327 * cp-tree.h (CP_DECL_CONTEXT): Check DECL_FILE_SCOPE_P.
328 (CP_TYPE_CONTEXT): Similar.
329 (FROB_CONTEXT): Frob global_namespace to the global
330 TRANSLATION_UNIT_DECL.
331 * decl.c (cxx_init_decl_processing): Build a TRANSLATION_UNIT_DECL,
332 set DECL_CONTEXT of global_namespace to it.
333 (start_decl): Use CP_DECL_CONTEXT and test TYPE_P
334 instead of zeroing context.
335 (cp_finish_decl): Use DECL_FILE_SCOPE_P.
336 (grokfndecl): Likewise.
337 (start_preparsed_function): Likewise.
338 * name-lookup.c (maybe_push_decl): Use DECL_NAMESPACE_SCOPE_P.
339 (namespace_binding): Use SCOPE_FILE_SCOPE_P.
340 * pt.c (template_class_depth): Use CP_TYPE_CONTEXT.
341 (is_specialization_of_friend): Use CP_DECL_CONTEXT.
342 (push_template_decl_real): Likewise.
343 (tsubst_friend_class): Likewise. Adjust context comparisons.
344 (instantiate_class_template): Use CP_TYPE_CONTEXT.
345 (tsubst): Do not substitute into TRANSLATION_UNIT_DECL.
346 * cxx-pretty-print.c (pp_cxx_nested_name_specifier): Use
347 SCOPE_FILE_SCOPE_P.
348
349 2010-09-29 Yao Qi <yao@codesourcery.com>
350
351 * decl.c (get_atexit_node): Fix typo.
352
353 2010-09-28 Jason Merrill <jason@redhat.com>
354
355 * tree.c (lvalue_kind): Rename from lvalue_p_1, make nonstatic.
356 (real_lvalue_p): Take const_tree.
357 * cp-tree.h: Adjust.
358 * typeck.c (lvalue_or_else): Make temporary arg a permerror.
359 (cp_build_addr_expr_1): Likewise.
360
361 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
362
363 Partially merged from apple/trunk branch on FSF servers:
364 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
365 Radar 3803157 (method attributes)
366
367 * parser.c (cp_parser_objc_method_keyword_params): Handle attributes.
368 (cp_parser_objc_method_tail_params_opt): Likewise.
369 (cp_parser_objc_method_signature): Likewise.
370 (cp_parser_objc_method_maybe_bad_prefix_attributes): New.
371 (cp_parser_objc_method_prototype_list): Handle attributes.
372 (cp_parser_objc_method_definition_list): Likewise.
373
374 2010-09-28 Richard Henderson <rth@redhat.com>
375
376 * cp-lang.c: Include "target.h".
377 (cp_eh_personality): Use targetm.except_unwind_info.
378 * Make-lang.in (cp-lang.o): Update deps.
379
380 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
381
382 * parser.c (cp_parser_objc_valid_prefix_attributes): New.
383 (cp_parser_declaration): Parse prefix attributes for ObjC++.
384 (cp_parser_objc_protocol_declaration): Handle attributes.
385 (cp_parser_objc_class_interface): Likewise.
386 (cp_parser_objc_declaration): Likewise.
387
388 2010-09-27 Jason Merrill <jason@redhat.com>
389
390 Require lvalues as specified by the standard.
391 * typeck.c (lvalue_or_else): Use real_lvalue_p.
392 (cp_build_addr_expr_1): Split out of cp_build_unary_op.
393 (cp_build_addr_expr, cp_build_addr_expr_strict): Interfaces.
394 (decay_conversion, get_member_function_from_ptrfunc): Adjust.
395 (build_x_unary_op, build_reinterpret_cast_1): Adjust.
396 (build_const_cast_1): Adjust.
397 * cp-tree.h: Declare new fns.
398 * call.c (build_this, convert_like_real, build_over_call): Adjust.
399 (initialize_reference): Adjust.
400 * class.c (build_base_path, convert_to_base_statically): Adjust.
401 (build_vfn_ref, resolve_address_of_overloaded_function): Adjust.
402 * cvt.c (build_up_reference, convert_to_reference): Adjust.
403 * decl.c (register_dtor_fn): Adjust.
404 * decl2.c (build_offset_ref_call_from_tree): Adjust.
405 * except.c (initialize_handler_parm): Adjust.
406 * init.c (build_offset_ref, build_delete, build_vec_delete): Adjust.
407 * rtti.c (build_dynamic_cast_1, tinfo_base_init): Adjust.
408 * tree.c (stabilize_expr): Adjust.
409
410 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
411
412 Merge from apple/trunk branch on FSF servers:
413
414 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
415
416 Radar 4229905
417 * typeck.c (composite_pointer_type): Call objc_have_common_type
418 when comparing two objective-c pointer types.
419
420 2005-07-18 Ziemowit Laski <zlaski@apple.com>
421
422 Radar 4175534
423 * call.c (standard_conversion): Do not issue warnings when
424 comparing ObjC pointer types.
425
426 2005-06-22 Ziemowit Laski <zlaski@apple.com>
427
428 Radar 4154928
429 * call.c (standard_conversion): Allow for a pointer conversion
430 between any two ObjC pointer types.
431 * typeck.c (composite_pointer_type): Determine common type
432 for two ObjC pointer types.
433
434 2010-09-24 Jan Hubicka <jh@suse.cz>
435
436 * decl.c (finish_function): Use decl_replaceable_p
437 * method.c (make_alias_for_thunk): Update call of
438 cgraph_same_body_alias.
439
440 2010-09-24 Jason Merrill <jason@redhat.com>
441
442 * decl.c (compute_array_index_type): Remember type dependence of
443 array bound.
444 * pt.c (dependent_type_p_r): Don't recompute it here.
445
446 * error.c (dump_expr) [CASE_CONVERT]: Print conversion between
447 reference and pointer to the same type as "*" or "&".
448
449 2010-09-24 Nicola Pero <nicola.pero@meta-innovation.com>
450
451 * typeck.c (warn_args_num): Use warning 'too many arguments to
452 method [methodname]' for an Objective-C method instead of the less
453 satisfactory 'too many arguments to function' (with no method
454 name).
455
456 2010-09-21 Jason Merrill <jason@redhat.com>
457
458 * mangle.c (write_expression) [SCOPE_REF]: Only do -fabi-version=1
459 special handling if we know the member.
460
461 2010-09-18 Jason Merrill <jason@redhat.com>
462
463 * call.c (compare_ics): Do lvalue/rvalue reference binding
464 comparison for ck_list, too.
465
466 2010-09-15 Jason Merrill <jason@redhat.com>
467
468 * semantics.c (finish_id_expression): Diagnose use of function
469 parms in evaluated context outside function body.
470
471 * decl2.c (grokbitfield): Diagnose non-integral width.
472
473 * call.c (convert_like_real): Use the underlying type of the
474 reference for the temporary.
475
476 2010-09-15 Jakub Jelinek <jakub@redhat.com>
477
478 PR c++/45635
479 * class.c (build_vtbl_initializer): Use fn instead of init's operand
480 as first argument to FDESC_EXPR.
481
482 2010-09-15 Paolo Carlini <paolo.carlini@oracle.com>
483
484 PR c++/45665
485 * decl.c (grokdeclarator): Check build_memfn_type return value
486 for error_mark_node.
487
488 2010-09-13 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
489
490 * semantics.c (finish_for_stmt): Always test flag_new_for_scope.
491 (begin_range_for_stmt): Likewise.
492
493 2010-09-11 Rodrigo Rivas <rodrigorivascosta@gmail.com>
494
495 Implement range-based for-statements.
496 * cp-tree.def (RANGE_FOR_STMT): New.
497 * cp-tree.h (RANGE_FOR_DECL, RANGE_FOR_EXPR, RANGE_FOR_BODY): New.
498 (cp_convert_range_for): Declare.
499 * pt.c (tsubst_expr): Add RANGE_FOR_STMT.
500 (tsubst_copy_and_build): perform_koenig_lookup takes extra argument.
501 * semantics.c (begin_range_for_stmt): New.
502 (finish_range_for_decl): New.
503 (finish_for_stmt): Accept also RANGE_FOR_STMT.
504 (perform_koenig_lookup): Add extra argument include_std.
505 * parser.c (cp_parser_c_for): New with code from
506 cp_parser_iteration_statement().
507 (cp_parser_range_for): New.
508 (cp_convert_range_for): New.
509 (cp_parser_iteration_statement): Add range-for support.
510 (cp_parser_condition): Adjust comment.
511 (cp_parser_postfix_expression): perform_koenig_lookup takes extra
512 argument.
513 * dump.c (cp_dump_tree): Add RANGE_FOR_STMT.
514 * cxx-pretty-print.c: Likewise.
515 * lex.c (cxx_init): Likewise.
516 * name-lookup.c (lookup_function_nonclass): Add extra argument
517 include_std.
518 (lookup_arg_dependent): Likewise.
519 * name-lookup.h: Likewise.
520
521 2010-09-10 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
522
523 PR c++/43824
524 * error.c (maybe_warn_cpp0x): Add new warning
525 CPP0X_INLINE_NAMESPACES.
526 * parser.c (cp_parser_namespace_definition): Likewise.
527 * cp-tree.h (cpp0x_warn_str): Likewise.
528
529 2010-09-10 Richard Guenther <rguenther@suse.de>
530
531 * decl.c (reshape_init_vector): For VECTOR_TYPEs, use
532 TYPE_VECTOR_SUBPARTS instead of TYPE_DEBUG_REPRESENTATION_TYPE.
533
534 2010-09-10 Jan Hubicka <jh@suse.cz>
535
536 PR tree-optimization/45605
537 * cp/class.c (build_vtbl_initializer): Avoid wrong type conversion in
538 ADDR_EXPR.
539
540 2010-09-08 Jakub Jelinek <jakub@redhat.com>
541
542 PR c++/45588
543 * pt.c (tsubst) <case INTEGER_TYPE>: Call mark_rvalue_use
544 before calling fold_decl_constant_value.
545
546 2010-09-07 Arnaud Charlet <charlet@adacore.com>
547
548 * cp-tree.h (build_enumerator): Add new location_t parameter.
549 (build_lang_decl_loc): New function.
550 * decl.c (build_enumerator): New parameter loc. Use it when calling
551 build_decl. Replace build_lang_decl with build_lang_decl_loc.
552 * pt.c (tsubst_enum): Adjust call to build_enumerator.
553 * parser.c (cp_parser_enumerator_definition): Ditto.
554 * lex.c (build_lang_decl_loc): New function.
555
556 2010-09-06 Dodji Seketeli <dodji@redhat.com>
557
558 PR c++/45200
559 PR c++/45293
560 PR c++/45558
561 * tree.c (strip_typedefs): Strip typedefs from the context of
562 TYPENAME_TYPEs.
563
564 2010-09-06 Mark Mitchell <mark@codesourcery.com>
565
566 * typeck.c (cp_build_binary_op): Call do_warn_double_promotion.
567 * call.c (build_conditional_expr): Likewise.
568 (convert_arg_to_ellipsis): Likewise.
569
570 2010-09-06 Arnaud Charlet <charlet@adacore.com>
571
572 * parser.c (make_pointer_declarator, make_reference_declarator,
573 make_call_declarator, make_array_declarator): Set declarator->id_loc.
574 (cp_parser_init_declarator): Adjust location of decl if appropriate.
575
576 2010-09-06 Jason Merrill <jason@redhat.com>
577
578 * call.c (implicit_conversion): Fix value-init of enums.
579 (convert_like_real): Likewise.
580
581 * decl.c (cp_finish_decl): Don't change init for auto deduction.
582
583 * pt.c (fold_non_dependent_expr_sfinae): Split out from...
584 (fold_non_dependent_expr): ...here.
585 (convert_nontype_argument): Use it. Take complain parm.
586 Use perform_implicit_conversion instead of ocp_convert.
587 Allow cv-qual changes.
588 (convert_template_argument): Pass complain down.
589 (tsubst_template_arg): Suppress constant expression warnings.
590 Don't fold here.
591
592 * method.c (synthesized_method_walk): In constructors, also check
593 subobject destructors.
594
595 * semantics.c (finish_compound_literal): Always build a
596 TARGET_EXPR.
597
598 2010-08-30 Paolo Carlini <paolo.carlini@oracle.com>
599
600 PR c++/45043
601 * decl.c (grokdeclarator): Use MAIN_NAME_P only on IDENTIFIER_NODEs.
602
603 2010-08-30 Jakub Jelinek <jakub@redhat.com>
604
605 PR middle-end/45423
606 * parser.c (cp_parser_omp_atomic): Handle boolean
607 {PRE,POST}_INCREMENT.
608
609 2010-08-29 Jason Merrill <jason@redhat.com>
610
611 PR c++/44991
612 * parser.c (cp_parser_parameter_declaration): Pop parameter decls
613 after tentative parsing.
614
615 2010-08-22 Joseph Myers <joseph@codesourcery.com>
616
617 * Make-lang.in (g++spec.o): Update dependencies.
618 * g++spec.c: Include opts.h
619 (MATH_LIBRARY, LIBSTDCXX): Remove initial "-l".
620 (lang_specific_driver): Use cl_decoded_option structures.
621
622 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
623
624 * call.c: Use FOR_EACH_VEC_ELT.
625 * class.c: Likewise.
626 * decl.c: Likewise.
627 * decl2.c: Likewise.
628 * error.c: Likewise.
629 * except.c: Likewise.
630 * mangle.c: Likewise.
631 * method.c: Likewise.
632 * name-lookup.c: Likewise.
633 * parser.c: Likewise.
634 * pt.c: Likewise.
635 * repo.c: Likewise.
636 * semantics.c: Likewise.
637 * typeck2.c: Likewise.
638
639 2010-08-19 Jason Merrill <jason@redhat.com>
640
641 * call.c (reference_related_p): Check for error_mark_node.
642 (add_function_candidate): Check it instead of
643 same_type_ignoring_top_level_qualifiers_p.
644
645 PR c++/45315
646 * init.c (build_new_1): Don't use build_value_init in a template.
647 (build_value_init): Make sure we don't.
648
649 PR c++/45307
650 * cp-gimplify.c (cp_gimplify_expr): Also remove assignment
651 of empty class CONSTRUCTOR.
652
653 * except.c (pending_noexcept, pending_noexcept_checks): New.
654 (perform_deferred_noexcept_checks): New.
655 (maybe_noexcept_warning): Split from...
656 (finish_noexcept_expr): ...here. Adjust.
657 * decl2.c (cp_write_global_declarations): Call
658 perform_deferred_noexcept_checks.
659 * cp-tree.h: And declare it.
660
661 2010-08-18 Nathan Froyd <froydnj@codesourcery.com>
662
663 PR c++/45049
664 * name-lookup.c (push_overloaded_decl): Change DECL_CHAIN to
665 TREE_CHAIN.
666
667 2010-08-17 Kai Tietz <kai.tietz@onevision.com>
668
669 * class.c (note_name_declared_in_class): Make in 'extern "C"' blocks,
670 or if -fms-extensions is enabled check, check permissive.
671
672 2010-08-09 Jason Merrill <jason@redhat.com>
673
674 PR c++/45236
675 * pt.c (lookup_template_class): Don't re-coerce outer parms.
676
677 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
678
679 * call.c (add_builtin_candidates): Use VECs for local variable
680 `types'. Adjust remainder of function accordingly.
681
682 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
683
684 * name-lookup.c (is_associated_namespace): Convert local variables
685 to be VECs instead of TREE_LISTs.
686
687 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
688
689 * tree.c (varargs_function_p): Use stdarg_p.
690
691 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
692
693 * parser.c (cp_default_arg_entry): Declare. Declare a VEC of it.
694 (cp_unparsed_functions_entry): Declare. Declare a VEC of it.
695 (cp_parser) [unparsed_functions_queues]: Rename to unparsed_queues.
696 Change type to a VEC.
697 (unparsed_funs_with_default_args): Define.
698 (unparsed_funs_with_definitions): Define.
699 (push_unparsed_function_queues): New function.
700 (cp_parser_new): Call it.
701 (pop_unparsed_function_queues): New function.
702 (cp_parser_class_specifier): Adjust processing of unparsed functions.
703 (cp_parser_template_declaration_after_export): Use VEC_safe_push.
704 (cp_parser_save_member_function_body): Likewise.
705 (cp_parser_late_parsing_for_member): Call push_unparsed_function_queues
706 and pop_unparsed_function_queues.
707 (cp_parser_late_parsing_default_args): Likewise.
708 (cp_parser_save_default_args): Use VEC_safe_push.
709
710 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
711
712 * name-lookup.h (cp_label_binding): Declare. Declare a VEC type
713 containing it.
714 (cp_binding_level): Convert shadowed_labels and dead_vars_from_for
715 fields to VECs.
716 * decl.c (poplevel): Adjust for type changes.
717 (declare_local_label): Likewise.
718
719 2010-08-06 Jason Merrill <jason@redhat.com>
720
721 * typeck.c (complete_type_or_maybe_complain): Split out from...
722 (complete_type_or_else): Here.
723 (build_class_member_access_expr): Call it.
724 (finish_class_member_access_expr): Likewise.
725 * call.c (build_special_member_call): Likewise.
726 * cvt.c (build_expr_type_conversion): Likewise.
727 * init.c (build_new): Likewise.
728 * typeck2.c (build_functional_cast): Likewise.
729 * cp-tree.h: Declare it.
730
731 * init.c (build_value_init): Add complain parm.
732 (build_value_init_noctor): Likewise.
733 (perform_member_init): Pass it.
734 (expand_aggr_init_1): Likewise.
735 (build_new_1): Likewise.
736 (build_vec_init): Likewise.
737 * pt.c (tsubst_expr): Likewise.
738 * typeck2.c (build_functional_cast): Likewise.
739 * cp-tree.h: Adjust.
740 * tree.c (build_target_expr_with_type): Handle error_mark_node.
741
742 * typeck.c (decay_conversion): Any expression with type nullptr_t
743 decays to nullptr.
744
745 2010-07-30 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
746
747 PR c++/45112
748 * decl.c (duplicate_decls): Merge DECL_USER_ALIGN and DECL_PACKED.
749
750 2010-07-27 Jason Merrill <jason@redhat.com>
751
752 * pt.c (tsubst_expr) [DECL_EXPR]: Handle getting an AGGR_INIT_EXPR
753 from build_value_init.
754 * init.c (build_value_init_noctor): Give error for unknown array
755 bound.
756
757 2010-07-27 Joseph Myers <joseph@codesourcery.com>
758
759 * cp-objcp-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
760
761 2010-07-27 Joseph Myers <joseph@codesourcery.com>
762
763 * cp-objcp-common.c (cxx_initialize_diagnostics): First call
764 c_common_initialize_diagnostics.
765 * cp-objcp-common.h (LANG_HOOKS_OPTION_LANG_MASK,
766 LANG_HOOKS_COMPLAIN_WRONG_LANG_P): Define.
767
768 2010-07-21 Jason Merrill <jason@redhat.com>
769
770 * tree.c (cp_tree_equal): Fix CONSTRUCTOR handling.
771
772 * parser.c (cp_parser_init_declarator): Pass LOOKUP_NORMAL
773 to cp_finish_decl.
774
775 2010-07-20 Jeffrey Yasskin <jyasskin@google.com>
776
777 PR c++/44641
778 * pt.c (instantiate_class_template): Propagate the template's
779 location to its instance.
780
781 2010-07-20 Jason Merrill <jason@redhat.com>
782
783 PR c++/44967
784 * pt.c (tsubst_copy_and_build): Rework last change.
785
786 PR c++/44967
787 * pt.c (tsubst_copy_and_build): Handle partial substitution of
788 CALL_EXPR.
789
790 2010-07-19 Jason Merrill <jason@redhat.com>
791
792 PR c++/44996
793 * semantics.c (finish_decltype_type): Correct decltype
794 of parenthesized rvalue reference variable.
795
796 PR c++/44969
797 * tree.c (cp_tree_equal): Compare type of *CAST_EXPR.
798 * pt.c (iterative_hash_template_arg): Hash type of *CAST_EXPR.
799
800 2010-07-19 Paolo Carlini <paolo.carlini@oracle.com>
801
802 PR c++/44969
803 * typeck.c (build_x_compound_expr_from_list): Add tsubst_flags_t
804 parameter.
805 * cp-tree.h: Adjust declaration.
806 * init.c (perform_member_init): Adjust caller.
807 * decl.c (grok_reference_init, cp_finish_decl): Likewise.
808 * typeck2.c (store_init_value): Likewise.
809 (build_functional_cast): Pass complain argument to
810 build_x_compound_expr_from_list.
811
812 2010-07-16 Jason Merrill <jason@redhat.com>
813
814 PR c++/32505
815 * pt.c (process_partial_specialization): Diagnose partial
816 specialization after instantiation.
817 (most_specialized_class): Add complain parm.
818
819 * ptree.c (cxx_print_xnode): Handle TEMPLATE_INFO.
820
821 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
822
823 * init.c (build_new_1): Use cp_build_function_call_nary instead of
824 cp_build_function_call.
825
826 2010-07-15 Jason Merrill <jason@redhat.com>
827
828 PR c++/44909
829 * call.c (add_function_candidate): If we're working on an implicit
830 declaration, don't consider candidates that won't match.
831 * typeck.c (same_type_ignoring_top_level_qualifiers_p): Now a fn.
832 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): Adjust.
833
834 Revert:
835 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
836 (TYPE_HAS_USER_OPEQ): New.
837 * decl.c (grok_special_member_properties): Set it.
838 * class.c (add_implicitly_declared_members): Don't lazily declare
839 constructors/operator= if a base or member has a user-declared one.
840 (check_bases_and_members, check_bases): Adjust.
841 (check_field_decls, check_field_decl): Adjust.
842
843 2010-07-15 Anatoly Sokolov <aesok@post.ru>
844
845 * decl.c (integer_three_node): Remove.
846 (cxx_init_decl_processing): Do not initialize the integer_three_node.
847 * cp-tree.h (integer_three_node): Remove.
848
849 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
850
851 * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
852 * call.c: Likewise.
853 * class.c: Likewise.
854 * cp-gimplify.c: Likewise.
855 * decl.c: Likewise.
856 * decl2.c: Likewise.
857 * init.c: Likewise.
858 * mangle.c: Likewise.
859 * name-lookup.c: Likewise.
860 * optimize.c: Likewise.
861 * parser.c: Likewise.
862 * pt.c: Likewise.
863 * rtti.c: Likewise.
864 * search.c: Likewise.
865 * semantics.c: Likewise.
866 * typeck.c: Likewise.
867 * typeck2.c: Likewise.
868
869 2010-07-14 Jason Merrill <jason@redhat.com>
870
871 * init.c (sort_mem_initializers): Rename "field_type" to "ctx".
872 (build_field_list): Cache field type.
873
874 Implement C++0x unrestricted unions (N2544)
875 * class.c (check_field_decl): Loosen union handling in C++0x.
876 * method.c (walk_field_subobs): Split out from...
877 (synthesized_method_walk): ...here. Set msg before loops.
878 (process_subob_fn): Check for triviality in union members.
879 * init.c (sort_mem_initializers): Splice out uninitialized
880 anonymous unions and union members.
881 (push_base_cleanups): Don't automatically destroy anonymous unions
882 and union members.
883
884 2010-07-13 Jason Merrill <jason@redhat.com>
885
886 PR c++/44909
887 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
888 (TYPE_HAS_USER_OPEQ): New.
889 * decl.c (grok_special_member_properties): Set it.
890 * class.c (add_implicitly_declared_members): Don't lazily declare
891 constructors/operator= if a base or member has a user-declared one.
892 (check_bases_and_members, check_bases): Adjust.
893 (check_field_decls, check_field_decl): Adjust.
894 * method.c (synthesized_method_walk): Initialize check_vdtor.
895
896 PR c++/44540
897 * mangle.c (write_type): Canonicalize.
898 (canonicalize_for_substitution): Retain cv-quals on FUNCTION_TYPE.
899 (write_CV_qualifiers_for_type): Ignore them in abi>=5.
900
901 2010-07-13 Paolo Carlini <paolo.carlini@oracle.com>
902
903 PR c++/44908
904 * call.c (convert_like_real): Adjust convert_ptrmem call, pass
905 complain argument.
906 * typeck.c (get_delta_difference): Update prototype, add a
907 tsubst_flags_t parameter; update get_delta_difference_1 calls and
908 add checks for error_mark_node.
909 (get_delta_difference_1): Update prototype, add a tsubst_flags_t
910 parameter; update lookup_base call.
911 (build_ptrmemfunc): Update prototype, add a tsubst_flags_t
912 parameter; update get_delta_difference call and add check for
913 error_mark_node.
914 (convert_ptrmem): Update prototype, add a tsubst_flags_t
915 parameter; update get_delta_difference call and add check for
916 error_mark_node; update build_ptrmemfunc call.
917 (build_static_cast_1): Adjust convert_ptrmem call.
918 (expand_ptrmemfunc_cst): Adjust get_delta_difference call.
919 (cp_build_unary_op): Adjust build_ptrmemfunc call.
920 * cvt.c (cp_convert_to_pointer, convert_force): Adjust convert_ptrmem
921 and build_ptrmemfunc calls.
922 * cp-tree.h: Update build_ptrmemfunc and convert_ptrmem prototypes.
923
924 2010-07-12 Paolo Carlini <paolo.carlini@oracle.com>
925
926 PR c++/44907
927 * call.c (build_temp): Add tsubst_flags_t complain parameter;
928 adjust build_special_member_call call, pass complain.
929 (convert_like_real): Adjust build_temp call, pass complain.
930
931 2010-07-09 Jason Merrill <jason@redhat.com>
932
933 PR c++/43120
934 * cp-tree.h (BV_LOST_PRIMARY): New macro.
935 * class.c (update_vtable_entry_for_fn): Fix covariant thunk logic.
936 Set BV_LOST_PRIMARY.
937 (build_vtbl_initializer): Check BV_LOST_PRIMARY.
938
939 2010-07-08 Jason Merrill <jason@redhat.com>
940
941 PR c++/43120
942 * class.c (update_vtable_entry_for_fn): Fix handling of dummy
943 virtual bases for covariant thunks.
944
945 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
946
947 * cp-tree.h: Do not include toplev.h.
948
949 2010-07-06 Jason Merrill <jason@redhat.com>
950
951 PR c++/44703
952 * call.c (is_std_init_list): Look through typedefs.
953
954 PR c++/44778
955 * init.c (build_offset_ref): If scope isn't dependent,
956 don't exit early. Look at TYPE_MAIN_VARIANT.
957 * pt.c (tsubst_copy) [OFFSET_REF]: Do substitution.
958
959 * error.c (dump_function_decl): Don't crash on null DECL_NAME.
960
961 2010-07-06 Shujing Zhao <pearly.zhao@oracle.com>
962
963 * cp-tree.h (impl_conv_void): New type.
964 (convert_to_void): Adjust prototype.
965 * cvt.c (convert_to_void): Use impl_conv_void, emit and adjust the
966 diagnostic for easy translation. Change caller.
967 * typeck.c: Update call to convert_to_void.
968 * semantics.c: Likewise.
969 * init.c: Likewise.
970
971 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
972
973 * decl.c (cp_finish_decl): Call add_local_decl.
974 * optimize.c (clone_body): Adjust for new type of cfun->local_decls.
975
976 2010-07-05 Paolo Carlini <paolo.carlini@oracle.com>
977
978 * pt.c (tsubst): Early declare code = TREE_CODE (t) and use it
979 throughout.
980
981 2010-07-05 Shujing Zhao <pearly.zhao@oracle.com>
982
983 PR c++/22138
984 * parser.c (cp_parser_primary_expression): Error if local template is
985 declared.
986
987 2010-07-02 Le-Chun Wu <lcwu@google.com>
988
989 PR/44128
990 * name-lookup.c (pushdecl_maybe_friend): Warn when a local decl
991 (variable or type) shadows another type.
992
993 2010-07-02 Jakub Jelinek <jakub@redhat.com>
994
995 PR c++/44780
996 * typeck.c (convert_for_assignment): When converting a convertible
997 vector type or objc++ types, call mark_rvalue_use.
998 * typeck2.c (build_m_component_ref): Use return values from
999 mark_rvalue_use or mark_lvalue_use.
1000 * class.c (build_base_path): Likewise.
1001 * call.c (build_conditional_expr): Likewise.
1002
1003 2010-07-02 Paolo Carlini <paolo.carlini@oracle.com>
1004
1005 PR c++/44039
1006 * pt.c (tsubst_baselink): Return error_mark_node if lookup_fnfields
1007 returns NULL_TREE.
1008
1009 2010-07-01 Richard Guenther <rguenther@suse.de>
1010
1011 * cp-gimplify.c (cp_gimplify_expr): Open-code the rhs
1012 predicate we are looking for, allow non-gimplified
1013 INDIRECT_REFs.
1014
1015 2010-06-30 Paolo Carlini <paolo.carlini@oracle.com>
1016
1017 PR c++/44628
1018 * typeck.c (cp_build_unary_op): Early return error_mark_node when
1019 arg is NULL_TREE too.
1020 * call.c (convert_class_to_reference): Return error_mark_node when
1021 expr is NULL_TREE.
1022
1023 2010-06-30 Michael Matz <matz@suse.de>
1024
1025 * repo.c (finish_repo): Fix typo.
1026
1027 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
1028
1029 * parser.c (cp_parser_omp_for_loop): Use a VEC for for_block.
1030
1031 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
1032
1033 * repo.c (pending_repo): Change type to a VEC.
1034 (finish_repo): Adjust for new type of pending_repo.
1035 (repo_emit_p): Likewise.
1036
1037 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
1038
1039 * tree.c: Include gimple.h. Do not include tree-flow.h
1040 * decl.c: Do not include tree-flow.h
1041 * Make-lang.in: Adjust dependencies.
1042
1043 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
1044
1045 * decl.c (incomplete_var): Declare. Declare VECs containing them.
1046 (incomplete_vars): Adjust comment. Change type to a VEC.
1047 (maybe_register_incomplete_var): Adjust for new type.
1048 (complete_vars): Adjust iteration over incomplete_vars.
1049
1050 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
1051
1052 * decl.c (struct named_label_entry): Change type of bad_decls field
1053 to a VEC.
1054 (poplevel_named_label_1): Adjust for new type of bad_decls.
1055 (check_goto): Likewise.
1056
1057 2010-06-29 Jason Merrill <jason@redhat.com>
1058
1059 Enable implicitly declared move constructor/operator= (N3053).
1060 * class.c (add_implicitly_declared_members): A class with no
1061 explicitly declared copy or move constructor gets both declared
1062 implicitly, and similarly for operator=.
1063 (check_bases): A type with no copy ctor does not inhibit
1064 a const copy ctor in a derived class. It does mean the derived
1065 one is non-trivial.
1066 (check_field_decl): Likewise.
1067 (check_bases_and_members): A nonexistent copy ctor/op= is non-trivial.
1068 * tree.c (type_has_nontrivial_copy_init): Adjust semantics.
1069 (trivially_copyable_p): Likewise.
1070 * call.c (convert_like_real): Use type_has_nontrivial_copy_init.
1071 * class.c (finish_struct_bits): Likewise.
1072 * tree.c (build_target_expr_with_type): Likewise.
1073 * typeck2.c (store_init_value): Likewise.
1074
1075 Enable implicitly deleted functions (N2346)
1076 * class.c (check_bases_and_members): Adjust lambda flags.
1077 * method.c (implicitly_declare_fn): Set DECL_DELETED_FN if appropriate.
1078
1079 * decl2.c (mark_used): Adjust error for use of deleted function.
1080
1081 Machinery to support implicit delete/move.
1082 * cp-tree.h: (struct lang_type_class): Add lazy_move_assign,
1083 has_complex_move_ctor, has_complex_move_assign bitfields.
1084 (CLASSTYPE_LAZY_MOVE_ASSIGN): New.
1085 (TYPE_HAS_COMPLEX_MOVE_ASSIGN): New.
1086 (TYPE_HAS_COMPLEX_MOVE_CTOR): New.
1087 (enum special_function_kind): Add sfk_move_assignment.
1088 (LOOKUP_SPECULATIVE): New.
1089 * call.c (build_over_call): Return early if it's set.
1090 (build_over_call): Use trivial_fn_p.
1091 * class.c (check_bases): If the base has no default constructor,
1092 the derived one is non-trivial. Handle move ctor/op=.
1093 (check_field_decl): Likewise.
1094 (check_bases_and_members): Handle move ctor/op=.
1095 (add_implicitly_declared_members): Handle CLASSTYPE_LAZY_MOVE_ASSIGN.
1096 (type_has_move_constructor, type_has_move_assign): New.
1097 * decl.c (grok_special_member_properties): Handle move ctor/op=.
1098 * method.c (type_has_trivial_fn, type_set_nontrivial_flag): New.
1099 (trivial_fn_p): New.
1100 (do_build_copy_constructor): Use it.
1101 (do_build_assign_ref): Likewise. Handle move assignment.
1102 (build_stub_type, build_stub_object, locate_fn_flags): New.
1103 (locate_ctor): Use locate_fn_flags.
1104 (locate_copy, locate_dtor): Remove.
1105 (get_dtor, get_default_ctor, get_copy_ctor, get_copy_assign): New.
1106 (process_subob_fn, synthesized_method_walk): New.
1107 (maybe_explain_implicit_delete): New.
1108 (implicitly_declare_fn): Use synthesized_method_walk,
1109 type_has_trivial_fn, and type_set_nontrivial_flag.
1110 (defaulted_late_check): Set DECL_DELETED_FN.
1111 (defaultable_fn_check): Handle sfk_move_assignment.
1112 (lazily_declare_fn): Clear CLASSTYPE_LAZY_* early. Don't declare
1113 implicitly deleted move ctor/op=.
1114 * search.c (lookup_fnfields_1): Handle sfk_move_assignment.
1115 (lookup_fnfields_slot): New.
1116 * semantics.c (omp_clause_info_fndecl): Remove.
1117 (cxx_omp_create_clause_info): Use get_default_ctor, get_copy_ctor,
1118 get_copy_assign, trivial_fn_p.
1119 (trait_expr_value): Adjust call to locate_ctor.
1120 * tree.c (special_function_p): Handle sfk_move_assignment.
1121
1122 * class.c (type_has_virtual_destructor): New.
1123 * cp-tree.h: Declare it.
1124 * semantics.c (trait_expr_value): Use it.
1125
1126 * call.c (build_over_call): Only give warnings with tf_warning.
1127
1128 * name-lookup.c (pop_scope): Handle NULL_TREE.
1129
1130 * cp-tree.h (TYPE_HAS_ASSIGN_REF): Rename to TYPE_HAS_COPY_ASSIGN.
1131 (TYPE_HAS_CONST_ASSIGN_REF): Rename to TYPE_HAS_CONST_COPY_ASSIGN.
1132 (TYPE_HAS_INIT_REF): Rename to TYPE_HAS_COPY_CTOR.
1133 (TYPE_HAS_CONST_INIT_REF): Rename to TYPE_HAS_CONST_COPY_CTOR.
1134 (TYPE_HAS_COMPLEX_ASSIGN_REF): Rename to TYPE_HAS_COMPLEX_COPY_ASSIGN.
1135 (TYPE_HAS_COMPLEX_INIT_REF): Rename to TYPE_HAS_COMPLEX_COPY_CTOR.
1136 (TYPE_HAS_TRIVIAL_ASSIGN_REF): Rename to TYPE_HAS_TRIVIAL_COPY_ASSIGN.
1137 (TYPE_HAS_TRIVIAL_INIT_REF): Rename to TYPE_HAS_TRIVIAL_COPY_CTOR.
1138 (CLASSTYPE_LAZY_ASSIGNMENT_OP): Rename to CLASSTYPE_LAZY_COPY_ASSIGN.
1139 (sfk_assignment_operator): Rename to sfk_copy_assignment.
1140 * decl.c, call.c, class.c, init.c, method.c, pt.c, ptree.c: Adjust.
1141 * search.c, semantics.c, tree.c: Adjust.
1142
1143 * pt.c (dependent_scope_ref_p): Remove.
1144 (value_dependent_expression_p): Don't call it.
1145 (type_dependent_expression_p): Here either.
1146 * init.c (build_offset_ref): Set TREE_TYPE on a qualified-id
1147 if the scope isn't dependent.
1148
1149 * pt.c (convert_nontype_argument): Use mark_lvalue_use if we want
1150 a reference.
1151
1152 PR c++/44587
1153 * pt.c (has_value_dependent_address): New.
1154 (value_dependent_expression_p): Check it.
1155 (convert_nontype_argument): Likewise. Call decay_conversion before
1156 folding if we want a pointer.
1157 * semantics.c (finish_id_expression): Don't add SCOPE_REF if the
1158 scope is the current instantiation.
1159
1160 2010-06-28 Jakub Jelinek <jakub@redhat.com>
1161
1162 PR c++/44682
1163 * class.c (build_base_path): If want_pointer, call mark_rvalue_use
1164 on expr.
1165
1166 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
1167
1168 * init.c: Do not include except.h.
1169 * decl.c: Likewise.
1170 * expr.c: Likewise.
1171 * cp-lang.c: Likewise.
1172 * pt.c: Likewise.
1173 * semantics.c: Likewise.
1174 * decl2.c: Likewise.
1175 * except.c: Likewise.
1176 (init_exception_processing): Do not set the removed
1177 lang_protect_cleanup_actions here.
1178 (cp_protect_cleanup_actions): Make non-static and remove prototype.
1179 (doing_eh): New, moved from except.c but removed the do_warning flag.
1180 (expand_start_catch_block): Update doing_eh call.
1181 (expand_end_catch_block): Likewise.
1182 (build_throw): Likewise.
1183 * cp-tree.h: Prototype cp_protect_cleanup_actions.
1184 * cp-objcp-common.h: Set LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS to
1185 cp_protect_cleanup_actions.
1186 * Make-lang.in: Update dependencies.
1187
1188 2010-06-26 Jason Merrill <jason@redhat.com>
1189
1190 * call.c (add_function_candidate): Set LOOKUP_COPY_PARM for any
1191 constructor called with a single argument that takes a reference
1192 to the constructor's class.
1193 (BAD_CONVERSION_RANK): New.
1194 (compare_ics): Use it to compare bad ICSes.
1195
1196 2010-06-25 Joseph Myers <joseph@codesourcery.com>
1197
1198 * lang-specs.h: Remove +e handling.
1199
1200 2010-06-24 Andi Kleen <ak@linux.intel.com>
1201
1202 * parser.c: (cp_parser_question_colon_clause):
1203 Switch to use cp_lexer_peek_token.
1204 Call warn_for_omitted_condop. Call pedwarn for omitted
1205 middle operand.
1206
1207 2010-06-22 Jakub Jelinek <jakub@redhat.com>
1208
1209 PR c++/44619
1210 * typeck2.c (build_m_component_ref): Call mark_lvalue_use on
1211 datum and mark_rvalue_use on component.
1212
1213 PR c++/44627
1214 * error.c (dump_expr): Don't look at CALL_EXPR_ARG (t, 0) if
1215 the CALL_EXPR has no arguments.
1216
1217 2010-06-21 Jason Merrill <jason@redhat.com>
1218
1219 * typeck.c (comp_except_specs): Fix ce_derived with noexcept.
1220
1221 * semantics.c (check_trait_type): Check COMPLETE_TYPE_P for array
1222 element type.
1223
1224 2010-06-17 Nathan Froyd <froydnj@codesourcery.com>
1225
1226 * name-lookup.c (struct arg_lookup): Convert namespaces and
1227 classes fields to VEC.
1228 (arg_assoc_namespace): Adjust for new type of namespaces.
1229 (arg_assoc_class): Adjust for new type of classes.
1230 (lookup_arg_dependent): Use make_tree_vector and
1231 release_tree_vector.
1232 * typeck2.c (build_x_arrow): Use vec_member.
1233
1234 2010-06-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
1235
1236 PR c++/44486
1237 * error.c (dump_decl): Better wording for anonymous namespace.
1238
1239 2010-06-16 Nathan Froyd <froydnj@codesourcery.com>
1240
1241 * class.c (build_vtbl_initializer): Adjust computation of new_position
1242 and which entry to add padding for.
1243
1244 2010-06-16 Jason Merrill <jason@redhat.com>
1245
1246 * except.c (check_noexcept_r): Return the problematic function.
1247 (finish_noexcept_expr): Give -Wnoexcept warning. Add complain parm.
1248 * pt.c (tsubst_copy_and_build): Pass it.
1249 * parser.c (cp_parser_unary_expression): Likewise.
1250 * cp-tree.h: Adjust prototype.
1251
1252 * method.c (defaulted_late_check): Give the defaulted method
1253 the same exception specification as the implicit declaration.
1254
1255 2010-06-15 Jason Merrill <jason@redhat.com>
1256
1257 * class.c (add_implicitly_declared_members): Implicit assignment
1258 operators can also be virtual overriders.
1259 * method.c (lazily_declare_fn): Likewise.
1260
1261 * call.c (convert_like_real): Give "initializing argument of"
1262 information for ambiguous conversion. Give source position
1263 of function.
1264
1265 * call.c (print_z_candidates): Do print viable deleted candidates.
1266 (joust): Don't choose a deleted function just because its worst
1267 conversion is better than another candidate's worst.
1268
1269 * call.c (convert_like_real): Don't complain about
1270 list-value-initialization from an explicit constructor.
1271
1272 * decl.c (duplicate_decls): Use DECL_IS_BUILTIN rather than test
1273 DECL_SOURCE_LOCATION directly.
1274
1275 * class.c (type_has_user_provided_default_constructor): Use
1276 sufficient_parms_p.
1277
1278 * call.c (is_subseq): Handle ck_aggr, ck_list.
1279 (compare_ics): Treat an aggregate or ambiguous conversion to the
1280 same type as involving the same function.
1281
1282 2010-06-13 Shujing Zhao <pearly.zhao@oracle.com>
1283
1284 * typeck.c (convert_for_assignment): Fix comment. Change message
1285 format from %d to %qP.
1286 (convert_for_initialization): Fix comment.
1287
1288 2010-06-11 Shujing Zhao <pearly.zhao@oracle.com>
1289
1290 * cp-tree.h (expr_list_kind): New type.
1291 (impl_conv_rhs): New type.
1292 (build_x_compound_expr_from_list, convert_for_initialization): Adjust
1293 prototype.
1294 (typeck.c (convert_arguments): Use impl_conv_rhs and emit the
1295 diagnostics for easy translation. Change caller.
1296 (convert_for_initialization): Use impl_conv_rhs and change caller.
1297 (build_x_compound_expr_from_list): Use expr_list_kind and emit the
1298 diagnostics for easy translation. Change caller.
1299 * decl.c (bad_spec_place): New enum.
1300 (bad_specifiers): Use it and emit the diagnostics for easy
1301 translation. Change caller.
1302 * pt.c (coerce_template_parms): Put the diagnostics in full sentence.
1303
1304 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1305
1306 * cp-tree.h (struct saved_scope): Change decl_ns_list field type
1307 to a VEC.
1308 * decl2.c (cp_write_global_declarations): Adjust for new type of
1309 decl_namespace_list.
1310 * name-lookup.c (current_decl_namespace): Likewise.
1311 (push_decl_namespace): Likewise.
1312 (pop_decl_namespace): Likewise.
1313
1314 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1315
1316 * call.c (build_java_interface_fn_ref): Call build_function_type_list
1317 instead of build_function_type.
1318 * decl.c (cxx_init_decl_processing): Likewise.
1319 (declare_global_var): Likewise.
1320 (get_atexit_node): Likewise.
1321 (expand_static_init): Likewise.
1322 * decl2.c (start_objects): Likewise.
1323 (start_static_storage_duration_function): Likewise.
1324 * except.c (init_exception_processing): Likewise.
1325 (build_exc_ptr): Likewise.
1326 (build_throw): Likewise.
1327 * rtti.c (throw_bad_cast): Likewise.
1328 (throw_bad_typeid): Likewise.
1329 (build_dynamic_cast_1): Likewise.
1330
1331 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1332
1333 * call.c (build_call_n): Call XALLOCAVEC instead of alloca.
1334 (build_op_delete_call): Likewise.
1335 (build_over_call): Likewise.
1336 * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
1337 * pt.c (process_partial_specialization): Likewise.
1338 (tsubst_template_args): Likewise.
1339 * semantics.c (finish_asm_stmt): Likewise.
1340
1341 2010-06-08 Nathan Sidwell <nathan@codesourcery.com>
1342
1343 * decl.c (record_key_method_defined): New, broken out of ...
1344 (finish_function): ... here. Call it.
1345 (start_decl): Treat aliases as definitions.
1346
1347 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1348
1349 * typeck2.c (abstract_virtuals_error): Use typed GC allocation.
1350
1351 * pt.c (maybe_process_partial_specialization): Likewise.
1352 (register_specialization): Likewise.
1353 (add_pending_template): Likewise.
1354 (lookup_template_class): Likewise.
1355 (push_tinst_level): Likewise.
1356
1357 * parser.c (cp_lexer_new_main): Likewise.
1358 (cp_lexer_new_from_tokens): Likewise.
1359 (cp_token_cache_new): Likewise.
1360 (cp_parser_context_new): Likewise.
1361 (cp_parser_new): Likewise.
1362 (cp_parser_nested_name_specifier_opt): Likewise.
1363 (cp_parser_template_id): Likewise.
1364
1365 * name-lookup.c (binding_entry_make): Likewise.
1366 (binding_table_construct): Likewise.
1367 (binding_table_new): Likewise.
1368 (cxx_binding_make): Likewise.
1369 (pushdecl_maybe_friend): Likewise.
1370 (begin_scope): Likewise.
1371 (push_to_top_level): Likewise.
1372
1373 * lex.c (init_reswords): Likewise.
1374 (retrofit_lang_decl): Likewise.
1375 (cxx_dup_lang_specific_decl): Likewise.
1376 (copy_lang_type): Likewise.
1377 (cxx_make_type): Likewise.
1378
1379 * decl.c (make_label_decl): Likewise.
1380 (check_goto): Likewise.
1381 (start_preparsed_function): Likewise.
1382 (save_function_data): Likewise.
1383
1384 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
1385
1386 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
1387
1388 * class.c (finish_struct_1): Likewise.
1389
1390 * cp-tree.h (struct lang_type): Add variable_size GTY option.
1391 (struct lang_decl): Likewise.
1392
1393 * parser.c (cp_parser_new): Update comment to not reference
1394 ggc_alloc.
1395
1396 2010-06-07 Jason Merrill <jason@redhat.com>
1397
1398 PR c++/44366
1399 * error.c (dump_parameters): Mask out TFF_SCOPE.
1400 (dump_simple_decl): Don't print the scope of a PARM_DECL.
1401 (dump_scope): Remove no-op mask.
1402
1403 PR c++/44401
1404 * parser.c (cp_parser_lookup_name): Fix naming the constructor.
1405
1406 * cp-tree.h (COMPLETE_OR_OPEN_TYPE_P): New macro.
1407 * init.c (build_offset_ref): Use it.
1408 * pt.c (maybe_process_partial_specialization): Use it.
1409 (instantiate_class_template): Use it.
1410 * search.c (lookup_base): Use it.
1411
1412 2010-06-07 Jakub Jelinek <jakub@redhat.com>
1413
1414 PR c++/44444
1415 * expr.c (mark_exp_read): Handle INDIRECT_REF.
1416 * cvt.c (convert_to_void): Handle INDIRECT_REF like
1417 handled_component_p.
1418
1419 PR c++/44443
1420 * decl.c (initialize_local_var): If TREE_USED is set on the type,
1421 set also DECL_READ_P on the decl.
1422
1423 2010-05-25 Dodji Seketeli <dodji@redhat.com>
1424
1425 PR c++/44188
1426 * cp-tree.h (typedef_variant_p): Move this declaration to
1427 gcc/tree.h.
1428 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
1429 * decl.c (grokdeclarator): Do not rename debug info of an
1430 anonymous tagged type named by a typedef.
1431
1432 2010-06-05 Fabien Chêne <fabien@gcc.gnu.org>
1433
1434 PR c++/44086
1435 * class.c (check_field_decls): Move the call to
1436 check_bitfield_decl before trying to set the
1437 CLASSTYPE_READONLY_FIELDS_NEED_INIT flag.
1438
1439 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
1440
1441 * typeck.c: Update include path for moved files.
1442 * decl.c: Likewise.
1443 * rtti.c: Likewise.
1444 * cp-gimplify.c: Likewise.
1445 * cp-lang.c: Likewise.
1446 * pt.c: Likewise.
1447 * semantics.c: Likewise.
1448 * cxx-pretty-print.h: Likewise.
1449 * decl2.c: Likewise.
1450 * parser.c: Likewise.
1451 * cp-objcp-common.c: Likewise.
1452 * cp-tree.h: Likewise.
1453 * name-lookup.c: Likewise.
1454 * lex.c: Likewise.
1455 * name-lookup.h: Likewise.
1456 * config-lang.in: Update paths in gtfiles for files in c-family/.
1457 * Make-lang.in: Likewise.
1458
1459 2010-06-04 Magnus Fromreide <magfr@lysator.liu.se>
1460
1461 * cvt.c (cp_convert_to_pointer): Use null_ptr_cst_p.
1462 * typeck.c (build_ptrmemfunc): Likewise.
1463
1464 2010-06-04 Jason Merrill <jason@redhat.com>
1465
1466 * typeck2.c (merge_exception_specifiers): Adjust merging of
1467 throw() and noexcept(true).
1468
1469 * pt.c (value_dependent_expression_p) [NOEXCEPT_EXPR]: Avoid
1470 using an uninitialized variable.
1471
1472 * cxx-pretty-print.c (pp_cxx_unary_expression): Handle NOEXCEPT_EXPR.
1473 (pp_cxx_expression): Likewise.
1474
1475 Implement noexcept-specification (15.4)
1476 * parser.c (cp_parser_exception_specification_opt): Parse it.
1477 Give -Wdeprecated warning about throw() specs.
1478 * pt.c (tsubst_exception_specification): Handle it.
1479 * error.c (dump_exception_spec): Handle it.
1480 (dump_expr): Handle NOEXCEPT_EXPR.
1481 * cxx-pretty-print.c (pp_cxx_exception_specification): Likewise.
1482 * typeck.c (comp_except_specs): Handle compatibility rules.
1483 Change exact parm to take an enum.
1484 * typeck2.c (merge_exception_specifiers): Handle noexcept.
1485 * except.c (nothrow_spec_p, type_noexcept_p): New fns.
1486 (type_throw_all_p, build_noexcept_spec): New fns.
1487 * cp-tree.h (TYPE_NOTHROW_P, TYPE_NOEXCEPT_P): Use them.
1488 (comp_except_specs): Define ce_derived, ce_normal, ce_exact enums.
1489 (cp_tree_index): Add CPTI_NOEXCEPT_TRUE_SPEC, CPTI_NOEXCEPT_FALSE_SPEC.
1490 (noexcept_true_spec, noexcept_false_spec): New macros.
1491 * name-lookup.c (pushdecl_maybe_friend): Adjust.
1492 * search.c (check_final_overrider): Adjust.
1493 * decl.c (check_redeclaration_exception_specification): Adjust.
1494 (use_eh_spec_block): Use type_throw_all_p.
1495 (cxx_init_decl_processing): Set noexcept_false_spec,noexcept_true_spec.
1496 Give operator new a noexcept-specification in C++0x mode.
1497 * tree.c (build_exception_variant, cxx_type_hash_eq): Adjust.
1498 (cp_build_type_attribute_variant): Don't test TYPE_RAISES_EXCEPTIONS.
1499
1500 Implement noexcept operator (5.3.7)
1501 * cp-tree.def (NOEXCEPT_EXPR): New.
1502 * except.c (check_noexcept_r, finish_noexcept_expr): New.
1503 * cp-tree.h: Declare finish_noexcept_expr.
1504 * parser.c (cp_parser_unary_expression): Parse noexcept-expression.
1505 * pt.c (tsubst_copy_and_build): And tsubst it.
1506 (type_dependent_expression_p): Handle it.
1507 (value_dependent_expression_p): Handle it.
1508
1509 * call.c (build_conditional_expr): Never fold in unevaluated context.
1510 * tree.c (build_aggr_init_expr): Propagate TREE_NOTHROW.
1511 * semantics.c (simplify_aggr_init_expr): Likewise.
1512 * typeck.c (merge_types): Call merge_exception_specifiers.
1513 * decl.c (duplicate_decls): Check DECL_SOURCE_LOCATION rather than
1514 DECL_ANTICIPATED for preferring new type.
1515
1516 2010-06-04 Joseph Myers <joseph@codesourcery.com>
1517
1518 * g++spec.c (lang_specific_driver): Use GCC-specific formats in
1519 diagnostics.
1520
1521 2010-06-04 Jakub Jelinek <jakub@redhat.com>
1522
1523 PR c++/44412
1524 * typeck.c (build_class_member_access_expr): Call mark_exp_read
1525 on object for static data members.
1526
1527 2010-06-04 Jakub Jelinek <jakub@redhat.com>
1528 Jason Merrill <jason@redhat.com>
1529
1530 PR c++/44362
1531 * call.c (build_conditional_expr): If both arg2 and arg3 are lvalues
1532 with the same type, call mark_lvalue_use on both.
1533
1534 2010-06-03 Nathan Froyd <froydnj@codesourcery.com>
1535
1536 * class.c (struct vtbl_init_data_s): Remove last_init field.
1537 (struct secondary_vptr_vtt_init_data_s): Change type of inits field
1538 to a VEC.
1539 (finish_vtbls): Use a VEC rather than a TREE_LIST for the accumulated
1540 initializers.
1541 (build_vtt): Likewise.
1542 (initialize_vtable): Take a VEC instead of a tree.
1543 (build_vtt_inits): Change return type to void. Take a VEC **
1544 instead of a tree *; accumulate results into said VEC.
1545 (build_ctor_vtbl_group): Use a VEC rather than a TREE_LIST for the
1546 accumulated initializers. Pass the vtable to accumulate_vtbl_inits.
1547 (accumulate_vtbl_inits): Add extra vtable tree parameter; take a VEC
1548 instead of a tree.
1549 (dfs_accumulate_vtbl_inits): Likewise. Change return type to void.
1550 (build_vtbl_initializer): Add VEC parameter; accumulate initializers
1551 into it.
1552 (dfs_build_secondary_vptr_vtt_inits): Use CONSTRUCTOR_APPEND_ELT
1553 rather than tree_cons.
1554 (build_vbase_offset_vtbl_entries): Likewise.
1555 (add_vcall_offset): Likewise.
1556 (build_rtti_vtbl_entries): Likewise.
1557 * cp-tree.h (initialize_artificial_var): Take a VEC instead of a tree.
1558 * decl.c (initialize_artificial_var): Use build_constructor instead
1559 of build_constructor_from_list.
1560
1561 2010-06-03 H.J. Lu <hongjiu.lu@intel.com>
1562
1563 PR c++/44294
1564 * class.c (layout_class_type): Check MAX_FIXED_MODE_SIZE on
1565 bit-field.
1566
1567 2010-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
1568
1569 * parser.c (cp_parser_mem_initializer_list): Change error text.
1570
1571 2010-06-02 Jakub Jelinek <jakub@redhat.com>
1572
1573 * cp-objcp-common.c (shadowed_var_for_decl): Change into
1574 tree_decl_map hashtab from tree_map.
1575 (decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Adjust.
1576 (init_shadowed_var_for_decl): Adjust initialization.
1577
1578 PR c++/44361
1579 * cvt.c (convert_to_void): If implicit is NULL, call mark_rvalue_use
1580 instead of calling mark_exp_read only when not an assignment.
1581
1582 PR debug/44367
1583 * semantics.c (finalize_nrv): Don't copy DECL_ARTIFICIAL, DECL_IGNORED_P,
1584 DECL_SOURCE_LOCATION and DECL_ABSTRACT_ORIGIN from var to result.
1585 Set DECL_VALUE_EXPR on var.
1586
1587 2010-06-02 Jason Merrill <jason@redhat.com>
1588
1589 * error.c (dump_type): Improve typedef handling.
1590
1591 PR c++/9726
1592 PR c++/23594
1593 PR c++/44333
1594 * name-lookup.c (same_entity_p): New.
1595 (ambiguous_decl): Multiple declarations of the same entity
1596 are not ambiguous.
1597
1598 2010-06-01 Jason Merrill <jason@redhat.com>
1599
1600 DR 990
1601 * call.c (add_list_candidates): Prefer the default constructor.
1602 (build_aggr_conv): Treat missing initializers like { }.
1603 * typeck2.c (process_init_constructor_record): Likewise.
1604 * init.c (expand_default_init): Use digest_init for
1605 direct aggregate initialization, too.
1606
1607 * call.c (add_list_candidates): Split out...
1608 (build_user_type_conversion_1): ...from here.
1609 (build_new_method_call): And here.
1610 (implicit_conversion): Propagate LOOKUP_NO_NARROWING.
1611
1612 PR c++/44358
1613 * call.c (build_list_conv): Set list-initialization flags properly.
1614
1615 2010-06-01 Nathan Froyd <froydnj@codesourcery.com>
1616
1617 * typeck2.c (build_x_arrow): Make types_memoized a VEC.
1618
1619 2010-06-01 Arnaud Charlet <charlet@adacore.com>
1620 Matthew Gingell <gingell@adacore.com>
1621
1622 * Make-lang.in (CXX_C_OBJS): Add c-ada-spec.o.
1623 * decl2.c: Include langhooks.h and c-ada-spec.h.
1624 (cpp_check, collect_source_refs, collect_ada_namespace,
1625 collect_all_refs): New functions.
1626 (cp_write_global_declarations): Add handling of -fdump-ada-spec.
1627 * lang-specs.h: Ditto.
1628
1629 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
1630
1631 * cp-tree.h (cp_build_function_call_nary): Declare.
1632 * typeck.c (cp_build_function_call_nary): Define.
1633 * decl.c (register_dtor_fn): Use it instead of
1634 cp_build_function_call.
1635 (cxx_maybe_build_cleanup): Likewise.
1636 * decl2.c (generate_ctor_or_dtor_function): Likewise.
1637 * except.c (do_get_exception_ptr): Likewise.
1638 (do_begin_catch): Likewise.
1639 (do_allocate_exception): Likewise.
1640 (do_free_exception): Likewise.
1641 (build_throw): Likewise. Use cp_build_function_call_vec instead
1642 of cp_build_function_call.
1643 (do_end_catch): Likewise.
1644
1645 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
1646
1647 * cp-tree.h (struct cp_decl_specifier_seq): Move type_location field up.
1648 (struct cp_declarator): Move id_loc field up.
1649
1650 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
1651
1652 * cp-tree.h (ATTRIBUTE_GCC_CXXDIAG): Remove. Require that
1653 this file is included before c-common.h. Define GCC_DIAG_STYLE
1654 before including diagnostic-core.h and toplev.h.
1655 (pedwarn_cxx98): Use ATTRIBUTE_GCC_DIAG.
1656 * pt.c: Include cp-tree.h before c-common.h.
1657
1658 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
1659
1660 * tree.c (c_register_addr_space): Add stub.
1661
1662 2010-05-28 Joseph Myers <joseph@codesourcery.com>
1663
1664 * g++spec.c (lang_specific_driver): Use fatal_error instead of
1665 fatal.
1666
1667 2010-05-28 Dodji Seketeli <dodji@redhat.com>
1668
1669 Revert fix of PR c++/44188
1670 * cp-tree.h (typedef_variant_p): Revert moving this declaration to
1671 gcc/tree.h.
1672 * tree.c (typedef_variant_p): Revert moving this definition to
1673 gcc/tree.c.
1674 * decl.c (grokdeclarator): Revert naming typedef handling.
1675
1676 2010-05-27 Joseph Myers <joseph@codesourcery.com>
1677
1678 * call.c: Include diagnostic-core.h instead of diagnostic.h.
1679 * cp-lang.c: Don't include diagnostic.h
1680 * name-lookup.c: Include diagnostic-core.h instead of
1681 diagnostic.h.
1682 (cp_emit_debug_info_for_using): Use seen_error.
1683 * optimize.c: Include diagnostic-core.h instead of diagnostic.h.
1684 * parser.c: Include diagnostic-core.h instead of diagnostic.h.
1685 * pt.c (iterative_hash_template_arg): Use seen_error.
1686 * repo.c: Include diagnostic-core.h instead of diagnostic.h.
1687 * typeck2.c: Include diagnostic-core.h instead of diagnostic.h.
1688 * Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o,
1689 cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update
1690 dependencies.
1691
1692 2010-05-25 Dodji Seketeli <dodji@redhat.com>
1693
1694 PR c++/44188
1695 * cp-tree.h (typedef_variant_p): Move this declaration to
1696 gcc/tree.h.
1697 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
1698 * decl.c (grokdeclarator): Do not rename debug info of an
1699 anonymous tagged type named by a typedef.
1700
1701 2010-05-27 Jason Merrill <jason@redhat.com>
1702
1703 PR c++/43555
1704 * decl.c (grokdeclarator) [cdk_pointer et al]: Force evaluation of
1705 anonymous VLA size.
1706
1707 2010-05-27 Kai Tietz <kai.tietz@onevision.com>
1708
1709 PR bootstrap/44287
1710 * rtti.c (emit_support_tinfos): Check for NULL_TREE.
1711 * class.c (layout_class_type): Likewise.
1712 * decl.c (finish_enum): Likewise.
1713 * mangle.c (write_builitin_type): Likewise.
1714
1715 2010-05-26 Kai Tietz <kai.tietz@onevision.com>
1716
1717 * cp-tree.h (cp_decl_specifier_seq): Add new bifield
1718 explicit_int128_p.
1719 * decl.c (grokdeclarator): Handle __int128.
1720 * parser.c (cp_lexer_next_token_is_decl_specifier_ke): Likewise.
1721 (cp_parser_simple_type_specifier): Likewise.
1722 * rtti.c (emit_support_tinfos): Add int128 nodes for rtti.
1723 * typeck.c (cp_common_type): Handle __int128.
1724 * mangle.c (integer_type_codes): Add itk_int128 and
1725 itk_unsigned_int128.
1726
1727 2010-05-26 Jason Merrill <jason@redhat.com>
1728
1729 PR c++/43382
1730 * pt.c (tsubst_pack_expansion): Don't get confused by recursive
1731 unification.
1732
1733 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1734
1735 * cp-lang.c: Do not include expr.h.
1736
1737 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1738
1739 * decl.c: Do not include rtl.h
1740 * semantics.c: Likewise.
1741
1742 2010-05-25 Steven Bosscher <steven@gcc.gnu.org>
1743
1744 * cp-tree.h: Do not include splay-tree.h.
1745 (struct prtmem_cst): Remove unused field and false comment.
1746 * typeck.c: Do not include rtl.h, expr.h, and tm_p.h.
1747 * optimize.c: Do not inclde rtl.h, insn-config.h, and integrate.h.
1748 * init.c: Do not include rtl.h and expr.h.
1749 * class.c: Do not include rtl.h. Include splay-tree.h.
1750 (build_clone): Use plain NULL instead of NULL_RTX.
1751 * decl.c: Do not include expr.h. Explain why rtl.h has to be
1752 included. Include splay-tree.h.
1753 * method.c: Do not include rtl.h and expr.h.
1754 (use_thunk): Use plain NULL instead of NULL_RTX.
1755 * except.c: Do not include rtl.h, expr.h, and libfuncs.h.
1756 * tree.c: Do not include rtl.h, insn-config.h, integrate.h,
1757 and target.h. Include splay-tree.h.
1758 * expr.c: Do not include rtl.h and expr.h.
1759 * pt.c: Do not include obstack.h and rtl.h.
1760 (tsubst_friend_function): Use plain NULL instead of NULL_RTX.
1761 (tsubst_decl): Likewise.
1762 (instantiate_decl): Likewise.
1763 * semantics.c: Do not include exprt.h and debug.h. Explain why
1764 rtl.h has to be included.
1765 * decl2.c: Do not include rtl.h and expr.h. Include splay-tree.h.
1766 * call.c: Do not include rtl.h and expr.h.
1767 * search.c: Do not include obstack.h and rtl.h.
1768 * friend.c: Do not include rtl.h and expr.h.
1769 * Make-lang.in: Update dependencies.
1770
1771 2010-05-25 Jakub Jelinek <jakub@redhat.com>
1772
1773 PR c++/18249
1774 * parser.c (non_integral_constant): Add NIC_NONE.
1775 (required_token): Add RT_NONE.
1776 (cp_parser_unary_expression): Initialize non_constant_p
1777 to NIC_NONE.
1778 (cp_parser_asm_definition): Initialize missing to RT_NONE.
1779 (cp_parser_primary_expression, cp_parser_postfix_expression,
1780 cp_parser_cast_expression, cp_parser_binary_expression,
1781 cp_parser_functional_cast): Fix formatting.
1782
1783 2010-05-25 Shujing Zhao <pearly.zhao@oracle.com>
1784
1785 PR c++/18249
1786 * parser.c: Remove inclusion of dyn-string.h.
1787 (non_integral_constant): New enum.
1788 (name_lookup_error): New enum.
1789 (required_token): New enum.
1790 (cp_parser_required_error): New function.
1791 (cp_parser_require): Change the type of variable token_desc to
1792 required_token and use cp_parser_required_error.
1793 (cp_parser_require_keyword): Likewise.
1794 (cp_parser_error): Use gmsgid as parameter.
1795 (cp_parser_name_lookup_error): Change the type of variable desired to
1796 name_lookup_error and put the diagnostic in the full sentences. Change
1797 caller.
1798 (cp_parser_non_integral_constant_expression): Change the type of the
1799 variable thing to non_integral_constant and put the diagnostics in
1800 full sentences. Change caller.
1801
1802 2010-05-24 Eric Botcazou <ebotcazou@adacore.com>
1803
1804 PR middle-end/44100
1805 * typeck.c (cp_build_unary_op): Fold offsetof-like computations.
1806
1807 2010-05-24 Joseph Myers <joseph@codesourcery.com>
1808
1809 * error.c (cp_diagnostic_starter): Update call to
1810 diagnostic_build_prefix.
1811 (cp_print_error_function,
1812 print_instantiation_partial_context_line): Check show_column flag
1813 in context.
1814
1815 2010-05-24 Jason Merrill <jason@redhat.com>
1816
1817 PR c++/41510
1818 * decl.c (check_initializer): Don't wrap an init-list in a
1819 TREE_LIST.
1820 * init.c (build_aggr_init): Don't assume copy-initialization if
1821 init has CONSTRUCTOR_IS_DIRECT_INIT.
1822 * call.c (build_new_method_call): Sanity check.
1823
1824 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
1825
1826 * rtti.c (tinfo_base_init): Use build_constructor instead of
1827 build_constructor_from_list. Don't cons a tree node for
1828 returning.
1829 (generic_initializer): Use build_constructor_single instead of
1830 build_constructor_from_list.
1831 (ptr_initializer): Use build_constructor instead of
1832 build_constructor_from_list
1833 (ptm_initializer): Likewise.
1834 (class_initializer): Likewise. Take varargs instead of TRAIL.
1835 (get_pseudo_ti_init): Adjust calls to class_initializer. Use
1836 build_constructor instead of build_constructor_from_list.
1837
1838 2010-05-22 Steven Bosscher <steven@gcc.gnu.org>
1839
1840 * semantics.c: Include bitmap.h.
1841 * Make-lang.in: Update dependencies.
1842
1843 2010-05-22 Jan Hubicka <jh@suse.cz>
1844
1845 * decl2.c (maybe_emit_vtables): Produce same comdat group when outputting
1846 comdat vtables.
1847 (cxx_callgraph_analyze_expr): Remove code marking vtables needed.
1848
1849 2010-05-21 Joseph Myers <joseph@codesourcery.com>
1850
1851 * cxx-pretty-print.c: Correct merge error.
1852
1853 2010-05-21 Joseph Myers <joseph@codesourcery.com>
1854
1855 * error.c: Include tree-diagnostic.h and tree-pretty-print.h.
1856 (cp_print_error_function): Use diagnostic_abstract_origin macro.
1857 (cp_printer): Handle %K here using percent_K_format.
1858 * cxx-pretty-print.c: Include tree-pretty-print.h.
1859 * Make-lang.in (cp/error.o, cp/cxx-pretty-print.o): Update
1860 dependencies.
1861
1862 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
1863
1864 * error.c, tree.c, typeck2.c, cxx-pretty-print.c, mangle.c:
1865 Clean up redundant includes.
1866
1867 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com>
1868
1869 PR c++/30298
1870 * decl.c (xref_basetypes): Return false in case of ill-formed
1871 redefinition.
1872
1873 2010-05-19 Jason Merrill <jason@redhat.com>
1874
1875 * call.c (reference_binding): Use cp_build_qualified_type_real
1876 and cp_type_quals consistently.
1877 (add_function_candidate): Likewise.
1878 (build_conditional_expr): Likewise.
1879 (convert_like_real): Likewise.
1880 (type_passed_as): Likewise.
1881 * class.c (add_method): Likewise.
1882 (same_signature_p): Likewise.
1883 (layout_class_type): Likewise.
1884 * decl.c (cxx_init_decl_processing): Likewise.
1885 (cp_fname_init): Likewise.
1886 (grokdeclarator): Likewise.
1887 * decl2.c (cp_reconstruct_complex_type): Likewise.
1888 * init.c (build_new_1): Likewise.
1889 * method.c (do_build_copy_constructor): Likewise.
1890 (implicitly_declare_fn): Likewise.
1891 * pt.c (tsubst_aggr_type): Likewise.
1892 (tsubst): Likewise.
1893 * rtti.c (init_rtti_processing): Likewise.
1894 (build_headof): Likewise.
1895 (build_dynamic_cast_1): Likewise.
1896 (tinfo_base_init): Likewise.
1897 (emit_support_tinfos): Likewise.
1898 * semantics.c (capture_decltype): Likewise.
1899 * tree.c (cv_unqualified): Likewise.
1900 * typeck.c (composite_pointer_type): Likewise.
1901 (string_conv_p): Likewise.
1902
1903 * mangle.c (write_CV_qualifiers_for_type): Tweak.
1904
1905 * call.c (initialize_reference): Use CP_TYPE_CONST_P.
1906 * decl.c (start_decl): Likewise.
1907 * semantics.c (finish_compound_literal): Likewise.
1908 * typeck.c (check_return_expr): Use CP_TYPE_VOLATILE_P.
1909 (cp_type_readonly): Remove.
1910 * cp-tree.h: Remove declaration.
1911
1912 * typeck.c (merge_types): Preserve memfn quals.
1913
1914 * decl.c (grokdeclarator): Don't check quals on fn type.
1915 * typeck.c (cp_apply_type_quals_to_decl): Likewise.
1916 * tree.c (cp_build_qualified_type_real): Simplify qualifier checking.
1917
1918 PR c++/44193
1919 * typeck.c (type_memfn_quals): New fn.
1920 (apply_memfn_quals): New fn.
1921 (cp_type_quals): Return TYPE_UNQUALIFIED for FUNCTION_TYPE.
1922 (cp_type_readonly): Use cp_type_quals.
1923 * cp-tree.h: Add declarations.
1924 * tree.c (cp_build_qualified_type_real): Don't set, but do
1925 preserve, quals on FUNCTION_TYPE.
1926 (strip_typedefs): Use apply_memfn_quals and type_memfn_quals.
1927 * decl.c (build_ptrmem_type): Likewise.
1928 (grokdeclarator): Likewise.
1929 (static_fn_type): Likewise.
1930 * decl2.c (change_return_type): Likewise.
1931 (cp_reconstruct_complex_type): Likewise.
1932 * pt.c (tsubst_function_type): Likewise.
1933 (unify): Likewise.
1934 (tsubst): Likewise. Drop special FUNCTION_TYPE substitution code.
1935
1936 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
1937
1938 * tree.c (build_min_non_dep_call_vec): Update comment.
1939
1940 2010-05-17 Jason Merrill <jason@redhat.com>
1941
1942 * call.c (struct z_candidate): Add explicit_targs field.
1943 (add_template_candidate_real): Set it.
1944 (build_over_call): Use it to control init-list warning.
1945
1946 PR c++/44157
1947 * call.c (build_over_call): Limit init-list deduction warning to
1948 cases where the argument is actually an init-list.
1949
1950 PR c++/44158
1951 * call.c (build_over_call): Don't do bitwise copy for move ctor.
1952
1953 2010-05-17 Dodji Seketeli <dodji@redhat.com>
1954 Jason Merrill <jason@redhat.com>
1955
1956 PR c++/44108
1957 * decl.c (compute_array_index_type): Call mark_rvalue_use.
1958
1959 2010-05-15 Jason Merrill <jason@redhat.com>
1960
1961 * cp-tree.h (TYPE_NOEXCEPT_P): New macro.
1962 * except.c (begin_eh_spec_block): Use MUST_NOT_THROW_EXPR if
1963 TYPE_NOEXCEPT_P.
1964 (finish_eh_spec_block): Adjust.
1965
1966 2010-05-15 Jakub Jelinek <jakub@redhat.com>
1967
1968 PR c++/44148
1969 * pt.c (tsubst): Unshare template argument.
1970
1971 2010-05-15 Steven Bosscher <steven@gcc.gnu.org>
1972
1973 * decl.c: Include tree-iterator.h, as fixup for tree-inline.h changes.
1974 * Make-lang.in: Fix dependencies accordingly.
1975
1976 2010-05-14 Jason Merrill <jason@redhat.com>
1977
1978 C++ DR 475
1979 * except.c (build_throw): Simplify, adjust for DR 475.
1980
1981 PR c++/44127
1982 * except.c (dtor_nothrow): Return nonzero for type with
1983 trivial destructor.
1984
1985 PR c++/44127
1986 * cp-gimplify.c (gimplify_must_not_throw_expr): Use
1987 gimple_build_eh_must_not_throw.
1988
1989 2010-05-14 Martin Jambor <mjambor@suse.cz>
1990
1991 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Remove both its undef
1992 and define.
1993
1994 2010-05-14 Jonathan Wakely <jwakely.gcc@gmail.com>
1995
1996 * call.c (build_new_method_call): Change warning text.
1997 * typeck2.c (build_functional_cast): Change error text.
1998
1999 2010-05-14 Shujing Zhao <pearly.zhao@oracle.com>
2000
2001 PR c++/30566
2002 * name-lookup.c (pushdecl_maybe_friend): Avoid the warnings about
2003 shadowing the outer parameter or variables by the declaration of
2004 nested function in nested structure or class. Warn the shadowing by
2005 the declaration of nested lambda expression.
2006
2007 2010-05-13 Jason Merrill <jason@redhat.com>
2008
2009 * typeck.c (cp_build_array_ref): Factor out from...
2010 (build_array_ref): ...here. Drop complain parm.
2011 (build_new_op): Adjust.
2012 * class.c (build_vtbl_ref_1): Adjust.
2013 * decl2.c (grok_array_decl): Adjust.
2014 * cp-tree.h: Adjust prototypes.
2015
2016 2010-05-13 Jan Hubicka <jh@suse.cz>
2017
2018 * decl.c (cp_finish_decl): Do not worry about used attribute.
2019
2020 2010-05-12 Jason Merrill <jason@redhat.com>
2021
2022 * typeck.c (build_array_ref): Take complain parm.
2023 * cp-tree.h: Add it to prototype.
2024 * call.c (build_new_op): Pass it.
2025 * class.c (build_vtbl_ref): Pass it.
2026 * decl2.c (grok_array_decl): Pass it.
2027
2028 PR bootstrap/44048
2029 PR target/44099
2030 * cp-tree.def (NULLPTR_TYPE): Remove.
2031 * cp-tree.h (NULLPTR_TYPE_P): New.
2032 (SCALAR_TYPE_P): Use it.
2033 (nullptr_type_node): New.
2034 (cp_tree_index): Add CPTI_NULLPTR_TYPE.
2035 * decl.c (cxx_init_decl_processing): Call record_builtin_type on
2036 nullptr_type_node.
2037 * cvt.c (ocp_convert): Use NULLPTR_TYPE_P instead of NULLPTR_TYPE.
2038 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
2039 * error.c (dump_type, dump_type_prefix, dump_type_suffix): Likewise.
2040 * mangle.c (write_type): Likewise.
2041 * name-lookup.c (arg_assoc_type): Likewise.
2042 * typeck.c (build_reinterpret_cast_1): Likewise.
2043 * rtti.c (typeinfo_in_lib_p): Likewise.
2044 (emit_support_tinfos): Remove local nullptr_type_node.
2045
2046 * cp-tree.h (UNKNOWN_TYPE): Remove.
2047 * decl.c (cxx_init_decl_processing): Use LANG_TYPE instead.
2048 * error.c (dumy_type, dump_type_prefix, dump_type_suffix): Likewise.
2049 * typeck2.c (cxx_incomplete_type_diagnostic): Likewise.
2050 * class.c (instantiate_type): Check unknown_type_node rather than
2051 UNKNOWN_TYPE.
2052 * name-lookup.c (maybe_push_decl): Likewise.
2053 * rtti.c (get_tinfo_decl_dynamic): Likewise.
2054 (get_typeid): Likewise.
2055 * semantics.c (finish_offsetof): Likewise.
2056
2057 PR c++/20669
2058 * call.c (add_template_candidate_real): If deduction fails, still
2059 add the template as a non-viable candidate.
2060 (equal_functions): Handle template candidates.
2061 (print_z_candidate): Likewise.
2062 (print_z_candidates): Likewise.
2063 (build_new_function_call): Likewise.
2064
2065 * cp-tree.h (LOOKUP_LIST_ONLY): New.
2066 * call.c (add_candidates): Enforce it.
2067 (build_new_method_call): Try non-list ctor if no viable list ctor.
2068 (build_user_type_conversion_1): Likewise.
2069
2070 * call.c (add_candidates): Distinguish between type(x) and
2071 x.operator type().
2072 (convert_class_to_reference): Set LOOKUP_NO_CONVERSION.
2073 (build_new_method_call): Give better error for conversion op.
2074
2075 * call.c (add_candidates): Add first_arg and return_type parms.
2076 Add special constructor/conversion op handling.
2077 (convert_class_to_reference): Use it.
2078 (build_user_type_conversion_1): Likewise.
2079 (build_op_call): Likewise.
2080 (build_new_method_call): Likewise.
2081 (build_new_op): Adjust.
2082 (perform_overload_resolution): Adjust.
2083
2084 2010-05-11 Paolo Carlini <paolo.carlini@oracle.com>
2085
2086 PR c++/34272
2087 PR c++/43630
2088 PR c++/34491
2089 * pt.c (process_partial_specialization): Return error_mark_node
2090 in case of unused template parameters in partial specialization.
2091
2092 2010-05-11 Jakub Jelinek <jakub@redhat.com>
2093
2094 PR c++/44062
2095 * semantics.c (finish_expr_stmt): Don't call mark_exp_read here...
2096 * cvt.c (convert_to_void): ... but here. If expr is a COMPOUND_EXPR,
2097 look at its second operand.
2098
2099 2010-05-10 Jason Merrill <jason@redhat.com>
2100
2101 PR c++/44017
2102 * semantics.c (baselink_for_fns): Revert earlier change.
2103
2104 PR c++/44045
2105 * typeck.c (cp_build_modify_expr): Complain about assignment to
2106 array from init list.
2107
2108 2010-05-10 Fabien Chêne <fabien.chene@gmail.com>
2109
2110 PR c++/43719
2111 * decl.c (check_initializer): strip array type before checking for
2112 uninitialized const or ref members.
2113
2114 2010-05-07 Fabien Chêne <fabien.chene@gmail.com>
2115
2116 PR c++/43951
2117 * init.c (diagnose_uninitialized_cst_or_ref_member_1): Returns the
2118 error count. Emit errors only if compain is true.
2119 (build_new_1): Do not return error_mark_node if
2120 diagnose_uninitialized_cst_or_ref_member_1 does not diagnose any
2121 errors. Delay the check for user-provided constructor.
2122 (perform_member_init): Adjust.
2123 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Change the
2124 prototype.
2125
2126 2010-05-06 Magnus Fromreide <magfr@lysator.liu.se>
2127 Jason Merrill <jason@redhat.com>
2128
2129 Add support for C++0x nullptr.
2130 * cp-tree.def: Add NULLPTR_TYPE.
2131 * cp-tree.h: Add nullptr_node.
2132 (cp_tree_index): Add CPTI_NULLPTR.
2133 (SCALAR_TYPE_P): Add NULLPTR_TYPE.
2134 * call.c (null_ptr_cst_p): Handle nullptr.
2135 (standard_conversion): Likewise.
2136 (convert_arg_to_ellipsis): Likewise.
2137 * mangle.c (write_type): Likewise.
2138 * name-lookup.c (arg_assoc_type): Likewise.
2139 * parser.c (cp_parser_primary_expression): Likewise.
2140 * typeck.c (cp_build_binary_op): Likewise.
2141 (build_reinterpret_cast_1): Likewise.
2142 * error.c (dump_type): Likewise.
2143 (dump_type_prefix, dump_type_suffix): Likewise.
2144 * decl.c (cxx_init_decl_processing): Likewise.
2145 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
2146 * cvt.c (ocp_convert): Likewise.
2147 * rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put
2148 nullptr_t tinfo in libsupc++.
2149
2150 2010-05-06 Jason Merrill <jason@redhat.com>
2151
2152 * semantics.c (simplify_aggr_init_expr): Use INIT_EXPR.
2153
2154 2010-04-22 Jakub Jelinek <jakub@redhat.com>
2155 Dodji Seketeli <dodji@redhat.com>
2156
2157 PR c/18624
2158 * cp-tree.h (mark_exp_read, rvalue_use, lvalue_use, type_use):
2159 Declare ...
2160 * expr.c (mark_exp_read, rvalue_use, lvalue_use, type_use): ... new fns.
2161 * typeck.c (cxx_sizeof_expr, cxx_alignof_expr): Call type_use.
2162 (decay_conversion, perform_integral_promotions): Call rvalue_use.
2163 (cp_build_unary_op): Call lvalue_use.
2164 * decl.c (unused_but_set_errorcount): New variable.
2165 (poplevel): Issue -Wunused-but-set-variable diagnostics.
2166 (duplicate_decls): Merge DECL_READ_P flags.
2167 (start_cleanup_fn): Set DECL_READ_P flag.
2168 (finish_function): Issue -Wunused-but-set-parameter diagnostics.
2169 * tree.c (rvalue): Call rvalue_use.
2170 * pt.c (convert_nontype_argument): Likewise.
2171 * semantics.c (finish_expr_stmt, finish_asm_stmt, finish_typeof,
2172 finish_decltype_type): Likewise.
2173 * call.c (convert_like_real) <ck_identity, ck_user>: Call rvalue use.
2174 (build_x_va_arg, build_new_method_call, build_over_call): Call lvalue_use
2175 or rvalue_use depending on the expr.
2176 * init.c (build_new, build_delete): Likewise.
2177 * rtti.c (build_typeid, build_dynamic_cast_1): Likewise.
2178
2179 2010-05-05 Jason Merrill <jason@redhat.com>
2180
2181 PR c++/43787
2182 * cp-gimplify.c (cp_gimplify_expr): Remove copies of empty classes.
2183 * call.c (build_over_call): Don't try to avoid INIT_EXPR copies here.
2184
2185 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2186
2187 PR c++/43028
2188 * pt.c (unify): Check each elt for error_mark_node.
2189
2190 2010-05-04 Jason Merrill <jason@redhat.com>
2191
2192 PR c++/38064
2193 * typeck.c (cp_build_binary_op): Allow enums for <> as well.
2194
2195 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2196
2197 PR c++/43705
2198 * call.c (build_new_method_call): Return error_mark_node if fns is
2199 NULL_TREE.
2200
2201 2010-05-03 Dodji Seketeli <dodji@redhat.com>
2202
2203 PR c++/43953
2204 * pt.c (most_specialized_class): Pretend we are processing
2205 a template decl during the call to coerce_template_parms.
2206
2207 2010-05-03 Jason Merrill <jason@redhat.com>
2208
2209 PR c++/42810
2210 PR c++/43680
2211 * decl.c (finish_enum): Use the TYPE_MIN_VALUE and TYPE_MAX_VALUE
2212 from the selected underlying type unless -fstrict-enums. Set
2213 ENUM_UNDERLYING_TYPE to have the restricted range.
2214 * cvt.c (type_promotes_to): Use ENUM_UNDERLYING_TYPE.
2215 * class.c (check_bitfield_decl): Likewise.
2216
2217 2010-05-01 H.J. Lu <hongjiu.lu@intel.com>
2218
2219 PR c++/43951
2220 * init.c (build_new_1): Revert the accidental checkin in
2221 revision 158918.
2222
2223 2010-04-30 Jason Merrill <jason@redhat.com>
2224
2225 PR c++/43868
2226 * cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Move pmf handling...
2227 (pp_cxx_type_specifier_seq): ...here.
2228
2229 2010-04-30 Steven Bosscher <steven@gcc.gnu.org>
2230
2231 * optimize.c, parser.c, mangle.c, cp-tree.h: Do not include varray.h.
2232 * Make-lang.in: Don't include varray.h dependency in CXX_TREE_H.
2233
2234 2010-04-30 Shujing Zhao <pearly.zhao@oracle.com>
2235
2236 PR c++/43779
2237 * typeck.c (warn_args_num): New function.
2238 (convert_arguments): Use warn_args_num to print the diagnostic
2239 messages.
2240
2241 2010-04-29 Fabien Chêne <fabien.chene@gmail.com>
2242
2243 PR c++/43890
2244 * init.c (diagnose_uninitialized_cst_or_ref_member): check for
2245 user-provided constructor while recursing.
2246
2247 2010-04-28 Manuel López-Ibáñez <manu@gcc.gnu.org>
2248
2249 PR c++/9335
2250 * error.c (print_instantiation_partial_context_line): Handle
2251 recursive instantiation.
2252 (print_instantiation_partial_context): Likewise.
2253
2254 2010-04-27 Jason Merrill <jason@redhat.com>
2255
2256 * init.c (perform_member_init): Check CLASS_TYPE_P.
2257
2258 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
2259
2260 PR c++/29043
2261 * init.c (perform_member_init): check for uninitialized const or
2262 reference members, including array types.
2263
2264 2010-04-24 Jason Merrill <jason@redhat.com>
2265
2266 * tree.c (get_fns): Split out from get_first_fn.
2267 * cp-tree.h: Declare it.
2268 * search.c (shared_member_p): Use it.
2269 * semantics.c (finish_qualified_id_expr): Simplify.
2270 (finish_id_expression): Simplify.
2271
2272 * semantics.c (finish_non_static_data_member): Call maybe_dummy_object
2273 whenever object is NULL_TREE. Don't do 'this' capture here.
2274 (finish_qualified_id_expr): Pass NULL_TREE.
2275 (finish_id_expression): Likewise.
2276 (lambda_expr_this_capture): Likewise.
2277
2278 * semantics.c (finish_qualified_id_expr): Use maybe_dummy_object
2279 rather than checking current_class_ref directly.
2280 (finish_call_expr): Likewise.
2281
2282 PR c++/43856
2283 * name-lookup.c (qualify_lookup): Disqualify lambda op().
2284 * class.c (current_nonlambda_class_type): New fn.
2285 * semantics.c (nonlambda_method_basetype): New.
2286 * cp-tree.h: Declare them.
2287 * tree.c (maybe_dummy_object): Handle implicit 'this' capture.
2288
2289 * semantics.c (baselink_for_fns): Correct BASELINK_BINFO.
2290
2291 PR c++/43875
2292 * semantics.c (lambda_return_type): Complain about
2293 braced-init-list.
2294
2295 PR c++/43790
2296 * tree.c (cv_unqualified): Handle error_mark_node.
2297
2298 PR c++/41468
2299 * call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
2300 if we don't want errors.
2301
2302 PR c++/41468
2303 * class.c (convert_to_base): Add complain parameter. Pass
2304 ba_quiet to lookup_base if we don't want errors.
2305 (build_vfield_ref): Pass complain to convert_to_base.
2306 * call.c (convert_like_real): Likewise.
2307 (initialize_reference): Likewise.
2308 (perform_direct_initialization_if_possible): Pass complain to
2309 convert_like_real.
2310 * cp-tree.h: Adjust.
2311
2312 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
2313 Jason Merrill <jason@redhat.com>
2314
2315 PR c++/42844
2316 * decl.c (check_for_uninitialized_const_var): Handle classes that need
2317 constructing, too.
2318 (check_initializer): Call it for classes that need constructing, too.
2319 * class.c (in_class_defaulted_default_constructor): New.
2320 * cp-tree.h: Declare it.
2321
2322 2010-04-20 Jason Merrill <jason@redhat.com>
2323
2324 PR c++/9335
2325 * init.c (constant_value_1): Treat error_mark_node as a constant
2326 if DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P is set.
2327 * cvt.c (ocp_convert): Handle getting error_mark_node from
2328 integral_constant_value.
2329 * decl.c (compute_array_index_type): Likewise.
2330
2331 2010-04-20 Dodji Seketeli <dodji@redhat.com>
2332
2333 PR c++/43800
2334 PR c++/43704
2335 * typeck.c (incompatible_dependent_types_p): If one of the
2336 compared types if not a typedef then honour their main variant
2337 equivalence.
2338
2339 2010-04-20 Jakub Jelinek <jakub@redhat.com>
2340
2341 * cp-tree.h (TYPE_REF_IS_RVALUE): Remove.
2342
2343 2010-04-19 Dodji Seketeli <dodji@redhat.com>
2344
2345 PR c++/43704
2346 * typeck.c (structural_comptypes): Test dependent typedefs
2347 incompatibility before testing for their main variant based
2348 equivalence.
2349
2350 2010-04-19 Jakub Jelinek <jakub@redhat.com>
2351
2352 * cp-tree.h (SCOPED_ENUM_P, UNSCOPED_ENUM_P, SET_SCOPED_ENUM_P): Use
2353 ENUM_IS_SCOPED bit instead of TYPE_LANG_FLAG_5.
2354
2355 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
2356
2357 * decl.c (cxx_init_decl_processing): Remove second argument in call to
2358 build_common_tree_nodes.
2359
2360 2010-04-14 Jason Merrill <jason@redhat.com>
2361
2362 PR c++/36625
2363 * parser.c (cp_parser_parenthesized_expression_list): Change
2364 is_attribute_list parm to int to indicate whether or not to
2365 handle initial identifier specially.
2366 (cp_parser_attribute_list): Use attribute_takes_identifier_p.
2367
2368 2010-04-13 Jason Merrill <jason@redhat.com>
2369
2370 * call.c (type_decays_to): Check MAYBE_CLASS_TYPE_P instead of
2371 CLASS_TYPE_P.
2372 * parser.c (cp_parser_lambda_expression): Complain about lambda in
2373 unevaluated context.
2374 * pt.c (iterative_hash_template_arg): Don't crash on lambda.
2375
2376 2010-04-12 Jason Merrill <jason@redhat.com>
2377
2378 PR c++/43641
2379 * semantics.c (maybe_add_lambda_conv_op): Use build_call_a and tweak
2380 return value directly.
2381
2382 * call.c (type_decays_to): Call cv_unqualified for non-class type.
2383
2384 2010-04-12 Fabien Chene <fabien.chene@gmail.com>
2385
2386 PR c++/25811
2387 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Declare.
2388 * init.c (build_new_1): Check for uninitialized const members and
2389 uninitialized reference members, when using new without
2390 new-initializer. Call diagnose_uninitialized_cst_or_ref_member.
2391 (diagnose_uninitialized_cst_or_ref_member): Define, call
2392 diagnose_uninitialized_cst_or_ref_member_1.
2393 (diagnose_uninitialized_cst_or_ref_member_1): New function.
2394
2395 2010-04-12 Richard Guenther <rguenther@suse.de>
2396
2397 PR c++/43611
2398 * semantics.c (expand_or_defer_fn_1): Do not keep extern
2399 template inline functions.
2400
2401 2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
2402
2403 PR c++/28584
2404 * typeck.c (cp_build_c_cast): Warn for casting integer to larger
2405 pointer type.
2406
2407 2010-04-07 Jason Merrill <jason@redhat.com>
2408
2409 PR c++/43016
2410 * decl.c (start_preparsed_function): Do defer nested functions.
2411
2412 PR c++/11094, DR 408
2413 * cp-tree.h (VAR_HAD_UNKNOWN_BOUND, SET_VAR_HAD_UNKNOWN_BOUND): New.
2414 * decl2.c (finish_static_data_member_decl): Set it.
2415 * decl.c (duplicate_decls): Propagate it.
2416 * pt.c (tsubst_decl): Don't substitute the domain of an array
2417 VAR_DECL if it's set.
2418 (regenerate_decl_from_template): Substitute it here.
2419 (type_dependent_expression_p): Return true if it's set.
2420 * semantics.c (finish_decltype_type): Instantiate such a variable.
2421 * typeck.c (cxx_sizeof_expr): Likewise.
2422 (strip_array_domain): New.
2423
2424 PR c++/43145
2425 * name-lookup.c (current_decl_namespace): Non-static.
2426 (pop_nested_namespace): Sanity check.
2427 * cp-tree.h: Declare current_decl_namespace.
2428 * decl.c (grokvardecl): Use it instead of current_namespace.
2429 (grokfndecl): Likewise.
2430
2431 PR c++/38392
2432 * pt.c (tsubst_friend_function): Instatiate a friend that has already
2433 been used.
2434
2435 * pt.c (print_template_statistics): New.
2436 * cp-tree.h: Declare it.
2437 * tree.c (cxx_print_statistics): Call it.
2438
2439 PR c++/41970
2440 * decl.c (grokvardecl): Tweak warning message.
2441 (grokfndecl): Likewise.
2442
2443 2010-04-07 Dodji Seketeli <dodji@redhat.com>
2444
2445 PR c++/42697
2446 *pt.c (tsubst_decl): Get the arguments of a specialization from
2447 the specialization template, not from the most general template.
2448
2449 2010-04-07 Dodji Seketeli <dodji@redhat.com>
2450
2451 PR c++/40239
2452 * typeck2.c (process_init_constructor_record):
2453 value-initialize members that are are not explicitely
2454 initialized.
2455
2456 2010-04-07 Jie Zhang <jie@codesourcery.com>
2457
2458 PR c++/42556
2459 * typeck2.c (split_nonconstant_init_1): Drop empty CONSTRUCTOR
2460 when all of its elements are non-constant and have been split out.
2461
2462 2010-04-06 Taras Glek <taras@mozilla.com>
2463 Jason Merrill <jason@redhat.com>
2464
2465 * parser.c (cp_parser_class_specifier): Set class location to that
2466 of IDENTIFIER_NODE instead of '{' when possible.
2467 * semantics.c (begin_class_definition): Do not overide locations
2468 with less precise ones.
2469
2470 2010-04-06 Jason Merrill <jason@redhat.com>
2471
2472 PR c++/43648
2473 * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs.
2474
2475 PR c++/43621
2476 * pt.c (maybe_update_decl_type): Check the return value from
2477 push_scope.
2478
2479 2010-04-01 Jason Merrill <jason@redhat.com>
2480
2481 * decl.c (next_initializable_field): No longer static.
2482 * cp-tree.h: Declare it.
2483 * call.c (build_aggr_conv): Fail if there are more initializers
2484 than initializable fields.
2485
2486 * semantics.c (maybe_add_lambda_conv_op): Use null_pointer_node
2487 instead of void_zero_node.
2488
2489 2010-03-31 Dodji Seketeli <dodji@redhat.com>
2490
2491 PR c++/43558
2492 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): New accessor macro.
2493 * pt.c (end_template_parm_list): Store sibling template parms of
2494 each TEMPLATE_TYPE_PARMs into its TEMPLATE_TYPE_PARM_SIBLING_PARMS.
2495 (push_template_decl_real): Don't store the containing template decl
2496 into the DECL_CONTEXT of TEMPLATE_TYPE_PARMs anymore.
2497 * typeck.c (get_template_parms_of_dependent_type): Get sibling parms
2498 of a TEMPLATE_TYPE_PARM from TEMPLATE_TYPE_PARM_SIBLING_PARMS.
2499 Simplify the logic.
2500
2501 2010-03-30 Jason Merrill <jason@redhat.com>
2502
2503 PR c++/43076
2504 * pt.c (push_template_decl_real): Deal better with running out of
2505 scopes before running out of template parms.
2506
2507 PR c++/41185
2508 PR c++/41786
2509 * parser.c (cp_parser_direct_declarator): Don't allow VLAs in
2510 function parameter context. Don't print an error if parsing
2511 tentatively.
2512
2513 PR c++/43559
2514 * pt.c (more_specialized_fn): Don't control cv-qualifier check
2515 with same_type_p.
2516
2517 2010-03-26 Jason Merrill <jason@redhat.com>
2518
2519 PR c++/43509
2520 * parser.c (cp_parser_qualifying_entity): Do accept enum names in
2521 c++0x mode, but not other type-names.
2522
2523 2010-03-26 Dodji Seketeli <dodji@redhat.com>
2524
2525 PR c++/43327
2526 * pt.c (add_to_template_args): Support NULL ARGS;
2527 (most_specialized_class): call coerce_template_parms on
2528 template arguments passed to get_class_bindings. Use
2529 add_to_template_args.
2530 (unify): Handle VAR_DECLs.
2531
2532 2010-03-26 Dodji Seketeli <dodji@redhat.com>
2533
2534 * cp-tree.h (get_template_parms_at_level): Change unsigned parm
2535 into int.
2536 * pt.c (get_template_parms_at_level): Adjust.
2537
2538 2010-03-25 Dodji Seketeli <dodji@redhat.com>
2539
2540 PR c++/43206
2541 * cp-tree.h (get_template_parms_at_level): Declare ...
2542 * pt.c (get_template_parms_at_level): ... new function.
2543 * typeck.c (get_template_parms_of_dependent_type): If a template
2544 type parm's DECL_CONTEXT isn't yet set, get its siblings from
2545 current_template_parms. Use get_template_parms_at_level. Remove
2546 useless test.
2547 (incompatible_dependent_types_p): If we get empty parms from just one
2548 of the template type parms we are comparing then the template parms are
2549 incompatible.
2550
2551 2010-03-24 Jason Merrill <jason@redhat.com>
2552
2553 PR c++/43502
2554 * parser.c (make_declarator): Initialize id_loc.
2555 (cp_parser_lambda_declarator_opt): And set it.
2556
2557 2010-03-23 Jason Merrill <jason@redhat.com>
2558
2559 Make lambda conversion op and op() non-static.
2560 * semantics.c (maybe_add_lambda_conv_op): Make non-static.
2561 Also add the thunk function returned by the conversion op.
2562 Mark the conversion deleted if the op() is variadic.
2563 * decl2.c (mark_used): Give helpful message about deleted conversion.
2564 * parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
2565 * semantics.c (finish_this_expr): Adjust.
2566 * mangle.c (write_closure_type_name): Adjust.
2567 * decl.c (grok_op_properties): Don't allow it.
2568 * call.c (build_user_type_conversion_1): No static conversion ops.
2569 (build_op_call): Or op().
2570
2571 * decl2.c (change_return_type): Fix 'this' quals.
2572
2573 2010-03-22 Jason Merrill <jason@redhat.com>
2574
2575 PR c++/43333
2576 * tree.c (pod_type_p): Use old meaning in C++98 mode.
2577
2578 PR c++/43281
2579 * pt.c (contains_auto_r): New fn.
2580 (do_auto_deduction): Use it.
2581 (tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
2582
2583 2010-03-20 Simon Martin <simartin@users.sourceforge.net>
2584
2585 PR c++/43081:
2586 * decl2.c (grokfield): Handle invalid initializers for member
2587 functions.
2588
2589 2010-03-20 Dodji Seketeli <dodji@redhat.com>
2590
2591 PR c++/43375
2592 * method.c (make_alias_for): Avoid crashing when DECL_LANG_SPECIFIC
2593 is NULL.
2594 * decl2.c (vague_linkage_p): Likewise.
2595
2596 2010-03-18 Paolo Carlini <paolo.carlini@oracle.com>
2597
2598 PR c++/43418
2599 * parser.c (cp_parser_for_init_statement): Use NULL_TREE, not
2600 false, in the cp_parser_expression_statement call.
2601
2602 2010-03-05 Jason Merrill <jason@redhat.com>
2603
2604 * mangle.c (mangle_decl): Give name collision error even without
2605 ASM_OUTPUT_DEF.
2606
2607 2010-03-04 Marco Poletti <poletti.marco@gmail.com>
2608
2609 * pt.c (process_partial_specialization): Use error_n instead of
2610 error.
2611
2612 2010-03-03 Jason Merrill <jason@redhat.com>
2613
2614 PR c++/12909
2615 * mangle.c (mangle_decl): Handle VAR_DECL, too.
2616
2617 2010-03-03 Jason Merrill <jason@redhat.com>
2618
2619 PR c++/12909
2620 * mangle.c: Include cgraph.h.
2621 (mangle_decl): If the mangled name will change in a later
2622 ABI version, make the later mangled name an alias.
2623 * method.c (make_alias_for): Copy DECL_ARGUMENTS.
2624 * Make-lang.in (mangle.o): Depend on cgraph.h.
2625 * method.c (make_alias_for): Handle VAR_DECL, too.
2626 * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
2627 * tree.c (no_linkage_check): Adjust.
2628 * decl.c (maybe_commonize_var): Adjust.
2629 * cp-tree.h: Adjust.
2630
2631 2010-03-01 Marco Poletti <poletti.marco@gmail.com>
2632
2633 * pt.c (redeclare_class_template): Use error_n and inform_n.
2634
2635 2010-02-27 Mark Mitchell <mark@codesourcery.com>
2636
2637 PR c++/42748
2638 * cp-tree.h (push_tinst_level): Declare.
2639 (pop_tinst_level): Likewise.
2640 * pt.c (push_tinst_level): Give it external linkage.
2641 (pop_tinst_level): Likewise.
2642 * mangle.c (mangle_decl_string): Set the source location to that
2643 of the decl while mangling.
2644
2645 2010-02-27 Simon Martin <simartin@users.sourceforge.net>
2646
2647 PR c++/42054
2648 * pt.c (redeclare_class_template): Return false if there are erroneous
2649 template parameters.
2650
2651 2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
2652
2653 * pt.c (push_tinst_level): Replace -ftemplate-depth- with
2654 -ftemplate-depth=.
2655
2656 2010-02-24 Jason Merrill <jason@redhat.com>
2657
2658 PR c++/12909
2659 * mangle.c (write_type): Give -Wabi warning for old vector mangling.
2660
2661 * class.c (layout_class_type): Don't give -Wabi warning for a bug
2662 in a previous ABI version.
2663
2664 2010-02-23 Jason Merrill <jason@redhat.com>
2665
2666 PR c++/43143
2667 * typeck2.c (digest_init_r): Accept value init of array.
2668
2669 2010-02-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
2670
2671 PR c++/43126
2672 * typeck.c (convert_arguments): Update error message.
2673
2674 2010-02-22 Mike Stump <mikestump@comcast.net>
2675
2676 PR c++/43125
2677 * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
2678
2679 2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
2680
2681 PR c++/23510
2682 * error.c (print_instantiation_partial_context_line): New.
2683 (print_instantiation_partial_context): Print at most 12 contexts,
2684 skip the rest with a message.
2685
2686 2010-02-21 Dodji Seketeli <dodji@redhat.com>
2687
2688 PR c++/42824
2689 * pt.c (lookup_template_class): Better support of specialization
2690 of member of class template implicit instantiation.
2691
2692 2010-02-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
2693
2694 PR c++/35669
2695 * call.c (conversion_null_warnings): Replace -Wconversion with
2696 -Wconversion-null.
2697 * cvt.c (build_expr_type_conversion): Likewise.
2698
2699 2010-02-18 Jason Merrill <jason@redhat.com>
2700
2701 PR c++/42837
2702 * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
2703
2704 PR c++/43108
2705 * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
2706 C build_binary_op.
2707 * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
2708 * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
2709
2710 PR c++/43070
2711 * semantics.c (finish_goto_stmt): Don't call decay_conversion.
2712
2713 PR c++/26261
2714 PR c++/43101
2715 * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
2716 (maybe_update_decl_type): New fn.
2717 * parser.c (cp_parser_init_declarator): Use it.
2718
2719 PR c++/43109
2720 * semantics.c (begin_class_definition): Don't crash on unnamed ns.
2721
2722 2010-02-17 Jason Merrill <jason@redhat.com>
2723
2724 PR c++/43075
2725 * call.c (build_over_call): Don't create zero-sized assignments.
2726 * cp-gimplify.c (cp_genericize_r): Don't remove them here.
2727 * cp-objcp-common.c (cp_expr_size): Remove.
2728 * cp-tree.h: Remove prototype.
2729
2730 PR c++/43069
2731 * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
2732 decl we looked up doesn't match.
2733
2734 PR c++/43093
2735 * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
2736 have an INIT_EXPR anymore.
2737
2738 PR c++/43079
2739 * pt.c (convert_nontype_argument): Change assert to test.
2740
2741 2010-02-16 Jason Merrill <jason@redhat.com>
2742
2743 * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
2744
2745 PR c++/43031
2746 * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
2747 VIEW_CONVERT_EXPR for conversions between structural equality types
2748 that the back end can't tell are the same.
2749
2750 PR c++/43036
2751 * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
2752 cv-quals from element here.
2753 (cp_build_qualified_type_real): Not here. Preserve typedef name.
2754
2755 2010-02-14 Jason Merrill <jason@redhat.com>
2756
2757 PR c++/41997
2758 * semantics.c (finish_compound_literal): Use
2759 cp_apply_type_quals_to_decl when creating a static variable.
2760
2761 2010-02-12 Jason Merrill <jason@redhat.com>
2762
2763 PR c++/43024
2764 * name-lookup.h (current_binding_level): Check for null
2765 cp_function_chain.
2766
2767 2010-02-12 Jason Merrill <jason@redhat.com>
2768
2769 PR c++/43054
2770 * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
2771
2772 2010-02-12 Jakub Jelinek <jakub@redhat.com>
2773
2774 PR c++/43033
2775 * name-lookup.c (pushdecl_maybe_friend): Check default args of t
2776 instead of x.
2777
2778 2010-02-10 Jason Merrill <jason@redhat.com>
2779
2780 PR c++/41896
2781 * semantics.c (outer_lambda_capture_p): Revert.
2782 (add_capture): Only finish_member_declaration if
2783 we're in the lambda class.
2784 (register_capture_members): New.
2785 * cp-tree.h: Declare it.
2786 * parser.c (cp_parser_lambda_expression): Call it.
2787
2788 2010-02-10 Jason Merrill <jason@redhat.com>
2789
2790 PR c++/41896
2791 * semantics.c (outer_lambda_capture_p): Use current_function_decl
2792 instead of current_class_type.
2793
2794 2010-02-10 Jason Merrill <jason@redhat.com>
2795
2796 PR c++/42983, core issue 906
2797 * method.c (defaultable_fn_check): Check virtualness.
2798
2799 2010-02-10 Jason Merrill <jason@redhat.com>
2800
2801 PR c++/43016
2802 * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
2803
2804 2010-02-10 Shujing Zhao <pearly.zhao@oracle.com>
2805
2806 * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
2807 * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
2808 translation.
2809 * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
2810 (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
2811 (cp_parser_parameter_declaration)
2812 (cp_parser_exception_specification_opt)
2813 (cp_parser_exception_declaration): Likewise.
2814 * pt.c (check_default_tmpl_args): Likewise.
2815 * search.c (lookup_field_r): Likewise.
2816
2817 2010-02-09 Jason Merrill <jason@redhat.com>
2818
2819 PR c++/42399
2820 * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
2821
2822 2010-02-09 Jason Merrill <jason@redhat.com>
2823
2824 PR c++/42370
2825 * decl2.c (change_return_type): New fn.
2826 * semantics.c (apply_lambda_return_type): Use it.
2827 * cp-tree.h: Declare it.
2828
2829 2010-02-05 Richard Guenther <rguenther@suse.de>
2830
2831 * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
2832 * cp-lang.c: Include gt-cp-cp-lang.h.
2833 * config-lang.in (gtfiles): Add cp/cp-lang.c.
2834
2835 2010-02-05 Dodji Seketeli <dodji@redhat.com>
2836
2837 PR c++/42915
2838 * typeck.c (get_template_parms_of_dependent_type): Try getting
2839 the template parameters fromt the type itself first.
2840
2841 2010-02-03 Jason Merrill <jason@redhat.com>
2842
2843 PR c++/4926
2844 PR c++/38600
2845 * mangle.c (write_unqualified_id): Split out from write_expression.
2846 (write_unqualified_name): Call it.
2847 (write_member_name): Likewise.
2848 (write_expression): Support TEMPLATE_ID_EXPR.
2849 Disambiguate operator names.
2850
2851 PR c++/12909
2852 * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
2853 -fabi-version=4.
2854
2855 2010-02-02 Jason Merrill <jason@redhat.com>
2856
2857 PR c++/41090
2858 * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
2859 * optimize.c (clone_body): Remap their initializers when making base
2860 variants.
2861 (maybe_clone_body): Complain if multiple clones aren't safe.
2862
2863 2010-01-29 Dodji Seketeli <dodji@redhat.com>
2864
2865 PR c++/42758
2866 PR c++/42634
2867 PR c++/42336
2868 PR c++/42797
2869 PR c++/42880
2870 * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
2871 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
2872 GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
2873 * pt.c (coerce_template_parms, type_unification_real,
2874 expand_template_argument_pack, coerce_template_parameter_pack):
2875 Set the non default template args count.
2876 (current_template_args): Always set non defaulted
2877 template args count when compiled with --enable-checking
2878 (tsubst_template_args, type_unification_real): Propagate the non
2879 defaulted template args count.
2880 * error.c (get_non_default_template_args_count): Renamed
2881 count_non_default_template_args into this. Don't calculate the
2882 non default template argument count anymore. Use the new
2883 accessor macros above to get it.
2884 (dump_template_argument_list, dump_type, dump_decl,
2885 dump_template_parms): Adjust.
2886 * parser.c (cp_parser_template_argument_list): Always set defaulted
2887 template args count when compiled with --enable-checking.
2888
2889 2010-01-29 Shujing Zhao <pearly.zhao@oracle.com>
2890
2891 * decl.c (redeclaration_error_message): Wrap the return messages into
2892 G_() for easy translation.
2893
2894 2010-01-28 Jason Merrill <jason@redhat.com>
2895
2896 PR c++/42880
2897 * semantics.c (begin_class_definition): Don't use type_as_string.
2898
2899 2010-01-28 Dodji Seketeli <dodji@redhat.com>
2900
2901 PR c++/42713
2902 PR c++/42820
2903 * typeck.c (get_template_parms_of_dependent_type): Factorized
2904 this out of incompatible_template_type_parms_p
2905 (incompatible_dependent_types_p): Renamed
2906 incompatible_template_type_parms_p into this. Make it detect
2907 two incompatible dependent typedefs too.
2908 (structural_comptypes): Use incompatible_dependent_types_p.
2909 * pt.c (get_template_info):
2910 Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
2911
2912 2010-01-20 Janis Johnson <janis187@us.ibm.com>
2913 Jason Merrill <jason@redhat.com>
2914
2915 * mangle.c (write_type): Mangle transparent record as member type.
2916 * semantics.c (begin_class_definition): Recognize decimal classes
2917 and set TYPE_TRANSPARENT_AGGR.
2918
2919 2010-01-20 Jason Merrill <jason@redhat.com>
2920
2921 PR c++/42338
2922 * mangle.c (write_expression): Handle tree codes that have extra
2923 arguments in the middle-end.
2924
2925 2010-01-20 Paolo Carlini <paolo.carlini@oracle.com>
2926
2927 PR c++/42038
2928 * except.c (expand_start_catch_block): Deal correctly with
2929 do_begin_catch returning error_mark_node.
2930
2931 2010-01-20 Jason Merrill <jason@redhat.com>
2932
2933 PR c++/41788
2934 * class.c (layout_class_type): Set packed_maybe_necessary for packed
2935 non-PODs.
2936
2937 PR c++/41920
2938 * semantics.c (build_lambda_object): Call mark_used on captured
2939 variables.
2940
2941 PR c++/40750
2942 * decl.c (grokdeclarator): Clear type_quals for a member function
2943 declared using a typedef. Don't complain about adding cv-quals
2944 to a function typedef in C++0x mode.
2945
2946 2010-01-20 Jakub Jelinek <jakub@redhat.com>
2947
2948 * decl.c (create_array_type_for_decl): Remove set but not used
2949 variable error_msg. Remove break stmts after return stmts.
2950
2951 2010-01-19 Dodji Seketeli <dodji@redhat.com>
2952
2953 * error.c (dump_template_parms, count_non_default_template_args):
2954 Revert fix of PR c++/42634.
2955
2956 2010-01-18 Dodji Seketeli <dodji@redhat.com>
2957
2958 PR c++/42634
2959 * error.c (dump_template_parms): Use innermost template
2960 arguments before calling count_non_default_template_args.
2961 (count_non_default_template_args): We are being called with
2962 template innermost arguments now. There is no need to ensure
2963 that again.
2964
2965 2010-01-18 Dodji Seketeli <dodji@redhat.com>
2966
2967 PR c++/42766
2968 * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
2969
2970 2010-01-17 Dodji Seketeli <dodji@redhat.com>
2971
2972 PR c++/42697
2973 *pt.c (tsubst_decl): Revert commit for PR c++/42697.
2974
2975 2010-01-17 Dodji Seketeli <dodji@redhat.com>
2976
2977 PR c++/42697
2978 *pt.c (tsubst_decl): Get the arguments of a specialization from
2979 the specialization template, not from the most general template.
2980
2981 2010-01-16 Jason Merrill <jason@redhat.com>
2982
2983 PR c++/42761
2984 * semantics.c (finish_decltype_type): Within a template, treat
2985 unresolved CALL_EXPR as dependent.
2986
2987 2010-01-15 Dodji Seketeli <dodji@redhat.com>
2988
2989 * error.c (dump_template_parms,count_non_default_template_args):
2990 Revert changes of PR c++/42634.
2991
2992 2010-01-14 Jakub Jelinek <jakub@redhat.com>
2993
2994 PR middle-end/42674
2995 * decl.c (finish_function): Don't emit -Wreturn-type warnings in
2996 functions with noreturn attribute.
2997
2998 2010-01-14 Jason Merrill <jason@redhat.com>
2999
3000 PR c++/42701
3001 * call.c (build_new_method_call): Don't free the vec here.
3002
3003 PR c++/42655
3004 * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
3005
3006 2010-01-13 Dodji Seketeli <dodji@redhat.com>
3007
3008 PR c++/42634
3009 * error.c (dump_template_parms): Use innermost template
3010 arguments before calling count_non_default_template_args.
3011 (count_non_default_template_args): We are being called with
3012 template innermost arguments now. There is no need to ensure
3013 that again.
3014
3015 2010-01-07 Dodji Seketeli <dodji@redhat.com>
3016
3017 c++/40155
3018 * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
3019 arguments that were previously deduced.
3020
3021 2010-01-05 Jason Merrill <jason@redhat.com>
3022
3023 * pt.c (unify_pack_expansion): Handle deduction from init-list.
3024 * call.c (build_over_call): Don't complain about it.
3025
3026 2010-01-04 Jason Merrill <jason@redhat.com>
3027
3028 PR c++/42555
3029 * pt.c (tsubst_decl): Don't apply type attributes in place.
3030
3031 PR c++/42567
3032 * semantics.c (describable_type): Remove decltype comment and
3033 semantics.
3034
3035
3036 \f
3037 Copyright (C) 2010 Free Software Foundation, Inc.
3038
3039 Copying and distribution of this file, with or without modification,
3040 are permitted in any medium without royalty provided the copyright
3041 notice and this notice are preserved.
3042