07dc96ae8262aebc5d2cde77eef07a0b80b8895d
[gcc.git] / gcc / cp / ChangeLog
1 2009-10-12 Jason Merrill <jason@redhat.com>
2
3 PR c++/37766
4 * pt.c (type_unification_real): Call convert_template_argument
5 for function default template arguments.
6 (check_default_tmpl_args): Suggest -std=c++0x when function default
7 template args seen in C++98 mode.
8
9 2009-10-11 Jason Merrill <jason@redhat.com>
10
11 PR c++/37204
12 * typeck.c (build_reinterpret_cast_1): Handle rvalue refs
13 properly.
14
15 2009-10-11 Richard Guenther <rguenther@suse.de>
16
17 * tree.c (cp_free_lang_data): Drop anonymous aggregate names.
18
19 2009-10-08 Jason Merrill <jason@redhat.com>
20
21 PR c++/36816
22 * pt.c (maybe_adjust_types_for_deduction): Do rvalue ref adjustment
23 even when DEDUCE_EXACT.
24
25 PR c++/37177
26 * pt.c (resolve_nondeduced_context): New.
27 * cvt.c (convert_to_void): Call it.
28 * semantics.c (finish_decltype_type): Likewise.
29 * typeck.c (decay_conversion): Here too.
30 * pt.c (tsubst_decl): Don't clobber input_location.
31 Don't register a bad specialization.
32
33 2009-10-07 Gabriel Dos Reis <gdr@cs.tamu.edu>
34
35 * cp-tree.h: Fix location of documentation for DECL_LANG_FLAG_7.
36
37 2009-10-07 Jason Merrill <jason@redhat.com>
38
39 PR c++/39863
40 * pt.c (tsubst_pack_expansion): Don't do anything now if we
41 have incomplete packs of different lengths.
42
43 PR c++/41038
44 * tree.c (build_qualified_name): Call convert_from_reference.
45
46 2009-10-06 Jason Merrill <jason@redhat.com>
47
48 Fix lookup of initialized captures in unevaluated context.
49 * cp-tree.h (DECL_NORMAL_CAPTURE_P): New.
50 * name-lookup.c (qualify_lookup): Check it.
51 * parser.c (cp_parser_lambda_introducer): Pass explicit_init_p
52 to add_capture.
53 * semantics.c (add_capture): Set DECL_NORMAL_CAPTURE_P
54 on captures without explicit init.
55 (add_default_capture): Pass explicit_init_p.
56
57 Fix capture by copy of types with explicit copy constructor.
58 * cp-tree.h (TARGET_EXPR_DIRECT_INIT_P): New.
59 (DIRECT_INIT_EXPR_P): New.
60 * typeck.c (convert_for_initialization): Just return if
61 DIRECT_INIT_EXPR_P.
62 * semantics.c (build_lambda_object): Use
63 TARGET_EXPR_DIRECT_INIT_P for normal captures.
64
65 2009-10-05 Jason Merrill <jason@redhat.com>
66
67 * parser.c: Mark lambda_scope and lambda_count for PCH.
68
69 2009-10-03 Jason Merrill <jason@redhat.com>
70
71 PR c++/41553
72 * parser.c (cp_parser_lambda_introducer): Avoid infinite loop on
73 parse error.
74
75 2009-10-02 Jason Merrill <jason@redhat.com>
76
77 * mangle.c (write_unnamed_type_name): Implement.
78 (local_class_index): Split out from...
79 (discriminator_for_local_entity): ...here.
80 (nested_anon_class_index): New.
81 * cp-tree.h (TYPE_FUNCTION_SCOPE_P): New.
82
83 2009-10-02 Janis Johnson <janis187@us.ibm.com>
84
85 * call.c (convert_arg_to_ellipsis): Avoid promoting decimal32
86 to double.
87
88 2009-10-01 Jason Merrill <jason@redhat.com>
89
90 * parser.c (cp_parser_lambda_expression): Compute visibility.
91 (no_linkage_lambda_type_p): Remove.
92 * cp-tree.h: Remove declaration.
93 * tree.c (no_linkage_check): Don't call it. Don't check template
94 args. Don't check TREE_PUBLIC Types.
95
96 2009-10-01 Gabriel Dos Reis <gdr@cse.tamu.edu>
97 Jason Merrill <jason@redhat.com>
98
99 * decl.c (grokdeclarator): Set constexprness before announcing
100 friendship.
101
102 2009-10-01 Gabriel Dos Reis <gdr@cs.tamu.edu>
103
104 * decl.c (record_builtin_java_type): Undo unintended change.
105 (cxx_init_decl_processing): Likewise.
106
107 2009-10-01 Jason Merrill <jason@redhat.com>
108
109 * pt.c (register_specialization): Push DECL_SOURCE_LOCATION to the
110 clones.
111
112 * decl.c (grok_special_member_properties): Only adjust
113 TYPE_HAS_COMPLEX_* if the function is defaulted in the class body.
114 (cp_finish_decl): Push DECL_DELETED_FN/DECL_DEFAULTED_FN to the
115 clones.
116
117 2009-09-30 Gabriel Dos Reis <gdr@cs.tamu.edu>
118
119 * decl.c (check_for_uninitialized_const_var): Check constexpr
120 variables too.
121 (grokdeclarator): Handle `constexpr'.
122 (check_tag_decl): Reject `constexpr'.
123 (check_function_type): Check constexpr functions.
124 * cp-tree.h (ds_constexpr): New cp_decl_spec enumerator.
125 (CLASSTYPE_LITERAL_P): New.
126 (lang_type_class::is_literal): New.
127 (lang_type_class::dummy): Adjust width.
128 (literal_type_p): Declare.
129 * parser.c (cp_parser_check_decl_spec): Print it.
130 (cp_parser_decl_specifier_seq): Accept "constexpr".
131 * semantics.c (validate_constexpr_fundecl): Define.
132 (literal_type_p): Define.
133
134 2009-09-30 Jason Merrill <jason@redhat.com>
135
136 * semantics.c (lambda_expr_this_capture): Fix default capture
137 of explicit capture of 'this'.
138
139 2009-09-30 Jason Merrill <jason@redhat.com>
140
141 * parser.c (cp_parser_lambda_expression): Don't add __ to __this.
142
143 2009-09-30 Jason Merrill <jason@redhat.com>
144
145 * cp-tree.h (LANG_DECL_U2_CHECK): Check LANG_DECL_HAS_MIN.
146
147 2009-09-29 John Freeman <jfreeman08@gmail.com>
148 Jason Merrill <jason@redhat.com>
149
150 Add support for lambda-expressions as per N2927.
151 * cp-tree.def (VEC_INIT_EXPR, LAMBDA_EXPR): New.
152 * cp-tree.h (LAMBDA_TYPE_P, LAMBDA_FUNCTION_P): New.
153 (LAMBDA_EXPR_DEFAULT_CAPTURE_MODE): New.
154 (LAMBDA_EXPR_DEFAULT_CAPTURE_LIST): New.
155 (LAMBDA_EXPR_THIS_CAPTURE, LAMBDA_EXPR_CAPTURES_THIS_P): New.
156 (LAMBDA_EXPR_MUTABLE_P, LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P): New.
157 (LAMBDA_EXPR_RETURN_TYPE, LAMBDA_EXPR_LOCATION): New.
158 (LAMBDA_EXPR_EXTRA_SCOPE, LAMBDA_EXPR_DISCRIMINATOR): New.
159 (struct tree_lambda_expr): New.
160 (union lang_tree_node): Add lambda_expression.
161 (struct lang_type_class): Add lazy_move_ctor flag, lambda_expr field.
162 (CLASSTYPE_LAZY_MOVE_CTOR, CLASSTYPE_LAMBDA_EXPR): New.
163 (LAMBDA_TYPE_EXTRA_SCOPE, VEC_INIT_EXPR_SLOT): New.
164 (VEC_INIT_EXPR_INIT, DECLTYPE_FOR_LAMBDA_CAPTURE): New.
165 (DECLTYPE_FOR_LAMBDA_RETURN): New.
166 (enum special_function_kind): Add sfk_move_constructor.
167 (LAMBDANAME_PREFIX, LAMBDANAME_FORMAT, LAMBDANAME_P): New.
168 * parser.c (cp_parser_lambda_expression, cp_parser_lambda_introducer)
169 (cp_parser_lambda_declarator_opt, cp_parser_lambda_body): New.
170 (start_lambda_scope, record_lambda_scope, finish_lambda_scope): New.
171 (no_linkage_lambda_type_p): New.
172 (cp_parser_primary_expression): Recognize lambda expression.
173 (cp_parser_init_declarator): Note lambda scope.
174 (cp_parser_function_definition_after_declarator): Likewise.
175 (cp_parser_late_parsing_default_args): Likewise.
176 (cp_parser_skip_to_closing_parenthesis): Skip to end of lambda capture
177 lists, too.
178 (cp_parser_parameter_declaration): Don't defer lambda default args.
179 * semantics.c (finish_non_static_data_member, finish_id_expression):
180 Handle default capture for lambda expressions.
181 (finish_this_expr): Handle 'this' keyword inside of lambda expressions.
182 (outer_automatic_var_p): New.
183 (finish_decltype_type): Handle decltypes within lambda expressions.
184 (classtype_has_nothrow_assign_or_copy_p): Synthesized move constructor.
185 (build_lambda_expr, build_lambda_object, begin_lambda_type)
186 (lambda_return_type, lambda_capture_field_type, apply_lambda_return_type)
187 (capture_decltype, add_capture, add_default_capture)
188 (lambda_expr_this_capture): New.
189 * mangle.c (write_unnamed_type_name): New. Incomplete.
190 (write_closure_type_name): New.
191 (write_unqualified_name): Recognize unnamed, closure types.
192 (write_type): Do not write decltypes from lambda expressions.
193 (decl_mangling_context): New.
194 (write_name): Use it. Handle PARM_DECL scope.
195 (write_prefix): Likewise. Handle VAR_DECL/FIELD_DECL scope.
196 (write_compact_number): Factor out from...
197 (write_expression, write_template_param): ...here.
198 (discriminator_for_local_entity): Recognize lambdas.
199 (write_local_name): Handle PARM_DECL scope.
200 * typeck.c (structural_comptypes): Compare decltypes from lambda
201 expressions.
202 (check_return_expr): Deduce lambda return type from multiple return
203 statements.
204 * class.c (add_implicitly_declared_members): Add lazy move constructor
205 for lambda types.
206 (check_bases_and_members): Delete default constructor and assignment
207 operator for lambda types.
208 (maybe_note_name_used_in_class): Do not confuse lambda expression with
209 defining a class.
210 * decl.c (reshape_init_r): Array copy.
211 (grokfndecl): Synthesized move constructor.
212 (cp_tree_node_structure): Lambda expression.
213 * method.c (use_thunk): Synthesized move constructor.
214 (do_build_copy_constructor): Likewise.
215 (locate_copy): Likewise.
216 (implicitly_declare_fn): Likewise.
217 * cp-objcp-common.c (cp_tree_size): Handle LAMBDA_EXPR.
218 * error.c (dump_aggr_type): Recognize lambda type.
219 (dump_function_decl): Recognize lambda function.
220 (function_category): Likewise.
221 (dump_function_name): Hide lambda name.
222 * tree.c (build_array_copy, move): New.
223 (special_function_p): Synthesized move constructor.
224 (no_linkage_check): Handle lambdas.
225 * search.c (lookup_fnfields_1): Synthesized move constructor.
226 * cp-gimplify.c (cp_gimplify_init_expr, cp_gimplify_expr):
227 Handle VEC_INIT_EXPR.
228 * typeck2.c (digest_init_r): Array copy.
229 * pt.c (get_template_info): Don't touch typedefs.
230 (instantiate_decl): Don't resubstitute artificial decls.
231 (tsubst_decl, tsubst, tsubst_copy_and_build): Handle lambdas.
232 (lookup_template_class): Don't fall back on name lookup.
233 * name-lookup.c (make_lambda_name): New.
234 (pushdecl_class_level): Handle default capture for lambda expressions.
235 (qualify_lookup): Handle decltypes within lambda expressions.
236 (pushtag): Handle ts_within_enclosing_non_class in function scope.
237
238 2009-09-28 Janis Johnson <janis187@us.ibm.com>
239
240 * mangle.c (write_builtin_type): Support decimal float types.
241
242 2009-09-28 Richard Henderson <rth@redhat.com>
243
244 * cp-objcp-common.h (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New.
245
246 2009-09-24 Jakub Jelinek <jakub@redhat.com>
247
248 * method.c (make_thunk, make_alias_for): Don't set
249 DECL_NO_STATIC_CHAIN.
250 * decl.c (builtin_function_1, grokfndecl): Likewise.
251 * lex.c (build_lang_decl): Likewise.
252
253 2009-09-23 Dodji Seketeli <dodji@redhat.com>
254
255 PR debug/41065
256 * decl.c (cp_finish_decl): Record the types used by the global
257 variable declaration we've just parsed.
258
259 2009-09-22 Dodji Seketeli <dodji@redhat.com>
260
261 * cp-lang.c (LANG_HOOKS_FUNCTION_PARAMETER_PACK_P,
262 LANG_HOOKS_FUNCTION_PARM_EXPANDED_FROM_PACK_P,
263 LANG_HOOKS_GET_GENERIC_FUNCTION_DECL): Initialize these
264 hooks for the c++ FE.
265 * cp-tree.h (function_parameter_pack_p, get_function_template_decl,
266 function_parameter_expanded_from_pack_p): Declare ...
267 * pt.c (function_parameter_pack_p, get_function_template_decl,
268 function_parameter_expanded_from_pack_p): ... new hooks.
269 (get_template_info): Make this more robust.
270 (template_args_variadic_p, make_ith_pack_parameter_name): Add a new
271 line between comment and function.
272 (get_template_argument_pack_elems): Fix comment.
273 (tsubst_decl): Arguments of function parameter packs are not
274 parameter packs themselves.
275
276 2009-09-21 Jason Merrill <jason@redhat.com>
277
278 PR c++/41421
279 * tree.c (trivial_type_p): Fix logic.
280
281 2009-09-21 Jason Merrill <jason@redhat.com>
282
283 * name-lookup.c (push_class_level_binding): Sanity check.
284
285 2009-09-18 Jason Merrill <jason@redhat.com>
286
287 * decl2.c (determine_visibility): Make anonymous types internal.
288 (mark_used): Complain about types without linkage used in
289 decls with internal linkage.
290 (vague_linkage_fn_p): Split out from...
291 * decl.c (maybe_commonize_var): ...here.
292 (grokdeclarator): Adjust linkage when a typedef gives linkage name.
293 * tree.c (no_linkage_check): Check the enclosing class and template
294 arguments.
295
296 * cp-tree.h (TYPE_NAMESPACE_SCOPE_P): New.
297
298 * pt.c (get_pattern_parm): New.
299 (listify): Split out from...
300 (listify_autos): ...here.
301 (unify): Deduce std::initializer_list for T.
302 * call.c (build_over_call): Warn about it.
303
304 2009-09-17 Andrew Pinski <pinskia@gcc.gnu.org>
305
306 PR c++/39365
307 * typeck.c (cp_build_unary_op): Check TREE_CODE for bools instead of
308 using same_type_p.
309 (convert_for_assignment): Likewise.
310 * cvt.c (type_promotes_to): Likewise.
311
312 2009-09-14 Richard Henderson <rth@redhat.com>
313 Jakub Jelinek <jakub@redhat.com>
314
315 * cp-tree.h (finish_asm_stmt): Update decl.
316 * parser.c (cp_parser_asm_definition): Parse asm goto.
317 (cp_parser_asm_label_list): New.
318 * pt.c (tsubst_copy_asm_operands): Don't recurse on labels.
319 (tsubst_expr): Handle asm labels.
320 * semantics.c (finish_asm_stmt): Add and use labels parameter.
321
322 2009-09-14 Richard Henderson <rth@redhat.com>
323
324 * except.c (init_exception_processing): Don't call
325 default_init_unwind_resume_libfunc.
326 (cp_protect_cleanup_actions): Return the decl to call.
327 (build_exc_ptr): Use __builtin_eh_pointer.
328 * optimize.c (clone_body): Set eh_lp_nr, not eh_region.
329
330 2009-09-13 Richard Guenther <rguenther@suse.de>
331 Rafael Avila de Espindola <espindola@google.com>
332
333 * except.c (init_exception_processing): Do not set
334 lang_eh_runtime_type.
335 (choose_personality_routine): Do not set eh_personality_decl,
336 set pragma_java_exceptions.
337 * cp-lang.c (LANG_HOOKS_EH_RUNTIME_TYPE): Define.
338 (LANG_HOOKS_EH_PERSONALITY): Likewise.
339 (cp_eh_personality_decl): New.
340 (cp_eh_personality): Likewise.
341 * Make-lang.in (cp-lang.o): Add $(EXPR_H) and $(EXCEPT_H)
342 dependencies.
343
344 2009-09-13 Wei Guozhi <carrot@google.com>
345
346 PR c++/3187
347 * cp/optimize.c (build_delete_destructor_body): New function.
348 (maybe_clone_body): Call build_delete_destructor_body for
349 deleting destructor.
350
351 2009-09-10 Jason Merrill <jason@redhat.com>
352
353 * repo.c (extract_string, get_base_filename, init_repo): constify.
354
355 2009-09-09 Jason Merrill <jason@redhat.com>
356
357 * error.c (find_typenames_r): Also add decltypes.
358
359 2009-09-09 Paolo Carlini <paolo.carlini@oracle.com>
360
361 PR c++/28293
362 * decl2.c (grokfield): Check for explicit template argument lists.
363
364 2009-09-09 Jack Howarth <howarth@bromo.med.uc.edu>
365
366 PR bootstrap/41180
367 * Make-lang.in: Remove redundant code from linkage for darwin10.
368
369 2009-09-08 Paolo Carlini <paolo.carlini@oracle.com>
370
371 PR c++/39923
372 * decl.c (build_init_list_var_init): Check return value of
373 perform_implicit_conversion.
374
375 2009-09-08 Jason Merrill <jason@redhat.com>
376
377 * class.c (currently_open_class): Make sure we're dealing with the
378 main variant.
379
380 * cp-tree.h (enum overload_flags): Remove OP_FLAG.
381 * method.c (lazily_declare_fn): Check for dtorness in ABI warning.
382
383 * name-lookup.c (is_class_level): Remove.
384 (push_binding_level, leave_scope, resume_scope): Adjust.
385 (pushlevel_class): Adjust.
386 (poplevel_class): Make sure we're on class_binding_level.
387
388 * decl.c (grokmethod): Rename from start_method.
389 (finish_method): Remove.
390 * cp-tree.h: Adjust.
391 * parser.c (cp_parser_save_member_function_body): Adjust.
392
393 2009-09-03 Doug Kwan <dougkwan@google.com>
394
395 * tree.c (cp_fix_function_decl_p): New.
396 (cp_free_lang_data): New.
397
398 2009-09-03 Diego Novillo <dnovillo@google.com>
399
400 * Make-lang.in (decl2.o): Add dependency on $(POINTER_SET_H).
401 * decl2.c: Include pointer-set.h.
402 (collect_candidates_for_java_method_aliases): New.
403 (cp_write_global_declarations): Call it.
404 Add local variable CANDIDATES. If set, call
405 build_java_method_aliases.
406 (build_java_method_aliases): Add argument CANDIDATES.
407 Use it to determine if FNDECL should get a hidden alias.
408 * cp-objcp-common.h (LANG_HOOKS_FREE_LANG_DATA): Define.
409 * cp-tree.h (cp_free_lang_data): Declare.
410
411 2009-09-03 Richard Guenther <rguenther@suse.de>
412
413 * method.c (use_thunk): Use cgraph_finalize_function to hand
414 off thunks to the cgraph.
415 * semantics.c (emit_associated_thunks): Do not emit thunks
416 for really extern functions.
417
418 2009-09-03 Diego Novillo <dnovillo@google.com>
419
420 * cp-lang.c (lang_hooks): Remove const qualifier.
421
422 2009-09-02 Jason Merrill <jason@redhat.com>
423
424 * semantics.c (describable_type): Don't pretend to be in a template.
425
426 * ptree.c (cxx_print_type) [DECLTYPE_TYPE]: Print the expression.
427
428 2009-09-01 Alexandre Oliva <aoliva@redhat.com>
429
430 * cp-tree.h (TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS): New.
431 * cp-lang.c (cxx_dwarf_name): Pass it.
432 * error.c (count_non_default_template_args): Take flags as
433 argument. Adjust all callers. Skip counting of default
434 arguments if the new flag is given.
435
436 2009-09-01 Dodji Seketeli <dodji@redhat.com>
437
438 PR bootstrap/41205
439 * pt.c (make_ith_pack_parameter_name): Don't use strnlen that is a
440 GNU extension.
441
442 2009-09-01 Richard Guenther <rguenther@suse.de>
443
444 * cp-objcp-common.c (cp_expr_size): Use tree_expr_size.
445 * cp-objcp-common.h (LANG_HOOKS_EXPR_SIZE): Do not define.
446
447 2009-09-01 Richard Guenther <rguenther@suse.de>
448
449 * cp-objcp-common.h (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
450
451 2009-08-31 Dodji Seketeli <dodji@redhat.com>
452
453 PR debug/30161
454 * cp-tree.h (get_template_info): Parameter should be const.
455 (CLASSTYPE_SPECIALIZATION_OF_PRIMARY_TEMPLATE_P): Fix typo.
456 (get_template_argument_pack_elems,
457 get_primary_template_innermost_parameters,
458 get_template_innermost_arguments, template_template_parameter_p):
459 Declare ...
460 * pt.c (get_template_argument_pack_elems,
461 get_template_innermost_parameters, get_template_innermost_arguments,
462 template_template_parameter_p):
463 ... New C++ front end implementation of new language hooks.
464 (primary_template_instantiation_p): New private helper.
465 (make_ith_pack_parameter_name): Use snprintf and strnlen instead of
466 printf and strlen.
467 (get_template_info): Const-ify parameter.
468 * cp-lang.c (LANG_HOOKS_GET_INNERMOST_GENERIC_PARMS,
469 LANG_HOOKS_GET_INNERMOST_GENERIC_ARGS,
470 LANG_HOOKS_GET_ARGUMENT_PACK_ELEMS,
471 LANG_HOOKS_GENERIC_TYPE_PARAMETER_DECL_P): Initialize these
472 interfaces for the C++ front-end.
473
474 2009-08-31 Jason Merrill <jason@redhat.com>
475
476 PR c++/41127
477 * parser.c (cp_parser_enum_specifier): Make sure the : is followed by a
478 type-specifier-seq before we commit.
479
480 2009-08-28 Richard Guenther <rguenther@suse.de>
481
482 PR lto/41058
483 * cp-gimplify.c (cp_genericize_r): Do not leak zero-sized stores
484 into the generic IL.
485
486 2009-08-27 Richard Guenther <rguenther@suse.de>
487
488 * class.c (build_vtbl_ref_1): Remove excess vertical space.
489 * Make-lang.in (CXX_TREE_H): Remove c-common.def dependency
490 tracked by $(TREE_H).
491 * semantics.c (expand_or_defer_fn): Zero DECL_SAVED_TREE.
492
493 2009-08-26 Jason Merrill <jason@redhat.com>
494
495 * call.c (build_builtin_candidate): Don't set LOOKUP_ONLYCONVERTING
496 if we're contextually converting to bool.
497 (build_conditional_expr): Likewise.
498 * typeck.c (condition_conversion): Likewise.
499
500 * call.c (build_conditional_expr): Fix logic errors.
501 (build_new_op): Remove dead COND_EXPR handling.
502
503 2009-08-24 Jason Merrill <jason@redhat.com>
504
505 * cp-tree.h (DECL_DEFERRED_FN): Remove.
506 (struct lang_decl_fn): Remove deferred flag.
507 * class.c (build_clone): Don't set it.
508 * decl2.c (note_vague_linkage_fn): Don't check or set it.
509 (mark_used): Don't check it.
510 * method.c (make_thunk, make_alias_for): Don't set it.
511
512 * decl2.c (mark_used): Streamline logic.
513
514 PR c++/41109
515 PR c++/41110
516 PR c++/41134
517 * cp-tree.h (DECL_ODR_USED): New macro.
518 (struct lang_decl_base): Add odr_used flag.
519 * decl.c (duplicate_decls): Propagate it. Use it for error.
520 * pt.c (register_specialization): Use it for error.
521 * decl2.c (mark_used): Use it as gating flag rather than TREE_USED.
522 (cp_write_global_declarations): Use it for error.
523 (tree_used_ok): Remove.
524 * cp-tree.h: Remove tree_used_ok.
525 * call.c (build_call_a): Don't call it.
526 * init.c (build_offset_ref): Likewise.
527
528 2009-08-21 Jakub Jelinek <jakub@redhat.com>
529
530 PR c++/41131
531 * tree.c (lvalue_p_1) <case CONST_DECL>: Return clk_none if
532 not TREE_STATIC.
533
534 2009-08-19 Jason Merrill <jason@redhat.com>
535
536 PR c++/41119
537 PR c++/41120
538 * decl2.c (mark_used): Increment function_depth during synthesis.
539 * parser.c (cp_parser_default_argument): Not here.
540
541 2009-08-19 Jakub Jelinek <jakub@redhat.com>
542
543 * method.c (use_thunk): Call free_after_compilation after
544 assemble_end_function.
545
546 2009-08-17 Richard Guenther <rguenther@suse.de>
547
548 * decl.c (build_ptrmemfunc_type): Keep variant chain intact.
549 Avoid useless copy.
550 (finish_enum): Keep variant chain intact.
551 * tree.c (cp_build_reference_type): Likewise.
552
553 2009-08-16 Jason Merrill <jason@redhat.com>
554
555 Make TREE_USED match the [basic.def.odr] concept for FUNCTION_DECL
556 and VAR_DECL, so mark_used only has effect the first time.
557 * decl2.c (mark_used): Just return if TREE_USED is already set.
558 Don't set TREE_USED if cp_unevaluated_operand is set.
559 (tree_used_ok): New fn.
560 * init.c (build_offset_ref): Check it instead of TREE_USED.
561 * call.c (build_call_a): Likewise.
562 * cp-tree.h: Declare it.
563 (DECL_NO_LINKAGE_CHECKED): No longer needed.
564 (struct lang_decl_base): Remove no_linkage_checked bitfield.
565
566 * decl2.c (finish_static_data_member_decl): Don't set TREE_USED.
567
568 * decl2.c (mark_used): It's ok to synthesize for default args now.
569
570 2009-08-10 Jason Merrill <jason@redhat.com>
571
572 Implement DR 757: It's OK for a decl to use a type without linkage
573 so long as the decl is defined in the current translation unit.
574 * decl2.c (no_linkage_decls): New vector.
575 (mark_used): Add decls that use types with no linkage.
576 (cp_write_global_declarations): Check that they are defined.
577 (decl_defined_p, no_linkage_error): New fns.
578 * cp-tree.h (DECL_NO_LINKAGE_CHECKED): New macro.
579 (struct lang_decl_base): Add flag.
580 * decl.c (grokfndecl): Don't check type linkage.
581 (grokvardecl): If the type has no linkage, just make sure
582 DECL_LANG_SPECIFIC is set.
583 * pt.c (check_instantiated_arg): Don't check type linkage.
584 * name-lookup.c (is_local_extern): New fn.
585 * name-lookup.h: Declare it.
586
587 2009-08-05 Jason Merrill <jason@redhat.com>
588
589 PR c++/40948
590 * init.c (build_vec_init): Evaluate the initializer before
591 starting the initialization try block.
592
593 2009-08-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
594
595 PR c++/36069
596 * typeck.c (convert_for_assignment): Do not warn for any boolean
597 variant. Use explicit location.
598
599 2009-08-04 Dodji Seketeli <dodji@redhat.com>
600
601 PR c++/39987
602 * pt.c (tsubst_default_argument): Let access checks of the
603 default argument happen in the context of the current function.
604
605 2009-08-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
606
607 PR c++/16696
608 * call.c (build_new_op): Only try prefix operator if -fpermissive,
609 otherwise just error.
610
611 2009-08-04 Dodji Seketeli <dodji@redhat.com>
612
613 PR debug/39706
614 * error.c (lang_decl_name): Print qualified names for decls
615 in namespace scope.
616
617 2009-08-03 Jason Merrill <jason@redhat.com>
618 Jakub Jelinek <jakub@redhat.com>
619
620 PR c++/40948
621 * init.c (build_vec_init): Look through a TARGET_EXPR around a
622 CONSTRUCTOR.
623
624 2009-07-31 Jason Merrill <jason@redhat.com>
625 Douglas Gregor <doug.gregor@gmail.com>
626
627 Remove implicit binding of lvalues to rvalue references (N2831)
628 * call.c (convert_class_to_reference): Binding an lvalue to an
629 rvalue reference is bad. If the user-defined conversion is bad,
630 set bad_p before merging conversions.
631 (maybe_handle_ref_bind): Don't push down bad_p.
632 (reference_binding): Binding an lvalue to an rvalue reference is bad.
633 (convert_like_real): Give a helpful error about binding lvalue
634 to rvalue reference.
635 (reference_related_p): No longer static.
636 * typeck.c (build_typed_address): New.
637 (build_static_cast_1): Add static_cast from lvalue to &&.
638 * cp-tree.h: Adjust.
639
640 2009-07-31 Jason Merrill <jason@redhat.com>
641
642 * call.c (reference_binding): Rename lvalue_p to is_lvalue.
643 Do direct binding of "rvalues" in memory to rvalue references.
644 * tree.c (lvalue_p_1): Can't be both non-addressable lvalue and
645 "rvalue" in memory.
646 * typeck.c (build_static_cast_1): Do direct binding of memory
647 "rvalues" to rvalue references.
648 * cvt.c (cp_fold_convert): New.
649 * cp-tree.h: Declare it.
650
651 2009-07-31 Jason Merrill <jason@redhat.com>
652
653 * typeck.c (build_address): Do fold away ADDR_EXPR of INDIRECT_REF.
654 * tree.c (rvalue): Use cp_build_qualified_type, not TYPE_MAIN_VARIANT.
655
656 2009-07-29 Jason Merrill <jason@redhat.com>
657
658 PR c++/14912
659 * cp-tree.h (enum tsubst_flags): Add tf_no_class_instantiations.
660 * error.c (count_non_default_template_args): Pass it.
661 * pt.c (tsubst) [TYPENAME_TYPE]: Don't complete type if it's set.
662
663 2009-07-29 Richard Guenther <rguenther@suse.de>
664
665 PR c++/40834
666 * cp-gimplify.c (cp_genericize_r): Properly walk the BIND_EXPR
667 vars.
668
669 2009-07-26 Simon Martin <simartin@users.sourceforge.net>
670
671 PR c++/40749
672 * decl.c (grokdeclarator): Do not set TREE_NO_WARNING for functions
673 with a qualified return type.
674
675 2009-07-24 Jason Merrill <jason@redhat.com>
676
677 Core issue 901
678 * call.c (build_op_delete_call): If this is for a new-expression
679 and the op delete is deleted, do nothing.
680
681 Core issue 702
682 * call.c (compare_ics): Give list-initialization of std::init_list
683 priority over conversion to scalar, too.
684
685 2009-07-22 Jason Merrill <jason@redhat.com>
686
687 * mangle.c (mangle_type_string_for_rtti): Rename to be clearer.
688 (needs_fake_anon): New.
689 (write_name): Check it.
690 (write_nested_name): Add a fake anonymous namespace scope if true.
691 * name-lookup.c (get_anonymous_namespace_name): No longer static.
692 * rtti.c, cp-tree.h: Adjust.
693
694 2009-07-22 Richard Guenther <rguenther@suse.de>
695
696 PR c++/40799
697 * cp-gimplify.c (cp_gimplify_expr): Move handling of using
698 related exprs to ...
699 (cp_genericize_r): ... genericization stage.
700 (cp_genericize): Adjust.
701
702 2009-07-21 Jason Merrill <jason@redhat.com>
703
704 Core issue 934
705 * call.c (reference_binding): Implement binding to { }.
706 (initialize_reference): Binding temporary to non-const && is fine.
707 * decl.c (grok_reference_init): Remove error for CONSTRUCTOR.
708
709 * decl.c (reshape_init_r): { T } is not an aggregate initializer
710 for class T.
711
712 2009-07-17 Richard Guenther <rguenther@suse.de>
713
714 PR c/40401
715 * decl.c (finish_function): Do not emit unused result warnings
716 from here.
717 * cp-objcp-common.h (LANG_HOOKS_POST_GIMPLIFY_PASS): Use
718 c_warn_unused_result_pass.
719 * semantics.c (expand_or_defer_fn): Adjust assertion about IL status.
720 * optimize.c (clone_body): Clone in GENERIC.
721 (maybe_clone_body): Do not clear DECL_SAVED_TREE.
722 * decl2.c (cp_write_global_declarations): Fix body test.
723 Do not call cgraph_optimize.
724 * Make-lang.in (optimize.o): Add tree-iterator.h dependency.
725 * method.c (use_thunk): Register thunk with
726 cgraph_finalize_function.
727 * error.c (function_category): Guard access of DECL_LANG_SPECIFIC.
728
729 2009-07-17 Richard Guenther <rguenther@suse.de>
730
731 * init.c (build_vec_delete_1): Do not set DECL_REGISTER on the
732 temporary pointer.
733
734 2009-07-17 Aldy Hernandez <aldyh@redhat.com>
735 Manuel López-Ibáñez <manu@gcc.gnu.org>
736
737 PR 40435
738 * typeck.c, init.c, class.c, method.c, rtti.c, except.c, error.c,
739 tree.c, cp-gimplify.c, cxx-pretty-print.c, pt.c, semantics.c,
740 call.c, cvt.c, mangle.c: Add location argument to
741 fold_{unary,binary,ternary}, fold_build[123], build_call_expr,
742 build_size_arg, build_fold_addr_expr, build_call_array,
743 non_lvalue, size_diffop, fold_build1_initializer,
744 fold_build2_initializer, fold_build3_initializer,
745 fold_build_call_array, fold_build_call_array_initializer,
746 fold_single_bit_test, omit_one_operand, omit_two_operands,
747 invert_truthvalue, fold_truth_not_expr, build_fold_indirect_ref,
748 fold_indirect_ref, combine_comparisons, fold_builtin_*,
749 fold_call_expr, build_range_check, maybe_fold_offset_to_address,
750 round_up, round_down.
751
752 2009-07-16 Jason Merrill <jason@redhat.com>
753
754 PR libstdc++/37907
755 Split POD into "standard-layout" and "trivial" as per N2230,
756 Support std::is_standard_layout and std::is_trivial traits.
757 * cp-tree.h (enum cp_trait_kind): Add CPTK_IS_STD_LAYOUT,
758 CPTK_IS_TRIVIAL.
759 (struct lang_type_class): Add non_std_layout.
760 (CLASSTYPE_NON_STD_LAYOUT): New.
761 * class.c (check_bases): Set it.
762 (check_field_decls): Likewise.
763 (check_bases_and_members): Likewise.
764 * parser.c (cp_parser_primary_expression): Handle RID_IS_STD_LAYOUT,
765 RID_IS_TRIVIAL.
766 (cp_parser_trait_expr): Likewise.
767 * semantics.c (trait_expr_value): Handle CPTK_IS_STD_LAYOUT,
768 CPTK_IS_TRIVIAL.
769 (finish_trait_expr): Likewise.
770 * tree.c (scalarish_type_p, trivial_type_p, std_layout_type_p): New.
771 (pod_type_p): Use them.
772 (type_has_nontrivial_copy_init, type_has_nontrivial_default_init): New.
773
774 Adjust bits of the language that no longer refer to POD types.
775 * call.c (convert_arg_to_ellipsis): Use type_has_nontrivial_copy_init
776 and TYPE_HAS_NONTRIVIAL_DESTRUCTOR rather than pod_type_p.
777 (build_x_va_arg): Likewise.
778 (call_builtin_trap): Remove.
779 * decl.c (declare_local_label): Use type_has_nontrivial_default_init
780 and TYPE_HAS_NONTRIVIAL_DESTRUCTOR rather than pod_type_p.
781 (cp_finish_decl): Likewise.
782 (check_previous_goto_1, check_goto): Adjust error.
783 * typeck.c (build_class_member_access_expr): Check
784 CLASSTYPE_NON_STD_LAYOUT rather than CLASSTYPE_NON_POD_P.
785
786 2009-07-14 Taras Glek <tglek@mozilla.com>
787 Rafael Espindola <espindola@google.com>
788
789 * Make-lang.in: Added CP_PLUGIN_HEADERS and
790 c.install-target to export cp-tree.h cxx-pretty-print.h
791 name-lookup.h headers for plugins.
792
793 2009-07-14 Jason Merrill <jason@redhat.com>
794
795 PR c++/37276
796 * decl.c (decls_match): A non-extern-C declaration doesn't match
797 a builtin extern-C declaration.
798
799 PR c++/40746
800 * name-lookup.c (qualified_lookup_using_namespace): Don't stop
801 looking in used namespaces just because we found something on
802 another branch.
803
804 PR c++/40740
805 * semantics.c (perform_koenig_lookup): Handle empty template args.
806
807 * call.c (build_over_call): Use can_trust_pointer_alignment.
808
809 2009-07-14 Dodji Seketeli <dodji@redhat.com>
810
811 PR debug/40705
812 PR c++/403057
813 * decl2.c (grokfield): Don't call set_underlying_type on typedef
814 decls that are type names.
815
816 2009-07-13 Andrew Pinski <andrew_pinski@playstation.sony.com>
817
818 PR C++/22154
819 * parser.c (cp_parser_elaborated_type_specifier): Accept typename in
820 front of qualified names.
821
822 2009-07-12 Jason Merrill <jason@redhat.com>
823
824 PR c++/36628
825 * tree.c (rvalue): Use lvalue_or_rvalue_with_address_p.
826
827 PR c++/37206
828 * cp-tree.h (enum cp_lvalue_kind_flags): Add clk_rvalueref.
829 * tree.c (lvalue_p_1): Return it. Remove
830 treat_class_rvalues_as_lvalues parm.
831 (real_lvalue_p): Disallow pseudo-lvalues here.
832 (lvalue_or_rvalue_with_address_p): New fn.
833 * call.c (initialize_reference): Use it instead of real_lvalue_p.
834
835 PR c++/40689
836 * init.c (build_new_1): Handle initializer list as array initializer.
837 (build_vec_init): Likewise.
838 * typeck.c (cp_build_modify_expr): Likewise.
839 * typeck2.c (process_init_constructor_array): Error rather than abort
840 if too many initializers.
841
842 2009-07-10 Jakub Jelinek <jakub@redhat.com>
843
844 PR c++/40502
845 * error.c (cp_print_error_function): Check for NULL block.
846
847 2008-07-09 Simon Martin <simartin@users.sourceforge.net>
848 Jason Merrill <jason@redhat.com>
849
850 * pt.c (perform_typedefs_access_check, get_types_needing_access_check,
851 append_type_to_template_for_access_check_1): Use CLASS_TYPE_P.
852
853 2009-07-09 Dodji Seketeli <dodji@redhat.com>
854
855 PR c++/40684
856 * pt.c (type_unification_real): Use tsubst_template_arg instead
857 of tsubst to substitute default template arguments.
858
859 2009-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
860
861 PR c++/31246
862 * init.c (build_new_1): Set TREE_NO_WARNING for compiler-generated
863 code.
864 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
865
866
867 2009-07-07 Jason Merrill <jason@redhat.com>
868
869 PR c++/35828
870 * pt.c (tsubst_decl): Don't abort if we didn't change anything
871 in a TEMPLATE_DECL's args.
872
873 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
874
875 * semantics.c (finalize_nrv_r): Replace EXPR_LOCUS by
876 EXPR_LOCATION.
877
878 2009-07-07 Jason Merrill <jason@redhat.com>
879
880 PR c++/37816
881 * decl.c (build_enumerator): Don't add enumerators for a
882 scoped enum to the enclosing class.
883
884 PR c++/40639
885 * decl.c (start_enum): Allow dependent underlying type.
886
887 PR c++/40633
888 * decl.c (finish_enum): Finish scope even in a template.
889
890 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
891
892 * init.c: Replace %J by an explicit location. Update all calls.
893 * decl.c: Likewise.
894 * typeck2.c: Likewise.
895 * pt.c: Likewise.
896 * name-lookup.c: Likewise.
897
898 2009-07-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
899
900 * decl.c: Replace %H by an explicit location. Update all calls.
901 * except.c: Likewise.
902 * semantics.c: Likewise.
903 * parser.c: Likewise.
904
905 2009-07-06 Simon Martin <simartin@users.sourceforge.net>
906
907 PR c++/40557
908 * pt.c (perform_typedefs_access_check, get_types_needing_access_check,
909 append_type_to_template_for_access_check_1): Use
910 RECORD_OR_UNION_CODE_P.
911
912 2009-07-04 Jason Merrill <jason@redhat.com>
913
914 * pt.c (retrieve_specialization): Don't get confused by a
915 using-declaration that brings in another instance of this template
916 from a base class.
917
918 * ptree.c (cxx_print_type): Fix logic.
919
920 * cp-tree.h (LANG_DECL_FN_CHECK): Fix non-checking version.
921
922 PR c++/40619
923 * cp-tree.h (struct lang_decl_parm): New.
924 (struct lang_decl): Add it.
925 (LANG_DECL_PARM_CHECK): New.
926 (DECL_PARM_INDEX): New.
927 * decl2.c (parm_index): Remove.
928 * lex.c (retrofit_lang_decl): Handle parms.
929 (cxx_dup_lang_specific_decl): Likewise.
930 * mangle.c (write_expression): Adjust.
931 * tree.c (cp_tree_equal): Adjust.
932 (decl_linkage): Only check DECL_COMDAT for functions and variables.
933 * parser.c (cp_parser_parameter_declaration_list): Set
934 DECL_PARM_INDEX.
935 * pt.c (iterative_hash_template_arg): Hash it.
936
937 2009-07-03 Jason Merrill <jason@redhat.com>
938
939 * cp-tree.h (struct lang_decl): Overhaul.
940 (struct lang_decl_flags): Remove.
941 (struct lang_decl_base): New.
942 (struct lang_decl_min): New.
943 (struct lang_decl_fn): New.
944 (struct lang_decl_ns): New.
945 (CAN_HAVE_FULL_LANG_DECL_P): Replace with LANG_DECL_HAS_MIN.
946 (LANG_DECL_MIN_CHECK): New.
947 (LANG_DECL_FN_CHECK): New.
948 (LANG_DECL_NS_CHECK): New.
949 (STRIP_TEMPLATE): New.
950 (NON_THUNK_FUNCTION_CHECK): Remove.
951 (DECL_DECLARES_FUNCTION_P): New.
952 (lots): Adjust.
953 * lex.c (retrofit_lang_decl, cxx_dup_lang_specific_decl): Adjust.
954 * decl.c (push_local_name, duplicate_decls): Adjust.
955 * decl2.c (start_objects): Don't set u2sel.
956 * semantics.c (finish_omp_threadprivate): Adjust.
957 * class.c (build_clone): Don't do much on TEMPLATE_DECLs.
958 (decl_cloned_function_p): Out-of-line implementation of macros.
959 (clone_function_decl, adjust_clone_args): Use DECL_CLONED_FUNCTION_P.
960 * mangle.c (write_unqualified_name): Don't check function flags
961 on non-functions.
962 * method.c (make_alias_for): Don't set DECL_CLONED_FUNCTION.
963 * pt.c (build_template_decl): Don't set function flags.
964 (check_default_tmpl_args): Check that it's a function.
965 (instantiate_template): Use DECL_ABSTRACT_ORIGIN to find the
966 cloned template.
967
968 * pt.c (tsubst_decl) [FUNCTION_DECL]: Don't tsubst
969 DECL_CLONED_FUNCTION.
970
971 * cp-tree.h (struct lang_type_class): Move sorted_fields here.
972 * class.c (finish_struct_1): Adjust.
973 * ptree.c (cxx_print_decl, cxx_print_type): Adjust.
974 * search.c (lookup_field_1): Adjust.
975
976 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Remove.
977 * decl.c (finish_method): Don't add to it.
978 * class.c (fixup_pending_inline): Remove.
979 (fixup_inline_methods): Remove.
980 (finish_struct_1): Don't call it.
981
982 * error.c (dump_function_name): Handle null name.
983
984 2009-07-02 Mark Mitchell <mark@codesourcery.com>
985
986 * typeck.c (cp_build_binary_op): Move warnings about use of NULL
987 in arithmetic earlier and allow comparisions of NULL with
988 pointers-to-members.
989
990 2009-07-02 Jason Merrill <jason@redhat.com>
991
992 Use hash tables for template specialization lookup.
993 * pt.c (struct spec_entry): New type.
994 (decl_specializations, type_specializations): New hash tables.
995 (register_specialization, retrieve_specialization): Use them.
996 (reregister_specialization, lookup_template_class): Use them.
997 (eq_specializations, hash_tmpl_and_args, hash_specialization): New.
998 (iterative_hash_template_arg): New.
999 (init_template_processing): New
1000 (process_partial_specialization): Don't look to see if we already
1001 have this partial specialization.
1002 (maybe_process_partial_specialization): Handle reassigning
1003 full specializations when we get an explicit specialization
1004 of the partial instantiation.
1005 (tsubst_friend_function): Adjust specialization reassignment code.
1006 (instantiate_template): Only do one lookup.
1007 (instantiate_decl): Don't do any lookup.
1008 * cp-tree.h: Declare init_template_processing.
1009 * decl.c (duplicate_decls): Pass args to reregister_specialization.
1010
1011 2009-07-01 Jason Merrill <jason@redhat.com>
1012
1013 * cp-tree.h (DECL_CLASS_TEMPLATE_P): Use DECL_IMPLICIT_TYPEDEF_P.
1014
1015 * pt.c (register_specialization): Use duplicate_decls to merge
1016 the argument with a previous specialization.
1017 (check_explicit_specialization): Call register_specialization to
1018 merge the TEMPLATE_DECL with a previous version.
1019 (determine_specialization): Return the args even if fn is a template.
1020
1021 2009-07-01 Ian Lance Taylor <iant@google.com>
1022
1023 * g++spec.c (lang_specific_driver): Bump num_args by 1.
1024
1025 2009-06-30 Jason Merrill <jason@redhat.com>
1026
1027 PR c++/40595
1028 * pt.c (tsubst_pack_expansion): Handle unexpanded packs in an
1029 EXPR_PACK_EXPANSION.
1030
1031 2009-06-29 Jason Merrill <jason@redhat.com>
1032
1033 PR c++/40274
1034 * error.c (dump_template_parms): Pass all args to
1035 count_non_default_template_args.
1036 (count_non_default_template_args): Pull out the inner ones.
1037
1038 2009-06-26 H.J. Lu <hongjiu.lu@intel.com>
1039
1040 * decl.c (duplicate_decls): Re-indent.
1041
1042 2009-06-25 Ian Lance Taylor <iant@google.com>
1043
1044 * call.c (avoid_sign_compare_warnings): New static function.
1045 (build_new_op): Call it.
1046 * typeck.c (cp_build_binary_op): Don't call warn_sign_compare if
1047 TREE_NO_WARNING is set on either operand.
1048
1049 2009-06-25 Ian Lance Taylor <iant@google.com>
1050
1051 * g++spec.c (SKIPOPT): define.
1052 (lang_specific_driver): Handle -static-libstdc++. Only add
1053 LIBSTDCXX_STATIC if we add LIBSTDCXX.
1054
1055 2009-06-25 Ian Lance Taylor <iant@google.com>
1056
1057 * cvt.c (convert_to_void): Only warn about COND_EXPR if neither
1058 the second nor third operand has side effects.
1059
1060 2009-06-25 Ian Lance Taylor <iant@google.com>
1061
1062 * parser.c (cp_parser_binary_expression): Increment
1063 c_inhibit_evaluation_warnings while parsing the right hand side of
1064 "true || x" or "false && x".
1065 * typeck.c (cp_build_binary_op): Only call warn_for_sign_compare
1066 if c_inhibit_evaluation_warnings is zero.
1067
1068 2009-06-24 Jason Merrill <jason@redhat.com>
1069
1070 * error.c (dump_decl): Do say "typedef" for the injected class name.
1071
1072 * pt.c (lookup_template_class): Use currently_open_class,
1073 compare template args later.
1074
1075 PR c++/40342
1076 * decl.c (decls_match): Check DECL_TI_TEMPLATE too.
1077 * class.c (resolve_address_of_overloaded_function): Fix typo.
1078
1079 2009-06-18 Aldy Hernandez <aldyh@redhat.com>
1080
1081 * class.c (get_vtable_decl): Replace finish_decl with cp_finish_decl.
1082 * decl.c (finish_decl): Remove.
1083 (declare_global_var): Replace finish_decl with cp_finish_decl.
1084 (start_method): Same.
1085 * rtti.c (emit_tinfo_decl): Same.
1086 * pt.c (tsubst_expr): Same.
1087 (instantiate_decl): Same.
1088 * decl2.c (grokbitfield): Same.
1089 * name-lookup.c (pushdecl_top_level_1): Same.
1090 * cp-tree.h: Remove finish_decl.
1091
1092 2009-06-16 David Edelsohn <edelsohn@gnu.org>
1093
1094 * g++-spec.c (LIBSTDCXX_STATIC): Default to NULL.
1095 (lang_specific_driver): Always allocate extra argument.
1096 Add LIBSTDCXX_STATIC to arglist if defined and linking
1097 statically.
1098
1099 2009-06-16 Ian Lance Taylor <iant@google.com>
1100
1101 * Make-lang.in (cp/class.o): Depend upon gt-cp-class.h.
1102 (cp/semantics.o): Depend upon gt-cp-semantics.h.
1103
1104 2009-06-16 Ian Lance Taylor <iant@google.com>
1105
1106 * parser.c (cp_unevaluated_operand): Define global variable.
1107 (cp_parser_question_colon_clause): Increment
1108 c_inhibit_evaluation_warnings when evaluating an expression which
1109 will never be executed.
1110 (cp_parser_decltype): Increment cp_unevaluated_operand and
1111 c_inhibit_evaluation_warnings, not skip_evaluation.
1112 (cp_parser_sizeof_operand): Likewise.
1113 (cp_parser_enclosed_template_argument_list): Save
1114 cp_unevaluated_operand and c_inhibit_evaluation_warnings, not
1115 skip_evaluation.
1116 * cp-tree.h (struct saved_scope): Remove skip_evaluation field.
1117 Add unevaluated_operand and inhibit_evaluation_warnings fields.
1118 (cp_unevaluated_operand): Declare.
1119 * name-lookup.c (push_to_top_level): Save cp_unevaluated_operand
1120 and c_inhibit_evaluation_warnings rather than skip_evaluation.
1121 (pop_from_top_level): Restore cp_unevaluated_operand and
1122 c_inhibit_evaluation_warnings rather than skip_evaluation.
1123 * class.c (build_base_path): Check cp_unevaluated_operand rather
1124 than skip_evaluation.
1125 * typeck.c (build_class_member_access_expr): Likewise.
1126 (cp_build_binary_op): Don't warn about bad shift counts if
1127 c_inhibit_evaluation_warnings is non-zero.
1128 * pt.c (coerce_template_parms): Save state of
1129 cp_unevaluated_operand and c_inhibit_evaluation_warnings, not
1130 skip_evaluation.
1131 (tsubst_aggr_type): Likewise.
1132 (tsubst_pack_expansion): Check cp_unevaluated_operand rather than
1133 skip_evaluation.
1134 (tsubst_copy): Likewise.
1135 (tsubst): Set cp_unevaluated_operand and
1136 c_inhibit_evaluation_warnings, not skip_evaluation.
1137 (tsubst_copy_and_build): Likewise.
1138 * call.c (convert_arg_to_ellipsis): Check cp_unevaluated_operand
1139 rather than skip_evaluation.
1140 * decl2.c (mark_used): Likewise.
1141 * semantics.c (finish_non_static_data_member): Likewise.
1142 * cvt.c (cp_convert_and_check): Check
1143 c_inhibit_evaluation_warnings rather than skip_evaluation.
1144 * mangle.c (write_type): Set cp_unevaluated_operand rather than
1145 skip_evaluation.
1146
1147 2009-06-15 Ian Lance Taylor <iant@google.com>
1148
1149 * parser.c (cp_parser_direct_declarator): Add braces around
1150 variables declared before label.
1151
1152 2009-06-15 Rafael Avila de Espindola <espindola@google.com>
1153
1154 * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Remove.
1155 * cp-tree.h (cxx_comdat_group): Change signature.
1156 * decl.c (duplicate_decls): Use DECL_COMDAT_GROUP.
1157 (cxx_comdat_group): Change signature.
1158 * decl2.c (comdat_linkage, maybe_make_one_only): Update call to
1159 make_decl_one_only.
1160 (constrain_visibility, get_guard): Use DECL_COMDAT_GROUP.
1161 * method.c (use_thunk): Update call to make_decl_one_only.
1162 * optimize.c (maybe_clone_body): Use DECL_COMDAT_GROUP
1163
1164 2009-06-12 Aldy Hernandez <aldyh@redhat.com>
1165
1166 * typeck.c (cp_build_binary_op): Pass location to overflow_warning.
1167 (build_modify_expr): New arg.
1168 * semantics.c (finish_unary_op_expr): Pass location to
1169 overflow_warning.
1170 (handle_omp_for_class_iterator): Pass location to build_modify_expr.
1171 * typeck.c (cxx_sizeof_or_alignof_type): Pass location to
1172 c_sizeof_or_alignof_type.
1173 (build_array_ref): New argument.
1174 (build_compound_expr): Same.
1175 (build_const_cast): Same.
1176 (build_ptrmemfunc): Pass location to build_c_cast.
1177 * init.c (avoid_placement_new_aliasing): Pass location to
1178 build_stmt.
1179 (build_vec_delete_1): Pass location to cp_build_modify_expr,
1180 build_compound_expr.
1181 * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
1182 * decl.c (poplevel): Pass location to c_build_bind_expr.
1183 (finish_case_label): Pass location to build_case_label.
1184 (finish_constructor_body): Same.
1185 (finish_destructor_body): Pass location to build_stmt.
1186 (cxx_maybe_build_cleanup): Same, but to build_compound_expr.
1187 * call.c (build_new_op): Pass location to build_array_ref.
1188 (build_x_va_arg): Pass location to build_va_arg.
1189 * except.c (expand_end_catch_block): Pass location to
1190 build_stmt.
1191 * cp-tree.h (build_array_ref): New argument.
1192 (build_compound_expr): Same.
1193 (build_c_cast): Same.
1194 * cp-gimplify.c (gimplify_if_stmt): Pass location on down.
1195 (gimplify_switch_stmt): Same.
1196 * typeck2.c (split_nonconstant_init_1): Same.
1197 * pt.c (tsubst_copy): Same.
1198 * semantics.c (add_decl_expr): Same.
1199 (do_poplevel): Same.
1200 (push_cleanup): Same.
1201 (finish_goto_stmt): Same.
1202 (finish_expr_stmt): Same.
1203 (begin_if_stmt): Same.
1204 (begin_while_stmt): Same.
1205 (begin_do_stmt): Same.
1206 (finish_return_stmt): Same.
1207 (begin_for_stmt): Same.
1208 (finish_break_stmt): Same.
1209 (finish_continue_stmt): Same.
1210 (begin_switch_stmt): Same.
1211 (begin_try_block): Same.
1212 (begin_handler): Same.
1213 (finish_asm_stmt): Same.
1214 (finish_label_stmt): Same.
1215 (finish_stmt_expr_expr): Same.
1216 (finalize_nrv_r): Same.
1217 (finish_omp_atomic): Same.
1218 * name-lookup.c (do_using_directive): Same.
1219 * decl2.c (grok_array_decl): Same.
1220 * parser.c (cp_parser_cast_expression): Same.
1221 (cp_parser_selection_statement): Same.
1222 (cp_parser_implicitly_scoped_statement): Same.
1223 (cp_parser_objc_selector_expression): Same.
1224 (cp_parser_objc_synchronized_statement): Same.
1225 (cp_parser_objc_throw_statement): Same.
1226 (cp_parser_omp_critical): Same.
1227 (cp_parser_omp_master): Same.
1228 * typeck.c (build_function_call): Add location argument.
1229 * init.c: Add location argument to all build_decl calls.
1230 * class.c: Same.
1231 * method.c: Same.
1232 * rtti.c: Same.
1233 * tree.c: Same.
1234 * pt.c: Same.
1235 * semantics.c: Same.
1236 * lex.c: Same.
1237 * decl2.c: Same.
1238 * cp-gimplify.c: Same.
1239 * decl.c: Same.
1240 (cp_make_fname_decl): Add location argument. Pass location ot
1241 build_decl.
1242 (finish_case_label): Same.
1243 * cp-tree.h (finish_case_label): Add location argument.
1244 * parser.c (cp_parser_label_for_labeled_statement): Pass location to
1245 finish_case_label.
1246
1247 2009-06-09 Jason Merrill <jason@redhat.com>
1248
1249 PR c++/40381
1250 * decl2.c (mark_used): Return after complaining about deleted fn.
1251
1252 2009-06-08 Jason Merrill <jason@redhat.com>
1253
1254 * parser.c (cp_parser_type_id_1): 'auto' type is ok with a
1255 late-specified return type.
1256
1257 2009-06-08 Jakub Jelinek <jakub@redhat.com>
1258
1259 PR c++/40373
1260 * call.c (check_dtor_name): Return false even if
1261 get_type_value (name) is error_mark_node.
1262
1263 PR c++/40370
1264 PR c++/40372
1265 * parser.c (cp_parser_direct_declarator): Don't set TREE_SIDE_EFFECTS
1266 on error_mark_node. Check for VLAs outside of function context
1267 before check whether to wrap bounds into a NOP_EXPR with
1268 TREE_SIDE_EFFECTS.
1269
1270 2009-06-08 Alexandre Oliva <aoliva@redhat.com>
1271
1272 * repo.c (get_base_filename): Use aux_base_name rather than
1273 alternate temporary file during second compare debug compilation.
1274 (finish_repo): Skip during -fcompare-debug-second.
1275
1276 2009-06-06 Ian Lance Taylor <iant@google.com>
1277
1278 * parser.c (cp_parser_label_for_labeled_statement): Support
1279 attribute on labels if immediately followed by semicolon.
1280 * semantics.c (finish_label_stmt): Return new label.
1281 * pt.c (tsubst_expr): Handle attributes for LABEL_EXPR.
1282
1283 2009-06-03 Ian Lance Taylor <iant@google.com>
1284
1285 * Make-lang.in (cc1plus-checksum.o): Depend upon $(CONFIG_H) and
1286 $(SYSTEM_H).
1287
1288 2009-06-02 Mark Mitchell <mark@codesourcery.com>
1289
1290 * decl.c (maybe_deduce_size_from_array_init): Use relayout_decl.
1291
1292 2009-06-02 Jason Merrill <jason@redhat.com>
1293
1294 PR c++/40308
1295 PR c++/40311
1296 * typeck.c (cp_build_modify_expr): Always pass init-lists to the
1297 conversion code.
1298 * call.c (implicit_conversion): Allow init-list conversion to scalar
1299 during direct-initialization, too. Mark the conversion bad if it
1300 has too many levels of braces.
1301 (convert_like_real): And give a helpful error.
1302
1303 PR c++/40306
1304 PR c++/40307
1305 * decl.c (cp_finish_decl): Handle auto deduction from ().
1306 * typeck.c (build_x_indirect_ref): Handle dereferencing an operand
1307 with dependent type that is known to be a pointer.
1308
1309 2009-06-02 Simon Martin <simartin@users.sourceforge.net>
1310
1311 PR c++/38089
1312 * pt.c (register_specialization): Properly setup DECL_CONTEXT for
1313 specializations in an invalid namespace.
1314
1315 2009-06-01 Aldy Hernandez <aldyh@redhat.com>
1316
1317 * error.c (print_instantiation_partial_context): Print column
1318 numbers.
1319
1320 2009-05-29 Ian Lance Taylor <iant@google.com>
1321
1322 * error.c (cp_printer): Don't use va_arg with enum type.
1323
1324 2009-05-28 Dodji Seketeli <dodji@redhat.com>
1325
1326 PR c++/39754
1327 * cp-tree.h (canonical_type_variant): Remove this function declaration.
1328 (strip_typedefs): New function declaration.
1329 * tree.c (strip_typedefs): New function definition.
1330 (canonical_type_variant): Remove function definition.
1331 * cvt.c (convert_from_reference): No need to use
1332 canonical_type_variant.
1333 * typeck.c (cp_build_indirect_ref): Likewise.
1334 * error.c (dump_template_bindings): Use strip_typedefs instead of
1335 canonical_type_variant.
1336 * pt.c (convert_template_argument, unify): Likewise.
1337 * mangle.c (canonicalize_for_substitution): Don't use
1338 canonical_type_variant.
1339
1340 2009-05-27 Jason Merrill <jason@redhat.com>
1341
1342 * call.c (implicit_conversion): Handle conversion from
1343 initializer-list to scalar.
1344 (convert_like_real): Likewise. Avoid crashing on list
1345 initialization with bad conversions.
1346 (can_convert): Use LOOKUP_EXPLICIT.
1347 (can_convert_arg_bad): Add flags parm.
1348 * cp-tree.h: Adjust.
1349 * typeck.c (convert_for_assignment): Pass flags.
1350
1351 2009-05-27 Ian Lance Taylor <iant@google.com>
1352
1353 * Make-lang.in (g++$(exeext)): Change $(COMPILER) to $(LINKER).
1354 (cc1plus-dummy$(exeext), cc1plus$(exeext)): Likewise.
1355
1356 2009-05-26 Ian Lance Taylor <iant@google.com>
1357
1358 * Make-lang.in (g++spec.o): Use $(COMPILER).
1359 (g++$(exeext), cc1plus-dummy$(exeext)): Likewise.
1360 (cc1plus$(exeext)): Likewise.
1361
1362 2009-05-26 Dodji Seketeli <dodji@redhat.com>
1363
1364 PR c++/40007
1365 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Remove this accessor.
1366 (TI_TYPEDEFS_NEEDING_ACCESS_CHECKING): New accessor.
1367 (get_types_needing_access_check): Declare new entry point.
1368 * pt.c (append_type_to_template_for_access_check_1,
1369 get_types_needing_access_check): New functions.
1370 (perform_typedefs_access_check): Accept FUNCTION_DECLs and
1371 RECORD_TYPEs rather than TEMPLATE_DECLs. Use the new
1372 get_types_needing_access_check, no more
1373 MEMBER_TYPES_NEEDING_ACCESS_CHECK.
1374 (instantiate_class_template): Set input_location to the source
1375 location of the most specialized template definition.
1376 Perform access check using the RECORD_TYPE of the template, not its
1377 associated most generic TEMPLATE_DECL.
1378 (append_type_to_template_for_access_check): Augment function
1379 comments. Use the new get_types_needing_access_check, not
1380 MEMBER_TYPE_NEEDING_ACCESS_CHECK. Use the new
1381 append_type_to_template_for_access_check_1 subroutine.
1382
1383 2009-05-22 Jason Merrill <jason@redhat.com>
1384
1385 PR c++/38064
1386 * typeck.c (cp_build_binary_op): Allow ENUMERAL_TYPE in
1387 arithmetic comparisons.
1388 (cp_common_type): Handle scoped enums.
1389
1390 * call.c (promoted_arithmetic_type_p): Don't use INTEGRAL_TYPE_P.
1391 (add_builtin_candidate, add_builtin_candidates): Likewise.
1392 (convert_like_real): Likewise.
1393 * class.c (check_bitfield_decl): Likewise.
1394 * decl.c (check_static_variable_definition): Likewise.
1395 (compute_array_index_type): Likewise.
1396 * decl2.c (grokbitfield): Likewise.
1397 * init.c (build_new_1): Likewise.
1398 * pt.c (convert_nontype_argument): Likewise.
1399 (current_instantiation): Likewise.
1400 * tree.c (pod_type_p): Likewise.
1401 * typeck.c (build_static_cast_1): Likewise.
1402 (build_reinterpret_cast_1): Likewise.
1403
1404 2009-05-22 Richard Guenther <rguenther@suse.de>
1405
1406 PR middle-end/38964
1407 * init.c (avoid_placement_new_aliasing): Remove.
1408 (build_new_1): Do not call it.
1409
1410 2009-05-22 Mark Mitchell <mark@codesourcery.com>
1411
1412 * decl2.c (decl_needed_p): Consider dllexport'd functions needed.
1413 * semantics.c (expand_or_defer_fn): Similarly.
1414
1415 2009-05-20 Ian Lance Taylor <iant@google.com>
1416
1417 * parser.c (cp_parser_postfix_expression): Change args to a vec.
1418 Release it when done.
1419 (tree_vector): Define typedef. Define VEC functions.
1420 (cp_parser_parenthesized_expression_list): Change return type to
1421 vec. Change all callers.
1422 (cp_parser_new_expression): Change placement and initializer to
1423 vecs. Release them when done.
1424 (cp_parser_new_placement): Change return type to vec. Change all
1425 callers.
1426 (cp_parser_new_initializer): Likewise.
1427 * typeck.c (build_function_call_vec): Just call
1428 cp_build_function_call_vec.
1429 (cp_build_function_call): Just build a vec and call
1430 cp_build_function_call_vec.
1431 (cp_build_function_call_vec): New function based on old
1432 cp_build_function_call.
1433 (convert_arguments): Remove nargs and argarray parameters. Change
1434 values to a vec. Change caller.
1435 (build_x_compound_expr_from_vec): New function.
1436 (cp_build_modify_expr): Build vec to pass to
1437 build_special_member_call.
1438 * call.c (struct z_candidate): Add first_arg field. Change args
1439 field to vec.
1440 (convert_class_to_reference): Handle first argument separately.
1441 (add_candidate): Add first_arg parameter. Change args parameter
1442 to vec. Change all callers.
1443 (add_function_candidate, add_conv_candidate): Likewise.
1444 (add_template_candidate_real, add_template_candidate): Likewise.
1445 (add_template_conv_candidate): Likewise.
1446 (build_user_type_conversion_1): Handle first argument separately.
1447 (resolve_args): Change return type and parameter type to vecs.
1448 Change all callers.
1449 (perform_overload_resolution): Change args parameter to vec.
1450 Change all callers.
1451 (build_new_function_call, build_operator_new_call): Likewise.
1452 (add_candidates): Likewise.
1453 (build_op_call): New globally visible function, built from and
1454 replacing static function build_object_call.
1455 (build_new_op): Don't handle CALL_EXPR. Build vec, not tree_list,
1456 of arguments.
1457 (build_op_delete_call): Build vec to pass to
1458 cp_build_function_call_vec.
1459 (build_temp): Build vec to pass to build_special_member_call.
1460 (convert_like_real): Likewise.
1461 (perform_direct_initialization_if_possible): Likewise.
1462 (build_over_call): Handle first_arg field. Use build_call_array
1463 rather than build_call_list.
1464 (build_special_member_call): Change args parameter to vec. Change
1465 all callers.
1466 (build_new_method_call): Likewise.
1467 * init.c (expand_default_init): Change parms to vec.
1468 (build_raw_new_expr): Change placement and init to vecs. Change
1469 all callers.
1470 (build_new_1, build_new): Likewise.
1471 * class.c (resolve_address_of_overloaded_function): Build array to
1472 pass to fn_type_unification.
1473 * pt.c (tsubst_copy_and_build): For NEW_EXPR build vecs to pass to
1474 build_new. For CALL_EXPR create a vec rather than a tree_list;
1475 expand a pack if necessary.
1476 (fn_type_unification): Change args parameter to const tree *. Add
1477 nargs parameter. Change all callers.
1478 (type_unification_real): Likewise.
1479 (unify): Build array to pass to type_unification_real.
1480 (get_bindings): Build array to pass to fn_type_unification.
1481 (any_type_dependent_arguments_p): Change args parameter to a vec.
1482 Change all callers.
1483 (make_args_non_dependent): Renamed from build_non_dependent_args.
1484 Change return type to void. Change parameter type to vec. Change
1485 all callers.
1486 (do_auto_deduction): Pass an array to type_unification_real.
1487 * semantics.c (perform_koenig_lookup): Change args to vec. Change
1488 all callers.
1489 (finish_call_expr): Change args to vec. Change all callers. Call
1490 build_op_call instead of passing CALL_EXPR to build_new_op.
1491 (cxx_omp_create_clause_info): Allocate vec to pass to
1492 build_special_member_call.
1493 * decl2.c (build_offset_ref_call_from_tree): Change args parameter
1494 to vec. Change all callers.
1495 * name-lookup.c (lookup_function_nonclass): Likewise.
1496 (struct arg_lookup): Change args to vec.
1497 (arg_assoc_namespace): Handle args as a vec.
1498 (arg_assoc_args_vec): New static function.
1499 (lookup_arg_dependent): Change args parameter to vec. Change all
1500 callers.
1501 * method.c (do_build_assign_ref): Allocate vec to pass to
1502 build_special_member_call.
1503 * except.c (build_throw): Likewise.
1504 * typeck2.c (build_functional_cast): Likewise.
1505 * cvt.c (ocp_convert): Likewise.
1506 * tree.c (build_min_non_dep_call_vec): Change last parameter to
1507 vec. Change all callers.
1508 * cp-tree.h: Update declarations.
1509 * name-lookup.h: Update declarations.
1510
1511 2009-05-20 Sandra Loosemore <sandra@codesourcery.com>
1512
1513 * typeck.c (default_conversion): Check targetm.promoted_type.
1514 * decl.c (grokdeclarator): Check targetm.invalid_return_type.
1515 (grokparms): Check targetm.invalid_parameter_type.
1516 * cvt.c (ocp_convert): Check targetm.convert_to_type.
1517 (build_expr_type_conversion): Check targetm.promoted_type.
1518
1519 2009-05-19 Andrew Pinski <andrew_pinski@playstation.sony.com>
1520
1521 * typeck.c (build_binary_op): Allow % on integal vectors.
1522
1523 2009-05-18 Jason Merrill <jason@redhat.com>
1524
1525 Implement explicit conversions ops as specified in N2437.
1526 * decl.c (grokdeclarator): Handle explicit conversion ops.
1527 (check_initializer): Pass flags to store_init_value.
1528 * decl2.c (maybe_emit_vtables): Likewise.
1529 * init.c (expand_aggr_init_1): Likewise.
1530 * call.c (convert_class_to_reference): Take flags parm,
1531 check DECL_NONCONVERTING_P.
1532 (build_user_type_conversion_1): Check DECL_NONCONVERTING_P.
1533 (add_builtin_candidates): Simplify getting type of conversion.
1534 (build_object_call): Likewise. Check DECL_NONCONVERTING_P.
1535 (implicit_conversion): Pass through LOOKUP_ONLYCONVERTING.
1536 (reference_binding): Take flags parm. Direct-initialize copy parm.
1537 (add_function_candidate): Direct-initialize the copy parm.
1538 (add_conv_candidate): Use LOOKUP_IMPLICIT, not LOOKUP_NORMAL.
1539 (build_builtin_candidate): Add LOOKUP_ONLYCONVERTING.
1540 (conditional_conversion): Likewise.
1541 (convert_like_real): Only complain about DECL_NONCONVERTING_P
1542 constructors.
1543 (perform_implicit_conversion_flags): Add flags parm to
1544 perform_implicit_conversion. Improve diagnostics.
1545 * cp-tree.h (LOOKUP_IMPLICIT): New macro.
1546 (LOOKUP_COPY_PARM): New bit macro.
1547 * cvt.c (build_expr_type_conversion): Check DECL_NONCONVERTING_P.
1548 * typeck.c (convert_for_assignment): Take flags parm, pass it to
1549 perform_implicit_conversion_flags.
1550 (cp_build_modify_expr): Pass flags to convert_for_assignment.
1551 (convert_for_initialization): Likewise.
1552 * typeck2.c (store_init_value): Take flags parm, pass to
1553 digest_init_flags.
1554 (digest_init_flags): Add flags parm to digest_init.
1555 (digest_init_r): Take flags parm, pass to convert_for_initialization.
1556 (process_init_constructor_array): Pass it.
1557 (process_init_constructor_record): Likewise.
1558 (process_init_constructor_union): Likewise.
1559
1560 2009-05-16 Jason Merrill <jason@redhat.com>
1561
1562 PR c++/40139
1563 * pt.c (tsubst_qualified_id): Retain the type if we aren't dealing
1564 with a dependent type. Actually look up the destructor.
1565 * semantics.c (finish_id_expression): Fix logic.
1566 (finish_qualified_id_expr): Don't try to use 'this' if we aren't in
1567 a function.
1568 * typeck.c (build_x_unary_op): Diagnose taking the address of a
1569 constructor or destructor.
1570 * tree.c (get_first_fn): Handle OFFSET_REF.
1571
1572 2009-05-17 Joseph Myers <joseph@codesourcery.com>
1573
1574 * tree.c (cxx_printable_name_internal): Allow consecutive
1575 translated and untranslated cached copies of the name of the
1576 current function.
1577
1578 2009-05-15 Ian Lance Taylor <iant@google.com>
1579
1580 * cp-tree.h (enum cp_lvalue_kind_flags): Rename from
1581 cp_lvalue_kind. Change all uses.
1582 (enum base_access_flags): Rename from enum base_access. Change
1583 all uses.
1584 * parser.c (enum cp_parser_flags): Remove enum tag.
1585
1586 2009-05-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
1587
1588 PR 16302
1589 * call.c (build_new_op): Update calls to warn_logical_operator.
1590
1591 2009-05-14 Ian Lance Taylor <iant@google.com>
1592
1593 * class.c (layout_class_type): Change itk to unsigned int.
1594 * decl.c (finish_enum): Change itk to unsigned int.
1595 * parser.c (cp_parser_check_decl_spec): Change ds to int. Remove
1596 casts.
1597
1598 2009-05-13 David Mandelin <dmandelin@mozilla.com>:
1599
1600 * decl.c (duplicate_decls): Preserve parameter attributes.
1601
1602 2009-05-10 Jan Hubicka <jh@suse.cz>
1603
1604 * decl2.c (cxx_callgraph_analyze_expr): Use
1605 cgraph_mark_address_taken.
1606
1607 2009-05-10 Joseph Myers <joseph@codesourcery.com>
1608
1609 * call.c (name_as_c_string): Call type_as_string_translate.
1610 Translate identifiers to locale character set.
1611 * cp-tree.h (lang_decl_name): Update prototype.
1612 (type_as_string_translate, decl_as_string_translate,
1613 cxx_printable_name_translate): Declare.
1614 * cxx-pretty-print.c (M_): Define.
1615 (pp_cxx_unqualified_id, pp_cxx_canonical_template_parameter): Mark
1616 English fragments for conditional translation with M_.
1617 * decl.c (grokdeclarator): Translate identifiers to locale
1618 character set for diagnostics.
1619 * error.c (M_): Define.
1620 (dump_template_bindings, dump_type, dump_aggr_type,
1621 dump_type_prefix, dump_global_iord, dump_simple_decl, dump_decl,
1622 dump_function_decl, dump_template_parms, dump_expr,
1623 dump_binary_op, op_to_string, assop_to_string): Mark English
1624 fragments for conditional translation with M_.
1625 (type_as_string): Disable translation of identifiers.
1626 (type_as_string_translate): New.
1627 (expr_as_string): Disable translation of identifiers.
1628 (decl_as_string): Disable translation of identifiers.
1629 (decl_as_string_translate): New.
1630 (lang_decl_name): Add parameter translate.
1631 (args_to_string): Call type_as_string_translate.
1632 (cp_print_error_function): Call cxx_printable_name_translate.
1633 (print_instantiation_full_context,
1634 print_instantiation_partial_context): Call
1635 decl_as_string_translate.
1636 * parser.c (cp_lexer_get_preprocessor_token): Use %qE for
1637 identifier in diagnostic.
1638 * tree.c (cxx_printable_name): Change to
1639 cxx_printable_name_internal. Add parameter translate.
1640 (cxx_printable_name, cxx_printable_name_translate): New wrappers
1641 round cxx_printable_name_internal.
1642
1643 2009-05-08 H.J. Lu <hongjiu.lu@intel.com>
1644
1645 PR c/36892
1646 * call.c (build_call_a): Updated warn_deprecated_use call.
1647 (build_over_call): Likewise.
1648 * decl.c (grokdeclarator): Likewise.
1649 (grokparms): Likewise.
1650 * semantics.c (finish_id_expression): Likewise.
1651 * typeck.c (build_class_member_access_expr): Likewise.
1652 (finish_class_member_access_expr): Likewise.
1653
1654 2009-05-06 Dodji Seketeli <dodji@redhat.com>
1655
1656 PR c++/17395
1657 * pt.c (tsubst_copy) <case PARM_DECL>: We don't want to tsubst the
1658 whole list of PARM_DECLs, just the current one.
1659
1660 2009-05-05 Shujing Zhao <pearly.zhao@oracle.com>
1661
1662 * cp-tree.h:
1663 (opname_tab, assignop_tab, update_member_visibility, yyerror, yyhook,
1664 mangle_compound_literal): Remove unused declarations.
1665 (build_vfield_ref, cxx_print_statistics, clone_function_decl,
1666 adjust_clone_args, maybe_push_cleanup_level, pushtag, make_anon_name,
1667 pushdecl_top_level_maybe_friend, pushdecl_top_level_and_finish,
1668 check_for_out_of_scope_variable, print_other_binding_stack,
1669 maybe_push_decl, cxx_mark_addressable, force_target_expr,
1670 build_target_expr_with_type, finish_case_label,
1671 cxx_maybe_build_cleanup, begin_eh_spec_block, finish_eh_spec_block,
1672 check_template_keyword, cxx_omp_predetermined_sharing,
1673 cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
1674 cxx_omp_clause_assign_op, cxx_omp_clause_dtor, cxx_omp_finish_clause,
1675 cxx_omp_privatize_by_reference): Rearrange the declarations line to
1676 match the comment that indicates the .c file which the functions are
1677 defined.
1678 (cxx_print_xnode, cxx_print_decl, cxx_print_type,
1679 cxx_print_identifier, cxx_print_error_function, pushdecl): Add comment.
1680
1681 2009-05-05 Nathan Sidwell <nathan@codesourcery.com>
1682
1683 * typeck.c (cp_build_compound_expr): Require RHS to have a known
1684 type.
1685 * class.c (resolve_address_of_overloaded_function): Use
1686 OVL_CURRENT for error message.
1687 (instantiate_type): Forbid COMPOUND_EXPRs and remove code dealing
1688 with them. Do not copy the node.
1689
1690 2009-05-05 Jakub Jelinek <jakub@redhat.com>
1691
1692 PR c++/40013
1693 * pt.c (tsubst): If magic NOP_EXPR with side-effects has no type,
1694 set it from its operand's type after tsubst_expr.
1695
1696 2009-05-04 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1697
1698 PR c++/28152
1699 * parser.c (cp_lexer_get_preprocessor_token): Do not store the
1700 canonical spelling for keywords.
1701 (cp_parser_attribute_list): Use the canonical spelling for
1702 keywords in attributes.
1703
1704 2009-05-01 Joseph Myers <joseph@codesourcery.com>
1705
1706 * cxx-pretty-print.c (is_destructor_name, pp_cxx_unqualified_id,
1707 pp_cxx_template_keyword_if_needed, pp_cxx_postfix_expression,
1708 pp_cxx_new_expression, pp_cxx_delete_expression,
1709 pp_cxx_unary_expression, pp_cxx_assignment_operator,
1710 pp_cxx_assignment_expression, pp_cxx_expression,
1711 pp_cxx_function_specifier, pp_cxx_decl_specifier_seq,
1712 pp_cxx_simple_type_specifier, pp_cxx_type_specifier_seq,
1713 pp_cxx_exception_specification, pp_cxx_direct_declarator,
1714 pp_cxx_ctor_initializer, pp_cxx_type_id, pp_cxx_statement,
1715 pp_cxx_namespace_alias_definition, pp_cxx_template_parameter,
1716 pp_cxx_canonical_template_parameter, pp_cxx_template_declaration,
1717 pp_cxx_declaration, pp_cxx_typeid_expression,
1718 pp_cxx_va_arg_expression, pp_cxx_offsetof_expression,
1719 pp_cxx_trait_expression): Mostly use pp_string and
1720 pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
1721 for non-identifiers. Mark English strings for translation.
1722 * cxx-pretty-print.h (pp_cxx_ws_string): Define.
1723 * error.c (dump_template_parameter, dump_template_bindings,
1724 dump_type, dump_aggr_type, dump_type_prefix, dump_simple_decl,
1725 dump_decl, dump_template_decl, dump_function_decl,
1726 dump_parameters, dump_exception_spec, dump_template_parms,
1727 dump_expr, dump_binary_op, dump_unary_op, op_to_string,
1728 assop_to_string, args_to_string, cp_print_error_function,
1729 print_instantiation_full_context,
1730 print_instantiation_partial_context): Mostly use pp_string and
1731 pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
1732 for non-identifiers. Mark English strings for translation.
1733 (dump_global_iord): Mark strings for translation; use longer
1734 strings instead of substituting single words.
1735 (function_category): Return a format string marked for
1736 translation, not a single word or phrase to substitute in a longer
1737 phrase.
1738
1739 2009-04-28 Ben Elliston <bje@au.ibm.com>
1740
1741 PR c++/35652
1742 Revert:
1743
1744 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1745
1746 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
1747
1748 2009-04-27 Ian Lance Taylor <iant@google.com>
1749
1750 * semantics.c (finish_omp_clauses): Change type of c_kind to enum
1751 omp_clause_code.
1752
1753 2009-04-27 Jakub Jelinek <jakub@redhat.com>
1754
1755 PR c++/39875
1756 * cvt.c (convert_to_void) <case INDIRECT_REF>: Only warn about
1757 -Wunused-value if implicit.
1758
1759 2009-04-24 Ian Lance Taylor <iant@google.com>
1760
1761 * call.c (build_temp): Change 0 to enum constant.
1762 * cp-tree.h (cp_lvalue_kind): Typedef to int rather than enum
1763 type.
1764 * cp-gimplify.c (cp_gimplify_expr): Add cast to enum type.
1765 * decl2.c (constrain_visibility): Likewise.
1766 * parser.c (cp_lexer_get_preprocessor_token): Likewise.
1767 (cp_parser_flags): Typedef to int rather than enum type.
1768 (cp_parser_expression_stack_entry): Change prec field to enum
1769 cp_parser_prec.
1770
1771 * typeck.c (build_modify_expr): Add lhs_origtype parameter.
1772 Change all callers.
1773
1774 2009-04-22 Dodji Seketeli <dodji@redhat.com>
1775
1776 PR c++/39639
1777 * parser.c (cp_parser_template_argument_list): Display an error
1778 when an ellipsis is not preceded by a parameter pack. Also, warn
1779 about variadic templates usage without -std=c++0x.
1780
1781 2009-04-21 Taras Glek <tglek@mozilla.com>
1782
1783 * cp-tree.h: Update GTY annotations to new syntax.
1784 * decl.c: Likewise.
1785 * mangle.c: Likewise.
1786 * name-lookup.c: Likewise.
1787 * name-lookup.h: Likewise.
1788 * parser.c: Likewise.
1789 * pt.c: Likewise.
1790 * rtti.c: Likewise.
1791 * semantics.c: Likewise.
1792 * typeck2.c: Likewise.
1793
1794 2009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1795
1796 PR c++/14875
1797 * parser.c (cp_parser_error): Pass token->flags to c_parse_error.
1798
1799 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1800
1801 PR c++/35711
1802 * typeck.c (check_for_casting_away_constness): We diagnose casting
1803 away any qualifiers not just constness.
1804 (casts_away_constness): Mention that it handles more than just
1805 constness.
1806
1807 2009-04-21 Joseph Myers <joseph@codesourcery.com>
1808
1809 * ChangeLog, ChangeLog-1993, ChangeLog-1994, ChangeLog-1995,
1810 ChangeLog-1996, ChangeLog-1997, ChangeLog-1998, ChangeLog-1999,
1811 ChangeLog-2000, ChangeLog-2001, ChangeLog-2002, ChangeLog-2003,
1812 ChangeLog-2004, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
1813 ChangeLog-2008, ChangeLog.ptr, ChangeLog.tree-ssa, NEWS,
1814 cfns.gperf: Add copyright and license notices.
1815 * cfns.h: Regenerate.
1816 * ChangeLog, ChangeLog-2004: Correct dates.
1817
1818 2009-04-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
1819
1820 PR 16202
1821 * tree.c (lvalue_p_1): Use const_tree.
1822 Use CONST_CAST_TREE to avoid warning.
1823 (lvalue_p): Returns bool, receives const_tree.
1824
1825 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1826
1827 PR c++/13358
1828 * parser.c (cp_parser_check_decl_spec): Drop redundant flags.
1829 * error.c (pedwarn_cxx98): New.
1830 * cp-tree.h (pedwarn_cxx98): Declare.
1831
1832 2009-04-20 Le-Chun Wu <lcwu@google.com>
1833
1834 PR c++/39803
1835 * init.c (build_vec_init): Set TREE_NO_WARNING on the
1836 compiler-generated INDIRECT_REF expression.
1837
1838 2009-04-20 Ian Lance Taylor <iant@google.com>
1839
1840 * typeck.c (build_function_call_vec): New function.
1841 (cp_build_function_call): Only pass first parameter to
1842 objc_rewrite_function_call.
1843 (build_modify_expr): Add rhs_origtype parameter. Change all
1844 callers.
1845 * decl.c (finish_decl): Add origtype parameter. Change all
1846 callers.
1847 * semantics.c (finish_call_expr): Pass VEC to
1848 resolve_overloaded_builtin.
1849
1850 2009-04-20 Ian Lance Taylor <iant@google.com>
1851
1852 * cp-tree.h (base_access): Change typedef to int.
1853 * parser.c (cp_parser_omp_flush): Change 0 to OMP_CLAUSE_ERROR.
1854 (cp_parser_omp_threadprivate): Likewise.
1855 * pt.c (unify_pack_expansion): Add casts to enum type.
1856
1857 2009-04-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
1858
1859 PR c/32061
1860 PR c++/36954
1861 * call.c (build_new_op): Save the original codes of operands
1862 before folding.
1863
1864 2009-04-18 Kazu Hirata <kazu@codesourcery.com>
1865
1866 * cp-tree.h: Remove the prototype for insert_block.
1867 * decl.c (insert_block): Remove.
1868
1869 2009-04-16 Ian Lance Taylor <iant@google.com>
1870
1871 * cp-tree.h (enum tsubst_flags): Rename from enum tsubst_flags_t.
1872 (tsubst_flags_t): Change typedef from enum type to int.
1873
1874 2009-04-16 Paolo Bonzini <bonzini@gnu.org>
1875
1876 * decl.c (check_initializer): Use TYPE_VECTOR_OPAQUE
1877 instead of targetm.vector_opaque_p.
1878
1879 2009-04-15 Le-Chun Wu <lcwu@google.com>
1880
1881 PR c++/39551
1882 * call.c (build_over_call): Set TREE_NO_WARNING on the
1883 compiler-generated INDIRECT_REF expression.
1884 * cvt.c (convert_to_void): Emit warning when stripping off
1885 INDIRECT_REF.
1886
1887 2009-04-14 Diego Novillo <dnovillo@google.com>
1888
1889 * parser.c (cp_parser_type_specifier_seq): Move call to
1890 invoke_plugin_callbacks ...
1891 (cp_parser_type_specifier_seq): ... here.
1892
1893 2009-04-14 Le-Chun Wu <lcwu@google.com>
1894
1895 * Make-lang.in: Modify dependencies of files including plugin.h.
1896 * decl.c (finish_function): Call invoke_plugin_callbacks.
1897 * parser.c (cp_parser_type_specifier): Call invoke_plugin_callbacks.
1898
1899 2009-04-14 Jason Merrill <jason@redhat.com>
1900
1901 PR c++/39763
1902 * name-lookup.c (pushdecl_maybe_friend): Avoid all warnings
1903 about shadowing by tentative parms.
1904
1905 2009-04-13 Jason Merrill <jason@redhat.com>
1906
1907 PR c++/39480
1908 * call.c (build_over_call): Don't call memcpy if the target is
1909 the same as the source.
1910
1911 2009-04-13 Jason Merrill <jason@redhat.com>
1912
1913 PR c++/39750
1914 * pt.c (uses_template_parms): Handle CONSTRUCTOR.
1915
1916 2009-04-12 Jason Merrill <jason@redhat.com>
1917
1918 PR c++/39742
1919 * call.c (joust): Don't crash on variadic fn.
1920
1921 2009-04-10 Jason Merrill <jason@redhat.com>
1922
1923 PR c++/28301
1924 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Return
1925 if we see a close brace without an open brace.
1926
1927 2009-04-10 H.J. Lu <hongjiu.lu@intel.com>
1928
1929 * parser.c (cp_parser_class_specifier): Remove the unused
1930 has_trailing_semicolon.
1931
1932 2009-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
1933
1934 PR c++/20118
1935 * parser.c (cp_parser_check_template_parameters): Take a
1936 cp_declarator parameter.
1937 (cp_parser_elaborated_type_specifier): Update to
1938 cp_parser_check_template_parameters.
1939 (cp_parser_class_head): Likewise.
1940 (cp_parser_check_declarator_template_parameters): Likewise.
1941 (cp_parser_check_template_parameters): Handle first the non-error
1942 conditions. Give more accurate diagnostics if a declarator is
1943 given.
1944
1945 2009-04-08 Jason Merrill <jason@redhat.com>
1946
1947 PR c++/25185
1948 * error.c (dump_aggr_type): Chase template typedefs if
1949 -fno-pretty-templates.
1950
1951 2009-04-08 Dodji Seketeli <dodji@redhat.com>
1952
1953 PR c++/39637
1954 * parser.c (cp_parser_enumerator_definition): Make sure the
1955 initializer of the enumerator doesn't contain any bare parameter pack.
1956
1957 2009-04-07 Jason Merrill <jason@redhat.com>
1958
1959 PR c++/34691
1960 * name-lookup.c (merge_functions): Keep multiple extern "C" functions.
1961 * call.c (joust): Complain about mismatched default arguments
1962 in extern "C" functions.
1963 * class.c (resolve_address_of_overloaded_function): Handle multiple
1964 extern "C" functions.
1965 * pt.c (resolve_overloaded_unification): Likewise.
1966
1967 2009-04-07 Jason Merrill <jason@redhat.com>
1968
1969 PR c++/25185
1970 * error.c (dump_function_decl): Don't pretty-print templates
1971 if -fno-pretty-templates.
1972 (count_non_default_template_args): Print all args if
1973 -fno-pretty-templates.
1974
1975 2009-04-06 Jason Merrill <jason@redhat.com>
1976
1977 PR c++/35146
1978 * pt.c (fn_type_unification): For DEDUCE_EXACT check that
1979 the deduced template arguments give us the parameter types
1980 we're looking for.
1981
1982 2009-04-05 Giovanni Bajo <giovannibajo@libero.it>
1983 Jason Merrill <jason@redhat.com>
1984
1985 PR c++/14912
1986 * error.c (count_non_default_template_args): New fn.
1987 (dump_template_parms): Call it.
1988 (dump_template_argument_list): Call it. Add parms parm.
1989 (dump_template_argument): Adjust call to dump_template_argument_list.
1990 (dump_type, dump_decl): Likewise.
1991 (dump_template_bindings): Refactor logic.
1992
1993 2009-04-03 Jason Merrill <jason@redhat.com>
1994
1995 PR c++/25185
1996 * error.c (dump_template_bindings): Look through typedefs in
1997 typename results.
1998 (dump_type) [TYPENAME_TYPE]: Print the typedef name if any.
1999 (find_typenames_r): Also collect typedefs.
2000 * pt.c (unify): Strip typedefs.
2001
2002 PR c++/39608
2003 * semantics.c (finish_id_expression): Don't assume a dependent
2004 member of the current instantiation isn't a valid integral
2005 constant expression. Check dependent_scope_p.
2006 * pt.c (dependent_scope_p): Check TYPE_P.
2007 (tsubst_copy): If args is null, just return.
2008
2009 2009-04-02 Jason Merrill <jason@redhat.com>
2010
2011 PR c++/25185
2012 * error.c (find_typenames, find_typenames_r): New fns.
2013 (dump_function_decl): Call find_typenames.
2014 (dump_template_bindings): Print typenames as well.
2015 * pt.c (tsubst): Non-static.
2016 * cp-tree.h: Declare it.
2017
2018 2009-04-02 Dodji Seketeli <dodji@redhat.com>
2019
2020 PR c++/26693
2021 * decl2.c (grokfield): when a typedef appears in a
2022 class, create the typedef variant type node for it.
2023 (save_template_attributes): Creating typedef variant type node
2024 here is now useless.
2025 * decl.c (grokdeclarator): If the typedef'ed struct/class was
2026 anonymous, set the proper type name to all its type variants.
2027 (xref_basetypes) : Fixup the variant types after setting
2028 TYPE_BINFO on REF.
2029 * name-lookup.c (pushdecl_maybe_friend): Reuse the
2030 set_underlying_type function to install typedef variant types.
2031 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
2032 macro.
2033 (append_type_to_template_for_access_check): New entry points.
2034 * semantics.c (check_accessibility_of_qualified_id):
2035 When a typedef that is a member of a class appears in a template,
2036 add it to the template. It will be ...
2037 * class.c (finish_struct_bits): Split type variant fixup into ...
2038 (fixup_type_variants): A new entry point.
2039 * pt.c (instantiate_class_template, instantiate_template ): ... access
2040 checked at template instantiation time.
2041 (resolve_type_name_type): The type name should be the name of the
2042 main type variant.
2043 (retrieve_specialization): Specializations of template typedefs aren't
2044 to looked up in DECL_TEMPLATE_INSTANTIATIONS (tmpl).
2045 (append_type_to_template_for_access_check): New entry point.
2046 (tsubst_decl): For typedefs, build the variant type from the correct
2047 original type.
2048 (get_class_bindings): Fix function comment.
2049 (perform_typedefs_access_check): New entry point.
2050
2051 2009-03-31 Jason Merrill <jason@redhat.com>
2052
2053 PR c++/34691
2054 * name-lookup.c (pushdecl_maybe_friend): Diagnose mismatched
2055 extern "C" declarations.
2056
2057 C++ DR 613
2058 * semantics.c (finish_non_static_data_member): Allow such references
2059 without an associated object in sizeof/decltype/alignof.
2060
2061 * ptree.c (cxx_print_decl): Pretty-print full name of
2062 function/template.
2063 (cxx_print_type): Pretty-print full name of class.
2064
2065 * decl.c (grokdeclarator): Reject pointer to qualified function
2066 type.
2067
2068 PR c++/37806, core issue 547
2069 * typeck.c (cp_apply_type_quals_to_decl): Don't apply any quals
2070 to a typedef.
2071 * tree.c (cp_build_qualified_type_real): Don't apply restrict to a
2072 function type.
2073 * decl.h (enum decl_context): Add TEMPLATE_TYPE_ARG.
2074 * decl.c (groktypename): Add is_template_arg parameter.
2075 (grokdeclarator): Allow function cv-quals on a template type arg.
2076 * parser.c (cp_parser_new_type_id, cp_parser_type_id): Add
2077 is_template_arg argument in calls to groktypename.
2078 * cp-tree.h: Adjust prototype.
2079 * error.c (dump_type_prefix, dump_type_suffix): Fix plain
2080 FUNCTION_TYPE printing.
2081
2082 * mangle.c (write_expression): Mangle dependent name as
2083 source-name.
2084
2085 PR c++/38030, 38850, 39070
2086 * pt.c (type_dependent_expression_p_push): New fn.
2087 (tsubst_copy_and_build) [CALL_EXPR]: Only do arg-dep lookup when the
2088 substitution makes the call non-dependent. Preserve koenig_p.
2089 * parser.c (cp_parser_postfix_expression): Only do arg-dep lookup
2090 for non-dependent calls.
2091 * semantics.c (finish_call_expr): Revert earlier changes.
2092 * cp-tree.h: Revert change to finish_call_expr prototype.
2093
2094 2009-03-29 Joseph Myers <joseph@codesourcery.com>
2095
2096 PR preprocessor/34695
2097 * cp-tree.h (cp_cpp_error): Remove.
2098 * error.c (cp_cpp_error): Remove.
2099 * parser.c (cp_lexer_new_main): Set done_lexing instead of
2100 client_diagnostic and error callback.
2101
2102 2009-03-28 Paolo Bonzini <bonzini@gnu.org>
2103
2104 * cp/cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
2105 * cp/cp-objcp-common.c (cxx_staticp): Remove.
2106 * cp/cp-tree.h (cxx_staticp): Remove.
2107
2108 2009-03-28 Jakub Jelinek <jakub@redhat.com>
2109
2110 PR c++/39554
2111 * parser.c (cp_parser_postfix_expression): Don't call
2112 warning_if_disallowed_function_p.
2113
2114 2009-03-27 Jan Hubicka <jh@suse.cz>
2115
2116 * except.c (choose_personality_routine): Set terminate_node to abort
2117 for java exceptions.
2118
2119 2009-03-27 Dodji Seketeli <dodji@redhat.com>
2120 Jakub Jelinek <jakub@redhat.com>
2121
2122 PR debug/37959
2123 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define.
2124 (cp_function_decl_explicit_p): New prototype.
2125 * cp-objcp-common.c (cp_function_decl_explicit_p): New function.
2126
2127 2009-03-27 Andrew Pinski <andrew_pinski@playstation.sony.com>
2128
2129 PR c++/38638
2130 * parser.c (cp_parser_elaborated_type_specifier): If we have a
2131 typename tag and don't have either a TYPE_DECL or a
2132 TEMPLATE_ID_EXPR, set the type to NULL.
2133
2134 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
2135
2136 PR c++/37647
2137 * decl.c (grokdeclarator): Reject [con|de]stuctors in a non-class
2138 scope.
2139
2140 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
2141
2142 PR c++/29727
2143 * decl.c (check_array_designated_initializer): Handle error_mark_node.
2144
2145 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2146
2147 PR c++/35652
2148 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
2149
2150 2009-03-26 Andrew Haley <aph@redhat.com>
2151
2152 PR C++/39380
2153 * decl2.c (possibly_inlined_p): If java exceptions are in use
2154 don't inline a decl unless it is explicitly marked inline.
2155 * lex.c: (pragma_java_exceptions): New variable.
2156 (handle_pragma_java_exceptions): Set pragma_java_exceptions.
2157 * cp-tree.h (pragma_java_exceptions): Declare new variable.
2158
2159 2009-03-24 Jason Merrill <jason@redhat.com>
2160
2161 PR c++/28274
2162 * name-lookup.c (pushdecl_maybe_friend): Check default args later.
2163
2164 2009-03-23 Jakub Jelinek <jakub@redhat.com>
2165
2166 PR c/39495
2167 * semantics.c (handle_omp_for_class_iterator): Swap cond operands and
2168 code if iter is the second operand.
2169 * parser.c (cp_parser_binary_expression): Add no_toplevel_fold_p
2170 argument. If it is set, don't build the toplevel expression with
2171 build_x_binary_op, but build2.
2172 (cp_parser_assignment_expression, cp_parser_omp_for_incr): Adjust
2173 callers.
2174 (cp_parser_omp_for_cond): Don't assume the first operand of the
2175 comparison must be decl.
2176
2177 2009-03-23 Jason Merrill <jason@redhat.com>
2178
2179 PR c++/37729
2180 * pt.c (make_fnparm_pack): Split out from...
2181 (instantiate_decl): ...here.
2182 (tsubst_pack_expansion): Handle being called in a late-specified
2183 return type.
2184
2185 PR c++/39526
2186 * name-lookup.c (pushdecl_maybe_friend): Don't warn about shadowing
2187 a parm with a parm.
2188
2189 2009-03-20 Jason Merrill <jason@redhat.com>
2190
2191 PR c++/28879
2192 * parser.c (cp_parser_direct_declarator): In a template, wrap
2193 non-constant expression in NOP_EXPR with TREE_SIDE_EFFECTS set.
2194 * pt.c (tsubst): Preserve it in a partial instantiation.
2195 (dependent_type_p_r): Don't check value_dependent_expression_p.
2196 * decl.c (compute_array_index_type): Don't check
2197 value_dependent_expression_p if TREE_SIDE_EFFECTS.
2198
2199 C++ core issue 703
2200 * typeck2.c (check_narrowing): Don't complain about loss of
2201 precision when converting a floating-point constant.
2202
2203 2009-03-19 Jakub Jelinek <jakub@redhat.com>
2204
2205 PR c/39495
2206 * parser.c (cp_parser_omp_for_cond): Don't check lhs if decl is NULL.
2207 (cp_parser_omp_for_loop): Always use cp_parser_omp_for_cond.
2208
2209 2009-03-18 Jakub Jelinek <jakub@redhat.com>
2210
2211 * parser.c (struct cp_token): Reorder fields for 64-bit hosts.
2212 (eof_token): Adjust.
2213
2214 2009-03-18 H.J. Lu <hongjiu.lu@intel.com>
2215
2216 PR c++/39425
2217 * parser.c (cp_parser_explicit_specialization): Don't skip the
2218 rest of the specialization when begin_specialization returns
2219 false.
2220
2221 2009-03-17 Jason Merrill <jason@redhat.com>
2222
2223 * decl.c (grokfndecl): Set DECL_CONTEXT on parms.
2224 (duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms.
2225 * pt.c (check_explicit_specialization): Likewise.
2226 (tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a
2227 local specialization.
2228 * tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name.
2229 * decl2.c (parm_index): New fn.
2230 * semantics.c (finish_decltype_type): Don't use describable_type.
2231 * mangle.c (write_expression): Likewise. Mangle ALIGNOF_EXPR.
2232 Give a sorry for unsupported codes rather than crash. Mangle
2233 conversions with other than 1 operand. New mangling for PARM_DECL.
2234 * operators.def (ALIGNOF_EXPR): Mangle as "az".
2235
2236 2009-03-17 Jing Yu <jingyu@google.com>
2237
2238 PR middle-end/39378
2239 * method.c (use_thunk): Change is_thunk from crtl to cfun.
2240
2241 2009-03-17 Paolo Carlini <paolo.carlini@oracle.com>
2242
2243 PR c++/39475
2244 * semantics.c (check_trait_type): New.
2245 (finish_trait_expr): Use it.
2246
2247 2009-03-17 Jakub Jelinek <jakub@redhat.com>
2248
2249 * name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
2250 instead of calling imported_module_or_decl debug hook if
2251 building_stmt_tree ().
2252 * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
2253 is a NAMESPACE_DECL.
2254
2255 PR debug/37890
2256 * name-lookup.c (do_namespace_alias): Don't call global_decl debug
2257 hook at function scope.
2258
2259 PR debug/39471
2260 * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
2261 on IMPORTED_DECL.
2262
2263 2009-03-09 Jakub Jelinek <jakub@redhat.com>
2264
2265 PR c++/39371
2266 * semantics.c (finish_switch_cond): Don't call get_unwidened.
2267 * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
2268 instead of TREE_TYPE (cond).
2269
2270 2009-03-08 H.J. Lu <hongjiu.lu@intel.com>
2271
2272 PR c++/39060
2273 * parser.c (cp_parser_late_parsing_default_args): Continue
2274 the loop when cp_parser_assignment_expression returns
2275 error_mark_node.
2276
2277 2009-03-07 Jason Merrill <jason@redhat.com>
2278
2279 PR c++/39367
2280 * init.c (build_new_1): Don't use a VLA type.
2281 (build_vec_init): Handle getting a pointer for BASE.
2282
2283 2009-03-06 H.J. Lu <hongjiu.lu@intel.com>
2284
2285 PR c++/37520
2286 * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
2287 when mangling symbols.
2288
2289 2009-03-06 Paolo Carlini <paolo.carlini@oracle.com>
2290
2291 PR c++/33492
2292 * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
2293
2294 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
2295
2296 * decl.c (record_builtin_java_type): Use canonicalized integer
2297 types.
2298
2299 2009-03-04 Jason Merrill <jason@redhat.com>
2300
2301 PR c++/38908
2302 * class.c (is_really_empty_class): New fn.
2303 * cp-tree.h: Declare it.
2304 * cp-objcp-common.c (cp_expr_size): Use it.
2305
2306 PR c++/13549
2307 * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
2308 * parser.c (cp_parser_postfix_expression): Call it for
2309 TEMPLATE_ID_EXPR.
2310 * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
2311 (get_first_fn): Likewise.
2312
2313 PR c++/9634
2314 PR c++/29469
2315 PR c++/29607
2316 Implement DR 224.
2317 * decl.c (make_typename_type): Do look inside currently open classes.
2318 * parser.c (cp_parser_lookup_name): Likewise.
2319 (cp_parser_template_name): Likewise.
2320 * pt.c (dependent_scope_p): New function.
2321 * cp-tree.h: Declare it.
2322 * class.c (currently_open_class): Return fast if T isn't a class.
2323
2324 2009-02-26 H.J. Lu <hongjiu.lu@intel.com>
2325
2326 PR c++/37789
2327 * parser.c (cp_parser_mem_initializer): Return error_mark_node
2328 if cp_parser_mem_initializer_id returns error_mark_node.
2329
2330 2009-02-24 Richard Guenther <rguenther@suse.de>
2331
2332 PR c++/39242
2333 * pt.c (instantiate_decl): Do not instantiate extern, non-inline
2334 declared functions.
2335
2336 2009-02-23 H.J. Lu <hongjiu.lu@intel.com>
2337
2338 PR c++/36411
2339 * pt.c (coerce_template_template_parms): Return 0 if parameter
2340 is error_mark_node.
2341
2342 2009-02-23 Jason Merrill <jason@redhat.com>
2343
2344 * pt.c (unify): Call maybe_adjust_types_for_deduction when
2345 deducing from an initializer list.
2346
2347 2009-02-20 Jason Merrill <jason@redhat.com>
2348
2349 PR c++/39225
2350 * decl.c (grokdeclarator): Handle ~identifier.
2351
2352 2009-02-19 Jakub Jelinek <jakub@redhat.com>
2353
2354 PR target/39175
2355 * decl2.c (determine_visibility): If visibility changed and
2356 DECL_RTL has been already set, call make_decl_rtl to update symbol
2357 flags.
2358
2359 2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
2360
2361 PR c++/39188
2362 * cp-tree.h (maybe_commonize_var): New.
2363
2364 * decl.c (maybe_commonize_var): Make it extern.
2365
2366 * decl2.c (finish_anon_union): Call maybe_commonize_var.
2367
2368 2009-02-18 H.J. Lu <hongjiu.lu@intel.com>
2369
2370 PR c++/39219
2371 * parser.c (cp_parser_enum_specifier): Apply all attributes.
2372
2373 2009-02-18 Jason Merrill <jason@redhat.com>
2374
2375 * cfns.h: Tweak pathname for cfns.gperf.
2376
2377 2009-02-13 Jason Merrill <jason@redhat.com>
2378
2379 PR c++/39070
2380 * semantics.c (finish_call_expr): Change koenig_p parm to int.
2381 If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
2382 * cp-tree.h: Adjust prototype.
2383 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
2384
2385 2009-02-12 Jason Merrill <jason@redhat.com>
2386
2387 PR c++/38950
2388 * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
2389
2390 2009-02-11 Jason Merrill <jason@redhat.com>
2391
2392 PR c++/39153
2393 * decl2.c (cp_write_global_declarations):
2394 Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
2395
2396 PR c++/30111
2397 * init.c (build_value_init_noctor): Split out from...
2398 (build_value_init): ...here.
2399 (expand_aggr_init_1): Handle value-initialization.
2400 * cp-tree.h: Add declaration.
2401 * class.c (type_has_user_provided_constructor):
2402 Handle non-class arguments.
2403
2404 2009-02-10 Jason Merrill <jason@redhat.com>
2405
2406 PR c++/38649
2407 * class.c (defaultable_fn_p): Handle ... properly.
2408
2409 PR c++/36744
2410 * tree.c (lvalue_p_1): Condition rvalue ref handling on
2411 treat_class_rvalues_as_lvalues, too.
2412
2413 2009-02-10 Paolo Carlini <paolo.carlini@oracle.com>
2414
2415 PR c++/34397
2416 * typeck.c (build_x_array_ref): New.
2417 * cp-tree.h: Declare it.
2418 * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
2419
2420 2009-02-09 Jason Merrill <jason@redhat.com>
2421
2422 PR c++/39109
2423 * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
2424 * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
2425 * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
2426 * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
2427 for build_value_init TARGET_EXPR.
2428 * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
2429
2430 2009-02-06 Paolo Carlini <paolo.carlini@oracle.com>
2431
2432 PR c++/35147
2433 PR c++/37737
2434 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
2435
2436 2009-02-04 Jakub Jelinek <jakub@redhat.com>
2437
2438 PR c++/39095
2439 * operators.def: Use COMPONENT_REF code for ->/pt operator again,
2440 remove ./dt operator.
2441 * mangle.c (write_expression): Handle COMPONENT_REF after handling
2442 ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
2443 write_string ("dt") instead of using operators.def.
2444
2445 2009-02-03 Jason Merrill <jason@redhat.com>
2446
2447 * typeck.c (cp_build_unary_op): Only complain about taking address
2448 of main if pedantic.
2449
2450 2009-02-03 Jakub Jelinek <jakub@redhat.com>
2451
2452 PR inline-asm/39059
2453 * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
2454
2455 PR c++/39056
2456 * typeck2.c (digest_init_r): Don't call process_init_constructor
2457 for COMPLEX_TYPE.
2458
2459 2009-02-03 Paolo Bonzini <bonzini@gnu.org>
2460
2461 PR c++/36897
2462 * pt.c (convert_nontype_argument_function): Expect expr to be an
2463 ADDR_EXPR.
2464
2465 PR c++/37314
2466 * typeck.c (merge_types): Call resolve_typename_type if only
2467 one type is a typename.
2468
2469 2009-02-02 Jason Merrill <jason@redhat.com>
2470
2471 PR c++/39054
2472 * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node
2473 in BIT_NOT_EXPR.
2474
2475 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
2476
2477 PR c++/39053
2478 * parser.c (cp_parser_pure_specifier): If there are no tokens left
2479 do not call cp_lexer_consume_token.
2480
2481 2009-01-30 Jakub Jelinek <jakub@redhat.com>
2482
2483 PR c++/39028
2484 * parser.c (cp_parser_already_scoped_statement): Handle __label__
2485 declarations.
2486
2487 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
2488
2489 PR c++/33465
2490 * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
2491
2492 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
2493
2494 PR c++/38655
2495 * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
2496
2497 2009-01-29 Paolo Carlini <paolo.carlini@oracle.com>
2498
2499 * typeck.c (invalid_nonstatic_memfn_p): Use
2500 DECL_NONSTATIC_MEMBER_FUNCTION_P.
2501
2502 2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
2503
2504 PR c++/37554
2505 * call.c (build_over_call): If convert_for_arg_passing returns
2506 error_mark_node unconditionally return it.
2507
2508 2009-01-22 Adam Nemet <anemet@caviumnetworks.com>
2509
2510 * class.c (check_field_decls): Also inherit packed for bitfields
2511 regardless of their type.
2512
2513 2009-01-22 Dodji Seketeli <dodji@redhat.com>
2514
2515 PR c++/38930
2516 * decl2.c (grokfield): Reverting changes of PR c++/26693
2517 (save_template_attributes): Likewise.
2518 * decl.c (grokdeclarator): Likewise.
2519 * name-lookup.c (pushdecl_maybe_friend): Likewise.
2520 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
2521 (append_type_to_template_for_access_check): Likewise.
2522 * semantics.c (check_accessibility_of_qualified_id): Likewise.
2523 * pt.c (instantiate_class_template, instantiate_template ): Likewise.
2524 (tsubst): Likewise.
2525 (resolve_type_name_type): Likewise.
2526 (append_type_to_template_for_access_check): Likewise.
2527
2528 2009-01-21 Dodji Seketeli <dodji@redhat.com>
2529
2530 PR c++/26693
2531 * decl2.c (grokfield): when a typedef appears in a
2532 class, create the typedef variant type node for it.
2533 (save_template_attributes): Creating typedef variant type node
2534 here is now useless.
2535 * decl.c (grokdeclarator): If the typedef'ed struct/class was
2536 anonymous, set the proper type name to all its type variants.
2537 * name-lookup.c (pushdecl_maybe_friend): Reuse the
2538 set_underlying_type function to install typedef variant types.
2539 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
2540 macro.
2541 (append_type_to_template_for_access_check): New entry points.
2542 * semantics.c (check_accessibility_of_qualified_id):
2543 When a typedef that is a member of a class appears in a template,
2544 add it to the template. It will be ...
2545 * pt.c (instantiate_class_template, instantiate_template ): ... access
2546 checked at template instantiation time.
2547 (tsubst): Handle the case of being called with NULL args.
2548 (resolve_type_name_type): The type name should be the name of the
2549 main type variant.
2550 (append_type_to_template_for_access_check): New entry point.
2551
2552 2009-01-19 Jason Merrill <jason@redhat.com>
2553
2554 PR c++/23287
2555 * parser.c (cp_parser_unqualified_id): In a template,
2556 accept ~identifier.
2557 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
2558
2559 2009-01-16 Jason Merrill <jason@redhat.com>
2560
2561 PR c++/38877
2562 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
2563 * init.c (build_new): Don't call describable_type unless we
2564 have an auto.
2565
2566 PR c++/29470
2567 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
2568
2569 PR c++/38579
2570 * search.c (protected_accessible_p): N doesn't vary.
2571
2572 2009-01-15 Jason Merrill <jason@redhat.com>
2573
2574 PR c++/38850
2575 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
2576 accept hidden friends.
2577
2578 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
2579
2580 PR C++/29388
2581 * decl.c (grokdeclarator): Check for a non namespace/class context.
2582
2583 2009-01-15 Jason Merrill <jason@redhat.com>
2584
2585 PR c++/36334
2586 PR c++/37646
2587 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
2588 a function isn't necessarily an lvalue. Take tree, not const_tree.
2589 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
2590 * typeck.c (lvalue_or_else): Likewise.
2591 * cp-tree.h: Adjust prototypes.
2592
2593 2009-01-15 Steve Ellcey <sje@cup.hp.com>
2594
2595 PR c++/38357
2596 * pt.c (tsubst): Check for NULL args.
2597
2598 2009-01-15 Dodji Seketeli <dodji@redhat.com>
2599
2600 PR c++/38636
2601 * name-lookup.c (pushtag): Don't create members to types that are not
2602 being created.
2603
2604 2009-01-14 Nick Clifton <nickc@redhat.com>
2605
2606 PR c++/37862
2607 * parser.c: Pass cp_id_kind computed in
2608 cp_parser_postfix_dot_deref_expression to
2609 cp_parser_primary_expression.
2610
2611 2009-01-13 Jakub Jelinek <jakub@redhat.com>
2612
2613 PR c++/38795
2614 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
2615 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
2616 as CAST_EXPR.
2617
2618 2009-01-12 Jason Merrill <jason@redhat.com>
2619 Steve Ellcey <sje@cup.hp.com>
2620
2621 PR c++/35109
2622 * name-lookup.c (lookup_name_real): Keep looking past a hidden
2623 binding.
2624
2625 2009-01-12 Dodji Seketeli <dodji@redhat.com>
2626
2627 PR c++/36019
2628 * pt.c (parameter_of_template_p): New function.
2629 * cp-tree.h: Declare it.
2630 * name-lookup.c (binding_to_template_parms_of_scope_p): New
2631 function.
2632 (outer_binding): Take template parameters in account when looking for
2633 a name binding.
2634
2635 2009-01-12 Jason Merrill <jason@redhat.com>
2636
2637 PR c++/31488
2638 * tree.c (pod_type_p): Return 1 for structs created by the back end.
2639
2640 2009-01-12 Jakub Jelinek <jakub@redhat.com>
2641
2642 PR c/32041
2643 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
2644 offsetof member-designator, handle it as `[0].'.
2645
2646 PR c++/38794
2647 * decl.c (start_function): If grokdeclarator hasn't returned
2648 FUNCTION_DECL nor error_mark_node, issue diagnostics.
2649
2650 2009-01-11 Jakub Jelinek <jakub@redhat.com>
2651
2652 PR c++/36254
2653 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
2654 (gimplify_if_stmt): ... this.
2655 (cp_gimplify_expr): Don't handle IF_STMT here.
2656 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
2657
2658 2009-01-10 Andrew Pinski <pinskia@gmail.com>
2659
2660 PR c++/38648
2661 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
2662
2663 PR c++/36695
2664 * typeck2.c (build_functional_cast): Check for reference type and NULL
2665 PARMS.
2666
2667 2009-01-09 Steve Ellcey <sje@cup.hp.com>
2668
2669 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
2670
2671 2009-01-09 Jakub Jelinek <jakub@redhat.com>
2672
2673 PR c++/35335
2674 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
2675
2676 2009-01-09 John F. Carr <jfc@mit.edu>
2677
2678 PR c++/37877
2679 * parser.c (cp_parser_class_specifier): Clear
2680 parser->in_unbraced_linkage_specification_p while parsing class
2681 specifiers.
2682
2683 2009-01-07 Jakub Jelinek <jakub@redhat.com>
2684
2685 PR c++/38725
2686 * semantics.c (finish_goto_stmt): Convert destination to
2687 void *.
2688
2689 2009-01-06 Jason Merrill <jason@redhat.com>
2690
2691 PR c++/35297
2692 PR c++/35477
2693 PR c++/35784
2694 PR c++/36846
2695 PR c++/38276
2696 * pt.c (check_default_tmpl_args): Don't complain about
2697 out-of-order parameter packs in the enclosing class
2698 or parameter packs after default args.
2699 (coerce_template_parms): If we have more than one
2700 parameter pack, don't flatten argument packs.
2701 (template_args_equal): Handle argument packs.
2702 (comp_template_args): Don't flatten argument packs.
2703 (check_instantiated_arg): Split out from...
2704 (check_instantiated_args): Here. Handle arg packs.
2705 (convert_template_argument): Just check that nontype argument
2706 packs have the right type.
2707
2708 2009-01-05 Dodji Seketeli <dodji@redhat.com>
2709
2710 PR c++/38472
2711 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
2712
2713 2009-01-05 Jason Merrill <jason@redhat.com>
2714
2715 PR c++/38698
2716 * typeck2.c (process_init_constructor_union): Handle union with
2717 no fields.
2718
2719 * mangle.c (write_expression): Remove mangling for zero-operand
2720 casts.
2721
2722 PR c++/38701
2723 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
2724 defaulting.
2725
2726 PR c++/38702
2727 * class.c (defaultable_fn_p): Only operator== can be a copy
2728 assignment operator.
2729
2730 2009-01-02 Jason Merrill <jason@redhat.com>
2731
2732 PR c++/38698
2733 * typeck2.c (process_init_constructor_union): Handle excess
2734 initializers.
2735 (process_init_constructor_record): Likewise.
2736
2737 PR c++/38684
2738 * typeck2.c (digest_init_r): Don't use process_init_constructor
2739 for non-aggregate classes.
2740
2741 \f
2742 Copyright (C) 2009 Free Software Foundation, Inc.
2743
2744 Copying and distribution of this file, with or without modification,
2745 are permitted in any medium without royalty provided the copyright
2746 notice and this notice are preserved.