aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/ChangeLog
blob: 60f08e11e72cfa8047b952d26198a13050b5f64f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
2010-03-30  Jason Merrill  <jason@redhat.com>

	PR c++/41185
	PR c++/41786
	* parser.c (cp_parser_direct_declarator): Don't allow VLAs in
	function parameter context.  Don't print an error if parsing
	tentatively.

2010-02-12  Jason Merrill  <jason@redhat.com>

	PR c++/43024
	* name-lookup.h (current_binding_level): Check for null
	cp_function_chain.

2010-02-12  Jakub Jelinek  <jakub@redhat.com>

	PR c++/43033
	* name-lookup.c (pushdecl_maybe_friend): Check default args of t
	instead of x.

2010-01-21  Release Manager

	* GCC 4.4.3 released.

2010-01-14  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/42674
	* decl.c (finish_function): Don't emit -Wreturn-type warnings in
	functions with noreturn attribute.

2010-01-14  Jason Merrill  <jason@redhat.com>

	PR c++/42655
	* call.c (convert_like_real): Do full decay_conversion for ck_rvalue.

2009-12-22  Jason Merrill  <jason@redhat.com>

	PR c++/42331
	* typeck.c (cp_build_modify_expr): Fix thinko.

2009-12-21  Jason Merrill  <jason@redhat.com>

	* mangle.c (write_member_name): Move abi-version=1 code back to...
	(write_expression): ...here.

2009-12-16  Jason Merrill  <jason@redhat.com>

	PR c++/42387
	* decl.c (compute_array_index_type): Mark a VLA as dependent.

2009-12-15  Jakub Jelinek  <jakub@redhat.com>

	PR c++/41183
	* cp-tree.h (current_class_ptr): Give NULL even when cfun
	has NULL cfun->language.

2009-11-13  Jason Merrill  <jason@redhat.com>

	PR c++/27425
	PR c++/34274
	PR c++/42301
	* pt.c (expand_template_argument_pack): Handle null arg gracefully.
	(convert_template_argument): Use %T for type.

2009-11-17  Jakub Jelinek  <jakub@redhat.com>

	PR c++/42061
	* call.c (reference_binding): Return NULL for initializer list with
	error operand inside of it.

	PR c++/42059
	* typeck.c (cp_build_modify_expr): For initializer list call
	check_array_initializer to make sure lhs isn't a VLA.

2009-11-13  Jason Merrill  <jason@redhat.com>

	PR c++/21008, DR 515
	* semantics.c (finish_non_static_data_member): Don't check
	derivation in a template.

2009-11-12  Jason Merrill  <jason@redhat.com>

	PR c++/37037
	* decl.c (grokdeclarator): Don't generate a void PARM_DECL.

2009-11-09  Jason Merrill  <jason@redhat.com>

	PR c++/41972
	* parser.c (cp_parser_template_argument): Accept SCOPE_REF around
	VAR_DECL.

2009-11-09  Jason Merrill  <jason@redhat.com>

	PR c++/41994
	* pt.c (tsubst_baselink): tsubst the name.

2009-11-06  Jason Merrill  <jason@redhat.com>

	PR c++/9381
	* decl2.c (build_memfn_type): Preserve attributes.
	* tree.c (canonical_type_variant): Likewise.
	* call.c (standard_conversion): Use build_memfn_type.
	* pt.c (tsubst): Likewise.
	* decl.c (build_ptrmem_type): Likewise

2009-11-06  Jakub Jelinek  <jakub@redhat.com>

	PR c++/41967
	* parser.c (cp_parser_omp_for_loop): After diagnosing not perfectly
	nested loop and parsing statements, don't cp_parser_require }, instead
	exit the loop if next token is CPP_EOF.

2009-11-04  Jason Merrill  <jason@redhat.com>

	PR c++/35067
	* method.c (use_thunk): Check DECL_WEAK as well as
	DECL_ONE_ONLY.

2009-11-03  Jason Merrill  <jason@redhat.com>

	PR c++/36959
	* decl2.c (cxx_callgraph_analyze_expr): Don't reference a function
	just because a static variable in it is needed unless -frepo.

2009-11-03  Jason Merrill  <jason@redhat.com>

	PR c++/41876
	* parser.c (cp_parser_exception_declaration): Pass true to
	is_condition parm of cp_parser_type_specifier_seq.
	(cp_parser_omp_for_loop): Likewise.

	PR c++/39786, Core issue 812, 861
	* name-lookup.c (qualified_lookup_using_namespace): Overhaul.

2009-11-02  Dodji Seketeli  <dodji@redhat.com>

	PR c++/37093
	* pt.c (check_valid_ptrmem_cst_expr): New function.
	(convert_nontype_argument): Use it to output an error for
	illegal pointer to member expressions used as template arguments.

2009-10-31  Jason Merrill  <jason@redhat.com>

	PR c++/41754
	* call.c (compare_ics): Avoid bad union use when
	comparing two ck_lists.

