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
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
|
2008-07-28 Richard Guenther <rguenther@suse.de>
Merge from gimple-tuples-branch.
2008-07-22 Aldy Hernandez <aldyh@redhat.com>
* cp-gimplify.c (gimplify_if_stmt): Set location on newly created
COND_EXPR.
2008-07-18 Jakub Jelinek <jakub@redhat.com>
* decl.c (finish_function): Call gimple_body after cp_genericize.
2008-07-18 Aldy Hernandez <aldyh@redhat.com>
* optimize.c: Include gimple.h instead of tree-gimple.h.
* Make-lang.in (cp-gimplify.o): Depend on tree-iterator.h.
* cp-gimplify.c: Rename tree-gimple.h to gimple.h. Include
tree-iterator.h.
2008-07-16 Jakub Jelinek <jakub@redhat.com>
* optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE for the clone.
2008-07-14 Jakub Jelinek <jakub@redhat.com>
* cp-gimplify.c (cp_gimplify_expr): Update comment.
2008-07-14 Aldy Hernandez <aldyh@redhat.com>
* cp-tree.h (union lang_tree_node): Rename GENERIC_NEXT to
TREE_CHAIN.
* cp-gimplify.c (cxx_omp_clause_apply_fn): Rename
GIMPLE_MODIFY_STMT to MODIFY_EXPR.
(cxx_omp_clause_copy_ctor): Same.
(cxx_omp_clause_assign_op): Same.
2008-05-28 Jakub Jelinek <jakub@redhat.com>
* cp-gimplify.c (cp_gimplify_omp_for): Add pre_p argument. Tuplify.
(cp_gimplify_expr): Adjust caller.
2008-05-11 Doug Kwan <dougkwan@google.com>
* init.c (build_vec_delete): Add type conversion for argument
0 of POINTER_PLUS_EXPR.
2008-04-29 Doug Kwan <dougkwan@google.com>
* decl2 (File): Include "gimple.h"
(cp_write_global_declarations): Use gimple_body instead of
DECL_SAVED_TREE.
* Make-lang.in (cp/decl2.o): Add $(GIMPLE_H)
2008-04-10 Diego Novillo <dnovillo@google.com>
http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00913.html
* optimize.c (maybe_clone_body): Re-enable call to
clone_body.
* cp-gimplify.c (cp_gimplify_omp_for): Mark disabled
code with call to gimple_unreachable.
(cp_genericize): Fix handling of clone bodies.
2008-04-04 Diego Novillo <dnovillo@google.com>
http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00413.html
* optimize.c (maybe_clone_body): Re-enable.
2008-02-19 Diego Novillo <dnovillo@google.com>
Oleg Ryjkov <olegr@google.com>
http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
* cp-gimplify.c (gimplify_for_stmt): Change gimple_seq
argument to gimple_seq *. Update all users.
(gimplify_must_not_throw_expr): Likewise.
2008-02-04 Oleg Ryjkov <olegr@google.com>
* except.c: Include gimple.h
(cp_protect_cleanup_actions): Convert to tuples.
* Make-lang.in (cp/except.o): Add dependency on gimple.h
2007-11-10 Aldy Hernandez <aldyh@redhat.com>
* cp-gimplify.c (gimplify_cp_loop): Call tree_annotate_all_with_locus
instead of annotating each block manually.
2007-10-30 Aldy Hernandez <aldyh@redhat.com>
* cp-gimplify.c (gimplify_cp_loop): Tuplify.
(gimplify_for_stmt): Same.
(gimplify_switch_stmt): Same.
(cp_gimplify_expr): [FOR_STMT]: Do not call gimplify_for_stmt. Return
GS_OK.
[WHILE_STMT]: Return GS_OK.
[SWITCH_STMT]: Same.
[CONTINUE_STMT]: Same.
[BREAK_STMT]: Same.
(cp_genericize): Set gimple_body() of cloned functions when needed.
2007-10-29 Aldy Hernandez <aldy@quesejoda.com>
* cp-gimplify.c: Move build_gimple_eh_filter_tree here.
(cp_gimplify_init_expr): Convert to tuples.
(gimplify_must_not_throw_expr): Make function return a
gimplify_status and convert to tuples.
2007-10-18 Aldy Hernandez <aldy@quesejoda.com>
* cp-gimplify.c (genericize_try_block): Enable and do not call
gimplify_stmt.
(genericize_catch_block): Same.
(genericize_eh_spec_block): Same.
Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
(cp_gimplify_expr): Enable TRY_BLOCK, HANDLER, and EH_SPEC_BLOCK.
2007-10-16 Aldy Hernandez <aldy@quesejoda.com>
* optimize.c (maybe_clone_body): Comment out call to clone_body.
* decl.c (finish_function): Use gimple_body instead of
DECL_SAVED_TREE.
* cp-tree.h (cp_gimplify_expr): Last 2 arguments are sequences.
* cp-gimplify.c (genericize_try_block): Comment out.
(genericize_catch_block): Same.
(genericize_eh_spec_block): Same.
(gimplify_cp_loop): Comment out calls to gimplify_stmt.
(gimplify_for_stmt): Comment out.
(gimplify_switch_stmt): Comment out call to gimplify_stmt.
(cp_gimplify_omp_for): Same.
(gimplify_must_not_throw_expr): Argument pre_p is a sequence.
Comment out call to gimplify_stmt and append_to_statement_list.
Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
(cp_gimplify_init_expr): Arguments pre_p and post_p are sequences.
(cp_gimplify_expr): Same.
Comment out calls to genericize_*_block. Comment out call to
gimplify_for_stmt.
2008-07-27 H.J. Lu <hongjiu.lu@intel.com>
PR c++/36944
* class.c (type_has_user_provided_default_constructor): Handle
default parameters.
2008-07-27 Paolo Carlini <paolo.carlini@oracle.com>
* decl.c (push_library_fn): Add a parameter for the exceptions that
the function may throw.
(push_void_library_fn, push_throw_library_fn, expand_static_init):
Adjust.
(build_library_fn): Change to static.
* cp-tree.h: Adjust declarations.
* except.c (declare_nothrow_library_fn): New.
(do_get_exception_ptr, do_begin_catch, do_free_exception,
do_allocate_exception): Use the latter, adjust the declarations
(ie, add empty exception-specification), consistently with the
actual implementation in libsupc++.
2008-07-25 Jan Hubicka <jh@suse.cz>
* typeck.c (inline_conversion): Remove.
(cp_build_function_call): Do not use inline_conversion.
* decl.c (duplicate_decls): Do not insist on inline being declared
early.
(start_cleanup_fn): Do not assume that INLINE flags prevent function
from being output. We now remove static functions always.
(finish_function): Do return warning on all static functions.
* call.c (build_over_call): Do not use inline_conversion.
* cp-tree.h (possibly_inlined_p): Declare.
(inline_conversion): Remove.
* pt.c (instantiate_decl): Use possibly_inlined_p predicate.
* decl2.c (cp_write_global_declarations): Likewise.
(mark_used): Likewise.
(possibly_inlined_p): New functions.
2008-07-25 Jason Merrill <jason@redhat.com>
* class.c (type_has_user_provided_default_constructor): Handle
templates.
2008-07-23 Jan Hubicka <jh@suse.cz>
* decl.c (duplicate_decls): Update comment and unit-at-a-time.
(grogfndecl): Drop flag_inline_trees code.
* pt.c (instantiate_decl): Drop flag_iline_trees code.
* lex.c (cxx_init): Do not set unit-at-a-time.
2008-07-23 Jason Merrill <jason@redhat.com>
* mangle.c (write_unqualified_name): Avoid infinite recursion when
trying to mangle a decl with no name.
Implement defaulted/deleted functions as per N2346
* cp-tree.h (struct lang_decl_flags): Add defaulted_p bitfield.
(DECL_DELETED_FN): New macro.
(DECL_DEFAULTED_FN): New macro.
* class.c (user_provided_p): New fn.
(defaultable_fn_p): New fn.
(type_has_user_provided_constructor): New fn.
(type_has_user_provided_default_constructor): New fn.
(check_methods): A defaulted fn is still trivial.
(check_bases_and_members): Likewise.
* decl.c (grok_special_member_properties): Likewise.
(duplicate_decls): Complain about redeclaring a function as deleted.
(start_decl): initialized==2 means deleted.
(cp_finish_decl): Handle deleted/defaulted semantics.
* decl2.c (grokfield): Likewise.
(mark_used): Check DECL_DEFAULTED_FN instead of DECL_ARTIFICIAL.
Complain about using a deleted fn.
* init.c (build_value_init_1): Use type_has_user_provided_constructor.
(perform_member_init): Check for a user-provided default constructor
even if TYPE_NEEDS_CONSTRUCTING.
(build_new_1): Likewise.
* call.c (build_over_call): Don't call mark_used twice.
* method.c (implicitly_declare_fn): Set DECL_DEFAULTED_FN.
* search.c (check_final_overrider): Check for deleted mismatch.
* parser.c (cp_parser_init_declarator): Tell start_decl about =delete.
(cp_parser_pure_specifier): Handle =default and =delete.
* error.c (maybe_warn_cpp0x): Suggest -std=gnu++0x as well.
2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR 35058
* typeck.c: All calls to pedwarn changed.
* decl.c: All calls to pedwarn changed.
* call.c: All calls to pedwarn changed.
* error.c: All calls to pedwarn changed.
* typeck2.c: All calls to pedwarn changed.
* pt.c: All calls to pedwarn changed.
* name-lookup.c: All calls to pedwarn changed.
* parser.c: All calls to pedwarn changed.
2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* call.c: Fix comment typos.
* class.c: Likewise.
* cp-tree.h: Likewise.
* cxx-pretty-print.c: Likewise.
* decl.c: Likewise.
* init.c: Likewise.
* name-lookup.c: Likewise.
* operators.def: Likewise.
* parser.c: Likewise.
* pt.c: Likewise.
* tree.c: Likewise.
* typeck.c: Likewise.
2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/36871
PR c++/36872
* semantics.c (classtype_has_nothrow_assign_or_copy_p): Only check
copy constructors and copy assignment operators proper.
2008-07-21 Rafael Avila de Espindola <espindola@google.com>
* parser.c (cp_token): Remove in_system_header.
(eof_token): Remove in_system_header.
(cp_lexer_get_preprocessor_token): Don't set in_system_header.
(cp_lexer_set_source_position_from_token): Don't set in_system_header.
(cp_parser_member_declaration): Use in_system_header_at.
* pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
(pop_tinst_level): Don't set in_system_header.
(instantiate_class_template): Don't set in_system_header.
(instantiate_decl): Don't set in_system_header.
(instantiate_pending_templates): Don't set in_system_header.
2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/36870
* semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
TYPE_NOTHROW_P, not TREE_NOTHROW.
(trait_expr_value): Likewise.
2008-07-18 Dodji Seketeli <dseketel@redhat.com>
PR c++/36407
* call.c (convert_like_real): Don't take the error code path
when a rvalue or base conversion has the bad_p field set.
2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
* rtti.c (emit_support_tinfos): Add char16_type_node and
char32_type_node.
* typeck2.c (digest_init): Support char16_t and char32_t.
2008-07-18 Kavih R. Ghazi <ghazi@caip.rutgers.edu>
* cvt.c (convert_to_void): Avoid C++ keywords.
* decl.c (walk_namespaces_r, wrapup_globals_for_namespace):
Likewise.
* friend.c (is_friend): Likewise.
* init.c (perform_member_init): Likewise.
* mangle.c (write_template_prefix, write_template_template_param):
Likewise.
* name-lookup.c (do_namespace_alias, do_using_directive,
parse_using_directive, ambiguous_decl, arg_assoc): Likewise.
* parser.c (cp_parser_template_id, cp_parser_namespace_definition,
cp_parser_objc_typename, cp_parser_objc_method_keyword_params):
Likewise.
* pt.c (is_specialization_of_friend, lookup_template_class,
push_tinst_level, instantiate_class_template,
tsubst_copy_and_build): Likewise.
* tree.c (add_stmt_to_compound): Likewise.
* typeck.c (finish_class_member_access_expr): Likewise.
2008-07-17 Julian Brown <julian@codesourcery.com>
Mark Mitchell <mark@codesourcery.com>
* decl2.c (determine_visibility): Allow target to override
visibility of class data.
2008-07-17 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/36855
* semantics.c (trait_expr_value): Update __has_trivial_destructor
semantics to the current WP (N2691).
2008-07-16 Dodji Seketeli <dseketel@redhat.com>
PR c++/13699
* name-lookup.c (lookup_extern_c_fun_binding_in_all_ns): New function.
(pushdecl_maybe_friend): Check if a redeclaration of extern C function
complies with exception specification constraints.
2008-07-14 Jason Merrill <jason@redhat.com>
* lex.c (init_reswords): Always set D_OBJC.
2008-07-11 Tom Tromey <tromey@redhat.com>
Ian Lance Taylor <iant@google.com>
* lex.c (struct resword, reswords): Don't define.
(D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
(init_reswords): Clarify mask code. Use c_common_reswords rather
than reswords.
2008-07-11 Dodji Seketeli <dseketel@redhat.com>
PR c++/13101
* decl.c (grokdeclarator): Warn about initializing variables
of storage class 'extern' only after the type of the declarator
has been properly computed.
2008-07-11 Dodji Seketeli <dseketel@redhat.com>
PR c++/31754
* cp-tree.h (struct cp_decl_specifier_seq): Add a location field. It
carries the location of the primary type.
* parser.c (cp_parser_check_type_definition): Update documentation.
(cp_parser_check_for_definition_in_return_type,
cp_parser_check_for_invalid_template_id,
cp_parser_set_decl_spec_type,
cp_parser_check_for_definition_in_return_type,
cp_parser_diagnose_invalid_type_name,
cp_parser_new_expression, cp_parser_explicit_instantiation,
cp_parser_type_specifier, cp_parser_simple_type_specifier,
cp_parser_omp_for_loop, cp_parser_pragma): Use location in error
messages.
2008-07-11 Dodji Seketeli <dseketel@redhat.com>
PR c++/31754
* pt.c, semantic.c:
* semantic.c (qualified_name_lookup_error, finish_id_expression):
Add a location_t parameter so that
error message can have a more accurate location.
* cp-tree.h: Updated prototype
* pt.c (tsubst_qualified_id): Use location in error messages.
* parser.c (cp_parser_postfix_expression,
cp_parser_objc_statement, cp_parser_trait_expr,
cp_parser_token_is_class_key,
cp_parser_uncommitted_to_tentative_parse_p,
cp_parser_check_for_invalid_template_id, cp_parser_is_string_literal,
cp_parser_error, cp_parser_name_lookup_error,
cp_parser_simulate_error, cp_parser_check_decl_spec,
cp_parser_check_decl_spec, cp_parser_non_integral_constant_expression,
cp_parser_diagnose_invalid_type_name,
cp_parser_parse_and_diagnose_invalid_type_name,
cp_parser_require_pragma_eol, cp_parser_make_typename_type,
cp_parser_string_literal, cp_parser_primary_expression,
cp_parser_primary_expression, cp_parser_unqualified_id,
cp_parser_nested_name_specifier_opt, cp_parser_postfix_expression,
cp_parser_postfix_dot_deref_expression, cp_parser_new_expression,
cp_parser_direct_new_declarator, cp_parser_builtin_offsetof,
cp_parser_label_for_labeled_statement, cp_parser_statement_seq_opt,
cp_parser_jump_statement, cp_parser_block_declaration,
cp_parser_simple_declaration, cp_parser_decl_specifier_seq,
cp_parser_function_specifier_opt, cp_parser_decltype,
cp_parser_mem_initializer_list, cp_parser_mem_initializer,
cp_parser_mem_initializer_id, cp_parser_template_parameter,
cp_parser_type_parameter, cp_parser_template_id,
cp_parser_template_name, cp_parser_template_argument): Likewise.
2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/36760
* pt.c (tsubst_function_type): Remove warning for type qualifiers
on function return type.
2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/36760
* pt.c (tsubst_function_type): Don't warn for type qualifiers
on function return type in case of system header.
2008-07-09 Raksit Ashok <raksit@google.com>
* parser.c (cp_parser_postfix_expression): New warning based on flag
warn_disallowed_functions.
2008-07-08 Simon Martin <simartin@users.sourceforge.net>
PR c++/34963
* decl.c (grokdeclarator): Reset storage_class and staticp for friend
functions declared with a storage class qualifier.
2008-07-03 Richard Guenther <rguenther@suse.de>
PR c++/36128
* typeck.c (cp_build_function_call): Move code to verify
builtin function arguments ...
* call.c (build_cxx_call): ... here.
2008-07-02 Jason Merrill <jason@redhat.com>
* Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
Implement WG21 N2672, Initializer List proposed wording
* cp-tree.h (enum cp_tree_index): Add CPTI_INIT_LIST_TYPE.
(struct lang_type_class): Add has_list_ctor bitfield.
(TYPE_HAS_LIST_CTOR): New macro.
(BRACE_ENCLOSED_INITIALIZER_P): Expect init_list_type_node.
(CONSTRUCTOR_IS_DIRECT_INIT): New macro.
(LOOKUP_NO_NARROWING): New macro.
(LOOKUP_NO_COPY_CTOR_CONVERSION): New macro.
* parser.c (cp_parse_braced_list): Split out from...
(cp_parser_initializer_clause): ...here.
(cp_parser_postfix_expression): Build up CONSTRUCTOR for compound
literal here.
(cp_lexer_next_token_is_not_keyword): New fn.
(cp_parser_parenthesized_expression_list): Handle { }.
(cp_parser_new_expression, cp_parser_new_initializer): Likewise.
(cp_parser_assignment_expression, cp_parser_condition): Likewise.
(cp_parser_jump_statement, cp_parser_simple_declaration): Likewise.
(cp_parser_mem_initializer, cp_parser_init_declarator): Likewise.
(cp_parser_initializer, cp_parser_functional_cast): Likewise.
(cp_parser_omp_for_loop, cp_parser_cache_group): Likewise.
(cp_parser_save_member_function_body): Likewise.
* call.c (conversion_kind): Add ck_list, ck_aggr.
(struct conversion): Add check_narrowing bitfield, conversion list.
(build_list_conv): New fn.
(build_aggr_conv): New fn.
(implicit_conversion): Call them.
(standard_conversion): Set check_narrowing if appropriate.
(add_function_candidate): Handle LOOKUP_NO_COPY_CTOR_CONVERSION.
(build_user_type_conversion_1): When converting from an init list,
we allow additional conversions except when calling a copy ctor.
(convert_like_real): Calling an explicit ctor for an init list is
ill-formed. Handle ck_list and ck_addr. Check narrowing.
(build_new_method_call): If CONSTRUCTOR_IS_DIRECT_INIT is set and
class doesn't have a list ctor, break the {} into a TREE_LIST.
(compare_ics): ck_list is better than other UDCs.
(set_up_extended_ref_temp): Split out from initialize_reference.
(is_std_init_list): New fn.
(is_list_ctor): New fn.
* decl.c (cxx_init_decl_processing): Create init_list_type_node.
(reshape_init_array_1): Pass it to build_constructor.
(reshape_init_class): Ditto.
(initialize_artificial_var): Pass the appropriate type.
(build_aggr_init_full_exprs): Split out from...
(check_initializer): ...here. Handle new semantics.
(build_init_list_var_init): New subroutine of check_initializer.
(grokdeclarator): Converting constructors can have more than one parm.
(grok_special_member_properties): Set TYPE_HAS_LIST_CTOR.
* init.c (expand_default_init): Only do digest_init for aggregates.
* rtti.c (tinfo_base_init): Pass init_list_type_node to
build_constructor_from_list.
(generic_initializer, ptr_initializer): Ditto.
(ptm_initializer, class_initializer): Ditto.
(get_pseudo_ti_init): Ditto.
* error.c (dump_type): Handle init_list_type_node.
(maybe_warn_cpp0x): New fn.
(maybe_varn_variadic_templates): Call it.
* cvt.c (ocp_convert): Handle conversion from { }.
* tree.c (build_array_of_n_type): New fn.
* typeck2.c (store_init_value): Use init_list_type_node.
(digest_init): Likewise.
(check_narrowing): New fn.
* semantics.c: (finish_compound_literal): Take CONSTRUCTOR instead
of vector of constructor elts. Handle non-aggregate types. Make
constant literals static.
* pt.c: (tsubst_copy_and_build): Adjust.
(unify): Handle { }.
* name-lookup.c (arg_assoc_type): Handle init_list_type_node.
2008-07-01 Daniel Jacobowitz <dan@codesourcery.com>
* typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
(comp_ptr_ttypes_const): Likewise.
2008-07-01 Andrew Haley <aph@redhat.com>
* decl.c (finish_constructor_body): Don't set the return value of
the constructor if the constructor is that of a Java type.
2008-06-30 Jakub Jelinek <jakub@redhat.com>
PR c++/36662
* decl2.c (is_late_template_attribute): If the first attribute
argument is IDENTIFIER_NODE, don't consider it when checking
if arguments are value or type dependent.
2008-06-29 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/36655
* pt.c (do_type_instantiation): In c++0x mode do not warn for
extern template.
2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
2008-06-28 Jakub Jelinek <jakub@redhat.com>
PR c++/36364
* repo.c (repo_emit_p): Put const static data members initialized
by const expr into *.rpo file, just return 2 if IDENTIFIER_REPO_CHOSEN
for it is 0.
2008-06-27 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/36655
* pt.c (do_decl_instantiation): In c++0x mode do not warn for
extern template.
2008-06-24 Jonathan Wakely <jwakely.gcc@gmail.com>
PR c++/23194
* typeck.c (cp_build_function_call): Show example syntax in
diagnostic.
2008-06-21 Jonathan Wakely <jwakely.gcc@gmail.com>
* typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
cxx_alignof_expr, check_template_keyword, cp_build_binary_op,
pointer_diff, cp_build_unary_op, build_x_compound_expr_from_list,
build_reinterpret_cast_1, cp_build_c_cast, check_return_expr): Change
pedwarn to permerror.
* init.c (perform_member_init, build_new_1, build_new): Likewise.
* decl.c (warn_extern_redeclared_static, duplicate_decls,
* identify_goto, check_previous_goto_1, check_goto, define_label,
check_tag_decl, start_decl, check_class_member_definition_namespace,
grokfndecl, grokdeclarator): Likewise.
* except.c (check_handlers): Likewise.
* typeck2.c (digest_init): Likewise.
* pt.c (check_specialization_namespace,
check_explicit_instantiation_namespace,
maybe_process_partial_specialization, check_explicit_specialization,
convert_template_argument, do_decl_instantiation,
do_type_instantiation, instantiate_decl): Likewise.
* semantics.c (finish_template_type_parm): Likewise.
* name-lookup.c (pushdecl_maybe_friend,
check_for_out_of_scope_variable): Likewise.
* decl2.c (finish_static_data_member_decl, build_anon_union_vars,
coerce_new_type): Likewise.
* parser.c (cp_parser_nested_name_specifier_opt,
cp_parser_mem_initializer, cp_parser_elaborated_type_specifier,
cp_parser_class_head, cp_parser_check_class_key): Likewise.
(cp_parser_parameter_declaration): Check flag_permissive instead of
flag_pedantic_errors.
* call.c (joust): Change pedwarn to warning.
* friend.c (make_friend_class): Likewise.
2008-06-16 Jan Hubicka <jh@suse.cz>
* method.c: Include cgraph.h.
(use_thunk): Use cgraph_add_new_function instead of calling backend
directly.
2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* parser.c: Fix comment typo.
2008-06-14 Simon Martin <simartin@users.sourceforge.net>
PR c++/35320
* decl2.c (grokbitfield): Receive the list of attributes, pass it to
grokdeclarator and apply it to the created declaration.
* cp-tree.h (grokbitfield): Update prototype.
* parser.c (cp_parser_member_declaration): Don't apply the attributes
since they are now applied in grokbitfield. Adjusted the call to
grokbitfield.
(cp_parser_objc_class_ivars): Likewise.
2008-06-14 Simon Martin <simartin@users.sourceforge.net>
PR c++/35317
* class.c (type_requires_array_cookie): Do not consider delete[]
operators with an ellipsis as second argument.
2008-06-09 Jakub Jelinek <jakub@redhat.com>
PR c++/36408
* semantics.c (stmt_expr_value_expr): Don't crash on empty
STATEMENT_LIST.
2008-06-08 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/35242
* pt.c (maybe_process_partial_specialization): Check the tree
returned by push_template_decl for error_mark_node.
* parser.c (cp_parser_class_head): Likewise, check the tree
returned by the latter.
2008-06-07 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/35327
* decl.c (grokdeclarator): In case of wrong return type return
immediately error_mark_node.
2008-06-06 Jakub Jelinek <jakub@redhat.com>
* cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
dependent_omp_for_p, begin_omp_task, finish_omp_task,
finish_omp_taskwait): New prototypes.
(cxx_omp_clause_default_ctor): Add outer argument.
(finish_omp_for): Add new clauses argument.
* cp-gimplify.c (cxx_omp_finish_clause): New function.
(cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
(cxx_omp_clause_default_ctor): Add outer argument.
(cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
* cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
* parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
Add par_clauses argument. If decl is present in parallel's
lastprivate clause, change that clause to shared and add
a lastprivate clause for decl to OMP_FOR_CLAUSES.
Fix wording of error messages. Adjust finish_omp_for caller.
Add clauses argument. Parse loops with random access iterators.
(cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
functions.
(cp_parser_omp_for, cp_parser_omp_parallel): Adjust
cp_parser_omp_for_loop callers.
(cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
functions.
(cp_parser_omp_clause_name): Handle collapse and untied
clauses.
(cp_parser_omp_clause_schedule): Handle auto schedule.
(cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
and PRAGMA_OMP_CLAUSE_UNTIED.
(OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
(OMP_TASK_CLAUSE_MASK): Define.
(cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
(cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
(cp_parser_pragma): Handle PRAGMA_OMP_TASK and
PRAGMA_OMP_TASKWAIT.
* pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT.
(tsubst_omp_for_iterator): New function.
(dependent_omp_for_p): New function.
(tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR
loops. Adjust finish_omp_for caller. Handle loops with random
access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes.
(tsubst_expr): Handle OMP_TASK.
* semantics.c (cxx_omp_create_clause_info): New function.
(finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and
OMP_CLAUSE_COLLAPSE.
(cxx_omp_predetermined_sharing): Removed.
* semantics.c (finish_omp_for): Allow pointer iterators. Use
handle_omp_for_class_iterator and dependent_omp_for_p. Handle
collapsed for loops. Adjust c_finish_omp_for caller. Add new
clauses argument. Fix check for type dependent cond or incr.
Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of
fold_convert to convert incr amount to difference_type. Only
fold if not in template. If decl is mentioned in lastprivate
clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random
access iterators. Adjust for OMP_FOR_{INIT,COND,INCR}
changes.
(finish_omp_threadprivate): Allow static class members of the
current class.
(handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
finish_omp_taskwait): New functions.
* parser.c (cp_parser_binary_expression): Add prec argument.
(cp_parser_assignment_expression): Adjust caller.
* cp-tree.h (outer_curly_brace_block): New prototype.
* decl.c (outer_curly_brace_block): No longer static.
2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/36404
* pt.c (push_template_decl_real): Consistently return error_mark_node
on error.
2008-06-02 Tomas Bily <tbily@suse.cz>
* typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
(cp_build_unary_op): Likewise.
(cp_build_indirect_ref): Use CONVERT_EXPR_P.
(maybe_warn_about_returning_address_of_local): Likewise.
2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/35243
* pt.c (tsubst_initializer_list): Consistently check the tree
returned by tsubst_pack_expansion for error_mark_node.
2008-05-27 Michael Matz <matz@suse.de>
PR c++/27975
* call.c (build_new_op): Make warning conditional on
OPT_Wenum_compare.
2008-05-27 Alexandre Oliva <aoliva@redhat.com>
PR c++/35909
* call.c (convert_like_real): Convert bitfield to desired type
before creating temporary.
2008-05-26 Daniel Franke <franke.daniel@gmail.com>
* Makefile.in: Adjusted dependencies on c-incpath.o.
2008-05-23 Jakub Jelinek <jakub@redhat.com>
PR c++/36237
* cp-gimplify.c (cxx_omp_clause_apply_fn): Call
fold_build_cleanup_point_expr on build_call_a results.
PR c++/36308
* semantics.c (omp_clause_info_fndecl): New function.
(finish_omp_clauses): Use it.
2008-05-21 Jakub Jelinek <jakub@redhat.com>
PR c++/36023
* cp-tree.h (check_array_initializer): New prototype.
* decl.c (check_array_initializer): New function.
(check_initializer): Call it.
* semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
2008-05-21 Tom Tromey <tromey@redhat.com>
* mangle.c (save_partially_mangled_name): Remove.
(restore_partially_mangled_name): Likewise.
(write_encoding): Update.
(write_unqualified_name): Likewise.
(start_mangling): Always use name_obstack. Remove 'ident_p'
argument.
(get_identifier_nocopy): Remove.
(finish_mangling_internal): Rename from finish_mangling.
(finish_mangling): New function.
(finish_mangling_get_identifier): Likewise.
(partially_mangled_name, partially_mangled_name_len): Remove.
(mangle_decl_string): Change return type. Update.
(mangle_decl, mangle_type_string, mangle_special_for_type,
mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
mangle_ref_init_variable): Update.
2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/35331
* semantics.c (begin_class_definition): Extend checks on the first
argument.
2008-05-12 Tomas Bily <tbily@suse.cz>
* typeck2.c (digest_init): Use CONVERT_EXPR_P.
* call.c (build_over_call): Likewise.
* error.c (dump_expr): Use CASE_CONVERT.
* class.c (fixed_type_or_null): Likewise.
2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
* parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
in error message.
(cp_parser_omp_clause_schedule): Remove superfluous "expected"
in error message.
2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
* decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
DECL_LOOPING_CONST_OR_PURE_P attributes.
* rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
DECL_PURE_P.
2008-05-02 Simon Baldwin <simonb@google.com>
PR bootstrap/36108
* typeck.c (build_array_ref): Remove warn_array_subscript_range.
2008-05-01 Simon Baldwin <simonb@google.com>
* typeck.c (build_array_ref): Call warn_array_subscript_range.
2008-04-30 Jakub Jelinek <jakub@redhat.com>
PR c++/35986
* pt.c (more_specialized_fn): Stop the loop even if there are no
arguments before ellipsis.
2008-04-29 Jakub Jelinek <jakub@redhat.com>
PR c++/35650
* parser.c (cp_parser_lookup_name): Look through single function
OVERLOAD.
PR c++/35987
* typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
COMPOUND_EXPR if the second argument would be error_mark_node.
2008-04-28 Jason Merrill <jason@redhat.com>
Liu Guanwei <liu_gw@163.com>
PR c++/57
* parser.c (cp_parser_parameter_declaration): Handle < ambiguity
in default arguments.
2008-04-25 Jan Hubicka <jh@suse.cz>
* typeck.c (check_return_expr): Update.
* decl.c (start_preparsed_function): Update.
* method.c (use_thunk): Update.
2008-04-24 Jakub Jelinek <jakub@redhat.com>
PR c++/35758
* cp-tree.h (cp_reconstruct_complex_type): New prototype.
* cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
* decl2.c (is_late_template_attribute): Only make vector_size
late tmpl attribute if argument is type or value dependent.
(cp_reconstruct_complex_type): New function.
2008-04-24 Richard Guenther <rguenther@suse.de>
* typeck.c (cp_build_function_call): Call
check_builtin_function_arguments.
2008-04-23 Paolo Bonzini <bonzini@gnu.org>
* typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
(build_ptrmemfunc1): Don't set TREE_INVARIANT.
* init.c (build_zero_init): Don't set TREE_INVARIANT.
* class.c (build_base_path): Don't set TREE_INVARIANT.
(build_vtbl_ref_1): Don't set TREE_INVARIANT.
(build_vtbl_initializer): Don't set TREE_INVARIANT.
* decl.c (build_enumerator): Don't set TREE_INVARIANT.
* rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
(generic_initializer): Don't set TREE_INVARIANT.
(ptr_initializer): Don't set TREE_INVARIANT.
(ptm_initializer): Don't set TREE_INVARIANT.
(class_initializer): Don't set TREE_INVARIANT.
* typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
* pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
(build_template_parm_index): Don't set TREE_INVARIANT.
(reduce_template_parm_level): Don't set TREE_INVARIANT.
(process_template_parm): Don't set TREE_INVARIANT.
2008-04-22 Jason Merrill <jason@redhat.com>
PR c++/35316
* semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
* typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
2008-04-22 Jakub Jelinek <jakub@redhat.com>
PR c++/35747
* semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
expression is errorneous.
2008-04-21 Jason Merrill <jason@redhat.com>
PR c++/35325
* tree.c (cp_tree_equal): Handle FIXED_CST.
PR c++/35678
* pt.c (template_template_parm_bindings_ok_p): Set
processing_template_decl while in this function.
2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
* cvt.c (type_promotes_to): Support char16_t and char32_t.
* decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
char16_t and char32_t.
* lex.c (reswords): Add char16_t and char32_t (for c++0x).
* mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
extended builtin type "u8char{16,32}_t".
* parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
RID_CHAR{16,32}.
(cp_lexer_print_token): Support CPP_STRING{16,32}.
(cp_parser_is_string_literal): Idem.
(cp_parser_string_literal): Idem.
(cp_parser_primary_expression): Support CPP_CHAR{16,32} and
CPP_STRING{16,32}.
(cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
* tree.c (char_type_p): Support char16_t and char32_t as char types.
* typeck.c (string_conv_p): Support char16_t and char32_t.
2008-04-17 Jason Merrill <jason@redhat.com>
PR c++/35773
* call.c (build_user_type_conversion_1): Represent second step of
copy-init with an rvalue conversion.
(convert_like_real) [ck_user]: Don't implicitly add it here.
2008-04-15 Jakub Jelinek <jakub@redhat.com>
PR c/35751
* decl.c (layout_var_decl): If extern or static var has variable
size, set TREE_TYPE (decl) to error_mark_node.
2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
PR target/35921
* optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
to clone.
2008-04-09 Jason Merrill <jason@redhat.com>
PR c++/35708
* semantics.c (finish_compound_literal): Return a TARGET_EXPR,
not a pushed variable.
2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
* call.c (build_op_delete_call): Fix quotation in warning message.
* decl.c (grokdeclarator): Quote keyword in error message.
* pt.c (check_for_bare_parameter_packs): Fix quotation in error
message.
* parser.c (cp_parser_check_type_definition): Print error string
directly rather than using "%s".
(cp_parser_postfix_expression): Fix quotation.
(cp_parser_decltype): Likewise.
(cp_parser_sizeof_operand): Fix quotation. Simplify.
* parser.c (cp_parser_non_integral_constant_expression): Build error
message with CONCAT rather than using "%s".
(cp_parser_primary_expression): Fix quotation.
(cp_parser_postfix_expression): Likewise.
(cp_parser_postfix_dot_deref_expression): Likewise.
(cp_parser_unary_expression): Likewise.
(cp_parser_new_expression): Likewise.
(cp_parser_delete_expression): Likewise.
* parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
as `)', not as `('. Fix quotation.
(cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
(cp_parser_primary_expression): Likewise.
(cp_parser_nested_name_specifier_opt): Likewise.
(cp_parser_postfix_expression): Likewise.
(cp_parser_postfix_open_square_expression): Likewise.
(cp_parser_parenthesized_expression_list): Likewise.
(cp_parser_pseudo_destructor_name): Likewise.
(cp_parser_new_expression): Likewise.
(cp_parser_direct_new_declarator): Likewise.
(cp_parser_delete_expression): Likewise.
(cp_parser_cast_expression): Likewise.
(cp_parser_question_colon_clause): Likewise.
(cp_parser_builtin_offsetof): Likewise.
(cp_parser_trait_expr): Likewise.
(cp_parser_label_for_labeled_statement): Likewise.
(cp_parser_compound_statement): Likewise.
(cp_parser_selection_statement): Likewise.
(cp_parser_condition): Likewise.
(cp_parser_iteration_statement): Likewise.
(cp_parser_already_scoped_statement): Likewise.
(cp_parser_simple_declaration): Likewise.
(cp_parser_linkage_specification): Likewise.
(cp_parser_static_assert): Likewise.
(cp_parser_decltype): Likewise.
(cp_parser_conversion_function_id): Likewise.
(cp_parser_operator_function_id): Likewise.
(cp_parser_operator): Likewise.
(cp_parser_type_parameter): Likewise.
(cp_parser_template_id): Likewise.
(cp_parser_explicit_instantiation): Likewise.
(cp_parser_explicit_specialization): Likewise.
(cp_parser_enum_specifier): Likewise.
(cp_parser_namespace_definition): Likewise.
(cp_parser_namespace_alias_definition): Likewise.
(cp_parser_using_declaration): Likewise.
(cp_parser_using_directive): Likewise.
(cp_parser_asm_definition): Likewise.
(cp_parser_direct_declarator): Likewise.
(cp_parser_ptr_operator): Likewise.
(cp_parser_parameter_declaration_clause): Likewise.
(cp_parser_initializer_clause): Likewise.
(cp_parser_class_specifier): Likewise.
(cp_parser_member_specification_opt): Likewise.
(cp_parser_member_declaration): Likewise.
(cp_parser_pure_specifier): Likewise.
(cp_parser_constant_initializer): Likewise.
(cp_parser_base_clause): Likewise.
(cp_parser_exception_specification_opt): Likewise.
(cp_parser_try_block): Likewise.
(cp_parser_function_try_block): Likewise.
(cp_parser_handler): Likewise.
(cp_parser_throw_expression): Likewise.
(cp_parser_asm_operand_list): Likewise.
(cp_parser_attributes_opt): Likewise.
(cp_parser_label_declaration): Likewise.
(cp_parser_constructor_declarator_p): Likewise.
(cp_parser_template_declaration_after_export): Likewise.
(cp_parser_single_declaration): Likewise.
(cp_parser_objc_message_expression): Likewise.
(cp_parser_objc_message_args): Likewise.
(cp_parser_objc_encode_expression): Likewise.
(cp_parser_objc_defs_expression): Likewise.
(cp_parser_objc_protocol_expression): Likewise.
(cp_parser_objc_selector_expression): Likewise.
(cp_parser_objc_protocol_refs_opt): Likewise.
(cp_parser_objc_typename): Likewise.
(cp_parser_objc_method_keyword_params): Likewise.
(cp_parser_objc_superclass_or_category): Likewise.
(cp_parser_objc_try_catch_finally_statement): Likewise.
(cp_parser_objc_synchronized_statement): Likewise.
(cp_parser_objc_throw_statement): Likewise.
(cp_parser_omp_var_list_no_open): Likewise.
(cp_parser_omp_clause_default): Likewise.
(cp_parser_omp_clause_if): Likewise.
(cp_parser_omp_clause_num_threads): Likewise.
(cp_parser_omp_clause_reduction): Likewise.
(cp_parser_omp_clause_schedule): Likewise.
(cp_parser_omp_critical): Likewise.
(cp_parser_omp_for_loop): Likewise.
(cp_parser_omp_sections_scope): Likewise.
* parser.c (cp_parser_template_parameter_list): Simplify.
2008-04-07 James E. Wilson <wilson@tuliptree.org>
* pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
2008-04-07 Jason Merrill <jason@redhat.com>
PR c++/35734
* class.c (type_has_user_nondefault_constructor): A template
counts as a nondefault constructor.
2008-04-04 Paolo Bonzini <bonzini@gnu.org>
* decl.c (cxx_push_function_context): Delete.
(cxx_pop_function_context): Delete.
(start_preparsed_function): Merge cxx_push_function_context (!f->decl
code only).
* cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
LANG_HOOKS_FUNCTION_FINAL): Delete.
(LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
LANG_HOOKS_MISSING_NORETURN_OK_P.
* cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
Delete prototype.
* semantics.c (current_stmt_tree): Fix comment.
2008-04-03 Jakub Jelinek <jakub@redhat.com>
PR c++/35741
* semantics.c (finish_offsetof): Undo effect of convert_from_reference
before calling fold_offsetof.
2008-04-03 Tom Tromey <tromey@redhat.com>
* Make-lang.in (c++_OBJS): New variable.
2008-04-03 Paolo Bonzini <bonzini@gnu.org>
* optimize.c (clone_body): New, from tree-inline.c.
2008-04-03 Paolo Bonzini <bonzini@gnu.org>
* method.c (synthesize_method): Use {push,pop}_function_context.
* name-lookup.c (push_to_top_level): Likewise.
* parser.c (cp_parser_late_parsing_for_member): Likewise.
2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
PR c++/35578
* parser.c (cp_parser_decl_specifier_seq): Add location to error
message.
2008-03-27 Tom Tromey <tromey@redhat.com>
* Make-lang.in: Revert automatic dependency patch.
2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
PR obj-c++/35704
* typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
(build_compound_expr): New, for compatibility with C
build_compound_expr.
(cp_build_compound_expr): Renamed from build_compound_expr.
(build_c_cast): New, for compatibility with C build_c_cast.
(cp_build_c_cast): Renamed from build_c_cast.
* init.c (build_vec_delete_1): Fix calls to build_compound_expr.
* decl.c (cxx_maybe_build_cleanup): Ditto.
* cp-tree.h (build_compound_expr): Add C-compatibile prototype.
(cp_build_compound_expr): Renamed from build_compound_expr.
(build_c_cast): Add C-compatible prototype.
(cp_build_c_cast): Renamed from build_c_cast.
* typeck2.c (build_functional_cast): Use cp_build_c_cast.
* parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
* pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
ending in a pack expansion, both of which can occur when
substituting into a nested template.
(tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
instantiating the sizeof...(X) form, make tsubst_copy do the work.
* parser.c (cp_parser_template_parameter): Deal with unnamed
non-type template parameter packs identified by pack expansions in
the parameter type.
2008-03-26 Jakub Jelinek <jakub@redhat.com>
PR c++/35546
* pt.c (apply_late_template_attributes): Don't call tsubst on
first attribute argument if it is IDENTIFIER_NODE.
PR c++/35332
* error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
and LTGT_EXPR to pp_expression.
2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
* pt.c (coerce_template_template_parm): Moved the body of the loop
of coerce_template_template_parms here, to make iteration over a
template argument pack simpler.
Also, allow matching of a template parameter pack in the template
template parameter to a template parameter in the template
template argument.
(coerce_template_template_parms): Deal with variadic template
template parameters. Use coerce_template_template_parm.
(unify): Make sure we coerce the template template argument's
template arguments to the template template parameter's template
parameters, not the other way around.
2008-03-25 Tom Tromey <tromey@redhat.com>
* Make-lang.in: Remove .o targets.
(cp/g++spec.o): Moved to cp/. Reduce to variable setting.
(GXX_OBJS): Update.
(c++_OBJS): New variable.
(CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
* typeck.c (composite_pointer_type_r): Add SFINAE support.
(composite_pointer_type): Ditto.
(common_type): Fix call to composite_pointer_type.
(cxx_sizeof_nowarn): New; used to be a macro.
(cxx_sizeof_expr): Add SFINAE support.
(cxx_alignof_expr): Ditto.
(decay_conversion): Fix calls for SFINAE support.
(rationalize_conditional_expr): Add SFINAE support.
(build_class_member_access_expr): Ditto.
(finish_class_member_access_expr): Ditto.
(build_x_indirect_ref): Ditto.
(build_indirect_ref): Original version renamed to
cp_build_indirect_ref; new version provides a bridge from
c-common.
(cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
support.
(get_member_function_from_ptrfunc): Fix calls for SFINAE support.
(build_function_call): Original version renamed to
cp_build_function_call; new version provides a bridge from
c-common.
(cp_build_function_call): Was build_function_call; added SFINAE
support.
(convert_arguments): Add SFINAE support.
(build_x_binary_op): Ditto.
(build_binary_op): Original version renamed to cp_build_binary_op;
new version provides a bridge from c-common.
(cp_build_binary_op): Was build_binary_op; added SFINAE support.
(pointer_diff): Fix calls for SFINAE.
(build_x_unary_op): Add SFINAE support.
(condition_conversion): Fix calls for SFINAE.
(build_unary_op): Original version renamed to cp_build_unary_op;
new version provides a bridge from c-common.
(cp_build_unary_op): Was build_unary_op; added SFINAE support.
(unary_complex_lvalue): Fix calls for SFINAE.
(build_x_conditional_expr): Add SFINAE support.
(build_x_compound_expr_from_list): Fix calls for SFINAE.
(build_x_compound_expr): Add SFINAE support.
(convert_ptrmem): Fix calls for SFINAE.
(build_static_cast_1): Add SFINAE support.
(build_static_cast): Ditto.
(build_reinterpret_cast_1): Ditto.
(build_reinterpret_cast): Ditto.
(build_const_cast_1): Ditto.
(build_const_cast): Ditto.
(build_c_cast): Ditto.
(build_modify_expr): Original version renamed to
cp_build_modify_expr; new version provides a bridge from c-common.
(cp_build_modify_expr): Was build_modify_expr; added SFINAE
support.
(build_x_modify_expr): Add SFINAE support.
(build_ptrmemfunc): Fix calls for SFINAE.
(convert_for_assignment): Add SFINAE support.
(convert_for_initialization): Ditto.
(check_return_expr): Fix calls for SFINAE.
(lvalue_or_else): Add SFINAE support.
* init.c (perform_member_init): Fix calls for SFINAE.
(emit_mem_initializers): Ditto.
(expand_virtual_init): Ditto.
(expand_cleanup_for_base): Ditto.
(build_aggr_init): Add SFINAE support.
(expand_default_init): Ditto.
(expand_aggr_init_1): Fix calls for SFINAE.
(build_offset_ref): Ditto.
(build_new_1): Add SFINAE support.
(build_new): Ditto.
(build_vec_delete_1): Fix calls for SFINAE.
(get_temp_regvar): Ditto.
(build_vec_init): Add SFINAE support.
(build_dtor_call): Fix calls for SFINAE.
(build_delete): Ditto.
(push_base_cleanups): Ditto.
(build_vec_delete_1): Ditto.
* class.c (build_base_path): Fix calls for SFINAE.
(build_simple_base_path): Ditto.
(convert_to_base_statically): Ditto.
(build_vfn_ref): Ditto.
(resolve_address_of_overloaded_function): Ditto.
* decl.c (check_initializer): Fix calls for SFINAE.
(register_dtor_fn): Ditto.
(compute_array_index_type): Ditto.
(finish_enum): Ditto.
(start_preparsed_function): Ditto.
(cxx_maybe_build_cleanup): Ditto.
* call.c (convert_like): Add COMPLAIN argument.
(convert_like_with_context): Ditto.
(build_this): Fix calls for SFINAE.
(build_user_type_conversion): Ditto.
(resolve_args): Ditto.
(build_new_function_call): Add SFINAE support.
(build_operator_new_call): Fix calls for SFINAE.
(build_object_call): Add SFINAE support.
(build_conditional_expr): Ditto.
(build_new_op): Ditto.
(build_op_delete_call): Fix calls for SFINAE.
(build_temp): Ditto.
(convert_like_real): Add SFINAE support.
(build_x_va_arg): Fix calls for SFINAE.
(convert_default_arg): Ditto.
(build_over_call): Add SFINAE support.
(build_java_interface_fn_ref): Fix calls for SFINAE.
(build_special_member_call): Add SFINAE support.
(build_new_method_call): Ditto.
(perform_implicit_conversion): Ditto.
(perform_direct_initialization_if_possible): Ditto.
(initialize_reference): Fix calls for SFINAE.
* method.c (do_build_assign_ref): Fix calls for SFINAE.
* rtti.c (build_headof): Fix calls for SFINAE.
(get_tinfo_decl_dynamic): Ditto.
(get_typeid): Ditto.
(build_dynamic_cast_1): Add SFINAE support.
(build_dynamic_cast): Ditto.
(tinfo_base_init): Fix calls for SFINAE.
* except.c (do_get_exception_ptr): Fix calls for SFINAE.
(do_end_catch): Ditto.
(initialize_handler_parm): Ditto.
(expand_start_catch_block): Ditto.
(do_allocate_exception): Ditto.
(do_free_exception): Ditto.
(build_throw): Ditto.
* cvt.c (build_up_reference): Fix calls for SFINAE.
(convert_to_reference): Ditto.
(ocp_convert): Ditto.
(convert_to_void): Add SFINAE support.
* tree.c (build_dummy_object): Fix calls for SFINAE.
(stabilize_expr): Ditto.
* cp-tree.h (build_conditional_expr): Add tsubst_flags_t
parameter.
(build_new_method_call): Ditto.
(build_special_member_call): Ditto.
(build_new_op): Ditto.
(perform_implicit_conversion): Ditto.
(perform_direct_initialization_if_possible): Ditto.
(convert_to_void): Ditto.
(build_aggr_init): Ditto.
(build_new): Ditto.
(build_vec_init): Ditto.
(build_dynamic_cast): Ditto.
(finish_call_expr): Ditto
(cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
(cxx_sizeof_nowarn): Remove macro; add function declaration.
(build_class_member_access_expr): Add tsubst_flags_t parameter.
(finish_class_member_access_expr): Ditto.
(build_x_indirect_ref): Ditto.
(cp_build_indirect_ref): New.
(cp_build_function_call): Add tsubst_flags_t parameter.
(build_x_unary_op): Ditto.
(cp_build_unary_op): New.
(build_x_conditional_expr): Add tsubst_flags_t parameter.
(build_x_compound_expr): Ditto.
(build_compound_expr): Ditto.
(build_static_cast): Ditto.
(build_reinterpret_cast): Ditto.
(build_const_cast): Ditto.
(build_c_cast): Ditto.
(build_x_modify_expr): Ditto.
(cp_build_modify_expr): New.
(convert_for_initialization): Add tsubst_flags_t parameter.
(cp_build_binary_op): Remove macro; add function declaration.
(invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
(lvalue_or_else): Ditto.
(build_functional_cast): Ditto.
* typeck2.c (digest_init): Fix calls for SFINAE.
(process_init_constructor_array): Ditto.
(process_init_constructor_record): Ditto.
(build_x_arrow): Ditto.
(build_m_component_ref): Ditto.
(build_functional_cast): Add SFINAE support.
* pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
* semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
(finish_expr_stmt): Ditto.
(finish_for_expr): Ditto.
(finish_asm_stmt): Ditto.
(finish_non_static_data_member): Ditto.
(finish_qualified_id_expr): Ditto.
(finish_call_expr): Add SFINAE support.
(finish_increment_expr): Fix calls for SFINAE.
(finish_unary_op_expr): Ditto.
(simplify_aggr_init_expr): Ditto.
(finish_omp_clauses): Ditto.
(finish_omp_for): Ditto.
(finish_omp_barrier): Ditto.
(finish_omo_flush): Ditto.
* decl2.c (grok_array_decl): Fix calls or SFINAE.
(build_anon_union_vars): Ditto.
(get_guard_cond): Ditto.
(set_guard): Ditto.
(one_static_initialization_or_destruction): Ditto.
(do_static_initialization_or_destruction): Ditto.
(generate_ctor_or_dtor_function): Ditto.
(build_offset_ref_call_from_tree): Ditto.
* parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
(cp_parser_postfix_dot_deref_expression): Ditto.
(cp_parser_unary_expression): Ditto.
(cp_parser_new_expression): Ditto.
(cp_parser_cast_expression): Ditto.
(cp_parser_binary_expression): Ditto.
(cp_parser_question_colon_clause): Ditto.
(cp_parser_assignment_expression): Ditto.
(cp_parser_expression): Ditto.
(cp_parser_builtin_offsetof): Ditto.
(cp_parser_template_argument): Ditto.
(cp_parser_functional_cast): Ditto.
2008-03-24 Tom Tromey <tromey@redhat.com>
* lex.c (handle_pragma_interface): Don't copy the filename.
(handle_pragma_implementation): Copy filename using xstrdup.
2008-03-21 Paolo Carlini <pcarlini@suse.de>
* cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
(SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
(IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
(PROMOTES_TO_AGGR_TYPE): Remove.
(CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
* typeck.c (unary_complex_lvalue, build_modify_expr,
convert_for_initialization): Adjust.
* init.c (is_aggr_type): Remove.
(is_class_type): Add.
(build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
build_delete): Adjust.
* lex.c (make_aggr_type): Remove.
(make_class_type): Add.
(cxx_make_type): Adjust.
* class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
Adjust.
* decl.c (build_typename_type, make_typename_type,
make_unbound_class_template, cxx_init_decl_processing,
check_tag_decl, groktypename, start_decl_1, layout_var_decl,
check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
grok_op_properties, xref_tag, check_function_type): Adjust.
* call.c (check_dtor_name, standard_conversion, implicit_conversion,
add_builtin_candidate, add_builtin_candidates,
build_user_type_conversion_1, convert_like_real, build_cxx_call,
is_subseq, compare_ics): Adjust.
* method.c (use_thunk): Adjust.
* rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
create_tinfo_types): Adjust.
* cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
build_up_reference, convert_to_reference, convert_from_reference,
ocp_convert, build_expr_type_conversion): Adjust.
* tree.c (bind_template_template_parm, error_type): Adjust.
* dump.c (cp_dump_tree): Adjust.
* search.c (lookup_member): Adjust.
* friend.c (make_friend_class, do_friend): Adjust.
* typeck2.c (store_init_value, process_init_constructor_array,
process_init_constructor_record, build_x_arrow, build_m_component_ref,
build_functional_cast): Adjust.
* pt.c (finish_member_template_decl, process_template_parm,
lookup_template_class, tsubst_function_type, tsubst,
tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
Adjust.
* semantics.c (begin_class_definition, finish_base_specifier,
finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
Adjust.
* name-lookup.c (constructor_name_p, push_overloaded_decl,
do_class_using_decl, lookup_qualified_name,
maybe_process_template_type_declaration): Adjust.
* decl2.c (grok_array_decl, check_member_template,
constrain_class_visibility): Adjust.
* parser.c (cp_parser_class_name): Adjust.
2008-03-18 Paolo Bonzini <bonzini@gnu.org>
* cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
2008-03-17 Jason Merrill <jason@redhat.com>
PR c++/35548
* call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
a temp directly to a reference as per DR391.
2008-03-12 Richard Guenther <rguenther@suse.de>
PR c++/35469
Revert:
2008-02-04 Richard Guenther <rguenther@suse.de>
PR java/35035
* decl.c (record_builtin_java_type): Make jboolean a
integer type again where its mode doesn't match that of bool.
2008-01-25 Richard Guenther <rguenther@suse.de>
PR c++/33887
* decl.c (record_builtin_java_type): Make __java_boolean
a variant of bool.
* typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
after TYPE_MAIN_VARIANT check.
2008-03-10 Jakub Jelinek <jakub@redhat.com>
PR c++/35328
* semantics.c (finish_omp_clauses): Look through NOP_EXPR even
if errorcount.
PR c++/35337
* semantics.c (finish_omp_clauses): Use %qD instead of %qE for
DECL_P in not a variable and appears more than once error messages.
2008-03-07 Paolo Bonzini <bonzini@gnu.org>
Revert:
2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
PR c++/35049
PR c++/35096
* typeck.c (structural_comptypes): Call cp_comptypes.
(comptypes): New; called from the C/C++ common bits to perform
strict checks.
(cp_comptypes): Renamed from comptypes, which is already used,
with a different signature, by the C++ front end.
(build_reinterpret_cast_1): Call cp_comptypes.
(ptr_reasonably_similar): Ditto.
* decl.c (decls_match): Ditto.
* cvt.c (convert_to_reference): Ditto.
* cp-tree.h (same_type_p): Ditto.
(same_or_base_type_p): Ditto.
(comptypes): Rename to cp_comptypes.
* pt.c (canonical_type_parameter): Call cp_comptypes.
2008-03-07 Paolo Bonzini <bonzini@gnu.org>
* cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
test for equivalence between pointer and references.
2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR 24924
* class.c (finish_struct_anon): Use permerror instead of pedwarn.
(check_field_decls): Likewise.
(note_name_declared_in_class): Likewise.
* call.c (build_new_op): Likewise.
(convert_like_real): Likewise.
(build_over_call): Likewise.
* lex.c (unqualified_fn_lookup_error): Likewise.
* parser.c (cp_parser_template_id): Likewise.
* cvt.c (warn_ref_binding): Likewise.
(convert_to_reference): Likewise.
(ocp_convert): Likewise.
(convert_to_void): Use error instead of pedwarn.
* error.c (cp_cpp_error): Use pedantic_warning_kind.
* decl.c (compute_array_index_type): Use constant_expression_error.
2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
* parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
that auto is either a storage class or a simple type specifier,
depending on the dialect.
(cp_parser_decl_specifier_seq): Complain about `auto' as a storage
specifier in C++98 mode, error in C++0x mode (since we don't
support auto as a type specifier, yet).
(cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
storage specifier in C++0x mode.
(cp_parser_simple_type_specifier): Parse `auto' as a
simple-type-specifier, but error because we don't support it yet.
2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
* parser.c (cp_parser_nonclass_name): New.
(cp_parser_pseudo_destructor_name): Use it instead of
cp_parser_type_name.
(cp_parser_type_name): Move code to cp_parser_nonclass_name.
2008-02-29 Tom Tromey <tromey@redhat.com>
* parser.c (struct cp_token) <input_file_stack_index>: Remove.
(cp_lexer_get_preprocessor_token): Update.
(cp_lexer_set_source_position_from_token): Don't call
restore_input_file_stack.
* lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
2008-02-28 Richard Guenther <rguenther@suse.de>
Revert:
2008-02-26 Richard Guenther <rguenther@suse.de>
* decl.c (duplicate_decls): Remove decl from global mapping
before ggc_freeing it.
2008-02-27 Jakub Jelinek <jakub@redhat.com>
PR c++/35368
* rtti.c: Include c-pragma.h.
(push_abi_namespace, pop_abi_namespace): New functions.
(build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
create_tinfo_types, emit_support_tinfos): Use them.
* Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
2008-02-26 Jason Merrill <jason@redhat.com>
PR c++/35315
* decl.c (grokdeclarator): Allow a typedef of an unnamed struct
to name the struct for linkage purposes even if it has attributes.
(start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
2008-02-26 Tom Tromey <tromey@redhat.com>
* parser.c (eof_token): Remove old location code.
(check_empty_body): Remove test of USE_MAPPED_LOCATION.
* decl2.c (generate_ctor_or_dtor_function): Remove old location
code.
(cp_write_global_declarations): Likewise.
* lex.c (cxx_init): Remove old location code.
(handle_pragma_implementation): Remove test of
USE_MAPPED_LOCATION.
* pt.c (tsubst): Remove old location code.
* error.c (cp_print_error_function): Remove test of
USE_MAPPED_LOCATION.
* decl.c (pop_label): Remove old location code.
(finish_function): Likewise.
2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR 26264
* call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
2008-02-26 Richard Guenther <rguenther@suse.de>
* decl.c (duplicate_decls): Remove decl from global mapping
before ggc_freeing it.
2008-02-26 Paolo Carlini <pcarlini@suse.de>
PR c++/35323
* name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
* typeck.c (build_class_member_access_expr): Add appropriate
OPT_W* parameter to warning.
(build_reinterpret_cast_1): Likewise.
* name-lookup.c (push_overloaded_decl): Likewise.
2008-02-25 Paolo Carlini <pcarlini@suse.de>
PR c++/35333
* error.c (dump_expr): Handle CONJ_EXPR.
2008-02-25 Paolo Carlini <pcarlini@suse.de>
PR c++/35338
* error.c (dump_type): Handle FIXED_POINT_TYPE.
(dump_expr): Handle FIXED_CST.
2008-02-24 Jason Merrill <jason@redhat.com>
* parser.c (cp_parser_declaration): Handle "inline namespace".
(cp_parser_namespace_definition): Likewise.
PR c++/33486
* name-lookup.c (arg_assoc_namespace): Look down into inline
namespaces, too.
2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
* typeck.c (check_for_casting_away_constness): Use 1 single
argument, the type of cast, to decide what diagnostics generate.
(build_static_cast_1): Remove unused code. Update call to
check_for_casting_away_constness.
(build_reinterpret_cast_1): Update call to
check_for_casting_away_constness.
(build_const_cast_1): Likewise.
2008-02-24 Paolo Carlini <pcarlini@suse.de>
* error.c (dump_expr): Don't deal directly with NEW_EXPR (and
VEC_NEW_EXPR), forward to pp_expression.
* cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
PR c++/34749
* friend.c (do_friend): Call cplus_decl_attributes earlier.
2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR C++/34715
* decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
template decls' function decl.
2008-02-22 Paolo Carlini <pcarlini@suse.de>
PR c++/35282
Revert:
2008-02-14 Paolo Carlini <pcarlini@suse.de>
PR c++/28743
* pt.c (determine_specialization): In case of function templates,
when the type of DECL does not match FN there is no match.
2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
PR c/19999
* typeck.c (build_binary_op): Warn about floating point
comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
2008-02-19 Jason Merrill <jason@redhat.com>
PR c++/34950
* pt.c (resolve_overloaded_unification): Set processing_template_decl
while we look for possible bindings.
2008-02-19 Jakub Jelinek <jakub@redhat.com>
PR c++/35028
* cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
PR c++/34964
PR c++/35244
* semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
vars. Afterwards ensure v is VAR_DECL.
PR c++/35078
* parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
call cp_finish_decl.
* semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
early.
2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
PR c++/35023
PR c++/35024
PR c++/35026
* pt.c (finish_member_template_decl): If the type in a TYPE_DECL
is error_mark_node, return an error early.
(find_parameter_packs_r): Pass the pointer set along to recursive
calls of cp_walk_subtrees; don't try to manage the pointer set
ourselves.
(uses_parameter_packs): Pass the pointer set to cp_walk_tree.
(make_pack_expansion): Ditto.
(check_for_bare_parameter_packs): Ditto. Also, don't bother taking
a second pass through the tree with find_parameter_packs_r; that
second pass no longer does anything.
(push_template_decl_real): If we have an erroneous declaration,
set its type to error_mark_node before returning an error.
2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
PR c++/34050
* pt.c (tsubst_initializer_list): Deal with the use of
VOID_TYPE_NODE to indicate value-initialization of the bases.
2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
Jason Merrill <jason@redhat.com>
PR c++/5645
PR c++/11159
* class.c (type_has_user_nondefault_constructor): New fn.
* cp-tree.h: Declare it.
* init.c (emit_mem_initializers): Use it for -W warning about
missing base initializer.
2008-02-14 Paolo Carlini <pcarlini@suse.de>
PR c++/28743
* pt.c (determine_specialization): In case of function templates,
when the type of DECL does not match FN there is no match.
2008-02-13 Jakub Jelinek <jakub@redhat.com>
Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c++/35138
* parser.c (cp_parser_pseudo_destructor_name): If next tokens
are not identifier :: ~, return before calling cp_parser_type_name.
2008-02-13 Jason Merrill <jason@redhat.com>
PR c++/34962, c++/34937, c++/34939
* decl2.c (is_late_template_attribute): Always defer attributes
vector_size and weak.
PR c++/34774
* pt.c (value_dependent_expression_p): Look into DECL_INITIAL
of enumerators, too.
2008-02-12 Jason Merrill <jason@redhat.com>
PR c++/34824
* call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
if we're doing conversions to call a user-defined conversion function.
2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
PR c++/29048
* semantics.c (finish_qualified_id_expr): Avoid duplicate access
check here, too.
2008-02-12 Jakub Jelinek <jakub@redhat.com>
PR c++/34862
* init.c (build_new_1): Don't create placement_expr before
constructing alloc_call. Verify that the pointer is passed by
value to operator new.
2008-02-11 Jason Merrill <jason@redhat.com>
PR c++/35097
* pt.c (tsubst): Don't look up a template typedef in an explicit
specialization.
2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
PR c++/35113
* tree.c (cp_build_qualified_type_real): When building a
cv-qualified array type, build it as a unique type with
build_cplus_array_type_1 and then adopt the unqualified type's
main variant.
2008-02-11 Paolo Carlini <pcarlini@suse.de>
PR c++/35077
* decl.c (groktypename): Check grokdeclarator return.
2008-02-10 Jason Merrill <jason@redhat.com>
PR c++/34094
* decl2.c (cp_write_global_declarations): Don't write out static
data members with DECL_IN_AGGR_P set.
2008-02-08 Jason Merrill <jason@redhat.com>
PR c++/35116
* tree.c (build_target_expr_with_type): Handle void initializer.
(bot_manip): Remap slot before recursing.
2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
PR other/35107
* Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
2008-02-06 Alexandre Oliva <aoliva@redhat.com>
PR c++/35056
* tree.c: Include tree-flow.h.
(build_target_expr): Check type compatibility.
* Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
* call.c (convert_like_real): Convert bitfield to expected type.
2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
PR c++/35049
PR c++/35096
* typeck.c (structural_comptypes): Call cp_comptypes.
(comptypes): New; called from the C/C++ common bits to perform
strict checks.
(cp_comptypes): Renamed from comptypes, which is already used,
with a different signature, by the C++ front end.
(build_reinterpret_cast_1): Call cp_comptypes.
(ptr_reasonably_similar): Ditto.
* decl.c (decls_match): Ditto.
* cvt.c (convert_to_reference): Ditto.
* cp-tree.h (same_type_p): Ditto.
(same_or_base_type_p): Ditto.
(comptypes): Rename to cp_comptypes.
* pt.c (canonical_type_parameter): Call cp_comptypes.
2008-02-05 Jakub Jelinek <jakub@redhat.com>
PR c++/33553
* pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
value dependent expression.
2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
PR c++/35074
* decl2.c (save_template_attributes): When we're modifying the
TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
all of the other variants to add those same attributes. Otherwise,
the main variant will be inconsistent with those other variants.
2008-02-04 Richard Guenther <rguenther@suse.de>
PR java/35035
* decl.c (record_builtin_java_type): Make jboolean a
integer type again where its mode doesn't match that of bool.
2008-02-02 Jason Merrill <jason@redhat.com>
Mark Mitchell <mark@codesourcery.com>
PR c++/33916
* init.c (build_value_init_1): New function.
(build_value_init): New function.
* typeck2.c (build_functional_cast): Call it.
* cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
* cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
TYPE_HAS_CONSTRUCTOR.
* class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
add_implicitly_declared_members): Adjust.
(check_field_decls): Adjust. Remove warnings about reference/const
in class without constructor.
(check_bases_and_members): Adjust. Give those warnings here instead.
* decl.c (fixup_anonymous_aggr): Adjust.
(check_initializer): Adjust, clarify logic slightly.
(grok_special_member_properties): Adjust, only set if user-provided.
* rtti.c (create_tinfo_types): Don't set.
* cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
Use same_type_ignoring_top_level_qualifiers_p.
* pt.c (check_explicit_specialization): Adjust.
(instantiate_class_template): Adjust.
2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
Jakub Jelinek <jakub@redhat.com>
PR c++/34935
PR c++/34936
* typeck.c (structural_comptypes): Handle comparisons of
VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
REAL_TYPE nodes.
* mangle.c (write_builtin_type): Map down to the canonical type,
which will be one of the predefined type nodes.
2008-01-29 Michael Meissner <michael.meissner@amd.com>
PR 35004
* cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
bits to allow for expansion of the number of middle end tree
codes.
2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
PR c++/34055
PR c++/34103
PR c++/34219
PR c++/34606
PR c++/34753
PR c++/34754
PR c++/34755
PR c++/34919
PR c++/34961
* typeck.c (check_return_expr): Tweak call to
check_for_bare_parameter_packs.
* class.c (add_method): Be careful with error_mark_nodes.
* cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
signature.
* pt.c (struct find_parameter_pack_data): Remove
SET_PACKS_TO_ERROR.
(find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
(uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
(make_pack_expansion): Ditto.
(check_for_bare_parameter_packs): Parameter is now a tree, not a
tree*.
(process_template_parm): Tweak call to
check_for_bare_parameter_packs.
(push_template_decl_real): Tweak calls to
check_for_bare_parameter_packs. If bare parameter packs are found
in the list of exceptions, clear out that list after giving an
error.
* semantics.c (finish_cond): Tweak call to
check_for_bare_parameter_packs.
(finish_expr_stmt): Ditto.
(finish_for_expr): Ditto.
(finish_switch_cond): Ditto.
(finish_mem_initializers): Ditto.
(finish_member_declaration): Ditto.
(finish_static_assert): Check for bare parameter packs in the
condition.
* decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
attributes of a declaration.
* parser.c (cp_parser_using_declaration): Tweak call to
check_for_bare_parameter_packs.
(cp_parser_base_clause): Ditto.
2008-01-28 Jason Merrill <jason@redhat.com>
PR c++/35007
* class.c (build_base_path): Fix !want_pointer case.
2008-01-27 Jason Merrill <jason@redhat.com>
PR c++/27177
* class.c (build_base_path): Fix previous change.
2008-01-26 Jakub Jelinek <jakub@redhat.com>
PR c++/34965
* error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
and TRUTH_XOR_EXPR.
2008-01-26 Richard Guenther <rguenther@suse.de>
PR c++/34235
* typeck.c (build_binary_op): Remove code to shorten compares.
2008-01-25 Richard Guenther <rguenther@suse.de>
PR c++/33887
* decl.c (record_builtin_java_type): Make __java_boolean
a variant of bool.
* typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
after TYPE_MAIN_VARIANT check.
2008-01-25 Jason Merrill <jason@redhat.com>
PR c++/27177
* class.c (build_base_path): Don't mess with virtual access if
skip_evaluation.
* call.c (standard_conversion): Don't check whether source type
is complete.
* decl2.c (is_late_template_attribute): Don't defer attribute
visibility just because the type is dependent.
2008-01-25 Jason Merrill <jason@redhat.com>
Mark Mitchell <mark@codesourcery.com>
PR c++/31780
* call.c (standard_conversion): Allow conversion from integer/real
to complex.
(compare_ics): Such a conversion is worse than a normal arithmetic
conversion.
2008-01-25 Richard Guenther <rguenther@suse.de>
PR c++/33887
* cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
to true.
2008-01-24 Paolo Carlini <pcarlini@suse.de>
PR c++/34603
* pt.c (push_template_decl_real): Return error_mark_node in case
of template definition of non-template.
2008-01-24 Jason Merrill <jason@redhat.com>
PR c++/34913
* decl2.c (is_late_template_attribute): Defer any attribute with
dependent args. Also defer type attributes if the type is dependent.
2008-01-22 Jakub Jelinek <jakub@redhat.com>
Alexandre Oliva <aoliva@redhat.com>
PR c++/33984
* call.c (reference_binding): For bitfields use the declared bitfield
type.
(add_builtin_candidates): Likewise.
* class.c (layout_class_type): For bitfields copy over the
original type quals.
2008-01-22 Jason Merrill <jason@redhat.com>
PR c++/28560
* decl.c (groktypename): Also ignore attributes on dependent
possibly-class types.
PR c++/34912
* friend.c (do_friend): Check for prior declaration of a friend
function of a local class.
* name-lookup.c (lookup_name_innermost_nonclass_level):
No longer static.
* name-lookup.h: Declare it.
2008-01-22 Tom Tromey <tromey@redhat.com>
PR c++/34829:
* init.c (build_new_1): Only disallow Java aggregates.
2008-01-22 Jakub Jelinek <jakub@redhat.com>
PR c++/34607
* semantics.c (finish_omp_for): Don't call c_finish_omp_for
if decl or init is error_mark_node.
PR c++/34918
* error.c (dump_expr): Handle VECTOR_CST.
2008-01-21 Jason Merrill <jason@redhat.com>
PR c++/33959
* pt.c (tsubst_aggr_type): Make sure our context is complete.
PR c++/34573
* pt.c (retrieve_local_specialization): Robustify.
(tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
PR c++/34846
* pt.c (tsubst): Only call retrieve_local_specialization if the
original typedef was in a function template.
PR c++/34196
* decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
2008-01-21 Richard Guenther <rguenther@suse.de>
PR c++/34850
* error.c (cp_print_error_function): Deal with recursive
BLOCK trees.
2008-01-20 Paolo Carlini <pcarlini@suse.de>
PR c++/34891
* error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
2008-01-20 Paolo Carlini <pcarlini@suse.de>
PR c++/34776
PR c++/34486
* name-lookup.c (do_class_using_decl): Do not call constructor_name_p
on non-IS_AGGR_TYPE scope.
(constructor_name_p): Assert IS_AGGR_TYPE.
2008-01-18 Ian Lance Taylor <iant@google.com>
PR c++/33407
* decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
(grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
DECL_IS_OPERATOR_NEW flag.
2008-01-16 Richard Guenther <rguenther@suse.de>
PR c++/33819
* typeck.c (is_bitfield_expr_with_lowered_type): Recurse
for conversions to type variants.
2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
* parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
declaration and code. Update copyright year.
2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
PR c++/34399
* friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
know we have a class type.
2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
PR c++/34751
* pt.c (coerce_template_parameter_pack): When substituting into
the type of a non-type template parameter pack. use the
deduced/substituted arguments.
* parser.c (declarator_can_be_parameter_pack): A pointer-to-member
can be a parameter pack with the ellipsis following it. When we
have an erroneous declaration, allow it to be a parameter pack.
(cp_parser_template_parameter): Complain about default
arguments on non-type template parameter packs, and parse them
using the new cp_parser_default_argument.
(cp_parser_parameter_declaration): Complain about parameter packs
with default arguments. Move parsing of default arguments into a
new function, cp_parser_default_argument.
(cp_parser_default_argument): New; extracted from
cp_parser_parameter_declaration.
2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
PR c++/34051
PR c++/34055
PR c++/34102
PR c++/34103
* typeck.c (check_return_expr): If there are bare parameter packs
in the return value, set it to error_mark_node.
* tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
* pt.c (find_parameter_packs_r): Look at the type of
IDENTIFIER_NODEs (e.g., for user-defined conversions).
(check_for_bare_parameter_packs): Flip the result: now returns
TRUE when there were bare parameter packs, FALSE otherwise.
(push_template_decl_real): Deal with flipped result of
check_for_bare_parameter_packs.
* semantics.c (finish_cond): If there are bare parameter packs in
the conditional, set it to error_mark_node.
(finish_expr_stmt): If there are bare parameter packs in the
expression, set it to error_mark_node.
(finish_for_expr): Ditto.
(finish_switch_cond): If there are bare parameter packs in
the conditional, set it to error_mark_node.
(finish_mem_initializers): If there are bare parameter packs in
the member initializer, set it to error_mark_node.
(finish_member_declaration): Check the attributes of the
declaration for bare parameter packs, and remove the attributes if
any have bare parameter packs.
* parser.c (cp_parser_using_declaration): Check the using
declaration for bare parameter packs.
(cp_parser_base_clause): If there are bare parameter packs in a
base specifier, don't add it to the chain.
2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
PR c++/34314
* error.c (dump_simple_decl): Display ellipsis for template
non-type parameter packs.
(dump_decl): Display ellipsis for template type parameter packs.
(dump_template_decl): Display ellipsis for template template
parameter packs.
* pt.c (redeclare_class_template): When redeclaring a class
template, check for collisions between template parameters and
template parameter packs.
2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
PR c++/33964
* pt.c (process_partial_specialization): Don't mark template
parameters that occur in non-deduced contexts.
(struct pair_fn_data): Add include_nondeduced_p.
(for_each_template_parm_r): Only visit non-deduced contexts if
include_nondeduced_p is set.
(for_each_template_parm): Added parameter include_nondeduced_p,
which states whether template parameters found in non-deduced
contexts should be visited.
(uses_template_parms): Visit all template parameters, even those
in non-deduced contexts.
2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
PR c++/34052
* pt.c (check_default_tmpl_args): Check for parameter packs that
aren't at the end of a primary template.
(push_template_decl_real): Remove check for parameter packs that
aren't at the end of a primary template; that now happens in
check_default_tmpl_args.
* semantics.c (finish_template_template_parm): Use
check_default_tmpl_args to check for errors in the template
parameter list.
2008-01-12 Doug Kwan <dougkwan@google.com>
* decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
instead of OPT_Wreturn_type in warning due to ignored return type
qualifiers.
* pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
instead of OPT_Wreturn_type in warning due to ignored return type
qualifiers.
2008-01-08 Jakub Jelinek <jakub@redhat.com>
PR c++/33890
* semantics.c (finish_omp_for): Don't call
fold_build_cleanup_point_expr if processing_template_decl.
2008-01-04 Paolo Carlini <pcarlini@suse.de>
Jakub Jelinek <jakub@redhat.com>
PR c++/34611
* error.c (dump_template_argument): Deal with TREE_LIST.
2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
* parser.c (cp_parser_check_decl_spec): Don't warn about "long
long" in C++0x mode; change the warning to note that "long long"
is only unsupported in C++98 mode.
2007-12-20 Jason Merrill <jason@redhat.com>
PR c++/34111
* call.c (standard_conversion): Derived-to-base is considered a
standard conversion.
2007-12-19 Jakub Jelinek <jakub@redhat.com>
PR c++/34513
* parser.c (cp_parser_omp_parallel): For non-combined parallel
call cp_parser_statement rather than
cp_parser_already_scoped_statement.
2007-12-18 Jason Merrill <jason@redhat.com>
PR c++/34206
* pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
use template parms.
(dependent_type_p_r): Handle the domain of an array.
2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
Jakub Jelinek <jakub@redhat.com>
PR c++/32565
PR c++/33943
PR c++/33965
* pt.c (template_template_parm_bindings_ok_p): New; verifies
bindings of template template parameters after all template
arguments have been deduced.
(coerce_template_parms): Don't complain when COMPLAIN doesn't
include tf_error.
(fn_type_unification): Use template_template_parm_bindings_ok_p.
(unify): Deal with variadic, bound template template parameters.
(get_class_bindings): Use template_template_parm_bindings_ok_p.
2007-12-18 Jakub Jelinek <jakub@redhat.com>
PR c++/34488
* decl.c (grokdeclarator): Reject friend sfk_constructor
FUNCTION_TYPE.
2007-12-17 Jakub Jelinek <jakub@redhat.com>
PR c/34506
* parser.c (cp_parser_omp_all_clauses): Accept optional comma
in between clauses.
2007-12-15 Alexandre Oliva <aoliva@redhat.com>
PR debug/7081
* cp-lang.c (cp_classify_record): New.
(LANG_HOOKS_CLASSIFY_RECORD): Override.
2007-12-11 Jakub Jelinek <jakub@redhat.com>
PR c++/34238
* decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
PR c++/34364
* rtti.c (build_dynamic_cast): Call convert_from_reference even for
dynamic_cast in a template.
2007-12-10 Simon Martin <simartin@users.sourceforge.net>
PR c++/34059
* typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
2007-12-10 Jakub Jelinek <jakub@redhat.com>
PR c++/34395
* error.c (dump_type_prefix, dump_type_suffix): Handle
TYPE_PACK_EXPANSION.
PR c++/34394
* error.c (dump_expr): Handle ABS_EXPR.
2007-12-09 Jakub Jelinek <jakub@redhat.com>
PR c++/34178
PR c++/34340
* repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
Return 2 also if DECL_EXPLICIT_INSTANTIATION.
* decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
flag_use_repository and repo_emit_p returned 2.
2007-12-06 Jakub Jelinek <jakub@redhat.com>
PR c++/34336
* tree.c (stabilize_call, stabilize_init): Do nothing if
processing_template_decl.
2007-12-05 Jakub Jelinek <jakub@redhat.com>
PR c++/34271
* semantics.c (finish_decltype_type): For SCOPE_REF issue an
error instead of assertion failure.
* parser.c (cp_parser_decltype): If closing paren is not found,
return error_mark_node.
2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
PR c++/34101
* name-lookup.c (arg_assoc_template_arg): Recurse on argument
packs.
(arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
since arg_assoc_template_arg will deal with them (better).
2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
PR c++/33509
* pt.c (tsubst_exception_specification): Handle substitutions into
member templates, where tsubst_pack_expansion returns a
TYPE_PACK_EXPANSION.
2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
PR c++/33091
* pt.c (unify_pack_expansion): If we didn't deduce any actual
bindings for the template parameter pack, don't try to keep the
empty deduced arguments.
(unify): If a parameter is a template-id whose template argument
list contains a pack expansion that is not at the end, then we
cannot unify against that template-id.
2007-12-02 Paolo Carlini <pcarlini@suse.de>
PR c++/34061
* pt.c (current_template_args): Use error_operand_p.
2007-12-02 Paolo Carlini <pcarlini@suse.de>
PR c++/34273
* error.c (dump_decl): Handle TREE_BINFO.
2007-12-01 Ollie Wild <aaw@google.com>
PR c++/8171
* typeck.c (build_binary_op): Add conversion of pointers to function
members appearing as operands to the equality operators.
2007-11-30 Jakub Jelinek <jakub@redhat.com>
PR c++/34275
* error.c (dump_expr): Handle OBJ_TYPE_REF.
2007-11-29 Jakub Jelinek <jakub@redhat.com>
PR c++/34270
* tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
in templates.
* typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
Likewise.
PR c++/34267
PR c++/34268
* parser.c (cp_parser_decltype): Don't call finish_id_expression
on ~type.
* semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
and ~type early.
2007-11-27 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/34181
* method.c (use_thunk): Don't inline the call in the thunk.
PR c++/34213
* tree.c (decl_linkage): Static data members and static member
functions in anonymous ns classes are lk_external.
2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
PR c++/34081
* decl.c (start_preparsed_function): Pass
processing_template_decl for the new allocate_struct_function
parameter.
2007-11-25 Richard Guenther <rguenther@suse.de>
* decl.c (poplevel): Use BLOCK_CHAIN.
2007-11-24 Ollie Wild <aaw@google.com>
* typeck.c (delta_from_ptrmemfunc): New function.
(get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
(build_binary_op): Call delta_from_ptrmemfunc.
2007-11-23 Jakub Jelinek <jakub@redhat.com>
PR c++/30293
PR c++/30294
* decl.c (cp_finish_decl): Disallow variable or field
definitions if extern "Java" aggregates.
(grokparms): Disallow parameters with extern "Java"
aggregates.
(check_function_type): Disallow function return values
with extern "Java" aggregates.
* init.c (build_new_1): Disallow placement new with
extern "Java" aggregates.
2007-11-23 Mark Mitchell <mark@codesourcery.com>
Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c++/5310
* call.c (convert_like_real): Build a zero constant when __null is
converted to an integer type.
2007-11-22 Jakub Jelinek <jakub@redhat.com>
PR c++/34094
* decl2.c (cp_write_global_declarations): Issue error about static
data members in anonymous namespace which are declared and used,
but not defined.
2007-11-20 Jakub Jelinek <jakub@redhat.com>
PR c++/34089
* parser.c (cp_parser_class_head): Reject function template ids.
PR c++/28879
* tree.c (build_cplus_array_type_1): Don't pass any VLA types
when processing_template_decl to build_array_type.
PR c++/33962
* pt.c (more_specialized_fn): Don't segfault if one or
both argument list end with ellipsis.
2007-11-18 Jakub Jelinek <jakub@redhat.com>
PR c++/30988
* semantics.c (finish_call_expr): Set
current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
or OVERLOAD with all noreturn functions.
2007-11-16 Jakub Jelinek <jakub@redhat.com>
PR c++/34100
* pt.c (apply_late_template_attributes): Do nothing if decl's type is
error_mark_node.
2007-11-13 Jakub Jelinek <jakub@redhat.com>
PR c++/34054
PR c++/34056
PR c++/34057
PR c++/34058
PR c++/34060
* pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
set to error_mark_node the outermost POINTER_TYPE to the pack if
it is seen in a POINTER_TYPE.
(push_template_decl_real): If check_for_bare_parameter_packs
fails for function return type, set the return type to
integer_type_node. If check_for_bare_parameter_packs failed
for non-function, return error_mark_node.
PR c++/29225
* call.c (build_new_op): Call resolve_args before calling
build_over_call.
2007-11-11 Tom Tromey <tromey@redhat.com>
PR c++/17577:
* lex.c (handle_pragma_implementation): Use cpp_included_before.
2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c++/8570
* pt.c (redeclare_class_template): Update error message. Use a
note to show the previous declaration.
(tsubst_friend_class): Use the location of the friend template as
the input location before calling redeclare_class_template.
2007-11-11 Jakub Jelinek <jakub@redhat.com>
PR c++/34068
* semantics.c (finish_pseudo_destructor_expr): Handle
object == error_mark_node.
2007-11-10 Jakub Jelinek <jakub@redhat.com>
PR c++/32241
* pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
is not scalar type, let finish_class_member_access_expr handle
diagnostics. Pass BIT_NOT_EXPR argument to
finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
PR c++/33510
* decl.c (cp_complete_array_type): If any of the initializer
elements are pack expansions, don't compute the array size yet.
2007-11-08 Andrew Pinski <pinskia@gmail.com>
PR c++/30297:
* tree.c (decl_linkage): Fields have no linkage.
2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
* class.c (build_ctor_vtbl_group): Lay out the new type and decl.
2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
PR c++/33045
PR c++/33837
PR c++/33838
* semantics.c (finish_decltype_type): See through INDIRECT_REFs.
Be careful with ERROR_MARK_NODEs.
* parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
argument.
2007-11-07 Jakub Jelinek <jakub@redhat.com>
PR c++/33501
* call.c (build_over_call): Don't check TREE_ADDRESSABLE
on incomplete type.
2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
PR c++/33977
PR c++/33886
* tree.c (c_build_qualified_type): Define bridge to
cp_build_qualified_type.
2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
PR c++/31439
PR c++/32114
PR c++/32115
PR c++/32125
PR c++/32126
PR c++/32127
PR c++/32128
PR c++/32253
PR c++/32566
* typeck.c (check_return_expr): Pass address of retval to
check_for_bare_parameter_packs.
* class.c (build_base_field): Tolerate bases that have no layout
due to errors.
(end_of_base): Ditto.
* tree.c (canonical_type_variant): Be careful with
ERROR_MARK_NODE.
* cp-tree.h (check_for_bare_parameter_packs): Now accepts a
tree*.
* pt.c (find_parameter_pack_data): Add set_packs_to_error field,
which states whether parameter packs should be replaced with
ERROR_MARK_NODE.
(find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
possible. If set_packs_to_error is set true, replace the parameter
pack with ERROR_MARK_NODE. Manage our own pointer sets.
(uses_parameter_packs): Don't set parameter packs to
ERROR_MARK_NODE.
(check_for_bare_parameter_packs): Now takes a pointer to a tree,
which may be modified (if it is a parameter pack). Instructs
find_parameter_packs_r to replace parameter packs with
ERROR_MARK_NODE (so that they won't cause errors later on).
(process_template_parm): Pass pointer to
check_for_bare_parameter_packs.
(process_partial_specialization): Replace pack expansions before
the end of the template argument list with ERROR_MARK_NODE.
(push_template_decl_real): Pass pointer to
check_for_bare_parameter_packs. Replace parameter packs not at the
end of the template parameter list with ERROR_MARK_NODE.
(convert_template_argument): Be more careful about using DECL_NAME
on only declarations.
(unify): Can't unify against ERROR_MARK_NODE.
* semantics.c (finish_cond): Pass pointer to
check_for_bare_parameter_packs.
(finish_expr_stmt): Ditto.
(finish_for_expr): Ditto.
(finish_switch_cond): Pass pointer to
check_for_bare_parameter_packs, and call it before we put the
condition into the statement.
(finish_mem_initializers): Pass pointer to
check_for_bare_parameter_packs.
(finish_member_declaration): Ditto.
* parser.c (cp_parser_base_clause): Ditto.
2007-11-06 Jakub Jelinek <jakub@redhat.com>
PR target/33168
* decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
with the final TREE_READONLY flag in place. processing_template_decl
is known to be 0 in this part of function.
PR c++/33894
* cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
* pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
* semantics.c (finish_omp_atomic): Revert most of the
2007-02-05 changes, just keep the new representation of
OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
PR c++/33871
* decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
local.
2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
PR c++/33996
PR c++/33235
PR c++/33930
* typeck.c (merge_types): Don't lose rvalue references when
merging types.
* call.c (build_over_call): Don't elide move constructors just
because the copy constructor is trivial (!).
(compare_ics): If comparing cv-qualifiers fails, we can still order
based on binding lvalues vs. rvalues.
2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
PR c++/33939
* pt.c (unify_pack_expansion): bring handling of function call
arguments into line with type_unification_real.
2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
* typeck.c (build_binary_op): Use pedwarn instead of error for
consistency.
2007-11-05 Jakub Jelinek <jakub@redhat.com>
PR c++/33836
* parser.c (cp_parser_unary_expression): For &&label call
cp_parser_non_integral_constant_expression and return error_mark_node
if it returned true.
PR c++/33969
* decl.c (grokdeclarator): Don't call build_memfn_type if type
is neither FUNCTION_TYPE nor METHOD_TYPE.
2007-11-02 Jakub Jelinek <jakub@redhat.com>
PR c++/33516
* parser.c (cp_parser_nested_name_specifier_opt): Use
TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
typedef of currently open class.
2007-11-02 Paolo Carlini <pcarlini@suse.de>
PR c++/33495
* error.c (dump_expr): Deal specially with statements.
2007-11-01 Jason Merrill <jason@redhat.com>
PR c++/30897
* pt.c (push_template_decl_real): Set DECL_CONTEXT on template
template parms.
(lookup_template_class): Use it to get the outer template args
for instantiating one.
PR c++/29236
* pt.c (reduce_template_parm_level): tsubst the parameters
of a template template parm.
2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
PR c++/33955
* pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
2007-11-01 Jakub Jelinek <jakub@redhat.com>
PR c++/32384
* parser.c (cp_parser_postfix_dot_deref_expression): If
POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
first and if that succeeds and type is SCALAR_TYPE_P, create
PSEUDO_DTOR_EXPR.
PR c++/32260
* rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
(typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
as for std::type_info.
2007-10-31 Paolo Carlini <pcarlini@suse.de>
PR c++/33494
* cxx-pretty-print.c (pp_cxx_typeid_expression,
pp_cxx_delete_expression): Change to static linkage.
* cxx-pretty-print.h: Adjust declarations.
* error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
MODOP_EXPR): Forward to pp_expression.
* cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
Fix typo.
2007-10-31 Christian Bruel <christian.bruel@st.com>
Mark Mitchell <mark@codesourcery.com>
PR c++/19531
* typeck.c (check_return_expr): Don't set named_return_value_okay_p
if retval is volatile.
2007-10-30 Jakub Jelinek <jakub@redhat.com>
PR c++/33616
* decl2.c (build_offset_ref_call_from_tree): Call
build_non_dependent_expr on object prior to building ADDR_EXPR from it
if FN is DOTSTAR_EXPR.
2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
PR c++/31993
PR c++/32252
* pt.c (find_parameter_packs_r): Fix typo in comment.
(convert_template_argument): Look at the pattern of a pack
expansion to determine what kind of entity we're converting.
(coerce_template_parameter_pack): When we have coerced a non-type
template parameter pack, substitute into the type of that pack.
(tsubst_pack_expansion): When our substitution of a parameter pack
is a "trivial" substitution of itself, just substitute into the
pack expansion rather than actually expanding.
2007-10-29 Jakub Jelinek <jakub@redhat.com>
PR c++/33841
* class.c (check_bitfield_decl): Don't set field's type to error_mark_node
for non-integral type bitfields. Return true if bitfield is correct, false
error has been diagnosed.
(check_field_decls): If check_bitfield_decl returned false, call also
check_field_decl.
2007-10-28 Paolo Carlini <pcarlini@suse.de>
Mark Mitchell <mark@codesourcery.com>
PR c++/30659
* pt.c (do_decl_instantiation): If the VAR_DECL is not a
class member error out and return.
2007-10-27 Jakub Jelinek <jakub@redhat.com>
* error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
to current_function_decl rather than 0.
PR c++/33844
* cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
->* rather than .*.
* error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
2007-10-27 Jason Merrill <jason@redhat.com>
PR c++/5247
* call.c (convert_default_arg): Detect recursion.
2007-10-27 Jakub Jelinek <jakub@redhat.com>
PR c++/33842
* cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
* cxx-pretty-print.c (pp_cxx_primary_expression): Handle
OFFSETOF_EXPR.
(pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
functions.
* error.c (dump_expr): Handle OFFSETOF_EXPR.
2007-10-26 Jason Merrill <jason@redhat.com>
PR c++/24791
* pt.c (get_template_info): New fn.
(template_class_depth): Use it.
(push_template_decl_real): Check that the template args of the
definition match the args of the previous declaration.
2007-10-26 Paolo Carlini <pcarlini@suse.de>
PR c++/31988
* decl2.c (coerce_new_type): Do not allow a default argument for
the first parameter.
2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
PR c++/33839
* parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
don't see the leading '('. Only lookup names if we get an
IDENTIFIER_NODE.
2007-10-26 Jakub Jelinek <jakub@redhat.com>
PR c++/33744
* parser.c (cp_parser_parenthesized_expression_list): Set
greater_than_is_operator_p to true in between the parens.
2007-10-26 Paolo Carlini <pcarlini@suse.de>
PR c++/31747
* decl.c (grokdeclarator): In case of conflicting specifiers
just return error_mark_node.
2007-10-26 Ollie Wild <aaw@google.com>
* expr.c (cxx_expand_expr): Removed.
* cp-tree.h (exx_expand_expr): Removed.
* cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
with c_expand_expr.
2007-10-25 Paolo Carlini <pcarlini@suse.de>
PR c++/33843
* cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
2007-10-23 Jason Merrill <jason@redhat.com>
PR c++/25950 (DR 391)
* call.c (struct conversion): Remove check_copy_constructor_p.
(reference_binding): Always bind a reference directly to a
compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
temporary creation.
(check_constructor_callable): Remove.
(convert_like_real): Don't call it.
(initialize_reference): Don't call check_constructor_callable.
(standard_conversion): Check LOOKUP_NO_CONVERSION instead of
LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
conversions if LOOKUP_NO_TEMP_BIND.
(implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
(build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
second conversion.
* cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
2007-10-22 Jakub Jelinek <jakub@redhat.com>
PR c++/33372
* semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
before checking if its type is integral.
2007-10-22 Jason Merrill <jason@redhat.com>
PR c++/33620
* class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
* pt.c (apply_late_template_attributes): Splice out dependent
attributes from DECL_ATTRIBUTES.
* decl.c (cxx_maybe_build_cleanup): Use build_address.
2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
* typeck.c (build_binary_op) : Use appropriate warning option
instead of unnamed warning.
2007-10-16 Paolo Carlini <pcarlini@suse.de>
PR c++/31446
* pt.c (current_template_args): Do not change TREE_LIST elements
with a TREE_VALUE of error_mark_node.
2007-10-16 Mark Mitchell <mark@codesourcery.com>
* typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
* decl.c (start_decl): Tidy.
(start_decl_1): Call cp_apply_type_quals_to_decl after completing
the type.
(grokdeclarator): Clarify comment.
2007-10-14 Andrew Pinski <pinskia@gmail.com>
PR c++/30303
* decl.c (grokfndecl): Return NULL after the "definition of
implicitly-declared" error happened.
2007-10-12 Simon Martin <simartin@users.sourceforge.net>
PR c++/26698
* call.c (build_user_type_conversion_1): Do not consider conversion
functions to convert a (possibly cv-qualified) object to the (possibly
cv-qualified) same object type (or a reference to it), to a (possibly
cv-qualified) base class of that type (or a reference to it).
2007-10-12 Paolo Carlini <pcarlini@suse.de>
* pt.c (tsubst): Use template_parm_level_and_index.
2007-10-12 Jakub Jelinek <jakub@redhat.com>
PR c++/32121
* parser.c (cp_parser_compound_statement): Handle label-declarations
at the beginning of the compound statement.
(cp_parser_block_declaration): Issue diagnostics about __label__
not at the beginning of a block.
2007-10-11 Paolo Carlini <pcarlini@suse.de>
PR c++/33461
* pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
to convert_template_argument.
(coerce_template_parms): Return error_mark_node after fixed-length
error.
(tsubst_decl): Check for error_mark_node the return value of the
first tsubst in 'case VAR_DECL'.
2007-10-08 Ollie Wild <aaw@google.com>
* typeck2.c (digest_init): Call cplus_expand_constant after
convert_for_initialization.
* cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
* expr.c (cplus_expand_constant): Updated function description.
2007-10-04 Jason Merrill <jason@redhat.com>
PR c++/20416
* call.c (initialize_reference): Handle local static reference
temps properly.
2007-10-03 Jason Merrill <jason@redhat.com>
PR c++/32470
* name-lookup.c (push_namespace_with_attrs): Fold back into...
(push_namespace): Here.
(handle_namespace_attrs): New fn for the attr code.
(leave_scope): Don't pop_visibility.
* name-lookup.h (struct cp_binding_level): Remove has_visibility.
* parser.c (cp_parser_namespace_definition): Call
handle_namespace_attrs and pop_visibility as appropriate.
PR c++/11756
* mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
2007-10-03 Alexandre Oliva <aoliva@redhat.com>
* decl.c (duplicate_decls): Preserve linkage flags for mere
redeclarations of gnu_inline definitions.
2007-10-03 Jason Merrill <jason@redhat.com>
PR c++/15764
* decl.c (wrap_cleanups_r): New fn.
(wrap_temporary_cleanups): New fn.
(initialize_local_var): Call it.
2007-09-29 Jason Merrill <jason@redhat.com>
PR c++/33094
* decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
constant to not have DECL_EXTERNAL if it's file-local.
2007-09-28 Ollie Wild <aaw@google.com>
Revert
2007-09-27 Ollie Wild <aaw@google.com>
* typeck2.c (digest_init): Call cplus_expand_constant after
convert_for_initialization.
* cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
* expr.c (cplus_expand_constant): Updated function description.
2007-09-28 Jason Merrill <jason@redhat.com>
PR c++/10179
* class.c (layout_empty_base): Take rli parameter, update
rli->record_align if empty base has user-specified alignment.
(build_base_field): Pass rli to it.
2007-09-28 Paolo Carlini <pcarlini@suse.de>
PR c++/33213
* error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
2007-09-28 Paolo Carlini <pcarlini@suse.de>
PR c++/33118
* error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
(dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
(dump_parameters): Just call dump_type for argument packs too.
2007-09-28 Jakub Jelinek <jakub@redhat.com>
PR c++/31434
* tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
qualification by creating qualified PACK_EXPANSION_PATTERN and
then calling make_pack_expansion on it.
2007-09-27 Ollie Wild <aaw@google.com>
* typeck2.c (digest_init): Call cplus_expand_constant after
convert_for_initialization.
* cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
* expr.c (cplus_expand_constant): Updated function description.
2007-09-27 Jason Merrill <jason@redhat.com>
PR c++/33571
* decl2.c (is_late_template_attribute): Don't crash on unknown
attribute.
2007-09-27 Paolo Carlini <pcarlini@suse.de>
PR c++/33493
* error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
* cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
spaces in the formatting.
* cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
2007-09-27 Jakub Jelinek <jakub@redhat.com>
* error.c (cxx_print_error_function): Add third argument, pass
it over to lhd_print_error_function.
(cp_print_error_function): If diagnostic->abstract_origin, print
virtual backtrace.
* cp-tree.h (struct diagnostic_info): New forward decl.
(cxx_print_error_function): Add third argument.
2007-09-25 Simon Martin <simartin@users.sourceforge.net>
PR c++/33207
* name-lookup.c (pushtag): Do not create an implicit typedef before
the associated type declaration is known to be valid.
2007-09-25 Jakub Jelinek <jakub@redhat.com>
* tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
rather than pointers.
2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
PR c++/14688
* search.c (check_final_overrider): Fail if
targetm.comp_type_attributes returns 0.
2007-09-24 Jason Merrill <jason@redhat.com>
PR c++/33239
* pt.c (resolve_typename_type): Don't look things up in the original
template if it would mean losing template arguments.
2007-09-24 Jakub Jelinek <jakub@redhat.com>
PR c++/33506
* cp-tree.h (cxx_type_hash_eq): New prototype.
* cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
* tree.c (cxx_type_hash_eq): New function.
2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
PR c++/33185
* tree.c (cp_build_qualified_type_real): Build a canonical
ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
PR c++/33112
PR c++/33185
* tree.c (cplus_array_compare): Compare pointers, not types.
(build_cplus_array_type_1): Store new array type into the hash
table before building the canonical type; build the canonical type
correctly.
(cp_build_qualified_type_real): Put all of the array types with
cv-qualified element types into the C++ array hash table, built as
variants of the unqualified versions.
2007-09-23 Jason Merrill <jason@redhat.com>
PR c++/16370
* decl.c (grokdeclarator): Look through implicit TYPE_DECLs
for deprecation warnings.
2007-09-22 Jason Merrill <jason@redhat.com>
PR c++/15269
* call.c (build_over_call): Warn about deprecated virtuals.
PR c++/19407
* cp-tree.h (ATTR_IS_DEPENDENT): New macro.
(MAYBE_TAGGED_TYPE_P): Remove.
* pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
instead of calling is_late_template_attribute again.
(tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
(tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
Don't crash on typedefs from non-template classes.
* decl2.c (grokfield): Don't sorry about attrs on template parms.
(is_late_template_attribute): All attributes applied to template
parms or typename types are dependent. Static.
(splice_template_attributes): Pass decl through.
(save_template_attributes): Likewise.
2007-09-20 Jakub Jelinek <jakub@redhat.com>
PR c++/33496
* pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
returned from tsubst_pack_expansion.
(tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
(tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
2007-09-20 Paolo Carlini <pcarlini@suse.de>
PR c++/33460
* semantics.c (finish_id_expression): Use consistently
context_for_name_lookup.
* decl.c (fixup_anonymous_aggr): Fix error message for
anonymous struct (vs union).
2007-09-19 Jason Merrill <jason@redhat.com>
PR c++/7586
* pt.c (tsubst): Handle typedefs by looking for the specialization.
(retrieve_specialization): Only tagged types use
DECL_TEMPLATE_INSTANTIATIONS.
(instantiate_class_template): Push nested classes too.
(tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
tagged types.
* cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
* init.c (is_aggr_type): Remove redundant tests.
* class.c (push_nested_class): Use CLASS_TYPE_P.
2007-09-20 Paolo Carlini <pcarlini@suse.de>
PR c++/33459
* init.c (build_zero_init): If, recursively, build_zero_init
returns a NULL_TREE, do not append it to the VEC of constructors.
2007-09-18 Jason Merrill <jason@redhat.com>
PR c++/17743
* pt.c (apply_late_template_attributes): Set processing_template_decl.
(tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
ATTR_FLAG_TYPE_IN_PLACE.
(tsubst): Do unqualified lookup to find typedefs from current class.
[ARRAY_TYPE]: Propagate alignment info.
* decl2.c (is_late_template_attribute): Only defer handling of
attribute aligned if the expression is dependent.
(save_template_attributes): If we're deferring any attributes,
make this a naming typedef.
2007-09-18 Paolo Carlini <pcarlini@suse.de>
PR c++/33462 (again)
* cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
va_arg instead of __builtin_va_arg.
2007-09-18 Paolo Carlini <pcarlini@suse.de>
PR c++/33462
* cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
(pp_cxx_primary_expression): Use it.
* cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
* error.c (dump_expr): Use it.
2007-09-18 Paolo Carlini <pcarlini@suse.de>
PR c++/33463
* cxx-pretty-print.c (pp_cxx_postfix_expression): Split
out case TYPEID_EXPR to...
(pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
and pp_cxx_right_paren.
* cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
* error.c (dump_expr): Use it.
2007-09-18 Paolo Carlini <pcarlini@suse.de>
PR c++/33464
* cxx-pretty-print.c (pp_cxx_trait_expression): Add.
(pp_cxx_primary_expression): Use it.
* cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
* error.c (dump_expr): Use it.
2007-09-16 Paolo Carlini <pcarlini@suse.de>
PR c++/33124
* init.c (build_new): Remove warning for zero-element
allocations.
2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
PR c++/32756
* call.c (maybe_handle_implicit_object): Set this_p, clear
rvaluedness_matches_p.
(compare_ics): Do not compare rvaluedness matching when one of the
operands is an implicit object.
2007-09-14 Jason Merrill <jason@redhat.com>
PR c++/17743, c++/19163
* decl2.c (is_late_template_attribute): New fn.
(splice_template_attributes, save_template_attributes): New fns.
(cplus_decl_attributes): Call save_template_attributes.
* pt.c (apply_late_template_attributes): New fn.
(instantiate_class_template, tsubst_decl): Use it.
* cp-tree.h: Declare is_late_template_attribute.
2007-09-13 Tom Tromey <tromey@redhat.com>
* parser.c (cp_lexer_new_main): Don't use
c_lex_return_raw_strings.
(cp_lexer_get_preprocessor_token): Update. Add special case when
lexer is NULL.
2007-09-11 Jan Hubicka <jh@suse.cz>
* method.c (use_thunk): Use tree_rest_of_compilation
* cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
(LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
* cp-tree.h (expand_body): Kill.
(emit_associated_thunks): Declare.
* semantics.c (emit_associated_thunks): Export.
(expand_body): Kill.
2007-09-09 David Daney <ddaney@avtrex.com>
PR c++/33324
* init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
to calculate cookie_ptr.
2007-09-08 Jason Merrill <jason@redhat.com>
PR c++/33342
* pt.c (most_specialized_class): Set processing_template_decl
while tsubsting partial spec args.
2007-09-06 Jason Merrill <jason@redhat.com>
* decl2.c (get_guard): Copy visibility from the guarded variable.
2007-09-06 Jan Hubicka <jh@suse.cz>
* semantics.c (expand_body): Do not mark arguments of clones used.
2007-09-06 Paolo Carlini <pcarlini@suse.de>
PR c++/32674
* decl.c (cp_finish_decl): When processing_template_decl,
deal correctly with init as TREE_LIST.
2007-09-06 Tom Tromey <tromey@redhat.com>
* decl.c (finish_function): Put return's location on line zero of
file.
2007-09-05 Jason Merrill <jason@redhat.com>
PR c++/15745
* except.c (prepare_eh_type): Use type_decays_to.
PR c++/15097
* init.c (build_delete): Use build_headof to get the address of the
complete object if we aren't using the deleting destructor.
* rtti.c (build_headof): No longer static.
* cp-tree.h: Declare it.
2007-09-06 Jakub Jelinek <jakub@redhat.com>
* decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
decl if a prototype for XX is provided with throw().
PR c++/33289
* decl.c (builtin_function_1): Set DECL_ANTICIPATED also
on __*_chk non-__builtin_* decls.
2007-09-05 Paolo Carlini <pcarlini@suse.de>
PR c++/30302
* semantics.c (finish_id_expression): Use context_for_name_lookup
insted of DECL_CONTEXT, to see through anonymous structs and unions.
* class.c (finish_struct_anon): Deal correctly with anonymous
structs (vs unions, as GNU extension) in error messages.
2007-09-05 Jan Hubicka <jh@suse.cz>
* sematics.c (expand_body): Remove unnecesary import_export_decl
call, DECL_EXTERNAL checks and current_function_decl saving.
2007-09-05 Paolo Carlini <pcarlini@suse.de>
PR c++/29731 (again)
* parser.c (cp_parser_primary_expression): Return error_mark_node
when a statement-expression is found in a template-argument list.
2007-09-04 Jason Merrill <jason@redhat.com>
* except.c (initialize_handler_parm): Use
fold_build_cleanup_point_expr.
PR c++/31419
* call.c (reference_binding): Don't look for user-defined conversions
to the same type.
PR c++/31411
* except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
the MUST_NOT_THROW_EXPR.
2007-09-04 Richard Sandiford <richard@codesourcery.com>
* decl.c (cp_finish_decl): Call determine_visibility before
make_rtl_for_nonlocal_decl.
2007-09-04 Jason Merrill <jason@redhat.com>
PR c++/14032
* pt.c (most_specialized_class): Substitute outer template
arguments into the arguments of a member template partial
specialization.
(strip_innermost_template_args): New fn.
2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
* Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
* decl.c (cp_make_fname_decl): Likewise,
* parser.c (cp_parser_string_literal): Likewise,
* tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
* typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
Likewise,
2007-09-02 Paolo Carlini <pcarlini@suse.de>
PR c++/33208
* typeck.c (build_unary_op): Fix error message for
Boolean expression as operand to operator--.
2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* tree.c (pod_type_p, zero_init_p): Use strip_array_types.
* typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
Likewise.
2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
PR c++/32597
* init.c (build_default_init): Make extern.
* cp-tree.h (build_default_init): Declare here.
* pt.c (tsubst_expr): When the instantiation of the initializer of
a variable results in an empty list, default-initialize the
variable.
(tsubst_copy_and_build): When the instantiation of the initializer
in a new expression results in an empty initializer list,
default-initialize it.
2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
* mangle.c (write_type): Change mangling of rvalue reference from
`RR' to `O'.
2007-08-31 Jakub Jelinek <jakub@redhat.com>
* decl.c (duplicate_decls): Remove duplicated line.
2007-08-31 Paolo Carlini <pcarlini@suse.de>
PR c++/33210
* cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
BOUND_TEMPLATE_TEMPLATE_PARM.
2007-08-31 Paolo Carlini <pcarlini@suse.de>
PR c++/32113
* search.c (lookup_member): Check the name argument for
error_mark_node.
2007-08-31 Paolo Carlini <pcarlini@suse.de>
PR c++/33212
* parser.c (cp_parser_trait_expr): Check rerurn value of
cp_parser_type_id.
2007-08-30 Ollie Wild <aaw@google.com>
* cvt.c (cp_convert_to_pointer): Remove force parameter. Call
convert_ptrmem for pointer to member conversions.
(convert_to_pointer_force): Update cp_convert_to_pointer call.
(ocp_convert): Update cp_convert_to_pointer call.
* typeck.c (convert_ptrmem): Add conditional for null pointers to
members.
(build_static_cast_1): Check can_convert for conversions in either
direction.
(get_delta_difference_1): New function.
(get_delta_difference): Refactor to call get_delta_difference_1.
2007-08-30 Jakub Jelinek <jakub@redhat.com>
* decl.c (start_preparsed_function): Set
DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
2007-08-28 Paolo Carlini <pcarlini@suse.de>
PR c++/33209
* error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
BOUND_TEMPLATE_TEMPLATE_PARM.
2007-08-28 Jakub Jelinek <jakub@redhat.com>
PR c++/32596
PR c++/32400
* pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
2007-08-27 Jason Merrill <jason@redhat.com>
PR c++/29000
* pt.c (build_non_dependent_expr, type_dependent_expression_p):
Look inside STMT_EXPR.
* semantics.c (stmt_expr_value_expr): New fn.
* cp-tree.h: Declare it.
PR c++/28558
* decl.c (groktypename): Ignore attributes applied to class type.
2007-08-28 Richard Guenther <rguenther@suse.de>
* decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
* error.c (dump_expr): Handle COMPLEX_CST.
* cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
(pp_cxx_expression): Likewise.
2007-08-27 Alexandre Oliva <aoliva@redhat.com>
* decl.c (GNU_INLINE_P): New.
(duplicate_decls): Handle gnu_inline. Merge attributes and
some flags in overriding definitions.
(redeclaration_error_message): Handle gnu_inline.
(start_preparsed_function): Likewise.
2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* call.c (sufficient_parms_p): Constify.
* class.c (same_signature_p): Likewise.
* cp-gimplify.c (is_invisiref_parm,
cxx_omp_privatize_by_reference): Likewise.
* cp-objcp-common.c (has_c_linkage): Likewise.
* cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
num_artificial_parms_for, comp_template_parms,
template_parameter_pack_p, any_dependent_template_arguments_p,
any_type_dependent_arguments_p, any_value_dependent_elements_p,
repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
zero_init_p, member_p, cp_lvalue_kind,
builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
varargs_function_p, is_dummy_object, special_function_kind,
string_conv_p, type_unknown_p, comp_except_specs, compparms,
comp_cv_qualification, is_bitfield_expr_with_lowered_type,
unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
cp_has_mutable_p, at_least_as_qualified_p,
invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
* decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
* except.c (nothrow_libfn_p): Likewise.
* method.c (skip_artificial_parms_for, num_artificial_parms_for):
Likewise.
* pt.c (comp_template_parms, template_parameter_pack_p,
any_type_dependent_arguments_p, any_value_dependent_elements_p,
any_dependent_template_arguments_p): Likewise.
* repo.c (repo_export_class_p): Likewise.
* semantics.c (anon_aggr_type_p): Likewise.
* tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
varargs_function_p, member_p, is_dummy_object, pod_type_p,
zero_init_p, special_function_p): Likewise.
* typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
compparms, invalid_nonstatic_memfn_p,
is_bitfield_expr_with_lowered_type, unlowered_expr_type,
string_conv_p, ptr_reasonably_similar, cp_type_readonly,
cp_has_mutable_p, lvalue_or_else): Likewise.
2007-08-25 Paolo Bonzini <bonzini@gnu.org>
* decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
* cp-objcp-common.c (cp_tree_size): Ditto.
* tree.c (cp_walk_subtrees): Ditto
* cp-tree.def (TINST_LEVEL): Go away.
* cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
move together with other non-tree structs.
(enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
(union lang_tree_node): Eliminate tinst_level field.
(TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
(current_instantiation, outermost_tinst_level): Return
a "struct tinst_level *".
* error.c (print_instantiation_partial_context): Change second
parameter to a "struct tinst_level *". Replace accessor macros
with field access.
(print_instantiation_full_context): Likewise.
* lex.c (in_main_input_context): Likewise.
* pt.c (struct pending_templates): New.
(pending_templates, last_pending_template): Use it as a type.
(current_tinst_level): Change typo to "struct tinst_level *"
(reopen_tinst_level): Accept "struct tinst_level *", return decl.
(add_pending_template): Construct a "struct pending_template".
Replace TINST_LEVEL accessor macros with field access.
(push_tinst_level): Likewise, using GGC_NEW instead of make_node.
(pop_tinst_level): Likewise.
(instantiate_pending_templates): Likewise. Factor common code used
when an instantiation has been done.
(outermost_tinst_level): Replace tree_last with loop.
(current_instantiation): Return a "struct tinst_level *".
2007-08-24 Ollie Wild <aaw@google.com>
* name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
* name-lookup.h (cp_binding_level): Remove vtables member.
2007-08-24 Richard Guenther <rguenther@suse.de>
* tree.c (cp_cannot_inline_tree_fn): Remove.
* cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
* cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
Remove define.
2007-08-24 Jakub Jelinek <jakub@redhat.com>
PR c++/32567
* typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
error_mark_node right away if build_expr_type_conversion
returned it.
PR c++/32898
* name-lookup.c (set_decl_namespace): lookup_qualified_name failure
is error_mark_node rather than NULL_TREE.
* pt.c (check_explicit_specialization): Likewise.
PR c++/31941
* error.c (resolve_virtual_fun_from_obj_type_ref): Handle
TARGET_VTABLE_USES_DESCRIPTORS targets properly.
2007-08-22 Jason Merrill <jason@redhat.com>
PR c++/29365
* pt.c (outermost_tinst_level): New function.
* lex.c (in_main_input_context): New function.
* cp-tree.h: Declare it.
* decl2.c (constrain_class_visibility): Use it to avoid warning
about uses of the anonymous namespace in the main input file.
2007-08-21 Jakub Jelinek <jakub@redhat.com>
* init.c (build_new_1): Use get_target_expr instead of save_expr.
2007-08-20 Pawel Sikora <pluto@pld-linux.org>
PR c++/7302
* class.c (finish_struct_1): Warn when a class has virtual
functions and accessible non-virtual destructor.
2007-08-20 Richard Guenther <rguenther@suse.de>
PR c++/22369
PR c++/22451
* call.c (build_new_method_call): Convert initializer to
the basetype.
* init.c (build_aggr_init): Do not fiddle with types.
(build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
* except.c (build_throw): Do not drop qualifiers for the
pointer type.
* typeck.c (get_member_function_from_ptrfunc): Do not
fiddle with types, instead convert.
(build_ptrmemfunc1): Convert to the target type for
initialization.
(gfc_trans_allocate): Convert result to target type.
* cp-objcp-common.c (cxx_get_alias_set): Pointers to
pointer-to-member structures shall have alias set zero as well.
2007-08-20 Richard Guenther <rguenther@suse.de>
* cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
Remove.
* cp-tree.h (cp_auto_var_in_fn_p): Remove.
(nonstatic_local_decl_p): Likewise.
* tree.c (cp_auto_var_in_fn_p): Remove.
* decl.c (nonstatic_local_decl_p): Remove.
2007-08-20 Richard Guenther <rguenther@suse.de>
* cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
Remove define.
* tree.h (cp_walk_tree): New define to walk_tree_1 with
cp_walk_subtrees lh parameter.
(cp_walk_tree_without_duplicates): New define to
walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
* tree.c (count_trees): Call
cp_walk_tree_without_duplicates.
(verify_stmt_tree): Call cp_walk_tree.
(break_out_target_exprs): Likewise.
(WALK_SUBTREE): Likewise.
* cp-gimplify.c (cp_genericize): Likewise.
* cp-pt.c (find_parameter_packs_r): Likewise.
(uses_parameter_packs): Likewise.
(make_pack_expansion): Likewise.
(check_for_bare_parameter_packs): Likewise.
(for_each_template_parm): Likewise.
* decl.c (check_default_argument): Call
cp_walk_tree_without_duplicates.
* except.c (build_throw): Likewise.
* decl2.c (type_visibility): Likewise.
* semantics.c (expand_or_defer_fn): Likewise.
(finalize_nrv): Call cp_walk_tree.
2007-08-20 Jakub Jelinek <jakub@redhat.com>
PR c++/33025
* init.c (build_new_1): Rename placement_var variable to placement_expr.
Initialize it with save_expr rather than get_temp_regvar.
2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR c++/28989
* tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
lvalues.
2007-08-17 Ollie Wild <aaw@google.com>
PR c++/31749
* name-lookup.c (do_nonmember_using_decl): Shift implicit type
declarations into appropriate slots for comparison. Fix type
comparison.
2007-08-17 Paolo Carlini <pcarlini@suse.de>
PR c++/32112
* error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
* cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
2007-08-17 Paolo Carlini <pcarlini@suse.de>
PR c++/32870
* parser.c (cp_parser_class_head): Improve error message.
2007-08-16 Seongbae Park <seongbae.park@gmail.com>
* pt.c (instantiate_decl): Set input_location
for the function end.
2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
Constify.
* cp-tree.h (local_variable_p, nonstatic_local_decl_p,
class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
cxx_warn_unused_global_decl, cp_expr_size): Likewise.
* decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
* tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
* typeck.c (cp_type_quals): Likewise.
* typeck2.c (cxx_incomplete_type_diagnostic,
cxx_incomplete_type_error): Likewise.
2007-08-16 Paolo Carlini <pcarlini@suse.de>
PR c++/31132
* pt.c (tsubst_friend_function): When check_classfn
returns error_mark_node likewise return it.
2007-08-15 Jakub Jelinek <jakub@redhat.com>
PR c++/32992
* typeck.c (check_return_expr): Don't NRV optimize vars in
anonymous unions.
* decl.c (finish_function): Comment fix.
2007-08-15 Paolo Carlini <pcarlini@suse.de>
PR c++/33035
* pt.c (push_template_decl_real): Depending on TYPE_P
use either TYPE_CONTEXT or DECL_CONTEXT.
2007-08-14 Mark Mitchell <mark@codesourcery.com>
* semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
constructors and destructors return this.
2007-08-14 Paolo Carlini <pcarlini@suse.de>
PR c++/27211
* decl2.c (check_classfn): Return error_mark_node in case of error;
in that case, do not call add_method.
* decl.c (start_decl): Deal with check_classfn returning
error_mark_node.
(grokfndecl): Likewise.
* pt.c (tsubst_friend_function): Likewise.
2007-08-14 Andrew Pinski <pinskia@gmail.com>
PR c++/30428
* typeck.c (build_binary_op): Disallow vector float types with
BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
2007-08-11 Ian Lance Taylor <iant@google.com>
* cp-objcp-common.c (cxx_get_alias_set): Change return type to
alias_set_type.
* cp-tree.h (cxx_get_alias_set): Update declaration.
2007-08-10 Ollie Wild <aaw@google.com>
* name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
type lookups.
(ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
function parameter.
(unqualified_namespace_lookup): Fix ambiguous_decl call.
(lookup_using_namespace): Fix ambiguous_decl call.
(qualified_lookup_using_namespace): Fix ambiguous_decl call.
2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* call.c (name_as_c_string): Use CONST_CAST.
* decl.c (build_decl): Likewise.
* parser.c (cp_parser_string_literal): Likewise.
2007-08-10 Paolo Carlini <pcarlini@suse.de>
PR c++/17763
* error.c (dump_expr): Consistently use the *_cxx_*
variants of the pretty-print functions.
2007-08-10 Paolo Carlini <pcarlini@suse.de>
PR c++/22256
* decl.c (check_special_function_return_type): Just error
on return type specified for conversion operator.
2007-08-09 Daniel Berlin <dberlin@dberlin.org>
* typeck2.c (readonly_error): Handle general expressions.
* error.c (dump_expr): Handle POINTER_PLUS_EXPR
2007-08-06 Dan Hipschman <dsh@google.com>
* method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
access function name.
2007-08-04 Alfred Minarik <a.minarik@aon.at>
PR pch/13676
* lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
* g++spec.c (lang_specific_driver): Check them.
2007-08-06 Paolo Carlini <pcarlini@suse.de>
PR c++/19532
* pt.c (inline_needs_template_parms): Fix comment; change return type
to bool.
2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
Revert:
2007-03-26 Dirk Mueller <dmueller@suse.de>
* parser.c (cp_parser_member_declaration): Pedwarn
about stray semicolons after member declarations.
2007-08-02 Lee Millward <lee.millward@gmail.com>
PR c++/30849
PR c++/30850
PR c++/30851
* parser.c (cp_parser_asm_definition): Detect and discard asm
statements with invalid inputs or outputs.
(cp_parser_asm_operand_list): Return error mark node if any
of the operands are invalid. Adjust documentation.
2007-08-02 Nick Clifton <nickc@redhat.com>
* typeck.c: Change copyright header to refer to version 3 of the
GNU General Public License and to point readers at the COPYING3
file and the FSF's license web page.
* optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
name-lookup.h, parser.c: Likewise.
2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
PR middle-end/32668
* call.c (magic_varargs_p): Honor the "type generic" attribute.
2007-07-30 Paolo Carlini <pcarlini@suse.de>
PR c++/32108
* semantics.c (finish_label_stmt): Reject the __label__
extension outside function scopes.
2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* parser.c (eof_token): Un-constify.
(cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
casts.
2007-07-28 Kazu Hirata <kazu@codesourcery.com>
* pt.c, tree.c, typeck2.c: Fix comment typos.
2007-07-28 Simon Martin <simartin@users.sourceforge.net>
Mark Mitchell <mark@codesourcery.com>
PR c++/30917
* name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
hidden due to friend declarations in local classes.
2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
* typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
* cp-tree.def (DECLTYPE_TYPE): New.
* error.c (dump_type): Dump DECLTYPE_TYPE nodes.
(dump_type_prefix): Ditto.
(dump_type_suffix): Ditto.
* tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
* mangle.c (write_type): Handle DECLTYPE_TYPE.
* cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
types.
(DECLTYPE_TYPE_EXPR): New.
(DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
(finish_declared_type): Declare.
* cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
DECLTYPE_TYPE nodes.
(pp_cxx_type_id): Ditto.
* pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
(tsubst): Substitute into a DECLTYPE_TYPE node.
(tsubst_copy): Ditto.
(unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
nodes.
(dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
* semantics.c (finish_typeof): TYPEOF_TYPE types need to use
structural equality (because we can't hash the expressions).
(finish_declared_type): New.
* lex.c (reswords): Add "decltype" keyword.
* parser.c cp_lexer_next_token_is_decl_specifier_keyword
(cp_parser_postfix_expression): Add member_access_only_p to
restrict postfix expression to member access expressions.
(cp_parser_unary_expression): Update call to
cp_parser_postfix_expression to reflect new parameter.
(cp_parser_declared_type): New.
(cp_parser_simple_type_specifier): Parse decltype types.
2007-07-27 Mark Mitchell <mark@codesourcery.com>
PR c++/32346
* call.c (convert_for_arg_passing): Only widen bitfields to their
declared types if necessary.
2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
Constify.
2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* decl.c (typename_hash, typename_compare): Constify.
* mangle.c (hash_type, compare_type): Likewise.
* pt.c (eq_local_specializations, hash_local_specialization):
Likewise.
* tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
list_hash): Likewise.
* typeck2.c (pat_compare): Likewise.
2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
* method.c (implicitly_declare_fn): Increase alignment if member
function pointer format requires it.
2007-07-24 Paolo Carlini <pcarlini@suse.de>
PR c++/29001
* typeck.c (check_return_expr): Do not pass a null argument
to null_ptr_cst_p.
2007-07-24 Paolo Carlini <pcarlini@suse.de>
PR c++/32561
* decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
only on VAR_DECL.
2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
PR c++/32839
* typeck.c (convert_arguments): Only use default args if we have
a function decl.
PR c++/30818
* typeck.c (structural_comptypes): No need to check
resolve_typename_type return value here.
* cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
* pt.c (resolve_typename_type): Follow typename typedefs. Return
original type rather than error_mark_node in case of failure.
* parser.c (cp_parser_nested_name_specifier_opt): Adjust
resolve_typename_type result check.
(cp_parser_direct_declarator, cp_parser_head,
cp_parser_constructor_declarator_p): Likewise.
2007-07-12 Kazu Hirata <kazu@codesourcery.com>
* pt.c (template_parms_variadic_p): Remove.
* cp-tree.h: Remove the prototype for template_parms_variadic_p.
2007-07-12 Jakub Jelinek <jakub@redhat.com>
PR c++/30854
* error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
argument to dump_aggr_init_expr_args instead of false.
2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
* typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
canonical types; otherwise, fall back to structural type
comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
internal compiler error if the canonical types are wrong.
2007-07-11 Paolo Carlini <pcarlini@suse.de>
PR c++/32560
* parser.c (cp_parser_make_indirect_declarator): When the
the code argument is ERROR_MARK return cp_error_declarator.
2007-07-09 Geoffrey Keating <geoffk@apple.com>
PR 32617
* decl.c (cxx_init_decl_processing): Don't set
force_align_functions_log.
(grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
* typeck.c (cxx_alignof_expr): When alignof is used on a plain
FUNCTION_DECL, return its alignment.
2007-07-09 Richard Guenther <rguenther@suse.de>
* decl.c (start_preparsed_function): Do not promote return type.
2007-07-08 Paolo Carlini <pcarlini@suse.de>
PR c++/30535
* pt.c (unify): Never pass error_mark_node to template_decl_level.
2007-07-07 Mark Mitchell <mark@codesourcery.com>
PR c++/32232
* pt.c (resolve_overloaded_unification): Robustify. Return a
bool, not an int.
(type_unification_real): Adjust accordingly.
2007-07-06 Richard Guenther <rguenther@suse.de>
* init.c (build_new_1): Use the correct pointer type.
* typeck2.c (build_m_component_ref): Likewise.
2007-07-05 Mark Mitchell <mark@codesourcery.com>
PR c++/32245
* init.c (build_zero_init): Always build an initializer for
non-static storage.
* typeck2.c (build_functional_cast): Use build_zero_init.
PR c++/32251
* init.c (build_new_1): Always pass the allocation function to
build_op_delete_call.
* call.c (build_op_delete_call): Handle operator delete with a
variable-argument list. Do not issue an error when no matching
deallocation function is available for a new operator.
PR c++/31992
* cp-tree.h (any_value_dependent_elements_p): Declare it.
* decl.c (value_dependent_init_p): New function.
(cp_finish_decl): Use it.
* pt.c (value_dependent_expression_p): Use
any_value_dependent_elements_p.
* parser.c (cp_parser_primary_expression): Add comment about
treating dependent qualified names as integral
constant-expressions.
2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
* decl.c (build_ptrmemfunc_type): Always use structural equality
tests when comparing pointer-to-member-function types, because the
handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
types.
2007-07-03 Mark Mitchell <mark@codesourcery.com>
* init.c (build_new): Tweak comment.
2007-06-29 Dave Brolley <brolley@redhat.com>
PR c++/31743
* parser.c (cp_parser_new_type_id): Don't reduce a named array
type to its base type and number of elements here.
* init.c (build_new): Call complete_type_or_else to ensure that the
type is complete and to issue a diagnostic if it is not.
(build_new_1): Don't call complete_type_or_else here.
2007-07-03 Richard Guenther <rguenther@suse.de>
PR c++/32609
* class.c (fixed_type_or_null): Re-lookup the hashtable slot
after recursing.
2007-07-02 Simon Baldwin <simonb@google.com>
* parser.c (cp_parser_elaborated_type_specifier): Added a warning
for inner-style nested forward declarations that don't declare
anything useful.
2007-07-02 Jakub Jelinek <jakub@redhat.com>
PR c++/31748
* semantics.c (finish_omp_clauses): Use %qD instead of %qE for
DECL_P in not a variable and appears more than once error messages.
2007-07-01 Ollie Wild <aaw@google.com>
* name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
(select_decl): Remove function.
(unqualified_namespace_lookup): Populate binding by calling
ambiguous_decl. Remove select_decl call.
(lookup_qualified_name): Remove select_decl call.
* decl.c (lookup_and_check_tag): Check for ambiguous references.
* parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
generation when name lookup is ambiguous.
2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
PR c++/31724
* init.c (build_new_1): Use structural equality on the copy of the
array type.
2007-06-28 Geoffrey Keating <geoffk@apple.com>
* decl2.c (determine_visibility): Implement
flag_visibility_ms_compat effect on type info.
* decl.c (cxx_init_decl_processing): Implement
global effect of flag_visibility_ms_compat.
2007-06-28 Geoffrey Keating <geoffk@apple.com>
* decl2.c (start_objects): Mark constructor-running function
as artificial.
2007-06-26 Simon Martin <simartin@users.sourceforge.net>
PR c++/32111
* decl.c (grokdeclarator): Reset friendp for member functions declared
friend of their own class.
2007-06-23 Mark Mitchell <mark@codesourcery.com>
* decl2.c (determine_visibility): Don't look for dllexport here.
(determine_visibility_from_class): Tidy.
2007-06-18 Simon Baldwin <simonb@google.com>
PR c++/31923
* parser.c (cp_parser_single_declaration): Added check for storage
class other than sc_none in parsed declaration, and a flag to indicate
if the call is part of an explicit template specialization parse.
* (cp_parser_explicit_specialization): Specialization check flag added
to call to cp_parser_single_declaration(), set true.
* (cp_parser_template_declaration_after_export): Specialization check
flag added to call to cp_parser_single_declaration(), set false.
* pt.c (check_explicit_specialization): Added code to copy visiblity
and linkage from the templated function to the explicit specialization.
2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
* typeck.c (build_binary_op): For templates build the
expression in pieces to avoid the assert in build2_stat.
(get_member_function_from_ptrfunc):
Change over to using POINTER_PLUS_EXPR and convert
the second operand to sizetype.
* typeck2.c (build_m_component_ref): Likewise.
* init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
instead of PLUS_EXPR for pointers.
(build_new_1): Likewise.
(build_vec_delete_1): Likewise.
(build_vec_delete): Likewise.
* class.c (build_base_path): Likewise.
(build_base_path): Likewise.
(convert_to_base_statically): Likewise.
(fixed_type_or_null): Handle POINTER_PLUS_EXPR.
(get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
instead of PLUS_EXPR.
(dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
instead of PLUS_EXPR for pointers.
* call.c (build_special_member_call): Likewise.
* rtti.c (build_headof): Likewise.
Use sizetype instead of ptrdiff_type_node.
(tinfo_base_init): Create a POINTER_PLUS_EXPR
instead of PLUS_EXPR for pointers.
* except.c (expand_start_catch_block): Do a
NEGATIVE and then a POINTER_PLUS_EXPR instead
of a MINUS_EXPR.
* cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
PLUS_EXPR on pointer types over to use
POINTER_PLUS_EXPR and remove the conversion
to the pointer types.
* method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
adding to a pointer type. Use size_int instead of
ssize_int. Convert the index to sizetype before
adding it to the pointer.
2007-06-15 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (DECL_VAR_MARKED_P): Remove.
(DECL_ANON_UNION_VAR_P): New macro.
* class.c (fixed_type_or_null): Tidy. Use a hash table, rather
than DECL_VAR_MARKED_P, to keep track of which variables we have
seen.
* decl.c (redeclaration_error_message): Complain about redeclaring
anonymous union members at namespace scope.
* decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
2007-06-14 Geoff Keating <geoffk@apple.com>
* decl2.c (determine_visibility): Ensure that functions with
hidden types as parameters are hidden.
PR 31093
* decl2.c (determine_visibility): Remove duplicate code for
handling type info.
2007-06-12 Ian Lance Taylor <iant@google.com>
PR libstdc++/29286
* init.c (avoid_placement_new_aliasing): New static function.
(build_new_1): Call it.
2007-06-11 Rafael Avila de Espindola <espindola@google.com>
* cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
(LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
2007-06-08 Jakub Jelinek <jakub@redhat.com>
PR c++/32177
* semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
on init, the non-decl cond operand and increment value.
2007-06-07 Simon Martin <simartin@users.sourceforge.net>
PR c++/30759
* decl.c (check_initializer): Report an error when a brace enclosed
initializer is used for a non-aggregate type in C++98.
(redeclaration_error_message): Rewrote flag_cpp0x in terms of
cxx_dialect.
(grokdeclarator): Likewise.
(move_fn_p): Likewise.
* typeck.c (check_return_expr): Likewise.
* call.c (reference_binding): Likewise.
* error.c (cp_cpp_error): Likewise.
* pt.c (check_default_tmpl_args): Likewise.
(tsubst): Likewise.
* lex.c (init_reswords): Likewise.
* parser.c (p_parser_primary_expression): Likewise.
(TOKEN_PRECEDENCE): Likewise.
(cp_parser_init_declarator): Likewise.
(cp_parser_ptr_operator): Likewise.
(cp_parser_parameter_declaration): Likewise.
(cp_parser_enclosed_template_argument_list): Likewise.
(cp_parser_skip_to_end_of_template_parameter_list): Likewise.
(cp_parser_next_token_ends_template_argument_p): Likewise.
2007-06-04 Simon Baldwin <simonb@google.com>
* decl.c (grokdeclarator): Readability change. Moved case labels
into direct switch statement scope.
2007-06-04 Paolo Carlini <pcarlini@suse.de>
* call.c (convert_like_real): Remove pointless code.
2007-05-31 Mark Mitchell <mark@codesourcery.com>
* decl.c (get_atexit_fn_ptr_type): New function.
(get_atexit_node): Use it.
(start_cleanup_fn): Likewise.
(register_dtor_fn): Use the object's destructor, instead of a
separate cleanup function, where possible.
* cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
(atexit_fn_ptr_type_node): New macro.
* decl2.c (build_cleanup): Use build_address.
2007-05-31 Daniel Berlin <dberlin@dberlin.org>
* typeck.c (build_binary_op): Include types in error.
2007-05-31 Jakub Jelinek <jakub@redhat.com>
PR c++/31806
* decl.c (cp_finish_decl): Also clear was_readonly if a static var
needs runtime initialization.
2007-05-31 Paolo Carlini <pcarlini@suse.de>
PR c++/32158
* semantics.c (finish_trait_expr): Complete the types.
2007-05-30 Russell Yanofsky <russ@yanofsky.org>
Douglas Gregor <doug.gregor@gmail.com>
Pedro Lamarao <pedro.lamarao@mndfck.org>
Howard Hinnant <howard.hinnant@gmail.com>
PR c++/7412
PR c++/29939
* typeck.c (comptypes): Don't consider rvalue and lvalue
reference types to be equivalent.
(check_return_expr): Move from certain lvalues when returning
them.
* decl.c (grokdeclarator): Implement reference collapsing.
(copy_fn_p): Don't consider constructors taking rvalue references
to be copy constructors.
(move_fn_p): New.
* call.c (conversion): New "rvaluedness_matches_p" member.
(convert_class_to_reference): Require reference type as first
parameter instead of base type.
(reference_binding): Add logic to handle rvalue references.
(implicit_conversion): Update inaccurate comment.
(convert_like_real): Disable creation of temporaries that are
impossible to initialize for types with move constructors.
(build_over_call): Elide move constructors when possible.
(maybe_handle_implicit_object): Set "rvaluedness_matches_p".
(maybe_handle_ref_bind): Return conversion instead of type node.
(compare_ics): Add logic to use "rvaluedness_matches_p" values to
determine preferred conversion sequences.
* cp-tree.h (TYPE_REF_IS_RVALUE): New.
(LOOKUP_PREFER_RVALUE): New.
(DECL_MOVE_CONSTRUCTOR_P): New.
(struct cp_declarator): Add "reference" member for reference
types, with new "rvalue_ref" flag.
(cp_build_reference_type): Declare.
(move_fn_p): Declare.
* error.c (dump_type_prefix): Format rvalue reference types
correctly in error messages.
* except.c (build_throw): Move from certain lvalues when
throwing.
* mangle.c (write_type): Mangle rvalue references differently
than regular references.
* parser.c (make_reference_declarator): Add boolean parameter for
rvalue references.
(cp_parser_make_indirect_declarator): New.
(cp_parser_new_declarator_opt): Call
cp_parser_make_indirect_declarator.
(cp_parser_conversion_declarator_opt): Ditto.
(cp_parser_declarator): Ditto.
(cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
declarators.
* pt.c (tsubst): Implement reference collapsing.
(maybe_adjust_types_for_deduction): Implement special template
parameter deduction rule for rvalue references.
(type_unification_real): Update calls to
maybe_adjust_types_for_deduction.
(try_one_overload): Ditto.
(unify_pack_expansion): Ditto.
* tree.c (lvalue_p_1): Handle rvalue reference types.
(cp_build_reference_type): New.
2007-05-30 Jakub Jelinek <jakub@redhat.com>
PR c++/31809
* decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
variables that need runtime initialization.
2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
PR c++/31339
* typeck.c (build_unary_op <case PREINCREMENT_EXPR,
case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
case POSTDECREMENT_EXPR>): Return the error_mark_node
if either the real or imaginary parts would an
error_mark_node.
2007-05-25 Simon Martin <simartin@users.sourceforge.net>
Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c++/31745
* parser.c (cp_parser_skip_to_closing_brace): Return true if the next
token is a closing brace, false if there are no tokens left.
(cp_parser_namespace_alias_definition): Only consume the next token if
it is a closing brace.
* parser.c (cp_parser_class_specifier): Likewise.
2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
* semantics.c (finish_member_declaration): Fix a typo in the
last checkin.
2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
PR c++/31431
PR c++/31432
PR c++/31434
PR c++/31435
PR c++/31437
PR c++/31438
PR c++/31442
PR c++/31443
PR c++/31444
PR c++/31445
* error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
* cp-tree.h (check_for_bare_parameter_packs): Returns bool.
* pt.c (check_for_bare_parameter_packs): Return bool indicated
whether everything was okay. Fix indentation.
(push_template_decl_real): Check for bare parameter packs in
function parameters; where errors occur, mark the parameter types
with ERROR_MARK_NODEs to avert ICEs.
(coerce_template_parameter_pack): New.
(coerce_template_parms): Moved parameter pack coercion into
coerce_template_parameter_pack, and permit it anywhere in the
template parameter list (not just at the end). Parameter and
argument indices can vary (somewhat) separately now, so add
PARM_IDX and ARG_IDX.
(fn_type_unification): Don't set an argument pack as incomplete if
no argument pack was deduced.
(type_unification_real): If a type parameter is a parameter pack
and has not otherwise been deduced, it will be deduced to an empty
parameter pack.
(more_specialized_fn): Use the actual lengths of the argument
lists when comparing against expansions.
* semantics.c (finish_member_declaration): If a field's type has
bare parameter packs, error and set its type to ERROR_MARK_NODE.
2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
PR target/27067
* mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
2007-05-22 Ollie Wild <aaw@google.com>
* name-lookup.c (ambiguous_decl): Adds check for hidden types.
(unqualified_namespace_lookup): Adds check for hidden types.
2007-05-22 Ollie Wild <aaw@google.com>
* decl.c (duplicate_decls): Verify namespace names are unique.
2007-05-21 Mark Mitchell <mark@codesourcery.com>
* decl.c (cxx_maybe_build_cleanup): Handle
__attribute__((cleanup)).
2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
* cvt.c (cp_convert_and_check): Don't check warnings if the
conversion failed.
2007-05-18 Geoffrey Keating <geoffk@apple.com>
* mangle.c (write_real_cst): Use 'unsigned long' for %lx.
2007-05-14 Paolo Carlini <pcarlini@suse.de>
PR c++/29928
* rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
type only if is a class type (5.2.8/4).
2007-05-14 Rafael Avila de Espindola <espindola@google.com>
* cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
* decl.c (grokdeclarator): Use unsigned_type_for instead of
c_common_unsigned_type.
2007-05-11 Silvius Rus <rus@google.com>
* typeck.c (build_indirect_ref): Add call to
strict_aliasing_warning.
(build_reinterpret_cast_1): Condition call to
strict_aliasing_warning.
2007-05-11 Jan Hubicka <jh@suse.cz>
* semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
* decl2.c (start_objects): ctors and dtors are no longer public.
(cp_write_global_declarations): Do not call c_build_cdtor_fns.
2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
* typeck.c (build_unary_op): Remove code that used to
handle non lvalue increments/decrements.
2007-05-07 Mike Stump <mrs@apple.com>
* parser.c (check_empty_body): Add.
(cp_parser_iteration_statement): Add call to check_empty_body.
2007-05-05 Geoffrey Keating <geoffk@apple.com>
PR 31775
* mangle.c (write_mangled_name): Mangle static variable names.
(write_unqualified_name): Use local-source-name for
namespace-scope static variables.
2007-05-04 Dirk Mueller <dmueller@suse.de>
* cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
not in effect.
2007-05-02 Seongbae Park <seongbae.park@gmail.com>
PR c++/31663
* decl2.c (constrain_class_visibility):
Use strip_pointer_or_array_types instead of strip_array_types.
2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR C++/30221
* decl.c (reshape_init_r): Don't reshape the first element if it
is a pointer to member function.
2007-04-27 Simon Baldwin <simonb@google.com>
* decl.c (grokparms): Changed message format from %qD to %qE.
2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
* error.c (maybe_warn_variadic_templates): Variadic templates are
now in C++0x, so only warn about them in C++98 mode.
2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR C++/30016
* typeck.c (build_reinterpret_cast_1): Only allow conversion to
integeral types from vectors types.
2007-04-26 Jakub Jelinek <jakub@redhat.com>
PR c++/31598
* semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
for type dependent OMP_CLAUSE_DECLs.
2007-04-24 Mark Mitchell <mark@codesourcery.com>
PR c++/31338
* cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
* typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
COMPLEX_TYPE is now an ARITHMETIC_TYPE.
* init.c (build_zero_init): Adjust, as
COMPLEX_TYPE is now a SCALAR_TYPE.
* typeck2.c (digest_init): Allow brace-enclosed initializers for
COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
2007-04-25 Paolo Carlini <pcarlini@suse.de>
* semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
(trait_expr_value): Adjust.
2007-04-23 Simon Baldwin <simonb@google.com>
* decl.c (grokparms): Added new error for duplicate function
parameters names in function prototypes, to match gcc behavior.
2007-04-23 Jan Hubicka <jh@suse.cz>
* decl2.c (finish_objects): Do not call target constructor/destructor
bits dirrectly.
2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
* cp-tree.h (lang_tree_node): Use GENERIC_NEXT
instead of checking GIMPLE_STMT_P in chain_next.
2007-04-17 Mark Mitchell <mark@codesourcery.com>
PR c++/31513
* call.c (convert_for_arg_passing): Convert bitfields to their
declared types.
2007-04-17 Simon Martin <simartin@users.sourceforge.net>
PR c++/31517
* pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
2007-04-16 Seongbae Park <seongbae.park@gmail.com>
PR c++/29365
* decl2.c (constrain_class_visibility):
Do not warn about the use of anonymous namespace in the main input file.
2007-04-15 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (current_template_parms): Fix typo in comment.
2007-04-15 Kazu Hirata <kazu@codesourcery.com>
* cp-tree.h, error.c: Fix comment typos.
2007-04-13 Jason Merrill <jason@redhat.com>
PR c++/31074
* call.c (reference_binding): Add c_cast_p parm. If true,
add quals to TO as needed to make it reference-compatible.
2007-04-11 Jan Hubicka <jh@suse.cz>
* class.c (convert_to_base_statically): Fold produced tree; verify
that we are not processing template_decl.
2007-04-09 Mark Mitchell <mark@codesourcery.com>
PR c++/31449
* class.c (build_base_path): Ensure that the converted pointer has
the same cv-qualification as the input.
2007-04-09 Paolo Carlini <pcarlini@suse.de>
* tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
* cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
Do not set it.
(LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
* tree.c (cp_add_pending_fn_decls): Remove.
* cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
2007-04-07 Daniel Berlin <dberlin@dberlin.org>
Revert change removing staticp.
2007-04-06 Daniel Berlin <dberlin@dberlin.org>
* cp-objcp-common.c (cxx_staticp): Remove.
* cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
* cp-tree.h (cxx_staticp):
2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
* class.c (check_for_override): Don't remove dllmport attribute
of virtual methods.
2007-04-03 Jakub Jelinek <jakub@redhat.com>
PR c++/30847
* typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
type issue error and return early.
2007-03-30 Jason Merrill <jason@redhat.com>
PR c++/31187
* typeck.c (cp_type_readonly): New fn.
* cp-tree.h: Declare it.
* decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
(cp_finish_decl): Not here.
2007-03-31 Richard Guenther <rguenther@suse.de>
* optimize.c (maybe_clone_body): Replace splay-tree usage by
pointer-map.
2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
PR c++/31138
PR c++/31140
PR c++/31141
* parser.c (declarator_can_be_parameter_pack): New.
(cp_parser_template_parameter): Only parse the `...' if the
declarator can be a parameter pack.
(cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
is NULL.
* pt.c (find_parameter_packs_r): Look into the bounds on integer
types (they could be used as array bounds).
(check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
(tsubst_pack_expansion): Handle failure to expand parameter
packs.
2007-03-30 Paolo Carlini <pcarlini@suse.de>
PR c++/26099
* cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
(enum cp_tree_node_structure_enum, union lang_tree_node): Update.
(CLASS_TYPE_NON_UNION_P): Add.
(struct lang_type_class): Add has_complex_dflt.
(TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
(locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
* cp-tree.def: Add TRAIT_EXPR.
* cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
* lex.c (struct resword): Add __has_nothrow_assign,
__has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
__has_trivial_constructor, __has_trivial_copy,
__has_trivial_destructor, __has_virtual_destructor, __is_abstract,
__is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
__is_pod, __is_polymorphic, __is_union.
* parser.c (cp_parser_primary_expression): Deal with the new RIDs.
(cp_parser_trait_expr): New.
* semantics.c (finish_trait_expr, trait_expr_value
classtype_has_nothrow_copy_or_assign_p): New.
* method.c (locate_copy, locate_ctor, locate_dtor): Do not define
as static.
* decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
* class.c (check_bases, check_field_decl, check_bases_and_members):
Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
* pt.c (uses_template_parms, tsubst_copy_and_build,
value_dependent_expression_p, type_dependent_expression_p): Deal with
TRAIT_EXPR.
* tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
2007-03-29 Richard Guenther <rguenther@suse.de>
* tree.c (cp_walk_subtrees): Do not set input_location.
2007-03-28 Simon Martin <simartin@users.sourceforge.net>
PR c++/29077
* decl.c (grokfndecl): Properly setup decl if it is a constructor or a
destructor.
2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
* parser.c (struct cp_parser): Update comment for
greater_than_is_operator_p.
(cp_parser_primary_expression): In C++0x mode, a cast operator can
be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
(TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
!GREATER_THAN_IS_OPERATOR_P.
(cp_parser_binary_expression): When -Wc++0x-compat, warn about
`>>' operators that will become two `>' tokens in C++0x.
(cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
mode, allowing it to terminate default arguments.
(cp_parser_enclosed_template_argument_list): In C++0x mode, treat
`>>' like two consecutive `>' tokens.
(cp_parser_skip_to_end_of_template_parameter_list): Ditto.
(cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
ends a template argument.
2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
* decl.c (redeclaration_error_message): Complain when redeclaring
a friend function with default template arguments (C++0x mode only).
* cp-tree.h (check_default_tmpl_args): Declare.
* pt.c (check_default_tmpl_args): In C++0x mode, permit default
template arguments in function templates. Add support for checking
the default template arguments of friend templates.
(push_template_decl_real): Fix call to check_default_tmpl_args.
(type_unification_real): If a template parameter has not been
deduced but provides a default template argument, substitute into
that default template argument.
* parser.c (cp_parser_init_declarator): When declaring (but not
defining!) a function template in C++0x mode, check for default
template arguments.
2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
PR c++/29993
* decl.c (grokdeclarator): Deal with cv-qualified function type
typedefs in the same way for member and non-member functions.
2007-03-26 Dirk Mueller <dmueller@suse.de>
* parser.c (cp_parser_member_declaration): Pedwarn
about stray semicolons after member declarations.
2007-03-26 Paolo Carlini <pcarlini@suse.de>
PR c++/30500
* pt.c (instantiate_decl): Set in_system_header.
2007-03-22 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (current_tempalte_parms): Improve documentation.
* pt.c (current_template_args): Likewise.
PR c++/30863
* parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
not consume tokens when failing.
2007-03-22 Jim Wilson <wilson@specifix.com>
Mark Mitchell <mark@codesourcery.com>
PR c++/31273
* call.c (standard_conversion): Use type_decays_to. Keep FCODE
consistent with FROM.
2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
* error.c (dump_expr): Handle dependent names that designate types.
* cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
2007-03-17 Kazu Hirata <kazu@codesourcery.com>
* cp-tree.def, parser.c, pt.c: Fix comment typos.
2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
* cvt.c (cp_convert_and_check) : Define.
* cp-tree.h (cp_convert_and_check): Declare.
* call.c (convert_conversion_warnings): Rename to
conversion_null_warnings. The warning for floating-point to
integer is handled by convert_and_check in convert_like_real.
(convert_like_real): convert_conversion_warnings was renamed as
conversion_null_warnings.
* typeck.c (build_binary_op): Use cp_convert_and_check to warn for
overflow and changes of value during conversion.
2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c++/30891
* parser.c (cp_parser_statement): If 'namespace' is found, this
only can be a namespace alias definition, so parse it now.
(cp_parser_namespace_alias_definition): if we find an open brace
instead of '=', then this is actually a misplaced namespace
definition.
2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c++/24924
* decl.c (cxx_init_decl_processing): Move command-line options
processing to c-opts.c.
2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
* ptree.c (cxx_print_type): Use formatting markup for integers
when printing template parameter index/level/orig level.
(cxx_print_xnode): Ditto.
* cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
(struct template_parm_index_s): Remove the PARAMETER_PACK member.
Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
HOST_WIDE_INTs.
(struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
rather than a HOST_WIDE_INT.
Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
better bit-packing.
(struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
IN_BASE_INITIALIZER bool bitfields.
(struct cp_declarator): Make KIND a 4-bit field. Make
PARAMETER_PACK_P a bool bitfield just after KIND.
* pt.c (uses_parameter_packs): Destroy the pointer set.
(make_pack_expansion): Ditto.
(check_for_bare_parameter_packs): Ditto.
* name-lookup.c (push_to_top_level): Make need_pop a bool value.
2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR c++/31165
* call.c (convert_default_arg): Instead of copying the node,
unshare it.
2007-03-15 Dirk Mueller <dmueller@suse.de>
PR c++/30860
* call.c (convert_conversion_warnings): New..
(convert_like_real): .. factored out from here.
(convert_conversion_warnings): Add warning about
false being converted to NULL in argument passing.
2007-03-14 Dirk Mueller <dmueller@suse.de>
* semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
(finish_do_body): Warn about empty body in do/while statement.
2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
* class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c/21438
* typeck.c (build_binary_op): Call warn_for_div_zero instead of
warning.
2007-03-13 Alexandre Oliva <aoliva@redhat.com>
* repo.c (init_repo): Initialize random_seed saved options.
(finish_repo): Adjust.
2007-03-13 Mark Mitchell <mark@codesourcery.com>
PR bootstrap/30899
* Make-lang.in (doc/g++.1): Use $< to specify the location from
which to copy.
2007-03-12 Seongbae Park <seongbae.park@gmail.com>
* decl.c (compute_array_index_type): New warning flag warn_vla.
2007-03-12 Mark Mitchell <mark@codesourcery.com>
PR c++/30108
* call.c (convert_default_arg): Copy non-constant arguments.
2007-03-11 Mark Mitchell <mark@codesourcery.com>
PR c++/31038
* parser.c (cp_parser_postfix_expression): Disallow compound
literals in constant expressions.
PR c++/30328
* semantics.c (finish_typeof): Use unlowered_expr_type.
2007-03-10 Mark Mitchell <mark@codesourcery.com>
PR c++/30274
* cp-tree.h (unlowered_expr_type): New function.
* typeck.c (is_bitfield_expr_with_lowered_type): Handle
COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
(unlowered_expr_type): New function.
(build_unary_op): Disallow predecrements of bool bitfields.
* call.c (build_conditional_expr): Use unlowered_expr_type.
* pt.c (type_unification_real): Likewise.
2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
PR c++/20599
* typeck.c (check_return_expr): Check for bare parameter packs.
(comptypes): Compare template parameter packs and
type pack expansions.
* decl.c (grokdeclarator): Deal with the declaration of function
parameter packs.
(grokparms): Verify that the (optional) function parameter pack is
at the end of the parameter list.
(xref_basetypes): Handle pack expansions in the base class.
(cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
* cp-tree.def (TYPE_ARGUMENT_PACK): New.
(NONTYPE_ARGUMENT_PACK): New.
(TYPE_PACK_EXPANSION): New.
(EXPR_PACK_EXPANSION): New.
(ARGUMENT_PACK_SELECT): New.
* cp-objcp-common.c (cp_tree_size): Compute size of
(NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
ARGUMENT_PACK_SELECT.
* error.c (dump_template_argument): Print template argument packs.
(dump_template_argument_list): Ditto.
(dump_template_parameter): Dump `...' for template type parameter
packs.
(dump_type): Dump TYPE_PACK_EXPANSION nodes.
(dump_parameters): Print function parameter packs.
(dump_template_parms): Print template argument packs.
(dump_expr): Dump EXPR_PACK_EXPANSION nodes.
(maybe_warn_variadic_templates): New.
* operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
* tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
CAST_EXPR.
* mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
(write_template_arg): Write argument packs as separate arguments.
* cp-tree.h (struct template_parm_index_s): Add flag that
indicates that the template parameter is actually a parameter
pack.
(struct tree_argument_pack_select): New.
(enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
(union lang_tree_node): Add argument_pack_select.
(FUNCTION_PARAMETER_PACK_P): New.
(PACK_EXPANSION_P): New.
(PACK_EXPANSION_PATTERN): New.
(SET_PACK_EXPANSION_PATTERN): New.
(PACK_EXPANSION_PARAMETER_PACKS): New.
(ARGUMENT_PACK_P): New.
(ARGUMENT_PACK_ARGS): New.
(SET_ARGUMENT_PACK_ARGS): New.
(ARGUMENT_PACK_INCOMPLETE_P): New.
(ARGUMENT_PACK_EXPLICIT_ARGS): New.
(TEMPLATE_PARM_PARAMETER_PACK): New.
(TEMPLATE_TYPE_PARAMETER_PACK): New.
(ARGUMENT_PACK_SELECT_FROM_PACK): New.
(ARGUMENT_PACK_SELECT_INDEX): New.
(ARGUMENT_PACK_SELECT_ARG): New.
(struct cp_declarator): Add parameter_pack_p flag.
(maybe_warn_variadic_templates): Declare.
(process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
indicate a template parameter pack.
(uses_parameter_packs): Declare.
(template_parameter_pack_p): Declare.
(template_parms_variadic_p): Declare.
(make_pack_expansion): Declare.
(check_for_bare_parameter_packs): Declare.
* cxx-pretty-print.c (pp_cxx_unary_expression): Print
sizeof... expressions.
(pp_cxx_expression): Print pack expansions and non-type argument
packs.
(pp_cxx_exception_specification): Print pack expansions.
(pp_cxx_direct_declarator): Print ellipsis for parameter packs.
(pp_cxx_ctor_initializer): Print pack expansions.
(pp_cxx_type_id): Print pack expansions.
(pp_cxx_template_argument_list): Print argument packs.
(pp_cxx_template_parameter): Print ellipsis for template parameter
packs.
* pt.c (comp_template_parms): Compare template parameter packs.
(template_parameter_pack_p): New.
(template_parms_variadic_p): New.
(template_args_variadic_p): New.
(make_ith_pack_parameter_name): New.
(struct find_parameter_pack_data): New.
(find_parameter_packs_r): New.
(uses_parameter_packs): New.
(make_pack_expansion): New.
(check_for_bare_parameter_packs): New.
(expand_template_argument_pack): New.
(reduce_template_parm_level): Propagate parameter pack flag.
(process_template_parm): Add is_parameter_pack parameter to state
when the parameter is actually a parameter pack. Create template
parameter packs when is_parameter_pack is true.
(current_template_args): The argument for a template parameter
pack is an argument pack containing a single pack expansion.
(process_partial_specialization): When checking that non-type
argument expressions do not involve template parameters, loop over
the arguments in argument packs separately.
(push_template_decl_real): Check that the type of the declaration
does not have any bare parameter packs. Check that primary
templates have no more than one parameter pack, and that it comes
at the end of the template parameter list.
(convert_template_argument): Handle coercions for pack expansion
expressions by coercing the pattern then rebuilding the expansion.
(coerce_template_parms): When coercing the arguments for a
variadic template, pack "extra" arguments into an argument pack.
(coerce_template_template_parms): Cannot coerce between parameter
packs and non-pack parameters.
(template_args_equal): Compare PACK_EXPANSION_P expressions.
(comp_template_args): Expand all template arguments packs before
comparing template argument lists.
(mangle_class_name_for_template): Make argument packs as separate
template arguments.
(for_each_template_parm_r): No need to handle BASELINK.
(instantiate_class_template): Handle pack expansions in the base
class list.
(tsubst_pack_expansion): New.
(tsubst_template_args): Handle substitutions of argument packs and
pack expansion into template argument lists.
(tsubst_decl): Expand function parameter packs into separate
function parameters.
(tsubst_arg_types): Expand a type pack expansion into separate
argument types.
(tsubst_exception_specification): Handle pack expansions in
exception specifiers.
(tsubst): See through ARGUMENT_PACK_SELECT arguments when
replacing a template parameter with its argument. If we encounter
a substitution for an argument pack, just return the parameter
itself.
(tsubst_copy): sizeof(X...) returns the number of elements in
parameter pack X. See through ARGUMENT_PACK_SELECT when the
PARM_DECL is a parameter pack.
(tsubst_expr): Expression pack expansions and argument packs
cannot show up here; they will all be handled through function
calls, sizeof, and template argument lists.
(tsubst_copy_and_build): sizeof(X...) returns the number of
elements in parameter pack X. Handle pack expansions in TREE_LIST
and CONSTRUCTOR nodes.
(fn_type_unification): Handle "incomplete" explicit template
argument lists that specify some of the arguments for a template
parameter pack.
(type_unification_real): Unify arguments against pack expansions.
(template_parm_level_and_index): New, helper function.
(unify_pack_expansion): New.
(unify): Unify argument packs on an argument-by-argument basis,
handling variadic argument packs as well.
(more_specialized_fn): Handle unification of function parameter
packs. All things being equal, prefer non-variadic function
templates to variadic function templates.
(more_specialized_class): Prefer the variadic class template
partial specialization that binds fewer arguments to a parameter
pack.
(regenerate_decl_from_template): Expand function parameter packs
into separate parameters.
(instantiate_decl): Ditto.
(tsubst_initializer_list): Handle pack expansions for base-class
initializers.
(dependent_type_p_r): Determine dependent types in argument packs
and pack expansions.
(value_dependent_expression_p): Determine value-dependence of
non-type argument packs.
(dependent_template_arg_p): Handle argument packs.
* semantics.c (finish_cond): Check for bare parameter packs.
(finish_expr_stmt): Ditto.
(finish_for_expr): Ditto.
(finish_switch_cond): Ditto.
(finish_mem_initializers): Ditto.
* name-lookup.c (arg_assoc_type): Handle pack expansions and
argument packs.
* decl2.c (cp_build_parm_decl): Mark function parameter packs.
* parser.c (make_declarator): Declarator is not an expansion.
(make_pointer_declarator): Transfer parameter pack flag to outer
declarator.
(make_reference_declarator): Ditto.
(make_ptrmem_declarator): Ditto.
(make_call_declarator): Ditto.
(make_array_declarator): Ditto.
(cp_parser_postfix_expression): Allow pack expansion expressions
in the argument list for a call expression.
(cp_parser_parenthesized_expression_list): Add new parameter
ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
into separate arguments."
(cp_parser_new_placement): Allow pack expansion expressions.
(cp_parser_new_initializer): Ditto.
(cp_parser_mem_initializer_list): Allow ellipsis to create a
base-class initializer expansion.
(cp_parser_mem_initializer): Ditto.
(cp_parser_template_parameter_list): Keep track of whether the
template parameter is a template parameter pack.
(cp_parser_template_parameter): Parse the ellipsis to indicate a
template parameter pack.
(cp_parser_type_parameter): Ditto.
(cp_parser_template_argument_list): Parse the ellipsis to indicate
a pack expansion.
(cp_parser_direct_declarator): Parse the ellipsis to indicate that
this declarator is a parameter pack.
(cp_parser_parameter_declaration): The ellipsis does not end the
parameter declaration, because it might be a parameter pack. Parse
the ellipsis to indicate a parameter pack.
(cp_parser_initializer): Allow pack expansions.
(cp_parser_initializer_list): Allow ellipsis to create an
initializer expansion.
(cp_parser_base_clause): Allow ellipsis to create a base specifier
expansion.
(cp_parser_type_id_list): Allow ellipsis to create an exception
specifier expansion.
(cp_parser_attribute_list): Don't allow pack expansions.
(cp_parser_functional_cast): Allow pack expansions.
(cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
compute the length of a parameter pack.
(cp_parser_next_token_ends_template_argument_p): An ellipsis can
end a template argument.
* tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
CAST_EXPR.
2007-03-09 Dirk Mueller <dmueller@suse.de>
* call.c (build_new_op): Call warn_logical_operator.
2007-03-08 Volker Reichelt <reichelt@netcologne.de>
PR c++/30852
* semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
PR c++/30534
* pt.c (any_template_arguments_need_structural_equality_p):
Robustify.
2007-03-08 Alexandre Oliva <aoliva@redhat.com>
* decl.c (grokdeclarator): Disable warnings for anonymous
bitfields.
2007-03-05 Volker Reichelt <reichelt@netcologne.de>
* typeck2.c (readonly_error): Always emit a hard error.
Remove last argument.
* cp-tree.h (readonly_error): Adjust prototype.
* semantics.c (finish_asm_stmt): Adjust call to readonly_error.
* typeck.c (build_unary_op): Likewise.
(build_modify_expr): Likewise.
2007-03-04 Simon Martin <simartin@users.sourceforge.net>
PR c++/30895
* tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c++/15787
* parser.c (struct cp_parser): New IN_IF_STMT.
(cp_parser_statement_seq_opt): Handle an unexpected 'else',
returning if parsing the body of an 'if' statement or issuing an
error and continuing.
(cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
body of 'if'.
(cp_parser_jump_statement): Mask new IN_IF_STMT bit.
2007-03-02 Simon Martin <simartin@users.sourceforge.net>
PR c++/28253
* class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
for thunks.
2007-03-02 Geoffrey Keating <geoffk@apple.com>
* g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
Objective-C++. Don't exit early if -shared-libgcc needs to be
added.
2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
* typeck.c (common_base_type): Delete unused function.
2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
* Make-lang.in: Add dummy lang.install-pdf target.
2007-03-01 Simon Baldwin <simonb@google.com>
PR c++/23689
* decl.c (check_tag_decl): Added new warning for typedef ignored
when it precedes an otherwise valid non-typedef declaration.
2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
* typeck.c (build_function_call): Store converted arguments
in a stack-allocated array instead of building a list.
(convert_arguments): Store arguments in the array passed in as an
argument, and return the actual number of arguments.
* call.c (build_call): Delete, and replace with...
(build_call_n, build_call_a): New.
(build_op_delete_call): Rewrite to avoid constructing argument lists.
(build_over_call): Store converted arguments in a stack-allocated
array instead of building a list.
(build_cxx_call): Pass arguments in an array instead of as a list.
(build_java_interface_fn_ref): Rewrite to avoid constructing
argument lists.
* tree.h: Update declarations to reflect above changes.
* method.c (use_thunk): Use a stack-allocated array to hold
the arguments instead of a list.
* rtti.c (throw_bad_cast): Update call to cxx_call.
(throw_bad_typeid): Likewise.
(build_dynamic_cast_1): Likewise.
* init.c (build_builtin_delete_call): Use build_call_n.
* decl.c (expand_static_init): Likewise.
* except.c (cp_protect_cleanup_actions): Likewise.
* cp-gimplify.c (genericize_eh_spec_block): Likewise.
(gimplify_must_not_throw_expr): Likewise.
(cxx_omp_apply_fn): Use build_call_a.
2007-02-26 Mark Mitchell <mark@codesourcery.com>
* semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
* decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
2007-02-25 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (static_ctors): Remove.
* cp-tree.h (static_dtors): Likewise.
* cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
refactoring of tree_map hierarchy.
(decl_shadowed_for_var_insert): Likewise.
* semantics.c (expand_body): Use c_expand_body.
(expand_or_defer_fn): Don't update static_ctors or static_dtors.
* decl2.c (static_ctors): Remove.
(static_dtors): Likewise.
(generate_ctor_or_dtor_function): Pass NULL_TREE to
objc_generate_static_init_call. Do not call static_[cd]tors.
(generate_ctor_and_dtor_functions_for_priority): Do not check for
static_[cd]tors.
(cp_write_global_declarations): Likewise.
2007-02-23 Richard Guenther <rguenther@suse.de>
* class.c (note_name_declared_in_class): Make declaration
changes meaning a pedwarn.
2007-02-22 Michael Matz <matz@suse.de>
PR c++/29433
* cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
* error.c (dump_aggr_type, dump_simple_decl, dump_decl,
dump_function_decl): Guard emitting outer scopes by new flag.
* cp-lang.c (cxx_dwarf_name): New function.
(LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
* pt.c (classtype_mangled_name, mangle_class_name_for_template):
Remove functions.
(push_template_decl_real, lookup_template_class): Remove calls
to above functions.
2007-02-19 Mark Mitchell <mark@codesourcery.com>
* call.c (build_new_method_call): Ensure that explicit calls of
destructors have type "void".
2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
* typeck.c (build_binary_op): Replace -Wstring-literal-comparison
and -Walways-true with -Waddress.
* cvt.c (convert_to_void): Replace unconditional warning with
-Waddress.
2007-02-18 Kazu Hirata <kazu@codesourcery.com>
* decl.c, tree.c: Fix comment typos.
2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR C++/30158
* semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
statement expression if we had an error mark node.
2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
Brooks Moses <brooks.moses@codesourcery.com>
Lee Millward <lee.millward@codesourcery.com>
* cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
Change class to tcc_vl_exp.
* call.c (build_call): Use build_call_list instead
of build3.
(build_over_call): Likewise.
(build_new_method_call): Use build_min_non_dep_call_list
instead of build_min_non_dep.
* error.c (dump_call_expr_args): New function.
(dump_aggr_init_expr_args): New function.
(dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
* cvt.c (convert_to_void): Use build_call_array instead
of build3; use new AGGR_INIT_EXPR accessor macros.
* mangle.c (write_expression): Use TREE_OPERAND_LENGTH
instead of TREE_CODE_LENGTH.
* dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
AGGR_INIT_EXPR accessor macros.
* cp-gimplify.c (cp_gimplify_init_expr): Use
AGGR_INIT_EXPR_SLOT to set the slot operand.
* cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
(AGGR_INIT_EXPR_SLOT): New macro.
(AGGR_INIT_EXPR_ARG): New macro.
(aggr_init_expr_nargs): New macro.
(AGGR_INIT_EXPR_ARGP): New macro.
(aggr_init_expr_arg_iterator): New.
(init_aggr_init_expr_arg_iterator): New.
(next_aggr_init_expr_arg): New.
(first_aggr_init_expr_arg): New.
(more_aggr_init_expr_args_p): New.
(FOR_EACH_AGGR_INIT_EXPR_ARG): New.
(stabilize_aggr_init): New declaration.
(build_min_non_dep_call_list): Likewise.
* tree.c (process_aggr_init_operands): New function.
(build_aggr_init_array) New function.
(build_cplus_new): Update to use new CALL_EXPR and
AGGR_INIT_EXPR accessor macros. Replace use of build3 with
build_aggr_init_array.
(build_min_non_dep_call_list) New function.
(build_min_nt): Assert input code parameter is not a variable
length expression class.
(build_min, build_min_non_dep): Likewise.
(cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
to check for equality instead of recursing. Handle tcc_vl_exp
tree code classes.
(stabilize_call): Update to only handle CALL_EXPRs, not
AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
(stabilize_aggr_init): New function.
(stabilize_init): Use it.
* cxx-pretty-print.c (pp_cxx_postfix_expression)
<AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
AGGR_INIT_EXPR accessor macros and argument iterators.
* pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
build_vl_exp. Iterate through the operands, recursively
processing each one.
(tsubst_copy_and_build) <CALL_EXPR>: Update to use new
CALL_EXPR accessor macros.
(value_dependent_expression_p) <default>: Handle tcc_vl_exp
tree code classes. Use TREE_OPERAND_LENGTH instead of
TREE_CODE_LENGTH.
* semantics.c (finish_call_expr): Use build_nt_call_list
instead of build_nt.
(simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
accessor macros. Use build_call_array to construct the
CALL_EXPR node instead of build3
* decl2.c (build_offset_ref_call_from_tree): Use
build_nt_call_list and build_min_non_dep_call_list instead
of build_min_nt and build_min_non_dep.
* parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
Use build_nt_call_list instead of build_min_nt.
2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c++/28943
* call.c (build_conditional_expr): Improve error message.
2007-02-13 Dirk Mueller <dmueller@suse.de>
* friend.c (do_friend): Annotate warning about friend
declarations in templates with OPT_Wnon_template_friend.
Convert informal message from warning() to inform().
2007-02-12 Simon Martin <simartin@users.sourceforge.net>
Mark Mitchell <mark@codesourcery.com>
PR c++/14622
* pt.c (do_decl_instantiation): Detect type mismatches in explicit
instantiations for variables.
2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR middle-end/7651
* cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
Check warn_unused_value just once.
2007-02-11 Mark Mitchell <mark@codesourcery.com>
PR c++/26988
* pt.c (determine_specialization): Use skip_artificial_parms_for.
(fn_type_unificiation): Likewise.
(get_bindings): Likewise.
o2007-02-06 Mark Mitchell <mark@codesourcery.com>
PR target/29487
* decl.c (finish_function): Use DECL_REPLACEABLE.
* tree.c (cp_cannot_inline_tree_fn): Likewise.
2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
* parser.c (cp_parser_primary_expression): Reformat overly long lines.
2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
* decl.c (grokvardecl): Don't error if !have_tls.
(grokdeclarator): Likewise.
* parser.c (cp_parser_omp_threadprivate): Likewise.
2007-02-07 Jakub Jelinek <jakub@redhat.com>
PR c++/30703
* cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
parameters and result decls in omp clauses.
(cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
by reference.
2007-02-05 Dirk Mueller <dmueller@suse.de>
PR bootstrap/30510
* parser.c (cp_parser_class_specifier): Always initialize bases.
2007-02-05 Paolo Bonzini <bonzini@gnu.org>
* cp-tree.h (OMP_ATOMIC_CODE): Delete.
(OMP_ATOMIC_DEPENDENT_P): Rewrite.
* pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
expressions.
* semantics.c (finish_omp_atomic): Store a whole expression node
in operand 1, and integer_zero_node in operand 0, for dependent
OMP_ATOMIC. Rewrite to make flow easier to understand.
2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
* decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
2007-02-04 Kazu Hirata <kazu@codesourcery.com>
* class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
* parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
keyword warning to -Wc++0x-compat.
2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
* decl.c (grokdeclarator): Update documentation.
2007-02-02 Jakub Jelinek <jakub@redhat.com>
PR c++/30536
* decl.c (grokdeclarator): If __thread is used together with
a storage class other than extern and static, clear thread_p
after issuing diagnostics and fall through to checking the
storage class.
2007-01-30 Roger Sayle <roger@eyesopen.com>
* error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
calculating the size of an array (to avoid recursive errors).
2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c++/24745
* typeck.c (build_binary_op): Fix logic for warning. Move warning
to -Wpointer-arith.
* call.c (convert_like_real): Don't warn when converting to
boolean type.
2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
* decl.c (pop_label): Replace warning with call to
warn_for_unused_label.
2007-01-28 Andrew Pinski <pinskia@gmail.com>
PR C++/28988
* semantics.c (finish_pseudo_destructor_expr): Check the
destrutor name by calling check_dtor_name.
2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
* lex.c (D_CPP0X): Rename.
(D_CXX0X): To this.
(reswords): D_CPP0X -> D_CXX0X.
(init_reswords): Ditto.
* parser.c (cp_lexer_get_preprocessor_token): Warn about the use
of C++0x keywords as identifiers.
2007-01-23 Simon Martin <simartin@users.sourceforge.net>
PR c++/27492
* decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
function decls.
2007-01-23 Ian Lance Taylor <iant@google.com>
* typeck.c (convert_for_assignment): Only warn about a = b = c
when converting to bool.
2007-01-23 Roger Sayle <roger@eyesopen.com>
* call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
TREE_OVERFLOW.
* typeck.c (ignore_overflows): Remove the remaining uses of
TREE_CONSTANT_OVERFLOW.
2007-01-20 Jan Hubicka <jh@suse.cz>
* decl2.c (start_objects, start_static_storage_duration_function):
Do not make the functions uninlinable.
2007-01-17 Ian Lance Taylor <iant@google.com>
* class.c (add_method): Call VEC_reserve_exact rather than passing
a negative size to VEC_reserve.
2007-01-11 Simon Martin <simartin@users.sourceforge.net>
PR c++/29573
* tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
2007-01-10 Mark Mitchell <mark@codesourcery.com>
PR c++/28999
* decl.c (make_typename_type): If the qualified name is not a
type, issue an error.
* parser.c (cp_parser_elaborated_type_specifier): Fix comment
formatting.
2007-01-08 Geoffrey Keating <geoffk@apple.com>
* rtti.c: Include target.h.
(emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
don't emit typeinfo for fundamental types as weak.
* Make-lang.in (cp/rtti.o): Update and correct dependencies.
2007-01-08 Richard Guenther <rguenther@suse.de>
* cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
* call.c (standard_conversion): Pass flag to
vector_types_convertible_p to disallow emission of note.
* typeck.c (convert_for_assignment): Pass flag to
vector_types_convertible_p to allow emission of note.
(ptr_reasonably_similar): Pass flag to vector_types_convertible_p
to disallow emission of note.
2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c++/28986
* typeck.c (build_binary_op): Call overflow_warning if
TREE_OVERFLOW_P is true for the result and not for any of the
operands.
2007-01-06 Lee Millward <lee.millward@codesourcery.com>
PR c++/19439
* class.c (add_method): Don't wait until template
instantiation time to complain about duplicate methods.
2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c/19978
* semantics.c (finish_unary_op_expr): Warn only if result
overflowed and operands did not.
2007-01-05 Ian Lance Taylor <iant@google.com>
* typeck.c (build_binary_op): Warn about comparing a non-weak
address to NULL.
2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
* pt.c (tsubst): Propagate the need for structural equality checks
when reducing the level of template parameters.
2007-01-03 Kazu Hirata <kazu@codesourcery.com>
* pt.c: Fix a comment typo.
2007-01-02 Ian Lance Taylor <iant@google.com>
* semantics.c (maybe_convert_cond): Optionally warn when using an
assignment as a condition.
* typeck.c (convert_for_assignment): Optionally warn about
assigning the result of an assignment to a bool.
2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
* pt.c (canonical_template_parms): Correct typo in comment.
2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
* typeck.c (structural_comptypes): Renamed from "comptypes".
(comptypes): Use canonical type information to perform fast type
comparison. When VERIFY_CANONICAL_TYPES, verify that the
canonical type comparison returns the same results as we would see
from the current, structural check. Support COMPARE_STRUCTURAL
when we need structural checks.
* decl.c (typename_compare): Fix comment.
(build_typename_type): TYPENAME_TYPE nodes require structural
equality checks, because they resolve different based on the
current class type.
(make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
require structural equality checks (for now).
(build_ptrmemfunc_type): Build the canonical pointer to member
function type.
(compute_array_index_type): Whenever we build a new index type
to represent the size of an array in a template, we need to mark
this index type as requiring structural equality. This goes for
arrays with value-dependent sizes with the current ABI, or all
arrays with ABI-1.
* tree.c (cplus_array_hash): New.
(struct cplus_array_info): New.
(cplus_array_compare): New.
(cplus_array_htab): New.
(build_cplus_array_type_1): Use a hash table to cache the array
types we build. Build the canonical array type for each array
type.
(cp_build_qualified_type_real): When building a cv-qualified array
type, use the hash table of array types and build canonical array
types as necessary.
(bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
use structural equality (for now).
* cp-tree.h (COMPARE_STRUCTURAL): New.
* pt.c (canonical_template_parms): New.
(canonical_type_parameter): New.
(process_template_parm): Find the canonical type parameter.
(lookup_template_class): When we have named the primary template
type, set the canonical type for our template class to the primary
template type. If any of the template arguments need structural
equality checks, the template class needs structural equality
checks.
(tsubst): When reducing the level of a template template
parameter, we require structural equality tests for the resulting
parameter because its template parameters have not had their types
canonicalized. When reducing a template type parameter, find the
canonical reduced type parameter.
(any_template_arguments_need_structural_equality_p): New.
|