]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/cp/ChangeLog
re PR c/36892 (Support __attribute__((deprecated("text string"))))
[thirdparty/gcc.git] / gcc / cp / ChangeLog
1 2009-05-08 H.J. Lu <hongjiu.lu@intel.com>
2
3 PR c/36892
4 * call.c (build_call_a): Updated warn_deprecated_use call.
5 (build_over_call): Likewise.
6 * decl.c (grokdeclarator): Likewise.
7 (grokparms): Likewise.
8 * semantics.c (finish_id_expression): Likewise.
9 * typeck.c (build_class_member_access_expr): Likewise.
10 (finish_class_member_access_expr): Likewise.
11
12 2009-05-06 Dodji Seketeli <dodji@redhat.com>
13
14 PR c++/17395
15 * pt.c (tsubst_copy) <case PARM_DECL>: We don't want to tsubst the
16 whole list of PARM_DECLs, just the current one.
17
18 2009-05-05 Shujing Zhao <pearly.zhao@oracle.com>
19
20 * cp-tree.h:
21 (opname_tab, assignop_tab, update_member_visibility, yyerror, yyhook,
22 mangle_compound_literal): Remove unused declarations.
23 (build_vfield_ref, cxx_print_statistics, clone_function_decl,
24 adjust_clone_args, maybe_push_cleanup_level, pushtag, make_anon_name,
25 pushdecl_top_level_maybe_friend, pushdecl_top_level_and_finish,
26 check_for_out_of_scope_variable, print_other_binding_stack,
27 maybe_push_decl, cxx_mark_addressable, force_target_expr,
28 build_target_expr_with_type, finish_case_label,
29 cxx_maybe_build_cleanup, begin_eh_spec_block, finish_eh_spec_block,
30 check_template_keyword, cxx_omp_predetermined_sharing,
31 cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
32 cxx_omp_clause_assign_op, cxx_omp_clause_dtor, cxx_omp_finish_clause,
33 cxx_omp_privatize_by_reference): Rearrange the declarations line to
34 match the comment that indicates the .c file which the functions are
35 defined.
36 (cxx_print_xnode, cxx_print_decl, cxx_print_type,
37 cxx_print_identifier, cxx_print_error_function, pushdecl): Add comment.
38
39 2009-05-05 Nathan Sidwell <nathan@codesourcery.com>
40
41 * typeck.c (cp_build_compound_expr): Require RHS to have a known
42 type.
43 * class.c (resolve_address_of_overloaded_function): Use
44 OVL_CURRENT for error message.
45 (instantiate_type): Forbid COMPOUND_EXPRs and remove code dealing
46 with them. Do not copy the node.
47
48 2009-05-05 Jakub Jelinek <jakub@redhat.com>
49
50 PR c++/40013
51 * pt.c (tsubst): If magic NOP_EXPR with side-effects has no type,
52 set it from its operand's type after tsubst_expr.
53
54 2009-05-04 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
55
56 PR c++/28152
57 * parser.c (cp_lexer_get_preprocessor_token): Do not store the
58 canonical spelling for keywords.
59 (cp_parser_attribute_list): Use the canonical spelling for
60 keywords in attributes.
61
62 2009-05-01 Joseph Myers <joseph@codesourcery.com>
63
64 * cxx-pretty-print.c (is_destructor_name, pp_cxx_unqualified_id,
65 pp_cxx_template_keyword_if_needed, pp_cxx_postfix_expression,
66 pp_cxx_new_expression, pp_cxx_delete_expression,
67 pp_cxx_unary_expression, pp_cxx_assignment_operator,
68 pp_cxx_assignment_expression, pp_cxx_expression,
69 pp_cxx_function_specifier, pp_cxx_decl_specifier_seq,
70 pp_cxx_simple_type_specifier, pp_cxx_type_specifier_seq,
71 pp_cxx_exception_specification, pp_cxx_direct_declarator,
72 pp_cxx_ctor_initializer, pp_cxx_type_id, pp_cxx_statement,
73 pp_cxx_namespace_alias_definition, pp_cxx_template_parameter,
74 pp_cxx_canonical_template_parameter, pp_cxx_template_declaration,
75 pp_cxx_declaration, pp_cxx_typeid_expression,
76 pp_cxx_va_arg_expression, pp_cxx_offsetof_expression,
77 pp_cxx_trait_expression): Mostly use pp_string and
78 pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
79 for non-identifiers. Mark English strings for translation.
80 * cxx-pretty-print.h (pp_cxx_ws_string): Define.
81 * error.c (dump_template_parameter, dump_template_bindings,
82 dump_type, dump_aggr_type, dump_type_prefix, dump_simple_decl,
83 dump_decl, dump_template_decl, dump_function_decl,
84 dump_parameters, dump_exception_spec, dump_template_parms,
85 dump_expr, dump_binary_op, dump_unary_op, op_to_string,
86 assop_to_string, args_to_string, cp_print_error_function,
87 print_instantiation_full_context,
88 print_instantiation_partial_context): Mostly use pp_string and
89 pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
90 for non-identifiers. Mark English strings for translation.
91 (dump_global_iord): Mark strings for translation; use longer
92 strings instead of substituting single words.
93 (function_category): Return a format string marked for
94 translation, not a single word or phrase to substitute in a longer
95 phrase.
96
97 2009-04-28 Ben Elliston <bje@au.ibm.com>
98
99 PR c++/35652
100 Revert:
101
102 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
103
104 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
105
106 2009-04-27 Ian Lance Taylor <iant@google.com>
107
108 * semantics.c (finish_omp_clauses): Change type of c_kind to enum
109 omp_clause_code.
110
111 2009-04-27 Jakub Jelinek <jakub@redhat.com>
112
113 PR c++/39875
114 * cvt.c (convert_to_void) <case INDIRECT_REF>: Only warn about
115 -Wunused-value if implicit.
116
117 2009-04-24 Ian Lance Taylor <iant@google.com>
118
119 * call.c (build_temp): Change 0 to enum constant.
120 * cp-tree.h (cp_lvalue_kind): Typedef to int rather than enum
121 type.
122 * cp-gimplify.c (cp_gimplify_expr): Add cast to enum type.
123 * decl2.c (constrain_visibility): Likewise.
124 * parser.c (cp_lexer_get_preprocessor_token): Likewise.
125 (cp_parser_flags): Typedef to int rather than enum type.
126 (cp_parser_expression_stack_entry): Change prec field to enum
127 cp_parser_prec.
128
129 * typeck.c (build_modify_expr): Add lhs_origtype parameter.
130 Change all callers.
131
132 2009-04-22 Dodji Seketeli <dodji@redhat.com>
133
134 PR c++/39639
135 * parser.c (cp_parser_template_argument_list): Display an error
136 when an ellipsis is not preceded by a parameter pack. Also, warn
137 about variadic templates usage without -std=c++0x.
138
139 2009-04-21 Taras Glek <tglek@mozilla.com>
140
141 * cp-tree.h: Update GTY annotations to new syntax.
142 * decl.c: Likewise.
143 * mangle.c: Likewise.
144 * name-lookup.c: Likewise.
145 * name-lookup.h: Likewise.
146 * parser.c: Likewise.
147 * pt.c: Likewise.
148 * rtti.c: Likewise.
149 * semantics.c: Likewise.
150 * typeck2.c: Likewise.
151
152 2009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
153
154 PR c++/14875
155 * parser.c (cp_parser_error): Pass token->flags to c_parse_error.
156
157 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
158
159 PR c++/35711
160 * typeck.c (check_for_casting_away_constness): We diagnose casting
161 away any qualifiers not just constness.
162 (casts_away_constness): Mention that it handles more than just
163 constness.
164
165 2009-04-21 Joseph Myers <joseph@codesourcery.com>
166
167 * ChangeLog, ChangeLog-1993, ChangeLog-1994, ChangeLog-1995,
168 ChangeLog-1996, ChangeLog-1997, ChangeLog-1998, ChangeLog-1999,
169 ChangeLog-2000, ChangeLog-2001, ChangeLog-2002, ChangeLog-2003,
170 ChangeLog-2004, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
171 ChangeLog-2008, ChangeLog.ptr, ChangeLog.tree-ssa, NEWS,
172 cfns.gperf: Add copyright and license notices.
173 * cfns.h: Regenerate.
174 * ChangeLog, ChangeLog-2004: Correct dates.
175
176 2009-04-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
177
178 PR 16202
179 * tree.c (lvalue_p_1): Use const_tree.
180 Use CONST_CAST_TREE to avoid warning.
181 (lvalue_p): Returns bool, receives const_tree.
182
183 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
184
185 PR c++/13358
186 * parser.c (cp_parser_check_decl_spec): Drop redundant flags.
187 * error.c (pedwarn_cxx98): New.
188 * cp-tree.h (pedwarn_cxx98): Declare.
189
190 2009-04-20 Le-Chun Wu <lcwu@google.com>
191
192 PR c++/39803
193 * init.c (build_vec_init): Set TREE_NO_WARNING on the
194 compiler-generated INDIRECT_REF expression.
195
196 2009-04-20 Ian Lance Taylor <iant@google.com>
197
198 * typeck.c (build_function_call_vec): New function.
199 (cp_build_function_call): Only pass first parameter to
200 objc_rewrite_function_call.
201 (build_modify_expr): Add rhs_origtype parameter. Change all
202 callers.
203 * decl.c (finish_decl): Add origtype parameter. Change all
204 callers.
205 * semantics.c (finish_call_expr): Pass VEC to
206 resolve_overloaded_builtin.
207
208 2009-04-20 Ian Lance Taylor <iant@google.com>
209
210 * cp-tree.h (base_access): Change typedef to int.
211 * parser.c (cp_parser_omp_flush): Change 0 to OMP_CLAUSE_ERROR.
212 (cp_parser_omp_threadprivate): Likewise.
213 * pt.c (unify_pack_expansion): Add casts to enum type.
214
215 2009-04-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
216
217 PR c/32061
218 PR c++/36954
219 * call.c (build_new_op): Save the original codes of operands
220 before folding.
221
222 2009-04-18 Kazu Hirata <kazu@codesourcery.com>
223
224 * cp-tree.h: Remove the prototype for insert_block.
225 * decl.c (insert_block): Remove.
226
227 2009-04-16 Ian Lance Taylor <iant@google.com>
228
229 * cp-tree.h (enum tsubst_flags): Rename from enum tsubst_flags_t.
230 (tsubst_flags_t): Change typedef from enum type to int.
231
232 2009-04-16 Paolo Bonzini <bonzini@gnu.org>
233
234 * decl.c (check_initializer): Use TYPE_VECTOR_OPAQUE
235 instead of targetm.vector_opaque_p.
236
237 2009-04-15 Le-Chun Wu <lcwu@google.com>
238
239 PR c++/39551
240 * call.c (build_over_call): Set TREE_NO_WARNING on the
241 compiler-generated INDIRECT_REF expression.
242 * cvt.c (convert_to_void): Emit warning when stripping off
243 INDIRECT_REF.
244
245 2009-04-14 Diego Novillo <dnovillo@google.com>
246
247 * parser.c (cp_parser_type_specifier_seq): Move call to
248 invoke_plugin_callbacks ...
249 (cp_parser_type_specifier_seq): ... here.
250
251 2009-04-14 Le-Chun Wu <lcwu@google.com>
252
253 * Make-lang.in: Modify dependencies of files including plugin.h.
254 * decl.c (finish_function): Call invoke_plugin_callbacks.
255 * parser.c (cp_parser_type_specifier): Call invoke_plugin_callbacks.
256
257 2009-04-14 Jason Merrill <jason@redhat.com>
258
259 PR c++/39763
260 * name-lookup.c (pushdecl_maybe_friend): Avoid all warnings
261 about shadowing by tentative parms.
262
263 2009-04-13 Jason Merrill <jason@redhat.com>
264
265 PR c++/39480
266 * call.c (build_over_call): Don't call memcpy if the target is
267 the same as the source.
268
269 2009-04-13 Jason Merrill <jason@redhat.com>
270
271 PR c++/39750
272 * pt.c (uses_template_parms): Handle CONSTRUCTOR.
273
274 2009-04-12 Jason Merrill <jason@redhat.com>
275
276 PR c++/39742
277 * call.c (joust): Don't crash on variadic fn.
278
279 2009-04-10 Jason Merrill <jason@redhat.com>
280
281 PR c++/28301
282 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Return
283 if we see a close brace without an open brace.
284
285 2009-04-10 H.J. Lu <hongjiu.lu@intel.com>
286
287 * parser.c (cp_parser_class_specifier): Remove the unused
288 has_trailing_semicolon.
289
290 2009-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
291
292 PR c++/20118
293 * parser.c (cp_parser_check_template_parameters): Take a
294 cp_declarator parameter.
295 (cp_parser_elaborated_type_specifier): Update to
296 cp_parser_check_template_parameters.
297 (cp_parser_class_head): Likewise.
298 (cp_parser_check_declarator_template_parameters): Likewise.
299 (cp_parser_check_template_parameters): Handle first the non-error
300 conditions. Give more accurate diagnostics if a declarator is
301 given.
302
303 2009-04-08 Jason Merrill <jason@redhat.com>
304
305 PR c++/25185
306 * error.c (dump_aggr_type): Chase template typedefs if
307 -fno-pretty-templates.
308
309 2009-04-08 Dodji Seketeli <dodji@redhat.com>
310
311 PR c++/39637
312 * parser.c (cp_parser_enumerator_definition): Make sure the
313 initializer of the enumerator doesn't contain any bare parameter pack.
314
315 2009-04-07 Jason Merrill <jason@redhat.com>
316
317 PR c++/34691
318 * name-lookup.c (merge_functions): Keep multiple extern "C" functions.
319 * call.c (joust): Complain about mismatched default arguments
320 in extern "C" functions.
321 * class.c (resolve_address_of_overloaded_function): Handle multiple
322 extern "C" functions.
323 * pt.c (resolve_overloaded_unification): Likewise.
324
325 2009-04-07 Jason Merrill <jason@redhat.com>
326
327 PR c++/25185
328 * error.c (dump_function_decl): Don't pretty-print templates
329 if -fno-pretty-templates.
330 (count_non_default_template_args): Print all args if
331 -fno-pretty-templates.
332
333 2009-04-06 Jason Merrill <jason@redhat.com>
334
335 PR c++/35146
336 * pt.c (fn_type_unification): For DEDUCE_EXACT check that
337 the deduced template arguments give us the parameter types
338 we're looking for.
339
340 2009-04-05 Giovanni Bajo <giovannibajo@libero.it>
341 Jason Merrill <jason@redhat.com>
342
343 PR c++/14912
344 * error.c (count_non_default_template_args): New fn.
345 (dump_template_parms): Call it.
346 (dump_template_argument_list): Call it. Add parms parm.
347 (dump_template_argument): Adjust call to dump_template_argument_list.
348 (dump_type, dump_decl): Likewise.
349 (dump_template_bindings): Refactor logic.
350
351 2009-04-03 Jason Merrill <jason@redhat.com>
352
353 PR c++/25185
354 * error.c (dump_template_bindings): Look through typedefs in
355 typename results.
356 (dump_type) [TYPENAME_TYPE]: Print the typedef name if any.
357 (find_typenames_r): Also collect typedefs.
358 * pt.c (unify): Strip typedefs.
359
360 PR c++/39608
361 * semantics.c (finish_id_expression): Don't assume a dependent
362 member of the current instantiation isn't a valid integral
363 constant expression. Check dependent_scope_p.
364 * pt.c (dependent_scope_p): Check TYPE_P.
365 (tsubst_copy): If args is null, just return.
366
367 2009-04-02 Jason Merrill <jason@redhat.com>
368
369 PR c++/25185
370 * error.c (find_typenames, find_typenames_r): New fns.
371 (dump_function_decl): Call find_typenames.
372 (dump_template_bindings): Print typenames as well.
373 * pt.c (tsubst): Non-static.
374 * cp-tree.h: Declare it.
375
376 2009-04-02 Dodji Seketeli <dodji@redhat.com>
377
378 PR c++/26693
379 * decl2.c (grokfield): when a typedef appears in a
380 class, create the typedef variant type node for it.
381 (save_template_attributes): Creating typedef variant type node
382 here is now useless.
383 * decl.c (grokdeclarator): If the typedef'ed struct/class was
384 anonymous, set the proper type name to all its type variants.
385 (xref_basetypes) : Fixup the variant types after setting
386 TYPE_BINFO on REF.
387 * name-lookup.c (pushdecl_maybe_friend): Reuse the
388 set_underlying_type function to install typedef variant types.
389 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
390 macro.
391 (append_type_to_template_for_access_check): New entry points.
392 * semantics.c (check_accessibility_of_qualified_id):
393 When a typedef that is a member of a class appears in a template,
394 add it to the template. It will be ...
395 * class.c (finish_struct_bits): Split type variant fixup into ...
396 (fixup_type_variants): A new entry point.
397 * pt.c (instantiate_class_template, instantiate_template ): ... access
398 checked at template instantiation time.
399 (resolve_type_name_type): The type name should be the name of the
400 main type variant.
401 (retrieve_specialization): Specializations of template typedefs aren't
402 to looked up in DECL_TEMPLATE_INSTANTIATIONS (tmpl).
403 (append_type_to_template_for_access_check): New entry point.
404 (tsubst_decl): For typedefs, build the variant type from the correct
405 original type.
406 (get_class_bindings): Fix function comment.
407 (perform_typedefs_access_check): New entry point.
408
409 2009-03-31 Jason Merrill <jason@redhat.com>
410
411 PR c++/34691
412 * name-lookup.c (pushdecl_maybe_friend): Diagnose mismatched
413 extern "C" declarations.
414
415 C++ DR 613
416 * semantics.c (finish_non_static_data_member): Allow such references
417 without an associated object in sizeof/decltype/alignof.
418
419 * ptree.c (cxx_print_decl): Pretty-print full name of
420 function/template.
421 (cxx_print_type): Pretty-print full name of class.
422
423 * decl.c (grokdeclarator): Reject pointer to qualified function
424 type.
425
426 PR c++/37806, core issue 547
427 * typeck.c (cp_apply_type_quals_to_decl): Don't apply any quals
428 to a typedef.
429 * tree.c (cp_build_qualified_type_real): Don't apply restrict to a
430 function type.
431 * decl.h (enum decl_context): Add TEMPLATE_TYPE_ARG.
432 * decl.c (groktypename): Add is_template_arg parameter.
433 (grokdeclarator): Allow function cv-quals on a template type arg.
434 * parser.c (cp_parser_new_type_id, cp_parser_type_id): Add
435 is_template_arg argument in calls to groktypename.
436 * cp-tree.h: Adjust prototype.
437 * error.c (dump_type_prefix, dump_type_suffix): Fix plain
438 FUNCTION_TYPE printing.
439
440 * mangle.c (write_expression): Mangle dependent name as
441 source-name.
442
443 PR c++/38030, 38850, 39070
444 * pt.c (type_dependent_expression_p_push): New fn.
445 (tsubst_copy_and_build) [CALL_EXPR]: Only do arg-dep lookup when the
446 substitution makes the call non-dependent. Preserve koenig_p.
447 * parser.c (cp_parser_postfix_expression): Only do arg-dep lookup
448 for non-dependent calls.
449 * semantics.c (finish_call_expr): Revert earlier changes.
450 * cp-tree.h: Revert change to finish_call_expr prototype.
451
452 2009-03-29 Joseph Myers <joseph@codesourcery.com>
453
454 PR preprocessor/34695
455 * cp-tree.h (cp_cpp_error): Remove.
456 * error.c (cp_cpp_error): Remove.
457 * parser.c (cp_lexer_new_main): Set done_lexing instead of
458 client_diagnostic and error callback.
459
460 2009-03-28 Paolo Bonzini <bonzini@gnu.org>
461
462 * cp/cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
463 * cp/cp-objcp-common.c (cxx_staticp): Remove.
464 * cp/cp-tree.h (cxx_staticp): Remove.
465
466 2009-03-28 Jakub Jelinek <jakub@redhat.com>
467
468 PR c++/39554
469 * parser.c (cp_parser_postfix_expression): Don't call
470 warning_if_disallowed_function_p.
471
472 2009-03-27 Jan Hubicka <jh@suse.cz>
473
474 * except.c (choose_personality_routine): Set terminate_node to abort
475 for java exceptions.
476
477 2009-03-27 Dodji Seketeli <dodji@redhat.com>
478 Jakub Jelinek <jakub@redhat.com>
479
480 PR debug/37959
481 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define.
482 (cp_function_decl_explicit_p): New prototype.
483 * cp-objcp-common.c (cp_function_decl_explicit_p): New function.
484
485 2009-03-27 Andrew Pinski <andrew_pinski@playstation.sony.com>
486
487 PR c++/38638
488 * parser.c (cp_parser_elaborated_type_specifier): If we have a
489 typename tag and don't have either a TYPE_DECL or a
490 TEMPLATE_ID_EXPR, set the type to NULL.
491
492 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
493
494 PR c++/37647
495 * decl.c (grokdeclarator): Reject [con|de]stuctors in a non-class
496 scope.
497
498 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
499
500 PR c++/29727
501 * decl.c (check_array_designated_initializer): Handle error_mark_node.
502
503 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
504
505 PR c++/35652
506 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
507
508 2009-03-26 Andrew Haley <aph@redhat.com>
509
510 PR C++/39380
511 * decl2.c (possibly_inlined_p): If java exceptions are in use
512 don't inline a decl unless it is explicitly marked inline.
513 * lex.c: (pragma_java_exceptions): New variable.
514 (handle_pragma_java_exceptions): Set pragma_java_exceptions.
515 * cp-tree.h (pragma_java_exceptions): Declare new variable.
516
517 2009-03-24 Jason Merrill <jason@redhat.com>
518
519 PR c++/28274
520 * name-lookup.c (pushdecl_maybe_friend): Check default args later.
521
522 2009-03-23 Jakub Jelinek <jakub@redhat.com>
523
524 PR c/39495
525 * semantics.c (handle_omp_for_class_iterator): Swap cond operands and
526 code if iter is the second operand.
527 * parser.c (cp_parser_binary_expression): Add no_toplevel_fold_p
528 argument. If it is set, don't build the toplevel expression with
529 build_x_binary_op, but build2.
530 (cp_parser_assignment_expression, cp_parser_omp_for_incr): Adjust
531 callers.
532 (cp_parser_omp_for_cond): Don't assume the first operand of the
533 comparison must be decl.
534
535 2009-03-23 Jason Merrill <jason@redhat.com>
536
537 PR c++/37729
538 * pt.c (make_fnparm_pack): Split out from...
539 (instantiate_decl): ...here.
540 (tsubst_pack_expansion): Handle being called in a late-specified
541 return type.
542
543 PR c++/39526
544 * name-lookup.c (pushdecl_maybe_friend): Don't warn about shadowing
545 a parm with a parm.
546
547 2009-03-20 Jason Merrill <jason@redhat.com>
548
549 PR c++/28879
550 * parser.c (cp_parser_direct_declarator): In a template, wrap
551 non-constant expression in NOP_EXPR with TREE_SIDE_EFFECTS set.
552 * pt.c (tsubst): Preserve it in a partial instantiation.
553 (dependent_type_p_r): Don't check value_dependent_expression_p.
554 * decl.c (compute_array_index_type): Don't check
555 value_dependent_expression_p if TREE_SIDE_EFFECTS.
556
557 C++ core issue 703
558 * typeck2.c (check_narrowing): Don't complain about loss of
559 precision when converting a floating-point constant.
560
561 2009-03-19 Jakub Jelinek <jakub@redhat.com>
562
563 PR c/39495
564 * parser.c (cp_parser_omp_for_cond): Don't check lhs if decl is NULL.
565 (cp_parser_omp_for_loop): Always use cp_parser_omp_for_cond.
566
567 2009-03-18 Jakub Jelinek <jakub@redhat.com>
568
569 * parser.c (struct cp_token): Reorder fields for 64-bit hosts.
570 (eof_token): Adjust.
571
572 2009-03-18 H.J. Lu <hongjiu.lu@intel.com>
573
574 PR c++/39425
575 * parser.c (cp_parser_explicit_specialization): Don't skip the
576 rest of the specialization when begin_specialization returns
577 false.
578
579 2009-03-17 Jason Merrill <jason@redhat.com>
580
581 * decl.c (grokfndecl): Set DECL_CONTEXT on parms.
582 (duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms.
583 * pt.c (check_explicit_specialization): Likewise.
584 (tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a
585 local specialization.
586 * tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name.
587 * decl2.c (parm_index): New fn.
588 * semantics.c (finish_decltype_type): Don't use describable_type.
589 * mangle.c (write_expression): Likewise. Mangle ALIGNOF_EXPR.
590 Give a sorry for unsupported codes rather than crash. Mangle
591 conversions with other than 1 operand. New mangling for PARM_DECL.
592 * operators.def (ALIGNOF_EXPR): Mangle as "az".
593
594 2009-03-17 Jing Yu <jingyu@google.com>
595
596 PR middle-end/39378
597 * method.c (use_thunk): Change is_thunk from crtl to cfun.
598
599 2009-03-17 Paolo Carlini <paolo.carlini@oracle.com>
600
601 PR c++/39475
602 * semantics.c (check_trait_type): New.
603 (finish_trait_expr): Use it.
604
605 2009-03-17 Jakub Jelinek <jakub@redhat.com>
606
607 * name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
608 instead of calling imported_module_or_decl debug hook if
609 building_stmt_tree ().
610 * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
611 is a NAMESPACE_DECL.
612
613 PR debug/37890
614 * name-lookup.c (do_namespace_alias): Don't call global_decl debug
615 hook at function scope.
616
617 PR debug/39471
618 * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
619 on IMPORTED_DECL.
620
621 2009-03-09 Jakub Jelinek <jakub@redhat.com>
622
623 PR c++/39371
624 * semantics.c (finish_switch_cond): Don't call get_unwidened.
625 * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
626 instead of TREE_TYPE (cond).
627
628 2009-03-08 H.J. Lu <hongjiu.lu@intel.com>
629
630 PR c++/39060
631 * parser.c (cp_parser_late_parsing_default_args): Continue
632 the loop when cp_parser_assignment_expression returns
633 error_mark_node.
634
635 2009-03-07 Jason Merrill <jason@redhat.com>
636
637 PR c++/39367
638 * init.c (build_new_1): Don't use a VLA type.
639 (build_vec_init): Handle getting a pointer for BASE.
640
641 2009-03-06 H.J. Lu <hongjiu.lu@intel.com>
642
643 PR c++/37520
644 * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
645 when mangling symbols.
646
647 2009-03-06 Paolo Carlini <paolo.carlini@oracle.com>
648
649 PR c++/33492
650 * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
651
652 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
653
654 * decl.c (record_builtin_java_type): Use canonicalized integer
655 types.
656
657 2009-03-04 Jason Merrill <jason@redhat.com>
658
659 PR c++/38908
660 * class.c (is_really_empty_class): New fn.
661 * cp-tree.h: Declare it.
662 * cp-objcp-common.c (cp_expr_size): Use it.
663
664 PR c++/13549
665 * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
666 * parser.c (cp_parser_postfix_expression): Call it for
667 TEMPLATE_ID_EXPR.
668 * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
669 (get_first_fn): Likewise.
670
671 PR c++/9634
672 PR c++/29469
673 PR c++/29607
674 Implement DR 224.
675 * decl.c (make_typename_type): Do look inside currently open classes.
676 * parser.c (cp_parser_lookup_name): Likewise.
677 (cp_parser_template_name): Likewise.
678 * pt.c (dependent_scope_p): New function.
679 * cp-tree.h: Declare it.
680 * class.c (currently_open_class): Return fast if T isn't a class.
681
682 2009-02-26 H.J. Lu <hongjiu.lu@intel.com>
683
684 PR c++/37789
685 * parser.c (cp_parser_mem_initializer): Return error_mark_node
686 if cp_parser_mem_initializer_id returns error_mark_node.
687
688 2009-02-24 Richard Guenther <rguenther@suse.de>
689
690 PR c++/39242
691 * pt.c (instantiate_decl): Do not instantiate extern, non-inline
692 declared functions.
693
694 2009-02-23 H.J. Lu <hongjiu.lu@intel.com>
695
696 PR c++/36411
697 * pt.c (coerce_template_template_parms): Return 0 if parameter
698 is error_mark_node.
699
700 2009-02-23 Jason Merrill <jason@redhat.com>
701
702 * pt.c (unify): Call maybe_adjust_types_for_deduction when
703 deducing from an initializer list.
704
705 2009-02-20 Jason Merrill <jason@redhat.com>
706
707 PR c++/39225
708 * decl.c (grokdeclarator): Handle ~identifier.
709
710 2009-02-19 Jakub Jelinek <jakub@redhat.com>
711
712 PR target/39175
713 * decl2.c (determine_visibility): If visibility changed and
714 DECL_RTL has been already set, call make_decl_rtl to update symbol
715 flags.
716
717 2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
718
719 PR c++/39188
720 * cp-tree.h (maybe_commonize_var): New.
721
722 * decl.c (maybe_commonize_var): Make it extern.
723
724 * decl2.c (finish_anon_union): Call maybe_commonize_var.
725
726 2009-02-18 H.J. Lu <hongjiu.lu@intel.com>
727
728 PR c++/39219
729 * parser.c (cp_parser_enum_specifier): Apply all attributes.
730
731 2009-02-18 Jason Merrill <jason@redhat.com>
732
733 * cfns.h: Tweak pathname for cfns.gperf.
734
735 2009-02-13 Jason Merrill <jason@redhat.com>
736
737 PR c++/39070
738 * semantics.c (finish_call_expr): Change koenig_p parm to int.
739 If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
740 * cp-tree.h: Adjust prototype.
741 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
742
743 2009-02-12 Jason Merrill <jason@redhat.com>
744
745 PR c++/38950
746 * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
747
748 2009-02-11 Jason Merrill <jason@redhat.com>
749
750 PR c++/39153
751 * decl2.c (cp_write_global_declarations):
752 Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
753
754 PR c++/30111
755 * init.c (build_value_init_noctor): Split out from...
756 (build_value_init): ...here.
757 (expand_aggr_init_1): Handle value-initialization.
758 * cp-tree.h: Add declaration.
759 * class.c (type_has_user_provided_constructor):
760 Handle non-class arguments.
761
762 2009-02-10 Jason Merrill <jason@redhat.com>
763
764 PR c++/38649
765 * class.c (defaultable_fn_p): Handle ... properly.
766
767 PR c++/36744
768 * tree.c (lvalue_p_1): Condition rvalue ref handling on
769 treat_class_rvalues_as_lvalues, too.
770
771 2009-02-10 Paolo Carlini <paolo.carlini@oracle.com>
772
773 PR c++/34397
774 * typeck.c (build_x_array_ref): New.
775 * cp-tree.h: Declare it.
776 * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
777
778 2009-02-09 Jason Merrill <jason@redhat.com>
779
780 PR c++/39109
781 * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
782 * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
783 * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
784 * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
785 for build_value_init TARGET_EXPR.
786 * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
787
788 2009-02-06 Paolo Carlini <paolo.carlini@oracle.com>
789
790 PR c++/35147
791 PR c++/37737
792 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
793
794 2009-02-04 Jakub Jelinek <jakub@redhat.com>
795
796 PR c++/39095
797 * operators.def: Use COMPONENT_REF code for ->/pt operator again,
798 remove ./dt operator.
799 * mangle.c (write_expression): Handle COMPONENT_REF after handling
800 ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
801 write_string ("dt") instead of using operators.def.
802
803 2009-02-03 Jason Merrill <jason@redhat.com>
804
805 * typeck.c (cp_build_unary_op): Only complain about taking address
806 of main if pedantic.
807
808 2009-02-03 Jakub Jelinek <jakub@redhat.com>
809
810 PR inline-asm/39059
811 * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
812
813 PR c++/39056
814 * typeck2.c (digest_init_r): Don't call process_init_constructor
815 for COMPLEX_TYPE.
816
817 2009-02-03 Paolo Bonzini <bonzini@gnu.org>
818
819 PR c++/36897
820 * pt.c (convert_nontype_argument_function): Expect expr to be an
821 ADDR_EXPR.
822
823 PR c++/37314
824 * typeck.c (merge_types): Call resolve_typename_type if only
825 one type is a typename.
826
827 2009-02-02 Jason Merrill <jason@redhat.com>
828
829 PR c++/39054
830 * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node
831 in BIT_NOT_EXPR.
832
833 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
834
835 PR c++/39053
836 * parser.c (cp_parser_pure_specifier): If there are no tokens left
837 do not call cp_lexer_consume_token.
838
839 2009-01-30 Jakub Jelinek <jakub@redhat.com>
840
841 PR c++/39028
842 * parser.c (cp_parser_already_scoped_statement): Handle __label__
843 declarations.
844
845 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
846
847 PR c++/33465
848 * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
849
850 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
851
852 PR c++/38655
853 * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
854
855 2009-01-29 Paolo Carlini <paolo.carlini@oracle.com>
856
857 * typeck.c (invalid_nonstatic_memfn_p): Use
858 DECL_NONSTATIC_MEMBER_FUNCTION_P.
859
860 2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
861
862 PR c++/37554
863 * call.c (build_over_call): If convert_for_arg_passing returns
864 error_mark_node unconditionally return it.
865
866 2009-01-22 Adam Nemet <anemet@caviumnetworks.com>
867
868 * class.c (check_field_decls): Also inherit packed for bitfields
869 regardless of their type.
870
871 2009-01-22 Dodji Seketeli <dodji@redhat.com>
872
873 PR c++/38930
874 * decl2.c (grokfield): Reverting changes of PR c++/26693
875 (save_template_attributes): Likewise.
876 * decl.c (grokdeclarator): Likewise.
877 * name-lookup.c (pushdecl_maybe_friend): Likewise.
878 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
879 (append_type_to_template_for_access_check): Likewise.
880 * semantics.c (check_accessibility_of_qualified_id): Likewise.
881 * pt.c (instantiate_class_template, instantiate_template ): Likewise.
882 (tsubst): Likewise.
883 (resolve_type_name_type): Likewise.
884 (append_type_to_template_for_access_check): Likewise.
885
886 2009-01-21 Dodji Seketeli <dodji@redhat.com>
887
888 PR c++/26693
889 * decl2.c (grokfield): when a typedef appears in a
890 class, create the typedef variant type node for it.
891 (save_template_attributes): Creating typedef variant type node
892 here is now useless.
893 * decl.c (grokdeclarator): If the typedef'ed struct/class was
894 anonymous, set the proper type name to all its type variants.
895 * name-lookup.c (pushdecl_maybe_friend): Reuse the
896 set_underlying_type function to install typedef variant types.
897 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
898 macro.
899 (append_type_to_template_for_access_check): New entry points.
900 * semantics.c (check_accessibility_of_qualified_id):
901 When a typedef that is a member of a class appears in a template,
902 add it to the template. It will be ...
903 * pt.c (instantiate_class_template, instantiate_template ): ... access
904 checked at template instantiation time.
905 (tsubst): Handle the case of being called with NULL args.
906 (resolve_type_name_type): The type name should be the name of the
907 main type variant.
908 (append_type_to_template_for_access_check): New entry point.
909
910 2009-01-19 Jason Merrill <jason@redhat.com>
911
912 PR c++/23287
913 * parser.c (cp_parser_unqualified_id): In a template,
914 accept ~identifier.
915 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
916
917 2009-01-16 Jason Merrill <jason@redhat.com>
918
919 PR c++/38877
920 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
921 * init.c (build_new): Don't call describable_type unless we
922 have an auto.
923
924 PR c++/29470
925 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
926
927 PR c++/38579
928 * search.c (protected_accessible_p): N doesn't vary.
929
930 2009-01-15 Jason Merrill <jason@redhat.com>
931
932 PR c++/38850
933 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
934 accept hidden friends.
935
936 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
937
938 PR C++/29388
939 * decl.c (grokdeclarator): Check for a non namespace/class context.
940
941 2009-01-15 Jason Merrill <jason@redhat.com>
942
943 PR c++/36334
944 PR c++/37646
945 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
946 a function isn't necessarily an lvalue. Take tree, not const_tree.
947 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
948 * typeck.c (lvalue_or_else): Likewise.
949 * cp-tree.h: Adjust prototypes.
950
951 2009-01-15 Steve Ellcey <sje@cup.hp.com>
952
953 PR c++/38357
954 * pt.c (tsubst): Check for NULL args.
955
956 2009-01-15 Dodji Seketeli <dodji@redhat.com>
957
958 PR c++/38636
959 * name-lookup.c (pushtag): Don't create members to types that are not
960 being created.
961
962 2009-01-14 Nick Clifton <nickc@redhat.com>
963
964 PR c++/37862
965 * parser.c: Pass cp_id_kind computed in
966 cp_parser_postfix_dot_deref_expression to
967 cp_parser_primary_expression.
968
969 2009-01-13 Jakub Jelinek <jakub@redhat.com>
970
971 PR c++/38795
972 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
973 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
974 as CAST_EXPR.
975
976 2009-01-12 Jason Merrill <jason@redhat.com>
977 Steve Ellcey <sje@cup.hp.com>
978
979 PR c++/35109
980 * name-lookup.c (lookup_name_real): Keep looking past a hidden
981 binding.
982
983 2009-01-12 Dodji Seketeli <dodji@redhat.com>
984
985 PR c++/36019
986 * pt.c (parameter_of_template_p): New function.
987 * cp-tree.h: Declare it.
988 * name-lookup.c (binding_to_template_parms_of_scope_p): New
989 function.
990 (outer_binding): Take template parameters in account when looking for
991 a name binding.
992
993 2009-01-12 Jason Merrill <jason@redhat.com>
994
995 PR c++/31488
996 * tree.c (pod_type_p): Return 1 for structs created by the back end.
997
998 2009-01-12 Jakub Jelinek <jakub@redhat.com>
999
1000 PR c/32041
1001 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
1002 offsetof member-designator, handle it as `[0].'.
1003
1004 PR c++/38794
1005 * decl.c (start_function): If grokdeclarator hasn't returned
1006 FUNCTION_DECL nor error_mark_node, issue diagnostics.
1007
1008 2009-01-11 Jakub Jelinek <jakub@redhat.com>
1009
1010 PR c++/36254
1011 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
1012 (gimplify_if_stmt): ... this.
1013 (cp_gimplify_expr): Don't handle IF_STMT here.
1014 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
1015
1016 2009-01-10 Andrew Pinski <pinskia@gmail.com>
1017
1018 PR c++/38648
1019 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
1020
1021 PR c++/36695
1022 * typeck2.c (build_functional_cast): Check for reference type and NULL
1023 PARMS.
1024
1025 2009-01-09 Steve Ellcey <sje@cup.hp.com>
1026
1027 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
1028
1029 2009-01-09 Jakub Jelinek <jakub@redhat.com>
1030
1031 PR c++/35335
1032 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
1033
1034 2009-01-09 John F. Carr <jfc@mit.edu>
1035
1036 PR c++/37877
1037 * parser.c (cp_parser_class_specifier): Clear
1038 parser->in_unbraced_linkage_specification_p while parsing class
1039 specifiers.
1040
1041 2009-01-07 Jakub Jelinek <jakub@redhat.com>
1042
1043 PR c++/38725
1044 * semantics.c (finish_goto_stmt): Convert destination to
1045 void *.
1046
1047 2009-01-06 Jason Merrill <jason@redhat.com>
1048
1049 PR c++/35297
1050 PR c++/35477
1051 PR c++/35784
1052 PR c++/36846
1053 PR c++/38276
1054 * pt.c (check_default_tmpl_args): Don't complain about
1055 out-of-order parameter packs in the enclosing class
1056 or parameter packs after default args.
1057 (coerce_template_parms): If we have more than one
1058 parameter pack, don't flatten argument packs.
1059 (template_args_equal): Handle argument packs.
1060 (comp_template_args): Don't flatten argument packs.
1061 (check_instantiated_arg): Split out from...
1062 (check_instantiated_args): Here. Handle arg packs.
1063 (convert_template_argument): Just check that nontype argument
1064 packs have the right type.
1065
1066 2009-01-05 Dodji Seketeli <dodji@redhat.com>
1067
1068 PR c++/38472
1069 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
1070
1071 2009-01-05 Jason Merrill <jason@redhat.com>
1072
1073 PR c++/38698
1074 * typeck2.c (process_init_constructor_union): Handle union with
1075 no fields.
1076
1077 * mangle.c (write_expression): Remove mangling for zero-operand
1078 casts.
1079
1080 PR c++/38701
1081 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
1082 defaulting.
1083
1084 PR c++/38702
1085 * class.c (defaultable_fn_p): Only operator== can be a copy
1086 assignment operator.
1087
1088 2009-01-02 Jason Merrill <jason@redhat.com>
1089
1090 PR c++/38698
1091 * typeck2.c (process_init_constructor_union): Handle excess
1092 initializers.
1093 (process_init_constructor_record): Likewise.
1094
1095 PR c++/38684
1096 * typeck2.c (digest_init_r): Don't use process_init_constructor
1097 for non-aggregate classes.
1098
1099 \f
1100 Copyright (C) 2009 Free Software Foundation, Inc.
1101
1102 Copying and distribution of this file, with or without modification,
1103 are permitted in any medium without royalty provided the copyright
1104 notice and this notice are preserved.