2009-10-23  Dodji Seketeli  <dodji@redhat.com>

	PR c++/40808
	* mangle.c (write_template_args): Allow mangling of empty template
	argument list. Updated function comments.

2009-10-21  Jakub Jelinek  <jakub@redhat.com>

	* mangle.c (finish_mangling_get_identifier): Use
	obstack_base (mangle_obstack) instead of name_base.

2009-10-15  Jason Merrill  <jason@redhat.com>

	PR c++/38798
	* parser.c (CP_PARSER_FLAGS_NO_TYPE_DEFINITIONS): New.
	(cp_parser_type_specifier): Don't try to parse a class-specifier
	or enum-specifier in that case.
	(cp_parser_trailing_type_id): New.
	(cp_parser_late_return_type_opt): Call it.
	(cp_parser_type_id_1): Add is_trailing_return parm.
	(cp_parser_type_specifier_seq): Likewise.

2009-10-14  Larry Evans  <cppljevans@suddenlink.net>

	PR c++/40092
	* tree.c (cp_tree_equal): Add test for TEMPLATE_PARM_PARAMETER_PACK
	equality.

2009-10-12  Jason Merrill  <jason@redhat.com>

	PR c++/37875
	* parser.c (cp_parser_decltype): Set greater_than_is_operator_p.

	PR c++/37766
	* pt.c (type_unification_real): Call convert_template_argument
	for function default template arguments.
	(check_default_tmpl_args): Suggest -std=c++0x when function default
	template args seen in C++98 mode.

2009-10-11  Jason Merrill  <jason@redhat.com>

	PR c++/37204
	* typeck.c (build_reinterpret_cast_1): Handle rvalue refs
	properly.

2009-10-15  Release Manager

	* GCC 4.4.2 released.

2009-10-07  Jason Merrill  <jason@redhat.com>

	PR c++/39863
	* pt.c (tsubst_pack_expansion): Don't do anything now if we
	have incomplete packs of different lengths.

	PR c++/41038
	* tree.c (build_qualified_name): Call convert_from_reference.

	* pt.c (register_specialization): Push DECL_SOURCE_LOCATION to the
	clones.

	* decl.c (grok_special_member_properties): Only adjust
	TYPE_HAS_COMPLEX_* if the function is defaulted in the class body.
	(cp_finish_decl): Push DECL_DELETED_FN/DECL_DEFAULTED_FN to the
	clones.

2009-09-23  Dodji Seketeli  <dodji@redhat.com>

	PR debug/41065
	* decl.c (cp_finish_decl): Record the types used by the global
	variable declaration we've just parsed.

2009-09-18  Jason Merrill  <jason@redhat.com>

	* pt.c (get_pattern_parm): New.
	(listify): Split out from...
	(listify_autos): ...here.
	(unify): Deduce std::initializer_list for T.
	* call.c (build_over_call): Warn about it.

2009-09-09  Jack Howarth  <howarth@bromo.med.uc.edu>

	PR bootstrap/41180
	* Make-lang.in: Remove redundant code from linkage for darwin10.

2009-08-31  Jason Merrill  <jason@redhat.com>

	PR c++/41127
	* parser.c (cp_parser_enum_specifier): Make sure the : is followed by a
	type-specifier-seq before we commit.

2009-08-21  Jakub Jelinek  <jakub@redhat.com>

	PR c++/41131
	* tree.c (lvalue_p_1) <case CONST_DECL>: Return clk_none if
	not TREE_STATIC.

2009-08-05  Jason Merrill  <jason@redhat.com>

	PR c++/40948
	* init.c (build_vec_init): Evaluate the initializer before
	starting the initialization try block.

2009-08-04  Dodji Seketeli  <dodji@redhat.com>

	PR c++/39987
	* pt.c (tsubst_default_argument): Let access checks of the
	default argument happen in the context of the current function.

2009-08-04  Dodji Seketeli  <dodji@redhat.com>

	PR debug/39706
	* error.c (lang_decl_name): Print qualified names for decls
	in  namespace scope.

2009-08-03  Jason Merrill  <jason@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>

	PR c++/40948
	* init.c (build_vec_init): Look through a TARGET_EXPR around a
	CONSTRUCTOR.

2009-07-26  Simon Martin  <simartin@users.sourceforge.net>

	PR c++/40749
	* decl.c (grokdeclarator): Do not set TREE_NO_WARNING for functions
	with a qualified return type.

2009-07-24  Jason Merrill  <jason@redhat.com>

	Core issue 702
	* call.c (compare_ics): Give list-initialization of std::init_list
	priority over conversion to scalar, too.

2009-07-21  Jason Merrill  <jason@redhat.com>

	Core issue 934
	* call.c (reference_binding): Implement binding to { }.
	(initialize_reference): Binding temporary to non-const && is fine.
	* decl.c (grok_reference_init): Remove error for CONSTRUCTOR.

2009-07-22  Release Manager

	* GCC 4.4.1 released.

2009-07-14  Jason Merrill  <jason@redhat.com>

	PR c++/40740
	* semantics.c (perform_koenig_lookup): Handle empty template args.

