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
|
2013-12-23 Jason Merrill <jason@redhat.com>
PR c++/59271
* lambda.c (build_capture_proxy): Use build_cplus_array_type.
PR c++/59349
* parser.c (cp_parser_lambda_introducer): Handle empty init.
2013-12-23 Stuart Hastings <stuart@apple.com>
Bill Maddox <maddox@google.com>
Jason Merrill <jason@redhat.com>
PR c++/41090
* optimize.c (can_alias_cdtor, populate_clone_array): Split out
from maybe_clone_body.
(maybe_thunk_body): New function.
(maybe_clone_body): Call it.
* mangle.c (write_mangled_name): Remove code to suppress
writing of mangled name for cloned constructor or destructor.
(write_special_name_constructor): Handle decloned constructor.
(write_special_name_destructor): Handle decloned destructor.
* method.c (trivial_fn_p): Handle decloning.
* semantics.c (expand_or_defer_fn_1): Clone after setting linkage.
2013-12-23 Marek Polacek <polacek@redhat.com>
PR c++/59111
* search.c (lookup_conversions): Return NULL_TREE if !CLASS_TYPE_P.
2013-12-20 Trevor saunders <tsaunders@mozilla.com>
* semantics.c (build_anon_member_initialization): Replace
stack_vec<T, N> with auto_vec<T, N>.
2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
* parser.c (cp_parser_cilk_simd_clause_name): Changed cilk_clause_name
to omp_clause_name.
2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
* parser.c (cp_parser_omp_parallel): Fix description.
2013-12-12 Jason Merrill <jason@redhat.com>
PR c++/58954
* pt.c (resolve_overloaded_unification): Use instantiate_template.
2013-12-12 Jakub Jelinek <jakub@redhat.com>
PR c++/58627
* class.c (resolve_address_of_overloaded_function): Don't call ggc_free
on targs.
2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cp-tree.h (cilk_valid_spawn): New prototype.
(gimplify_cilk_spawn): Likewise.
(create_try_catch_expr): Likewise.
* decl.c (finish_function): Insert Cilk function-calls when a
_Cilk_spawn is used in a function.
* parser.c (cp_parser_postfix_expression): Added RID_CILK_SPAWN and
RID_CILK_SYNC cases.
* cp-cilkplus.c (set_cilk_except_flag): New function.
(set_cilk_except_data): Likewise.
(cilk_install_body_with_frame_cleanup): Likewise.
* except.c (create_try_catch_expr): Likewise.
* parser.h (IN_CILK_SPAWN): New #define.
* pt.c (tsubst_expr): Added CILK_SPAWN_STMT and CILK_SYNC_STMT cases.
* semantics.c (potential_constant_expression_1): Likewise.
* typeck.c (cp_build_compound_expr): Reject a spawned function in a
compound expression.
(check_return_expr): Reject a spawned function in a return expression.
* cp-gimplify.c (cp_gimplify_expr): Added a CILK_SPAWN_STMT and
CALL_EXPR case. Added handling of spawned function in MODIFY_EXPR
and INIT_EXPR.
2013-12-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/59435
* parser.c (cp_parser_cache_defarg): sizeof ... ( p ) can
occur in a default argument too.
2013-12-06 Caroline Tice <cmtice@google.com>
Submitting patch from Stephen Checkoway, s@cs.jhu.edu
* vtable-class-hierarchy.c (init_functions): Make the libvtv
function decls externally visible.
2013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
* decl2.c: Remove struct tags when referring to class varpool_node.
2013-12-05 Jason Merrill <jason@redhat.com>
PR c++/59044
PR c++/59052
* pt.c (most_specialized_class): Use the partially instantiated
template for deduction. Drop the TMPL parameter.
2013-12-05 Paolo Carlini <paolo.carlini@oracle.com>
* decl.c (duplicate_decls): Replace pairs of errors and permerrors
with error + inform (permerror + inform, respectively).
2013-12-04 Joseph Myers <joseph@codesourcery.com>
PR c/52023
* typeck.c (cxx_sizeof_or_alignof_type): Update call to
c_sizeof_or_alignof_type.
2013-12-04 Jakub Jelinek <jakub@redhat.com>
PR c++/59268
* pt.c (tsubst_copy_and_build): Handle POINTER_PLUS_EXPR.
2013-11-29 Marek Polacek <polacek@redhat.com>
PR sanitizer/59331
* decl.c (compute_array_index_type): Don't build COMPOUND_EXPR for
instrumentation.
2013-11-28 Jakub Jelinek <jakub@redhat.com>
PR c++/59297
* semantics.c (finish_omp_atomic): Call finish_expr_stmt
rather than add_stmt.
2013-11-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* g++spec.c (TIMELIB): Define.
(WITHLIBC, SKIPOPT): Adjust values.
(lang_specific_driver): Add TIME_LIBRARY if not passed explicitly.
2013-11-28 Jakub Jelinek <jakub@redhat.com>
PR c/59310
* parser.c (cp_parser_omp_target): Call keep_next_level only
if flag_openmp.
2013-11-27 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58647
* semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
Handle function COMPONENT_REFs.
2013-11-27 Aldy Hernandez <aldyh@redhat.com>
Jakub Jelinek <jakub@redhat.com>
* semantics.c (finish_omp_clauses): For #pragma omp declare simd
linear clause step call maybe_constant_value.
2013-11-27 Tom de Vries <tom@codesourcery.com>
Marc Glisse <marc.glisse@inria.fr>
PR c++/59032
* typeck.c (cp_build_unary_op): Allow vector increment and decrement.
2013-11-27 Tom de Vries <tom@codesourcery.com>
Marc Glisse <marc.glisse@inria.fr>
PR middle-end/59037
* semantics.c (cxx_fold_indirect_ref): Don't create out-of-bounds
BIT_FIELD_REF.
2013-11-26 Jakub Jelinek <jakub@redhat.com>
PR c++/58874
* parser.c (cp_parser_late_parsing_for_member): For OpenMP UDRs
pass 2 instead of 0 to finish_function.
2013-11-26 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58700
* decl.c (grokdeclarator): Don't try to pass declarator->id_loc
to build_lang_decl_loc when declarator is null.
2013-11-26 Paolo Carlini <paolo.carlini@oracle.com>
* cvt.c (cp_convert_and_check): Avoid calling cp_convert
unnecessarily.
2013-11-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/54485
* decl.c (duplicate_decls): Enforce 8.3.6/6 about default arguments
for member functions of class templates.
2013-11-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58607
* semantics.c (check_constexpr_ctor_body): Check for BIND_EXPR_VARS.
2013-11-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58810
* decl.c (grokdeclarator): Don't handle qualified free functions here,
leave the diagnostic to grokfndecl.
2013-11-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/59080
* pt.c (unify): Don't call unify_array_domain with a NULL_TREE
third argument.
PR c++/59096
* pt.c (apply_late_template_attributes): Check that TREE_VALUE
isn't NULL_TREE in the attribute_takes_identifier_p case.
2013-11-25 Adam Butcher <adam@jessamine.co.uk>
PR c++/59112
PR c++/59113
* parser.c (cp_parser_parameter_declaration_clause): Disallow implicit
function templates in local functions unless defining a lambda.
2013-11-23 Easwaran Raman <eraman@google.com>
PR c++/59031
* call.c (build_new_method_call_1): Comnpare function context
with BASELINK_BINFO type rather than instance type before
marking the call with LOOKUP_NONVIRTUAL.
2013-11-23 Jason Merrill <jason@redhat.com>
PR c++/58868
* init.c (build_aggr_init): Don't clobber the type of init
if we got an INIT_EXPR back from build_vec_init.
(build_vec_init): Do digest_init on trivial initialization.
2013-11-23 Alexander Ivchenko <alexander.ivchenko@intel.com>
PR c++/58525
* call.c (build_operator_new_call): Add flag_exceptions check.
* decl.c (compute_array_index_type): Ditto.
* init.c (build_new_1): Ditto.
(build_vec_init): Ditto.
2013-11-22 Jakub Jelinek <jakub@redhat.com>
* cp-gimplify.c: Include target.h and c-family/c-ubsan.h.
(cp_ubsan_maybe_instrument_return): New function.
(cp_genericize): Call it if -fsanitize=return.
* decl2.c: Include asan.h.
(one_static_initialization_or_destruction): If -fsanitize=address,
init is non-NULL and guard is NULL, set
vnode->dynamically_initialized.
(do_static_initialization_or_destruction): Call
__asan_{before,after}_dynamic_init around the static initialization.
2013-11-22 Andrew MacLeod <amacleod@redhat.com>
* class.c: Add required include files from gimple.h.
* cp-gimplify.c: Likewise
* decl2.c: Likewise
* init.c: Likewise
* optimize.c: Likewise
* pt.c: Likewise
* semantics.c: Likewise
* tree.c: Likewise
* typeck.c: Likewise
* vtable-class-hierarchy.c: Likewise
2013-11-22 David Malcolm <dmalcolm@redhat.com>
* call.c (build_integral_nontype_arg_conv): Remove use of
EXPR_LOC_OR_HERE macro.
(convert_like_real): Likewise.
(convert_arg_to_ellipsis): Likewise.
(build_cxx_call): Likewise.
(perform_implicit_conversion_flags): Likewise.
(initialize_reference): Likewise.
* cvt.c (cp_convert_to_pointer): Likewise.
(convert_to_reference): Likewise.
(ocp_convert): Likewise.
(convert_to_void): Likewise.
* decl.c (pop_label): Update comment.
(pop_switch): Remove use of EXPR_LOC_OR_HERE macro.
(check_tag_decl): Remove use of in_system_header macro.
(make_rtl_for_nonlocal_decl): Remove use of input_filename
macro.
(compute_array_index_type): Remove use of in_system_header
macro.
(grokdeclarator): Likewise.
* error.c (dump_global_iord): Remove use of input_filename
macro.
(location_of): Remove use of EXPR_LOC_OR_HERE macro.
(maybe_warn_cpp0x): Remove use of in_system_header macro.
* init.c (build_new_1): Remove use of EXPR_LOC_OR_HERE macro.
* lex.c (handle_pragma_interface): Remove use of input_filename
macro.
(handle_pragma_implementation): Likewise.
(cxx_make_type): Likewise.
(in_main_input_context): Likewise.
* name-lookup.c (push_binding_level): Remove use of
input_line macro.
(leave_scope): Likewise.
(resume_scope): Likewise.
* parser.c (cp_parser_unqualified_id): Remove use of
in_system_header macro.
(cp_parser_cast_expression): Likewise.
(cp_parser_declaration_seq_opt): Likewise.
(cp_parser_enumerator_list): Likewise.
(cp_parser_parameter_declaration_clause): Likewise.
(cp_parser_exception_specification_opt): Likewise.
* pt.c (unify_arg_conversion): Remove use of EXPR_LOC_OR_HERE
macro.
(convert_nontype_argument): Likewise.
(push_tinst_level): Remove use of in_system_header macro.
(tsubst_copy_and_build): Remove use of EXPR_LOC_OR_HERE
macros.
(do_decl_instantiation): Remove use of in_system_header macro.
(do_type_instantiation): Likewise.
* semantics.c (finish_call_expr): Remove use of EXPR_LOC_OR_HERE
macro.
(begin_class_definition): Remove use of input_filename macro.
(cxx_eval_call_expression): Remove use of EXPR_LOC_OR_HERE
macro.
(cxx_eval_constant_expression): Likewise.
(potential_constant_expression_1): Likewise.
* typeck.c (decay_conversion): Likewise.
(rationalize_conditional_expr): Likewise.
(build_x_compound_expr_from_list): Likewise.
(convert_for_assignment): Likewise.
* typeck2.c (check_narrowing): Likewise.
2013-11-22 Trevor Saunders <tsaunders@mozilla.com>
* parser.c, semantics.c: Change some local variables from vec to
auto_vec or stack_vec.
2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
* decl.c (reshape_init_array_1): Use tree_to_uhwi rather than
tree_low_cst.
(grokdeclarator): Update comment to refer to tree_to_[su]hwi rather
than tree_low_cst.
2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
* call.c, class.c, decl.c, error.c: Replace tree_low_cst (..., 1) with
tree_to_uhwi throughout.
2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
* class.c, dump.c, error.c, init.c, method.c, parser.c, semantics.c:
Replace tree_low_cst (..., 0) with tree_to_shwi throughout.
2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
* decl.c: Replace host_integerp (..., 1) with tree_fits_uhwi_p
throughout.
2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
* error.c, init.c, parser.c, semantics.c: Replace
host_integerp (..., 0) with tree_fits_shwi_p throughout.
2013-11-17 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/59123
* decl.c (validate_constexpr_redeclaration): Redeclarations of
variables can differ in constexpr.
2013-11-16 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/29143
* semantics.c (finish_call_expr): Ensure that for OVERLOADs too
'(&f)(...)' is the same as '(f)(...)', per 13.3.1.1.
2013-11-15 Aldy Hernandez <aldyh@redhat.com>
* Make-lang.in (CXX_AND_OBJCXX_OBJS): Depend on cp/cp-cilkplus.o.
* cp-cilkplus.c: New file.
* cp-tree.h (cpp_validate_cilk_plus_loop): Protoize.
* parser.c (cp_parser_cilk_simd): New.
(cp_debug_parser): Add case for IN_CILK_SIMD_FOR.
(cp_parser_jump_statement): Same.
(cp_parser_omp_for_cond): Add new argument.
Add case for NE_EXPR.
(cp_parser_omp_for_loop): Pass new argument to
cp_parser_omp_for_cond.
Handle CILK_SIMD nodes.
Abstract initilization code to..
(cp_parser_omp_for_loop_init): ...here.
(cp_parser_pragma): Add case for PRAGMA_CILK_SIMD.
(cp_parser_cilk_simd_vectorlength): New.
(cp_parser_cilk_simd_linear): New.
(cp_parser_cilk_simd_clause_name): New.
(cp_parser_cilk_simd_all_clauses): New.
(cp_parser_cilk_simd): New.
* parser.h (IN_CILK_SIMD_FOR): New macro.
* pt.c (tsubst_expr): Add case for CILK_SIMD.
* typeck2.c (cxx_readonly_error): Pass location argument to
readonly_error.
2013-11-14 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57887
* parser.c (cp_parser_late_parsing_nsdmi): Call
maybe_begin_member_template_processing.
* pt.c (maybe_begin_member_template_processing): Handle NSDMIs.
(inline_needs_template_parms): Adjust.
2013-11-14 Andrew MacLeod <amacleod@redhat.com>
* class.c: Include only gimplify.h and gimple.h as needed.
* cp-gimplify.c: Likewise.
* error.c: Likewise.
* init.c: Likewise.
* optimize.c: Likewise.
* pt.c: Likewise.
* semantics.c: Likewise.
* tree.c: Likewise.
* vtable-class-hierarchy.c: Likewise.
2013-11-14 Diego Novillo <dnovillo@google.com>
* call.c: Include stor-layout.h.
Include trans-mem.h.
Include stringpool.h.
* class.c: Include stringpool.h.
Include stor-layout.h.
Include attribs.h.
* cp-gimplify.c: Include stor-layout.h.
* cvt.c: Include stor-layout.h.
* decl.c: Include stringpool.h.
Include stor-layout.h.
Include varasm.h.
Include attribs.h.
Include calls.h.
* decl2.c: Include stringpool.h.
Include varasm.h.
Include attribs.h.
Include stor-layout.h.
Include calls.h.
* error.c: Include stringpool.h.
* except.c: Include stringpool.h.
Include trans-mem.h.
Include attribs.h.
* init.c: Include stringpool.h.
Include varasm.h.
* lambda.c: Include stringpool.h.
* lex.c: Include stringpool.h.
* mangle.c: Include stor-layout.h.
Include stringpool.h.
* method.c: Include stringpool.h.
Include varasm.h.
* name-lookup.c: Include stringpool.h.
Include print-tree.h.
Include attribs.h.
* optimize.c: Include stringpool.h.
* parser.c: Include print-tree.h.
Include stringpool.h.
Include attribs.h.
Include trans-mem.h.
* pt.c: Include stringpool.h.
Include varasm.h.
Include attribs.h.
Include stor-layout.h.
* ptree.c: Include print-tree.h.
* repo.c: Include stringpool.h.
* rtti.c: Include stringpool.h.
Include stor-layout.h.
* semantics.c: Include stmt.h.
Include varasm.h.
Include stor-layout.h.
Include stringpool.h.
* tree.c: Include stor-layout.h.
Include print-tree.h.
Include tree-iterator.h.
* typeck.c: Include stor-layout.h.
Include varasm.h.
* typeck2.c: Include stor-layout.h.
Include varasm.h.
* vtable-class-hierarchy.c: Include stringpool.h.
Include stor-layout.h.
2013-11-12 Andrew MacLeod <amacleod@redhat.com>
* class.c: Include gimplify.h.
* cp-gimplify.c: Likewise.
* error.c: Likewise.
* init.c: Likewise.
* optimize.c: Likewise.
* pt.c: Likewise.
* semantics.c: Likewise.
* tree.c: Likewise.
* vtable-class-hierarchy.c: Likewise.
* decl2.c: Don't include gimple.h.
* except.c: Likewise.
* method.c: Include pointer-set.h instead of gimple.h.
2013-11-12 Adam Butcher <adam@jessamine.co.uk>
* pt.c (convert_generic_types_to_packs): New function to transform
a range of implicitly introduced non-pack template parms to be parameter
packs.
* cp-tree.h (convert_generic_types_to_packs): Declare.
* parser.c (cp_parser_parameter_declaration_list): If a function
parameter pack contains generic types, convert them to packs prior to
grokdeclarator.
2013-11-12 Adam Butcher <adam@jessamine.co.uk>
PR c++/58534
PR c++/58536
PR c++/58548
PR c++/58549
PR c++/58637
* parser.h (struct cp_parser): New members implicit_template_parms,
implicit_template_scope and auto_is_implicit_function_template_parm_p.
* parser.c (add_implicit_template_parms): Refactor as ...
(synthesize_implicit_template_parm): ... this to append a new template
type parm to the current template parameter list (introducing a new list
if necessary). Removed push_deferring_access_checks.
(finish_fully_implicit_template): Removed pop_deferring_access_checks.
(cp_parser_new): Initialize new cp_parser members.
(cp_parser_parameter_declaration_clause): Consider auto as implicit
template parm when parsing a parameter declaration (unless parsing an
explicit specialization).
(cp_parser_parameter_declaration_list): Remove local
implicit_template_parms counter and reset cp_parser implicit template
state when complete.
(cp_parser_lambda_expression): Reset implicit template cp_parser members
whilst generating lambda class.
(cp_parser_function_definition_after_declarator): Reset implicit
template cp_parser members whilst parsing function definition.
(make_generic_type_name): Respell '<autoN>' as 'auto:N' which works
better with template diagnostics.
(cp_parser_simple_type_specifier): Synthesize implicit template parm on
parsing 'auto' if auto_is_implicit_function_template_parm_p and provide
diagnostics ...
* decl.c (grokdeclarator): ... that were previously done here.
2013-11-12 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57734
* pt.c (lookup_template_class_1): Handle alias template declarations
of enumeration types.
2013-11-10 Paolo Carlini <paolo.carlini@oracle.com>
* cvt.c (cp_convert_to_pointer): Call build_ptrmemfunc before
maybe_warn_zero_as_null_pointer_constant to avoid duplicate
-Wzero-as-null-pointer-constant diagnostics.
* typeck.c (build_ptrmemfunc): Use cp_build_c_cast.
2013-11-06 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/11006
* init.c (build_new_1): Don't call build_java_class_ref on non-class
types.
2013-11-05 Jason Merrill <jason@redhat.com>
PR c++/58868
* decl.c (check_initializer): Don't use build_vec_init for arrays
of trivial type.
2013-11-05 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58724
* name-lookup.c (handle_namespace_attrs): Use get_attribute_name.
2013-11-05 Tobias Burnus <burnus@net-b.de>
* parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
cp_parser_omp_declare): Handle -fopenmp-simd.
2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
* decl2.c (cpp_check): Change type of first parameter and deal with
IS_TRIVIAL.
2013-11-03 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/38313
* parser.c (cp_parser_constructor_declarator_p): Check that the
class-name matches current_class_type.
2013-11-03 Marek Polacek <polacek@redhat.com>
* decl.c (cp_finish_decl): Move C++1y bounds checking...
(compute_array_index_type): ...here. Add VLA instrumentation.
Call stabilize_vla_size.
(grokdeclarator): Don't call stabilize_vla_size here.
2013-11-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/29234
PR c++/56037
* parser.c (cp_parser_cast_expression): If we aren't looking at
a cast-expression don't call cp_parser_type_id.
(cp_parser_postfix_expression): Likewise for compound-literal.
(cp_parser_tokens_start_cast_expression): Adjust.
2013-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
PR c++/58708
* parser.c (make_string_pack): Discover non-const type and size
of character and build parm pack with correct type and chars.
2013-11-01 Trevor Saunders <tsaunders@mozilla.com>
* semantics.c (build_anon_member_initialization): Convert fields to be
a stack_vec.
2013-11-01 Marc Glisse <marc.glisse@inria.fr>
PR c++/58834
* pt.c (type_dependent_expression_p): Handle null argument.
2013-11-01 Jakub Jelinek <jakub@redhat.com>
* semantics.c (finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
check_dup_generic at the end, unless remove is true.
(finish_omp_clauses) <case OMP_CLAUSE_LINEAR>: Add break; after
remove = true;.
2013-10-31 Jakub Jelinek <jakub@redhat.com>
* semantics.c (finish_omp_clauses): Diagnose aligned clause
with decl that is not pointer nor array nor reference to those.
2013-10-31 Jason Merrill <jason@redhat.com>
* semantics.c (cxx_eval_call_expression): Handle trivial
value-initialization.
* typeck2.c (store_init_value): Call maybe_constant_init after
cxx_constant_value.
* decl.c (cxx_maybe_build_cleanup): Always set LOOKUP_NONVIRTUAL.
* decl2.c (build_cleanup): Just call cxx_maybe_build_cleanup.
PR c++/58162
* parser.c (cp_parser_late_parse_one_default_arg): Set
TARGET_EXPR_DIRECT_INIT_P.
* class.c (type_build_ctor_call): Return early in C++98 mode.
(type_build_dtor_call): Likewise.
2013-10-31 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58932
Revert:
2013-10-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58466
* pt.c (most_specialized_class): Bump processing_template_decl for
get_class_bindings.
2013-10-30 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58581
* call.c (build_over_call): Check return value of mark_used.
2013-10-30 Jason Merrill <jason@redhat.com>
* semantics.c (finish_compound_literal): Don't create a static variable
inside cp_unevaluated_operand.
* init.c (push_base_cleanups): Check ANON_AGGR_TYPE_P.
2013-10-30 Tobias Burnus <burnus@net-b.de>
PR other/33426
* cp-tree.h (RANGE_FOR_IVDEP): Define.
(cp_convert_range_for, finish_while_stmt_cond, finish_do_stmt,
finish_for_cond): Take 'bool ivdep' parameter.
* cp-array-notation.c (create_an_loop): Update call.
* init.c (build_vec_init): Ditto.
* pt.c (tsubst_expr): Ditto.
* parser.c (cp_parser_iteration_statement, cp_parser_for,
cp_parser_range_for, cp_convert_range_for): Update calls.
(cp_parser_pragma): Accept GCC ivdep for 'while' and 'do'.
* semantics.c (finish_while_stmt_cond, finish_do_stmt,
finish_for_cond): Optionally build ivdep annotation.
2013-10-30 Jason Merrill <jason@redhat.com>
* decl.c (cp_finish_decl): Never throw for VLA bound == 0.
2013-10-29 David Malcolm <dmalcolm@redhat.com>
Patch autogenerated by refactor_symtab.py from
https://github.com/davidmalcolm/gcc-refactoring-scripts
revision 58bb219cc090b2f4516a9297d868c245495ee622
* call.c (mark_versions_used): Update for conversion of symtab types
to a true class hierarchy.
* decl2.c (cp_write_global_declarations): Likewise.
(clear_decl_external): Likewise.
(build_java_method_aliases): Likewise.
(collect_candidates_for_java_method_aliases): Likewise.
(mark_needed): Likewise.
(var_finalized_p): Likewise.
(maybe_make_one_only): Likewise.
(maybe_emit_vtables): Likewise.
* lambda.c (maybe_add_lambda_conv_op): Likewise.
* method.c (use_thunk): Likewise.
* optimize.c (maybe_clone_body): Likewise.
* tree.c (cp_fix_function_decl_p): Likewise.
2013-10-29 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58888
* decl2.c (grokfield): Handle auto like NSDMI.
2013-10-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58878
* pt.c (check_template_shadow): Don't skip declarations in inline
member templates.
2013-10-25 Tobias Burnus <burnus@net-b.de>
PR other/33426
* parser.c (cp_parser_iteration_statement,
cp_parser_for, cp_parser_c_for, cp_parser_pragma): Handle
IVDEP pragma.
2013-10-24 Marek Polacek <polacek@redhat.com>
PR c++/58705
* typeck2.c (check_narrowing): Don't check narrowing when the scalar
initializer is empty.
2013-10-23 Jason Merrill <jason@redhat.com>
LWG 2165
* method.c (defaulted_late_check): Delete on eh-spec mismatch.
(maybe_explain_implicit_delete): Explain it.
* error.c (eh_spec_to_string): New.
(cp_printer): Use it for %X.
In C++11 a trivial [cd]tor might not be callable.
* class.c (user_provided_p): A function deleted on its declation
in the class is not user-provided.
(type_build_ctor_call): Also force a ctor call if we
might have a deleted or private trivial ctor.
(type_build_dtor_call): New.
(deduce_noexcept_on_destructors): Remove obsolete code.
* cp-tree.h: Declare type_build_dtor_call.
* decl.c (expand_static_init): Make sure trivial dtors are callable.
(cxx_maybe_build_cleanup): Likewise.
* except.c (build_throw): Likewise.
* init.c (build_value_init): Handle trivial but not callable ctors.
(perform_target_ctor): Make sure trivial dtor is callable.
(perform_member_init): Likewise.
(expand_cleanup_for_base): Likewise.
(build_vec_delete_1): Likewise.
(build_delete): Likewise.
(push_base_cleanups): Likewise.
(build_new_1): Avoid redundant error.
* method.c (synthesized_method_walk): Can't ever exit early in C++11.
Always process the subobject destructor.
* semantics.c (finish_compound_literal): Make sure trivial dtor is
callable.
* typeck2.c (split_nonconstant_init): Likewise.
2013-10-23 Edward Smith-Rowland <3dw4rd@verizon.net>
Implement C++14 [[deprecated]] modulo [[gnu::deprecated]] bugs.
* parser.c (cp_parser_std_attribute): Interpret [[deprecated]]
as [[gnu::deprecated]].
2013-10-22 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58816
* pt.c (apply_late_template_attributes): Use get_attribute_name,
not TREE_PURPOSE.
2013-10-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58466
* pt.c (most_specialized_class): Bump processing_template_decl for
get_class_bindings.
2013-10-18 Paolo Carlini <paolo.carlini@oracle.com>
* parser.c (cp_parser_lookup_name): Tidy.
2013-10-17 Andrew MacLeod <amacleod@redhat.com>
* parser.c: Include omp-low.h.
* semantics.c: Likewise.
2013-10-17 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58596
* lambda.c (lambda_expr_this_capture): Handle NSDMIs in the
cp_unevaluated_operand case.
2013-10-16 Jason Merrill <jason@redhat.com>
* pt.c (apply_late_template_attributes): Use
attribute_takes_identifier_p.
* error.c (dump_exception_spec): Print "noexcept" rather than
"noexcept (true)".
Core 1591
* pt.c (unify_array_domain): Split out from unify.
(unify): Use it for list deduction, too.
PR c++/57850
* decl2.c (dump_tu): Split out from...
(cp_write_global_declarations): ...here. Call it in PCH mode.
2013-10-16 Paolo Carlini <paolo.carlini@oracle.com>
* pt.c (tsubst): Fix typo in last commit.
2013-10-16 Paulo Matos <pmatos@broadcom.com>
* error.c (code_to_string): Use new wrapper get_tree_code_name.
* cxx-pretty-print.c (pp_cxx_assignment_operator): Likewise.
* pt.c (tsubst): Likewise.
* semantics.c (cxx_eval_constant_expression,
potential_constant_expression_1): Likewise.
* mangle.c (MANGLE_TRACE_TREE, dump_substitution_candidates,
add_substitution, find_substitution): Likewise.
2013-10-15 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58707
* parser.c (cp_parser_postfix_open_square_expression): Set
parser->greater_than_is_operator_p for the argument.
2013-10-11 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58633
* parser.c (cp_parser_commit_to_topmost_tentative_parse): New.
(cp_parser_pseudo_destructor_name): Use it.
2013-10-11 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/31671
* pt.c (convert_nontype_argument): Set expr_type to
TREE_TYPE (probe_type).
2013-10-11 Jakub Jelinek <jakub@redhat.com>
* decl.c (duplicate_decls): Error out for redeclaration of UDRs.
(declare_simd_adjust_this): New function.
(grokfndecl): If "omp declare simd" attribute is present,
call declare_simd_adjust_this if needed and
c_omp_declare_simd_clauses_to_numbers.
* cp-array-notation.c (expand_array_notation_exprs): Handle
OMP_TASKGROUP.
* cp-gimplify.c (cp_gimplify_expr): Handle OMP_SIMD and
OMP_DISTRIBUTE. Handle is_invisiref_parm decls in
OMP_CLAUSE_REDUCTION.
(cp_genericize_r): Handle OMP_SIMD and OMP_DISTRIBUTE like
OMP_FOR.
(cxx_omp_privatize_by_reference): Return true for
is_invisiref_parm decls.
(cxx_omp_finish_clause): Adjust cxx_omp_create_clause_info
caller.
* pt.c (apply_late_template_attributes): For "omp declare simd"
attribute call tsubst_omp_clauses,
c_omp_declare_simd_clauses_to_decls, finish_omp_clauses
and c_omp_declare_simd_clauses_to_numbers.
(instantiate_class_template_1): Call cp_check_omp_declare_reduction
for UDRs.
(tsubst_decl): Handle UDRs.
(tsubst_omp_clauses): Add declare_simd argument, if true don't
call finish_omp_clauses. Handle new OpenMP 4.0 clauses.
Handle non-NULL OMP_CLAUSE_REDUCTION_PLACEHOLDER on
OMP_CLAUSE_REDUCTION.
(tsubst_expr): For UDRs call pushdecl and
cp_check_omp_declare_reduction. Adjust tsubst_omp_clauses
callers. Handle OMP_SIMD, OMP_DISTRIBUTE, OMP_TEAMS,
OMP_TARGET_DATA, OMP_TARGET_UPDATE, OMP_TARGET, OMP_TASKGROUP.
Adjust finish_omp_atomic caller.
(tsubst_omp_udr): New function.
(instantiate_decl): For UDRs at block scope, don't call
start_preparsed_function/finish_function. Call tsubst_omp_udr.
* semantics.c (cxx_omp_create_clause_info): Add need_dtor argument,
use it instead of need_default_ctor || need_copy_ctor.
(struct cp_check_omp_declare_reduction_data): New type.
(handle_omp_array_sections_1, handle_omp_array_sections,
omp_reduction_id, omp_reduction_lookup,
cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction_r,
cp_check_omp_declare_reduction, clone_omp_udr,
find_omp_placeholder_r, finish_omp_reduction_clause): New functions.
(finish_omp_clauses): Handle new OpenMP 4.0 clauses and user defined
reductions.
(finish_omp_for): Add CODE argument, use it instead of hardcoded
OMP_FOR. Adjust c_finish_omp_for caller.
(finish_omp_atomic): Add seq_cst argument, adjust
c_finish_omp_atomic callers, handle seq_cst and new OpenMP 4.0
atomic variants.
(finish_omp_cancel, finish_omp_cancellation_point): New functions.
* decl2.c (mark_used): Force immediate instantiation of
DECL_OMP_DECLARE_REDUCTION_P decls.
(is_late_template_attribute): Return true for "omp declare simd"
attribute.
(cp_omp_mappable_type): New function.
(cplus_decl_attributes): Add implicit "omp declare target" attribute
if requested.
* parser.c (cp_debug_parser): Print
parser->colon_doesnt_start_class_def_p.
(cp_ensure_no_omp_declare_simd, cp_finalize_omp_declare_simd): New
functions.
(enum pragma_context): Add pragma_member and pragma_objc_icode.
(cp_parser_binary_expression): Handle no_toplevel_fold_p
even for binary operations other than comparison.
(cp_parser_linkage_specification): Call
cp_ensure_no_omp_declare_simd if needed.
(cp_parser_namespace_definition): Likewise.
(cp_parser_init_declarator): Call cp_finalize_omp_declare_simd.
(cp_parser_direct_declarator): Pass declarator to
cp_parser_late_return_type_opt.
(cp_parser_late_return_type_opt): Add declarator argument,
call cp_parser_late_parsing_omp_declare_simd for declare simd.
(cp_parser_class_specifier_1): Call cp_ensure_no_omp_declare_simd.
Parse UDRs before all other methods.
(cp_parser_member_specification_opt): Use pragma_member instead of
pragma_external.
(cp_parser_member_declaration): Call cp_finalize_omp_declare_simd.
(cp_parser_function_definition_from_specifiers_and_declarator,
cp_parser_save_member_function_body): Likewise.
(cp_parser_late_parsing_for_member): Handle UDRs specially.
(cp_parser_next_token_starts_class_definition_p): Don't allow
CPP_COLON if colon_doesnt_start_class_def_p flag is true.
(cp_parser_objc_interstitial_code): Use pragma_objc_icode
instead of pragma_external.
(cp_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
(cp_parser_omp_var_list_no_open): Parse array sections for
OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses. Add COLON argument,
if non-NULL, allow parsing to end with a colon rather than close
paren.
(cp_parser_omp_var_list): Adjust cp_parser_omp_var_list_no_open
caller.
(cp_parser_omp_clause_reduction): Handle user defined reductions.
(cp_parser_omp_clause_branch, cp_parser_omp_clause_cancelkind,
cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
cp_parser_omp_clause_aligned, cp_parser_omp_clause_linear,
cp_parser_omp_clause_safelen, cp_parser_omp_clause_simdlen,
cp_parser_omp_clause_depend, cp_parser_omp_clause_map,
cp_parser_omp_clause_device, cp_parser_omp_clause_dist_schedule,
cp_parser_omp_clause_proc_bind, cp_parser_omp_clause_to,
cp_parser_omp_clause_from, cp_parser_omp_clause_uniform): New
functions.
(cp_parser_omp_all_clauses): Add finish_p argument. Don't call
finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
(cp_parser_omp_atomic): Parse seq_cst clause, pass
true if it is present to finish_omp_atomic. Handle new OpenMP 4.0
atomic forms.
(cp_parser_omp_for_loop): Add CODE argument, pass it through
to finish_omp_for. Change last argument to cclauses,
and adjust uses to grab parallel clauses from the array of all
the split clauses.
(cp_omp_split_clauses): New function.
(cp_parser_omp_simd): New function.
(cp_parser_omp_for): Add p_name, mask and cclauses arguments.
Allow the function to be called also when parsing combined constructs,
and call c_parser_omp_simd when parsing for simd.
(cp_parser_omp_sections_scope): If section-sequence doesn't start with
#pragma omp section, require exactly one structured-block instead of
sequence of statements.
(cp_parser_omp_sections): Add p_name, mask and cclauses arguments.
Allow the function to be called also when parsing combined constructs.
(cp_parser_omp_parallel): Add p_name, mask and cclauses arguments.
Allow the function to be called also when parsing combined
constructs.
(cp_parser_omp_taskgroup, cp_parser_omp_cancel,
cp_parser_omp_cancellation_point, cp_parser_omp_distribute,
cp_parser_omp_teams, cp_parser_omp_target_data,
cp_parser_omp_target_update, cp_parser_omp_target,
cp_parser_omp_declare_simd, cp_parser_late_parsing_omp_declare_simd,
cp_parser_omp_declare_target, cp_parser_omp_end_declare_target,
cp_parser_omp_declare_reduction_exprs, cp_parser_omp_declare_reduction,
cp_parser_omp_declare): New functions.
(cp_parser_omp_construct): Add p_name and mask vars. Handle
PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
PRAGMA_OMP_TEAMS. Adjust cp_parser_omp_for, cp_parser_omp_parallel
and cp_parser_omp_sections callers.
(cp_parser_pragma): Handle PRAGMA_OMP_CANCEL,
PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
PRAGMA_OMP_TEAMS, PRAGMA_OMP_TARGET, PRAGMA_OMP_END_DECLARE_TARGET.
Handle pragma_member and pragma_objc_icode like pragma_external.
(OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
(OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
(OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
OMP_CLAUSE_DEPEND.
(OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
* parser.h (struct cp_omp_declare_simd_data): New type.
(struct cp_parser): Add colon_doesnt_start_class_def_p and
omp_declare_simd fields.
* cp-objcp-common.h (LANG_HOOKS_OMP_MAPPABLE_TYPE): Define.
* cp-tree.h (struct lang_decl_fn): Add omp_declare_reduction_p
bit.
(DECL_OMP_DECLARE_REDUCTION_P): Define.
(OMP_FOR_GIMPLIFYING_P): Use OMP_LOOP_CHECK macro.
(struct saved_scope): Add omp_declare_target_attribute field.
(cp_omp_mappable_type, omp_reduction_id,
cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction,
finish_omp_cancel, finish_omp_cancellation_point): New prototypes.
(finish_omp_for): Add CODE argument.
(finish_omp_atomic): Add seq_cst argument.
(cxx_omp_create_clause_info): Add need_dtor argument.
2013-10-09 Marek Polacek <polacek@redhat.com>
PR c++/58635
* semantics.c (finish_return_stmt): Return error_mark_node
when error_operand_p of the expr is true.
(build_transaction_expr): Check for EXPR_P before setting the
expr location.
2013-10-08 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58568
* lambda.c (begin_lambda_type): Check return value of xref_tag
for error_mark_node; tidy.
* decl.c (grokdeclarator): Tweak error message.
2013-10-08 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58665
Revert:
2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58448
* pt.c (tsubst): Use error_operand_p on parameter t.
2013-10-06 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58126
* class.c (check_bases): Propagate CLASSTYPE_READONLY_FIELDS_NEED_INIT
and CLASSTYPE_REF_FIELDS_NEED_INIT from bases to derived.
* init.c (diagnose_uninitialized_cst_or_ref_member_1): Extend error
messages about uninitialized const and references members to mention
the base class.
2013-10-06 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/56060
* pt.c (type_dependent_expression_p): Handle EXPR_PACK_EXPANSION.
2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58560
* typeck2.c (build_functional_cast): Use error_operand_p on exp.
2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58503
* parser.c (cp_parser_perform_range_for_lookup): If eventually
either *begin or *end is type-dependent, return NULL_TREE.
(do_range_for_auto_deduction): If cp_parser_perform_range_for_lookup
returns NULL_TREE, don't actually do_auto_deduction.
2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58448
* pt.c (tsubst): Use error_operand_p on parameter t.
2013-10-04 Marc Glisse <marc.glisse@inria.fr>
PR c++/19476
* decl.c (cxx_init_decl_processing): Set operator_new_flag.
2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58584
* decl2.c (save_template_attributes): Handle error_mark_node as
*attr_p argument.
(cp_check_const_attributes): Likewise for attributes.
* parser.c (cp_parser_std_attribute_spec): When alignas_expr is an
error_mark_node call cp_parser_skip_to_end_of_statement.
2013-10-03 Easwaran Raman <eraman@google.com>
PR c++/33911
* parser.c (cp_parser_init_declarator): Do not drop attributes
of template member functions.
2013-10-03 Marek Polacek <polacek@redhat.com>
PR c++/58510
* init.c (sort_mem_initializers): Splice when giving an error.
2013-10-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58535
* parser.c (cp_parser_function_specifier_opt): Upon error about
virtual templates don't set ds_virtual.
(finish_fully_implicit_template): Reject virtual implicit templates.
2013-10-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58565
* semantics.c (potential_constant_expression_1): Handle LABEL_EXPR.
2013-10-01 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58563
* parser.c (cp_parser_lookup_name): Check make_typename_type return
value for error_mark_node.
2013-09-25 Tom Tromey <tromey@redhat.com>
* Make-lang.in (CXX_TREE_H, CXX_PARSER_H, CXX_PRETTY_PRINT_H):
Remove.
2013-09-25 Tom Tromey <tromey@redhat.com>
* Make-lang.in (g++spec.o): Remove.
(CFLAGS-cp/g++spec.o): New variable.
(GXX_OBJS): Reference cp/g++spec.o.
(cc1plus-checksum.o, cp/lex.o, cp/cp-array-notation.o)
(cp/cp-lang.o, cp/decl.o, cp/decl2.o, cp/cp-objcp-common.o)
(cp/typeck2.o, cp/typeck.o, cp/class.o, cp/call.o)
(cp/friend.o, cp/init.o, cp/method.o, cp/cvt.o, cp/search.o)
(cp/tree.o, cp/ptree.o, cp/rtti.o, cp/except.o, cp/expr.o)
(cp/pt.o, cp/error.o, cp/repo.o, cp/semantics.o, cp/dump.o)
(cp/optimize.o, cp/mangle.o, cp/parser.o, cp/cp-gimplify.o)
(cp/name-lookup.o, cp/cxx-pretty-print.o): Remove.
2013-09-25 Tom Tromey <tromey@redhat.com>
* Make-lang.in (g++spec.o): Don't use subshell.
2013-09-25 Marek Polacek <polacek@redhat.com>
PR c++/58516
* semantics.c (finish_transaction_stmt): Check for EXPR_P before
setting the expr location.
2013-09-23 Adam Butcher <adam@jessamine.co.uk>
PR c++/58500
* type-utils.h (find_type_usage): Only traverse one type level into
member function pointers.
2013-09-23 Adam Butcher <adam@jessamine.co.uk>
* parser.c (cp_parser_init_declarator): Defer calling
finish_fully_implicit_template for forward declarations until after
other decl processing is complete. Cleanup for clarity: Extract 'else'
case after 'if' containing unconditional return.
2013-09-23 Adam Butcher <adam@jessamine.co.uk>
* parser.c (make_generic_type_name): Spell generic type names '<autoN>'
rather than '__GenN'.
2013-09-23 Adam Butcher <adam@jessamine.co.uk>
* lambda.c (maybe_add_lambda_conv_op): Don't check for instantiated
callop in the case of generic lambdas.
2013-09-23 Adam Butcher <adam@jessamine.co.uk>
* parser.c (make_generic_type_name): Use global count rather than
parameter and ...
(add_implicit_template_parms): ... propagate interface change here.
2013-09-20 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58481
* pt.c (tsubst_copy): Use current_nonlambda_class_type to
call tsubst_baselink.
2013-09-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58457
* class.c (instantiate_type): Loosen a bit the gcc_assert.
2013-09-18 Marek Polacek <polacek@redhat.com>
PR sanitize/58443
* typeck.c (cp_build_binary_op): Properly honor -fsanitize options.
Remove unnecessary check.
2013-09-18 Marek Polacek <polacek@redhat.com>
PR sanitizer/58411
* typeck.c (cp_build_binary_op): Don't sanitize function if it has the
no_sanitize_undefined attribute.
2013-09-17 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58435
* pt.c (tsubst, [BOUND_TEMPLATE_TEMPLATE_PARM]): Take into account
the cp_type_quals (r) too.
2013-09-16 Adam Butcher <adam@jessamine.co.uk>
* cp-tree.h (type_uses_auto_or_concept): Declare.
(is_auto_or_concept): Declare.
* decl.c (grokdeclarator): Allow 'auto' parameters in lambdas with
-std=gnu++1y or -std=c++1y or, as a GNU extension, in plain functions.
* type-utils.h: New header defining ...
(find_type_usage): ... this new function based on pt.c (type_uses_auto)
for searching a type tree given a predicate.
* pt.c (type_uses_auto): Reimplement via type-utils.h (find_type_usage).
(is_auto_or_concept): New function.
(type_uses_auto_or_concept): New function.
* parser.h (struct cp_parser): Add fully_implicit_function_template_p.
* parser.c (cp_parser_new): Initialize
fully_implicit_function_template_p.
(cp_parser_new): Initialize fully_implicit_function_template_p.
(cp_parser_lambda_expression): Copy and restore value of
fully_implicit_function_template_p as per other parser fields.
(cp_parser_parameter_declaration_list): Count generic
parameters and call ...
(add_implicit_template_parms): ... this new function to synthesize them
with help from type-utils.h (find_type_usage), ...
(tree_type_is_auto_or_concept): ... this new static function and ...
(make_generic_type_name): ... this new static function.
(cp_parser_direct_declarator): Account for implicit template parameters.
(cp_parser_lambda_declarator_opt): Finish fully implicit template if
necessary by calling ...
(finish_fully_implicit_template): ... this new function.
(cp_parser_init_declarator): Likewise.
(cp_parser_function_definition_after_declarator): Likewise.
(cp_parser_member_declaration): Likewise.
* Make-lang.in (cp/pt.o): Add dependency on type-utils.h.
(cp/parser.o): Likewise.
2013-09-16 Adam Butcher <adam@jessamine.co.uk>
* parser.c (cp_parser_lambda_declarator_opt): Accept template parameter
list with std=c++1y or std=gnu++1y.
(cp_parser_lambda_body): Don't call 'expand_or_defer_fn' for lambda call
operator template to avoid adding template result to symbol table.
* lambda.c (lambda_function): Return template result if call operator is
a template.
(maybe_add_lambda_conv_op): Move declarations to point of use. Refactor
operator call building in order to support conversion of a non-capturing
lambda template to a function pointer with help from ...
(prepare_op_call): ... this new function.
* decl2.c (check_member_template): Don't reject lambda call operator
template in local [lambda] class.
* pt.c (instantiate_class_template_1): Don't instantiate lambda call
operator template when instantiating lambda class.
2013-09-16 Adam Butcher <adam@jessamine.co.uk>
* pt.c (make_auto_1): Use input_location rather than BUILTINS_LOCATION.
2013-09-15 Jason Merrill <jason@redhat.com>
Core DR 904
PR c++/41933
* parser.c (cp_parser_lambda_introducer): Handle variadic capture.
* lambda.c (add_capture): Handle variadic capture.
(add_default_capture, lambda_capture_field_type): Likewise.
(build_capture_proxy, register_capture_members): Likewise.
* pt.c (register_specialization): Allow FIELD_DECL.
(retrieve_specialization): Likewise.
(find_parameter_packs_r): Handle FIELD_DECL and VAR_DECL.
(tsubst_pack_expansion): Handle FIELD_DECL packs.
(gen_elem_of_pack_expansion_instantiation): Likewise.
(instantiate_class_template_1): Likewise.
(tsubst_decl, tsubst_copy): Likewise.
(tsubst_expr) [DECL_EXPR]: Handle capture proxy packs.
(tsubst_copy_and_build) [VAR_DECL]: Likewise.
* semantics.c (finish_non_static_data_member): Don't try to represent
the type of a COMPOUND_REF of a FIELD_DECL pack.
PR c++/41933
* cp-tree.h (DECL_PACK_P): Replace FUNCTION_PARAMETER_PACK_P.
* cxx-pretty-print.c (direct_declarator): Adjust.
* decl2.c (cp_build_parm_decl): Adjust.
* pt.c (function_parameter_pack_p): Adjust.
(find_parameter_packs_r, push_template_decl_real): Adjust.
(tsubst_pack_expansion, tsubst_decl): Adjust.
(regenerate_decl_from_template, instantiate_decl): Adjust.
* lambda.c (add_capture): Don't add DECL_LANG_SPECIFIC.
2013-09-13 Jason Merrill <jason@redhat.com>
PR c++/58273
* pt.c (any_type_dependent_elements_p): Actually check for
type-dependence, not value-dependence.
2013-09-13 Jacek Caban <jacek@codeweavers.com>
* decl.c: Use new cxx_implicit_extern_c hook
2013-09-12 Brooks Moses <bmoses@google.com>
PR driver/42955
* Make-lang.in: Do not install driver binaries in $(target)/bin.
2013-09-12 Adam Butcher <adam@jessamine.co.uk>
* pt.c (instantiate_decl): Save/restore cp_unevaluated_operand and
c_inhibit_evaluation_warnings. Reset if instantiating within a
function-local template.
2013-09-12 Paolo Carlini <paolo.carlini@oracle.com>
* semantics.c (finish_pseudo_destructor_expr): Add location_t
parameter.
* pt.c (unify_arg_conversion): Use EXPR_LOC_OR_HERE.
(tsubst_copy_and_build): Adjust finish_pseudo_destructor_expr
calls.
* parser.c (cp_parser_postfix_dot_deref_expression): Likewise.
(cp_parser_postfix_expression): Pass the proper location to
cp_parser_postfix_dot_deref_expression.
* cp-tree.h (finish_pseudo_destructor_expr): Update declaration.
2013-09-10 Jan Hubicka <jh@suse.cz>
Paolo Carlini <paolo.carlini@oracle.com>
* error.c (print_instantiation_partial_context_line): If
loc == UNKNOWN_LOCATION return immediately.
2013-09-09 Jakub Jelinek <jakub@redhat.com>
PR c++/58325
* init.c (build_vec_delete): Call mark_rvalue_use on base.
2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/43452
* init.c (build_vec_delete_1): When the type is incomplete emit a
warning, enabled by default (not an error).
(build_delete): Adjust to use OPT_Wdelete_incomplete.
2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58362
* error.c (location_of): Don't handle PARM_DECLs specially.
2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
* error.c (dump_expr, [PSEUDO_DTOR_EXPR]): Fix.
* cxx-pretty-print.c (cxx_pretty_printer::postfix_expression):
Tweak, TREE_OPERAND (t, 1) may be null.
2013-09-08 Caroline Tice <cmtice@google.com>
PR c++/58300
* vtable-class-hierarchy.c (vtv_generate_init_routine): In
preinit case, move call to assemble_vtv_preinit_initializer to
after call to cgraph_process_new_functions.
2013-09-08 Tom de Vries <tom@codesourcery.com>
PR c++/58282
* except.c (build_must_not_throw_expr): Handle
flag_exceptions.
2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
* typeck.c (cp_build_binary_op): Use vector_types_compatible_elements_p.
2013-09-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/24926
* class.c (finish_struct_anon_r): New.
(finish_struct_anon): Use it.
2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cxx-pretty-print.h (cxx_pretty_printer::simple_type_specifier):
Declare as overrider.
* cxx-pretty-print.c (cxx_pretty_printer::simple_type_specifier):
Rename from pp_cxx_simple_type_specifier.
(cxx_pretty_printer::cxx_pretty_printer): Do not assign to
simple_type_specifier.
2013-09-03 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58305
* typeck2.c (build_functional_cast): Maybe warn_deprecated_use.
2013-09-03 Mike Stump <mikestump@comcast.net>
* Make-lang.in (cp/lambda.o): Add dependencies.
2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cxx-pretty-print.h (cxx_pretty_printer::type_id): Declare as
overrider.
* cxx-pretty-print.c (pp_cxx_storage_class_specifier): Remove.
(pp_cxx_userdef_literal): Tidy.
(pp_cxx_template_argument_list): Likewise.
(pp_cxx_typeid_expression): Likewise.
(pp_cxx_offsetof_expression_1): Likewise.
(cxx_pretty_printer::postfix_expression): Likewise.
(cxx_pretty_printer::unary_expression): Likewise.
(cxx_pretty_printer::statement): Likewise.
(cxx_pretty_printer::type_id): Rename from pp_cxx_type_id.
(c_pretty_printer::cxx_pretty_printer): Do not assign to type_id.
* error.c (dump_decl): Tidy.
(dump_expr): Likewise.
2013-09-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/21682, implement DR 565
* name-lookup.c (compparms_for_decl_and_using_decl): New.
(push_overloaded_decl_1, do_nonmember_using_decl): Use it.
2013-08-30 Marek Polacek <polacek@redhat.com>
* typeck.c (cp_build_binary_op): Add division by zero and shift
instrumentation.
* error.c (dump_expr): Special-case ubsan builtins.
2013-08-30 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51424
* cp-tree.h (LOOKUP_DELEGATING_CONS): Add.
* init.c (perform_target_ctor): Use it.
* call.c (build_special_member_call): Diagnose self-delegating
constructors.
2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cxx-pretty-print.h (cxx_pretty_printer::declaration): Declare as
overrider.
(cxx_pretty_printer::declaration_specifiers): Likewise.
(cxx_pretty_printer::function_specifier): Likewise.
(cxx_pretty_printer::declarator): Likewise.
(cxx_pretty_printer::direct_declarator): Likewise.
(cxx_pretty_printer::abstract_declarator): Likewise.
(cxx_pretty_printer::direct_abstract_declarator): Likewise.
(pp_cxx_declaration): Remove.
* cxx-pretty-print.c (cxx_pretty_printer::function_specifier):
Rename from pp_cxx_function_specifier. Adjust.
(cxx_pretty_printer::declaration_specifiers): Rename from
pp_cxx_decl_specifier_seq. Adjust.
(cxx_pretty_printer::direct_declarator): Rename from
pp_cxx_direct_declarator. Adjust.
(cxx_pretty_printer::declarator): Rename from pp_cxx_declarator.
Adjust.
(cxx_pretty_printer::abstract_declarator): Rename from
pp_cxx_abstract_declarator. Adjust.
(cxx_pretty_printer::direct_abstract_declarator): Rename from
pp_cxx_direct_abstract_declarator. Adjust.
(cxx_pretty_printer::declaration): Rename from
pp_cxx_declaration. Adjust.
(cxx_pretty_printer::cxx_pretty_printer): Do not assign to
declaration, declaration_specifiers, function_specifier,
declarator, direct_declarator, abstract_declarator,
direct_abstract_declarator.
* error.c (dump_decl): Adjust.
2013-08-29 Jan Hubicka <jh@suse.cz>
Correct previous patch to not mark terminate as LEAF.
* class.c (build_vtbl_initializer): Drop LEAF
* decl.c (cxx_init_decl_processing): Likewise.
(push_throw_library_fn): Likewise.
* except.c (init_exception_processing): Likewise.
(do_begin_catch): Likewise.
(do_end_catch): Likewise.
(do_allocate_exception): Likewise.
2013-08-29 Jan Hubicka <jh@suse.cz>
* class.c (build_vtbl_initializer): Make __cxa_deleted_virtual
ECF_NORETURN | ECF_LEAF
* cp-tree.h (build_library_fn_ptr, build_cp_library_fn_ptr,
push_library_fn, push_void_library_fn): Update prototype.
* decl.c (build_library_fn_1): Remove.
(push_cp_library_fn, build_cp_library_fn): Update to take ECF flags.
(cxx_init_decl_processing): Update; global_delete_fndecl is ECF_NOTROW;
__cxa_pure_virtual is ECF_NORETURN | ECF_NORETURN | ECF_LEAF.
(build_library_fn_1): Add ecf_flags argument; rename to ...
(build_library_fn): ... this one.
(build_cp_library_fn): Take ecf_flags; do not copy NOTHROW flag.
(build_library_fn_ptr): Take ecf_flags.
(build_cp_library_fn_ptr): Likewise.
(push_library_fn): Likewise.
(push_cp_library_fn): Likewise.
(push_void_library_fn): Likewise.
(push_throw_library_fn): All throws are ECF_NORETURN.
(__cxa_atexit, __cxa_thread_atexit): Add ECF_LEAF | ECF_NOTHROW attributes.
(expand_static_init): __cxa_guard_acquire, __cxa_guard_release,
__cxa_guard_abort are ECF_NOTHROW | ECF_LEAF.
* except.c (init_exception_processing): terminate is
ECF_NOTHROW | ECF_NORETURN | ECF_LEAF.
(declare_nothrow_library_fn): Add ecf_flags parameter.
(__cxa_get_exception_ptr): Is ECF_NOTHROW | ECF_PURE | ECF_LEAF |
ECF_TM_PURE.
(do_begin_catch): cxa_begin_catch and _ITM_cxa_begin_catch
are ECF_NOTHROW | ECF_LEAF.
(do_end_catch): __cxa_end_catch and _ITM_cxa_end_catch is
ECF_LEAF.
(do_allocate_exception): _cxa_allocate_exception
and _ITM_cxa_allocate_exception are ECF_NOTHROW | ECF_MALLOC
| ECF_LEAF
(do_free_exception): __cxa_free_exception is
ECF_NOTHROW | ECF_LEAF.
* rtti.c (build_dynamic_cast_1): __dynamic_cast
is ECF_LEAF | ECF_PURE | ECF_NOTHROW.
2013-08-29 Adam Butcher <adam@jessamine.co.uk>
* error.c (dump_lambda_function): New function, dependent on ...
(dump_substitution): ... this new function, factored out of ...
(subst_to_string): ... here and ...
(dump_function_decl): ... here. Updated to early-out with call to
dump_lambda_function after determining template bindings.
2013-08-28 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58255
* init.c (build_aggr_init): When init == void_type_node do not
set LOOKUP_ONLYCONVERTING.
2013-08-27 Caroline Tice <cmtice@google.com>
* vtable-class-hierarchy.c: Remove unnecessary include statements.
(MAX_SET_SIZE): Remove unnecessary constant.
(register_construction_vtables): Make vtable_ptr_array parameter
into a vector; remove num_args parameter. Change array accesses to
vector accesses.
(register_other_binfo_vtables): Ditto.
(insert_call_to_register_set): Ditto.
(insert_call_to_register_pair): Ditto.
(output_set_info): Ditto. Also change warning calls to warning_at
calls, and fix format of warning messages.
(register_all_pairs): Change vtbl_ptr_array from an array into a
vector. Remove num_vtable_args (replace with calls to vector length).
Change array stores & accesses to vector functions. Change calls to
register_construction_vtables, register_other_binfo_vtables,
insert_call_to_register_set, insert_call_to_register_pair and
output_set_info to match their new signatures. Change warning to
warning_at and fix the format of the warning message.
2013-08-27 Jakub Jelinek <jakub@redhat.com>
Aldy Hernandez <aldyh@redhat.com>
* cp-tree.h (CP_OMP_CLAUSE_INFO): Adjust range for new clauses.
2013-08-27 Paolo Carlini <paolo.carlini@oracle.com>
* decl.c (grokfndecl): Remove old bison hack.
2013-08-26 Jan Hubicka <jh@suse.cz>
* cp-tree.h (DECL_CONSTRUCTOR_P, DECL_DESTRUCTOR_P): Use
middle-end flag.
2013-08-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cxx-pretty-print.h (cxx_pretty_printer::unary_expression):
Declare as overrider.
(cxx_pretty_printer::multiplicative_expression): Likewise.
(cxx_pretty_printer::conditional_expression): Likewise.
(cxx_pretty_printer::assignment_expression): Likewise.
(cxx_pretty_printer::expression): Likewise.
* cxx-pretty-print.c (cxx_pretty_printer::unary_expression):
Rename from pp_cxx_unary_expression. Adjust.
(cxx_pretty_printer::multiplicative_expression): Rename from
pp_cxx_multiplicative_expression. Adjust.
(cxx_pretty_printer::conditional_expression): Rename from
pp_cxx_conditional_expression. Adjust.
(cxx_pretty_printer::assignment_expression): Rename from
pp_cxx_assignment_expression. Adjust.
(cxx_pretty_printer::expression): Rename from pp_cxx_expression.
Adjust.
(cxx_pretty_printer::cxx_pretty_printer): Dot not assign to
unary_expression, multiplicative_expression,
conditional_expression, assignment_expression, expression.
2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cxx-pretty-print.h (cxx_pretty_printer::postfix_expression):
Declare as overrider.
* cxx-pretty-print.c (cxx_pretty_printer::postfix_expression):
Rename from pp_cxx_postfix_expression. Adjust.
(pp_cxx_expression): Use pp_postfix_expression.
(cxx_pretty_printer::cxx_pretty_printer): Do not assign to
postfix_expression.
2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cxx-pretty-print.h (cxx_pretty_printer::primary_expression): Now
an overrider of c_pretty_printer::primary_expression.
* cxx-pretty-print.c (cxx_pretty_printer::primary_expression):
Rename from pp_cxx_primary_expression. Adjust.
(pp_cxx_postfix_expression): Use pp_primary_expression.
(pp_cxx_ctor_initializer): Likewise.
(cxx_pretty_printer::cxx_pretty_printer): Do not assign to
primary_expression.
2013-08-23 Jan Hubicka <jh@suse.cz>
* cp-tree.h (struct lang_type_class): Free is_final bit.
(CLASSTYPE_FINAL): Define using TYPE_FINAL_P.
(DECL_FINAL_P): Remove.
* pt.c (instantiate_class_template_1): Guard that CLASSTYPE_FINAL
is called on CLASS_TYPE_P.
2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cxx-pretty-print.c (M_): Remove.
(pp_cxx_unqualified_id): Use translate_string instead of M_.
(pp_cxx_canonical_template_parameter): Likewise.
2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cxx-pretty-print.h (cxx_pretty_printer::id_expression): Declare.
* cxx-pretty-print.c (cxx_pretty_printer::id_expression): Rename
from pp_cxx_id_expression. Adjust.
(pp_cxx_userdef_literal): Use pp_id_expression.
(pp_cxx_primary_expression): Likewise.
(pp_cxx_direct_declarator): Likewise.
(cxx_pretty_printer::cxx_pretty_printer): Do not assign to
id_expression.
2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cxx-pretty-print.h (cxx_pretty_printer::constant): Now a member
function, overriding c_pretty_printer::constant.
* cxx-pretty-print.c (cxx_pretty_printer::constant): Rename from
pp_cxx_constant. Adjust.
(cxx_pretty_printer::cxx_pretty_printer): Do not assign to constant.
2013-08-23 Gabriel Dos Reis <gdr@integrable-solutiobs.net>
* cp-objcp-common.c (cxx_initialize_diagnostics): Call a
destructor for the early printer.
* error.c (type_to_string): Use pp_buffer.
2013-08-22 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/56380
* class.c (check_field_decls): Check for const mutable and const
reference data members.
2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
* error.c (init_error): Remove calls to pp_construct and
pp_cxx_pretty_printer_init. Initialize cxx_pp with placement-new.
* cxx-pretty-print.h (cxx_pretty_printer::cxx_pretty_printer): Declare.
(cxx_pretty_printer_init): Remove.
* cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer):
Rename from cxx_pretty_printer_init. Adjust.
* cp-objcp-common.c (cxx_initialize_diagnostics): Simplify
initialization of C++ diagnostics pretty printer.
2013-08-21 Paolo Carlini <paolo.carlini@oracle.com>
* call.c (build_new_method_call_1): Use INDIRECT_REF_P.
* cp-tree.h (REFERENCE_REF_P): Likewise.
* semantics.c (finish_offsetof): Likewise.
2013-08-21 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/56130
* semantics.c (finish_id_expression): Handle deprecated references.
2013-08-20 Jason Merrill <jason@redhat.com>
PR c++/58119
* cvt.c (build_expr_type_conversion): Don't complain about a
template that can't match the desired type category.
2013-08-20 Gabriel Dos Reis <gdr@integrable-solutions.net>
* error.c (pp_ggc_formatted_text): New.
(type_as_string): Use it in lieu of pp_formatted_text.
(type_as_string_translate): Likewise.
(expr_as_string): Likewise.
(decl_as_string): Likewise.
(decl_as_string_translate): Likewise.
(lang_decl_name): Likewise.
(decl_to_string): Likewise.
(expr_to_string): Likewise.
(fndecl_to_string): Likewise.
(parm_to_string): Likewise.
(type_to_string): Likewise.
(args_to_string): Likewise.
(subst_to_string): Likewise.
2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
PR c/57490
* cp-array-notation.c (cp_expand_cond_array_notations): Added a
check for truth values.
(expand_array_notation_exprs): Added truth values case. Removed an
unwanted else. Added for-loop to walk through subtrees in default
case.
* call.c (build_cxx_call): Inherited the type of the array notation for
certain built-in array notation functions.
2013-08-19 Paolo Carlini <paolo.carlini@oracle.com>
* parser.c (cp_parser_lambda_introducer, cp_parser_decltype_expr):
Use cp_parser_lookup_name_simple.
2013-08-19 Paolo Carlini <paolo.carlini@oracle.com>
* name-lookup.h (pop_bindings_and_leave_scope): Declare.
* name-lookup.c (pop_bindings_and_leave_scope): Define.
* parser.c (cp_parser_lambda_declarator_opt,
cp_parser_direct_declarator, cp_parser_cache_defarg): Use it.
2013-08-17 Jason Merrill <jason@redhat.com>
PR c++/58083
* name-lookup.c (push_class_level_binding_1): It's OK to push a
lambda type after the enclosing type is complete.
2013-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
* error.c (dump_scope): Add a cxx_pretty_printer parameter.
Adjust callers.
(dump_template_argument): Likewise.
(dump_template_argument_list): Likewise.
(dump_template_parameter): Likewise.
(dump_template_bindings): Likewise.
(dump_alias_template_specialization): Likewise.
(dump_type): Likewise.
(dump_typename): Likewise.
(dump_aggr_type): Likewise.
(dump_type_prefix): Likewise.
(dump_type_suffix): Likewise.
(dump_global_iord): Likewise.
(dump_simple_decl): Likewise.
(dump_decl): Likewise.
(dump_template_decl): Likewise.
(dump_function_decl): Likewise.
(dump_parameters): Likewise.
(dump_ref_qualifier): Likewise.
(dump_exception_spec): Likewise.
(dump_function_name): Likewise.
(dump_template_parms): Likewise.
(dump_call_expr_args): Likewise.
(dump_aggr_init_expr_args): Likewise.
(dump_expr_list): Likewise.
(dump_expr_init_vec): Likewise.
(dump_expr): Likewise.
(dump_binary_op): Likewise.
(dump_unary_op): Likewise.
2013-08-14 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51912
* cp-tree.h (LOOKUP_NO_NON_INTEGRAL): Add.
* decl.c (case_conversion): Use it.
* call.c (standard_conversion): Likewise.
(implicit_conversion): Adjust.
2013-08-13 Adam Butcher <adam@jessamine.co.uk>
* pt.c: Grammar fix in comments ("it's" to "its").
2013-08-12 Paolo Carlini <paolo.carlini@oracle.com>
* decl.c (warn_extern_redeclared_static, duplicate_decls,
check_elaborated_type_specifier): Use error + inform.
* friend.c (make_friend_class): Likewise.
* semantics.c (finish_id_expression): Likewise.
2013-08-09 Paolo Carlini <paolo.carlini@oracle.com>
Revert:
2013-08-07 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/46206
* name-lookup.c (lookup_name_real_1): Handle iter->type before
iter->value.
2013-08-07 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/46206
* name-lookup.c (lookup_name_real_1): Handle iter->type before
iter->value.
2013-08-06 Caroline Tice <cmtice@google.com>
* Make-lang.in (*CXX_AND_OBJCXX_OBJS): Add vtable-class-hierarchy.o to
list.
(vtable-class-hierarchy.o): Add build rule.
* cp-tree.h (vtv_start_verification_constructor_init_function): New
extern function decl.
(vtv_finish_verification_constructor_init_function): New extern
function decl.
(build_vtbl_address): New extern function decl.
(get_mangled_vtable_map_var_name): New extern function decl.
(vtv_compute_class_hierarchy_transitive_closure): New extern function
decl.
(vtv_generate_init_routine): New extern function decl.
(vtv_save_class_info): New extern function decl.
(vtv_recover_class_info): New extern function decl.
(vtv_build_vtable_verify_fndecl): New extern function decl.
* class.c (finish_struct_1): Add call to vtv_save_class_info if
flag_vtable_verify is true.
* config-lang.in: Add vtable-class-hierarchy.c to gtfiles list.
* vtable-class-hierarchy.c: New file.
* mangle.c (get_mangled_vtable_map_var_name): New function.
* decl2.c (start_objects): Update function comment.
(cp_write_global_declarations): Call vtv_recover_class_info,
vtv_compute_class_hierarchy_transitive_closure and
vtv_build_vtable_verify_fndecl, before calling
finalize_compilation_unit, and call vtv_generate_init_rount after, IFF
flag_vtable_verify is true.
(vtv_start_verification_constructor_init_function): New function.
(vtv_finish_verification_constructor_init_function): New function.
* init.c (build_vtbl_address): Remove static qualifier from function.
2013-08-06 Jason Merrill <jason@redhat.com>
PR c++/57825
* tree.c (strip_typedefs) [METHOD_TYPE]: Preserve ref-qualifier.
2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58080
* typeck.c (cp_pointer_int_sum): Add tsubst_flags_t parameter.
(cp_build_binary_op): Adjust.
2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cxx-pretty-print.h (pp_c_base): Remove.
(cxx_pretty_printer): Derive from c_pretty_printer.
Adjust macros using pp_c_base.
* cp-objcp-common.c (cxx_initialize_diagnostics): Do not call pp_base.
* cxx-pretty-print.c (pp_cxx_nonconsecutive_character): Likewise.
(pp_cxx_colon_colon): Likewise.
(pp_cxx_separate_with): Likewise.
(pp_cxx_storage_class_specifier): Do not call pp_c_base.
(pp_cxx_expression_list): Likewise.
(pp_cxx_space_for_pointer_operator): Likewise.
(pp_cxx_init_declarator): Likewise.
(pp_cxx_call_argument_list): Likewise.
(pp_cxx_constant): Likewise.
(pp_cxx_postfix_expression): Likewise.
(pp_cxx_new_expression): Likewise.
(pp_cxx_unary_expression): Likewise.
(pp_cxx_cast_expression): Likewise.
(pp_cxx_conditional_expression): Likewise.
(pp_cxx_assignment_expression): Likewise.
(pp_cxx_expression): Likewise.
(pp_cxx_function_specifier): Likewise.
(pp_cxx_decl_specifier_seq): Likewise.
(pp_cxx_simple_type_specifier): Likewise.
(pp_cxx_type_specifier_seq): Likewise.
(pp_cxx_ptr_operator): Likewise.
(pp_cxx_parameter_declaration_clause): Likewise.
(pp_cxx_direct_declarator): Likewise.
(pp_cxx_direct_abstract_declarator): Likewise.
(pp_cxx_type_id): Likewise.
(pp_cxx_statement): Likewise.
(pp_cxx_pretty_printer_init): Tidy.
* error.c (init_error): Do not use pp_base.
(dump_aggr_type): Likewise.
(dump_type_prefix): Likewise.
(dump_type_suffix): Likewise.
(dump_global_iord): Likewise.
(dump_decl): Likewise.
(dump_function_decl): Likewise.
(dump_ref_qualifier): Likewise.
(reinit_cxx_pp): Likewise.
(decl_as_dwarf_string): Likewise.
(lang_decl_dwarf_name): Likewise.
(type_to_string): Likewise.
(cv_to_string): Likewise.
(cxx_print_error_function): Likewise.
(cp_diagnostic_starter): Likewise.
(cp_diagnostic_finalizer): Likewise.
(cp_print_error_function): Likewise.
(print_instantiation_context): Likewise.
(cp_printer): Likewise.
2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
* error.c (dump_type_prefix): Use specialized pretty printer
functions instead of pp_string or operators and punctuators.
(dump_decl): Likewise.
(dump_expr): Likewise.
2013-08-03 Jason Merrill <jason@redhat.com>
DR 1286
* pt.c (get_underlying_template): New.
(convert_template_argument, lookup_template_class_1): Use it.
DR 1430
PR c++/51239
* pt.c (pack_expansion_args_count): Rename from
any_pack_expanson_args_p.
(coerce_template_parms): Reject pack expansion to
non-pack template parameter of alias template.
2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
* error.c (dump_aggr_type): Use specialized pretty printer
functions instead of pp_character.
(dump_type_prefix): Likewise.
(dump_simple_decl): Likewise.
(type_to_string): Likewise.
2013-08-02 Paolo Carlini <paolo.carlini@oracle.com>
* cp-tree.h (finish_stmt): Do not declare.
* decl.c (finish_stmt): Do not define.
* parser.c (cp_parser_expression_statement,
cp_parser_declaration_statement,
cp_parser_transaction_cancel): Don't call finish_stmt.
* semantics.c (finish_expr_stmt, finish_if_stmt,
finish_while_stmt, finish_do_stmt, finish_return_stmt,
finish_for_stmt, finish_switch_stmt, finish_compound_stmt,
finish_transaction_stmt): Likewise.
2013-08-01 Fabien Chêne <fabien@gcc.gnu.org>
PR c++/54537
* cp-tree.h: Check OVL_USED with OVERLOAD_CHECK.
* name-lookup.c (do_nonmember_using_decl): Make sure we have an
OVERLOAD before calling OVL_USED. Call diagnose_name_conflict
instead of issuing an error without mentioning the conflicting
declaration.
2013-07-31 Paolo Carlini <paolo.carlini@oracle.com>
* parser.c (cp_parser_sizeof_pack): Check cp_parser_identifier
return value for error_mark_node.
2013-07-30 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57673
* parser.c (cp_parser_cache_defarg): In an NSDMI don't stop when
token->type == CPP_ELLIPSIS.
2013-07-30 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57947
* call.c (is_std_init_list): Return false if cxx_dialect == cxx98.
2013-07-29 Jason Merrill <jason@redhat.com>
PR c++/57901
* semantics.c (build_data_member_initialization, constexpr_fn_retval):
Use break_out_target_exprs instead of unshare_expr.
2013-07-29 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57948
* call.c (initialize_reference): Don't crash when reference_binding
returns a conv with conv->kind == ck_ambig.
2013-07-29 Jason Merrill <jason@redhat.com>
* mangle.c (write_name): Check for null context.
(write_unscoped_name): Allow PARM_DECL context.
2013-07-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57981
* decl.c (check_default_argument): Take a tsubst_flags_t parameter.
(grokparms): Adjust.
* parser.c (cp_parser_late_parse_one_default_arg): Likewise.
* pt.c (tsubst_default_argument, tsubst_default_arguments): Take
a tsubst_flags_t parameter.
(tsubst_decl): Adjust.
* call.c (convert_default_arg): Likewise.
* cp-tree.h (check_default_argument, tsubst_default_argument):
Update declarations.
2013-07-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57880
* parser.c (cp_parser_operator, case CPP_WSTRING, CPP_STRING16,
CPP_STRING32, CPP_UTF8STRING, CPP_WSTRING_USERDEF,
CPP_STRING16_USERDEF, CPP_STRING32_USERDEF, CPP_UTF8STRING_USERDEF):
Fix string_len management, tidy.
2013-07-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57942
* typeck.c (ptr_reasonably_similar): Use COMPARE_STRICT if either
target type is incomplete; return a bool, not an int.
* cp-tree.h (ptr_reasonably_similar): Adjust declaration.
2013-07-22 Paolo Carlini <paolo.carlini@oracle.com>
* cp-tree.h (DERIVED_FROM_P): Pass tf_none to lookup_base, not
tf_warning_or_error.
2013-07-21 OndÅej BÃlka <neleai@seznam.cz>
* class.c: Fix typos.
* cp-array-notation.c: Likewise.
* cp-objcp-common.c: Likewise.
* decl.c: Likewise.
* init.c: Likewise.
* mangle.c: Likewise.
* parser.c: Likewise.
* pt.c: Likewise.
* semantics.c: Likewise.
2013-07-14 Adam Butcher <adam@jessamine.co.uk>
* semantics.c (build_lambda_expr),
(build_lambda_object), (begin_lambda_type), (lambda_return_type),
(lambda_function), (lambda_capture_field_type), (is_capture_proxy),
(is_normal_capture_proxy), (insert_capture_proxy),
(insert_pending_capture_proxies), (lambda_proxy_type),
(build_capture_proxy), (vla_capture_type),
(register_capture_members), (add_default_capture),
(lambda_expr_this_capture), (maybe_resolve_dummy),
(nonlambda_method_basetype), (maybe_add_lambda_conv_op) and
(is_lambda_ignored_entity): Moved definitions into ...
* lambda.c: ... this new file.
2013-07-14 Marc Glisse <marc.glisse@inria.fr>
* call.c (build_conditional_expr_1): Handle the case with 1 vector
and 2 scalars. Call save_expr before building a vector.
* typeck.c (cp_build_binary_op): Check complain before complaining.
2013-07-13 Lubos Lunak <l.lunak@suse.cz>
PR c++/55203
* init.c (build_aggr_init): Check for warn_unused attribute.
* decl.c (poplevel): Likewise.
2013-07-13 Jason Merrill <jason@redhat.com>
PR c++/57402
* init.c (build_vec_init): Use {} for arrays of class type.
(build_vec_delete): Don't take the address of the array.
PR c++/57793
* class.c (layout_class_type): Check for too-large class.
* call.c (can_convert): Allow user-defined conversions.
(can_convert_standard): New.
* cp-tree.h: Declare it.
* cvt.c (convert_to_reference): Use it.
* pt.c (convert_nontype_argument): Likewise.
* search.c (check_final_overrider): Likewise.
Don't worry about user-defined conversions.
2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57869
* typeck.c (build_reinterpret_cast_1): With -Wconditionally-supported
warn about casting between pointer-to-function and pointer-to-object.
2013-07-09 Jason Merrill <jason@redhat.com>
PR c++/57402
* init.c (build_vec_init): Don't take shortcuts when initializing
a VLA.
PR c++/57471
* parser.c (cp_parser_sizeof_pack): Clear parser scopes.
PR c++/57658
* semantics.c (finish_id_expression): Return the id for an
unevaluated outer variable.
PR c++/57526
* semantics.c (lambda_capture_field_type): Build a DECLTYPE_TYPE
if the variable type uses 'auto'.
PR c++/57437
* typeck.c (check_return_expr): Lambda proxies aren't eligible
for nrv or return by move.
PR c++/57532
* parser.c (cp_parser_ref_qualifier_opt): Don't tentatively parse
a ref-qualifier in C++98 mode.
PR c++/57545
* pt.c (convert_nontype_argument) [INTEGER_CST]: Force the
argument to have the exact type of the parameter.
PR c++/57551
* semantics.c (cxx_eval_indirect_ref): Don't try to look through
a POINTER_PLUS_EXPR for type punning diagnostic.
PR c++/57831
* pt.c (tsubst_copy): Handle USING_DECL.
2013-07-09 Marc Glisse <marc.glisse@inria.fr>
PR c++/53094
* semantics.c (cxx_eval_bit_field_ref): Handle VECTOR_CST.
2013-07-09 Marc Glisse <marc.glisse@inria.fr>
PR c++/53000
* call.c (build_conditional_expr_1): Preserve xvalues.
2013-07-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51786
* parser.c (cp_parser_simple_declaration): Before calling shadow_tag
also check declares_class_or_enum.
2013-07-08 Jason Merrill <jason@redhat.com>
PR c++/57550
* pt.c (fn_type_unification): Only defer during substitution.
(type_unification_real): Defer during defarg substitution,
add checks parm to pass back deferred checks.
(unify, do_auto_deduction): Adjust.
* semantics.c (reopen_deferring_access_checks): New.
* cp-tree.h: Declare it.
2013-07-06 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/28262
* parser.c (cp_parser_init_declarator): If we are parsing a typedef
set parser->default_arg_ok_p to false before cp_parser_declarator.
2013-07-05 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/14263
* class.c (build_base_path): Improve diagnostic.
2013-07-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/38634
* decl.c (start_preparsed_function): Return a bool, false if
push_template_decl fails.
(start_function): Adjust.
* cp-tree.h: Update.
2013-07-03 Jakub Jelinek <jakub@redhat.com>
PR c++/57771
* parser.c (cp_parser_postfix_expression) <case RID_STATCAST>
Temporarily set parser->greater_than_is_operator_p for
cp_parser_expression and restore from saved value afterwards.
2013-06-28 Ed Smith-Rowland <3dw4rd@verizon.net>
* cp-tree.h (UDLIT_OP_ANSI_PREFIX): Remove space.
* parser.c (cp_parser_operator()): Parse user-defined string
literal as literal operator.
2013-06-28 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57645
* class.c (deduce_noexcept_on_destructors): Save, set, and restore
TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t) around the main loop over the
destructors.
2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
* parser.c (cp_parser_array_notation): Removed rejection array notation
of type function pointers. Added handling of array expressions when
Cilk Plus is enabled. Took out type-checking.
(cp_parser_postfix_open_square_expression): Moved normal array expr.
parsing into cp_parser_array_notation when cilkplus is enabled.
(cp_parser_compound_statement): Removed expansion of array notations.
(cp_parser_ctor_initializer_opt_and_function_body): Likewise.
(cp_parser_function_definition_after_declarator): Likewise.
(cp_parser_selection_statement): Removed error reporting.
(cp_parser_iteration_statement): Likewise.
(cp_parser_direct_declarator): Removed error checking/reporting if
array notations are used in the declarator.
* pt.c (instantiate_decl): Likewise.
(type_unification_real): Removed a check for ARRAY_NOTATION_REF.
(cxx_eval_constant_expression): Removed ARRAY_NOTATION_REF case.
(potential_constant_expression_1): Returned false for
ARRAY_NOTATION_REF case.
* cp-gimplify.c (cp_genericize): Added expansion of array notation
expressions here.
* cp-array-notation.c (make_triplet_val_inv): Removed loc and cry
parameters. Replaced build_decls with get_temp_regvar with type as
ptrdiff.
(create_array_refs): Made the type-casting to ptrdiff_type.
(replace_invariant_var): Added a check for void return type before
creating new var. Replaced build_decl and build_min_nt_loc with
get_temp_regvar.
(expand_an_in_modify_expr): Ditto. Replaced body of redundant else
with gcc_unreachable. Removed few unwanted checks. Made induction
variable type as ptrdiff_type. Removed loc and complain arguments
passed into make_triplet_val_inv. Replaced all modify expression's
code from NOP EXPR to INIT EXPR. Replaced all forceful appending
into stmt. list with the non-forceful one. Replaced some integer
conversion and equality-checking to using tree_int_cst_equal.
(expand_sec_reduce_builtin): All changes mentioned in above function
expand_an_in_modify_expr. Made the new variable type of
SEC_REDUCE_ANY/ALL_{NON}ZERO intrinsic functions as bool.
(expand_array_notation_exprs): Removed SWITCH_EXPR case. Moved all
the error reporting from parser to this function. Removed unwanted
statements and checks from SWITCH_STMT, WHILE_STMT, and DO_STMT cases.
(cilkplus_an_triplet_types_ok_p): Removed rejection of array notation
in function pointers.
(cp_expand_cond_array_notations): Added a new if statements to check
if condition has a zero rank. If so, then just return.
(expand_return_expr): Added a check for return expressions with a rank.
Replaced get_tmp_regvar with a create_temporary_var.
(build_array_notation_ref): Simplified and removed unwanted if-stmts.
Moved common code outside if-statements. Moved type-checking from
parser to here.
* semantics.c (finish_return_stmt): Removed a check for return exprs.
with a rank.
* call.c (convert_like_real): Removed a check for array notation
expression in a function.
(build_over_call): Likewise.
(magic_varargs_p): Added a check for builtin array notation function.
Made this function non-static and removed its prototype.
* cp-tree.h (magic_varargs_p): New prototype.
* typeck.c (cp_build_function_call_vec): Removed automatic setting of
nargs to the param->length when builtin reduction function is used.
(convert_arguments): Replaced check for a constant_p function with
margic_varargs_p function call.
(cp_build_binary_op): Removed calling of the function
find_correct_array_notation_type.
(cp_build_addr_expr_1): Removed an unwanted if-statement.
(convert_for_assignment): Removed automatic return of rhs when array
notation builtin function is used.
2013-06-28 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57682
* parser.c (cp_parser_save_member_function_body): Handle correctly
curly braces in function-try-block mem-initializers.
2013-06-27 Marc Glisse <marc.glisse@inria.fr>
PR c++/57509
* typeck.c (cp_build_vec_perm_expr): New function.
* cp-tree.h: Declare it.
* parser.c (cp_parser_postfix_expression): Call it.
* pt.c (tsubst_copy): Handle VEC_PERM_EXPR.
(tsubst_copy_and_build): Likewise.
2013-06-27 Marc Glisse <marc.glisse@inria.fr>
PR c++/57172
* pt.c (more_specialized_fn): If both arguments are references,
give priority to an lvalue.
2013-06-26 Jason Merrill <jason@redhat.com>
* typeck2.c (store_init_value): Diagnose a non-constant
initializer for in-class static.
PR c++/57408
* semantics.c (add_capture): Set type to error_mark_node after
error.
2013-06-25 Ed Smith-Rowland <3dw4rd@verizon.net>
PR c++/57640
* parser.c (cp_parser_unqualified_id): Add declarator_p to checks
to trigger warning, (cp_literal_operator_id): Remove bogus TODO comment.
2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
* call.c (null_ptr_cst_p): Use cxx11 in lieu of cxx0x.
* class.c (add_implicitly_declared_members): Likewise.
(check_field_decl): Likewise.
(finalize_literal_type_property): Likewise.
(check_bases_and_members): Likewise.
* decl.c (poplevel): Likewise.
(case_conversion): Likewise.
(check_initializer): Likewise.
(grokfndecl): Likewise.
(check_static_variable_definition): Likewise.
(compute_array_index_type): Likewise.
(grokdeclarator): Likewise.
(build_enumerator): Likewise.
* friend.c (make_friend_class): Likewise.
* lex.c (init_reswords): Likewise.
* method.c (synthesized_method_walk): Likewise.
(implicitly_declare_fn): Likewise.
* parser.c (cp_parser_diagnose_invalid_type_name): Likewise.
(cp_parser_constant_expression): Likewise.
(cp_parser_for_init_statement): Likewise.
(cp_parser_block_declaration): Likewise.
(cp_parser_type_name): Likewise.
(cp_parser_enum_specifier): Likewise.
(cp_parser_enumerator_list): Likewise.
(cp_parser_member_declaration): Likewise.
(cp_nth_tokens_can_be_std_attribute_p): Likewise.
(cp_parser_template_declaration_after_export): Likewise.
* pt.c (convert_nontype_argument_function): Likewise.
(convert_nontype_argument): Likewise.
(convert_template_argument): Likewise.
(tsubst_copy_and_build): Likewise.
(build_non_dependent_expr): Likewise.
* semantics.c (non_const_var_error): Likewise.
(potential_constant_expression_1): Likewise.
* tree.c (lvalue_kind): Likewise.
(build_vec_init_expr): Likewise.
(cast_valid_in_integral_constant_expression_p): Likewise.
* typeck.c (build_x_conditional_expr): Likewise.
* typeck2.c (check_narrowing): Likewise.
2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cp-array-notation.c (cp_length_mismatch_in_expr_p): Remove.
(expand_an_in_modify_expr): Changed a function call from the above
removed function to length_mismatch_in_expr_p.
2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
* call.c (convert_like_real): Added a check if array notation is present
in expression. If so, then no conversion of arguments is necessary.
(build_over_call): Likewise.
* typeck.c (cp_build_function_call_vec): Likewise.
(convert_for_assignment): Likewise.
(cp_build_array_ref): Reject array notations with a rank greater than 1
as an array's index.
(cp_build_binary_op): If array notations are preent in op, then call
find_correct_array_notation_type.
(cp_build_addr_expr_1): Handle ARRAY_NOTATION_REF similar to ARRAY_REF.
* cp-array-notation.c: New file.
* cp-objcp-common.c (cp_common_init_ts): Marked ARRAY_NOTATION_REF tree
as typed.
* cp-tree.h (fix_array_notation_exprs): New prototype.
* semantics.c (finish_return_stmt): Reject array notations as
return value.
(cxx_eval_constant_expression): Added ARRAY_NOTATION_REF case.
(potential_constant_expression_1): Likewise.
* tree.c (lvalue_kind): Likewise.
* error.c (dump_decl): Likewise.
(dump_expr): Likewise.
* pt.c (ARRAY_NOTATION_REF): Likewise.
(type_unification_real): Do not unify any arguments if array notations
are found in arg.
(instantiate_decl): Added a check for array notaitons inside the
function body. If so, then expand them.
* parser.c (cp_parser_array_notation): New function.
(cp_parser_postfix_open_square_expression): Added a check for colons
inside square braces. If found, then handle the array access as an
array notation access. Also, disable auto-correction from a single
colon to scope when Cilk Plus is enabled.
(cp_parser_compound_statement): Added a check for array notations
inside the statement. If found, then expand them.
(cp_parser_ctor_initializer_opt_and_function_body): Likewise.
(cp_parser_function_definition_after_declarator): Likewise.
(cp_parser_selection_statement): Searched for array notations inside
condition. If so, then emit an error.
(cp_parser_iteration_statement): Likewise.
(cp_parser_direct_declarator): Reject array notations inside a
variable or array declaration.
* Make-lang.in (CXX_AND_OBJCXX_OBJS): Added cp/cp-array-notation.o.
2013-06-20 Jason Merrill <jason@redhat.com>
PR c++/55149
* decl.c (compute_array_index_type): Don't reject VLAs in SFINAE
context if we're in C++14 mode.
* tree.c (array_of_runtime_bound_p): Return true for a dependent
bound that is not potentually constant.
* cp-tree.h (DECL_VLA_CAPTURE_P, REFERENCE_VLA_OK): New.
* pt.c (tsubst) [REFERENCE_TYPE]: Check REFERENCE_VLA_OK.
* semantics.c (build_lambda_object): Don't rvalue a VLA capture.
(build_capture_proxy): Set REFERENCE_VLA_OK.
(vla_capture_type): Make it a proper C++ class.
(add_capture): Set DECL_VLA_CAPTURE_P. Don't pre-digest the
initializer.
* decl.c (compute_array_index_type): Use size_one_node.
* pt.c (process_partial_specialization): Build a TEMPLATE_DECL for
a partial specialization.
(tsubst_decl): Don't clobber CLASSTYPE_TI_TEMPLATE of a partial
specialization.
(most_specialized_class): Adjust.
* cp-tree.h (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT)
(DECL_TEMPLATE_INSTANTIATIONS, DECL_TEMPLATE_SPECIALIZATIONS): Use
TEMPLATE_DECL_CHECK.
2013-06-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c++/57638
* pt.c (unify, [TEMPLATE_PARM_INDEX]): Pass to unify_type_mismatch
TREE_TYPE (arg), not arg itself.
2013-06-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53211
* pt.c (type_dependent_expression_p): Handle an array of unknown
bound depending on a variadic parameter.
* parser.c (cp_parser_range_for): Revert PR56794 changes.
2013-06-17 Richard Biener <rguenther@suse.de>
* cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h.
2013-06-17 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/16128
* parser.c (cp_parser_expression_statement): Check whether
cp_parser_expression returns error_mark_node.
2013-06-14 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51413
* semantics.c (finish_offsetof): Handle INDIRECT_REF as expr.
2013-06-14 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57599
* rtti.c (build_dynamic_cast_1): In case of cast to an unambiguous
accessible base simply forward to build_static_cast.
2013-06-12 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/38958
* decl.c (poplevel): For the benefit of -Wunused-variable see
through references.
2013-06-12 Paolo Carlini <paolo.carlini@oracle.com>
* parser.c (cp_parser_nested_name_specifier_opt): Fix typo in comment.
2013-06-12 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/42021
* parser.c (cp_parser_nested_name_specifier_opt): Avoid emitting
again diagnostic already emitted by cp_parser_lookup_name.
2013-06-11 Jan Hubicka <jh@suse.cz>
PR c++/57551
* cp/pt.c (mark_decl_instantiated): Do not export explicit
instantiations of anonymous namespace templates.
2013-06-10 Jason Merrill <jason@redhat.com>
* name-lookup.c (add_decl_to_level): Add decls in an anonymous
namespace to static_decls.
2013-06-07 Sriraman Tallam <tmsriram@google.com>
PR c++/57548
* call.c (build_over_call): Check if current_function_decl is
NULL.
2013-06-07 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53658
* pt.c (lookup_template_class_1): Consistently use TYPE_MAIN_DECL,
not TYPE_STUB_DECL, to access the _DECL for a _TYPE.
2013-06-06 Jason Merrill <jason@redhat.com>
PR c++/55520
* semantics.c (add_capture): Diagnose capture of variable-size
type that is not a C++1y array of runtime bound.
* decl.c (grokdeclarator): Keep a decl with error type.
(grokfield, grokbitfield): Likewise.
* pt.c (instantiate_class_template_1): Likewise.
(tsubst_decl): Drop redundant error.
* class.c (walk_subobject_offsets): Handle erroneous fields.
* typeck2.c (process_init_constructor_record): Likewise.
2013-06-05 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51908
* parser.c (cp_parser_postfix_expression [RID_*CAST]): Set
parser->in_type_id_in_expr_p before calling cp_parser_type_id.
2013-06-03 Jan Hubicka <jh@suse.cz>
* decl2.c (maybe_make_one_only): Use forced_by_abi instead of
mark_decl_referenced.
(mark_needed): Likewise.
2013-06-03 Jason Merrill <jason@redhat.com>
* class.c (mark_type_abi_tags): New.
(check_abi_tags): Use it.
2013-06-03 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57419
* decl2.c (mark_used): Add overload taking a tsubst_flags_t too.
* semantics.c (finish_qualified_id_expr): Use it.
* cp-tree.h: Update.
2013-06-01 Jan Hubicka <jh@suse.cz>
* decl2.c (cp_write_global_declarations): Replace same_body_alias
by symbol.cpp_implicit_alias.
2013-05-30 Jason Merrill <jason@redhat.com>
PR c++/57404
* cp-lang.c (cp_classify_record): Handle structs without
TYPE_LANG_SPECIFIC.
PR c++/52377
* class.c (common_enclosing_class): New.
* cp-tree.h: Declare it.
* init.c (sort_mem_initializers): Don't splice out a union member
with an NSDMI.
2013-05-29 Jan Hubicka <jh@suse.cz>
* tree.c (cp_fix_function_decl_p): Update for new symtab flags.
* decl2.c )var_finalized_p, cp_write_global_declarations): Likewise.
2013-05-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/25666
* decl2.c (check_classfn): Check for destructors declared as member
templates.
2013-05-24 Jason Merrill <jason@redhat.com>
PR c++/56971
* pt.c (any_template_arguments_need_structural_equality_p): A
TEMPLATE_TEMPLATE_PARM can require structural type comparison.
2013-05-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/19618
* class.c (check_bitfield_decl): Warn for bool and enum bitfields
with width exceeding the type.
2013-05-24 Jason Merrill <jason@redhat.com>
PR c++/57391
* semantics.c (cxx_eval_constant_expression): Handle FMA_EXPR.
(cxx_eval_trinary_expression): Rename from cxx_eval_vec_perm_expr.
2013-05-23 Jason Merrill <jason@redhat.com>
PR c++/57388
* tree.c (build_ref_qualified_type): Clear
FUNCTION_RVALUE_QUALIFIED for lvalue ref-qualifier.
2013-05-22 Jason Merrill <jason@redhat.com>
PR c++/56930
* call.c (convert_like_real): Use cp_convert_and_check.
* cvt.c (cp_convert_and_check): Use maybe_constant_value.
* semantics.c (cxx_eval_constant_expression): Handle LTGT_EXPR.
(potential_constant_expression_1): Handle OMP_ATOMIC*.
PR c++/56915
* semantics.c (maybe_add_lambda_conv_op): Give up if the call op
isn't defined.
2013-05-22 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57352
* parser.c (cp_parser_conversion_type_id): Set up
parser->type_definition_forbidden_message before calling
cp_parser_type_specifier_seq.
2013-05-22 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57211
* method.c (defaultable_fn_check): Avoid do_warn_unused_parameter
warnings about defaulted functions.
2013-05-21 Paolo Carlini <paolo.carlini@oracle.com>
* call.c (build_conditional_expr_1): Add location_t parameter.
(build_conditional_expr): Likewise.
* typeck.c (rationalize_conditional_expr, cp_build_array_ref,
get_member_function_from_ptrfunc, build_x_conditional_expr,
cp_build_modify_expr): Update.
* init.c (build_new_1): Likewise.
* cp-tree.h: Update declaration.
2013-05-20 Jason Merrill <jason@redhat.com>
PR c++/57016
* pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Only check type2
if there is one.
PR c++/57102
* decl.c (fndecl_declared_return_type): Also look in
DECL_SAVED_FUNCTION_DATA.
2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/12288
* parser.c (cp_parser_parameter_declaration): Check return value
of cp_parser_parse_and_diagnose_invalid_type_name.
2013-05-20 Jason Merrill <jason@redhat.com>
PR c++/57319
* class.c (vbase_has_user_provided_move_assign): New.
* method.c (synthesized_method_walk): Check it.
* cp-tree.h: Declare it.
PR c++/57325
* tree.c (build_cplus_array_type): Copy layout info if element
type is complete.
2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/23608
* call.c (build_new_op_1): Propagate loc to cp_build_binary_op.
2013-05-20 Jason Merrill <jason@redhat.com>
PR c++/57317
* decl2.c (determine_visibility): Use PRIMARY_TEMPLATE_P to decide
whether a template has its own args.
2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57327
* pt.c (unify_no_common_base): Swap arg and parm arguments to inform.
2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/10207
* parser.c (cp_parser_postfix_expression): Use cp_parser_braced_list
instead of cp_parser_initializer_list for compound-literals.
2013-05-20 Marc Glisse <marc.glisse@inria.fr>
PR c++/57175
* typeck.c (check_return_expr): Reverse the alignment comparison.
2013-05-17 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/18126
* parser.c (cp_parser_sizeof_operand): As a GNU Extension, parse
correctly sizeof compound-literal; update comments.
2013-05-16 Marc Glisse <marc.glisse@inria.fr>
* call.c (build_conditional_expr_1): Use cp_build_binary_op
instead of directly calling fold_build2.
2013-05-16 Jason Merrill <jason@redhat.com>
* Make-lang.in (cc1plus$(exeext)): Use link mutex.
PR c++/57279
* decl.c (grokdeclarator): Allow member function qualifiers in
TYPENAME context in C++11 mode.
2013-05-16 Dodji Seketeli <dodji@redhat.com>
PR c++/56782 - Regression with empty pack expansions
* pt.c (use_pack_expansion_extra_args_p): When at least a
parameter pack has an empty argument pack, and another parameter
pack has no argument pack at all, use the PACK_EXPANSION_EXTRA
mechanism.
2013-05-15 Paolo Carlini <paolo.carlini@oracle.com>
* name-lookup.c (pushdecl_maybe_friend_1): Replace pairs of
warning_at and permerror with warning_at/inform and permerror/
inform, respectively.
2013-05-15 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/31952
* name-lookup.c (pushdecl_maybe_friend_1): Diagnose illegal
redeclarations.
2013-05-14 Jason Merrill <jason@redhat.com>
PR c++/57243
* parser.c (cp_parser_range_for): Call complete_type.
PR c++/57041
* pt.c (tsubst_copy_and_build): Don't recur into a designator.
2013-05-14 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53903
* method.c (defaulted_late_check): Check for compatible exception
specification out of class explicitly defaulted functions too.
2013-05-14 Jason Merrill <jason@redhat.com>
PR c++/56998
* semantics.c (potential_constant_expression_1): Make sure the
called function is potentially constant.
* call.c (null_ptr_cst_p): Revert earlier change.
2013-05-13 Jason Merrill <jason@redhat.com>
PR c++/56998
* call.c (null_ptr_cst_p): An expression with side-effects can't
be a C++03 null pointer constant.
PR c++/57041
* decl.c (reshape_init_class): Handle error_mark_node.
PR c++/57254
* typeck.c (merge_types): Propagate ref-qualifier
in METHOD_TYPE case.
PR c++/57253
* decl.c (grokdeclarator): Apply ref-qualifier
in the TYPENAME case.
PR c++/57252
* decl.c (decls_match): Compare ref-qualifiers.
2013-05-10 Jason Merrill <jason@redhat.com>
PR c++/57196
* pt.c (convert_template_argument): Use dependent_template_arg_p,
not uses_template_parms.
PR c++/57047
* semantics.c (cxx_fold_indirect_ref): Fix thinko.
PR c++/55149
* semantics.c (add_capture): Error rather than abort on copy
capture of VLA.
* typeck.c (maybe_warn_about_returning_address_of_local): Don't
warn about capture proxy.
2013-05-09 Jason Merrill <jason@redhat.com>
* decl.c (cp_finish_decl): Only check VLA bound in C++1y mode.
PR c++/57222
* pt.c (lookup_template_class_1): Handle getting a template
template parameter as D1.
N3639 C++1y VLA diagnostics
* decl.c (grokdeclarator): Complain about reference, pointer, or
typedef to VLA.
(create_array_type_for_decl): Complain about array of VLA.
* pt.c (tsubst): Likewise.
* rtti.c (get_tinfo_decl): Talk about "array of runtime bound".
* semantics.c (finish_decltype_type): Complain about decltype of VLA.
* typeck.c (cp_build_addr_expr_1): Complain about VLA.
(cxx_sizeof_or_alignof_type): Likewise.
N3639 C++1y VLA support
* decl.c (compute_array_index_type): Allow VLAs in C++1y mode.
(check_array_initializer): Allow VLA init.
(reshape_init_array_1): Adjust.
(cp_finish_decl): Check for invalid VLA length.
* typeck2.c (process_init_constructor_array): Adjust.
(store_init_value): Use build_vec_init for VLAs.
* semantics.c (add_capture): Capture VLA as ptr+len.
(vla_capture_type): New.
(build_capture_proxy): Rebuild the VLA.
* typeck.c (build_simple_component_ref): Split out from...
(build_ptrmemfunc_access_expr): ...here.
* tree.c (array_of_runtime_bound_p): New.
* init.c (throw_bad_array_length): New.
(build_vec_init): Use it.
* parser.c (cp_convert_range_for): When iterating over a VLA,
use it directly rather than bind a reference.
* cp-tree.h: Declare new functions.
2013-05-08 Jason Merrill <jason@redhat.com>
* except.c (is_admissible_throw_operand_or_catch_parameter): Check
variably_modified_type_p.
(expand_start_catch_block): Mark the typeinfo used here.
* semantics.c (finish_handler_parms): Not here.
* error.c (dump_type_suffix): Try harder on VLA length.
Core 624/N2932
* init.c (throw_bad_array_new_length): New.
(build_new_1): Use it. Don't warn about braced-init-list.
(build_vec_init): Use it.
* call.c (build_operator_new_call): Use it.
PR c++/57068
* decl.c (grokdeclarator): Warn about ref-qualifiers here.
* parser.c (cp_parser_ref_qualifier_seq_opt): Not here.
* error.c (maybe_warn_cpp0x): s/0x/11/.
2013-05-08 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51226
* parser.c (cp_parser_enum_specifier): Handle nested_name_specifier
== error_mark_node.
2013-05-06 Marc Glisse <marc.glisse@inria.fr>
* typeck.c (cp_build_binary_op): Call save_expr before
build_vector_from_val.
2013-05-06 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57183
* decl.c (cp_finish_decl): After do_auto_deduction copy the
qualifers with cp_apply_type_quals_to_decl.
2013-05-05 Paolo Carlini <paolo.carlini@oracle.com>
* pt.c (convert_nontype_argument): Add missing whitespace in
error message.
2013-05-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53745
* decl.c (build_enumerator): Improve error message.
2013-05-03 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/14283
* parser.c (cp_parser_diagnose_invalid_type_name): Improve error
messages for template types and fix column numbers.
2013-05-01 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57132
* pt.c (tsubst_copy_and_build, MODOP_EXPR): Increase / decrease
c_inhibit_evaluation_warnings around build_x_modify_expr call.
2013-05-01 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57092
* semantics.c (finish_decltype_type): Handle instantiated template
non-type arguments.
2013-04-28 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/56450
* semantics.c (finish_decltype_type): Handle COMPOUND_EXPR.
2013-04-26 Jakub Jelinek <jakub@redhat.com>
* error.c (cp_print_error_function): Adjust file_name_as_prefix
caller.
2013-04-25 Jason Merrill <jason@redhat.com>
PR c++/56859
* typeck.c (cxx_alignas_expr): Handle value-dependence properly.
PR c++/50261
* init.c (perform_member_init): Call reshape_init.
2013-04-24 Jason Merrill <jason@redhat.com>
PR c++/53721
* parser.c (cp_parser_postfix_dot_deref_expression): Fix thinko.
2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
* typeck.c (cxx_sizeof_or_alignof_type): Change -Wpointer-arith
pedwarn to simply use OPT_Wpointer_arith.
(cp_build_unary_op): Likewise.
2013-04-24 Jason Merrill <jason@redhat.com>
N3648: init-captures are named.
* semantics.c (add_capture): Don't prepend "__" to init-captures.
(build_capture_proxy): Adjust.
* error.c (dump_simple_decl): Check DECL_NORMAL_CAPTURE_P.
N3648: Allow braced and parenthesized initializers.
* parser.c (cp_parser_lambda_introducer): Use cp_parser_initializer.
* pt.c (tsubst) [DECLTYPE_TYPE]: Handle DECLTYPE_FOR_INIT_CAPTURE.
* semantics.c (lambda_capture_field_type): Use do_auto_deduction.
(add_capture): Collapse a parenthesized initializer into a single
expression.
* cp-tree.h (DECLTYPE_FOR_INIT_CAPTURE): New.
2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/56970
* init.c (build_offset_ref): Add tsubst_flags_t parameter.
* semantics.c (finish_qualified_id_expr): Likewise.
(finish_id_expression): Update.
* typeck.c (cp_build_addr_expr_1): Likewise.
* pt.c (tsubst_qualified_id, resolve_nondeduced_context): Likewise.
* cp-tree.h: Update declarations.
2013-04-22 Jason Merrill <jason@redhat.com>
Core 1586
* parser.c (cp_parser_unqualified_id): Handle ~auto.
(cp_parser_pseudo_destructor_name): Likewise.
(cp_parser_postfix_dot_deref_expression): Adjust.
(cp_lexer_nth_token_is_keyword): New.
* semantics.c (finish_pseudo_destructor_expr): Handle ~auto.
* typeck.c (lookup_destructor): Handle ~auto.
* pt.c (fn_type_unification): Push tinst level around
type_unification_real if we aren't explaining.
* cp-tree.h (TFF_NO_TEMPLATE_BINDINGS): New.
* error.c (dump_function_decl): Respect it.
(subst_to_string): Pass it.
PR c++/48665
* rtti.c (get_typeid): Diagnose qualified function type.
* pt.c (tsubst) [POINTER_TYPE]: Likewise.
* error.c (dump_aggr_type): Fix lambda detection.
(dump_simple_decl): Pretty-print capture field.
N3323
* cvt.c (build_expr_type_conversion): Two conversions that return
the same type aren't necessarily ambiguous.
N3648
* parser.c (cp_parser_lambda_introducer): Make lambda capture init
pedwarn unconditional except in C++1y mode.
* semantics.c (potential_constant_expression_1): Don't crash on
'this' in NSDMI.
Core 1612
* semantics.c (finish_id_expression): Reject capture of anonymous
union member.
Core 1609
* decl2.c (check_default_args): Check for pack expansion.
* mangle.c (write_type): Mangle decltype(auto).
2013-04-19 Jason Merrill <jason@redhat.com>
N3638 changes to return type deduction
* decl.c (undeduced_auto_decl): New.
(require_deduced_type): New.
(fndecl_declared_return_type): New.
(decls_match): Use it.
(duplicate_decls): Don't check for auto return.
(grokdeclarator): Reject virtual auto.
* class.c (resolve_address_of_overloaded_function): Handle
auto function templates.
* decl2.c (mark_used): Use undeduced_auto_decl, require_deduced_type.
* cp-tree.h: Declare new fns.
* error.c (dump_function_decl): Use fndecl_declared_return_type.
* search.c (check_final_overrider): Likewise.
* pt.c (make_decltype_auto): New.
(do_auto_deduction): Require plain decltype(auto).
(is_auto): Adjust.
DR 941
* decl.c (duplicate_decls): Don't propagate DECL_DELETED_FN to
template specializations.
2013-04-16 Ed Smith-Rowland <3dw4rd@verizon.net>
Implement n3599 - Literal operator templates for strings.
* parser.c (make_string_pack (tree value)): New function.
(cp_parser_userdef_string_literal (cp_token *)): Use it
to construct calls to character string literal operator templates.
(cp_parser_template_declaration_after_export): Check for new string
literal operator template parameter form.
2013-04-15 Jason Merrill <jason@redhat.com>
* pt.c (tsubst) [DECLTYPE_TYPE]: Use tsubst_copy_and_build.
PR c++/52748
* pt.c (tsubst) [DECLTYPE_TYPE]: If ~id is an expression
rather than a destructor name, it isn't an unqualified-name.
(tsubst_copy_and_build): Pass down decltype_flag to operator
handling code, too.
PR c++/56388
* semantics.c (insert_capture_proxy): Just use index 1 in the
stmt_list_stack.
2013-04-12 Jakub Jelinek <jakub@redhat.com>
* error.c (cp_print_error_function,
print_instantiation_partial_context_line,
maybe_print_constexpr_context): Colorize locus strings.
2013-04-11 Jason Merrill <jason@redhat.com>
PR c++/52748
* parser.c (complain_flags): New.
(cp_parser_postfix_expression): Use it.
(cp_parser_unary_expression): Likewise.
(cp_parser_binary_expression): Likewise.
(cp_parser_assignment_expression): Likewise.
(cp_parser_expression): Likewise.
(cp_parser_postfix_open_square_expression): Take decltype_p.
(cp_parser_builtin_offsetof): Adjust.
(cp_convert_range_for): Pass complain to finish_unary_op_expr.
* decl2.c (grok_array_decl): Add decltype_p parm.
* cp-tree.h: Adjust prototype.
* semantics.c (finish_unary_op_expr): Add complain parm.
2013-04-11 Jakub Jelinek <jakub@redhat.com>
PR c++/56895
* call.c (null_ptr_cst_p): Call fold_non_dependent_expr_sfinae before
calling maybe_constant_value for C++98.
2013-04-11 Jason Merrill <jason@redhat.com>
PR c++/56901
* semantics.c (lambda_capture_field_type, lambda_proxy_type):
Strip references before checking WILDCARD_TYPE_P.
2013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
* call.c (build_conditional_expr_1, build_over_call): Protect
error calls with complain & tf_error.
* typeck.c (finish_class_member_access_expr, cp_build_binary_op,
build_x_unary_op, cp_build_unary_op, cp_build_compound_expr,
build_ptrmemfunc): Likewise.
(lookup_destructor): Take tsubst_flags_t parameter, adjust.
* cvt.c (warn_ref_binding): Rename to diagnose_ref_binding.
(convert_to_reference): Adjust.
2013-04-11 Jason Merrill <jason@redhat.com>
* pt.c (tsubst_copy) [VAR_DECL]: Don't call tsubst for
local variables, look them up instead.
(tsubst_decl) [VAR_DECL]: Remove handling for anonymous union
proxies and substitution in unevaluated context.
(tsubst_expr) [OMP_FOR]: Instantiate OMP_FOR_PRE_BODY
before the iterators.
PR c++/23055
* pt.c (uses_deducible_template_parms): New.
(deducible_array_bound, deducible_expression): New.
(deducible_template_args): New.
(unify_one_argument): Call uses_deducible_template_parms.
2013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/56913
* typeck2.c (build_m_component_ref): Protect error calls with
(complain & tf_error).
2013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/54216
* parser.c (cp_parser_enum_specifier): Check for empty
anonymous enums and anonymous scoped enums.
2013-04-10 Jakub Jelinek <jakub@redhat.com>
PR c++/56895
* typeck.c (cp_build_binary_op): Call fold_non_dependent_expr_sfinae
first before calling maybe_constant_value for warn_for_div_by_zero
or invalid shift count warning purposes.
2013-04-09 Jason Merrill <jason@redhat.com>
PR c++/25466
* rtti.c (build_typeid): Check the address of the argument
rather than looking for an INDIRECT_REF.
2013-04-04 Jason Merrill <jason@redhat.com>
PR c++/56838
PR c++/17232
* typeck2.c (abstract_virtuals_error_sfinae): Disable
complete_type again.
2013-04-08 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/56871
* decl.c (validate_constexpr_redeclaration): Allow an explicit
specialization to be different wrt the constexpr specifier.
2013-04-06 Jason Merrill <jason@redhat.com>
* parser.c (cp_parser_std_attribute): Treat [[noreturn]] like GNU
noreturn attribute.
2013-04-05 Ed Smith-Rowland <3dw4rd@verizon.net>
* parser.c (cp_parser_ref_qualifier_seq_opt): Move to
cp_parser_ref_qualifier_opt. Error if more than one ref-qual found.
2013-04-03 Jason Merrill <jason@redhat.com>
* cp-tree.h (FUNCTION_OR_METHOD_TYPE_CHECK): Remove.
(TYPE_RAISES_EXCEPTIONS): Use FUNC_OR_METHOD_CHECK instead.
(FUNCTION_REF_QUALIFIED, FUNCTION_RVALUE_QUALIFIED): Likewise.
* mangle.c (write_type): When writing a function type with
function-cv-quals, don't add the unqualified type as a
substitution candidate.
2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/56815
* typeck.c (cp_build_unary_op): Change -Wpointer-arith permerror to
pedwarn.
2013-04-03 Jakub Jelinek <jakub@redhat.com>
PR debug/56819
* tree.c (strip_typedefs): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT
from args to new_args.
(strip_typedefs_expr): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT from t to
r instead of doing {S,G}ET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
2013-04-02 Jason Merrill <jason@redhat.com>
PR c++/56821
* mangle.c (write_function_type): Mangle ref-qualifier.
(write_nested_name): Likewise.
(canonicalize_for_substitution): Preserve ref-qualifier.
(write_type): Likewise.
PR c++/34949
* decl.c (begin_destructor_body): Clobber the object in a cleanup.
2013-04-02 Paolo Carlini <paolo.carlini@oracle.com>
* friend.c (do_friend): Use COMPLETE_OR_OPEN_TYPE_P.
* pt.c (find_parameter_packs_r): Use TYPE_ALIAS_P and TYPE_TI_ARGS.
(for_each_template_parm_r): Use TYPE_TI_ARGS.
2013-04-02 Paolo Carlini <paolo.carlini@oracle.com>
* cp-tree.h (TAGGED_TYPE_P): Remove.
(IS_OVERLOAD_TYPE): Rename to OVERLOAD_TYPE_P, adjust.
(TYPE_ANONYMOUS_P): Adjust.
* call.c (build_new_op_1): Likewise.
* class.c (find_abi_tags_r): Likewise.
* decl.c (warn_misplaced_attr_for_class_type, start_decl,
type_is_deprecated): Likewise.
* decl2.c (grokfield, min_vis_r): Likewise.
* pt.c (get_template_info): Likewise.
* tree.c (handle_abi_tag_attribute): Likewise.
2013-04-01 Jason Merrill <jason@redhat.com>
* semantics.c (maybe_constant_value): Check
instantiation_dependent_expression_p.
* pt.c (build_non_dependent_expr): Don't check it here.
PR c++/56772
* init.c (build_new): Don't try to process an array initializer
at template definition time.
PR c++/56793
* typeck.c (finish_class_member_access_expr): Handle enum scope.
PR c++/56794
* parser.c (cp_parser_range_for): Don't try to do auto deduction
in a template if the type of the range is incomplete.
* call.c (add_function_candidate): Take the address of 'this' here.
(build_over_call): And here.
(build_new_method_call_1, build_op_call_1): Not here.
(build_user_type_conversion_1): Or here.
(add_candidates): Adjust.
* cxx-pretty-print.h (pp_cxx_cv_qualifiers): New.
* class.c (same_signature_p): Use type_memfn_quals.
* cp-tree.h (TYPE_RAISES_EXCEPTIONS): Use
FUNCTION_OR_METHOD_TYPE_CHECK.
* error.c (dump_type_suffix): Add padding before cv-qualifiers.
* pt.c (unify): Use static_fn_type.
2013-04-01 Bronek Kozicki <b.kozicki@gmail.com>
Jason Merrill <jason@redhat.com>
Implement N2439 (ref-qualifiers for 'this')
* cp-tree.h (FUNCTION_REF_QUALIFIED): New.
(FUNCTION_RVALUE_QUALIFIED): New.
(FUNCTION_OR_METHOD_TYPE_CHECK): New.
(cpp0x_warn_str): Add CPP0X_REF_QUALIFIER.
(cp_ref_qualifier): New enum.
(cp_declarator): Add ref_qualifier.
* parser.c (cp_parser_ref_qualifier_seq_opt): New.
(cp_parser_direct_declarator): Use it.
(make_call_declarator): Adjust.
(cp_parser_lambda_declarator_opt): Adjust.
* call.c (add_function_candidate): Handle ref-qualifier overload
resolution semantics.
(standard_conversion): Adjust.
* class.c (add_method, same_signature_p): Compare ref-qualifiers.
* decl.c (grokdeclarator): Handle ref-qualifiers.
(grokfndecl): Check for invalid ref-qualifiers.
(static_fn_type, revert_static_member_fn): Adjust.
* decl2.c (build_memfn_type): Handle ref-qualifiers.
(check_classfn): Check them.
(cp_reconstruct_complex_type): Retain them.
* error.c (dump_ref_qualifier): New.
(dump_type_suffix, dump_function_decl): Use it.
(maybe_warn_cpp0x): Handle CPP0X_REF_QUALIFIER.
* pt.c (tsubst, tsubst_function_type): Instantiate ref-quals.
(unify): Retain them.
* tree.c (cp_check_qualified_type): New.
(cp_build_qualified_type_real): Keep exception spec and ref-qual.
(build_ref_qualified_type): New.
(strip_typedefs, build_exception_variant): Keep ref-qualifier.
(cp_build_type_attribute_variant): Keep ref-qualifier.
* typeck.c (merge_types): Keep ref-qualifier.
(structural_comptypes): Compare ref-qualifier.
(type_memfn_rqual): New.
(apply_memfn_quals): Take ref-qual argument.
* typeck2.c (build_m_component_ref): Check ref-qualifier.
2013-04-01 Paolo Carlini <paolo.carlini@oracle.com>
* cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): Remove.
(DECL_FUNCTION_TEMPLATE_P): Adjust.
* cxx-pretty-print.c (pp_cxx_nested_name_specifier,
pp_cxx_qualified_id): Use get_containing_scope.
* parser.c (cp_parser_class_head): Likewise.
* pt.c (push_template_decl_real): Likewise.
* decl2.c (import_export_decl): Use DECL_TEMPLOID_INSTANTIATION.
* pt.c (unify): Use CP_INTEGRAL_TYPE_P.
2013-03-31 Paolo Carlini <paolo.carlini@oracle.com>
* decl2.c (collect_candidates_for_java_method_aliases): Use
DECL_CLASS_SCOPE_P.
* name-lookup.c (pushtag_1) Use TYPE_FUNCTION_SCOPE_P.
(pushdecl_maybe_friend_1): Use DECL_DECLARES_FUNCTION_P.
* decl.c (duplicate_decls): Likewise.
* parser.c (cp_parser_template_declaration_after_export): Likewise,
also DECL_DECLARES_TYPE_P.
* pt.c (instantiate_class_template_1): Likewise.
* search.c (lookup_field_1): Use DECL_DECLARES_TYPE_P.
(lookup_field_r): Likewise.
(friend_accessible_p): Use DECL_DECLARES_FUNCTION_P.
(lookup_fnfields_slot_nolazy): Likewise.
* semantics.c (finish_member_declaration): Likewise.
* typeck.c (convert_for_initialization): Use TYPE_REFFN_P.
2013-03-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
* pt.c (template_parms_to_args): Fix typo in comment.
2013-03-29 Paolo Carlini <paolo.carlini@oracle.com>
* call.c (build_op_call_1): Use TYPE_PTRFN_P and TYPE_REFFN_P.
2013-03-29 Paolo Carlini <paolo.carlini@oracle.com>
* call.c (add_builtin_candidate): Use TYPE_PTR_P and VOID_TYPE_P.
(build_op_call_1): Likewise.
(build_over_call): Likewise.
(compare_ics): Likewise.
* class.c (build_base_path): Likewise.
(resolve_address_of_overloaded_function): Likewise.
* cp-tree.h: Likewise.
* cvt.c (cp_convert_to_pointer): Likewise.
(convert_to_reference): Likewise.
(ocp_convert): Likewise.
(convert_force): Likewise, tidy.
* cxx-pretty-print.c (pp_cxx_postfix_expression): Likewise.
(pp_cxx_ptr_operator): Likewise.
* decl.c (duplicate_decls): Likewise.
(start_decl): Likewise.
(grok_op_properties): Likewise.
(start_preparsed_function): Likewise.
(store_parm_decls): Likewise.
(finish_function): Likewise.
* decl2.c (delete_sanity): Likewise.
(acceptable_java_type): Likewise.
(grokbitfield): Likewise.
(cp_reconstruct_complex_type): Likewise.
* error.c (dump_type_prefix): Likewise.
(dump_expr): Likewise.
* except.c (push_eh_cleanup): Likewise.
(complete_ptr_ref_or_void_ptr_p): Likewise.
(can_convert_eh): Likewise.
* init.c (build_new_1): Likewise.
(build_delete): Likewise.
(build_vec_delete): Likewise.
* mangle.c (write_type): Likewise.
* parser.c (lookup_literal_operator): Likewise.
* pt.c (convert_nontype_argument_function): Likewise.
(convert_nontype_argument): Likewise.
(tsubst): Likewise.
(unify): Likewise.
(dependent_type_p_r): Likewise.
* rtti.c (build_headof): Likewise.
(build_typeid): Likewise.
(build_dynamic_cast_1): Likewise.
(target_incomplete_p): Likewise.
(typeinfo_in_lib_p): Likewise.
* semantics.c (finish_omp_for): Likewise.
(cxx_eval_call_expression): Likewise.
(maybe_resolve_dummy): Likewise.
* tree.c (build_target_expr): Likewise.
(cp_build_qualified_type_real): Likewise.
* typeck.c (composite_pointer_type_r): Likewise.
(composite_pointer_type): Likewise.
(comp_except_types): Likewise.
(cxx_sizeof_nowarn): Likewise.
(string_conv_p): Likewise.
(cp_build_array_ref): Likewise.
(cp_build_function_call_vec): Likewise, also use TYPE_PTRFN_P.
(pointer_diff): Likewise.
(cp_build_addr_expr_1): Likewise.
(cp_build_unary_op): Likewise.
(build_static_cast_1): Likewise.
(cp_build_c_cast): Likewise.
(comp_ptr_ttypes_real): Likewise.
(ptr_reasonably_similar): Likewise.
(comp_ptr_ttypes_const): Likewise.
(casts_away_constness): Likewise.
(check_literal_operator_args): Likewise.
* typeck2.c (build_x_arrow): Likewise.
(add_exception_specifier): Likewise.
2013-03-29 Jason Merrill <jason@redhat.com>
N3582
* cp-tree.h (AUTO_IS_DECLTYPE): New.
* parser.c (cp_parser_decltype): Handle decltype(auto).
(cp_parser_type_id_1): Allow auto without a late-specified
return in C++1y.
(cp_parser_primary_expression): Use the return value of
finish_parenthesized_expr.
(cp_parser_transaction_expression): Likewise.
* semantics.c (force_paren_expr): New.
(finish_parenthesized_expr): Use it.
* call.c (build_conditional_expr_1): Likewise.
* pt.c (do_auto_deduction): Handle decltype(auto).
(tsubst_copy): Handle PAREN_EXPR.
(tsubst_copy_and_build): Likewise.
* error.c (dump_expr): Handle PAREN_EXPR.
* cxx-pretty-print.c (pp_cxx_expression): Likewise.
* mangle.c (write_expression): Ignore PAREN_EXPR.
* parser.c (cp_parser_decltype_expr): Split out...
(cp_parser_decltype): ...from here.
PR c++/56774
PR c++/35722
* pt.c (unify_pack_expansion): Fix indexing.
2013-03-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
* call.c (build_java_interface_fn_ref): Likewise.
(make_temporary_var_for_ref_to_temp): Likewise.
* class.c (check_field_decls): Likewise.
(layout_class_type): Likewise.
(finish_struct_1): Likewise.
(fixed_type_or_null): Likewise.
(get_vtbl_decl_for_binfo): Likewise.
* cp-gimplify.c (omp_var_to_track): Likewise.
(cp_genericize_r): Likewise.
* cp-objcp-common.c (cxx_warn_unused_global_decl): Likewise.
* cp-tree.h (LANG_DECL_HAS_MIN): Likewise.
(DECL_DISCRIMINATOR_P): Likewise.
* decl.c (poplevel): Likewise.
(decls_match): Likewise.
(duplicate_decls): Likewise.
(decl_jump_unsafe): Likewise.
(start_decl): Likewise.
(check_for_uninitialized_const_var): Likewise.
(make_rtl_for_nonlocal_decl): Likewise.
(cp_finish_decl): Likewise.
(expand_static_init): Likewise.
(local_variable_p): Likewise.
(maybe_register_incomplete_var): Likewise.
* decl2.c (grokfield): Likewise.
(comdat_linkage): Likewise.
(determine_visibility): Likewise.
(import_export_decl): Likewise.
(prune_vars_needing_no_initialization): Likewise.
(decl_maybe_constant_var_p): Likewise.
* error.c (dump_simple_decl): Likewise.
(dump_template_decl): Likewise.
(cp_printer): Likewise.
* except.c (build_throw): Likewise.
* init.c (build_vtbl_address): Likewise.
(member_init_ok_or_else): Likewise.
(build_aggr_init): Likewise.
(expand_aggr_init_1): Likewise.
(build_offset_ref): Likewise.
(constant_value_1): Likewise.
* mangle.c (write_mangled_name): Likewise.
(write_prefix): Likewise.
* name-lookup.c (supplement_binding_1): Likewise.
(add_decl_to_level): Likewise.
(pushdecl_maybe_friend_1): Likewise.
(check_for_out_of_scope_variable): Likewise.
(validate_nonmember_using_decl): Likewise.
(lookup_name_innermost_nonclass_level_1): Likewise.
(lookup_arg_dependent_1): Likewise.
* parser.c (cp_parser_lambda_introducer): Likewise.
(cp_parser_template_argument): Likewise.
(cp_parser_single_declaration): Likewise.
* pt.c (convert_nontype_argument): Likewise.
(instantiate_class_template_1): Likewise.
(tsubst_decl): Likewise.
(tsubst_expr): Likewise.
(do_decl_instantiation): Likewise.
(do_type_instantiation): Likewise.
(regenerate_decl_from_template): Likewise.
(always_instantiate_p): Likewise.
(instantiate_decl): Likewise.
(type_dependent_expression_p): Likewise.
(build_non_dependent_expr): Likewise.
* repo.c (repo_emit_p): Likewise.
* rtti.c (build_dynamic_cast_1): Likewise.
* search.c (shared_member_p): Likewise.
* semantics.c (outer_var_p): Likewise.
(finish_id_expression): Likewise.
(finish_omp_clauses): Likewise.
(finish_decltype_type): Likewise.
(ensure_literal_type_for_constexpr_object): Likewise.
* tree.c (lvalue_kind): Likewise.
(bot_replace): Likewise.
(cp_tree_equal): Likewise.
(handle_init_priority_attribute): Likewise.
(decl_storage_duration): Likewise.
* typeck.c (cxx_sizeof_expr): Likewise.
(cxx_alignof_expr): Likewise.
(decay_conversion): Likewise.
(build_class_member_access_expr): Likewise.
(cp_build_array_ref): Likewise.
(cxx_mark_addressable): Likewise.
(maybe_warn_about_returning_address_of_local): Likewise.
(check_return_expr): Likewise.
* typeck2.c (cxx_readonly_error): Likewise.
(abstract_virtuals_error_sfinae): Likewise.
(cxx_incomplete_type_diagnostic): Likewise.
2013-03-28 Lawrence Crowl <crowl@google.com>
* Make-lang.in
(CXX_PARSER_H): Add header dependence.
* cp-tree.h
(extern debug (cp_binding_level &)): New.
(extern debug (cp_binding_level *)): New.
* name-lookup.h
(debug (cp_binding_level &)): New.
(debug (cp_binding_level *)): New.
* parser.c
(debug (cp_parser &)): New.
(debug (cp_parser *)): New.
(debug (cp_token &)): New.
(debug (cp_token *)): New.
(debug (vec<cp_token, va_gc> &)): New.
(debug (vec<cp_token, va_gc> *)): New.
* parser.c: Add header dependence.
(extern debug (cp_parser &)): New.
(extern debug (cp_parser *)): New.
(extern debug (cp_token &)): New.
(extern debug (cp_token *)): New.
(extern debug (vec<cp_token, va_gc> &)): New.
(extern debug (vec<cp_token, va_gc> *)): New.
2013-03-28 Jason Merrill <jason@redhat.com>
PR c++/17232
PR c++/52748
* typeck2.c (abstract_virtuals_error_sfinae): Don't complete
the type if tf_decltype is set.
* pt.c (fn_type_unification): Add decltype_p parm.
(get_bindings): Adjust.
* cp-tree.h: Adjust.
* class.c (resolve_address_of_overloaded_function): Adjust.
* call.c (add_template_candidate_real, print_z_candidate): Adjust.
PR c++/56679
* parser.c (cp_parser_sizeof_pack): Split out from...
(cp_parser_sizeof_operand): ...here. Require (id).
PR c++/56701
* semantics.c (finish_this_expr): 'this' is an rvalue.
* typeck.c (cp_build_indirect_ref): Handle NOP_EXPR of 'this'.
PR c++/56710
* semantics.c (finish_member_declaration): Don't push closure
members.
* name-lookup.c (pushdecl_maybe_friend_1): Use
nonlambda_method_basetype and current_nonlambda_class_type.
PR c++/56728
* semantics.c (potential_constant_expression_1) [NOP_EXPR]: Reject
conversion from integer to pointer.
(cxx_eval_constant_expression): Likewise.
(cxx_eval_indirect_ref): Use the folded operand if we still think
this might be constant.
2013-03-28 Paolo Carlini <paolo.carlini@oracle.com>
Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c++/56725
* call.c (convert_like_real): Change series of two permerrors
to permerror + inform (and likewise for two errors).
(build_new_method_call_1): Likewise.
* typeck.c (convert_for_initialization): Change additional
warning or error to inform.
2013-03-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cp-tree.h (next_aggr_init_expr_arg): Remove static specifier.
(first_aggr_init_expr): Likewise.
(more_aggr_init_expr_args_p): Likewise.
(type_of_this_parm): Likewise.
(class_of_this_parm): Likewise.
* name-lookup.h (get_global_value_if_present): Likewise.
(is_typename_at_global_scope): Likewise.
2013-03-28 Paolo Carlini <paolo.carlini@oracle.com>
* call.c (joust): Don't call inform for a permerror returning false.
* parser.c (cp_parser_check_class_key): Likewise.
* pt.c (tsubst_copy_and_build): Likewise.
2013-03-27 Jason Merrill <jason@redhat.com>
PR c++/56749
* semantics.c (finish_qualified_id_expr): Return early
for enum scope.
2013-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
* call.c (build_new_method_call_1): Use INDIRECT_REF_P.
* cvt.c (convert_to_void): Likewise.
* error.c (dump_expr): Likewise.
* mangle.c (write_expression): Likewise.
* parser.c (cp_parser_template_argument): Likewise.
* pt.c (convert_nontype_argument): Likewise.
(tsubst_copy_and_build): Likewise.
* rtti.c (build_typeid): Likewise.
* semantics.c (finish_call_expr): Likewise.
(finish_decltype_type): Likewise.
(build_data_member_initialization): Likewise.
* tree.c (is_dummy_object): Likewise.
* typeck.c (decay_conversion): Likewise.
(build_class_member_access_expr): Likewise.
(cp_build_addr_expr_1): Likewise.
(unary_complex_lvalue): Likewise.
(check_return_expr): Likewise.
* typeck2.c (cxx_readonly_error): Likewise.
2013-03-26 Jason Merrill <jason@redhat.com>
PR c++/52597
* typeck.c (invalid_nonstatic_memfn_p): Use get_first_fn. Take tree.
* semantics.c (finish_decltype_type): Check it before type_unknown_p.
* cp-tree.h: Adjust prototype.
PR c++/45282
* typeck2.c (build_m_component_ref): Handle prvalue object.
2013-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cp-gimplify.c (cp_genericize_r): Use VAR_OR_FUNCTION_DECL_P.
* decl.c (duplicate_decls): Likewise.
(cp_finish_decl): Likewise.
(check_class_member_definition_namespace): Likewise.
* decl2.c (grokfield): Likewise.
(decl_needed_p): Likewise.
(import_export_decl): Likewise.
(mark_used): Likewise.
* name-lookup.c (pushdecl_maybe_friend_1): Likewise.
* pt.c (push_access_scope): Likewise.
(instantiate_decl): Likewise.
* ptree.c (cxx_print_decl): Likewise.
* repo.c (repo_emit_p): Likewise.
* semantics.c (note_decl_for_pch): Likewise.
* tree.c (decl_linkage): Likewise.
2013-03-26 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/55951
* decl.c (check_array_designated_initializer): Handle CONST_DECL
as ce->index.
2013-03-26 Paolo Carlini <paolo.carlini@oracle.com>
* decl.c (grokfndecl): Handle separately <inline> and <constexpr>
error messages.
* decl.c (grokdeclarator): Declare typedef_p and use it everywhere.
2013-03-25 Jason Merrill <jason@redhat.com>
PR c++/56699
* semantics.c (maybe_resolve_dummy): Make sure that the enclosing
class is derived from the type of the object.
PR c++/52014
* semantics.c (lambda_expr_this_capture): Don't capture 'this' in
unevaluated context.
2013-03-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/56722
* decl.c (cp_finish_decl): Check DECL_LANG_SPECIFIC before
DECL_TEMPLATE_INSTANTIATION.
2013-03-22 Jason Merrill <jason@redhat.com>
PR c++/56684
* pt.c (instantiation_dependent_r): Check DECL_INITIAL of VAR_DECL
and CONST_DECL.
2013-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cp-tree.h (identifier_p): New.
* call.c: Throughout, call identifier_p insstead of direct
comparaison of TREE_CODE against IDENTIFIER_NODE.
* decl.c: Likewisse.
* decl2.c: Likewise.
* init.c: Likewise.
* mangle.c: Likewise.
* name-lookup.c: Likewise.
* parser.c: Likewise.
* pt.c: Likewise.
* search.c: Likewise.
* semantics.c: Likewise.
* tree.c: Likewise.
* typeck.c: Likewise.
* typeck2.c: Likewise.
2013-03-21 Jakub Jelinek <jakub@redhat.com>
PR middle-end/48087
* pt.c (convert_nontype_argument): Count werrorcount as warnings.
* call.c (build_temp): Likewise.
* method.c (synthesize_method): Likewise.
* typeck.c (convert_for_initialization): Likewise.
2013-03-21 Marc Glisse <marc.glisse@inria.fr>
* call.c (build_conditional_expr_1): Fold VEC_COND_EXPR.
2013-03-21 Richard Biener <rguenther@suse.de>
* error.c (cp_printer): Use DECL_HAS_DEBUG_EXPR_P instead of
DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2013-03-20 Jason Merrill <jason@redhat.com>
PR c++/56646
* parser.c (cp_parser_late_return_type_opt): Save and restore
current_class_ptr/ref.
PR c++/54532
* expr.c (cplus_expand_constant): Do nothing if the class is
incomplete.
* semantics.c (reduced_constant_expression_p): Allow PTRMEM_CST.
* typeck2.c (store_init_value): Use reduced_constant_expression_p.
* decl.c (maybe_register_incomplete_var): Handle PTRMEM_CST.
(complete_vars): Likewise.
* name-lookup.c (get_anonymous_namespace_name): Never use
get_file_function_name.
* pt.c (retrieve_specialization): Handle null tmpl argument.
PR c++/17232
PR c++/56642
* pt.c (tsubst_decl): Check return value of register_specialization.
* typeck2.c (abstract_virtuals_error_sfinae): Re-apply complete_type
change.
2013-03-17 Jason Merrill <jason@redhat.com>
PR c++/54359
PR c++/56639
* parser.c (cp_parser_direct_declarator): Bail if we see a
qualified-id not at namespace scope.
PR c++/17232
PR c++/56642
* typeck2.c (abstract_virtuals_error_sfinae): Revert complete_type
change for now.
2013-03-16 Jason Merrill <jason@redhat.com>
* decl.c (grokdeclarator): Assert that we won't see a pointer to
METHOD_TYPE.
PR c++/54277
* cp-tree.h (WILDCARD_TYPE_P): Split out from...
(MAYBE_CLASS_TYPE_P): ...here.
* semantics.c (lambda_capture_field_type): Only build a
magic decltype for wildcard types.
(lambda_proxy_type): Likewise.
(finish_non_static_data_member): Get the quals from
the object.
PR c++/55931
* parser.c (cp_parser_template_argument): Don't
fold_non_dependent_expr.
* parser.c (cp_parser_lambda_declarator_opt): Use
cp_parser_trailing_type_id.
PR c++/45917
* parser.c (cp_parser_template_id): Don't forget access checks.
PR c++/52374
* pt.c (tsubst_qualified_id): Use current_nonlambda_class_type.
PR c++/54764
PR c++/55972
* name-lookup.h (tag_scope): Add ts_lambda.
* semantics.c (begin_lambda_type): Use it.
* decl.c (xref_tag_1): Set CLASSTYPE_LAMBDA_EXPR.
* pt.c (check_default_tmpl_args): Ignore lambdas.
(push_template_decl_real): Handle lambdas.
* tree.c (no_linkage_check): Adjust lambda check.
PR c++/56039
* tree.c (strip_typedefs_expr): Complain about lambda, don't abort.
PR c++/54359
* parser.c (cp_parser_direct_declarator): Fix late return
for out-of-class defn of member function.
PR c++/55357
* semantics.c (maybe_add_lambda_conv_op): Clear DECL_NAME of copied
parms to avoid duplicate -Wshadow warnings.
* search.c (lookup_base): Handle NULL_TREE.
PR c++/56481
* semantics.c (potential_constant_expression_1): Use of 'this' in
a non-constexpr function makes the expression not potentially
constant.
N3276
PR c++/52748
* cp-tree.h (tsubst_flags): Add tf_decltype.
* call.c (build_cxx_call): Don't build a temporary if it's set.
(build_over_call): Make sure it's only passed to build_cxx_call.
* parser.c (cp_parser_primary_expression): Add decltype_p parm.
(cp_parser_unary_expression): Likewise.
(cp_parser_cast_expression): Likewise.
(cp_parser_binary_expression): Likewise.
(cp_parser_assignment_expression): Likewise.
(cp_parser_postfix_expression): Likewise. Pass tf_decltype.
(cp_parser_expression): Add decltype_p. Force a
temporary for a call on the LHS of a comma.
(cp_parser_decltype): Pass true to decltype_p parms.
* pt.c (tsubst) [DECLTYPE_TYPE]: Pass tf_decltype.
(tsubst_copy_and_build): Pass tf_decltype down only for
CALL_EXPR and the RHS of COMPOUND_EXPR.
* tree.c (build_cplus_new): Call complete_type_or_maybe_complain.
* cp-tree.h (abstract_class_use): New enum.
* typeck2.c (pending_abstract_type): Add use field.
(abstract_virtuals_error_sfinae): Add overloads taking
abstract_class_use instead of tree.
* typeck.c (build_static_cast_1): Call it.
* except.c (is_admissible_throw_operand_or_catch_parameter): Call it.
* pt.c: Adjust calls.
* decl.c (cp_finish_decl): Don't handle functions specially.
(grokdeclarator): Always check return type.
* init.c (build_new_1): Adjust call.
DR 337
PR c++/17232
* pt.c (tsubst) [ARRAY_TYPE]: Use abstract_virtuals_error_sfinae.
* typeck2.c (abstract_virtuals_error_sfinae): Call complete_type.
DR 657
* pt.c (tsubst_function_type): Call abstract_virtuals_error_sfinae.
(tsubst_arg_types): Likewise.
DR 1518
PR c++/54835
* call.c (convert_like_real): Check for explicit constructors
even for value-initialization.
PR c++/54946
* pt.c (convert_nontype_argument): Handle invalid pointer.
* parser.c (cp_parser_lambda_expression): Use nreverse.
PR c++/56447
PR c++/55532
* pt.c (instantiate_class_template_1): Instantiate lambda capture
list here.
(tsubst_copy_and_build): Not here.
PR c++/55017
* method.c (walk_field_subobs): Disallow copy of rvalue ref.
PR c++/55240
* parser.c (parsing_nsdmi): New.
* semantics.c (outer_automatic_var_p): Check it.
(finish_id_expression): Likewise.
* cp-tree.h: Declare it.
PR c++/55241
* error.c (dump_expr) [SIZEOF_EXPR]: Print sizeof... properly.
* parser.c (lookup_literal_operator): Correct parm/arg naming
mixup.
PR c++/56238
* pt.c (fold_non_dependent_expr_sfinae): Check
instantiation_dependent_expression_p.
PR c++/56095
* class.c (resolve_address_of_overloaded_function): Accept a
reference to function for target_type.
(instantiate_type): Likewise.
* pt.c (convert_nontype_argument): Pass it to
convert_nontype_argument_function.
2013-03-16 Jakub Jelinek <jakub@redhat.com>
* tree.c (cp_tree_equal): Fix a pasto.
PR c++/56607
* typeck.c (cp_build_binary_op): When calling warn_for_div_by_zero,
pass op1 through maybe_constant_value first.
2013-03-16 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/56582
* semantics.c (cxx_eval_array_reference): Check for negative index.
2013-03-14 Jason Merrill <jason@redhat.com>
PR c++/56614
* decl.c (local_variable_p_walkfn): Check DECL_ARTIFICIAL again.
PR c++/56346
* decl.c (register_dtor_fn): Pass null to __cxa_thread_atexit
dso_handle parm on targets without __cxa_atexit.
2013-03-11 Jason Merrill <jason@redhat.com>
PR c++/56567
* typeck.c (check_return_expr): Disallow returning init list here.
* semantics.c (apply_deduced_return_type): Not here.
2013-03-08 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51412
* cxx-pretty-print.c (pp_cxx_expression): Handle LAMBDA_EXPR.
* error.c (dump_expr): Likewise.
2013-03-08 Jason Merrill <jason@redhat.com>
PR c++/51884
* class.c (modify_all_vtables): Mangle the vtable name before
entering dfs_walk.
* semantics.c (lambda_expr_this_capture): In unevaluated context,
just return the nearest 'this'.
PR c++/51494
PR c++/52183
PR c++/56222
* tree.c (maybe_dummy_object): Don't capture 'this'.
* semantics.c (maybe_resolve_dummy): New.
(finish_non_static_data_member): Use it.
(finish_qualified_id_expr): Don't test is_dummy_object.
* cp-tree.h: Declare maybe_resolve_dummy.
* call.c (build_new_method_call_1): Use it.
PR c++/56567
* semantics.c (apply_deduced_return_type): Don't allow returning
std::initializer_list.
2013-03-06 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/56534
* parser.c (cp_parser_elaborated_type_specifier): Don't call
check_elaborated_type_specifier when TREE_CODE (decl) != TYPE_DECL.
* decl.c (check_elaborated_type_specifier): Tidy.
2013-03-06 Jakub Jelinek <jakub@redhat.com>
PR c++/56543
* tree.c (strip_typedefs): Don't copy args if they are NULL.
2013-03-05 Jakub Jelinek <jakub@redhat.com>
* parser.c (cp_parser_braced_list): For {} initialize
*non_constant_p to false.
2013-03-04 Jason Merrill <jason@redhat.com>
PR c++/56464
PR c++/54383
* semantics.c (lambda_expr_this_capture): Handle NSDMI
and non-class scopes.
2013-03-01 Paolo Carlini <paolo.carlini@oracle.com>
* decl.c (grokdeclarator): Remove dead code.
2013-02-28 Jason Merrill <jason@redhat.com>
PR c++/56481
* semantics.c (potential_constant_expression_1): Use
cxx_eval_outermost_constant_expr rather than maybe_constant_value.
PR c++/56243
* call.c (build_over_call): Avoid virtual lookup in a template.
2013-02-27 Jason Merrill <jason@redhat.com>
PR c++/56358
PR c++/56323
* name-lookup.c (do_class_using_decl): Use ctor_identifier instead
of the base name for inheriting ctors.
(push_class_level_binding_1): Remove inheriting ctor handling.
* pt.c (tsubst_decl) [USING_DECL]: Likewise.
* class.c (add_implicitly_declared_members): Adjust.
2013-02-26 David Binderman <dcb314@hotmail.com>
PR c++/55632
* decl.c (grokdeclarator): Tidy publicp assignment.
2013-02-25 Aldy Hernandez <aldyh@redhat.com>
PR c++/56419
* semantics.c (begin_transaction_stmt): Set TREE_SIDE_EFFECTS.
(build_transaction_expr): Same.
2013-02-25 Jason Merrill <jason@redhat.com>
PR c++/56377
* pt.c (fn_type_unification): Wait to call push_tinst_level until
we know what args we're looking at.
PR c++/56438
* semantics.c (potential_constant_expression_1): In C++98, a cast
to non-integral type can't be a constant expression.
2013-02-24 Jakub Jelinek <jakub@redhat.com>
PR c++/56403
* init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
of CLASS_TYPE_P.
2013-02-22 Jason Merrill <jason@redhat.com>
PR c++/40405
* pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
if we got the wrong number of template parms.
PR c++/56377
* pt.c (fn_type_unification): Use explicit args in template
instantiation context.
PR c++/56359
* call.c (can_convert_arg): Discard access checks.
PR c++/56395
* tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
args.
2013-02-20 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/56373
* tree.c (maybe_warn_zero_as_null_pointer_constant): Add.
* cvt.c (ocp_convert): Use the latter.
(cp_convert_to_pointer): Likewise.
* decl.c (check_default_argument): Likewise.
* typeck.c (cp_build_binary_op): Likewise.
* cp-tree.h (maybe_warn_zero_as_null_pointer_constant): Declare.
2013-02-15 Jonathan Wakely <jwakely.gcc@gmail.com>
Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51242
* decl2.c (grokbitfield): Allow scoped enumeration types.
2013-02-15 Jason Merrill <jason@redhat.com>
PR c++/54276
* semantics.c (finish_id_expression): Also return the identifier
for an outer local static.
PR c++/56343
* class.c (check_bases_and_members): Deduce noexcept after
checking bases.
PR c++/52026
* semantics.c (finish_id_expression): In a template, return
the identifier for a constant variable.
2013-02-14 Jason Merrill <jason@redhat.com>
PR c++/54922
* semantics.c (build_anon_member_initialization): New.
(build_data_member_initialization): Use it.
PR c++/55003
* decl.c (cp_finish_decl): Force instantiation of an
auto static data member.
PR c++/55220
* pt.c (unify): A pack expansion that is not the last template
argument makes the entire template argument list non-deduced.
PR c++/56323
* name-lookup.c (do_class_using_decl): Handle typedefs with
inheriting constructors.
(push_class_level_binding_1): Allow inheriting from template
template parameter, too.
* pt.c (tsubst_decl) [USING_DECL]: Likewise.
PR c++/55223
* pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Fix handling of
default argument scope.
* mangle.c (write_name): Likewise.
PR c++/55232
* error.c (find_typenames_r): Don't walk into a pack expansion.
2013-02-13 Jason Merrill <jason@redhat.com>
PR c++/55670
* parser.c (cp_parser_member_declaration): Check the declarator
form when detecting a function declaration via typedef.
PR c++/55680
* pt.c (maybe_process_partial_specialization): A lambda
isn't what's being specialized.
PR c++/55710
* semantics.c (maybe_add_lambda_conv_op): Mark static thunk
TREE_USED.
PR c++/55879
* semantics.c (cxx_bind_parameters_in_call): Undo DECL_BY_REFERENCE.
PR c++/55993
* semantics.c (cxx_fold_indirect_ref): Handle empty bases at
non-zero offsets, too.
PR c++/56155
* decl.c (build_enumerator): Always convert the value to a
fixed underlying type.
PR c++/56135
* pt.c (tsubst_copy_and_build): Don't forget any new
captures that arose from use of dependent names.
2013-02-13 Jakub Jelinek <jakub@redhat.com>
PR c++/56302
* semantics.c (finish_asm_stmt): If input constraints allow
neither register nor memory, try maybe_constant_value to get
a constant if possible.
2013-02-12 Jason Merrill <jason@redhat.com>
PR c++/56285
* method.c (add_one_base_init): Handle base constructor
taking rvalue reference parm.
PR c++/56291
* semantics.c (sort_constexpr_mem_initializers): Handle
vptr out of order.
2013-02-09 Jason Merrill <jason@redhat.com>
PR c++/56268
* semantics.c (classtype_has_nothrow_assign_or_copy_p): Call
maybe_instantiate_noexcept.
PR c++/56247
* pt.c (eq_specializations): Set comparing_specializations.
* tree.c (cp_tree_equal): Check it.
* cp-tree.h: Declare it.
* decl.c (decls_match): Check versions later.
PR c++/56238
* pt.c (build_non_dependent_expr): Don't try to fold
instantiation-dependent expressions.
(instantiation_dependent_r) [TRAIT_EXPR]: Split out.
[BIND_EXPR]: Treat as dependent.
2013-02-07 Jakub Jelinek <jakub@redhat.com>
PR c++/56241
* init.c (build_vec_init): Don't append NULL values into new_vec.
(build_zero_init_1): Don't push anything into v if recursive call
returned NULL_TREE.
(build_value_init_noctor): Don't push anything into v if
build_value_init call returned NULL_TREE.
PR c++/56239
* parser.c (cp_parser_token_starts_cast_expression): Renamed to...
(cp_parser_tokens_start_cast_expression): ... this. Change parameter
to cp_parser *, call cp_lexer_peek_token first. For CPP_OPEN_PAREN,
return true only if 2nd token isn't CPP_CLOSE_PAREN.
(cp_parser_cast_expression): Adjust caller.
PR c++/56237
* decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
only if DECL_DISCRIMINATOR_SET_P (t) rather than just
DECL_LANG_SPECIFIC (t).
2013-02-07 Jason Merrill <jason@redhat.com>
PR c++/56235
* method.c (do_build_copy_constructor): Don't bother turning
scalars from lvalues to xvalues.
(do_build_copy_assign): Likewise.
2013-02-06 Jason Merrill <jason@redhat.com>
* parser.c (cp_parser_enum_specifier): Check for error_mark_node.
2013-02-05 Jason Merrill <jason@redhat.com>
PR c++/54122
* tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
METHOD_TYPE.
PR c++/56177
* decl.c (start_preparsed_function): Update restype if we change
decl1.
PR c++/56208
* pt.c (fn_type_unification): Discard any access checks from
substituting explicit args.
2013-01-31 Jason Merrill <jason@redhat.com>
PR c++/56162
PR c++/56104
* typeck.c (get_member_function_from_ptrfunc): Fix
ptrmemfunc_vbit_in_delta case.
2013-01-29 Jason Merrill <jason@redhat.com>
PR libstdc++/54314
* class.c (build_ctor_vtbl_group): Give construction vtables
hidden visibility.
2013-01-25 Jason Merrill <jason@redhat.com>
PR c++/56095
* pt.c (convert_nontype_argument_function): Handle invalid input.
(convert_nontype_argument): Likewise.
PR c++/56104
* typeck.c (get_member_function_from_ptrfunc): Optimize if the
dynamic type has no virtual functions.
2013-01-22 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/55944
* decl.c (check_initializer): Use TARGET_EXPR_DIRECT_INIT_P only
on TARGET_EXPR nodes.
2013-01-22 Jason Merrill <jason@redhat.com>
PR c++/56071
* pt.c (maybe_instantiate_noexcept): Don't defer access checks.
2013-01-22 Dodji Seketeli <dodji@redhat.com>
PR c++/53609
* pt.c (argument_pack_element_is_expansion_p)
(make_argument_pack_select, use_pack_expansion_extra_args_p)
(gen_elem_of_pack_expansion_instantiation): New static functions.
(tsubst): When looking through an ARGUMENT_PACK_SELECT tree node,
look through the possibly resulting pack expansion as well.
(tsubst_pack_expansion): Use use_pack_expansion_extra_p to
generalize when to use the PACK_EXPANSION_EXTRA_ARGS mechanism.
Use gen_elem_of_pack_expansion_instantiation to build the
instantiation piece-wise. Don't use arg_from_parm_pack_p anymore,
as gen_elem_of_pack_expansion_instantiation and the change in
tsubst above generalize this particular case.
(arg_from_parm_pack_p): Remove this for it's not used by
tsubst_pack_expansion anymore.
2013-01-21 Jason Merrill <jason@redhat.com>
PR c++/56059
* tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
template args count.
2013-01-18 Jason Merrill <jason@redhat.com>
PR target/54908
* decl2.c (get_local_tls_init_fn): New.
(get_tls_init_fn): Handle flag_extern_tls_init. Don't bother
with aliases for internal variables. Don't use weakrefs if
the variable needs destruction.
(generate_tls_wrapper): Mark the wrapper as const if no
initialization is needed.
(handle_tls_init): Don't require aliases.
2013-01-15 Dodji Seketeli <dodji@redhat.com>
PR c++/55663
* pt.c (coerce_innermost_template_parms): New static function.
(instantiate_alias_template): Use it here.
2013-01-09 Jason Merrill <jason@redhat.com>
PR c++/55878
* rtti.c (build_typeid, get_typeid): Add complain parm.
(get_tinfo_decl_dynamic): Likewise.
* cp-tree.h, parser.c, pt.c: Adjust.
PR c++/55893
* decl.c (cp_finish_decl): Clear TREE_READONLY if the variable
needs destruction.
2013-01-09 Jakub Jelinek <jakub@redhat.com>
PR c/48418
* typeck.c (cp_build_binary_op): For LSHIFT_EXPR and RSHIFT_EXPR,
call maybe_constant_value for the negative or too big shift
count warnings.
2013-01-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/55801
* decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
of the argument is true.
2013-01-08 Joel Brobecker <brobecker@adacore.com>
* parser.c (cp_parser_initializer_list): Move declaration
of variable non_const to start of lexical block.
2013-01-07 Jason Merrill <jason@redhat.com>
PR c++/55753
* tree.c (build_aggr_init_expr): Do nothing in a template.
* pt.c (tsubst_copy_and_build) [CALL_EXPR]: Strip an ADDR_EXPR off
a FUNCTION_DECL before tsubsting.
2013-01-04 Dodji Seketeli <dodji@redhat.com>
PR c++/52343
* pt.c (check_instantiated_arg): Allow type template arguments.
2013-01-04 Jason Merrill <jason@redhat.com>
PR c++/55877
* decl.c (reset_type_linkage, bt_reset_linkage): New.
(grokdeclarator): Use reset_type_linkage.
* name-lookup.c (binding_table_foreach): Handle null table.
* tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
2013-01-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/54526 (again)
* parser.c (cp_parser_template_id): Revert core of previous change
(keep adjusted inform message).
2013-01-03 Jason Merrill <jason@redhat.com>
PR c++/55419
PR c++/55753
* pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Don't touch
TREE_CONSTANT.
PR c++/55842
* semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
PR c++/55856
* semantics.c (build_data_member_initialization): Handle DECL_EXPR.
PR c++/53650
* call.c (type_has_extended_temps): New.
* cp-tree.h: Declare it.
* decl.c (check_initializer): Use build_aggr_init for arrays
if it is false.
* init.c (build_vec_init): Avoid mixed signed/unsigned arithmetic.
2013-01-02 Jason Merrill <jason@redhat.com>
PR c++/54325
* call.c (build_new_method_call_1): Don't use build_value_init for
user-provided default constructors.
* decl.c (check_default_argument): Use LOOKUP_IMPLICIT.
PR c++/55032
PR c++/55245
* tree.c (build_cplus_array_type): Copy layout information
to main variant if necessary.
Copyright (C) 2013 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
|