]> gcc.gnu.org Git - gcc.git/blame - gcc/cp/ChangeLog
re PR c++/34513 (static variable not found for C++ OpenMP)
[gcc.git] / gcc / cp / ChangeLog
CommitLineData
5259c813
JJ
12007-12-19 Jakub Jelinek <jakub@redhat.com>
2
3 PR c++/34513
4 * parser.c (cp_parser_omp_parallel): For non-combined parallel
5 call cp_parser_statement rather than
6 cp_parser_already_scoped_statement.
7
82390eb6
JM
82007-12-18 Jason Merrill <jason@redhat.com>
9
10 PR c++/34206
11 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
12 use template parms.
13 (dependent_type_p_r): Handle the domain of an array.
14
a15c0b00
DG
152007-12-18 Douglas Gregor <doug.gregor@gmail.com>
16 Jakub Jelinek <jakub@redhat.com>
17
18 PR c++/32565
19 PR c++/33943
20 PR c++/33965
21 * pt.c (template_template_parm_bindings_ok_p): New; verifies
22 bindings of template template parameters after all template
23 arguments have been deduced.
24 (coerce_template_parms): Don't complain when COMPLAIN doesn't
25 include tf_error.
26 (fn_type_unification): Use template_template_parm_bindings_ok_p.
27 (unify): Deal with variadic, bound template template parameters.
28 (get_class_bindings): Use template_template_parm_bindings_ok_p.
29
ac3b1156
JJ
302007-12-18 Jakub Jelinek <jakub@redhat.com>
31
32 PR c++/34488
33 * decl.c (grokdeclarator): Reject friend sfk_constructor
34 FUNCTION_TYPE.
35
8085ca15
JJ
362007-12-17 Jakub Jelinek <jakub@redhat.com>
37
38 PR c/34506
39 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
40 in between clauses.
41
394d9fe7
AO
422007-12-15 Alexandre Oliva <aoliva@redhat.com>
43
44 PR debug/7081
45 * cp-lang.c (cp_classify_record): New.
46 (LANG_HOOKS_CLASSIFY_RECORD): Override.
47
61a861e6
JJ
482007-12-11 Jakub Jelinek <jakub@redhat.com>
49
5b767b9d
JJ
50 PR c++/34238
51 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
52
61a861e6
JJ
53 PR c++/34364
54 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
55 dynamic_cast in a template.
56
0197270c
SM
572007-12-10 Simon Martin <simartin@users.sourceforge.net>
58
59 PR c++/34059
60 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
61 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
62
214452b9
JJ
632007-12-10 Jakub Jelinek <jakub@redhat.com>
64
e7de2d6f
JJ
65 PR c++/34395
66 * error.c (dump_type_prefix, dump_type_suffix): Handle
67 TYPE_PACK_EXPANSION.
68
214452b9
JJ
69 PR c++/34394
70 * error.c (dump_expr): Handle ABS_EXPR.
71
23372b3f
JJ
722007-12-09 Jakub Jelinek <jakub@redhat.com>
73
74 PR c++/34178
75 PR c++/34340
76 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
77 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
78 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
79 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
80 flag_use_repository and repo_emit_p returned 2.
81
28267cfc
JJ
822007-12-06 Jakub Jelinek <jakub@redhat.com>
83
84 PR c++/34336
85 * tree.c (stabilize_call, stabilize_init): Do nothing if
86 processing_template_decl.
87
91929b4d
JJ
882007-12-05 Jakub Jelinek <jakub@redhat.com>
89
90 PR c++/34271
91 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
92 error instead of assertion failure.
93 * parser.c (cp_parser_decltype): If closing paren is not found,
94 return error_mark_node.
95
ba796308
DG
962007-12-04 Douglas Gregor <doug.gregor@gmail.com>
97
98 PR c++/34101
99 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
100 packs.
101 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
102 since arg_assoc_template_arg will deal with them (better).
103
2f93f02c
DG
1042007-12-04 Douglas Gregor <doug.gregor@gmail.com>
105
106 PR c++/33509
107 * pt.c (tsubst_exception_specification): Handle substitutions into
108 member templates, where tsubst_pack_expansion returns a
109 TYPE_PACK_EXPANSION.
110
db60ff18
DG
1112007-12-04 Douglas Gregor <doug.gregor@gmail.com>
112
113 PR c++/33091
114 * pt.c (unify_pack_expansion): If we didn't deduce any actual
115 bindings for the template parameter pack, don't try to keep the
116 empty deduced arguments.
117 (unify): If a parameter is a template-id whose template argument
118 list contains a pack expansion that is not at the end, then we
119 cannot unify against that template-id.
120
0b93f014
PC
1212007-12-02 Paolo Carlini <pcarlini@suse.de>
122
123 PR c++/34061
124 * pt.c (current_template_args): Use error_operand_p.
125
06be4f56
PC
1262007-12-02 Paolo Carlini <pcarlini@suse.de>
127
128 PR c++/34273
129 * error.c (dump_decl): Handle TREE_BINFO.
130
867f133e
OW
1312007-12-01 Ollie Wild <aaw@google.com>
132
133 PR c++/8171
134 * typeck.c (build_binary_op): Add conversion of pointers to function
135 members appearing as operands to the equality operators.
136
89ab8ba0
JJ
1372007-11-30 Jakub Jelinek <jakub@redhat.com>
138
139 PR c++/34275
140 * error.c (dump_expr): Handle OBJ_TYPE_REF.
141
7a547b93
JJ
1422007-11-29 Jakub Jelinek <jakub@redhat.com>
143
42924ed7
JJ
144 PR c++/34270
145 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
146 in templates.
147 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
148 Likewise.
149
7a547b93
JJ
150 PR c++/34267
151 PR c++/34268
152 * parser.c (cp_parser_decltype): Don't call finish_id_expression
153 on ~type.
154 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
155 and ~type early.
156
ce41114b
JJ
1572007-11-27 Jakub Jelinek <jakub@redhat.com>
158
62cbbe84
JJ
159 PR tree-optimization/34181
160 * method.c (use_thunk): Don't inline the call in the thunk.
161
ce41114b
JJ
162 PR c++/34213
163 * tree.c (decl_linkage): Static data members and static member
164 functions in anonymous ns classes are lk_external.
165
182e0d71
AK
1662007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
167
ce41114b 168 PR c++/34081
182e0d71
AK
169 * decl.c (start_preparsed_function): Pass
170 processing_template_decl for the new allocate_struct_function
171 parameter.
172
87caf699
RG
1732007-11-25 Richard Guenther <rguenther@suse.de>
174
42924ed7 175 * decl.c (poplevel): Use BLOCK_CHAIN.
87caf699 176
a298680c
OW
1772007-11-24 Ollie Wild <aaw@google.com>
178
179 * typeck.c (delta_from_ptrmemfunc): New function.
180 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
181 (build_binary_op): Call delta_from_ptrmemfunc.
182
360f866c
JJ
1832007-11-23 Jakub Jelinek <jakub@redhat.com>
184
185 PR c++/30293
186 PR c++/30294
187 * decl.c (cp_finish_decl): Disallow variable or field
188 definitions if extern "Java" aggregates.
189 (grokparms): Disallow parameters with extern "Java"
190 aggregates.
191 (check_function_type): Disallow function return values
192 with extern "Java" aggregates.
193 * init.c (build_new_1): Disallow placement new with
194 extern "Java" aggregates.
195
6ca39fcb
MM
1962007-11-23 Mark Mitchell <mark@codesourcery.com>
197 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
198
199 PR c++/5310
200 * call.c (convert_like_real): Build a zero constant when __null is
201 converted to an integer type.
202
6d1f904c
JJ
2032007-11-22 Jakub Jelinek <jakub@redhat.com>
204
205 PR c++/34094
206 * decl2.c (cp_write_global_declarations): Issue error about static
207 data members in anonymous namespace which are declared and used,
208 but not defined.
209
63d34078
JJ
2102007-11-20 Jakub Jelinek <jakub@redhat.com>
211
542f8eb9
JJ
212 PR c++/34089
213 * parser.c (cp_parser_class_head): Reject function template ids.
214
6da06848
JJ
215 PR c++/28879
216 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
217 when processing_template_decl to build_array_type.
218
63d34078
JJ
219 PR c++/33962
220 * pt.c (more_specialized_fn): Don't segfault if one or
221 both argument list end with ellipsis.
222
be461b8f
JJ
2232007-11-18 Jakub Jelinek <jakub@redhat.com>
224
225 PR c++/30988
6c01f02b
JJ
226 * semantics.c (finish_call_expr): Set
227 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
228 or OVERLOAD with all noreturn functions.
be461b8f 229
823e5f7f
JJ
2302007-11-16 Jakub Jelinek <jakub@redhat.com>
231
232 PR c++/34100
233 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
234 error_mark_node.
235
ffbf5813
JJ
2362007-11-13 Jakub Jelinek <jakub@redhat.com>
237
046e4071
JJ
238 PR c++/34054
239 PR c++/34056
240 PR c++/34057
241 PR c++/34058
242 PR c++/34060
243 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
244 set to error_mark_node the outermost POINTER_TYPE to the pack if
245 it is seen in a POINTER_TYPE.
246 (push_template_decl_real): If check_for_bare_parameter_packs
247 fails for function return type, set the return type to
248 integer_type_node. If check_for_bare_parameter_packs failed
249 for non-function, return error_mark_node.
250
ffbf5813
JJ
251 PR c++/29225
252 * call.c (build_new_op): Call resolve_args before calling
253 build_over_call.
254
f1e20710
TT
2552007-11-11 Tom Tromey <tromey@redhat.com>
256
257 PR c++/17577:
258 * lex.c (handle_pragma_implementation): Use cpp_included_before.
259
b131ad7c
MLI
2602007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
261
262 PR c++/8570
263 * pt.c (redeclare_class_template): Update error message. Use a
264 note to show the previous declaration.
265 (tsubst_friend_class): Use the location of the friend template as
266 the input location before calling redeclare_class_template.
267
09b1ccd6
JJ
2682007-11-11 Jakub Jelinek <jakub@redhat.com>
269
270 PR c++/34068
271 * semantics.c (finish_pseudo_destructor_expr): Handle
272 object == error_mark_node.
273
3d9b2eb6
JJ
2742007-11-10 Jakub Jelinek <jakub@redhat.com>
275
276 PR c++/32241
277 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
278 is not scalar type, let finish_class_member_access_expr handle
279 diagnostics. Pass BIT_NOT_EXPR argument to
280 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
281
49b5e2f6
DG
2822007-11-09 Douglas Gregor <doug.gregor@gmail.com>
283
284 PR c++/33510
285 * decl.c (cp_complete_array_type): If any of the initializer
286 elements are pack expansions, don't compute the array size yet.
287
c02cdc25
TT
2882007-11-08 Andrew Pinski <pinskia@gmail.com>
289
290 PR c++/30297:
291 * tree.c (decl_linkage): Fields have no linkage.
292
8208d7dc
DJ
2932007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
294
295 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
296
e4fd5b87
DG
2972007-11-07 Douglas Gregor <doug.gregor@gmail.com>
298
299 PR c++/33045
300 PR c++/33837
301 PR c++/33838
302 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
303 Be careful with ERROR_MARK_NODEs.
304 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
305 argument.
306
2811f33d
JJ
3072007-11-07 Jakub Jelinek <jakub@redhat.com>
308
309 PR c++/33501
310 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
311 on incomplete type.
312
9ae165a0
DG
3132007-11-06 Douglas Gregor <doug.gregor@gmail.com>
314
315 PR c++/33977
316 PR c++/33886
317 * tree.c (c_build_qualified_type): Define bridge to
318 cp_build_qualified_type.
319
1ad8aeeb
DG
3202007-11-06 Douglas Gregor <doug.gregor@gmail.com>
321
322 PR c++/31439
323 PR c++/32114
324 PR c++/32115
325 PR c++/32125
326 PR c++/32126
327 PR c++/32127
328 PR c++/32128
329 PR c++/32253
330 PR c++/32566
331 * typeck.c (check_return_expr): Pass address of retval to
332 check_for_bare_parameter_packs.
333 * class.c (build_base_field): Tolerate bases that have no layout
334 due to errors.
335 (end_of_base): Ditto.
336 * tree.c (canonical_type_variant): Be careful with
337 ERROR_MARK_NODE.
338 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
339 tree*.
340 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
341 which states whether parameter packs should be replaced with
342 ERROR_MARK_NODE.
343 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
344 possible. If set_packs_to_error is set true, replace the parameter
345 pack with ERROR_MARK_NODE. Manage our own pointer sets.
346 (uses_parameter_packs): Don't set parameter packs to
347 ERROR_MARK_NODE.
348 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
349 which may be modified (if it is a parameter pack). Instructs
350 find_parameter_packs_r to replace parameter packs with
351 ERROR_MARK_NODE (so that they won't cause errors later on).
352 (process_template_parm): Pass pointer to
353 check_for_bare_parameter_packs.
354 (process_partial_specialization): Replace pack expansions before
355 the end of the template argument list with ERROR_MARK_NODE.
356 (push_template_decl_real): Pass pointer to
357 check_for_bare_parameter_packs. Replace parameter packs not at the
358 end of the template parameter list with ERROR_MARK_NODE.
359 (convert_template_argument): Be more careful about using DECL_NAME
360 on only declarations.
361 (unify): Can't unify against ERROR_MARK_NODE.
362 * semantics.c (finish_cond): Pass pointer to
363 check_for_bare_parameter_packs.
364 (finish_expr_stmt): Ditto.
365 (finish_for_expr): Ditto.
366 (finish_switch_cond): Pass pointer to
367 check_for_bare_parameter_packs, and call it before we put the
368 condition into the statement.
369 (finish_mem_initializers): Pass pointer to
370 check_for_bare_parameter_packs.
371 (finish_member_declaration): Ditto.
372 * parser.c (cp_parser_base_clause): Ditto.
373
239371f9
JJ
3742007-11-06 Jakub Jelinek <jakub@redhat.com>
375
b0eb6a8f
JJ
376 PR target/33168
377 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
378 with the final TREE_READONLY flag in place. processing_template_decl
379 is known to be 0 in this part of function.
380
239371f9
JJ
381 PR c++/33894
382 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
383 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
384 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
385 * semantics.c (finish_omp_atomic): Revert most of the
386 2007-02-05 changes, just keep the new representation of
387 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
388
565603f8
L
3892007-11-05 H.J. Lu <hongjiu.lu@intel.com>
390
391 PR c++/33871
392 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
393 local.
394
86089be5
DG
3952007-11-05 Douglas Gregor <doug.gregor@gmail.com>
396
397 PR c++/33996
398 PR c++/33235
399 PR c++/33930
400 * typeck.c (merge_types): Don't lose rvalue references when
401 merging types.
402 * call.c (build_over_call): Don't elide move constructors just
403 because the copy constructor is trivial (!).
404 (compare_ics): If comparing cv-qualifiers fails, we can still order
405 based on binding lvalues vs. rvalues.
406
2afad0f6
DG
4072007-11-05 Douglas Gregor <doug.gregor@gmail.com>
408
409 PR c++/33939
410 * pt.c (unify_pack_expansion): bring handling of function call
411 arguments into line with type_unification_real.
412
278b63df
MLI
4132007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
414
415 * typeck.c (build_binary_op): Use pedwarn instead of error for
416 consistency.
417
1b021ff4
JJ
4182007-11-05 Jakub Jelinek <jakub@redhat.com>
419
f370e66b
JJ
420 PR c++/33836
421 * parser.c (cp_parser_unary_expression): For &&label call
422 cp_parser_non_integral_constant_expression and return error_mark_node
423 if it returned true.
424
1b021ff4
JJ
425 PR c++/33969
426 * decl.c (grokdeclarator): Don't call build_memfn_type if type
427 is neither FUNCTION_TYPE nor METHOD_TYPE.
428
eba5fc70
JJ
4292007-11-02 Jakub Jelinek <jakub@redhat.com>
430
431 PR c++/33516
432 * parser.c (cp_parser_nested_name_specifier_opt): Use
433 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
434 typedef of currently open class.
435
10a6624a
PC
4362007-11-02 Paolo Carlini <pcarlini@suse.de>
437
438 PR c++/33495
439 * error.c (dump_expr): Deal specially with statements.
440
ef3b7b17
JM
4412007-11-01 Jason Merrill <jason@redhat.com>
442
443 PR c++/30897
444 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
445 template parms.
446 (lookup_template_class): Use it to get the outer template args
447 for instantiating one.
448
449 PR c++/29236
450 * pt.c (reduce_template_parm_level): tsubst the parameters
451 of a template template parm.
452
e1a18c68
DG
4532007-11-01 Douglas Gregor <doug.gregor@gmail.com>
454
455 PR c++/33955
456 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
457
3a44f395
JJ
4582007-11-01 Jakub Jelinek <jakub@redhat.com>
459
e426bd2c
JJ
460 PR c++/32384
461 * parser.c (cp_parser_postfix_dot_deref_expression): If
462 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
463 first and if that succeeds and type is SCALAR_TYPE_P, create
464 PSEUDO_DTOR_EXPR.
465
3a44f395
JJ
466 PR c++/32260
467 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
468 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
469 as for std::type_info.
470
066f956c
PC
4712007-10-31 Paolo Carlini <pcarlini@suse.de>
472
473 PR c++/33494
474 * cxx-pretty-print.c (pp_cxx_typeid_expression,
475 pp_cxx_delete_expression): Change to static linkage.
476 * cxx-pretty-print.h: Adjust declarations.
477 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
478 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
479 MODOP_EXPR): Forward to pp_expression.
480
481 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
482 Fix typo.
483
0e95aec1
CB
4842007-10-31 Christian Bruel <christian.bruel@st.com>
485 Mark Mitchell <mark@codesourcery.com>
486
487 PR c++/19531
ef3b7b17 488 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
0e95aec1
CB
489 if retval is volatile.
490
4c38e99e
JJ
4912007-10-30 Jakub Jelinek <jakub@redhat.com>
492
493 PR c++/33616
494 * decl2.c (build_offset_ref_call_from_tree): Call
495 build_non_dependent_expr on object prior to building ADDR_EXPR from it
496 if FN is DOTSTAR_EXPR.
497
88b82314
DG
4982007-10-30 Douglas Gregor <doug.gregor@gmail.com>
499
500 PR c++/31993
501 PR c++/32252
502 * pt.c (find_parameter_packs_r): Fix typo in comment.
503 (convert_template_argument): Look at the pattern of a pack
504 expansion to determine what kind of entity we're converting.
505 (coerce_template_parameter_pack): When we have coerced a non-type
506 template parameter pack, substitute into the type of that pack.
507 (tsubst_pack_expansion): When our substitution of a parameter pack
508 is a "trivial" substitution of itself, just substitute into the
509 pack expansion rather than actually expanding.
510
e7df0180
JJ
5112007-10-29 Jakub Jelinek <jakub@redhat.com>
512
513 PR c++/33841
514 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
515 for non-integral type bitfields. Return true if bitfield is correct, false
516 error has been diagnosed.
517 (check_field_decls): If check_bitfield_decl returned false, call also
518 check_field_decl.
519
8259e4f5
PC
5202007-10-28 Paolo Carlini <pcarlini@suse.de>
521 Mark Mitchell <mark@codesourcery.com>
522
523 PR c++/30659
524 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
525 class member error out and return.
526
1e3eacc7
JJ
5272007-10-27 Jakub Jelinek <jakub@redhat.com>
528
d5aa2cf0
JJ
529 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
530 to current_function_decl rather than 0.
531
1e3eacc7
JJ
532 PR c++/33844
533 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
534 ->* rather than .*.
535 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
536
d02dbde6
JM
5372007-10-27 Jason Merrill <jason@redhat.com>
538
539 PR c++/5247
540 * call.c (convert_default_arg): Detect recursion.
541
094a5fe2
JJ
5422007-10-27 Jakub Jelinek <jakub@redhat.com>
543
544 PR c++/33842
545 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
546 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
547 OFFSETOF_EXPR.
548 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
549 functions.
550 * error.c (dump_expr): Handle OFFSETOF_EXPR.
551
91a77d68
JM
5522007-10-26 Jason Merrill <jason@redhat.com>
553
554 PR c++/24791
555 * pt.c (get_template_info): New fn.
556 (template_class_depth): Use it.
557 (push_template_decl_real): Check that the template args of the
558 definition match the args of the previous declaration.
559
07021f8c
PC
5602007-10-26 Paolo Carlini <pcarlini@suse.de>
561
562 PR c++/31988
563 * decl2.c (coerce_new_type): Do not allow a default argument for
564 the first parameter.
565
2b536806
DG
5662007-10-26 Douglas Gregor <doug.gregor@gmail.com>
567
568 PR c++/33839
569 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
570 don't see the leading '('. Only lookup names if we get an
571 IDENTIFIER_NODE.
572
0f1e3321
JJ
5732007-10-26 Jakub Jelinek <jakub@redhat.com>
574
575 PR c++/33744
576 * parser.c (cp_parser_parenthesized_expression_list): Set
577 greater_than_is_operator_p to true in between the parens.
578
9b70c6b0
PC
5792007-10-26 Paolo Carlini <pcarlini@suse.de>
580
581 PR c++/31747
582 * decl.c (grokdeclarator): In case of conflicting specifiers
583 just return error_mark_node.
584
3459ca23
OW
5852007-10-26 Ollie Wild <aaw@google.com>
586
587 * expr.c (cxx_expand_expr): Removed.
588 * cp-tree.h (exx_expand_expr): Removed.
589 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
590 with c_expand_expr.
591
6735e374
PC
5922007-10-25 Paolo Carlini <pcarlini@suse.de>
593
594 PR c++/33843
595 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
596
6f4fd536
JM
5972007-10-23 Jason Merrill <jason@redhat.com>
598
599 PR c++/25950 (DR 391)
600 * call.c (struct conversion): Remove check_copy_constructor_p.
601 (reference_binding): Always bind a reference directly to a
602 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
603 temporary creation.
604 (check_constructor_callable): Remove.
605 (convert_like_real): Don't call it.
606 (initialize_reference): Don't call check_constructor_callable.
607 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
608 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
609 conversions if LOOKUP_NO_TEMP_BIND.
610 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
611 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
612 second conversion.
613 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
614
6e684eee
JJ
6152007-10-22 Jakub Jelinek <jakub@redhat.com>
616
617 PR c++/33372
618 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
619 before checking if its type is integral.
620
5818c8e4
JM
6212007-10-22 Jason Merrill <jason@redhat.com>
622
623 PR c++/33620
624 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
625 * pt.c (apply_late_template_attributes): Splice out dependent
626 attributes from DECL_ATTRIBUTES.
627
628 * decl.c (cxx_maybe_build_cleanup): Use build_address.
629
c5409249
MLI
6302007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
631
632 * typeck.c (build_binary_op) : Use appropriate warning option
633 instead of unnamed warning.
634
bf98d3b6
PC
6352007-10-16 Paolo Carlini <pcarlini@suse.de>
636
637 PR c++/31446
638 * pt.c (current_template_args): Do not change TREE_LIST elements
639 with a TREE_VALUE of error_mark_node.
640
15896502
MM
6412007-10-16 Mark Mitchell <mark@codesourcery.com>
642
643 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
644 * decl.c (start_decl): Tidy.
645 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
646 the type.
647 (grokdeclarator): Clarify comment.
648
db160137
AP
6492007-10-14 Andrew Pinski <pinskia@gmail.com>
650
651 PR c++/30303
652 * decl.c (grokfndecl): Return NULL after the "definition of
653 implicitly-declared" error happened.
654
a9a81e7d
SM
6552007-10-12 Simon Martin <simartin@users.sourceforge.net>
656
657 PR c++/26698
658 * call.c (build_user_type_conversion_1): Do not consider conversion
659 functions to convert a (possibly cv-qualified) object to the (possibly
660 cv-qualified) same object type (or a reference to it), to a (possibly
661 cv-qualified) base class of that type (or a reference to it).
662
f4205442
PC
6632007-10-12 Paolo Carlini <pcarlini@suse.de>
664
665 * pt.c (tsubst): Use template_parm_level_and_index.
666
3d3585eb
JJ
6672007-10-12 Jakub Jelinek <jakub@redhat.com>
668
669 PR c++/32121
670 * parser.c (cp_parser_compound_statement): Handle label-declarations
671 at the beginning of the compound statement.
672 (cp_parser_block_declaration): Issue diagnostics about __label__
673 not at the beginning of a block.
674
c343d5a7
PC
6752007-10-11 Paolo Carlini <pcarlini@suse.de>
676
677 PR c++/33461
678 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
679 to convert_template_argument.
680 (coerce_template_parms): Return error_mark_node after fixed-length
681 error.
682 (tsubst_decl): Check for error_mark_node the return value of the
683 first tsubst in 'case VAR_DECL'.
684
6524147c
OW
6852007-10-08 Ollie Wild <aaw@google.com>
686
687 * typeck2.c (digest_init): Call cplus_expand_constant after
688 convert_for_initialization.
689 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
690 * expr.c (cplus_expand_constant): Updated function description.
691
42f02385
JM
6922007-10-04 Jason Merrill <jason@redhat.com>
693
694 PR c++/20416
695 * call.c (initialize_reference): Handle local static reference
696 temps properly.
697
231d0665
JM
6982007-10-03 Jason Merrill <jason@redhat.com>
699
65567efa
JM
700 PR c++/32470
701 * name-lookup.c (push_namespace_with_attrs): Fold back into...
702 (push_namespace): Here.
703 (handle_namespace_attrs): New fn for the attr code.
704 (leave_scope): Don't pop_visibility.
705 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
706 * parser.c (cp_parser_namespace_definition): Call
707 handle_namespace_attrs and pop_visibility as appropriate.
708
231d0665
JM
709 PR c++/11756
710 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
711
fea10e36
AO
7122007-10-03 Alexandre Oliva <aoliva@redhat.com>
713
714 * decl.c (duplicate_decls): Preserve linkage flags for mere
715 redeclarations of gnu_inline definitions.
716
a24549d4
JM
7172007-10-03 Jason Merrill <jason@redhat.com>
718
719 PR c++/15764
720 * decl.c (wrap_cleanups_r): New fn.
721 (wrap_temporary_cleanups): New fn.
722 (initialize_local_var): Call it.
723
dc472c59
JM
7242007-09-29 Jason Merrill <jason@redhat.com>
725
726 PR c++/33094
727 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
728 constant to not have DECL_EXTERNAL if it's file-local.
729
6dcee2d6
OW
7302007-09-28 Ollie Wild <aaw@google.com>
731
732 Revert
733 2007-09-27 Ollie Wild <aaw@google.com>
734
735 * typeck2.c (digest_init): Call cplus_expand_constant after
736 convert_for_initialization.
737 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
738 * expr.c (cplus_expand_constant): Updated function description.
739
d9d9dbc0
JM
7402007-09-28 Jason Merrill <jason@redhat.com>
741
742 PR c++/10179
743 * class.c (layout_empty_base): Take rli parameter, update
744 rli->record_align if empty base has user-specified alignment.
745 (build_base_field): Pass rli to it.
746
930a1e63
PC
7472007-09-28 Paolo Carlini <pcarlini@suse.de>
748
749 PR c++/33213
750 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
751
31d40008
PC
7522007-09-28 Paolo Carlini <pcarlini@suse.de>
753
754 PR c++/33118
755 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
756 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
757 (dump_parameters): Just call dump_type for argument packs too.
758
80d86013
JJ
7592007-09-28 Jakub Jelinek <jakub@redhat.com>
760
761 PR c++/31434
762 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
763 qualification by creating qualified PACK_EXPANSION_PATTERN and
764 then calling make_pack_expansion on it.
765
12487dd0
OW
7662007-09-27 Ollie Wild <aaw@google.com>
767
768 * typeck2.c (digest_init): Call cplus_expand_constant after
769 convert_for_initialization.
770 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
771 * expr.c (cplus_expand_constant): Updated function description.
772
533007c1
JM
7732007-09-27 Jason Merrill <jason@redhat.com>
774
d9d9dbc0 775 PR c++/33571
533007c1
JM
776 * decl2.c (is_late_template_attribute): Don't crash on unknown
777 attribute.
778
62081704
PC
7792007-09-27 Paolo Carlini <pcarlini@suse.de>
780
781 PR c++/33493
782 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
783 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
784 spaces in the formatting.
785 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
786
c94ed7a1
JJ
7872007-09-27 Jakub Jelinek <jakub@redhat.com>
788
789 * error.c (cxx_print_error_function): Add third argument, pass
790 it over to lhd_print_error_function.
791 (cp_print_error_function): If diagnostic->abstract_origin, print
792 virtual backtrace.
793 * cp-tree.h (struct diagnostic_info): New forward decl.
794 (cxx_print_error_function): Add third argument.
795
dc3ca06f
SM
7962007-09-25 Simon Martin <simartin@users.sourceforge.net>
797
798 PR c++/33207
799 * name-lookup.c (pushtag): Do not create an implicit typedef before
800 the associated type declaration is known to be valid.
801
1bde0042
JJ
8022007-09-25 Jakub Jelinek <jakub@redhat.com>
803
804 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
805 rather than pointers.
806
18ff3013
DS
8072007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
808
809 PR c++/14688
810 * search.c (check_final_overrider): Fail if
811 targetm.comp_type_attributes returns 0.
812
7a20d689
JM
8132007-09-24 Jason Merrill <jason@redhat.com>
814
815 PR c++/33239
816 * pt.c (resolve_typename_type): Don't look things up in the original
817 template if it would mean losing template arguments.
818
2dff8956
JJ
8192007-09-24 Jakub Jelinek <jakub@redhat.com>
820
821 PR c++/33506
822 * cp-tree.h (cxx_type_hash_eq): New prototype.
823 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
824 * tree.c (cxx_type_hash_eq): New function.
825
c946ce8b
DG
8262007-09-24 Douglas Gregor <doug.gregor@gmail.com>
827
828 PR c++/33185
829 * tree.c (cp_build_qualified_type_real): Build a canonical
830 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
831
714f2304
DG
8322007-09-24 Douglas Gregor <doug.gregor@gmail.com>
833
834 PR c++/33112
835 PR c++/33185
836 * tree.c (cplus_array_compare): Compare pointers, not types.
837 (build_cplus_array_type_1): Store new array type into the hash
838 table before building the canonical type; build the canonical type
839 correctly.
840 (cp_build_qualified_type_real): Put all of the array types with
841 cv-qualified element types into the C++ array hash table, built as
842 variants of the unqualified versions.
843
823dd937
JM
8442007-09-23 Jason Merrill <jason@redhat.com>
845
846 PR c++/16370
847 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
848 for deprecation warnings.
849
a7f6bc8c
JM
8502007-09-22 Jason Merrill <jason@redhat.com>
851
1a68a4e8
JM
852 PR c++/15269
853 * call.c (build_over_call): Warn about deprecated virtuals.
854
a7f6bc8c
JM
855 PR c++/19407
856 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
857 (MAYBE_TAGGED_TYPE_P): Remove.
858 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
859 instead of calling is_late_template_attribute again.
860 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
861 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
862 Don't crash on typedefs from non-template classes.
863 * decl2.c (grokfield): Don't sorry about attrs on template parms.
864 (is_late_template_attribute): All attributes applied to template
865 parms or typename types are dependent. Static.
866 (splice_template_attributes): Pass decl through.
867 (save_template_attributes): Likewise.
868
b6efedac
JJ
8692007-09-20 Jakub Jelinek <jakub@redhat.com>
870
871 PR c++/33496
872 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
873 returned from tsubst_pack_expansion.
874 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
875 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
876
24f58e74
PC
8772007-09-20 Paolo Carlini <pcarlini@suse.de>
878
879 PR c++/33460
880 * semantics.c (finish_id_expression): Use consistently
881 context_for_name_lookup.
882 * decl.c (fixup_anonymous_aggr): Fix error message for
883 anonymous struct (vs union).
884
56d0c6e3
JM
8852007-09-19 Jason Merrill <jason@redhat.com>
886
887 PR c++/7586
888 * pt.c (tsubst): Handle typedefs by looking for the specialization.
889 (retrieve_specialization): Only tagged types use
890 DECL_TEMPLATE_INSTANTIATIONS.
891 (instantiate_class_template): Push nested classes too.
892 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
893 tagged types.
894 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
895 * init.c (is_aggr_type): Remove redundant tests.
896 * class.c (push_nested_class): Use CLASS_TYPE_P.
897
b43d1bde
PC
8982007-09-20 Paolo Carlini <pcarlini@suse.de>
899
900 PR c++/33459
901 * init.c (build_zero_init): If, recursively, build_zero_init
902 returns a NULL_TREE, do not append it to the VEC of constructors.
903
5044ab0e
JM
9042007-09-18 Jason Merrill <jason@redhat.com>
905
906 PR c++/17743
907 * pt.c (apply_late_template_attributes): Set processing_template_decl.
908 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
909 ATTR_FLAG_TYPE_IN_PLACE.
910 (tsubst): Do unqualified lookup to find typedefs from current class.
911 [ARRAY_TYPE]: Propagate alignment info.
912 * decl2.c (is_late_template_attribute): Only defer handling of
913 attribute aligned if the expression is dependent.
914 (save_template_attributes): If we're deferring any attributes,
915 make this a naming typedef.
916
352d5090
PC
9172007-09-18 Paolo Carlini <pcarlini@suse.de>
918
919 PR c++/33462 (again)
920 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
921 va_arg instead of __builtin_va_arg.
922
fdb8f418
PC
9232007-09-18 Paolo Carlini <pcarlini@suse.de>
924
925 PR c++/33462
926 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
927 (pp_cxx_primary_expression): Use it.
928 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
929 * error.c (dump_expr): Use it.
930
2d65b828
PC
9312007-09-18 Paolo Carlini <pcarlini@suse.de>
932
933 PR c++/33463
934 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
935 out case TYPEID_EXPR to...
936 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
937 and pp_cxx_right_paren.
938 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
939 * error.c (dump_expr): Use it.
940
e74392f0
PC
9412007-09-18 Paolo Carlini <pcarlini@suse.de>
942
943 PR c++/33464
944 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
945 (pp_cxx_primary_expression): Use it.
946 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
947 * error.c (dump_expr): Use it.
948
57711cd1
PC
9492007-09-16 Paolo Carlini <pcarlini@suse.de>
950
951 PR c++/33124
952 * init.c (build_new): Remove warning for zero-element
953 allocations.
954
0ee3f0a8
NS
9552007-09-16 Nathan Sidwell <nathan@codesourcery.com>
956
0ee3f0a8
NS
957 PR c++/32756
958 * call.c (maybe_handle_implicit_object): Set this_p, clear
959 rvaluedness_matches_p.
960 (compare_ics): Do not compare rvaluedness matching when one of the
961 operands is an implicit object.
962
4f4141ff
JM
9632007-09-14 Jason Merrill <jason@redhat.com>
964
965 PR c++/17743, c++/19163
966 * decl2.c (is_late_template_attribute): New fn.
967 (splice_template_attributes, save_template_attributes): New fns.
968 (cplus_decl_attributes): Call save_template_attributes.
969 * pt.c (apply_late_template_attributes): New fn.
970 (instantiate_class_template, tsubst_decl): Use it.
971 * cp-tree.h: Declare is_late_template_attribute.
972
46c2514e
TT
9732007-09-13 Tom Tromey <tromey@redhat.com>
974
975 * parser.c (cp_lexer_new_main): Don't use
976 c_lex_return_raw_strings.
977 (cp_lexer_get_preprocessor_token): Update. Add special case when
978 lexer is NULL.
979
e89d6010
JH
9802007-09-11 Jan Hubicka <jh@suse.cz>
981
982 * method.c (use_thunk): Use tree_rest_of_compilation
983 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
984 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
985 * cp-tree.h (expand_body): Kill.
986 (emit_associated_thunks): Declare.
987 * semantics.c (emit_associated_thunks): Export.
988 (expand_body): Kill.
989
b2ec1738
DD
9902007-09-09 David Daney <ddaney@avtrex.com>
991
992 PR c++/33324
993 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
994 to calculate cookie_ptr.
995
fd452cef
JM
9962007-09-08 Jason Merrill <jason@redhat.com>
997
998 PR c++/33342
999 * pt.c (most_specialized_class): Set processing_template_decl
1000 while tsubsting partial spec args.
1001
3fd40684
JM
10022007-09-06 Jason Merrill <jason@redhat.com>
1003
1004 * decl2.c (get_guard): Copy visibility from the guarded variable.
1005
b2ea030b
JH
10062007-09-06 Jan Hubicka <jh@suse.cz>
1007
1008 * semantics.c (expand_body): Do not mark arguments of clones used.
1009
a125de0c
PC
10102007-09-06 Paolo Carlini <pcarlini@suse.de>
1011
1012 PR c++/32674
1013 * decl.c (cp_finish_decl): When processing_template_decl,
1014 deal correctly with init as TREE_LIST.
1015
5ffeb913
TT
10162007-09-06 Tom Tromey <tromey@redhat.com>
1017
1018 * decl.c (finish_function): Put return's location on line zero of
1019 file.
1020
6f06d231
JM
10212007-09-05 Jason Merrill <jason@redhat.com>
1022
86ef5ebb
JM
1023 PR c++/15745
1024 * except.c (prepare_eh_type): Use type_decays_to.
1025
6f06d231
JM
1026 PR c++/15097
1027 * init.c (build_delete): Use build_headof to get the address of the
1028 complete object if we aren't using the deleting destructor.
1029 * rtti.c (build_headof): No longer static.
1030 * cp-tree.h: Declare it.
1031
62bedd31
JJ
10322007-09-06 Jakub Jelinek <jakub@redhat.com>
1033
1034 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
1035 decl if a prototype for XX is provided with throw().
1036
012c4da9
JJ
1037 PR c++/33289
1038 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
1039 on __*_chk non-__builtin_* decls.
1040
61fdc9d7
PC
10412007-09-05 Paolo Carlini <pcarlini@suse.de>
1042
1043 PR c++/30302
1044 * semantics.c (finish_id_expression): Use context_for_name_lookup
1045 insted of DECL_CONTEXT, to see through anonymous structs and unions.
1046 * class.c (finish_struct_anon): Deal correctly with anonymous
1047 structs (vs unions, as GNU extension) in error messages.
1048
33061862
JH
10492007-09-05 Jan Hubicka <jh@suse.cz>
1050
1051 * cp/sematics.c (expand_body): Remove unnecesary import_export_decl
1052 call, DECL_EXTERNAL checks and current_function_decl saving.
1053
03ba2e11
PC
10542007-09-05 Paolo Carlini <pcarlini@suse.de>
1055
1056 PR c++/29731 (again)
1057 * parser.c (cp_parser_primary_expression): Return error_mark_node
1058 when a statement-expression is found in a template-argument list.
1059
ba6c89a9
JM
10602007-09-04 Jason Merrill <jason@redhat.com>
1061
6f06d231
JM
1062 * except.c (initialize_handler_parm): Use
1063 fold_build_cleanup_point_expr.
1064
9380ed84
JM
1065 PR c++/31419
1066 * call.c (reference_binding): Don't look for user-defined conversions
1067 to the same type.
1068
ba6c89a9
JM
1069 PR c++/31411
1070 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
1071 the MUST_NOT_THROW_EXPR.
1072
4c5bae34
RS
10732007-09-04 Richard Sandiford <richard@codesourcery.com>
1074
1075 * decl.c (cp_finish_decl): Call determine_visibility before
1076 make_rtl_for_nonlocal_decl.
1077
dc28490d
JM
10782007-09-04 Jason Merrill <jason@redhat.com>
1079
1080 PR c++/14032
1081 * pt.c (most_specialized_class): Substitute outer template
1082 arguments into the arguments of a member template partial
1083 specialization.
1084 (strip_innermost_template_args): New fn.
1085
72c65674
DJ
10862007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
1087
1088 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
1089
b1d5455a
KG
10902007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1091
1092 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
1093 * decl.c (cp_make_fname_decl): Likewise,
1094 * parser.c (cp_parser_string_literal): Likewise,
1095 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
1096 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
1097 Likewise,
1098
8bcebc69
PC
10992007-09-02 Paolo Carlini <pcarlini@suse.de>
1100
1101 PR c++/33208
1102 * typeck.c (build_unary_op): Fix error message for
1103 Boolean expression as operand to operator--.
1104
75547801
KG
11052007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1106
1107 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
1108 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
1109 Likewise.
1110
268127ce
DG
11112007-08-31 Douglas Gregor <doug.gregor@gmail.com>
1112
1113 PR c++/32597
1114 * init.c (build_default_init): Make extern.
1115 * cp-tree.h (build_default_init): Declare here.
1116 * pt.c (tsubst_expr): When the instantiation of the initializer of
1117 a variable results in an empty list, default-initialize the
1118 variable.
1119 (tsubst_copy_and_build): When the instantiation of the initializer
1120 in a new expression results in an empty initializer list,
1121 default-initialize it.
1122
1ab28be5
DG
11232007-08-31 Douglas Gregor <doug.gregor@gmail.com>
1124
1125 * mangle.c (write_type): Change mangling of rvalue reference from
1126 `RR' to `O'.
1127
194ee011
JJ
11282007-08-31 Jakub Jelinek <jakub@redhat.com>
1129
1130 * decl.c (duplicate_decls): Remove duplicated line.
1131
c8c00613
PC
11322007-08-31 Paolo Carlini <pcarlini@suse.de>
1133
1134 PR c++/33210
1135 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
1136 BOUND_TEMPLATE_TEMPLATE_PARM.
1137
5973c743
PC
11382007-08-31 Paolo Carlini <pcarlini@suse.de>
1139
1140 PR c++/32113
1141 * search.c (lookup_member): Check the name argument for
1142 error_mark_node.
1143
a53bf42c
PC
11442007-08-31 Paolo Carlini <pcarlini@suse.de>
1145
1146 PR c++/33212
1147 * parser.c (cp_parser_trait_expr): Check rerurn value of
1148 cp_parser_type_id.
1149
6e03b280
OW
11502007-08-30 Ollie Wild <aaw@google.com>
1151
1152 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
1153 convert_ptrmem for pointer to member conversions.
1154 (convert_to_pointer_force): Update cp_convert_to_pointer call.
1155 (ocp_convert): Update cp_convert_to_pointer call.
1156 * typeck.c (convert_ptrmem): Add conditional for null pointers to
1157 members.
1158 (build_static_cast_1): Check can_convert for conversions in either
1159 direction.
1160 (get_delta_difference_1): New function.
1161 (get_delta_difference): Refactor to call get_delta_difference_1.
1162
f86bfcab
JJ
11632007-08-30 Jakub Jelinek <jakub@redhat.com>
1164
1165 * decl.c (start_preparsed_function): Set
1166 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
1167
0a8fc247
PC
11682007-08-28 Paolo Carlini <pcarlini@suse.de>
1169
1170 PR c++/33209
1171 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
1172 BOUND_TEMPLATE_TEMPLATE_PARM.
1173
92d0af97
JJ
11742007-08-28 Jakub Jelinek <jakub@redhat.com>
1175
1176 PR c++/32596
1177 PR c++/32400
1178 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
1179 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
1180
c206a697
JM
11812007-08-27 Jason Merrill <jason@redhat.com>
1182
c2acde1e
JM
1183 PR c++/29000
1184 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
1185 Look inside STMT_EXPR.
1186 * semantics.c (stmt_expr_value_expr): New fn.
1187 * cp-tree.h: Declare it.
1188
c206a697
JM
1189 PR c++/28558
1190 * decl.c (groktypename): Ignore attributes applied to class type.
1191
c536a6a7
RG
11922007-08-28 Richard Guenther <rguenther@suse.de>
1193
1194 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
1195
7368348c
GDR
11962007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
1197
1198 * error.c (dump_expr): Handle COMPLEX_CST.
1199 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
1200 (pp_cxx_expression): Likewise.
1201
3a47c4e4
AO
12022007-08-27 Alexandre Oliva <aoliva@redhat.com>
1203
1204 * decl.c (GNU_INLINE_P): New.
1205 (duplicate_decls): Handle gnu_inline. Merge attributes and
1206 some flags in overriding definitions.
1207 (redeclaration_error_message): Handle gnu_inline.
1208 (start_preparsed_function): Likewise.
1209
58f9752a
KG
12102007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1211
1212 * call.c (sufficient_parms_p): Constify.
1213 * class.c (same_signature_p): Likewise.
1214 * cp-gimplify.c (is_invisiref_parm,
1215 cxx_omp_privatize_by_reference): Likewise.
1216 * cp-objcp-common.c (has_c_linkage): Likewise.
1217 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
1218 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
1219 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
1220 num_artificial_parms_for, comp_template_parms,
1221 template_parameter_pack_p, any_dependent_template_arguments_p,
1222 any_type_dependent_arguments_p, any_value_dependent_elements_p,
1223 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
1224 zero_init_p, member_p, cp_lvalue_kind,
1225 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
1226 varargs_function_p, is_dummy_object, special_function_kind,
1227 string_conv_p, type_unknown_p, comp_except_specs, compparms,
1228 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
1229 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
1230 cp_has_mutable_p, at_least_as_qualified_p,
1231 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
1232 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
1233 * except.c (nothrow_libfn_p): Likewise.
1234 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
1235 Likewise.
1236 * pt.c (comp_template_parms, template_parameter_pack_p,
1237 any_type_dependent_arguments_p, any_value_dependent_elements_p,
1238 any_dependent_template_arguments_p): Likewise.
1239 * repo.c (repo_export_class_p): Likewise.
1240 * semantics.c (anon_aggr_type_p): Likewise.
1241 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
1242 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
1243 varargs_function_p, member_p, is_dummy_object, pod_type_p,
1244 zero_init_p, special_function_p): Likewise.
1245 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
1246 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
1247 compparms, invalid_nonstatic_memfn_p,
1248 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
1249 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
1250 cp_has_mutable_p, lvalue_or_else): Likewise.
1251
e2c3721c
PB
12522007-08-25 Paolo Bonzini <bonzini@gnu.org>
1253
1254 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
1255 * cp-objcp-common.c (cp_tree_size): Ditto.
1256 * tree.c (cp_walk_subtrees): Ditto
1257 * cp-tree.def (TINST_LEVEL): Go away.
1258 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
1259 move together with other non-tree structs.
1260 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
1261 (union lang_tree_node): Eliminate tinst_level field.
1262 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
1263 (current_instantiation, outermost_tinst_level): Return
1264 a "struct tinst_level *".
1265
1266 * error.c (print_instantiation_partial_context): Change second
1267 parameter to a "struct tinst_level *". Replace accessor macros
1268 with field access.
1269 (print_instantiation_full_context): Likewise.
1270 * lex.c (in_main_input_context): Likewise.
1271
1272 * pt.c (struct pending_templates): New.
1273 (pending_templates, last_pending_template): Use it as a type.
1274 (current_tinst_level): Change typo to "struct tinst_level *"
1275 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
1276 (add_pending_template): Construct a "struct pending_template".
1277 Replace TINST_LEVEL accessor macros with field access.
1278 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
1279 (pop_tinst_level): Likewise.
1280 (instantiate_pending_templates): Likewise. Factor common code used
1281 when an instantiation has been done.
1282 (outermost_tinst_level): Replace tree_last with loop.
1283 (current_instantiation): Return a "struct tinst_level *".
1284
89bd2c03
OW
12852007-08-24 Ollie Wild <aaw@google.com>
1286
1287 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
1288 * name-lookup.h (cp_binding_level): Remove vtables member.
1289
18177c7e
RG
12902007-08-24 Richard Guenther <rguenther@suse.de>
1291
1292 * tree.c (cp_cannot_inline_tree_fn): Remove.
1293 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
1294 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
1295 Remove define.
1296
c6f3d2f4
JJ
12972007-08-24 Jakub Jelinek <jakub@redhat.com>
1298
affb3cb2
JJ
1299 PR c++/32567
1300 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
1301 error_mark_node right away if build_expr_type_conversion
1302 returned it.
1303
97dc8e5b
JJ
1304 PR c++/32898
1305 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
1306 is error_mark_node rather than NULL_TREE.
1307 * pt.c (check_explicit_specialization): Likewise.
1308
c6f3d2f4
JJ
1309 PR c++/31941
1310 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
1311 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
1312
61172206
JM
13132007-08-22 Jason Merrill <jason@redhat.com>
1314
1315 PR c++/29365
1316 * pt.c (outermost_tinst_level): New function.
1317 * lex.c (in_main_input_context): New function.
f11b2351 1318 * cp-tree.h: Declare it.
61172206
JM
1319 * decl2.c (constrain_class_visibility): Use it to avoid warning
1320 about uses of the anonymous namespace in the main input file.
1321
af9fc1dd
JJ
13222007-08-21 Jakub Jelinek <jakub@redhat.com>
1323
1324 * init.c (build_new_1): Use get_target_expr instead of save_expr.
1325
43f14744
PS
13262007-08-20 Pawel Sikora <pluto@pld-linux.org>
1327
1328 PR c++/7302
1329 * class.c (finish_struct_1): Warn when a class has virtual
1330 functions and accessible non-virtual destructor.
1331
a489b1f0
RG
13322007-08-20 Richard Guenther <rguenther@suse.de>
1333
1334 PR c++/22369
1335 PR c++/22451
1336 * call.c (build_new_method_call): Convert initializer to
1337 the basetype.
1338 * init.c (build_aggr_init): Do not fiddle with types.
1339 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
1340 * except.c (build_throw): Do not drop qualifiers for the
1341 pointer type.
1342 * typeck.c (get_member_function_from_ptrfunc): Do not
1343 fiddle with types, instead convert.
1344 (build_ptrmemfunc1): Convert to the target type for
1345 initialization.
1346 (gfc_trans_allocate): Convert result to target type.
1347 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
1348 pointer-to-member structures shall have alias set zero as well.
1349
50886bf1
RG
13502007-08-20 Richard Guenther <rguenther@suse.de>
1351
1352 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
1353 Remove.
1354 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
1355 (nonstatic_local_decl_p): Likewise.
1356 * tree.c (cp_auto_var_in_fn_p): Remove.
1357 * decl.c (nonstatic_local_decl_p): Remove.
1358
14588106
RG
13592007-08-20 Richard Guenther <rguenther@suse.de>
1360
1361 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
1362 Remove define.
1363 * tree.h (cp_walk_tree): New define to walk_tree_1 with
1364 cp_walk_subtrees lh parameter.
1365 (cp_walk_tree_without_duplicates): New define to
1366 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
1367 * tree.c (count_trees): Call
1368 cp_walk_tree_without_duplicates.
1369 (verify_stmt_tree): Call cp_walk_tree.
1370 (break_out_target_exprs): Likewise.
1371 (WALK_SUBTREE): Likewise.
1372 * cp-gimplify.c (cp_genericize): Likewise.
1373 * cp-pt.c (find_parameter_packs_r): Likewise.
1374 (uses_parameter_packs): Likewise.
1375 (make_pack_expansion): Likewise.
1376 (check_for_bare_parameter_packs): Likewise.
1377 (for_each_template_parm): Likewise.
1378 * decl.c (check_default_argument): Call
1379 cp_walk_tree_without_duplicates.
1380 * except.c (build_throw): Likewise.
1381 * decl2.c (type_visibility): Likewise.
1382 * semantics.c (expand_or_defer_fn): Likewise.
1383 (finalize_nrv): Call cp_walk_tree.
1384
412bbe81
JJ
13852007-08-20 Jakub Jelinek <jakub@redhat.com>
1386
1387 PR c++/33025
1388 * init.c (build_new_1): Rename placement_var variable to placement_expr.
1389 Initialize it with save_expr rather than get_temp_regvar.
1390
8f4361eb
AP
13912007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
1392
1393 PR c++/28989
1394 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
1395 lvalues.
1396
44fd0e80
OW
13972007-08-17 Ollie Wild <aaw@google.com>
1398
1399 PR c++/31749
1400 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
1401 declarations into appropriate slots for comparison. Fix type
1402 comparison.
1403
2658bdae
PC
14042007-08-17 Paolo Carlini <pcarlini@suse.de>
1405
1406 PR c++/32112
1407 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
1408 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
1409
968fc32d
PC
14102007-08-17 Paolo Carlini <pcarlini@suse.de>
1411
1412 PR c++/32870
1413 * parser.c (cp_parser_class_head): Improve error message.
1414
75407da3
SP
14152007-08-16 Seongbae Park <seongbae.park@gmail.com>
1416
968fc32d
PC
1417 * pt.c (instantiate_decl): Set input_location
1418 for the function end.
75407da3 1419
ac7d7749
KG
14202007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1421
1422 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
1423 Constify.
1424 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
1425 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
1426 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
1427 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
1428 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
1429 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
1430 * typeck.c (cp_type_quals): Likewise.
1431 * typeck2.c (cxx_incomplete_type_diagnostic,
1432 cxx_incomplete_type_error): Likewise.
1433
684939ce
PC
14342007-08-16 Paolo Carlini <pcarlini@suse.de>
1435
1436 PR c++/31132
1437 * pt.c (tsubst_friend_function): When check_classfn
1438 returns error_mark_node likewise return it.
1439
59fe9274
JJ
14402007-08-15 Jakub Jelinek <jakub@redhat.com>
1441
1442 PR c++/32992
1443 * typeck.c (check_return_expr): Don't NRV optimize vars in
1444 anonymous unions.
1445 * decl.c (finish_function): Comment fix.
1446
ba75df2b
PC
14472007-08-15 Paolo Carlini <pcarlini@suse.de>
1448
1449 PR c++/33035
1450 * pt.c (push_template_decl_real): Depending on TYPE_P
1451 use either TYPE_CONTEXT or DECL_CONTEXT.
1452
67f9922b
MM
14532007-08-14 Mark Mitchell <mark@codesourcery.com>
1454
1455 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
1456 constructors and destructors return this.
1457
f8c3b097
PC
14582007-08-14 Paolo Carlini <pcarlini@suse.de>
1459
1460 PR c++/27211
1461 * decl2.c (check_classfn): Return error_mark_node in case of error;
1462 in that case, do not call add_method.
1463 * decl.c (start_decl): Deal with check_classfn returning
1464 error_mark_node.
1465 (grokfndecl): Likewise.
1466 * pt.c (tsubst_friend_function): Likewise.
1467
9ef0c8d9
AP
14682007-08-14 Andrew Pinski <pinskia@gmail.com>
1469
1470 PR c++/30428
1471 * typeck.c (build_binary_op): Disallow vector float types with
1472 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
1473
4862826d
ILT
14742007-08-11 Ian Lance Taylor <iant@google.com>
1475
1476 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
1477 alias_set_type.
1478 * cp/cp-tree.h (cxx_get_alias_set): Update declaration.
1479
19831e2b
OW
14802007-08-10 Ollie Wild <aaw@google.com>
1481
1482 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
1483 type lookups.
1484 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
1485 function parameter.
1486 (unqualified_namespace_lookup): Fix ambiguous_decl call.
1487 (lookup_using_namespace): Fix ambiguous_decl call.
1488 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
1489
68a57691
KG
14902007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1491
1492 * call.c (name_as_c_string): Use CONST_CAST.
1493 * decl.c (build_decl): Likewise.
1494 * parser.c (cp_parser_string_literal): Likewise.
1495
2fbe0e5a
PC
14962007-08-10 Paolo Carlini <pcarlini@suse.de>
1497
1498 PR c++/17763
1499 * error.c (dump_expr): Consistently use the *_cxx_*
1500 variants of the pretty-print functions.
1501
caba2081
PC
15022007-08-10 Paolo Carlini <pcarlini@suse.de>
1503
1504 PR c++/22256
1505 * decl.c (check_special_function_return_type): Just error
1506 on return type specified for conversion operator.
1507
d7705934
DB
15082007-08-09 Daniel Berlin <dberlin@dberlin.org>
1509
1510 * typeck2.c (readonly_error): Handle general expressions.
1511 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
1512
af34b82f
DH
15132007-08-06 Dan Hipschman <dsh@google.com>
1514
1515 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
1516 access function name.
1517
5958f5cb
AM
15182007-08-04 Alfred Minarik <a.minarik@aon.at>
1519
1520 PR pch/13676
1521 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
1522 * g++spec.c (lang_specific_driver): Check them.
1523
ae95e46e
PC
15242007-08-06 Paolo Carlini <pcarlini@suse.de>
1525
1526 PR c++/19532
13678df8 1527 * pt.c (inline_needs_template_parms): Fix comment; change return type
ae95e46e
PC
1528 to bool.
1529
9dfbac5b
VR
15302007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
1531
1532 Revert:
1533 2007-03-26 Dirk Mueller <dmueller@suse.de>
1534
1535 * parser.c (cp_parser_member_declaration): Pedwarn
1536 about stray semicolons after member declarations.
f8ff69ea
LM
1537
15382007-08-02 Lee Millward <lee.millward@gmail.com>
1539
1540 PR c++/30849
1541 PR c++/30850
1542 PR c++/30851
1543 * parser.c (cp_parser_asm_definition): Detect and discard asm
1544 statements with invalid inputs or outputs.
1545 (cp_parser_asm_operand_list): Return error mark node if any
1546 of the operands are invalid. Adjust documentation.
1547
e77f031d
NC
15482007-08-02 Nick Clifton <nickc@redhat.com>
1549
1550 * typeck.c: Change copyright header to refer to version 3 of the
1551 GNU General Public License and to point readers at the COPYING3
1552 file and the FSF's license web page.
1553 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
1554 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
1555 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
1556 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
1557 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
1558 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
1559 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
1560 name-lookup.h, parser.c: Likewise.
1561
59f89d34
KG
15622007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1563
1564 PR middle-end/32668
1565 * call.c (magic_varargs_p): Honor the "type generic" attribute.
1566
a6d76a95
PC
15672007-07-30 Paolo Carlini <pcarlini@suse.de>
1568
1569 PR c++/32108
1570 * semantics.c (finish_label_stmt): Reject the __label__
1571 extension outside function scopes.
1572
fa233e34
KG
15732007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1574
1575 * parser.c (eof_token): Un-constify.
1576 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
1577 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
1578 casts.
1579
d732e98f
KH
15802007-07-28 Kazu Hirata <kazu@codesourcery.com>
1581
1582 * pt.c, tree.c, typeck2.c: Fix comment typos.
1583
d4d8c232
SM
15842007-07-28 Simon Martin <simartin@users.sourceforge.net>
1585 Mark Mitchell <mark@codesourcery.com>
1586
1587 PR c++/30917
1588 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
1589 hidden due to friend declarations in local classes.
1590
3ad6a8e1
DG
15912007-07-27 Douglas Gregor <doug.gregor@gmail.com>
1592
1593 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
1594 * cp-tree.def (DECLTYPE_TYPE): New.
1595 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
1596 (dump_type_prefix): Ditto.
1597 (dump_type_suffix): Ditto.
1598 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
1599 * mangle.c (write_type): Handle DECLTYPE_TYPE.
1600 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
1601 types.
1602 (DECLTYPE_TYPE_EXPR): New.
1603 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
1604 (finish_declared_type): Declare.
1605 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
1606 DECLTYPE_TYPE nodes.
1607 (pp_cxx_type_id): Ditto.
1608 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
1609 (tsubst): Substitute into a DECLTYPE_TYPE node.
1610 (tsubst_copy): Ditto.
1611 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
1612 nodes.
1613 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
1614 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
1615 structural equality (because we can't hash the expressions).
1616 (finish_declared_type): New.
1617 * lex.c (reswords): Add "decltype" keyword.
1618 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
1619 (cp_parser_postfix_expression): Add member_access_only_p to
1620 restrict postfix expression to member access expressions.
1621 (cp_parser_unary_expression): Update call to
1622 cp_parser_postfix_expression to reflect new parameter.
1623 (cp_parser_declared_type): New.
1624 (cp_parser_simple_type_specifier): Parse decltype types.
1625
83144bd6
MM
16262007-07-27 Mark Mitchell <mark@codesourcery.com>
1627
1628 PR c++/32346
1629 * call.c (convert_for_arg_passing): Only widen bitfields to their
1630 declared types if necessary.
1631
e5cfc29f
KG
16322007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1633
1634 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
1635 Constify.
1636
741ac903
KG
16372007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1638
1639 * decl.c (typename_hash, typename_compare): Constify.
1640 * mangle.c (hash_type, compare_type): Likewise.
1641 * pt.c (eq_local_specializations, hash_local_specialization):
1642 Likewise.
1643 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
1644 list_hash): Likewise.
1645 * typeck2.c (pat_compare): Likewise.
1646
b21a6ea1
NS
16472007-07-24 Nathan Sidwell <nathan@codesourcery.com>
1648
1649 * method.c (implicitly_declare_fn): Increase alignment if member
1650 function pointer format requires it.
1651
aedfac0e
PC
16522007-07-24 Paolo Carlini <pcarlini@suse.de>
1653
1654 PR c++/29001
1655 * typeck.c (check_return_expr): Do not pass a null argument
1656 to null_ptr_cst_p.
1657
16582007-07-24 Paolo Carlini <pcarlini@suse.de>
1659
1660 PR c++/32561
1661 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
1662 only on VAR_DECL.
1663
4195a767
NS
16642007-07-22 Nathan Sidwell <nathan@codesourcery.com>
1665
823c22f9
NS
1666 PR c++/32839
1667 * typeck.c (convert_arguments): Only use default args if we have
1668 a function decl.
1669
4195a767
NS
1670 PR c++/30818
1671 * typeck.c (structural_comptypes): No need to check
1672 resolve_typename_type return value here.
1673 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
1674 * pt.c (resolve_typename_type): Follow typename typedefs. Return
1675 original type rather than error_mark_node in case of failure.
1676 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
1677 resolve_typename_type result check.
1678 (cp_parser_direct_declarator, cp_parser_head,
1679 cp_parser_constructor_declarator_p): Likewise.
1680
2fe5bb9b
KH
16812007-07-12 Kazu Hirata <kazu@codesourcery.com>
1682
1683 * pt.c (template_parms_variadic_p): Remove.
1684 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
1685
99c1f1ce
JJ
16862007-07-12 Jakub Jelinek <jakub@redhat.com>
1687
1688 PR c++/30854
1689 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
1690 argument to dump_aggr_init_expr_args instead of false.
1691
7313518b
DG
16922007-07-11 Douglas Gregor <doug.gregor@gmail.com>
1693
1694 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
1695 canonical types; otherwise, fall back to structural type
1696 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
1697 internal compiler error if the canonical types are wrong.
1698
b8ade407
PC
16992007-07-11 Paolo Carlini <pcarlini@suse.de>
1700
1701 PR c++/32560
1702 * parser.c (cp_parser_make_indirect_declarator): When the
1703 the code argument is ERROR_MARK return cp_error_declarator.
1704
837edd5f
GK
17052007-07-09 Geoffrey Keating <geoffk@apple.com>
1706
1707 PR 32617
1708 * decl.c (cxx_init_decl_processing): Don't set
1709 force_align_functions_log.
1710 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
1711 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
1712 FUNCTION_DECL, return its alignment.
1713
f967586f
RG
17142007-07-09 Richard Guenther <rguenther@suse.de>
1715
1716 * decl.c (start_preparsed_function): Do not promote return type.
1717
833be229
PC
17182007-07-08 Paolo Carlini <pcarlini@suse.de>
1719
1720 PR c++/30535
1721 * pt.c (unify): Never pass error_mark_node to template_decl_level.
1722
acde59b4
MM
17232007-07-07 Mark Mitchell <mark@codesourcery.com>
1724
1725 PR c++/32232
1726 * pt.c (resolve_overloaded_unification): Robustify. Return a
1727 bool, not an int.
1728 (type_unification_real): Adjust accordingly.
1729
b5119fa1
RG
17302007-07-06 Richard Guenther <rguenther@suse.de>
1731
1732 * init.c (build_new_1): Use the correct pointer type.
1733 * typeck2.c (build_m_component_ref): Likewise.
1734
32a11c08
MM
17352007-07-05 Mark Mitchell <mark@codesourcery.com>
1736
1737 PR c++/32245
1738 * init.c (build_zero_init): Always build an initializer for
1739 non-static storage.
1740 * typeck2.c (build_functional_cast): Use build_zero_init.
1741
1742 PR c++/32251
1743 * init.c (build_new_1): Always pass the allocation function to
1744 build_op_delete_call.
1745 * call.c (build_op_delete_call): Handle operator delete with a
1746 variable-argument list. Do not issue an error when no matching
1747 deallocation function is available for a new operator.
1748
1749 PR c++/31992
1750 * cp-tree.h (any_value_dependent_elements_p): Declare it.
1751 * decl.c (value_dependent_init_p): New function.
1752 (cp_finish_decl): Use it.
1753 * pt.c (value_dependent_expression_p): Use
1754 any_value_dependent_elements_p.
1755 * parser.c (cp_parser_primary_expression): Add comment about
1756 treating dependent qualified names as integral
1757 constant-expressions.
1758
8de08f4c
DG
17592007-07-04 Douglas Gregor <doug.gregor@gmail.com>
1760
1761 * decl.c (build_ptrmemfunc_type): Always use structural equality
1762 tests when comparing pointer-to-member-function types, because the
1763 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
1764 types.
1765
57ccb546
MM
17662007-07-03 Mark Mitchell <mark@codesourcery.com>
1767
1768 * init.c (build_new): Tweak comment.
1769
39fb9d72
DB
17702007-06-29 Dave Brolley <brolley@redhat.com>
1771
1772 PR c++/31743
1773 * parser.c (cp_parser_new_type_id): Don't reduce a named array
1774 type to its base type and number of elements here.
1775 * init.c (build_new): Call complete_type_or_else to ensure that the
1776 type is complete and to issue a diagnostic if it is not.
1777 (build_new_1): Don't call complete_type_or_else here.
1778
e656a465
RG
17792007-07-03 Richard Guenther <rguenther@suse.de>
1780
1781 PR c++/32609
1782 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
1783 after recursing.
1784
2a7b8343
SB
17852007-07-02 Simon Baldwin <simonb@google.com>
1786
1787 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
1788 for inner-style nested forward declarations that don't declare
1789 anything useful.
1790
76dc15d4
JJ
17912007-07-02 Jakub Jelinek <jakub@redhat.com>
1792
1793 PR c++/31748
1794 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
1795 DECL_P in not a variable and appears more than once error messages.
1796
af92ab36
OW
17972007-07-01 Ollie Wild <aaw@google.com>
1798
1799 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
1800 (select_decl): Remove function.
1801 (unqualified_namespace_lookup): Populate binding by calling
1802 ambiguous_decl. Remove select_decl call.
1803 (lookup_qualified_name): Remove select_decl call.
1804 * decl.c (lookup_and_check_tag): Check for ambiguous references.
1805 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
1806 generation when name lookup is ambiguous.
1807
bfa8d90b
DG
18082007-06-29 Douglas Gregor <doug.gregor@gmail.com>
1809
1810 PR c++/31724
1811 * init.c (build_new_1): Use structural equality on the copy of the
1812 array type.
1813
ddbfd28d
GK
18142007-06-28 Geoffrey Keating <geoffk@apple.com>
1815
1816 * decl2.c (determine_visibility): Implement
1817 flag_visibility_ms_compat effect on type info.
1818 * decl.c (cxx_init_decl_processing): Implement
1819 global effect of flag_visibility_ms_compat.
1820
32d49134
GK
18212007-06-28 Geoffrey Keating <geoffk@apple.com>
1822
e301e2c4 1823 * decl2.c (start_objects): Mark constructor-running function
32d49134
GK
1824 as artificial.
1825
b46ce77f
SM
18262007-06-26 Simon Martin <simartin@users.sourceforge.net>
1827
1828 PR c++/32111
1829 * decl.c (grokdeclarator): Reset friendp for member functions declared
1830 friend of their own class.
1831
3a687f8b
MM
18322007-06-23 Mark Mitchell <mark@codesourcery.com>
1833
1834 * decl2.c (determine_visibility): Don't look for dllexport here.
1835 (determine_visibility_from_class): Tidy.
1836
736b8100
SB
18372007-06-18 Simon Baldwin <simonb@google.com>
1838
1839 PR c++/31923
1840 * parser.c (cp_parser_single_declaration): Added check for storage
1841 class other than sc_none in parsed declaration, and a flag to indicate
1842 if the call is part of an explicit template specialization parse.
1843 * (cp_parser_explicit_specialization): Specialization check flag added
1844 to call to cp_parser_single_declaration(), set true.
1845 * (cp_parser_template_declaration_after_export): Specialization check
1846 flag added to call to cp_parser_single_declaration(), set false.
1847 * pt.c (check_explicit_specialization): Added code to copy visiblity
1848 and linkage from the templated function to the explicit specialization.
1849
5be014d5
AP
18502007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1851
1852 * typeck.c (build_binary_op): For templates build the
1853 expression in pieces to avoid the assert in build2_stat.
1854 (get_member_function_from_ptrfunc):
1855 Change over to using POINTER_PLUS_EXPR and convert
1856 the second operand to sizetype.
1857 * typeck2.c (build_m_component_ref): Likewise.
1858 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
1859 instead of PLUS_EXPR for pointers.
1860 (build_new_1): Likewise.
1861 (build_vec_delete_1): Likewise.
1862 (build_vec_delete): Likewise.
1863 * class.c (build_base_path): Likewise.
1864 (build_base_path): Likewise.
1865 (convert_to_base_statically): Likewise.
1866 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
1867 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
1868 instead of PLUS_EXPR.
1869 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
1870 instead of PLUS_EXPR for pointers.
1871 * call.c (build_special_member_call): Likewise.
1872 * rtti.c (build_headof): Likewise.
1873 Use sizetype instead of ptrdiff_type_node.
1874 (tinfo_base_init): Create a POINTER_PLUS_EXPR
1875 instead of PLUS_EXPR for pointers.
1876 * except.c (expand_start_catch_block): Do a
1877 NEGATIVE and then a POINTER_PLUS_EXPR instead
1878 of a MINUS_EXPR.
1879 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
1880 PLUS_EXPR on pointer types over to use
1881 POINTER_PLUS_EXPR and remove the conversion
1882 to the pointer types.
1883 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
1884 adding to a pointer type. Use size_int instead of
1885 ssize_int. Convert the index to sizetype before
1886 adding it to the pointer.
1887
555551c2
MM
18882007-06-15 Mark Mitchell <mark@codesourcery.com>
1889
1890 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
1891 (DECL_ANON_UNION_VAR_P): New macro.
1892 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
1893 than DECL_VAR_MARKED_P, to keep track of which variables we have
1894 seen.
1895 * decl.c (redeclaration_error_message): Complain about redeclaring
1896 anonymous union members at namespace scope.
1897 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
1898
7dbd86a5
GK
18992007-06-14 Geoff Keating <geoffk@apple.com>
1900
c96f0001
GK
1901 * decl2.c (determine_visibility): Ensure that functions with
1902 hidden types as parameters are hidden.
1903
7dbd86a5
GK
1904 PR 31093
1905 * decl2.c (determine_visibility): Remove duplicate code for
1906 handling type info.
1907
058dcc25
ILT
19082007-06-12 Ian Lance Taylor <iant@google.com>
1909
1910 PR libstdc++/29286
1911 * init.c (avoid_placement_new_aliasing): New static function.
1912 (build_new_1): Call it.
1913
b0464c88
RE
19142007-06-11 Rafael Avila de Espindola <espindola@google.com>
1915
1916 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
1917 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
1918
969c111d
JJ
19192007-06-08 Jakub Jelinek <jakub@redhat.com>
1920
1921 PR c++/32177
1922 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
1923 on init, the non-decl cond operand and increment value.
1924
c1ae8be5
SM
19252007-06-07 Simon Martin <simartin@users.sourceforge.net>
1926
1927 PR c++/30759
1928 * decl.c (check_initializer): Report an error when a brace enclosed
1929 initializer is used for a non-aggregate type in C++98.
1930 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
1931 cxx_dialect.
1932 (grokdeclarator): Likewise.
1933 (move_fn_p): Likewise.
1934 * typeck.c (check_return_expr): Likewise.
1935 * call.c (reference_binding): Likewise.
1936 * error.c (cp_cpp_error): Likewise.
1937 * pt.c (check_default_tmpl_args): Likewise.
1938 (tsubst): Likewise.
1939 * lex.c (init_reswords): Likewise.
1940 * parser.c (p_parser_primary_expression): Likewise.
1941 (TOKEN_PRECEDENCE): Likewise.
1942 (cp_parser_init_declarator): Likewise.
1943 (cp_parser_ptr_operator): Likewise.
1944 (cp_parser_parameter_declaration): Likewise.
1945 (cp_parser_enclosed_template_argument_list): Likewise.
1946 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
1947 (cp_parser_next_token_ends_template_argument_p): Likewise.
1948
b08f991d
SB
19492007-06-04 Simon Baldwin <simonb@google.com>
1950
1951 * decl.c (grokdeclarator): Readability change. Moved case labels
1952 into direct switch statement scope.
1953
cab203bf
PC
19542007-06-04 Paolo Carlini <pcarlini@suse.de>
1955
1956 * call.c (convert_like_real): Remove pointless code.
1957
46a9e521
MM
19582007-05-31 Mark Mitchell <mark@codesourcery.com>
1959
1960 * decl.c (get_atexit_fn_ptr_type): New function.
1961 (get_atexit_node): Use it.
1962 (start_cleanup_fn): Likewise.
1963 (register_dtor_fn): Use the object's destructor, instead of a
1964 separate cleanup function, where possible.
1965 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
1966 (atexit_fn_ptr_type_node): New macro.
1967 * decl2.c (build_cleanup): Use build_address.
1968
2c751309
DB
19692007-05-31 Daniel Berlin <dberlin@dberlin.org>
1970
1971 * typeck.c (build_binary_op): Include types in error.
1972
32735518
JJ
19732007-05-31 Jakub Jelinek <jakub@redhat.com>
1974
1975 PR c++/31806
1976 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
1977 needs runtime initialization.
1978
10c1d4af
PC
19792007-05-31 Paolo Carlini <pcarlini@suse.de>
1980
1981 PR c++/32158
1982 * semantics.c (finish_trait_expr): Complete the types.
1983
8af2fec4
RY
19842007-05-30 Russell Yanofsky <russ@yanofsky.org>
1985 Douglas Gregor <doug.gregor@gmail.com>
1986 Pedro Lamarao <pedro.lamarao@mndfck.org>
1987 Howard Hinnant <howard.hinnant@gmail.com>
1988
1989 PR c++/7412
1990 PR c++/29939
1991 * typeck.c (comptypes): Don't consider rvalue and lvalue
1992 reference types to be equivalent.
1993 (check_return_expr): Move from certain lvalues when returning
1994 them.
1995 * decl.c (grokdeclarator): Implement reference collapsing.
1996 (copy_fn_p): Don't consider constructors taking rvalue references
1997 to be copy constructors.
1998 (move_fn_p): New.
5be014d5 1999 * call.c (conversion): New "rvaluedness_matches_p" member.
8af2fec4
RY
2000 (convert_class_to_reference): Require reference type as first
2001 parameter instead of base type.
2002 (reference_binding): Add logic to handle rvalue references.
2003 (implicit_conversion): Update inaccurate comment.
2004 (convert_like_real): Disable creation of temporaries that are
2005 impossible to initialize for types with move constructors.
2006 (build_over_call): Elide move constructors when possible.
2007 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
2008 (maybe_handle_ref_bind): Return conversion instead of type node.
2009 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
2010 determine preferred conversion sequences.
2011 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
2012 (LOOKUP_PREFER_RVALUE): New.
2013 (DECL_MOVE_CONSTRUCTOR_P): New.
2014 (struct cp_declarator): Add "reference" member for reference
2015 types, with new "rvalue_ref" flag.
2016 (cp_build_reference_type): Declare.
2017 (move_fn_p): Declare.
2018 * error.c (dump_type_prefix): Format rvalue reference types
2019 correctly in error messages.
2020 * except.c (build_throw): Move from certain lvalues when
2021 throwing.
2022 * mangle.c (write_type): Mangle rvalue references differently
2023 than regular references.
2024 * parser.c (make_reference_declarator): Add boolean parameter for
2025 rvalue references.
2026 (cp_parser_make_indirect_declarator): New.
2027 (cp_parser_new_declarator_opt): Call
2028 cp_parser_make_indirect_declarator.
2029 (cp_parser_conversion_declarator_opt): Ditto.
2030 (cp_parser_declarator): Ditto.
2031 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
2032 declarators.
2033 * pt.c (tsubst): Implement reference collapsing.
2034 (maybe_adjust_types_for_deduction): Implement special template
2035 parameter deduction rule for rvalue references.
2036 (type_unification_real): Update calls to
2037 maybe_adjust_types_for_deduction.
2038 (try_one_overload): Ditto.
2039 (unify_pack_expansion): Ditto.
2040 * tree.c (lvalue_p_1): Handle rvalue reference types.
2041 (cp_build_reference_type): New.
2042
27edb548
JJ
20432007-05-30 Jakub Jelinek <jakub@redhat.com>
2044
2045 PR c++/31809
2046 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
2047 variables that need runtime initialization.
2048
a87db577
AP
20492007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
2050
5be014d5 2051 PR c++/31339
a87db577
AP
2052 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
2053 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
2054 case POSTDECREMENT_EXPR>): Return the error_mark_node
2055 if either the real or imaginary parts would an
2056 error_mark_node.
2057
1094da91
SM
20582007-05-25 Simon Martin <simartin@users.sourceforge.net>
2059 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2060
2061 PR c++/31745
2062 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
2063 token is a closing brace, false if there are no tokens left.
2064 (cp_parser_namespace_alias_definition): Only consume the next token if
2065 it is a closing brace.
2066
2067 * parser.c (cp_parser_class_specifier): Likewise.
2068
eb89f88c
L
20692007-05-25 H.J. Lu <hongjiu.lu@intel.com>
2070
2071 * semantics.c (finish_member_declaration): Fix a typo in the
2072 last checkin.
2073
b1d7b1c0
DG
20742007-05-25 Douglas Gregor <doug.gregor@gmail.com>
2075
2076 PR c++/31431
2077 PR c++/31432
2078 PR c++/31434
2079 PR c++/31435
2080 PR c++/31437
2081 PR c++/31438
2082 PR c++/31442
2083 PR c++/31443
2084 PR c++/31444
2085 PR c++/31445
2086 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
2087 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
2088 * pt.c (check_for_bare_parameter_packs): Return bool indicated
2089 whether everything was okay. Fix indentation.
2090 (push_template_decl_real): Check for bare parameter packs in
2091 function parameters; where errors occur, mark the parameter types
2092 with ERROR_MARK_NODEs to avert ICEs.
2093 (coerce_template_parameter_pack): New.
2094 (coerce_template_parms): Moved parameter pack coercion into
2095 coerce_template_parameter_pack, and permit it anywhere in the
2096 template parameter list (not just at the end). Parameter and
2097 argument indices can vary (somewhat) separately now, so add
2098 PARM_IDX and ARG_IDX.
2099 (fn_type_unification): Don't set an argument pack as incomplete if
2100 no argument pack was deduced.
2101 (type_unification_real): If a type parameter is a parameter pack
2102 and has not otherwise been deduced, it will be deduced to an empty
2103 parameter pack.
2104 (more_specialized_fn): Use the actual lengths of the argument
2105 lists when comparing against expansions.
2106 * semantics.c (finish_member_declaration): If a field's type has
2107 bare parameter packs, error and set its type to ERROR_MARK_NODE.
2108
5234b8f5
DS
21092007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
2110
2111 PR target/27067
2112 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
2113
8e89cbfe
OW
21142007-05-22 Ollie Wild <aaw@google.com>
2115
2116 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
2117 (unqualified_namespace_lookup): Adds check for hidden types.
2118
6936461f
OW
21192007-05-22 Ollie Wild <aaw@google.com>
2120
2121 * decl.c (duplicate_decls): Verify namespace names are unique.
2122
5c113154
MM
21232007-05-21 Mark Mitchell <mark@codesourcery.com>
2124
2125 * decl.c (cxx_maybe_build_cleanup): Handle
2126 __attribute__((cleanup)).
2127
7060db96
MLI
21282007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2129
2130 * cvt.c (cp_convert_and_check): Don't check warnings if the
2131 conversion failed.
2132
8d5b1b67
GK
21332007-05-18 Geoffrey Keating <geoffk@apple.com>
2134
2135 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
2136
9c49a5e4
PC
21372007-05-14 Paolo Carlini <pcarlini@suse.de>
2138
2139 PR c++/29928
2140 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
2141 type only if is a class type (5.2.8/4).
2142
ca5ba2a3
RAE
21432007-05-14 Rafael Avila de Espindola <espindola@google.com>
2144
2145 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
2146 * decl.c (grokdeclarator): Use unsigned_type_for instead of
2147 c_common_unsigned_type.
2148
79bedddc
SR
21492007-05-11 Silvius Rus <rus@google.com>
2150
2151 * cp/typeck.c (build_indirect_ref): Add call to
2152 strict_aliasing_warning.
2153 (build_reinterpret_cast_1): Condition call to
2154 strict_aliasing_warning.
2155
7be82279
JH
21562007-05-11 Jan Hubicka <jh@suse.cz>
2157
2158 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
2159 * decl2.c (start_objects): ctors and dtors are no longer public.
2160 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
2161
ee72fa38
AP
21622007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
2163
2164 * typeck.c (build_unary_op): Remove code that used to
2165 handle non lvalue increments/decrements.
2166
841cc7da
MS
21672007-05-07 Mike Stump <mrs@apple.com>
2168
2169 * parser.c (check_empty_body): Add.
2170 (cp_parser_iteration_statement): Add call to check_empty_body.
2171
a2aa65f0
GK
21722007-05-05 Geoffrey Keating <geoffk@apple.com>
2173
2174 PR 31775
2175 * mangle.c (write_mangled_name): Mangle static variable names.
2176 (write_unqualified_name): Use local-source-name for
2177 namespace-scope static variables.
2178
820b51ae
DM
21792007-05-04 Dirk Mueller <dmueller@suse.de>
2180
2181 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
2182 not in effect.
2183
ba992967
SP
21842007-05-02 Seongbae Park <seongbae.park@gmail.com>
2185
2186 PR c++/31663
2187 * decl2.c (constrain_class_visibility):
2188 Use strip_pointer_or_array_types instead of strip_array_types.
2189
70ec16f7
AP
21902007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
2191
2192 PR C++/30221
2193 * decl.c (reshape_init_r): Don't reshape the first element if it
2194 is a pointer to member function.
2195
631ee856
SB
21962007-04-27 Simon Baldwin <simonb@google.com>
2197
2198 * decl.c (grokparms): Changed message format from %qD to %qE.
2199
4af96f9f
DG
22002007-04-27 Douglas Gregor <doug.gregor@gmail.com>
2201
2202 * error.c (maybe_warn_variadic_templates): Variadic templates are
2203 now in C++0x, so only warn about them in C++98 mode.
2204
d333b74f
AP
22052007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
2206
2207 PR C++/30016
2208 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
2209 integeral types from vectors types.
2210
6f719560
JJ
22112007-04-26 Jakub Jelinek <jakub@redhat.com>
2212
2213 PR c++/31598
2214 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
2215 for type dependent OMP_CLAUSE_DECLs.
2216
b8063b29
MM
22172007-04-24 Mark Mitchell <mark@codesourcery.com>
2218
fb0b79e5 2219 PR c++/31338
b8063b29
MM
2220 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
2221 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
2222 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
2223 * init.c (build_zero_init): Adjust, as
2224 COMPLEX_TYPE is now a SCALAR_TYPE.
2225 * typeck2.c (digest_init): Allow brace-enclosed initializers for
2226 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
2227
b29441ec
PC
22282007-04-25 Paolo Carlini <pcarlini@suse.de>
2229
2230 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
2231 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
2232 (trait_expr_value): Adjust.
2233
0d83bf5a
SB
22342007-04-23 Simon Baldwin <simonb@google.com>
2235
2236 * decl.c (grokparms): Added new error for duplicate function
2237 parameters names in function prototypes, to match gcc behavior.
2238
09191b7e
JH
22392007-04-23 Jan Hubicka <jh@suse.cz>
2240
2241 * cp/decl2.c (finish_objects): Do not call target constructor/destructor
2242 bits dirrectly.
2243
3d95caa4
AP
22442007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
2245
2246 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
2247 instead of checking GIMPLE_STMT_P in chain_next.
2248
431ed7a1
MM
22492007-04-17 Mark Mitchell <mark@codesourcery.com>
2250
2251 PR c++/31513
2252 * call.c (convert_for_arg_passing): Convert bitfields to their
2253 declared types.
2254
f01ec37d
SM
22552007-04-17 Simon Martin <simartin@users.sourceforge.net>
2256
2257 PR c++/31517
2258 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
2259
fe24078a
SP
22602007-04-16 Seongbae Park <seongbae.park@gmail.com>
2261
2262 PR c++/29365
fe24078a
SP
2263 * cp/decl2.c (constrain_class_visibility):
2264 Do not warn about the use of anonymous namespace in the main input file.
2265
cac4ddf0
MM
22662007-04-15 Mark Mitchell <mark@codesourcery.com>
2267
2268 * cp-tree.h (current_template_parms): Fix typo in comment.
2269
a57a55de
KH
22702007-04-15 Kazu Hirata <kazu@codesourcery.com>
2271
2272 * cp-tree.h, error.c: Fix comment typos.
2273
44ba4c4e
JM
22742007-04-13 Jason Merrill <jason@redhat.com>
2275
2276 PR c++/31074
2277 * call.c (reference_binding): Add c_cast_p parm. If true,
2278 add quals to TO as needed to make it reference-compatible.
2279
ffd34392
JH
22802007-04-11 Jan Hubicka <jh@suse.cz>
2281
2282 * cp/class.c (convert_to_base_statically): Fold produced tree; verify
2283 that we are not processing template_decl.
2284
a607b96e
MM
22852007-04-09 Mark Mitchell <mark@codesourcery.com>
2286
2287 PR c++/31449
2288 * class.c (build_base_path): Ensure that the converted pointer has
2289 the same cv-qualification as the input.
2290
ea798d0f
PC
22912007-04-09 Paolo Carlini <pcarlini@suse.de>
2292
2293 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
2294
cb9c159d
SB
22952007-04-08 Steven Bosscher <steven@gcc.gnu.org>
2296
2297 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
2298 Do not set it.
2299 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
2300 * tree.c (cp_add_pending_fn_decls): Remove.
2301 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
2302
270c60bb
DB
23032007-04-07 Daniel Berlin <dberlin@dberlin.org>
2304
2305 Revert change removing staticp.
2306
1df918ac
DB
23072007-04-06 Daniel Berlin <dberlin@dberlin.org>
2308
2309 * cp-objcp-common.c (cxx_staticp): Remove.
2310 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
2311 * cp-tree.h (cxx_staticp):
2312
6acd8838
DS
23132007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
2314
2315 * class.c (check_for_override): Don't remove dllmport attribute
2316 of virtual methods.
2317
df3473fa
JJ
23182007-04-03 Jakub Jelinek <jakub@redhat.com>
2319
2320 PR c++/30847
2321 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
2322 type issue error and return early.
2323
c3b7031d
JM
23242007-03-30 Jason Merrill <jason@redhat.com>
2325
2326 PR c++/31187
2327 * typeck.c (cp_type_readonly): New fn.
2328 * cp-tree.h: Declare it.
2329 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
2330 (cp_finish_decl): Not here.
2331
6be42dd4
RG
23322007-03-31 Richard Guenther <rguenther@suse.de>
2333
2334 * optimize.c (maybe_clone_body): Replace splay-tree usage by
2335 pointer-map.
2336
d393153e
DG
23372007-03-31 Douglas Gregor <doug.gregor@gmail.com>
2338
2339 PR c++/31138
2340 PR c++/31140
2341 PR c++/31141
2342 * parser.c (declarator_can_be_parameter_pack): New.
2343 (cp_parser_template_parameter): Only parse the `...' if the
2344 declarator can be a parameter pack.
2345 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
2346 is NULL.
2347 * pt.c (find_parameter_packs_r): Look into the bounds on integer
2348 types (they could be used as array bounds).
2349 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
2350 (tsubst_pack_expansion): Handle failure to expand parameter
2351 packs.
2352
cb68ec50
PC
23532007-03-30 Paolo Carlini <pcarlini@suse.de>
2354
2355 PR c++/26099
2356 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
2357 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
2358 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
2359 (CLASS_TYPE_NON_UNION_P): Add.
2360 (struct lang_type_class): Add has_complex_dflt.
2361 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
2362 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
2363 * cp-tree.def: Add TRAIT_EXPR.
2364 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
2365 * lex.c (struct resword): Add __has_nothrow_assign,
2366 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
2367 __has_trivial_constructor, __has_trivial_copy,
2368 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
2369 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
2370 __is_pod, __is_polymorphic, __is_union.
2371 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
2372 (cp_parser_trait_expr): New.
2373 * semantics.c (finish_trait_expr, trait_expr_value
2374 classtype_has_nothrow_copy_or_assign_p): New.
2375 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
2376 as static.
2377 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
2378 * class.c (check_bases, check_field_decl, check_bases_and_members):
2379 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
2380 * pt.c (uses_template_parms, tsubst_copy_and_build,
2381 value_dependent_expression_p, type_dependent_expression_p): Deal with
2382 TRAIT_EXPR.
2383 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
2384
2a42f4aa
RG
23852007-03-29 Richard Guenther <rguenther@suse.de>
2386
2387 * tree.c (cp_walk_subtrees): Do not set input_location.
2388
71aea5f2
SM
23892007-03-28 Simon Martin <simartin@users.sourceforge.net>
2390
2391 PR c++/29077
2392 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
2393 destructor.
2394
a2ca1ab2
DG
23952007-03-28 Douglas Gregor <doug.gregor@gmail.com>
2396
2397 * parser.c (struct cp_parser): Update comment for
2398 greater_than_is_operator_p.
2399 (cp_parser_primary_expression): In C++0x mode, a cast operator can
2400 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
2401 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
2402 !GREATER_THAN_IS_OPERATOR_P.
2403 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
2404 `>>' operators that will become two `>' tokens in C++0x.
2405 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
2406 mode, allowing it to terminate default arguments.
2407 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
2408 `>>' like two consecutive `>' tokens.
2409 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
2410 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
2411 ends a template argument.
2412
9b7dd5e8
DG
24132007-03-28 Douglas Gregor <doug.gregor@gmail.com>
2414
2415 * decl.c (redeclaration_error_message): Complain when redeclaring
2416 a friend function with default template arguments (C++0x mode only).
2417 * cp-tree.h (check_default_tmpl_args): Declare.
2418 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
2419 template arguments in function templates. Add support for checking
2420 the default template arguments of friend templates.
2421 (push_template_decl_real): Fix call to check_default_tmpl_args.
2422 (type_unification_real): If a template parameter has not been
2423 deduced but provides a default template argument, substitute into
2424 that default template argument.
2425 * parser.c (cp_parser_init_declarator): When declaring (but not
2426 defining!) a function template in C++0x mode, check for default
2427 template arguments.
2428
771026dd
DG
24292007-03-28 Douglas Gregor <doug.gregor@gmail.com>
2430
2431 PR c++/29993
2432 * decl.c (grokdeclarator): Deal with cv-qualified function type
2433 typedefs in the same way for member and non-member functions.
2434
df12b78f
DM
24352007-03-26 Dirk Mueller <dmueller@suse.de>
2436
2437 * parser.c (cp_parser_member_declaration): Pedwarn
2438 about stray semicolons after member declarations.
2439
912291ca
PC
24402007-03-26 Paolo Carlini <pcarlini@suse.de>
2441
2442 PR c++/30500
2443 * pt.c (instantiate_decl): Set in_system_header.
2444
8b84995a
MM
24452007-03-22 Mark Mitchell <mark@codesourcery.com>
2446
03c17ccd
MM
2447 * cp-tree.h (current_tempalte_parms): Improve documentation.
2448 * pt.c (current_template_args): Likewise.
2449
8b84995a
MM
2450 PR c++/30863
2451 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
2452 not consume tokens when failing.
2453
725d6b87
MM
24542007-03-22 Jim Wilson <wilson@specifix.com>
2455 Mark Mitchell <mark@codesourcery.com>
2456
2457 PR c++/31273
2458 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
2459 consistent with FROM.
2460
5a023baa
GDR
24612007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2462
2463 * error.c (dump_expr): Handle dependent names that designate types.
2464 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
2465
a757b5c5
KH
24662007-03-17 Kazu Hirata <kazu@codesourcery.com>
2467
2468 * cp-tree.def, parser.c, pt.c: Fix comment typos.
2469
07231d4f
MLI
24702007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2471
2472 * cvt.c (cp_convert_and_check) : Define.
2473 * cp-tree.h (cp_convert_and_check): Declare.
2474 * call.c (convert_conversion_warnings): Rename to
2475 conversion_null_warnings. The warning for floating-point to
2476 integer is handled by convert_and_check in convert_like_real.
2477 (convert_like_real): convert_conversion_warnings was renamed as
2478 conversion_null_warnings.
2479 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
2480 overflow and changes of value during conversion.
2481
2ce88bea
MLI
24822007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2483
2484 PR c++/30891
2485 * parser.c (cp_parser_statement): If 'namespace' is found, this
2486 only can be a namespace alias definition, so parse it now.
2487 (cp_parser_namespace_alias_definition): if we find an open brace
2488 instead of '=', then this is actually a misplaced namespace
2489 definition.
2490
9b439fe1
MLI
24912007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2492
2493 PR c++/24924
2494 * decl.c (cxx_init_decl_processing): Move command-line options
2495 processing to c-opts.c.
2496
30bcc028
DG
24972007-03-15 Douglas Gregor <doug.gregor@gmail.com>
2498
2499 * ptree.c (cxx_print_type): Use formatting markup for integers
2500 when printing template parameter index/level/orig level.
2501 (cxx_print_xnode): Ditto.
2502 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
2503 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
2504 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
2505 HOST_WIDE_INTs.
2506 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
2507 rather than a HOST_WIDE_INT.
2508 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
2509 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
2510 better bit-packing.
2511 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
2512 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
2513 IN_BASE_INITIALIZER bool bitfields.
2514 (struct cp_declarator): Make KIND a 4-bit field. Make
2515 PARAMETER_PACK_P a bool bitfield just after KIND.
2516 * pt.c (uses_parameter_packs): Destroy the pointer set.
2517 (make_pack_expansion): Ditto.
2518 (check_for_bare_parameter_packs): Ditto.
2519 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
2520
344bd5a8
AP
25212007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
2522
2523 PR c++/31165
2524 * call.c (convert_default_arg): Instead of copying the node,
2525 unshare it.
2526
1f7f19c4
DM
25272007-03-15 Dirk Mueller <dmueller@suse.de>
2528
2529 PR c++/30860
2530 * call.c (convert_conversion_warnings): New..
2531 (convert_like_real): .. factored out from here.
2532 (convert_conversion_warnings): Add warning about
2533 false being converted to NULL in argument passing.
2534
62e00e94
DM
25352007-03-14 Dirk Mueller <dmueller@suse.de>
2536
2537 * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
2538 (finish_do_body): Warn about empty body in do/while statement.
2539
286d12f9
MLI
25402007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2541
2542 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
2543
2e9cb75e
MLI
25442007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2545
2546 PR c/21438
2547 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
2548 warning.
2549
403d4851
AO
25502007-03-13 Alexandre Oliva <aoliva@redhat.com>
2551
2552 * cp/repo.c (init_repo): Initialize random_seed saved options.
2553 (finish_repo): Adjust.
2554
4844b167
MM
25552007-03-13 Mark Mitchell <mark@codesourcery.com>
2556
2557 PR bootstrap/30899
2558 * Make-lang.in (doc/g++.1): Use $< to specify the location from
2559 which to copy.
2560
50d50fc7
SP
25612007-03-12 Seongbae Park <seongbae.park@gmail.com>
2562
2563 * decl.c (compute_array_index_type): New warning flag warn_vla.
2564
3026f2df
MM
25652007-03-12 Mark Mitchell <mark@codesourcery.com>
2566
2567 PR c++/30108
2568 * call.c (convert_default_arg): Copy non-constant arguments.
2569
3c38f0ff
MM
25702007-03-11 Mark Mitchell <mark@codesourcery.com>
2571
2572 PR c++/31038
2573 * parser.c (cp_parser_postfix_expression): Disallow compound
2574 literals in constant expressions.
2575
2576 PR c++/30328
2577 * semantics.c (finish_typeof): Use unlowered_expr_type.
2578
f9aa54d3
MM
25792007-03-10 Mark Mitchell <mark@codesourcery.com>
2580
2581 PR c++/30274
2582 * cp-tree.h (unlowered_expr_type): New function.
2583 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
2584 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
2585 (unlowered_expr_type): New function.
2586 (build_unary_op): Disallow predecrements of bool bitfields.
2587 * call.c (build_conditional_expr): Use unlowered_expr_type.
2588 * pt.c (type_unification_real): Likewise.
2589
5d80a306
DG
25902007-03-09 Douglas Gregor <doug.gregor@gmail.com>
2591
2592 PR c++/20599
2593 * typeck.c (check_return_expr): Check for bare parameter packs.
2594 (comptypes): Compare template parameter packs and
2595 type pack expansions.
2596 * decl.c (grokdeclarator): Deal with the declaration of function
2597 parameter packs.
2598 (grokparms): Verify that the (optional) function parameter pack is
2599 at the end of the parameter list.
2600 (xref_basetypes): Handle pack expansions in the base class.
2601 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
2602 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
2603 (NONTYPE_ARGUMENT_PACK): New.
2604 (TYPE_PACK_EXPANSION): New.
2605 (EXPR_PACK_EXPANSION): New.
2606 (ARGUMENT_PACK_SELECT): New.
2607 * cp-objcp-common.c (cp_tree_size): Compute size of
2608 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
2609 ARGUMENT_PACK_SELECT.
2610 * error.c (dump_template_argument): Print template argument packs.
2611 (dump_template_argument_list): Ditto.
2612 (dump_template_parameter): Dump `...' for template type parameter
2613 packs.
2614 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
2615 (dump_parameters): Print function parameter packs.
2616 (dump_template_parms): Print template argument packs.
2617 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
2618 (maybe_warn_variadic_templates): New.
2619 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
2620 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
2621 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
2622 CAST_EXPR.
2623 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
2624 (write_template_arg): Write argument packs as separate arguments.
2625 * cp-tree.h (struct template_parm_index_s): Add flag that
2626 indicates that the template parameter is actually a parameter
2627 pack.
2628 (struct tree_argument_pack_select): New.
2629 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
2630 (union lang_tree_node): Add argument_pack_select.
2631 (FUNCTION_PARAMETER_PACK_P): New.
2632 (PACK_EXPANSION_P): New.
2633 (PACK_EXPANSION_PATTERN): New.
2634 (SET_PACK_EXPANSION_PATTERN): New.
2635 (PACK_EXPANSION_PARAMETER_PACKS): New.
2636 (ARGUMENT_PACK_P): New.
2637 (ARGUMENT_PACK_ARGS): New.
2638 (SET_ARGUMENT_PACK_ARGS): New.
2639 (ARGUMENT_PACK_INCOMPLETE_P): New.
2640 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
2641 (TEMPLATE_PARM_PARAMETER_PACK): New.
2642 (TEMPLATE_TYPE_PARAMETER_PACK): New.
2643 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
2644 (ARGUMENT_PACK_SELECT_INDEX): New.
2645 (ARGUMENT_PACK_SELECT_ARG): New.
2646 (struct cp_declarator): Add parameter_pack_p flag.
2647 (maybe_warn_variadic_templates): Declare.
2648 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
2649 indicate a template parameter pack.
2650 (uses_parameter_packs): Declare.
2651 (template_parameter_pack_p): Declare.
2652 (template_parms_variadic_p): Declare.
2653 (make_pack_expansion): Declare.
2654 (check_for_bare_parameter_packs): Declare.
2655 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
2656 sizeof... expressions.
2657 (pp_cxx_expression): Print pack expansions and non-type argument
2658 packs.
2659 (pp_cxx_exception_specification): Print pack expansions.
2660 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
2661 (pp_cxx_ctor_initializer): Print pack expansions.
2662 (pp_cxx_type_id): Print pack expansions.
2663 (pp_cxx_template_argument_list): Print argument packs.
2664 (pp_cxx_template_parameter): Print ellipsis for template parameter
2665 packs.
2666 * pt.c (comp_template_parms): Compare template parameter packs.
2667 (template_parameter_pack_p): New.
2668 (template_parms_variadic_p): New.
2669 (template_args_variadic_p): New.
2670 (make_ith_pack_parameter_name): New.
2671 (struct find_parameter_pack_data): New.
2672 (find_parameter_packs_r): New.
2673 (uses_parameter_packs): New.
2674 (make_pack_expansion): New.
2675 (check_for_bare_parameter_packs): New.
2676 (expand_template_argument_pack): New.
2677 (reduce_template_parm_level): Propagate parameter pack flag.
2678 (process_template_parm): Add is_parameter_pack parameter to state
2679 when the parameter is actually a parameter pack. Create template
2680 parameter packs when is_parameter_pack is true.
2681 (current_template_args): The argument for a template parameter
2682 pack is an argument pack containing a single pack expansion.
2683 (process_partial_specialization): When checking that non-type
2684 argument expressions do not involve template parameters, loop over
2685 the arguments in argument packs separately.
2686 (push_template_decl_real): Check that the type of the declaration
2687 does not have any bare parameter packs. Check that primary
2688 templates have no more than one parameter pack, and that it comes
2689 at the end of the template parameter list.
2690 (convert_template_argument): Handle coercions for pack expansion
2691 expressions by coercing the pattern then rebuilding the expansion.
2692 (coerce_template_parms): When coercing the arguments for a
2693 variadic template, pack "extra" arguments into an argument pack.
2694 (coerce_template_template_parms): Cannot coerce between parameter
2695 packs and non-pack parameters.
2696 (template_args_equal): Compare PACK_EXPANSION_P expressions.
2697 (comp_template_args): Expand all template arguments packs before
2698 comparing template argument lists.
2699 (mangle_class_name_for_template): Make argument packs as separate
2700 template arguments.
2701 (for_each_template_parm_r): No need to handle BASELINK.
2702 (instantiate_class_template): Handle pack expansions in the base
2703 class list.
2704 (tsubst_pack_expansion): New.
2705 (tsubst_template_args): Handle substitutions of argument packs and
2706 pack expansion into template argument lists.
2707 (tsubst_decl): Expand function parameter packs into separate
2708 function parameters.
2709 (tsubst_arg_types): Expand a type pack expansion into separate
2710 argument types.
2711 (tsubst_exception_specification): Handle pack expansions in
2712 exception specifiers.
2713 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
2714 replacing a template parameter with its argument. If we encounter
2715 a substitution for an argument pack, just return the parameter
2716 itself.
2717 (tsubst_copy): sizeof(X...) returns the number of elements in
2718 parameter pack X. See through ARGUMENT_PACK_SELECT when the
2719 PARM_DECL is a parameter pack.
2720 (tsubst_expr): Expression pack expansions and argument packs
2721 cannot show up here; they will all be handled through function
2722 calls, sizeof, and template argument lists.
2723 (tsubst_copy_and_build): sizeof(X...) returns the number of
2724 elements in parameter pack X. Handle pack expansions in TREE_LIST
2725 and CONSTRUCTOR nodes.
2726 (fn_type_unification): Handle "incomplete" explicit template
2727 argument lists that specify some of the arguments for a template
2728 parameter pack.
2729 (type_unification_real): Unify arguments against pack expansions.
2730 (template_parm_level_and_index): New, helper function.
2731 (unify_pack_expansion): New.
2732 (unify): Unify argument packs on an argument-by-argument basis,
2733 handling variadic argument packs as well.
2734 (more_specialized_fn): Handle unification of function parameter
2735 packs. All things being equal, prefer non-variadic function
2736 templates to variadic function templates.
2737 (more_specialized_class): Prefer the variadic class template
2738 partial specialization that binds fewer arguments to a parameter
2739 pack.
2740 (regenerate_decl_from_template): Expand function parameter packs
2741 into separate parameters.
2742 (instantiate_decl): Ditto.
2743 (tsubst_initializer_list): Handle pack expansions for base-class
2744 initializers.
2745 (dependent_type_p_r): Determine dependent types in argument packs
2746 and pack expansions.
2747 (value_dependent_expression_p): Determine value-dependence of
2748 non-type argument packs.
2749 (dependent_template_arg_p): Handle argument packs.
2750 * semantics.c (finish_cond): Check for bare parameter packs.
2751 (finish_expr_stmt): Ditto.
2752 (finish_for_expr): Ditto.
2753 (finish_switch_cond): Ditto.
2754 (finish_mem_initializers): Ditto.
2755 * name-lookup.c (arg_assoc_type): Handle pack expansions and
2756 argument packs.
2757 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
2758 * parser.c (make_declarator): Declarator is not an expansion.
2759 (make_pointer_declarator): Transfer parameter pack flag to outer
2760 declarator.
2761 (make_reference_declarator): Ditto.
2762 (make_ptrmem_declarator): Ditto.
2763 (make_call_declarator): Ditto.
2764 (make_array_declarator): Ditto.
2765 (cp_parser_postfix_expression): Allow pack expansion expressions
2766 in the argument list for a call expression.
2767 (cp_parser_parenthesized_expression_list): Add new parameter
2768 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
2769 into separate arguments."
2770 (cp_parser_new_placement): Allow pack expansion expressions.
2771 (cp_parser_new_initializer): Ditto.
2772 (cp_parser_mem_initializer_list): Allow ellipsis to create a
2773 base-class initializer expansion.
2774 (cp_parser_mem_initializer): Ditto.
2775 (cp_parser_template_parameter_list): Keep track of whether the
2776 template parameter is a template parameter pack.
2777 (cp_parser_template_parameter): Parse the ellipsis to indicate a
2778 template parameter pack.
2779 (cp_parser_type_parameter): Ditto.
2780 (cp_parser_template_argument_list): Parse the ellipsis to indicate
2781 a pack expansion.
2782 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
2783 this declarator is a parameter pack.
2784 (cp_parser_parameter_declaration): The ellipsis does not end the
2785 parameter declaration, because it might be a parameter pack. Parse
2786 the ellipsis to indicate a parameter pack.
2787 (cp_parser_initializer): Allow pack expansions.
2788 (cp_parser_initializer_list): Allow ellipsis to create an
2789 initializer expansion.
2790 (cp_parser_base_clause): Allow ellipsis to create a base specifier
2791 expansion.
2792 (cp_parser_type_id_list): Allow ellipsis to create an exception
2793 specifier expansion.
2794 (cp_parser_attribute_list): Don't allow pack expansions.
2795 (cp_parser_functional_cast): Allow pack expansions.
2796 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
2797 compute the length of a parameter pack.
2798 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
2799 end a template argument.
2800 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
2801 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
2802 CAST_EXPR.
2803
63a08740
DM
28042007-03-09 Dirk Mueller <dmueller@suse.de>
2805
2806 * cp/call.c (build_new_op): Call warn_logical_operator.
2807
cc891727
VR
28082007-03-08 Volker Reichelt <reichelt@netcologne.de>
2809
1916c916
VR
2810 PR c++/30852
2811 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
2812
cc891727
VR
2813 PR c++/30534
2814 * pt.c (any_template_arguments_need_structural_equality_p):
2815 Robustify.
2816
ab53bae2
AO
28172007-03-08 Alexandre Oliva <aoliva@redhat.com>
2818
2819 * decl.c (grokdeclarator): Disable warnings for anonymous
2820 bitfields.
2821
fabb00fc
VR
28222007-03-05 Volker Reichelt <reichelt@netcologne.de>
2823
2824 * typeck2.c (readonly_error): Always emit a hard error.
2825 Remove last argument.
2826 * cp-tree.h (readonly_error): Adjust prototype.
2827 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
2828 * typeck.c (build_unary_op): Likewise.
2829 (build_modify_expr): Likewise.
2830
2a2193e0
SM
28312007-03-04 Simon Martin <simartin@users.sourceforge.net>
2832
2833 PR c++/30895
2834 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
2835
4606b05c
MLI
28362007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2837
2838 PR c++/15787
2839 * parser.c (struct cp_parser): New IN_IF_STMT.
2840 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
2841 returning if parsing the body of an 'if' statement or issuing an
2842 error and continuing.
2843 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
2844 body of 'if'.
2845 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
2846
49fedf5a
SM
28472007-03-02 Simon Martin <simartin@users.sourceforge.net>
2848
2849 PR c++/28253
2850 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
2851 for thunks.
2852
f9dedbe3
GK
28532007-03-02 Geoffrey Keating <geoffk@apple.com>
2854
2855 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
2856 Objective-C++. Don't exit early if -shared-libgcc needs to be
2857 added.
2858
4e223867
MLI
28592007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2860
2861 * typeck.c (common_base_type): Delete unused function.
2862
7fe3e184
BM
28632007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
2864
2865 * Make-lang.in: Add dummy lang.install-pdf target.
2866
41dc91a8
SB
28672007-03-01 Simon Baldwin <simonb@google.com>
2868
2869 PR c++/23689
2870 * decl.c (check_tag_decl): Added new warning for typedef ignored
2871 when it precedes an otherwise valid non-typedef declaration.
2872
94a0dd7b
SL
28732007-02-28 Sandra Loosemore <sandra@codesourcery.com>
2874
2875 * typeck.c (build_function_call): Store converted arguments
2876 in a stack-allocated array instead of building a list.
2877 (convert_arguments): Store arguments in the array passed in as an
2878 argument, and return the actual number of arguments.
2879 * call.c (build_call): Delete, and replace with...
2880 (build_call_n, build_call_a): New.
2881 (build_op_delete_call): Rewrite to avoid constructing argument lists.
2882 (build_over_call): Store converted arguments in a stack-allocated
2883 array instead of building a list.
2884 (build_cxx_call): Pass arguments in an array instead of as a list.
2885 (build_java_interface_fn_ref): Rewrite to avoid constructing
2886 argument lists.
2887 * tree.h: Update declarations to reflect above changes.
2888 * method.c (use_thunk): Use a stack-allocated array to hold
2889 the arguments instead of a list.
2890 * rtti.c (throw_bad_cast): Update call to cxx_call.
2891 (throw_bad_typeid): Likewise.
2892 (build_dynamic_cast_1): Likewise.
2893 * init.c (build_builtin_delete_call): Use build_call_n.
2894 * decl.c (expand_static_init): Likewise.
2895 * except.c (cp_protect_cleanup_actions): Likewise.
2896 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
2897 (gimplify_must_not_throw_expr): Likewise.
2898 (cxx_omp_apply_fn): Use build_call_a.
2899
57a4c089
MM
29002007-02-26 Mark Mitchell <mark@codesourcery.com>
2901
2902 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
2903 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
2904
fc8600f9
MM
29052007-02-25 Mark Mitchell <mark@codesourcery.com>
2906
2907 * cp-tree.h (static_ctors): Remove.
2908 * cp-tree.h (static_dtors): Likewise.
2909 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
2910 refactoring of tree_map hierarchy.
2911 (decl_shadowed_for_var_insert): Likewise.
2912 * semantics.c (expand_body): Use c_expand_body.
2913 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
2914 * decl2.c (static_ctors): Remove.
2915 (static_dtors): Likewise.
2916 (generate_ctor_or_dtor_function): Pass NULL_TREE to
2917 objc_generate_static_init_call. Do not call static_[cd]tors.
2918 (generate_ctor_and_dtor_functions_for_priority): Do not check for
2919 static_[cd]tors.
2920 (cp_write_global_declarations): Likewise.
2921
2ae2031e
RG
29222007-02-23 Richard Guenther <rguenther@suse.de>
2923
2924 * class.c (note_name_declared_in_class): Make declaration
2925 changes meaning a pedwarn.
2926
a0ad3539
MM
29272007-02-22 Michael Matz <matz@suse.de>
2928
2929 PR c++/29433
2930 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
2931 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
2932 dump_function_decl): Guard emitting outer scopes by new flag.
2933 * cp-lang.c (cxx_dwarf_name): New function.
2934 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
2935 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
2936 Remove functions.
2937 (push_template_decl_real, lookup_template_class): Remove calls
2938 to above functions.
2939
c88b0c50
MM
29402007-02-19 Mark Mitchell <mark@codesourcery.com>
2941
2942 * call.c (build_new_method_call): Ensure that explicit calls of
2943 destructors have type "void".
2944
c116cd05
MLI
29452007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2946
2947 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
2948 and -Walways-true with -Waddress.
2949 * cvt.c (convert_to_void): Replace unconditional warning with
2950 -Waddress.
2951
b9704fc5
KH
29522007-02-18 Kazu Hirata <kazu@codesourcery.com>
2953
2954 * decl.c, tree.c: Fix comment typos.
2955
76b9a2a1
AP
29562007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
2957
2958 PR C++/30158
2959 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
2960 statement expression if we had an error mark node.
5be014d5 2961
5039610b
SL
29622007-02-15 Sandra Loosemore <sandra@codesourcery.com>
2963 Brooks Moses <brooks.moses@codesourcery.com>
2964 Lee Millward <lee.millward@codesourcery.com>
2965
2966 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
2967 Change class to tcc_vl_exp.
2968
2969 * call.c (build_call): Use build_call_list instead
2970 of build3.
2971 (build_over_call): Likewise.
2972 (build_new_method_call): Use build_min_non_dep_call_list
2973 instead of build_min_non_dep.
2974
2975 * error.c (dump_call_expr_args): New function.
2976 (dump_aggr_init_expr_args): New function.
2977 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
2978 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
2979
2980 * cvt.c (convert_to_void): Use build_call_array instead
2981 of build3; use new AGGR_INIT_EXPR accessor macros.
2982
2983 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
2984 instead of TREE_CODE_LENGTH.
2985
2986 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
2987 AGGR_INIT_EXPR accessor macros.
2988
2989 * cp-gimplify.c (cp_gimplify_init_expr): Use
2990 AGGR_INIT_EXPR_SLOT to set the slot operand.
2991
2992 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
2993 (AGGR_INIT_EXPR_SLOT): New macro.
2994 (AGGR_INIT_EXPR_ARG): New macro.
2995 (aggr_init_expr_nargs): New macro.
2996 (AGGR_INIT_EXPR_ARGP): New macro.
2997 (aggr_init_expr_arg_iterator): New.
2998 (init_aggr_init_expr_arg_iterator): New.
2999 (next_aggr_init_expr_arg): New.
3000 (first_aggr_init_expr_arg): New.
3001 (more_aggr_init_expr_args_p): New.
3002 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
3003 (stabilize_aggr_init): New declaration.
3004 (build_min_non_dep_call_list): Likewise.
3005
3006 * tree.c (process_aggr_init_operands): New function.
3007 (build_aggr_init_array) New function.
3008 (build_cplus_new): Update to use new CALL_EXPR and
3009 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
3010 build_aggr_init_array.
3011 (build_min_non_dep_call_list) New function.
3012 (build_min_nt): Assert input code parameter is not a variable
3013 length expression class.
3014 (build_min, build_min_non_dep): Likewise.
3015 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
3016 to check for equality instead of recursing. Handle tcc_vl_exp
3017 tree code classes.
3018 (stabilize_call): Update to only handle CALL_EXPRs, not
3019 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
3020 (stabilize_aggr_init): New function.
3021 (stabilize_init): Use it.
3022
3023 * cxx-pretty-print.c (pp_cxx_postfix_expression)
3024 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
3025 AGGR_INIT_EXPR accessor macros and argument iterators.
3026
3027 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
3028 build_vl_exp. Iterate through the operands, recursively
3029 processing each one.
3030 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
3031 CALL_EXPR accessor macros.
3032 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
3033 tree code classes. Use TREE_OPERAND_LENGTH instead of
3034 TREE_CODE_LENGTH.
3035
3036 * semantics.c (finish_call_expr): Use build_nt_call_list
3037 instead of build_nt.
3038 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
3039 accessor macros. Use build_call_array to construct the
3040 CALL_EXPR node instead of build3
3041
3042 * decl2.c (build_offset_ref_call_from_tree): Use
3043 build_nt_call_list and build_min_non_dep_call_list instead
3044 of build_min_nt and build_min_non_dep.
3045
3046 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
3047 Use build_nt_call_list instead of build_min_nt.
3048
21493102
MLI
30492007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3050
3051 PR c++/28943
3052 * call.c (build_conditional_expr): Improve error message.
3053
20af23d3
DM
30542007-02-13 Dirk Mueller <dmueller@suse.de>
3055
3056 * friend.c (do_friend): Annotate warning about friend
3057 declarations in templates with OPT_Wnon_template_friend.
3058 Convert informal message from warning() to inform().
3059
8ea6dfae
SM
30602007-02-12 Simon Martin <simartin@users.sourceforge.net>
3061 Mark Mitchell <mark@codesourcery.com>
3062
3063 PR c++/14622
3064 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
3065 instantiations for variables.
3066
27f33b15
MLI
30672007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3068
3069 PR middle-end/7651
3070 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
3071 Check warn_unused_value just once.
3072
ba139ba8
MM
30732007-02-11 Mark Mitchell <mark@codesourcery.com>
3074
3075 PR c++/26988
3076 * pt.c (determine_specialization): Use skip_artificial_parms_for.
3077 (fn_type_unificiation): Likewise.
3078 (get_bindings): Likewise.
3079
3080o2007-02-06 Mark Mitchell <mark@codesourcery.com>
56fd65c7
MM
3081
3082 PR target/29487
3083 * decl.c (finish_function): Use DECL_REPLACEABLE.
3084 * tree.c (cp_cannot_inline_tree_fn): Likewise.
3085
097552fa
GDR
30862007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
3087
3088 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
3089
8893239d
RH
30902007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
3091
3092 * decl.c (grokvardecl): Don't error if !have_tls.
3093 (grokdeclarator): Likewise.
3094 * parser.c (cp_parser_omp_threadprivate): Likewise.
3095
e02a048f
JJ
30962007-02-07 Jakub Jelinek <jakub@redhat.com>
3097
3098 PR c++/30703
3099 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
3100 parameters and result decls in omp clauses.
3101 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
3102 by reference.
3103
583c0b05
DM
31042007-02-05 Dirk Mueller <dmueller@suse.de>
3105
3106 PR bootstrap/30510
3107 * parser.c (cp_parser_class_specifier): Always initialize bases.
3108
4fe70b31
PB
31092007-02-05 Paolo Bonzini <bonzini@gnu.org>
3110
3111 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
3112 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
3113 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
3114 expressions.
3115 * semantics.c (finish_omp_atomic): Store a whole expression node
3116 in operand 1, and integer_zero_node in operand 0, for dependent
3117 OMP_ATOMIC. Rewrite to make flow easier to understand.
3118
b10fc6f5
GDR
31192007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3120
3121 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
3122
3b426391
KH
31232007-02-04 Kazu Hirata <kazu@codesourcery.com>
3124
3125 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
3126 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
3127
f1283f8f
DG
31282007-02-03 Douglas Gregor <doug.gregor@gmail.com>
3129
3130 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
3131 keyword warning to -Wc++0x-compat.
3132
5e32a5cf
GDR
31332007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3134
3135 * decl.c (grokdeclarator): Update documentation.
3136
3e66d096
JJ
31372007-02-02 Jakub Jelinek <jakub@redhat.com>
3138
3139 PR c++/30536
3140 * decl.c (grokdeclarator): If __thread is used together with
3141 a storage class other than extern and static, clear thread_p
3142 after issuing diagnostics and fall through to checking the
3143 storage class.
3144
5e203bf8
RS
31452007-01-30 Roger Sayle <roger@eyesopen.com>
3146
3147 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
3148 calculating the size of an array (to avoid recursive errors).
3149
b9edb4b1
MLI
31502007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3151
3152 PR c++/24745
3153 * typeck.c (build_binary_op): Fix logic for warning. Move warning
3154 to -Wpointer-arith.
3155 * call.c (convert_like_real): Don't warn when converting to
3156 boolean type.
3157
c616e51b
MLI
31582007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3159
3160 * decl.c (pop_label): Replace warning with call to
3161 warn_for_unused_label.
3162
5cf10afb
AP
31632007-01-28 Andrew Pinski <pinskia@gmail.com>
3164
3165 PR C++/28988
3166 * semantics.c (finish_pseudo_destructor_expr): Check the
3167 destrutor name by calling check_dtor_name.
3168
54654d29
DG
31692007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
3170
3171 * lex.c (D_CPP0X): Rename.
3172 (D_CXX0X): To this.
3173 (reswords): D_CPP0X -> D_CXX0X.
3174 (init_reswords): Ditto.
3175 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
3176 of C++0x keywords as identifiers.
3177
815951d8
SM
31782007-01-23 Simon Martin <simartin@users.sourceforge.net>
3179
3180 PR c++/27492
3181 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
3182 function decls.
3183
a99e5cb4
ILT
31842007-01-23 Ian Lance Taylor <iant@google.com>
3185
3186 * typeck.c (convert_for_assignment): Only warn about a = b = c
3187 when converting to bool.
3188
dc569621
RS
31892007-01-23 Roger Sayle <roger@eyesopen.com>
3190
3191 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
3192 TREE_OVERFLOW.
3193 * typeck.c (ignore_overflows): Remove the remaining uses of
3194 TREE_CONSTANT_OVERFLOW.
3195
77dbd49b
JH
31962007-01-20 Jan Hubicka <jh@suse.cz>
3197
3198 * decl2.c (start_objects, start_static_storage_duration_function):
3199 Do not make the functions uninlinable.
3200
efb7e1e0
ILT
32012007-01-17 Ian Lance Taylor <iant@google.com>
3202
3203 * class.c (add_method): Call VEC_reserve_exact rather than passing
3204 a negative size to VEC_reserve.
3205
6f9f76e3
SM
32062007-01-11 Simon Martin <simartin@users.sourceforge.net>
3207
3208 PR c++/29573
3209 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
3210
50ef2c18
MM
32112007-01-10 Mark Mitchell <mark@codesourcery.com>
3212
3213 PR c++/28999
3214 * decl.c (make_typename_type): If the qualified name is not a
3215 type, issue an error.
3216 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
3217 formatting.
3218
157600d0
GK
32192007-01-08 Geoffrey Keating <geoffk@apple.com>
3220
3221 * rtti.c: Include target.h.
3222 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
3223 don't emit typeinfo for fundamental types as weak.
3224 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
3225
2ac7cbb5
RG
32262007-01-08 Richard Guenther <rguenther@suse.de>
3227
3228 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
3229
00c8e9f6
MS
32302007-01-08 Mark Shinwell <shinwell@codesourcery.com>
3231
3232 * call.c (standard_conversion): Pass flag to
3233 vector_types_convertible_p to disallow emission of note.
3234 * typeck.c (convert_for_assignment): Pass flag to
3235 vector_types_convertible_p to allow emission of note.
3236 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
3237 to disallow emission of note.
3238
16fd4d2d
MLI
32392007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3240
3241 PR c++/28986
3242 * typeck.c (build_binary_op): Call overflow_warning if
3243 TREE_OVERFLOW_P is true for the result and not for any of the
3244 operands.
3245
fc40d49c
LM
32462007-01-06 Lee Millward <lee.millward@codesourcery.com>
3247
3248 PR c++/19439
3249 * class.c (add_method): Don't wait until template
3250 instantiation time to complain about duplicate methods.
3251
59c0753d
MLI
32522007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3253
3254 PR c/19978
3255 * semantics.c (finish_unary_op_expr): Warn only if result
3256 overflowed and operands did not.
3257
b3c6d2ea
ILT
32582007-01-05 Ian Lance Taylor <iant@google.com>
3259
3260 * typeck.c (build_binary_op): Warn about comparing a non-weak
3261 address to NULL.
3262
3d761c46
DG
32632007-01-05 Douglas Gregor <doug.gregor@gmail.com>
3264
3265 * pt.c (tsubst): Propagate the need for structural equality checks
3266 when reducing the level of template parameters.
3267
c3e188fc
KH
32682007-01-03 Kazu Hirata <kazu@codesourcery.com>
3269
3270 * pt.c: Fix a comment typo.
3271
2c405565 32722007-01-02 Ian Lance Taylor <iant@google.com>
fbc8d2d3
ILT
3273
3274 * semantics.c (maybe_convert_cond): Optionally warn when using an
3275 assignment as a condition.
3276 * typeck.c (convert_for_assignment): Optionally warn about
3277 assigning the result of an assignment to a bool.
3278
410cf6e6
DG
32792007-01-02 Douglas Gregor <doug.gregor@gmail.com>
3280
3281 * pt.c (canonical_template_parms): Correct typo in comment.
3282
06d40de8
DG
32832007-01-02 Douglas Gregor <doug.gregor@gmail.com>
3284
3285 * typeck.c (structural_comptypes): Renamed from "comptypes".
3286 (comptypes): Use canonical type information to perform fast type
3287 comparison. When VERIFY_CANONICAL_TYPES, verify that the
3288 canonical type comparison returns the same results as we would see
3289 from the current, structural check. Support COMPARE_STRUCTURAL
3290 when we need structural checks.
3291 * decl.c (typename_compare): Fix comment.
3292 (build_typename_type): TYPENAME_TYPE nodes require structural
3293 equality checks, because they resolve different based on the
3294 current class type.
3295 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
3296 require structural equality checks (for now).
3297 (build_ptrmemfunc_type): Build the canonical pointer to member
3298 function type.
3299 (compute_array_index_type): Whenever we build a new index type
3300 to represent the size of an array in a template, we need to mark
3301 this index type as requiring structural equality. This goes for
3302 arrays with value-dependent sizes with the current ABI, or all
3303 arrays with ABI-1.
3304 * tree.c (cplus_array_hash): New.
3305 (struct cplus_array_info): New.
3306 (cplus_array_compare): New.
3307 (cplus_array_htab): New.
3308 (build_cplus_array_type_1): Use a hash table to cache the array
3309 types we build. Build the canonical array type for each array
3310 type.
3311 (cp_build_qualified_type_real): When building a cv-qualified array
3312 type, use the hash table of array types and build canonical array
3313 types as necessary.
3314 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
3315 use structural equality (for now).
3316 * cp-tree.h (COMPARE_STRUCTURAL): New.
3317 * pt.c (canonical_template_parms): New.
3318 (canonical_type_parameter): New.
3319 (process_template_parm): Find the canonical type parameter.
3320 (lookup_template_class): When we have named the primary template
3321 type, set the canonical type for our template class to the primary
3322 template type. If any of the template arguments need structural
3323 equality checks, the template class needs structural equality
3324 checks.
3325 (tsubst): When reducing the level of a template template
3326 parameter, we require structural equality tests for the resulting
3327 parameter because its template parameters have not had their types
3328 canonicalized. When reducing a template type parameter, find the
3329 canonical reduced type parameter.
3330 (any_template_arguments_need_structural_equality_p): New.
3331
This page took 0.673843 seconds and 5 git commands to generate.