2009-07-12  Jason Merrill  <jason@redhat.com>

	PR c++/36628
	* tree.c (rvalue): Use lvalue_or_rvalue_with_address_p.

	PR c++/37206
	* cp-tree.h (enum cp_lvalue_kind_flags): Add clk_rvalueref.
	* tree.c (lvalue_p_1): Return it.  Remove
	treat_class_rvalues_as_lvalues parm.
	(real_lvalue_p): Disallow pseudo-lvalues here.
	(lvalue_or_rvalue_with_address_p): New fn.
	* call.c (initialize_reference): Use it instead of real_lvalue_p.

	PR c++/40689
	* init.c (build_new_1): Handle initializer list as array initializer.
	(build_vec_init): Likewise.
	* typeck.c (cp_build_modify_expr): Likewise.
	* typeck2.c (process_init_constructor_array): Error rather than abort
	if too many initializers.

2009-07-10  Jakub Jelinek  <jakub@redhat.com>

	PR c++/40502
	* error.c (cp_print_error_function): Check for NULL block.

2009-07-09  Dodji Seketeli  <dodji@redhat.com>

	PR c++/40684
	* pt.c (type_unification_real): Use tsubst_template_arg instead
	of tsubst to substitute default template arguments.

2009-07-07  Jason Merrill  <jason@redhat.com>

	PR c++/35828
	* pt.c (tsubst_decl): Don't abort if we didn't change anything
	in a TEMPLATE_DECL's args.

	PR c++/37816
	* decl.c (build_enumerator): Don't add enumerators for a
	scoped enum to the enclosing class.

	PR c++/40639
	* decl.c (start_enum): Allow dependent underlying type.

	PR c++/40633
	* decl.c (finish_enum): Finish scope even in a template.

2009-07-04  Jason Merrill  <jason@redhat.com>

	PR c++/40619
	* tree.c (cp_tree_equal) [PARM_DECL]: Don't check parm index.

2009-06-30  Jason Merrill  <jason@redhat.com>

	PR c++/40595
	* pt.c (tsubst_pack_expansion): Handle unexpanded packs in an
	EXPR_PACK_EXPANSION.

2009-06-24  Jason Merrill  <jason@redhat.com>

	PR c++/40342
	* decl.c (decls_match): Check DECL_TI_TEMPLATE too.
	* class.c (resolve_address_of_overloaded_function): Fix typo.

2009-06-09  Jason Merrill  <jason@redhat.com>

	PR c++/40381
	* decl2.c (mark_used): Return after complaining about deleted fn.

2009-06-08  Jason Merrill  <jason@redhat.com>

	* parser.c (cp_parser_type_id_1): 'auto' type is ok with a
	late-specified return type.

2009-06-08  Jakub Jelinek  <jakub@redhat.com>

	PR c++/40373
	* call.c (check_dtor_name): Return false even if
	get_type_value (name) is error_mark_node.

	PR c++/40370
	PR c++/40372
	* parser.c (cp_parser_direct_declarator): Don't set TREE_SIDE_EFFECTS
	on error_mark_node.  Check for VLAs outside of function context
	before check whether to wrap bounds into a NOP_EXPR with
	TREE_SIDE_EFFECTS.

2009-06-02  Jason Merrill  <jason@redhat.com>

	PR c++/40308
	PR c++/40311
	* typeck.c (cp_build_modify_expr): Always pass init-lists to the
	conversion code.
	* call.c (implicit_conversion): Allow init-list conversion to scalar
	during direct-initialization, too.  Mark the conversion bad if it
	has too many levels of braces.
	(convert_like_real): And give a helpful error.

	PR c++/40306
	PR c++/40307
	* decl.c (cp_finish_decl): Handle auto deduction from ().
	* typeck.c (build_x_indirect_ref): Handle dereferencing an operand
	with dependent type that is known to be a pointer.

2009-05-27  Jason Merrill  <jason@redhat.com>

	* call.c (implicit_conversion): Handle conversion from
	initializer-list to scalar.
	(convert_like_real): Likewise.  Avoid crashing on list
	initialization with bad conversions.

2009-05-22  Jason Merrill  <jason@redhat.com>

	PR c++/38064
	* typeck.c (cp_build_binary_op): Allow ENUMERAL_TYPE in
	arithmetic comparisons.
	(cp_common_type): Handle scoped enums.

2009-05-16  Jason Merrill  <jason@redhat.com>

	PR c++/40139
	* semantics.c (finish_id_expression): Fix logic.

2009-05-06  Dodji Seketeli  <dodji@redhat.com>

	PR c++/17395
	* pt.c (tsubst_copy) <case PARM_DECL>: We don't want to tsubst the
	whole list of PARM_DECLs, just the current one.

2009-05-05  Jakub Jelinek  <jakub@redhat.com>

	PR c++/40013
	* pt.c (tsubst): If magic NOP_EXPR with side-effects has no type,
	set it from its operand's type after tsubst_expr.

2009-04-23  Dodji Seketeli  <dodji@redhat.com>

	PR c++/38228
	* pt.c (unify): Do not allow the result of a template argument
	deduction to be a METHOD_TYPE.
	* cvt.c (cp_convert): Report a meaningful error for non-valid use
	of pointer to member functions during conversions.
	* call.c (build_new_op): Report a meaningful error for non-valid
	use of pointer to member functions in binary expressions.
	* typeck.c (invalid_nonstatic_memfn_p): Do not crash when EXPR is
	NULL;

2009-04-22  Dodji Seketeli  <dodji@redhat.com>

	PR c++/39639
	* parser.c (cp_parser_template_argument_list): Display an error
	when an ellipsis is not preceded by a parameter pack. Also, warn
	about variadic templates usage without -std=c++0x.

2009-04-21  Release Manager

	* GCC 4.4.0 released.

2009-04-14  Jason Merrill  <jason@redhat.com>

	PR c++/39763
	* name-lookup.c (pushdecl_maybe_friend): Avoid all warnings
	about shadowing by tentative parms.

2009-04-13  Jason Merrill  <jason@redhat.com>

	PR c++/39480
	* call.c (build_over_call): Don't call memcpy if the target is
	the same as the source.

	PR c++/39750
	* pt.c (uses_template_parms): Handle CONSTRUCTOR.

2009-04-12  Jason Merrill  <jason@redhat.com>

	PR c++/39742
	* call.c (joust): Don't crash on variadic fn.

2009-04-10  H.J. Lu  <hongjiu.lu@intel.com>

	Backport from mainline:
	2009-04-10  Jason Merrill  <jason@redhat.com>

	PR c++/28301
	* parser.c (cp_parser_skip_to_end_of_block_or_statement): Return
	if we see a close brace without an open brace.

2009-04-08  Dodji Seketeli  <dodji@redhat.com>

	PR c++/39637
	* parser.c (cp_parser_enumerator_definition): Make sure the
	initializer of the enumerator doesn't contain any bare parameter pack.

2009-04-07  Jason Merrill  <jason@redhat.com>

	PR c++/34691
	* name-lookup.c	(merge_functions): Keep multiple extern "C" functions.
	* call.c (joust): Complain about mismatched default arguments
	in extern "C" functions.
	* class.c (resolve_address_of_overloaded_function): Handle multiple
	extern "C" functions.
	* pt.c (resolve_overloaded_unification): Likewise.

	* decl.c (grokdeclarator): Reject pointer to qualified function
	type.

	PR c++/37806, core issue 547
	* typeck.c (cp_apply_type_quals_to_decl): Don't apply any quals
	to a typedef.
	* tree.c (cp_build_qualified_type_real): Don't apply restrict to a 
	function type.
	* decl.h (enum decl_context): Add TEMPLATE_TYPE_ARG.
	* decl.c (groktypename): Add is_template_arg parameter.
	(grokdeclarator): Allow function cv-quals on a template type arg.
	* parser.c (cp_parser_new_type_id, cp_parser_type_id): Add
	is_template_arg argument in calls to groktypename.
	* cp-tree.h: Adjust prototype.
	* error.c (dump_type_prefix, dump_type_suffix): Fix plain 
	FUNCTION_TYPE printing.
	
2009-04-06  Jason Merrill  <jason@redhat.com>

	PR c++/35146
	* pt.c (fn_type_unification): For DEDUCE_EXACT check that
	the deduced template arguments give us the parameter types
	we're looking for.

2009-04-05  Jason Merrill  <jason@redhat.com>

	C++ DR 613
	* semantics.c (finish_non_static_data_member): Allow such references
	without an associated object in sizeof/decltype/alignof.

2009-04-03  Jason Merrill  <jason@redhat.com>

	PR c++/39608
	* semantics.c (finish_id_expression): Don't assume a dependent
	member of the current instantiation isn't a valid integral
	constant expression.  Check dependent_scope_p.
	* pt.c (dependent_scope_p): Check TYPE_P.
	(tsubst_copy): If args is null, just return.

2009-04-02  Jason Merrill  <jason@redhat.com>

	* mangle.c (write_expression): Mangle dependent name as
	source-name.

	PR c++/38030, 38850, 39070
	* pt.c (type_dependent_expression_p_push): New fn.
	(tsubst_copy_and_build) [CALL_EXPR]: Only do arg-dep lookup when the
	substitution makes the call non-dependent.  Preserve koenig_p.
	* parser.c (cp_parser_postfix_expression): Only do arg-dep lookup
	for non-dependent calls.
	* semantics.c (finish_call_expr): Revert earlier changes.
	* cp-tree.h: Revert change to finish_call_expr prototype.

2009-03-30  Jakub Jelinek  <jakub@redhat.com>

	Revert

	2009-03-27  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	PR c++/35652
	* typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.

2009-03-28  Jakub Jelinek  <jakub@redhat.com>

	PR c++/39554
	* parser.c (cp_parser_postfix_expression): Don't call
	warning_if_disallowed_function_p.

2009-03-27  Andrew Pinski  <andrew_pinski@playstation.sony.com>

	PR c++/38638
	* parser.c (cp_parser_elaborated_type_specifier): If we have a
	typename tag and don't have either a TYPE_DECL or a
	TEMPLATE_ID_EXPR, set the type to NULL.

2009-03-27  Simon Martin  <simartin@users.sourceforge.net>

	PR c++/37647
	* decl.c (grokdeclarator): Reject [con|de]stuctors in a non-class
	scope.

2009-03-27  Simon Martin  <simartin@users.sourceforge.net>

	PR c++/29727
	* decl.c (check_array_designated_initializer): Handle error_mark_node.

2009-03-27  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	PR c++/35652
	* typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.

2009-03-26  Andrew Haley  <aph@redhat.com>

	PR C++/39380
	* decl2.c (possibly_inlined_p): If java exceptions are in use
	don't inline a decl unless it is explicitly marked inline.
	* lex.c: (pragma_java_exceptions): New variable.
	(handle_pragma_java_exceptions): Set pragma_java_exceptions.
	* cp-tree.h (pragma_java_exceptions): Declare new variable.

2009-03-24  Jason Merrill  <jason@redhat.com>

	PR c++/28274
	* name-lookup.c (pushdecl_maybe_friend): Check default args later.

2009-03-23  Jakub Jelinek  <jakub@redhat.com>

	PR c/39495
	* semantics.c (handle_omp_for_class_iterator): Swap cond operands and
	code if iter is the second operand.
	* parser.c (cp_parser_binary_expression): Add no_toplevel_fold_p
	argument.  If it is set, don't build the toplevel expression with
	build_x_binary_op, but build2.
	(cp_parser_assignment_expression,  cp_parser_omp_for_incr): Adjust
	callers.
	(cp_parser_omp_for_cond): Don't assume the first operand of the
	comparison must be decl.

2009-03-23  Jason Merrill  <jason@redhat.com>

	PR c++/37729
	* pt.c (make_fnparm_pack): Split out from...
	(instantiate_decl): ...here.
	(tsubst_pack_expansion): Handle being called in a late-specified
	return type.

	PR c++/39526
	* name-lookup.c (pushdecl_maybe_friend): Don't warn about shadowing
	a parm with a parm.

2009-03-20  Jason Merrill  <jason@redhat.com>

	PR c++/28879
	* parser.c (cp_parser_direct_declarator): In a template, wrap 
	non-constant expression in NOP_EXPR with TREE_SIDE_EFFECTS set.
	* pt.c (tsubst): Preserve it in a partial instantiation.
	(dependent_type_p_r): Don't check value_dependent_expression_p.
	* decl.c (compute_array_index_type): Don't check
	value_dependent_expression_p if TREE_SIDE_EFFECTS.

	C++ core issue 703
	* typeck2.c (check_narrowing): Don't complain about loss of 
	precision when converting a floating-point constant.

2009-03-19  Jakub Jelinek  <jakub@redhat.com>

	PR c/39495
	* parser.c (cp_parser_omp_for_cond): Don't check lhs if decl is NULL.
	(cp_parser_omp_for_loop): Always use cp_parser_omp_for_cond.

2009-03-18  Jakub Jelinek  <jakub@redhat.com>

	* parser.c (struct cp_token): Reorder fields for 64-bit hosts.
	(eof_token): Adjust.

2009-03-18  H.J. Lu  <hongjiu.lu@intel.com>

	PR c++/39425
	* parser.c (cp_parser_explicit_specialization): Don't skip the
	rest of the specialization when begin_specialization returns
	false.

2009-03-17  Jason Merrill  <jason@redhat.com>

	* decl.c (grokfndecl): Set DECL_CONTEXT on parms.
	(duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms.
	* pt.c (check_explicit_specialization): Likewise.
	(tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a
	local specialization.
	* tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name.
	* decl2.c (parm_index): New fn.
	* semantics.c (finish_decltype_type): Don't use describable_type.
	* mangle.c (write_expression): Likewise.  Mangle ALIGNOF_EXPR.
	Give a sorry for unsupported codes rather than crash.  Mangle
	conversions with other than 1 operand.  New mangling for PARM_DECL.
	* operators.def (ALIGNOF_EXPR): Mangle as "az".

2009-03-17  Jing Yu  <jingyu@google.com>

	PR middle-end/39378
	* method.c (use_thunk): Change is_thunk from crtl to cfun.

2009-03-17  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/39475
	* semantics.c (check_trait_type): New.
	(finish_trait_expr): Use it.

2009-03-17  Jakub Jelinek  <jakub@redhat.com>

	* name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
	instead of calling imported_module_or_decl debug hook if
	building_stmt_tree ().
	* cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
	is a NAMESPACE_DECL.

	PR debug/37890
	* name-lookup.c (do_namespace_alias): Don't call global_decl debug
	hook at function scope.

	PR debug/39471
	* cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
	on IMPORTED_DECL.

2009-03-09  Jakub Jelinek  <jakub@redhat.com>

	PR c++/39371
	* semantics.c (finish_switch_cond): Don't call get_unwidened.
	* decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
	instead of TREE_TYPE (cond).

2009-03-08  H.J. Lu  <hongjiu.lu@intel.com>

	PR c++/39060
	* parser.c (cp_parser_late_parsing_default_args): Continue
	the loop when cp_parser_assignment_expression returns
	error_mark_node.

2009-03-07  Jason Merrill  <jason@redhat.com>

	PR c++/39367
	* init.c (build_new_1): Don't use a VLA type.
	(build_vec_init): Handle getting a pointer for BASE.

2009-03-06  H.J. Lu  <hongjiu.lu@intel.com>

	PR c++/37520
	* cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
	when mangling symbols.

2009-03-06  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/33492
	* error.c (dump_expr): Don't try to print THROW_EXPRs in full.

2009-03-06  Alexandre Oliva  <aoliva@redhat.com>

	* decl.c (record_builtin_java_type): Use canonicalized integer
	types.

2009-03-04  Jason Merrill  <jason@redhat.com>

	PR c++/38908
	* class.c (is_really_empty_class): New fn.
	* cp-tree.h: Declare it.
	* cp-objcp-common.c (cp_expr_size): Use it.

	PR c++/13549
	* semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
	* parser.c (cp_parser_postfix_expression): Call it for 
	TEMPLATE_ID_EXPR.
	* tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
	(get_first_fn): Likewise.

	PR c++/9634
	PR c++/29469
	PR c++/29607
	Implement DR 224.
	* decl.c (make_typename_type): Do look inside currently open classes.
	* parser.c (cp_parser_lookup_name): Likewise.
	(cp_parser_template_name): Likewise.
	* pt.c (dependent_scope_p): New function.
	* cp-tree.h: Declare it.
	* class.c (currently_open_class): Return fast if T isn't a class.

2009-02-26  H.J. Lu  <hongjiu.lu@intel.com>

	PR c++/37789
	* parser.c (cp_parser_mem_initializer): Return error_mark_node
	if cp_parser_mem_initializer_id returns error_mark_node.

2009-02-24  Richard Guenther  <rguenther@suse.de>

	PR c++/39242
	* pt.c (instantiate_decl): Do not instantiate extern, non-inline
	declared functions.

2009-02-23  H.J. Lu  <hongjiu.lu@intel.com>

	PR c++/36411
	* pt.c (coerce_template_template_parms): Return 0 if parameter
	is error_mark_node.

2009-02-23  Jason Merrill  <jason@redhat.com>

	* pt.c (unify): Call maybe_adjust_types_for_deduction when
	deducing from an initializer list.

2009-02-20  Jason Merrill  <jason@redhat.com>

	PR c++/39225
	* decl.c (grokdeclarator): Handle ~identifier.

2009-02-19  Jakub Jelinek  <jakub@redhat.com>

	PR target/39175
	* decl2.c (determine_visibility): If visibility changed and
	DECL_RTL has been already set, call make_decl_rtl to update symbol
	flags.

2009-02-19  H.J. Lu  <hongjiu.lu@intel.com>

	PR c++/39188
	* cp-tree.h (maybe_commonize_var): New.

	* decl.c (maybe_commonize_var): Make it extern.

	* decl2.c (finish_anon_union): Call maybe_commonize_var.

2009-02-18  H.J. Lu  <hongjiu.lu@intel.com>

	PR c++/39219
	* parser.c (cp_parser_enum_specifier): Apply all attributes.

2009-02-18  Jason Merrill  <jason@redhat.com>

	* cfns.h: Tweak pathname for cfns.gperf.

2009-02-13  Jason Merrill  <jason@redhat.com>

	PR c++/39070
	* semantics.c (finish_call_expr): Change koenig_p parm to int.
	If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
	* cp-tree.h: Adjust prototype.
	* pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.

2009-02-12  Jason Merrill  <jason@redhat.com>

	PR c++/38950
	* pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.

2009-02-11  Jason Merrill  <jason@redhat.com>

	PR c++/39153
	* decl2.c (cp_write_global_declarations): 
	Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.

	PR c++/30111
	* init.c (build_value_init_noctor): Split out from...
	(build_value_init): ...here.
	(expand_aggr_init_1): Handle value-initialization.
	* cp-tree.h: Add declaration.
	* class.c (type_has_user_provided_constructor): 
	Handle non-class arguments.

2009-02-10  Jason Merrill  <jason@redhat.com>

	PR c++/38649
	* class.c (defaultable_fn_p): Handle ... properly.

	PR c++/36744
	* tree.c (lvalue_p_1): Condition rvalue ref handling on
	treat_class_rvalues_as_lvalues, too.

2009-02-10  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/34397
	* typeck.c (build_x_array_ref): New.
	* cp-tree.h: Declare it.
	* pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.

2009-02-09  Jason Merrill  <jason@redhat.com>

	PR c++/39109
	* semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
	* init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
	* tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
	* cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
	for build_value_init TARGET_EXPR.
	* cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.

2009-02-06  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/35147
	PR c++/37737
	* cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.

2009-02-04  Jakub Jelinek  <jakub@redhat.com>

	PR c++/39095
	* operators.def: Use COMPONENT_REF code for ->/pt operator again,
	remove ./dt operator.
	* mangle.c (write_expression): Handle COMPONENT_REF after handling
	ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
	write_string ("dt") instead of using operators.def.

2009-02-03  Jason Merrill  <jason@redhat.com>

	* typeck.c (cp_build_unary_op): Only complain about taking address
	of main if pedantic.

2009-02-03  Jakub Jelinek  <jakub@redhat.com>

	PR inline-asm/39059
	* parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.

	PR c++/39056
	* typeck2.c (digest_init_r): Don't call process_init_constructor
	for COMPLEX_TYPE.

2009-02-03  Paolo Bonzini  <bonzini@gnu.org>

	PR c++/36897
	* pt.c (convert_nontype_argument_function): Expect expr to be an
	ADDR_EXPR.

	PR c++/37314
	* typeck.c (merge_types): Call resolve_typename_type if only
	one type is a typename.

2009-02-02  Jason Merrill  <jason@redhat.com>

	PR c++/39054
	* parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node 
	in BIT_NOT_EXPR.

2009-02-01  Paolo Carlini  <paolo.carlini@oracle.com>

        PR c++/39053
        * parser.c (cp_parser_pure_specifier): If there are no tokens left
        do not call cp_lexer_consume_token.

2009-01-30  Jakub Jelinek  <jakub@redhat.com>

	PR c++/39028
	* parser.c (cp_parser_already_scoped_statement): Handle __label__
	declarations.

2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/33465
	* error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.

2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/38655
	* error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.

2009-01-29  Paolo Carlini  <paolo.carlini@oracle.com>

	* typeck.c (invalid_nonstatic_memfn_p): Use
	DECL_NONSTATIC_MEMBER_FUNCTION_P.

2009-01-27  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/37554
	* call.c (build_over_call): If convert_for_arg_passing returns
	error_mark_node unconditionally return it.

2009-01-22  Adam Nemet  <anemet@caviumnetworks.com>

	* class.c (check_field_decls): Also inherit packed for bitfields
	regardless of their type.

2009-01-22  Dodji Seketeli  <dodji@redhat.com>

	PR c++/38930
	* decl2.c (grokfield): Reverting changes of PR c++/26693
	(save_template_attributes): Likewise.
	* decl.c (grokdeclarator): Likewise.
	* name-lookup.c (pushdecl_maybe_friend): Likewise.
	* cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
	(append_type_to_template_for_access_check): Likewise.
	* semantics.c (check_accessibility_of_qualified_id): Likewise.
	* pt.c (instantiate_class_template, instantiate_template ): Likewise.
	(tsubst): Likewise.
	(resolve_type_name_type): Likewise.
	(append_type_to_template_for_access_check): Likewise.

2009-01-21  Dodji Seketeli  <dodji@redhat.com>

	PR c++/26693
	* decl2.c (grokfield): when a typedef appears in a
	class, create the typedef variant type node for it.
	(save_template_attributes): Creating typedef variant type node
	 here is now useless.
	* decl.c (grokdeclarator): If the typedef'ed struct/class was
	anonymous, set the proper type name to all its type variants.
	* name-lookup.c (pushdecl_maybe_friend): Reuse the
	set_underlying_type function to install typedef variant types.
	* cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
	macro.
	(append_type_to_template_for_access_check): New entry points.
	* semantics.c (check_accessibility_of_qualified_id):
	When a typedef that is a member of a class appears in a template,
	add it to the template. It will be ...
	* pt.c (instantiate_class_template, instantiate_template ): ... access
	checked at template instantiation time.
	(tsubst): Handle the case of being called with NULL args.
	(resolve_type_name_type): The type name should be the name of the
	main type variant.
	(append_type_to_template_for_access_check): New entry point.

2009-01-19  Jason Merrill  <jason@redhat.com>

	PR c++/23287
	* parser.c (cp_parser_unqualified_id): In a template,
	accept ~identifier.
	* typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.

2009-01-16  Jason Merrill  <jason@redhat.com>

	PR c++/38877
	* tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
	* init.c (build_new): Don't call describable_type unless we
	have an auto.

	PR c++/29470
	* pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.

	PR c++/38579
	* search.c (protected_accessible_p): N doesn't vary.

2009-01-15  Jason Merrill  <jason@redhat.com>

	PR c++/38850
	* pt.c (tsubst_copy_and_build): Tell finish_call_expr to
	accept hidden friends.

2009-01-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>

	PR C++/29388
	* decl.c (grokdeclarator): Check for a non namespace/class context.

2009-01-15  Jason Merrill  <jason@redhat.com>

	PR c++/36334
	PR c++/37646
	* tree.c (lvalue_p_1): Handle BASELINK.  A COMPONENT_REF to
	a function isn't necessarily an lvalue. Take tree, not const_tree.
	(lvalue_p, real_lvalue_p): Take tree, not const_tree.
	* typeck.c (lvalue_or_else): Likewise.
	* cp-tree.h: Adjust prototypes.

2009-01-15  Steve Ellcey  <sje@cup.hp.com>

	PR c++/38357
	* pt.c (tsubst): Check for NULL args.

2009-01-15  Dodji Seketeli  <dodji@redhat.com>

	PR c++/38636
	* name-lookup.c (pushtag): Don't create members to types that are not
	being created.

2009-01-14  Nick Clifton  <nickc@redhat.com>

	PR c++/37862
	* parser.c: Pass cp_id_kind computed in
	cp_parser_postfix_dot_deref_expression to
	cp_parser_primary_expression.

2009-01-13  Jakub Jelinek  <jakub@redhat.com>

	PR c++/38795
	* tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
	STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
	as CAST_EXPR.

2009-01-12  Jason Merrill  <jason@redhat.com>
	    Steve Ellcey  <sje@cup.hp.com>

	PR c++/35109
	* name-lookup.c (lookup_name_real): Keep looking past a hidden 
	binding.

2009-01-12  Dodji Seketeli  <dodji@redhat.com>

	PR c++/36019
	* pt.c (parameter_of_template_p): New function.
	* cp-tree.h: Declare it.
	* name-lookup.c (binding_to_template_parms_of_scope_p): New
	function.
	(outer_binding): Take template parameters in account when looking for
	a name binding.

2009-01-12  Jason Merrill  <jason@redhat.com>

	PR c++/31488
	* tree.c (pod_type_p): Return 1 for structs created by the back end.

2009-01-12  Jakub Jelinek  <jakub@redhat.com>

	PR c/32041
	* parser.c (cp_parser_builtin_offsetof): Allow `->' in
	offsetof member-designator, handle it as `[0].'.

	PR c++/38794
	* decl.c (start_function): If grokdeclarator hasn't returned
	FUNCTION_DECL nor error_mark_node, issue diagnostics.

2009-01-11  Jakub Jelinek  <jakub@redhat.com>

	PR c++/36254
	* cp-gimplify.c (genericize_if_stmt): Renamed from ...
	(gimplify_if_stmt): ... this.
	(cp_gimplify_expr): Don't handle IF_STMT here.
	(cp_genericize_r): Call genericize_if_stmt for IF_STMT.

2009-01-10  Andrew Pinski  <pinskia@gmail.com>

	PR c++/38648
	* typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.

	PR c++/36695
	* typeck2.c (build_functional_cast): Check for reference type and NULL
	PARMS.

2009-01-09  Steve Ellcey  <sje@cup.hp.com>

	* typeck.c (cp_build_unary_op): Check for ERROR_MARK.

2009-01-09  Jakub Jelinek  <jakub@redhat.com>

	PR c++/35335
	* error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.

2009-01-09  John F. Carr  <jfc@mit.edu>

	PR c++/37877
	* parser.c (cp_parser_class_specifier): Clear
	parser->in_unbraced_linkage_specification_p while parsing class
	specifiers.

2009-01-07  Jakub Jelinek  <jakub@redhat.com>

	PR c++/38725
	* semantics.c (finish_goto_stmt): Convert destination to
	void *.

2009-01-06  Jason Merrill  <jason@redhat.com>

	PR c++/35297
	PR c++/35477
	PR c++/35784
	PR c++/36846
	PR c++/38276
	* pt.c (check_default_tmpl_args): Don't complain about
	out-of-order parameter packs in the enclosing class
	or parameter packs after default args.
	(coerce_template_parms): If we have more than one
	parameter pack, don't flatten argument packs.
	(template_args_equal): Handle argument packs.
	(comp_template_args): Don't flatten argument packs.
	(check_instantiated_arg): Split out from...
	(check_instantiated_args): Here.  Handle arg packs.
	(convert_template_argument): Just check that nontype argument
	packs have the right type.

2009-01-05  Dodji Seketeli  <dodji@redhat.com>

	PR c++/38472
	* typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.

2009-01-05  Jason Merrill  <jason@redhat.com>

	PR c++/38698
	* typeck2.c (process_init_constructor_union): Handle union with
	no fields.

	* mangle.c (write_expression): Remove mangling for zero-operand
	casts.

	PR c++/38701
	* decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
	defaulting.

	PR c++/38702
	* class.c (defaultable_fn_p): Only operator== can be a copy
	assignment operator.

2009-01-02  Jason Merrill  <jason@redhat.com>

	PR c++/38698
	* typeck2.c (process_init_constructor_union): Handle excess
	initializers.
	(process_init_constructor_record): Likewise.

	PR c++/38684
	* typeck2.c (digest_init_r): Don't use process_init_constructor
	for non-aggregate classes.