1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
13230
13231
13232
13233
13234
13235
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267
13268
13269
13270
13271
13272
13273
13274
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306
13307
13308
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351
13352
13353
13354
13355
13356
13357
13358
13359
13360
13361
13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
13537
13538
13539
13540
13541
13542
13543
13544
13545
13546
13547
13548
13549
13550
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242
14243
14244
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303
14304
14305
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326
14327
14328
14329
14330
14331
14332
14333
14334
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377
14378
14379
14380
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504
14505
14506
14507
14508
14509
14510
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689
14690
14691
14692
14693
14694
14695
14696
14697
14698
14699
14700
14701
14702
14703
14704
14705
14706
14707
14708
14709
14710
14711
14712
14713
14714
14715
14716
14717
14718
14719
14720
14721
14722
14723
14724
14725
14726
14727
14728
14729
14730
14731
14732
14733
14734
14735
14736
14737
14738
14739
14740
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756
14757
14758
14759
14760
14761
14762
14763
14764
14765
14766
14767
14768
14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
14799
14800
14801
14802
14803
14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834
14835
14836
14837
14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
14866
14867
14868
14869
14870
14871
14872
14873
14874
14875
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577
15578
15579
15580
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593
15594
15595
15596
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643
15644
15645
15646
15647
15648
15649
15650
15651
15652
15653
15654
15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
15737
15738
15739
15740
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769
15770
15771
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215
16216
16217
16218
16219
16220
16221
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355
16356
16357
16358
16359
16360
16361
16362
16363
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373
16374
16375
16376
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419
16420
16421
16422
16423
16424
16425
16426
16427
16428
16429
16430
16431
16432
16433
16434
16435
16436
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471
16472
16473
16474
16475
16476
16477
16478
16479
16480
16481
16482
16483
16484
16485
16486
16487
16488
16489
16490
16491
16492
16493
16494
16495
16496
16497
16498
16499
16500
16501
16502
16503
16504
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515
16516
16517
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548
16549
16550
16551
16552
16553
16554
16555
16556
16557
16558
16559
16560
16561
16562
16563
16564
16565
16566
16567
16568
16569
16570
16571
16572
16573
16574
16575
16576
16577
16578
16579
16580
16581
16582
16583
16584
16585
16586
16587
16588
16589
16590
16591
16592
16593
16594
16595
16596
16597
16598
16599
16600
16601
16602
16603
16604
16605
16606
16607
16608
16609
16610
16611
16612
16613
16614
16615
16616
16617
16618
16619
16620
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630
16631
16632
16633
16634
16635
16636
16637
16638
16639
16640
16641
16642
16643
16644
16645
16646
16647
16648
16649
16650
16651
16652
16653
16654
16655
16656
16657
16658
16659
16660
16661
16662
16663
16664
16665
16666
16667
16668
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679
16680
16681
16682
16683
16684
16685
16686
16687
16688
16689
16690
16691
16692
16693
16694
16695
16696
16697
16698
16699
16700
16701
16702
16703
16704
16705
16706
16707
16708
16709
16710
16711
16712
16713
16714
16715
16716
16717
16718
16719
16720
16721
16722
16723
16724
16725
16726
16727
16728
16729
16730
16731
16732
16733
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
16747
16748
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771
16772
16773
16774
16775
16776
16777
16778
16779
16780
16781
16782
16783
16784
16785
16786
16787
16788
16789
16790
16791
16792
16793
16794
16795
16796
16797
16798
16799
16800
16801
16802
16803
16804
16805
16806
16807
16808
16809
16810
16811
16812
16813
16814
16815
16816
16817
16818
16819
16820
16821
16822
16823
16824
16825
16826
16827
16828
16829
16830
16831
16832
16833
16834
16835
16836
16837
16838
16839
16840
16841
16842
16843
16844
16845
16846
16847
16848
16849
16850
16851
16852
16853
16854
16855
16856
16857
16858
16859
16860
16861
16862
16863
16864
16865
16866
16867
16868
16869
16870
16871
16872
16873
16874
16875
16876
16877
16878
16879
16880
16881
16882
16883
16884
16885
16886
16887
16888
16889
16890
16891
16892
16893
16894
16895
16896
16897
16898
16899
16900
16901
16902
16903
16904
16905
16906
16907
16908
16909
16910
16911
16912
16913
16914
16915
16916
16917
16918
16919
16920
16921
16922
16923
16924
16925
16926
16927
16928
16929
16930
16931
16932
16933
16934
16935
16936
16937
16938
16939
16940
16941
16942
16943
16944
16945
16946
16947
16948
16949
16950
16951
16952
16953
16954
16955
16956
16957
16958
16959
16960
16961
16962
16963
16964
16965
16966
16967
16968
16969
16970
16971
16972
16973
16974
16975
16976
16977
16978
16979
16980
16981
16982
16983
16984
16985
16986
16987
16988
16989
16990
16991
16992
16993
16994
16995
16996
16997
16998
16999
17000
17001
17002
17003
17004
17005
17006
17007
17008
17009
17010
17011
17012
17013
17014
17015
17016
17017
17018
17019
17020
17021
17022
17023
17024
17025
17026
17027
17028
17029
17030
17031
17032
17033
17034
17035
17036
17037
17038
17039
17040
17041
17042
17043
17044
17045
17046
17047
17048
17049
17050
17051
17052
17053
17054
17055
17056
17057
17058
17059
17060
17061
17062
17063
17064
17065
17066
17067
17068
17069
17070
17071
17072
17073
17074
17075
17076
17077
17078
17079
17080
17081
17082
17083
17084
17085
17086
17087
17088
17089
17090
17091
17092
17093
17094
17095
17096
17097
17098
17099
17100
17101
17102
17103
17104
17105
17106
17107
17108
17109
17110
17111
17112
17113
17114
17115
17116
17117
17118
17119
17120
17121
17122
17123
17124
17125
17126
17127
17128
17129
17130
17131
17132
17133
17134
17135
17136
17137
17138
17139
17140
17141
17142
17143
17144
17145
17146
17147
17148
17149
17150
17151
17152
17153
17154
17155
17156
17157
17158
17159
17160
17161
17162
17163
17164
17165
17166
17167
17168
17169
17170
17171
17172
17173
17174
17175
17176
17177
17178
17179
17180
17181
17182
17183
17184
17185
17186
17187
17188
17189
17190
17191
17192
17193
17194
17195
17196
17197
17198
17199
17200
17201
17202
17203
17204
17205
17206
17207
17208
17209
17210
17211
17212
17213
17214
17215
17216
17217
17218
17219
17220
17221
17222
17223
17224
17225
17226
17227
17228
17229
17230
17231
17232
17233
17234
17235
17236
17237
17238
17239
17240
17241
17242
17243
17244
17245
17246
17247
17248
17249
17250
17251
17252
17253
17254
17255
17256
17257
17258
17259
17260
17261
17262
17263
17264
17265
17266
17267
17268
17269
17270
17271
17272
17273
17274
17275
17276
17277
17278
17279
17280
17281
17282
17283
17284
17285
17286
17287
17288
17289
17290
17291
17292
17293
17294
17295
17296
17297
17298
17299
17300
17301
17302
17303
17304
17305
17306
17307
17308
17309
17310
17311
17312
17313
17314
17315
17316
17317
17318
17319
17320
17321
17322
17323
17324
17325
17326
17327
17328
17329
17330
17331
17332
17333
17334
17335
17336
17337
17338
17339
17340
17341
17342
17343
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355
17356
17357
17358
17359
17360
17361
17362
17363
17364
17365
17366
17367
17368
17369
17370
17371
17372
17373
17374
17375
17376
17377
17378
17379
17380
17381
17382
17383
17384
17385
17386
17387
17388
17389
17390
17391
17392
17393
17394
17395
17396
17397
17398
17399
17400
17401
17402
17403
17404
17405
17406
17407
17408
17409
17410
17411
17412
17413
17414
17415
17416
17417
17418
17419
17420
17421
17422
17423
17424
17425
17426
17427
17428
17429
17430
17431
17432
17433
17434
17435
17436
17437
17438
17439
17440
17441
17442
17443
17444
17445
17446
17447
17448
17449
17450
17451
17452
17453
17454
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
17465
17466
17467
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477
17478
17479
17480
17481
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492
17493
17494
17495
17496
17497
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540
17541
17542
17543
17544
17545
17546
17547
17548
17549
17550
17551
17552
17553
17554
17555
17556
17557
17558
17559
17560
17561
17562
17563
17564
17565
17566
17567
17568
17569
17570
17571
17572
17573
17574
17575
17576
17577
17578
17579
17580
17581
17582
17583
17584
17585
17586
17587
17588
17589
17590
17591
17592
17593
17594
17595
17596
17597
17598
17599
17600
17601
17602
17603
17604
17605
17606
17607
17608
17609
17610
17611
17612
17613
17614
17615
17616
17617
17618
17619
17620
17621
17622
17623
17624
17625
17626
17627
17628
17629
17630
17631
17632
17633
17634
17635
17636
17637
17638
17639
17640
17641
17642
17643
17644
17645
17646
17647
17648
17649
17650
17651
17652
17653
17654
17655
17656
17657
17658
17659
17660
17661
17662
17663
17664
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
17678
17679
17680
17681
17682
17683
17684
17685
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
17715
17716
17717
17718
17719
17720
17721
17722
17723
17724
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735
17736
17737
17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
17750
17751
17752
17753
17754
17755
17756
17757
17758
17759
17760
17761
17762
17763
17764
17765
17766
17767
17768
17769
17770
17771
17772
17773
17774
17775
17776
17777
17778
17779
17780
17781
17782
17783
17784
17785
17786
17787
17788
17789
17790
17791
17792
17793
17794
17795
17796
17797
17798
17799
17800
17801
17802
17803
17804
17805
17806
17807
17808
17809
17810
17811
17812
17813
17814
17815
17816
17817
17818
17819
17820
17821
17822
17823
17824
17825
17826
17827
17828
17829
17830
17831
17832
17833
17834
17835
17836
17837
17838
17839
17840
17841
17842
17843
17844
17845
17846
17847
17848
17849
17850
17851
17852
17853
17854
17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865
17866
17867
17868
17869
17870
17871
17872
17873
17874
17875
17876
17877
17878
17879
17880
17881
17882
17883
17884
17885
17886
17887
17888
17889
17890
17891
17892
17893
17894
17895
17896
17897
17898
17899
17900
17901
17902
17903
17904
17905
17906
17907
17908
17909
17910
17911
17912
17913
17914
17915
17916
17917
17918
17919
17920
17921
17922
17923
17924
17925
17926
17927
17928
17929
17930
17931
17932
17933
17934
17935
17936
17937
17938
17939
17940
17941
17942
17943
17944
17945
17946
17947
17948
17949
17950
17951
17952
17953
17954
17955
17956
17957
17958
17959
17960
17961
17962
17963
17964
17965
17966
17967
17968
17969
17970
17971
17972
17973
17974
17975
17976
17977
17978
17979
17980
17981
17982
17983
17984
17985
17986
17987
17988
17989
17990
17991
17992
17993
17994
17995
17996
17997
17998
17999
18000
18001
18002
18003
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023
18024
18025
18026
18027
18028
18029
18030
18031
18032
18033
18034
18035
18036
18037
18038
18039
18040
18041
18042
18043
18044
18045
18046
18047
18048
18049
18050
18051
18052
18053
18054
18055
18056
18057
18058
18059
18060
18061
18062
18063
18064
18065
18066
18067
18068
18069
18070
18071
18072
18073
18074
18075
18076
18077
18078
18079
18080
18081
18082
18083
18084
18085
18086
18087
18088
18089
18090
18091
18092
18093
18094
18095
18096
18097
18098
18099
18100
18101
18102
18103
18104
18105
18106
18107
18108
18109
18110
18111
18112
18113
18114
18115
18116
18117
18118
18119
18120
18121
18122
18123
18124
18125
18126
18127
18128
18129
18130
18131
18132
18133
18134
18135
18136
18137
18138
18139
18140
18141
18142
18143
18144
18145
18146
18147
18148
18149
18150
18151
18152
18153
18154
18155
18156
18157
18158
18159
18160
18161
18162
18163
18164
18165
18166
18167
18168
18169
18170
18171
18172
18173
18174
18175
18176
18177
18178
18179
18180
18181
18182
18183
18184
18185
18186
18187
18188
18189
18190
18191
18192
18193
18194
18195
18196
18197
18198
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208
18209
18210
18211
18212
18213
18214
18215
18216
18217
18218
18219
18220
18221
18222
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
18247
18248
18249
18250
18251
18252
18253
18254
18255
18256
18257
18258
18259
18260
18261
18262
18263
18264
18265
18266
18267
18268
18269
18270
18271
18272
18273
18274
18275
18276
18277
18278
18279
18280
18281
18282
18283
18284
18285
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
18298
18299
18300
18301
18302
18303
18304
18305
18306
18307
18308
18309
18310
18311
18312
18313
18314
18315
18316
18317
18318
18319
18320
18321
18322
18323
18324
18325
18326
18327
18328
18329
18330
18331
18332
18333
18334
18335
18336
18337
18338
18339
18340
18341
18342
18343
18344
18345
18346
18347
18348
18349
18350
18351
18352
18353
18354
18355
18356
18357
18358
18359
18360
18361
18362
18363
18364
18365
18366
18367
18368
18369
18370
18371
18372
18373
18374
18375
18376
18377
18378
18379
18380
18381
18382
18383
18384
18385
18386
18387
18388
18389
18390
18391
18392
18393
18394
18395
18396
18397
18398
18399
18400
18401
18402
18403
18404
18405
18406
18407
18408
18409
18410
18411
18412
18413
18414
18415
18416
18417
18418
18419
18420
18421
18422
18423
18424
18425
18426
18427
18428
18429
18430
18431
18432
18433
18434
18435
18436
18437
18438
18439
18440
18441
18442
18443
18444
18445
18446
18447
18448
18449
18450
18451
18452
18453
18454
18455
18456
18457
18458
18459
18460
18461
18462
18463
18464
18465
18466
18467
18468
18469
18470
18471
18472
18473
18474
18475
18476
18477
18478
18479
18480
18481
18482
18483
18484
18485
18486
18487
18488
18489
18490
18491
18492
18493
18494
18495
18496
18497
18498
18499
18500
18501
18502
18503
18504
18505
18506
18507
18508
18509
18510
18511
18512
18513
18514
18515
18516
18517
18518
18519
18520
18521
18522
18523
18524
18525
18526
18527
18528
18529
18530
18531
18532
18533
18534
18535
18536
18537
18538
18539
18540
18541
18542
18543
18544
18545
18546
18547
18548
18549
18550
18551
18552
18553
18554
18555
18556
18557
18558
18559
18560
18561
18562
18563
18564
18565
18566
18567
18568
18569
18570
18571
18572
18573
18574
18575
18576
18577
18578
18579
18580
18581
18582
18583
18584
18585
18586
18587
18588
18589
18590
18591
18592
18593
18594
18595
18596
18597
18598
18599
18600
18601
18602
18603
18604
18605
18606
18607
18608
18609
18610
18611
18612
18613
18614
18615
18616
18617
18618
18619
18620
18621
18622
18623
18624
18625
18626
18627
18628
18629
18630
18631
18632
18633
18634
18635
18636
18637
18638
18639
18640
18641
18642
18643
18644
18645
18646
18647
18648
18649
18650
18651
18652
18653
18654
18655
18656
18657
18658
18659
18660
18661
18662
18663
18664
18665
18666
18667
18668
18669
18670
18671
18672
18673
18674
18675
18676
18677
18678
18679
18680
18681
18682
18683
18684
18685
18686
18687
18688
18689
18690
18691
18692
18693
18694
18695
18696
18697
18698
18699
18700
18701
18702
18703
18704
18705
18706
18707
18708
18709
18710
18711
18712
18713
18714
18715
18716
18717
18718
18719
18720
18721
18722
18723
18724
18725
18726
18727
18728
18729
18730
18731
18732
18733
18734
18735
18736
18737
18738
18739
18740
18741
18742
18743
18744
18745
18746
18747
18748
18749
18750
18751
18752
18753
18754
18755
18756
18757
18758
18759
18760
18761
18762
18763
18764
18765
18766
18767
18768
18769
18770
18771
18772
18773
18774
18775
18776
18777
18778
18779
18780
18781
18782
18783
18784
18785
18786
18787
18788
18789
18790
18791
18792
18793
18794
18795
18796
18797
18798
18799
18800
18801
18802
18803
18804
18805
18806
18807
18808
18809
18810
18811
18812
18813
18814
18815
18816
18817
18818
18819
18820
18821
18822
18823
18824
18825
18826
18827
18828
18829
18830
18831
18832
18833
18834
18835
18836
18837
18838
18839
18840
18841
18842
18843
18844
18845
18846
18847
18848
18849
18850
18851
18852
18853
18854
18855
18856
18857
18858
18859
18860
18861
18862
18863
18864
18865
18866
18867
18868
18869
18870
18871
18872
18873
18874
18875
18876
18877
18878
18879
18880
18881
18882
18883
18884
18885
18886
18887
18888
18889
18890
18891
18892
18893
18894
18895
18896
18897
18898
18899
18900
18901
18902
18903
18904
18905
18906
18907
18908
18909
18910
18911
18912
18913
18914
18915
18916
18917
18918
18919
18920
18921
18922
18923
18924
18925
18926
18927
18928
18929
18930
18931
18932
18933
18934
18935
18936
18937
18938
18939
18940
18941
18942
18943
18944
18945
18946
18947
18948
18949
18950
18951
18952
18953
18954
18955
18956
18957
18958
18959
18960
18961
18962
18963
18964
18965
18966
18967
18968
18969
18970
18971
18972
18973
18974
18975
18976
18977
18978
18979
18980
18981
18982
18983
18984
18985
18986
18987
18988
18989
18990
18991
18992
18993
18994
18995
18996
18997
18998
18999
19000
19001
19002
19003
19004
19005
19006
19007
19008
19009
19010
19011
19012
19013
19014
19015
19016
19017
19018
19019
19020
19021
19022
19023
19024
19025
19026
19027
19028
19029
19030
19031
19032
19033
19034
19035
19036
19037
19038
19039
19040
19041
19042
19043
19044
19045
19046
19047
19048
19049
19050
19051
19052
19053
19054
19055
19056
19057
19058
19059
19060
19061
19062
19063
19064
19065
19066
19067
19068
19069
19070
19071
19072
19073
19074
19075
19076
19077
19078
19079
19080
19081
19082
19083
19084
19085
19086
19087
19088
19089
19090
19091
19092
19093
19094
19095
19096
19097
19098
19099
19100
19101
19102
19103
19104
19105
19106
19107
19108
19109
19110
19111
19112
19113
19114
19115
19116
19117
19118
19119
19120
19121
19122
19123
19124
19125
19126
19127
19128
19129
19130
19131
19132
19133
19134
19135
19136
19137
19138
19139
19140
19141
19142
19143
19144
19145
19146
19147
19148
19149
19150
19151
19152
19153
19154
19155
19156
19157
19158
19159
19160
19161
19162
19163
19164
19165
19166
19167
19168
19169
19170
19171
19172
19173
19174
19175
19176
19177
19178
19179
19180
19181
19182
19183
19184
19185
19186
19187
19188
19189
19190
19191
19192
19193
19194
19195
19196
19197
19198
19199
19200
19201
19202
19203
19204
19205
19206
19207
19208
19209
19210
19211
19212
19213
19214
19215
19216
19217
19218
19219
19220
19221
19222
19223
19224
19225
19226
19227
19228
19229
19230
19231
19232
19233
19234
19235
19236
19237
19238
19239
19240
19241
19242
19243
19244
19245
19246
19247
19248
19249
19250
19251
19252
19253
19254
19255
19256
19257
19258
19259
19260
19261
19262
19263
19264
19265
19266
19267
19268
19269
19270
19271
19272
19273
19274
19275
19276
19277
19278
19279
19280
19281
19282
19283
19284
19285
19286
19287
19288
19289
19290
19291
19292
19293
19294
19295
19296
19297
19298
19299
19300
19301
19302
19303
19304
19305
19306
19307
19308
19309
19310
19311
19312
19313
19314
19315
19316
19317
19318
19319
19320
19321
19322
19323
19324
19325
19326
19327
19328
19329
19330
19331
19332
19333
19334
19335
19336
19337
19338
19339
19340
19341
19342
19343
19344
19345
19346
19347
19348
19349
19350
19351
19352
19353
19354
19355
19356
19357
19358
19359
19360
19361
19362
19363
19364
19365
19366
19367
19368
19369
19370
19371
19372
19373
19374
19375
19376
19377
19378
19379
19380
19381
19382
19383
19384
19385
19386
19387
19388
19389
19390
19391
19392
19393
19394
19395
19396
19397
19398
19399
19400
19401
19402
19403
19404
19405
19406
19407
19408
19409
19410
19411
19412
19413
19414
19415
19416
19417
19418
19419
19420
19421
19422
19423
19424
19425
19426
19427
19428
19429
19430
19431
19432
19433
19434
19435
19436
19437
19438
19439
19440
19441
19442
19443
19444
19445
19446
19447
19448
19449
19450
19451
19452
19453
19454
19455
19456
19457
19458
19459
19460
19461
19462
19463
19464
19465
19466
19467
19468
19469
19470
19471
19472
19473
19474
19475
19476
19477
19478
19479
19480
19481
19482
19483
19484
19485
19486
19487
19488
19489
19490
19491
19492
19493
19494
19495
19496
19497
19498
19499
19500
19501
19502
19503
19504
19505
19506
19507
19508
19509
19510
19511
19512
19513
19514
19515
19516
19517
19518
19519
19520
19521
19522
19523
19524
19525
19526
19527
19528
19529
19530
19531
19532
19533
19534
19535
19536
19537
19538
19539
19540
19541
19542
19543
19544
19545
19546
19547
19548
19549
19550
19551
19552
19553
19554
19555
19556
19557
19558
19559
19560
19561
19562
19563
19564
19565
19566
19567
19568
19569
19570
19571
19572
19573
19574
19575
19576
19577
19578
19579
19580
19581
19582
19583
19584
19585
19586
19587
19588
19589
19590
19591
19592
19593
19594
19595
19596
19597
19598
19599
19600
19601
19602
19603
19604
19605
19606
19607
19608
19609
19610
19611
19612
19613
19614
19615
19616
19617
19618
19619
19620
19621
19622
19623
19624
19625
19626
19627
19628
19629
19630
19631
19632
19633
19634
19635
19636
19637
19638
19639
19640
19641
19642
19643
19644
19645
19646
19647
19648
19649
19650
19651
19652
19653
19654
19655
19656
19657
19658
19659
19660
19661
19662
19663
19664
19665
19666
19667
19668
19669
19670
19671
19672
19673
19674
19675
19676
19677
19678
19679
19680
19681
19682
19683
19684
19685
19686
19687
19688
19689
19690
19691
19692
19693
19694
19695
19696
19697
19698
19699
19700
19701
19702
19703
19704
19705
19706
19707
19708
19709
19710
19711
19712
19713
19714
19715
19716
19717
19718
19719
19720
19721
19722
19723
19724
19725
19726
19727
19728
19729
19730
19731
19732
19733
19734
19735
19736
19737
19738
19739
19740
19741
19742
19743
19744
19745
19746
19747
19748
19749
19750
19751
19752
19753
19754
19755
19756
19757
19758
19759
19760
19761
19762
19763
19764
19765
19766
19767
19768
19769
19770
19771
19772
19773
19774
19775
19776
19777
19778
19779
19780
19781
19782
19783
19784
19785
19786
19787
19788
19789
19790
19791
19792
19793
19794
19795
19796
19797
19798
19799
19800
19801
19802
19803
19804
19805
19806
19807
19808
19809
19810
19811
19812
19813
19814
19815
19816
19817
19818
19819
19820
19821
19822
19823
19824
19825
19826
19827
19828
19829
19830
19831
19832
19833
19834
19835
19836
19837
19838
19839
19840
19841
19842
19843
19844
19845
19846
19847
19848
19849
19850
19851
19852
19853
19854
19855
19856
19857
19858
19859
19860
19861
19862
19863
19864
19865
19866
19867
19868
19869
19870
19871
19872
19873
19874
19875
19876
19877
19878
19879
19880
19881
19882
19883
19884
19885
19886
19887
19888
19889
19890
19891
19892
19893
19894
19895
19896
19897
19898
19899
19900
19901
19902
19903
19904
19905
19906
19907
19908
19909
19910
19911
19912
19913
19914
19915
19916
19917
19918
19919
19920
19921
19922
19923
19924
19925
19926
19927
19928
19929
19930
19931
19932
19933
19934
19935
19936
19937
19938
19939
19940
19941
19942
19943
19944
19945
19946
19947
19948
19949
19950
19951
19952
19953
19954
19955
19956
19957
19958
19959
19960
19961
19962
19963
19964
19965
19966
19967
19968
19969
19970
19971
19972
19973
19974
19975
19976
19977
19978
19979
19980
19981
19982
19983
19984
19985
19986
19987
19988
19989
19990
19991
19992
19993
19994
19995
19996
19997
19998
19999
20000
20001
20002
20003
20004
20005
20006
20007
20008
20009
20010
20011
20012
20013
20014
20015
20016
20017
20018
20019
20020
20021
20022
20023
20024
20025
20026
20027
20028
20029
20030
20031
20032
20033
20034
20035
20036
20037
20038
20039
20040
20041
20042
20043
20044
20045
20046
20047
20048
20049
20050
20051
20052
20053
20054
20055
20056
20057
20058
20059
20060
20061
20062
20063
20064
20065
20066
20067
20068
20069
20070
20071
20072
20073
20074
20075
20076
20077
20078
20079
20080
20081
20082
20083
20084
20085
20086
20087
20088
20089
20090
20091
20092
20093
20094
20095
20096
20097
20098
20099
20100
20101
20102
20103
20104
20105
20106
20107
20108
20109
20110
20111
20112
20113
20114
20115
20116
20117
20118
20119
20120
20121
20122
20123
20124
20125
20126
20127
20128
20129
20130
20131
20132
20133
20134
20135
20136
20137
20138
20139
20140
20141
20142
20143
20144
20145
20146
20147
20148
20149
20150
20151
20152
20153
20154
20155
20156
20157
20158
20159
20160
20161
20162
20163
20164
20165
20166
20167
20168
20169
20170
20171
20172
20173
20174
20175
20176
20177
20178
20179
20180
20181
20182
20183
20184
20185
20186
20187
20188
20189
20190
20191
20192
20193
20194
20195
20196
20197
20198
20199
20200
20201
20202
20203
20204
20205
20206
20207
20208
20209
20210
20211
20212
20213
20214
20215
20216
20217
20218
20219
20220
20221
20222
20223
20224
20225
20226
20227
20228
20229
20230
20231
20232
20233
20234
20235
20236
20237
20238
20239
20240
20241
20242
20243
20244
20245
20246
20247
20248
20249
20250
20251
20252
20253
20254
20255
20256
20257
20258
20259
20260
20261
20262
20263
20264
20265
20266
20267
20268
20269
20270
20271
20272
20273
20274
20275
20276
20277
20278
20279
20280
20281
20282
20283
20284
20285
20286
20287
20288
20289
20290
20291
20292
20293
20294
20295
20296
20297
20298
20299
20300
20301
20302
20303
20304
20305
20306
20307
20308
20309
20310
20311
20312
20313
20314
20315
20316
20317
20318
20319
20320
20321
20322
20323
20324
20325
20326
20327
20328
20329
20330
20331
20332
20333
20334
20335
20336
20337
20338
20339
20340
20341
20342
20343
20344
20345
20346
20347
20348
20349
20350
20351
20352
20353
20354
20355
20356
20357
20358
20359
20360
20361
20362
20363
20364
20365
20366
20367
20368
20369
20370
20371
20372
20373
20374
20375
20376
20377
20378
20379
20380
20381
20382
20383
20384
20385
20386
20387
20388
20389
20390
20391
20392
20393
20394
20395
20396
20397
20398
20399
20400
20401
20402
20403
20404
20405
20406
20407
20408
20409
20410
20411
20412
20413
20414
20415
20416
20417
20418
20419
20420
20421
20422
20423
20424
20425
20426
20427
20428
20429
20430
20431
20432
20433
20434
20435
20436
20437
20438
20439
20440
20441
20442
20443
20444
20445
20446
20447
20448
20449
20450
20451
20452
20453
20454
20455
20456
20457
20458
20459
20460
20461
20462
20463
20464
20465
20466
20467
20468
20469
20470
20471
20472
20473
20474
20475
20476
20477
20478
20479
20480
20481
20482
20483
20484
20485
20486
20487
20488
20489
20490
20491
20492
20493
20494
20495
20496
20497
20498
20499
20500
20501
20502
20503
20504
20505
20506
20507
20508
20509
20510
20511
20512
20513
20514
20515
20516
20517
20518
20519
20520
20521
20522
20523
20524
20525
20526
20527
20528
20529
20530
20531
20532
20533
20534
20535
20536
20537
20538
20539
20540
20541
20542
20543
20544
20545
20546
20547
20548
20549
20550
20551
20552
20553
20554
20555
20556
20557
20558
20559
20560
20561
20562
20563
20564
20565
20566
20567
20568
20569
20570
20571
20572
20573
20574
20575
20576
20577
20578
20579
20580
20581
20582
20583
20584
20585
20586
20587
20588
20589
20590
20591
20592
20593
20594
20595
20596
20597
20598
20599
20600
20601
20602
20603
20604
20605
20606
20607
20608
20609
20610
20611
20612
20613
20614
20615
20616
20617
20618
20619
20620
20621
20622
20623
20624
20625
20626
20627
20628
20629
20630
20631
20632
20633
20634
20635
20636
20637
20638
20639
20640
20641
20642
20643
20644
20645
20646
20647
20648
20649
20650
20651
20652
20653
20654
20655
20656
20657
20658
20659
20660
20661
20662
20663
20664
20665
20666
20667
20668
20669
20670
20671
20672
20673
20674
20675
20676
20677
20678
20679
20680
20681
20682
20683
20684
20685
20686
20687
20688
20689
20690
20691
20692
20693
20694
20695
20696
20697
20698
20699
20700
20701
20702
20703
20704
20705
20706
20707
20708
20709
20710
20711
20712
20713
20714
20715
20716
20717
20718
20719
20720
20721
20722
20723
20724
20725
20726
20727
20728
20729
20730
20731
20732
20733
20734
20735
20736
20737
20738
20739
20740
20741
20742
20743
20744
20745
20746
20747
20748
20749
20750
20751
20752
20753
20754
20755
20756
20757
20758
20759
20760
20761
20762
20763
20764
20765
20766
20767
20768
20769
20770
20771
20772
20773
20774
20775
20776
20777
20778
20779
20780
20781
20782
20783
20784
20785
20786
20787
20788
20789
20790
20791
20792
20793
20794
20795
20796
20797
20798
20799
20800
20801
20802
20803
20804
20805
20806
20807
20808
20809
20810
20811
20812
20813
20814
20815
20816
20817
20818
20819
20820
20821
20822
20823
20824
20825
20826
20827
20828
20829
20830
20831
20832
20833
20834
20835
20836
20837
20838
20839
20840
20841
20842
20843
20844
20845
20846
20847
20848
20849
20850
20851
20852
20853
20854
20855
20856
20857
20858
20859
20860
20861
20862
20863
20864
20865
20866
20867
20868
20869
20870
20871
20872
20873
20874
20875
20876
20877
20878
20879
20880
20881
20882
20883
20884
20885
20886
20887
20888
20889
20890
20891
20892
20893
20894
20895
20896
20897
20898
20899
20900
20901
20902
20903
20904
20905
20906
20907
20908
20909
20910
20911
20912
20913
20914
20915
20916
20917
20918
20919
20920
20921
20922
20923
20924
20925
20926
20927
20928
20929
20930
20931
20932
20933
20934
20935
20936
20937
20938
20939
20940
20941
20942
20943
20944
20945
20946
20947
20948
20949
20950
20951
20952
20953
20954
20955
20956
20957
20958
20959
20960
20961
20962
20963
20964
20965
20966
20967
20968
20969
20970
20971
20972
20973
20974
20975
20976
20977
20978
20979
20980
20981
20982
20983
20984
20985
20986
20987
20988
20989
20990
20991
20992
20993
20994
20995
20996
20997
20998
20999
21000
21001
21002
21003
21004
21005
21006
21007
21008
21009
21010
21011
21012
21013
21014
21015
21016
21017
21018
21019
21020
21021
21022
21023
21024
21025
21026
21027
21028
21029
21030
21031
21032
21033
21034
21035
21036
21037
21038
21039
21040
21041
21042
21043
21044
21045
21046
21047
21048
21049
21050
21051
21052
21053
21054
21055
21056
21057
21058
21059
21060
21061
21062
21063
21064
21065
21066
21067
21068
21069
21070
21071
21072
21073
21074
21075
21076
21077
21078
21079
21080
21081
21082
21083
21084
21085
21086
21087
21088
21089
21090
21091
21092
21093
21094
21095
21096
21097
21098
21099
21100
21101
21102
21103
21104
21105
21106
21107
21108
21109
21110
21111
21112
21113
21114
21115
21116
21117
21118
21119
21120
21121
21122
21123
21124
21125
21126
21127
21128
21129
21130
21131
21132
21133
21134
21135
21136
21137
21138
21139
21140
21141
21142
21143
21144
21145
21146
21147
21148
21149
21150
21151
21152
21153
21154
21155
21156
21157
21158
21159
21160
21161
21162
21163
21164
21165
21166
21167
21168
21169
21170
21171
21172
21173
21174
21175
21176
21177
21178
21179
21180
21181
21182
21183
21184
21185
21186
21187
21188
21189
21190
21191
21192
21193
21194
21195
21196
21197
21198
21199
21200
21201
21202
21203
21204
21205
21206
21207
21208
21209
21210
21211
21212
21213
21214
21215
21216
21217
21218
21219
21220
21221
21222
21223
21224
21225
21226
21227
21228
21229
21230
21231
21232
21233
21234
21235
21236
21237
21238
21239
21240
21241
21242
21243
21244
21245
21246
21247
21248
21249
21250
21251
21252
21253
21254
21255
21256
21257
21258
21259
21260
21261
21262
21263
21264
21265
21266
21267
21268
21269
21270
21271
21272
21273
21274
21275
21276
21277
21278
21279
21280
21281
21282
21283
21284
21285
21286
21287
21288
21289
21290
21291
21292
21293
21294
21295
21296
21297
21298
21299
21300
21301
21302
21303
21304
21305
21306
21307
21308
21309
21310
21311
21312
21313
21314
21315
21316
21317
21318
21319
21320
21321
21322
21323
21324
21325
21326
21327
21328
21329
21330
21331
21332
21333
21334
21335
21336
21337
21338
21339
21340
21341
21342
21343
21344
21345
21346
21347
21348
21349
21350
21351
21352
21353
21354
21355
21356
21357
21358
21359
21360
21361
21362
21363
21364
21365
21366
21367
21368
21369
21370
21371
21372
21373
21374
21375
21376
21377
21378
21379
21380
21381
21382
21383
21384
21385
21386
21387
21388
21389
21390
21391
21392
21393
21394
21395
21396
21397
21398
21399
21400
21401
21402
21403
21404
21405
21406
21407
21408
21409
21410
21411
21412
21413
21414
21415
21416
21417
21418
21419
21420
21421
21422
21423
21424
21425
21426
21427
21428
21429
21430
21431
21432
21433
21434
21435
21436
21437
21438
21439
21440
21441
21442
21443
21444
21445
21446
21447
21448
21449
21450
21451
21452
21453
21454
21455
21456
21457
21458
21459
21460
21461
21462
21463
21464
21465
21466
21467
21468
21469
21470
21471
21472
21473
21474
21475
21476
21477
21478
21479
21480
21481
21482
21483
21484
21485
21486
21487
21488
21489
21490
21491
21492
21493
21494
21495
21496
21497
21498
21499
21500
21501
21502
21503
21504
21505
21506
21507
21508
21509
21510
21511
21512
21513
21514
21515
21516
21517
21518
21519
21520
21521
21522
21523
21524
21525
21526
21527
21528
21529
21530
21531
21532
21533
21534
21535
21536
21537
21538
21539
21540
21541
21542
21543
21544
21545
21546
21547
21548
21549
21550
21551
21552
21553
21554
21555
21556
21557
21558
21559
21560
21561
21562
21563
21564
21565
21566
21567
21568
21569
21570
21571
21572
21573
21574
21575
21576
21577
21578
21579
21580
21581
21582
21583
21584
21585
21586
21587
21588
21589
21590
21591
21592
21593
21594
21595
21596
21597
21598
21599
21600
21601
21602
21603
21604
21605
21606
21607
21608
21609
21610
21611
21612
21613
21614
21615
21616
21617
21618
21619
21620
21621
21622
21623
21624
21625
21626
21627
21628
21629
21630
21631
21632
21633
21634
21635
21636
21637
21638
21639
21640
21641
21642
21643
21644
21645
21646
21647
21648
21649
21650
21651
21652
21653
21654
21655
21656
21657
21658
21659
21660
21661
21662
21663
21664
21665
21666
21667
21668
21669
21670
21671
21672
21673
21674
21675
21676
21677
21678
21679
21680
21681
21682
21683
21684
21685
21686
21687
21688
21689
21690
21691
21692
21693
21694
21695
21696
21697
21698
21699
21700
21701
21702
21703
21704
21705
21706
21707
21708
21709
21710
21711
21712
21713
21714
21715
21716
21717
21718
21719
21720
21721
21722
21723
21724
21725
21726
21727
21728
21729
21730
21731
21732
21733
21734
21735
21736
21737
21738
21739
21740
21741
21742
21743
21744
21745
21746
21747
21748
21749
21750
21751
21752
21753
21754
21755
21756
21757
21758
21759
21760
21761
21762
21763
21764
21765
21766
21767
21768
21769
21770
21771
21772
21773
21774
21775
21776
21777
21778
21779
21780
21781
21782
21783
21784
21785
21786
21787
21788
21789
21790
21791
21792
21793
21794
21795
21796
21797
21798
21799
21800
21801
21802
21803
21804
21805
21806
21807
21808
21809
21810
21811
21812
21813
21814
21815
21816
21817
21818
21819
21820
21821
21822
21823
21824
21825
21826
21827
21828
21829
21830
21831
21832
21833
21834
21835
21836
21837
21838
21839
21840
21841
21842
21843
21844
21845
21846
21847
21848
21849
21850
21851
21852
21853
21854
21855
21856
21857
21858
21859
21860
21861
21862
21863
21864
21865
21866
21867
21868
21869
21870
21871
21872
21873
21874
21875
21876
21877
21878
21879
21880
21881
21882
21883
21884
21885
21886
21887
21888
21889
21890
21891
21892
21893
21894
21895
21896
21897
21898
21899
21900
21901
21902
21903
21904
21905
21906
21907
21908
21909
21910
21911
21912
21913
21914
21915
21916
21917
21918
21919
21920
21921
21922
21923
21924
21925
21926
21927
21928
21929
21930
21931
21932
21933
21934
21935
21936
21937
21938
21939
21940
21941
21942
21943
21944
21945
21946
21947
21948
21949
21950
21951
21952
21953
21954
21955
21956
21957
21958
21959
21960
21961
21962
21963
21964
21965
21966
21967
21968
21969
21970
21971
21972
21973
21974
21975
21976
21977
21978
21979
21980
21981
21982
21983
21984
21985
21986
21987
21988
21989
21990
21991
21992
21993
21994
21995
21996
21997
21998
21999
22000
22001
22002
22003
22004
22005
22006
22007
22008
22009
22010
22011
22012
22013
22014
22015
22016
22017
22018
22019
22020
22021
22022
22023
22024
22025
22026
22027
22028
22029
22030
22031
22032
22033
22034
22035
22036
22037
22038
22039
22040
22041
22042
22043
22044
22045
22046
22047
22048
22049
22050
22051
22052
22053
22054
22055
22056
22057
22058
22059
22060
22061
22062
22063
22064
22065
22066
22067
22068
22069
22070
22071
22072
22073
22074
22075
22076
22077
22078
22079
22080
22081
22082
22083
22084
22085
22086
22087
22088
22089
22090
22091
22092
22093
22094
22095
22096
22097
22098
22099
22100
22101
22102
22103
22104
22105
22106
22107
22108
22109
22110
22111
22112
22113
22114
22115
22116
22117
22118
22119
22120
22121
22122
22123
22124
22125
22126
22127
22128
22129
22130
22131
22132
22133
22134
22135
22136
22137
22138
22139
22140
22141
22142
22143
22144
22145
22146
22147
22148
22149
22150
22151
22152
22153
22154
22155
22156
22157
22158
22159
22160
22161
22162
22163
22164
22165
22166
22167
22168
22169
22170
22171
22172
22173
22174
22175
22176
22177
22178
22179
22180
22181
22182
22183
22184
22185
22186
22187
22188
22189
22190
22191
22192
22193
22194
22195
22196
22197
22198
22199
22200
22201
22202
22203
22204
22205
22206
22207
22208
22209
22210
22211
22212
22213
22214
22215
22216
22217
22218
22219
22220
22221
22222
22223
22224
22225
22226
22227
22228
22229
22230
22231
22232
22233
22234
22235
22236
22237
22238
22239
22240
22241
22242
22243
22244
22245
22246
22247
22248
22249
22250
22251
22252
22253
22254
22255
22256
22257
22258
22259
22260
22261
22262
22263
22264
22265
22266
22267
22268
22269
22270
22271
22272
22273
22274
22275
22276
22277
22278
22279
22280
22281
22282
22283
22284
22285
22286
22287
22288
22289
22290
22291
22292
22293
22294
22295
22296
22297
22298
22299
22300
22301
22302
22303
22304
22305
22306
22307
22308
22309
22310
22311
22312
22313
22314
22315
22316
22317
22318
22319
22320
22321
22322
22323
22324
22325
22326
22327
22328
22329
22330
22331
22332
22333
22334
22335
22336
22337
22338
22339
22340
22341
22342
22343
22344
22345
22346
22347
22348
22349
22350
22351
22352
22353
22354
22355
22356
22357
22358
22359
22360
22361
22362
22363
22364
22365
22366
22367
22368
22369
22370
22371
22372
22373
22374
22375
22376
22377
22378
22379
22380
22381
22382
22383
22384
22385
22386
22387
22388
22389
22390
22391
22392
22393
22394
22395
22396
22397
22398
22399
22400
22401
22402
22403
22404
22405
22406
22407
22408
22409
22410
22411
22412
22413
22414
22415
22416
22417
22418
22419
22420
22421
22422
22423
22424
22425
22426
22427
22428
22429
22430
22431
22432
22433
22434
22435
22436
22437
22438
22439
22440
22441
22442
22443
22444
22445
22446
22447
22448
22449
22450
22451
22452
22453
22454
22455
22456
22457
22458
22459
22460
22461
22462
22463
22464
22465
22466
22467
22468
22469
22470
22471
22472
22473
22474
22475
22476
22477
22478
22479
22480
22481
22482
22483
22484
22485
22486
22487
22488
22489
22490
22491
22492
22493
22494
22495
22496
22497
22498
22499
22500
22501
22502
22503
22504
22505
22506
22507
22508
22509
22510
22511
22512
22513
22514
22515
22516
22517
22518
22519
22520
22521
22522
22523
22524
22525
22526
22527
22528
22529
22530
22531
22532
22533
22534
22535
22536
22537
22538
22539
22540
22541
22542
22543
22544
22545
22546
22547
22548
22549
22550
22551
22552
22553
22554
22555
22556
22557
22558
22559
22560
22561
22562
22563
22564
22565
22566
22567
22568
22569
22570
22571
22572
22573
22574
22575
22576
22577
22578
22579
22580
22581
22582
22583
22584
22585
22586
22587
22588
22589
22590
22591
22592
22593
22594
22595
22596
22597
22598
22599
22600
22601
22602
22603
22604
22605
22606
22607
22608
22609
22610
22611
22612
22613
22614
22615
22616
22617
|
2003-12-28 Mark Mitchell <mark@codesourcery.com>
PR c++/13081
* decl.c (duplicate_decls): Preserve inline-ness when redeclaring
a function template.
PR c++/12613
* decl.c (reshape_init): Reject GNU colon-style designated
initializers in arrays.
PR c++/13009
* call.c (build_special_member_call): Do not assume that we have a
pointer to the complete object in an assignment operator.
2003-12-28 Roger Sayle <roger@eyesopen.com>
PR c++/13070
* decl.c (duplicate_decls): When setting the type of an anticipated
declaration, merge the existing type attributes.
2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/13268, c++/13339
* class.c (add_method): Return early when method is error_mark_node.
* pt.c (tsubst_friend_function): Return early when new_friend is
error_mark_node.
2003-12-23 Mark Mitchell <mark@codesourcery.com>
* cp-lang.c (cp_expr_size): Return zero for empty classes.
* cp-tree.h (warn_if_uknown_interface): Remove unused function.
* decl2.c (warn_if_unknown_interface): Likewise.
2003-12-23 Nathan Sidwell <nathan@codesourcery.com>
PR c++/13387
* cp-lang.c (cxx_get_alias_set): Correct logic for a base type.
2003-12-22 Mark Mitchell <mark@codesourcery.com>
* decl.c (start_function): Do not check
flag_alt_external_templates or flag_external_templates.
* decl2.c (warn_if_unknown_interface): Likewise.
* lex.c (extract_interface_info): Likewise.
* pt.c (lookup_template_class): Likewise.
PR c++/12862
* name-lookup.c (pushdecl): Look up all namespace-scope entities
in their corresponding namespace.
PR c++/12397
* typeck.c (finish_class_member_access_expr): Don't tree
IDENTIFIER_NODEs as non-dependent expressions.
2003-12-22 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/5050
* tree.c (cp_start_inlining): Remove.
(cp_end_inlining): Remove.
* cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Do not define.
(LANG_HOOKS_TREE_INLINING_END_INLINING): Do not define.
* cp-tree.h (cp_start_inlining): Do not declare.
(cp_end_inlining): Do not declare.
2003-12-22 Mark Mitchell <mark@codesourcery.com>
PR c++/12479
* parser.c (cp_parser_declaration_seq_opt): Only issue "extra ;"
pedwarn when not in a system header.
2003-12-21 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (cp_tree_index): Remove CPTI_RECORD_TYPE,
CPTI_UNION_TYPE, CPTI_ENUM_TYPE.
(record_type_node): Remove.
(union_type_node): Likewise.
(enum_type_node): Likewise.
* decl.c: Remove mention of above tree nodes in comment.
* lex.c (cxx_init): Do not assign to record_type_node,
union_type_node, or enum_type_node. Simplify handling of
class_type_node.
PR c++/11554
* init.c (sort_mem_initializers): Add warning.
2003-12-21 Kazu Hirata <kazu@cs.umass.edu>
* call.c: Fix comment formatting.
* class.c: Likewise.
* cp-tree.h: Likewise.
* cvt.c: Likewise.
* cxx-pretty-print.c: Likewise.
* decl.c: Likewise.
* decl2.c: Likewise.
* error.c: Likewise.
* except.c: Likewise.
* init.c: Likewise.
* name-lookup.c: Likewise.
* parser.c: Likewise.
* pt.c: Likewise.
* rtti.c: Likewise.
* semantics.c: Likewise.
* typeck.c: Likewise.
* typeck2.c: Likewise.
2003-12-19 Kazu Hirata <kazu@cs.umass.edu>
* cvt.c: Remove uses of "register" specifier in
declarations of arguments and local variables.
* decl.c: Likewise.
* decl2.c: Likewise.
* expr.c: Likewise.
* friend.c: Likewise.
* lex.c: Likewise.
* name-lookup.c: Likewise.
* repo.c: Likewise.
* search.c: Likewise.
* tree.c: Likewise.
* typeck.c: Likewise.
* typeck2.c: Likewise.
2003-12-19 Mark Mitchell <mark@codesourcery.com>
PR c++/12795
* name-lookup.c (pushdecl): Do not treated any functions as being
"nested" in C++.
2003-12-19 Jason Merrill <jason@redhat.com>
PR c++/13371
* typeck.c (build_modify_expr): Stabilize lhs if we're narrowing.
* cvt.c (convert_to_void): Don't warn about the RHS of a comma
being useless if TREE_NO_UNUSED_WARNING is set.
2003-12-18 Richard Henderson <rth@redhat.com>
* cp-tree.h (struct lang_type_header): Remove __extension__.
2003-12-18 Jason Merrill <jason@redhat.com>
PR c++/12253
* init.c (build_vec_init): Initialization of an element from
an initializer list is also a full-expression.
* parser.c, pt.c, semantics.c: Rename constant_expression_p
to integral_constant_expression_p.
2003-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/13262
* pt.c (instantiate_decl): Wrap push_nested_class and
pop_nested_class around cp_finish_decl call for static member
variable.
2003-12-18 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/9154
* parser.c (cp_parser_template_argument): A type-id followed by '>>'
is just an user typo, and should be accepted as last resort if any
other parsing fails.
(cp_parser_enclosed_template_argument_list): If the argument list is
parsed correctly, but the next token is '>>', emit a diagnostic.
(cp_parser_next_token_ends_template_argument): Accept '>>' as
delimiter of template argument, it will be later detected as a typo.
2003-12-17 Kelley Cook <kcook@gcc.gnu.org>
* Make-lang.in: Replace cp/g++.1 with $(docobjdir)/g++.1.
2003-12-17 Mark Mitchell <mark@codesourcery.com>
PR c++/10603
PR c++/12827
* parser.c (cp_parser_error): Help c_parse_error print good
messages if the next token is a keyword.
(cp_parser_parameter_declaration_list): When resynchronizing after
a bad parameter declaration, stop if a comma is found.
(cp_parser_parameter_declaration): Avoid backtracking.
2003-12-16 Mark Mitchell <mark@codesourcery.com>
PR c++/12696
* decl.c (reshape_init): Recover quickly from errors.
2003-12-16 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9043
C++ ABI change: Mangling array indices in templates.
* decl.c (compute_array_index_type): Reorganize for earlier
template errors. Use value_dependent_expression_p for abi-2.
* mangle.c (write_array_type): Check broken mangling for
expression indices on abi-1
2003-12-16 Mark Mitchell <mark@codesourcery.com>
PR c++/12696
* decl.c (reshape_init): Recover quickly from errors.
PR c++/13275
* lex.c (reswords): Add "__offsetof" and "__offsetof__".
* parser.c (cp_parser): Add in_offsetof_p.
(cp_parser_new): Initialize it.
(cp_parser_primary_expression): Handle __offsetof__ (...).
(cp_parser_postfix_expression): Allow casts to pointer type and
uses of "->" in a constant expression if implementing offsetof.
(cp_parser_unary_expression): Allow the use of "&" in a constant
expression if implementing offsetof.
2003-12-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/2294
* name-lookup.c (push_overloaded_decl): always construct an OVERLOAD
if the declaration comes from an using declaration.
2003-12-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
* semantics.c (finish_id_expression): Refactor the code to handle
template parameters, and emit a more informative error message
when they are used within an integral constant expression.
2003-12-16 Nathan Sidwell <nathan@codesourcery.com>
PR c++/13387
* class.c (finish_struct_1): Compute mode and alias set for
CLASSTYPE_AS_BASE.
* call.c (build_over_call): Use CLASSTYPE_AS_BASE for trivial
assignment of a class, as necessary.
* cp-lang.c (cxx_get_alias_set): The alias set as a base is the
same as for the complete type.
PR c++/13242
C++ ABI change. Mangling template parameters of reference type
* mangle.c (write_template_args): Remove unreachable code.
(write_template_arg): Look through an argument of reference type.
2003-12-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/2294
* name-lookup.c (push_overloaded_decl): always construct an OVERLOAD
if the declaration comes from an using declaration.
2003-12-15 Mark Mitchell <mark@codesourcery.com>
PR c++/10926
* decl2.c (grokfield): Robustify.
PR c++/11116
* parser.c (cp_parser_throw_expression): Determine whether or not
an assignment-expression is present by doing one-token lookahead.
PR c++/13269
* parser.c (cp_parser_function_definition_after_declarator): Stop
scanning tokens when reaching EOF.
PR c++/12989
* typeck.c (cxx_sizeof_or_alignof_expr): Robustify.
PR c++/13310
* pt.c (dependent_template_p): Handle OVERLOADs.
2003-12-15 Mark Mitchell <mark@codesourcery.com>
PR c++/13243
PR c++/12573
* parser.c (cp_parser_postfix_expression): Tighten handling of
integral constant expressions.
(cp_parser_unary_expression): Likewise.
* pt.c (value_dependent_expression_p): Remove handling for
COMPONENT_REFs.
2003-12-15 Nathan Sidwell <nathan@codesourcery.com>
* class.c (add_method): Disallow destructor for java classes.
* decl.c (xref_basetypes): Check java class inheritance.
* decl2.c (check_java_method): Skip artificial params.
PR c++/13241
C++ ABI change. Mangling of symbols in expressions.
* mangle.c (write_mangled_name): Add top_level flag. Rework for
nested and unnested mangling. Deal with abi version 1 and version
2 differences.
(write_expression): Adjust write_mangled_name call.
(mangle_decl_string): Use write_mangled_name for all non-type decls.
2003-12-14 Mark Mitchell <mark@codesourcery.com>
PR c++/10779
PR c++/12160
* parser.c (struct cp_parser): Add in_template_argument_list_p.
(cp_parser_error): Use c_parse_error.
(cp_parser_name_lookup_error): New function.
(cp_parser_new): Initialize it.
(cp_parser_declarator): Add parenthesized_p parameter.
(cp_parser_nested_name_specifier_opt): Use
cp_parser_name_lookup_error.
(cp_parser_parenthesized_expression_list): Improve comments.
(cp_parser_condition): Adjust call to cp_parser_declarator.
(cp_parser_template_parameter): Adjust call to
cp_parser_parameter_declaration.
(cp_parser_template_argument_list): Set
in_template_argument_list_p.
(cp_parser_explicit_instantiation): Adjust call to
cp_parser_declarator.
(cp_parser_simple_type_specifier): Remove unncessary code.
(cp_parser_using_declaration): Use cp_parser_name_lookup_error.
(cp_parser_init_declarator): Handle member function definitions.
(cp_parser_direct_declarator): Adjust call to
cp_parser_declarator.
(cp_parser_type_id): Adjust call to cp_parser_declarator.
(cp_parser_parameter_declaration_list): Avoid backtracking where
possible.
(cp_parser_parameter_declaration): Add parenthesized_p parameter.
(cp_parser_function_definition): Remove.
(cp_parser_member_declaration): Do not backtrack to look for
function definitions.
(cp_parser_exception_declaration): Adjust call to
cp_parser_declarator.
(cp_parser_single_declaration): Handle function definitions via
cp_parser_init_declarator.
(cp_parser_save_member_function_body): New function.
2003-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/13106
* decl.c (finish_function): Check if return type is dependent before
issuing no return statement warning.
2003-12-12 Nathan Sidwell <nathan@codesourcery.com>
PR c++/13118
* cp-tree.h (lang_decl_u): Add thunk_alias member.
(THUNK_VIRTUAL_OFFSET): Must be a FUNCTION_DECL.
(THUNK_ALIAS_P): Remove.
(THUNK_ALIAS): Adjust.
* class.c (update_vtable_entry_for_fn): Get the vbase within the
overriding function's return type.
(dump_thunk): Adjust THUNK_ALIAS printing.
(build_vtbl_initializer): Adjust THUNK_ALIAS use.
* method.c (make_thunk): Revert 12881 test change. Clear
THUNK_ALIAS.
(finish_thunk): Adjust THUNK_ALIAS setting.
(use_thunk): Adjust THUNK_ALIAS use.
* semantics.c (emit_associated_thunks): Likewise.
PR c++/13114, c++/13115
* class.c (layout_empty_base): Propagate the move of an empty base
to offset zero.
PR c++/12881
* method.c (make_thunk): Deal with thunk aliases when searching
for a thunk. Robustify assertion.
2003-12-11 Nathan Sidwell <nathan@codesourcery.com>
* mangle.c (conv_type_names): Holds IDENTIFIER_NODEs only.
(hash_type): Use TYPE_UID of the identifier's type.
(compare_type): Adjust.
(mangle_conv_op_name_for_type): Store identifier nodes only, use
TYPE_UID has hash value.
2003-12-10 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (DECL_CONV_FN_P): Check that DECL_NAME is non-NULL.
2003-12-08 Matt Austern <austern@apple.com>
PR c/13134
* decl.c (duplicate_decls): Copy visibility flag when appropriate.
2003-12-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
* init.c (build_new_1): Deal with an OVERLOAD set when
looking up for _Jv_AllocObject.
* except.c (build_throw): Likewise for _Jv_Throw.
2003-12-08 Jason Merrill <jason@redhat.com>
PR c++/11971
* tree.c (build_local_temp): Split out from build_cplus_new.
(force_target_expr): New fn.
* call.c (call_builtin_trap): Call it. Take a type parm.
(convert_arg_to_ellipsis): Pass it.
(build_x_va_arg): Use call_builtin_trap.
PR c++/11929
* call.c (magic_varargs_p): New fn.
(build_over_call): Do no ellipsis conversions for arguments to
functions with magic varargs.
* name-lookup.c, init.c, except.c: Revert Giovanni's patch from
yesterday.
Give the anonymous namespace a null DECL_NAME.
* cp-tree.h: Don't declare anonymous_namespace_name.
* decl.c: Don't define it.
* dump.c (cp_dump_tree): Don't check for it.
* cxx-pretty-print.c (pp_cxx_original_namespace_definition): Likewise.
* error.c (dump_decl): Likewise.
* name-lookup.c: Define it here.
(push_namespace): Put it in DECL_ASSEMBLER_NAME instead.
* mangle.c (write_unqualified_name): Adjust.
2003-12-07 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/2294
* name-lookup.c (push_overloaded_decl): Always construct an
OVERLOAD unless the declaration is a built-in.
(set_namespace_binding): While binding OVERLOADs with only one
declaration, we still need to call supplement_binding.
* init.c (build_new_1): Deal with an OVERLOAD set when
looking up for _Jv_AllocObject.
* except.c (build_throw): Likewise for _Jv_Throw.
2003-12-06 Mark Mitchell <mark@codesourcery.com>
PR c++/13323
* class.c (same_signature_p): Handle conversion operators
correctly.
(check_for_override): Likewise.
2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
* Make-lang.in (GXX_CROSS_NAME, CXX_CROSS_NAME): Delete.
(c++.install_common, cp/g++.1, c++.install-man): Adjust for above.
(c++.uninstall): Likewise.
2003-12-05 Danny Smith <dannysmith@gcc.gnu.org>
Mark Mitchell <mark@codesourcery.com>
PR c++/13305
* parser.c (cp_parser_elaborated_type_specifier): Accept
attributes.
2003-12-05 Mark Mitchell <mark@codesourcery.com>
PR c++/13314
* parser.c (cp_parser_class_specifier): Match push_scope/pop_scope
calls.
(cp_parser_class_head): Likewise.
2003-12-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/13166
* parser.c (cp_parser_late_parsing_default_args): Make sure the
context is a class before calling push_nested_class and
pop_nested_class.
2003-12-03 James E Wilson <wilson@specifixinc.com>
* g++spec.c (lang_specific_driver): Delete USE_LIBUNWIND_EXCEPTIONS
support.
2003-12-03 Mark Mitchell <mark@codesourcery.com>
PR c++/9127
* cp-tree.h (at_namespace_scope_p): New function.
* parser.c (cp_parser_class_head): Handle invalid explicit
specializations.
* search.c (at_namespace_scope_p): New function.
PR c++/13179
* semantics.c (finish_handler_parms): Do not call eh_type_info for
types used in templates.
PR c++/10771
* parser.c (cp_parser_check_for_invalid_template_id): New
function.
(cp_parser_simple_type_specifier): Use it.
(cp_parser_elaborated_type_specifier): Likewise.
(cp_parser_class_head): Likewise.
2003-12-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/10126
* pt.c (convert_nontype_argument): Handle default conversions
while converting a pointer to member function.
2003-12-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/12573
* pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
looking into them recursively.
2003-12-02 Richard Henderson <rth@redhat.com>
* name-lookup.h (struct cp_binding_level): Use ENUM_BITFIELD.
* parser.c (struct cp_token): Likewise.
(struct cp_parser_token_tree_map_node): Likewise.
* lex.c (struct resword): Move const after ENUM_BITFIELD.
2003-11-30 Mark Mitchell <mark@codesourcery.com>
PR c++/9849
* parser.c (cp_lexer_prev_token): New function.
(cp_parser_skip_to_closing_parenthesis): Add consume_paren
parameter.
(cp_parser_nested_name_specifier_opt): Add is_declaration
parameter.
(cp_parser_nested_name_specifier): Likewise.
(cp_parser_class_or_namespace_name): Likewise.
(cp_parser_class_name): Likewise.
(cp_parser_template_id): Likewise.
(cp_parser_template_name): Likewise.
(cp_parser_id_expression): Adjust calls to
cp_parser_nested_name_specifier_op, cp_parser_template_id,
cp_parser_class_name.
(cp_parser_unqualified_id): Likewise.
(cp_parser_postfix_expression): Likewise.
(cp_parser_pseudo_destructor_name): Likewise.
(cp_parser_cast_expression): Likewise.
(cp_parser_mem_initializer_id): Likewise.
(cp_parser_simple_type_specifier): Likewise.
(cp_parser_type_name): Likewise.
(cp_parser_elaborated_type_specifier): Likewise.
(cp_parser_qualified_namespace_specifier): Likewise.
(cp_parser_using_declaration): Likewise.
(cp_parser_using_directive): Likewise.
(cp_parser_ptr_operator): Likewise.
(cp_parser_declarator_id): Likewise.
(cp_parser_class_head): Likewise.
(cp_parser_base_specifier): Likewise.
(cp_parser_constructor_declarator_p): Likewise.
(cp_parser_direct_declarator): Fix typo in comment.
(cp_parser_parenthesized_expression_list): Adjust call to
cp_parser_skip_to_closing_parenthesis.
(cp_parser_selection_statement): Likewise.
2003-11-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/12924
* typeck.c (finish_class_member_access_expr): Handle TEMPLATE_ID_EXPR
with OVERLOAD and DECL nodes as the first operand.
2003-11-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* pt.c (tsubst) <ARRAY_REF>: Remove erroneous argument to build_nt.
2003-11-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/5369
* friend.c (is_friend): Handle member function of a class
template as template friend.
(do_friend): Likewise.
* decl2.c (check_classfn): Add template_header_p parameter.
* decl.c (start_decl): Adjust check_classfn call.
(grokfndecl): Likewise.
* pt.c (is_specialization_of_friend): New function.
(uses_template_parms_level): Likewise.
(push_template_decl_real): Use uses_template_parms_level.
(tsubst_friend_function): Adjust check_classfn call.
* cp-tree.h (check_classfn): Adjust declaration.
(uses_template_parms_level): Add declaration.
(is_specialization_of_friend): Likewise.
2003-11-21 Mark Mitchell <mark@codesourcery.com>
PR c++/12515
* pt.c (build_non_dependent_expr): Handle GNU extension to ?:
operator.
2003-11-21 Jan Hubicka <jh@suse.cz>
* parser.c (cp_parser_postfix_expression): Initialize 's' to
NULL_TREE.
2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
* Make-lang.in (c++.extraclean): Delete.
2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
* Make-lang.in (check-g++, lang_checks): Add.
2003-11-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/12932
* class.c (currently_open_derived_class): Check if
current_class_type is NULL_TREE.
* semantics.c (finish_call_expr): Check if
currently_open_derived_class returns NULL_TREE.
* cp-tree.h (DERIVED_FROM_P): Add parenthesis around PARENT
parameter.
2003-11-17 Jason Merrill <jason@redhat.com>
* init.c (build_new_1): Preevaluate placement args.
* call.c (build_op_delete_call): Don't expose placement args to
overload resolution.
2003-11-16 Jason Merrill <jason@redhat.com>
* Make-lang.in (c++.tags): Create TAGS.sub files in each directory
and TAGS files that include them for each front end.
2003-11-15 Bernardo Innocenti <bernie@develer.com>
PR c++/2294
* name-lookup.c: Revert previous patch for PR c++/2294 to prevent
build failure on libjava.
2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
PR c++/2294
* name-lookup.c (push_overloaded_decl): Always construct an OVERLOAD
unless the declaration is a built-in.
(set_namespace_binding): While binding OVERLOADs with only one
declaration, we still need to call supplement_binding.
2003-11-14 Mark Mitchell <mark@codesourcery.com>
PR c++/12762
* parser.c (cp_parser_enclosed_template_argument_list): New
function.
(cp_parser_template_id): Use it.
(cp_parser_simple_type_specifier): Recognize invalid template
syntax.
2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
PR c++/2094
* pt.c (unify): Add support for PTRMEM_CST and
FIELD_DECL unification.
2003-11-13 Richard Earnshaw <rearnsha@arm.com>
* decl.c (grokfndecl): Change OK to type tree.
2003-11-12 Mark Mitchell <mark@codesourcery.com>
* tree.c (build_target_expr_with_type): Treate VA_ARG_EXPR like
CONSTRUCTOR.
* decl.c (cp_make_fname_decl): When creating a top-level
__FUNCTION__-like symbol, do register it with pushdecl.
* decl.c (finish_case_label): Do not check that we are within a
switch statement here.
* parser.c (struct cp_parser): Add in_iteration_statement_p and
in_switch_statement_p.
(cp_parser_new): Initialize them.
(cp_parser_labeled_statement): Check validity of case labels
here.
(cp_parser_selection_statement): Set in_switch_statement_p.
(cp_parser_iteration_statement): Set in_iteration_statement_p.
(cp_parser_jump_statement): Check validity of break/continue
statements here.
PR c++/12735
* cp-tree.h (duplicate_decls): Return a tree.
* decl.c (duplicate_decls): Clarify documentation. Return
error_mark_node to indicate a failed redeclaration.
* friend.c (do_friend): Handle that case.
* name-lookup.c (pushdecl): Likewise.
2003-11-11 Jason Merrill <jason@redhat.com>
* cp-tree.h (DECL_NAMESPACE_ASSOCIATIONS): New macro.
* name-lookup.c (parse_using_directive): New fn.
(is_associated_namespace): New fn.
(arg_assoc_namespace): Also check associated namespaces.
* name-lookup.h: Declare new fns.
* pt.c (maybe_process_partial_specialization): Allow
specialization in associated namespace.
* parser.c (cp_parser_using_directive): Accept attributes. Use
parse_using_directive.
2003-11-10 Richard Henderson <rth@redhat.com>
* cvt.c (convert_to_void): Use void_zero_node after overload failure.
2003-11-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/12832
* name-lookup.c (supplement_binding): Gracefully handle names
used at non-class scope prior declaration.
2003-11-06 Matt Austern <austern@apple.com>
* decl.c (duplicate_decls): copy DECL_VISIBILITY field.
* method.c (use_thunk): give thunk same visibility as function.
* optimize.c (maybe_clone_body): copy DECL_VISIBILITY field.
2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/11616
* pt.c (instantiate_pending_templates): Save and restore
input_location.
2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/2019
* friend.c (add_friend): Don't display previous declaration in
case of duplicate friend warning.
2003-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9810
* call.c (build_over_call): Check access using primary template
if FN is a member function template.
2003-11-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/12796
* class.c (handle_using_decl): Set input_location before calling
error_not_base_type.
2003-10-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10371
* semantics.c (finish_non_static_data_member): Handle when
both processing_template_decl and qualifying_scope are true.
2003-10-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/11076
* class.c (handle_using_decl): Swap arguments of error_not_base_type.
* parser.c (cp_parser_direct_declarator): Only resolve typename for
namespace scope declarations.
2003-10-24 Nathan Sidwell <nathan@codesourcery.com>
PR c++/12698, c++/12699, c++/12700, c++/12566
* cp-tree.h (THUNK_ALIAS_P, THUNK_ALIAS): New.
(debug_class, debug_thunks): New.
* class.c (dump_class_hierarchy_1): New break out from ...
(dump_class_hierarchy): ... here.
(dump_thunk, debug_thunks, debug_class): New.
(update_vtable_entry_for_fn): Add ssizetype casts. Correct
continued search for primary binfo via virtual.
(build_vtbl_initializer): Follow covariant thunk alias.
* method.c (make_thunk): Clear DECL_THUNKS of the thunk.
(finish_thunk): Look for an alias of the covariant thunk and point
to it.
(use_thunk): We should never use an alias.
* semantics.c (emit_associated_thunks): Do not emit aliases.
PR c++/12566
* cp-tree.h (cp_fname_init): Add TYPE pointer param.
* decl.c (cp_fname_init): Add TYPE pointer param. Set it. Don't
create an ad-hoc ERROR_MARK.
(cp_make_fname_decl): Adjust.
* pt.c (tsubst_expr): Adjust.
2003-10-23 Jason Merrill <jason@redhat.com>
PR c++/12726
* tree.c (build_target_expr_with_type): Don't call force_rvalue
for CONSTRUCTORs.
2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
* call.c: Fix comment formatting.
* class.c: Likewise.
* cxx-pretty-print.c: Likewise.
* init.c: Likewise.
* parser.c: Likewise.
* pt.c: Likewise.
* semantics.c: Likewise.
* tree.c: Likewise.
* typeck.c: Likewise.
* typeck2.c: Likewise.
2003-10-21 Mark Mitchell <mark@codesourcery.com>
PR c++/11962
* typeck.c (build_x_conditional_expr): Handle missing middle
operands in templates.
* mangle.c (write_expression): Issue errors about attempts to
mangle a non-existant middle operator to the ?: operator.
2003-10-21 Robert Bowdidge <bowdidge@apple.com>
* decl.c (cp_finish_decl): Remove clause intended for asm directives
in struct or class fields: this code is never executed.
2003-10-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* decl.c (start_decl): Exit if push_template_decl returns
error_mark_node.
2003-10-20 Kazu Hirata <kazu@cs.umass.edu>
* ChangeLog: Fix typos.
* call.c: Fix comment typos.
* class.c: Likewise.
* cp-tree.h: Likewise.
* cvt.c: Likewise.
* cxx-pretty-print.c: Likewise.
* decl.c: Likewise.
* decl2.c: Likewise.
* init.c: Likewise.
* mangle.c: Likewise.
* name-lookup.c: Likewise.
* parser.c: Likewise.
* search.c: Likewise.
* semantics.c: Likewise.
* tree.c: Likewise.
* typeck.c: Likewise.
2003-10-20 Jan Hubicka <jh@suse.cz>
* decl.c (start_cleanup_fn): Set DECL_DECLARED_INLINE_P to deffer
the expansion.
2003-10-20 Mark Mitchell <mark@codesourcery.com>
* Make-lang.in (c++.install-info): Remove.
2003-10-20 Jason Merrill <jason@redhat.com>
* class.c (layout_class_type): Set DECL_ARTIFICIAL on padding
field.
2003-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9781, c++/10583, c++/11862
* decl.c (cp_finish_decl): Exit immediately if decl is an
error_mark_node.
* pt.c (push_template_decl_real): Return error_mark_node for
invalid template declaration of variable.
2003-10-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/12495
* pt.c (lookup_template_class): Handle when current_class_type
is a local class.
2003-10-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/2513
* decl.c (make_typename_type): Use dependent_type_p.
(make_unbound_class_template): Likewise.
* pt.c (instantiate_class_template): Increment
processing_template_decl during substitution of template friend
function. Preincrement processing_template_decl rather than
postincrement.
(get_mostly_instantiated_function_type): Increment
processing_template_decl during partial substitution of function
type.
2003-10-15 Jan Hubicka <jh@suse.cz>
PR c++/12574
* decl2.c (cxx_callgraph_analyze_expr): Deal with baselink.
2003-10-14 Jason Merrill <jason@redhat.com>
PR c++/11878
* tree.c (build_target_expr_with_type): Call force_rvalue for
classes with non-trivial copy ctors.
PR c++/11063
* typeck.c (build_modify_expr): Call convert rather than abort.
2003-10-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
Breack out decl.c (3/n)
* name-lookup.c: Include flags.h
(lookup_name_current_level): Make static.
(add_decl_to_level): Likewise.
(push_local_binding): Likewise.
(push_overloaded_decl): Likewise.
(lookup_using_namespace): Likewise.
(qualified_lookup_using_namespace): Likewise.
(lookup_type_current_level): Likewise.
(unqualified_namespace_lookup): Likewise.
(namespace_ancestor): Likewise.
(push_using_directive): Likewise.
* decl.c (pushdecl): Move to name-lookup.c.
(pushdecl_top_level_1): Likewise.
(pushdecl_top_level): Likewise.
(pushdecl_top_level_and_finish): Likewise.
(maybe_push_decl): Likewise.
(push_using_decl): Likewise.
(push_overloaded_decl): Likewise.
(make_anon_name): Likewise.
(anon_cnt): Likewise.
(clear_anon_tags): Likewise.
(maybe_inject_for_scope_var): Likewise.
(check_for_out_of_scope_variable): Likewise.
* Make-lang.in (cp/name-lookup.o): Depend on flags.h.
* decl.c (warn_extern_redeclared_static): Export.
* cp-tree.h (warn_extern_redeclared_static): Declare.
2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
* Make-lang.in: Replace uses of $(target_alias) with
$(target_noncanonical).
2003-10-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* ChangeLog: Add PR number to patch for PR c++/12370.
2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
* name-lookup.h (cxx_scope_find_binding_for_name): Don't export.
(binding_for_name): Likewise.
(cxx_binding_clear): Move to name-lookup.c.
* name-lookup.c (cxx_scope_find_binding_for_name): Now static.
(binding_for_name): Likewise.
* decl2.c (is_ancestor): Move to name-lookup.c
(namespace_ancestor): Likewise.
(add_using_namespace): Likewise.
(ambiguous_decl): Likewise.
(lookup_using_namespace): Likewise.
(qualified_lookup_using_namespace): Likewise.
(set_decl_namespace): Likewise.
(decl_namespace): Likewise.
(current_decl_namespace): Likewise.
(push_decl_namespace): Likewise.
(pop_decl_namespace): Likewise.
(push_scope): Likewise.
(pop_scope): Likewise.
(struct arg_lookup): Likewise.
(arg_assoc): Likewise.
(arg_assoc_args): Likewise.
(arg_assoc_type): Likewise.
(add_function): Likewise.
(arg_assoc_namespace): Likewise.
(arg_assoc_class): Likewise.
(arg_assoc_template_arg): Likewise.
(do_namespace_alias): Likewise.
(validate_nonmember_using_decl): Likewise.
(do_nonmember_using_decl): Likewise.
(do_toplevel_using_decl): Likewise.
(do_local_using_decl): Likewise.
(do_class_using_decl): Likewise.
(do_using_directive): Likewise.
(constructor_name_full): Likewise.
(constructor_name): Likewise.
(constructor_name_p): Likewise.
2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
Break out decl.c (2/n)
* name-lookup.c: Include diagnostic.h
(cxx_binding_free): Make static.
(cxx_binding_make): Likewise.
(binding_table_new): Likewise
(binding_table_free): Likewise.
(binding_table_insert): Likewise.
(binding_table_find_anon_type): Likewise.
(binding_table_reverse_maybe_remap): Likewise.
(supplement_binding): Likewise.
* name-lookup.h (global_scope_name): Declare extern.
(global_type_node): Likewise.
(cxx_binding_free): Don't export.
(cxx_binding_make): Likewise.
(binding_table_new): Likewise.
(binding_table_free): Likewise.
(binding_table_insert): Likewise.
(binding_table_find_anon_type): Likewise.
(binding_table_reverse_maybe_remap): Likewise.
* Make-lang.in (cp/name-lookup.o): Depend on $(DIAGNOSTIC_H)
* decl.c (lookup_namespace_name): Move to name-lookup.c
(select_decl): Likewise.
(unqualified_namespace_lookup): Likewise.
(lookup_qualified_name): Likewise.
(lookup_name_real): Likewise.
(lookup_name_nonclass): Likewise.
(lookup_function_nonclass): Likewise.
(lookup_name): Likewise.
(lookup_name_current_level): Likewise.
(lookup_type_current_level): Likewise.
(lookup_flags): Likewise.
(qualify_lookup): Likewise.
(lookup_tag): Likewise.
(lookup_tag_reverse): Likewise.
(getdecls): Likewise.
(storedecls): Remove.
(cxx_remember_type_decls): Move to name-lookup.c.
(global_bindings_p): Likewise.
(innermost_nonclass_level): Likewise.
(toplevel_bindings_p): Likewise.
(namespace_bindings_p): Likewise.
(kept_level_p): Likewise.
(innermost_scope_kind): Likewise.
(template_parm_scope_p): Likewise.
(push_binding): Likewise.
(push_local_binding): Likewise.
(add_decl_to_level): Likewise. Make extern.
(push_class_binding): Move to name-lookup.c.
(resume_level): Likewise. Rename to resume_scope.
(begin_scope): Move to name-lookup.c.
(indent): Likewise.
(binding_depth): Likewise.
(is_class_level): Likewise.
(cxx_scope_descriptor): Likewise.
(cxx_scope_debug): Likewise.
(namespace_scope_ht_size): Likewise.
(leave_scope): Likewise.
(pushlevel_class): Likewise.
(poplevel_class): Likewise.
(clear_identifier_class_values): Likewise.
(pushdecl_with_scope): Likewise.
(pushdecl_namespace_level): Likewise.
(pushdecl_class_level): Likewise.
(push_class_level_binding): Likewise.
(push_using_directive): Likewise.
(identifier_global_value): Likewise.
(keep_next_level_flag): Likewise.
(keep_next_level): Likewise.
(free_binding_level): Likewise.
(set_class_shadows): Likewise.
(maybe_push_cleanup_level): Likewise.
(cp_namespace_decls): Likewise.
(bt_print_entry): Likewise.
(print_binding_level): Likewise.
(print_other_binding_stack): Likewise.
(print_binding_stack): Likewise.
(push_namespace): Likewise.
(pop_namespace): Likewise.
(push_nested_namespace): Likewise.
(pop_nested_namespace): Likewise.
(cxx_saved_binding_make): Likewise.
(struct cxx_saved_binding_make): Likewise.
(store_bindings): Likewise.
(maybe_push_to_top_level): Likewise.
(push_to_top_level): Likewise.
(pop_from_top_level): Likewise.
(identifier_type_value): Likewise.
(set_identifier_type_value): Likewise.
(set_identifier_type_value_with_scope): Likewise.
(pop_everything): Likewise.
(pushtag): Likewise.
(follow_tag_typedef): Likewise.
(maybe_process_template_type_declaration): Likewise.
(pop_binding): Likewise.
* cp-tree.h: Move corresponding declarations to name-lookup.h
2003-10-12 Steven Bosscher <steven@gcc.gnu.org>
* cvt.c (ocp_convert): Move warning to C common code.
2003-10-09 Jason Merrill <jason@redhat.com>
PR c++/6392
* tree.c (build_cplus_array_type): Handle all quals the same.
(cp_build_qualified_type_real): Look through arrays first.
* tree.c (build_cplus_new): Use build_decl to create a VAR_DECL.
(build_target_expr_with_type): Likewise.
* pt.c (instantiate_class_template): Sanity check that our
enclosing class has been instantiated.
2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
* cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS.
* error.c (dump_function_decl): Use it to skip the dump of the
arguments.
(dump_expr): When dumping a declaration found within an
expression, always set TFF_NO_FUNCTION_ARGUMENTS
in the flags.
2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
PR c++/11097
* pt.c (tsubst_decl): Substitute also the DECL_NAME node of
USING_DECL.
2003-10-06 Mark Mitchell <mark@codesourcery.com>
PR c++/10147
* call.c (initialize_reference): Tweak error message.
* cxx-pretty-print.h (cxx_pretty_printer_flags): Remove
pp_cxx_flag_qualified_id and pp_cxx_flag_global_scope.
* cxx-pretty-print.c (pp_cxx_id_expression): Always display
qualified entities using qualified names.
PR c++/12337
* init.c (build_new_1): Make sure that the expression returned is
not an lvalue.
PR c++/12344, c++/12236, c++/8656
* decl.c (start_function): Do not ignore attributes embedded in a
function declarator.
2003-10-06 Mark Mitchell <mark@codesourcery.com>
* Make-lang.in (c++.info): Remove.
(c++.dvi): Remove.
(c++.generated-manpages): Replace with ...
(generated-manpages): ... this.
2003-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
* decl.c (struct cp_binding_level): Move to name-lookup.h
(current_binding_level): Likewise.
(class_binding_level): Likewise.
* cp-tree.h (enum scope_kind): Likewise.
2003-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
* name-lookup.c (binding_entry_free): Nullify name and type
fields.
2003-10-02 Mark Mitchell <mark@codesourcery.com>
PR c++/12486
* typeck.c (finish_class_member_access_expr): Issue diagnostic
on erroneous use of qualified name.
2003-09-30 Richard Henderson <rth@redhat.com>
PR c++/12370
* decl.c (duplicate_decls): Copy DECL_SAVED_INSNS too.
2003-09-30 Kelley Cook <kelleycoook@wideopenwest.com>
* g++spec.c: Convert to ISO C90 prototypes.
* parser.c: Likewise.
2003-09-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
* decl.c (pop_binding): Don't mess with nullifying binding->scope
here.
* name-lookup.c: Re-format.
(cxx_binding_free): Nullify binding->scope.
2003-09-29 Jan Hubicka <jh@suse.cz>
PR C++/12047
* except.c (build_eh_type_type): Call mark_used on the type.
2003-09-28 Richard Henderson <rth@redhat.com>
* typeck.c (c_expand_asm_operands): Take location_t, instead of
individual file and line.
2003-09-28 Andreas Jaeger <aj@suse.de>
* decl.c (cxx_builtin_type_decls): Convert to ISO C90 function
definition.
* init.c (push_base_cleanups): Likewise.
* decl2.c (finish_file): Likewise.
* mangle.c (init_mangle): Likewise.
(dump_substitution_candidates): Likewise.
* search.c: Likewise.
2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
* name-lookup.h (get_global_value_if_present): New function.
(is_typename_at_global_scope): Likewise.
* except.c (do_begin_catch): Use get_global_value_if_present.
(do_end_catch): Likewise.
(do_allocate_exception): Likewise.
(do_free_exception): Likewise.
(build_throw): Likewise.
* parser.c (cp_parser_member_declaration): Likewise.
* rtti.c (throw_bad_cast): Likewise.
(throw_bad_typeid): Likewise.
* decl.c (check_tag_decl): Use is_typename_at_global_scope.
(grokdeclarator): Likewise.
* cp-tree.h (global_namespace): Move to name-lookup.h
* call.c (call_builtin_trap): Tidy.
2003-09-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/11415
* parser.c (cp_parser_nested_name_specifier_opt): Issue correct
error message when parser->scope is global_namespace.
2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cp-tree.h, name-lookup.h, decl.c, decl2.c: Remove reference to
macros BINDING_SCOPE, BINDING_VALUE and BINDING_TYPE.
2003-09-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
* decl.c (pop_binding_level, suspend_binding_level,
find_class_binding_level): Merge into leave_scope. Remove.
(leave_scope): New function.
(poplevel): Update.
(poplevel_class): Likewise.
(pop_namespace): Likewise.
2003-09-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/5655
* parser.c (cp_parser_check_access_in_redeclaration): New function.
(cp_parser_member_declaration): Use it.
(cp_parser_template_declaration_after_export): Likewise.
2003-09-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cp-tree.h (scope_kind): Add new enumerator.
(keep_next_level): Change parameter type to bool.
(begin_scope): Change prototype.
(pushlevel): Remove declaration.
* decl.c (push_binding_level): Fold in begin_scope. Remove.
(struct cp_binding_level): Remove tag_tranparent field. Make keep
of bitsize one.
(keep_next_level_flag): Make a bool.
(cxx_scope_descriptor): Update scope names table
(make_cxx_scope): Fold in begin_scope. Remove..
(namespace_scope_ht_size): New function.
(begin_scope): Change prototype. Return a scope. Tidy.
(kept_level_p): Update.
(pushlevel): Remove.
(maybe_push_cleanup_level): Simplify.
(poplevel): Update for sk_cleanup and keep change.
(print_binding_level): Likewise.
(initial_push_namespace_scope): Fold in begin_scope. Remove.
(push_namespace): Update.
(pushtag): Likewise.
(lookup_tag): Likewise.
(lookup_name_current_level): Likewise.
(lookup_type_current_level): Likewise.
(cxx_init_decl_processing): Likewise.
(start_function): Likewise.
(begin_function_body): Likewise.
(start_method): Likewise.
* pt.c (push_inline_template_parms_recursive): Likewise.
(begin_template_parm_list): Likewise.
(begin_specialization): Likewise.
* semantics.c (do_pushlevel): Likewise.
(begin_compound_stmt): Likewise.
(begin_stmt_expr): Likewise.
2003-09-21 Richard Henderson <rth@redhat.com>
* class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
method.c, optimize.c, pt.c, semantics.c, tree.c: Revert.
2003-09-21 Richard Henderson <rth@redhat.com>
* class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
method.c, optimize.c, pt.c, semantics.c, tree.c: Update for
DECL_SOURCE_LOCATION rename and change to const.
2003-09-20 Richard Henderson <rth@redhat.com>
* decl.c, decl2.c, pt.c: Use %J in diagnostics.
2003-09-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/157
* parser.c (cp_parser_direct_declarator): Clear
parser->num_template_parameter_lists when parsing function
parameters.
(cp_parser_constructor_declarator_p): Likewise.
2003-09-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/495
* pt.c (tsubst_friend_class): Only use innermost template
arguments for the injected friend class template.
2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
PR c++/12332
* pt.c (instantiate_class_template): Increment
processing_template_decl around the tsubst of a template member
function.
2003-09-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
* decl.c (cxx_scope_descriptor): Fix thinko.
(struct cp_binding_level): Adjust type of binding_depth field.
2003-09-18 Danny Smith <dannysmith@users.sourceforge.net>
PR c++/12320
* call.c (type_passed_as): Check for incomplete type.
(convert_for_arg_passing): Likewise.
2003-09-18 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9848
* optimize.c (maybe_clone_body): Don't set MARK_USED on parameters
here.
* semantics.c (expand_body): Set it here on the remaining clones.
2003-09-18 Roger Sayle <roger@eyesopen.com>
* lex.c (init_operators): Remove operator_name_info for FFS_EXPR.
* class.c (instantiate_type): Remove FFS_EXPR case.
2003-09-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* ChangeLog: Fix recent commit.
2003-09-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* ChangeLog: Add PR number to patch for PR c++/12316.
2003-09-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
* error.c (dump_type): Simplify. Use pp_type_specifier_seq for
"C" types.
* cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko.
2003-09-17 Richard Henderson <rth@redhat.com>
* semantics.c (expand_body): Don't save/restore input_location.
2003-09-17 Mark Mitchell <mark@codesourcery.com>
PR c++/12266
* cp-tree.h (tsubst_flags_t): Add tf_conv.
* class.c (standard_conversion): Pass tf_conv to
instantiate_type.
(resolve_address_of_overloaded_function): Do not call mark_used
when just checking conversions.
PR debug/12066
* cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define.
* cp-tree.h (cxx_builtin_type_decls): Declare.
* decl.c (builtin_type_decls): New variables.
(cxx_builtin_type_decls): New function.
(record_builtin_type): Add to builtin_type_decls.
2003-09-17 Richard Henderson <rth@redhat.com>
PR c++/12316
* semantics.c (expand_or_defer_fn): Inc/dec function_depth.
2003-09-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/7939
* typeck.c (comptypes): Don't ICE when its first argument is
error_mark_node.
(compparms): Reverse the arguments of same_type_p.
2003-09-15 Nathan Sidwell <nathan@codesourcery.com>
PR c++/12184
* typeck.c (convert_arguments): Return error_mark_node for an
incomplete parameter. Make error message more informative.
2003-09-12 Mark Mitchell <mark@codesourcery.com>
PR c++/3907
* class.c (maybe_note_name_used_in_class): Refine test for whether
or not we are in a class scope.
* cp-tree.h (language_function): Remove x_expanding_p.
(expanding_p): Remove.
(doing_semantic_analysis_p): Remove.
(scope_kind): Add sk_function_parms, sk_class,
sk_namespace.
(innermost_scope_kind): New method.
* call.c (cxx_type_promotes_to): Use type_decays_to.
* cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine.
(LANG_HOOKS_POPLEVEL): Likewise.
* decl.c (cp_binding_level): Remove parm_flag, template_parms_p,
template_spec_p, namespace_p, is_for_scope, is_try_scope, and
is_catch_scope. Add kind and explicit_spec_p.
(cxx_scope_descriptor): Use a lookup table.
(find_class_binding_level): Use "kind" field in binding_level, not
the various flags.
(pop_binding_level): Likewise.
(innermost_nonclass_level): Likewise.
(toplevel_bindings_p): Likewise.
(namespace_bindings_p): Likewise.
(template_parm_scope_p): Likewise.
(innermost_scope_kind): New method.
(current_tmpl_spec_kind): Use "kind" field in binding_level, not
the various flags.
(pushlevel): Remove check for doing_semantic_analysis_p.
(begin_scope): Simplify.
(add_decl_to_level): Use "kind" field in binding_level, not
the various flags.
(push_local_binding): Likewise.
(pop_label): Remove check for doing_semantic_analysis_p.
(poplevel): Use "kind" field in binding_level, not
the various flags.
(set_block): Remove check for doing_semantic_analysis_p.
(pushlevel_class): Use "kind" field in binding_level, not
the various flags.
(poplevel_class): Likewise.
(initial_push_namespace_scope): Likewise.
(maybe_push_to_top_level): Likewise.
(set_identifier_type_value_with_scope): Likewise.
(pop_everything): Likewise.
(maybe_process_template_type_declaration): Likewise.
(pushtag): Likewise.
(pushdecl): Likewise.
(pushdecl_with_scope): Likewise.
(check_previous_goto_1): Likewise.
(define_label): Likewise.
(finish_case_label): Likewise.
(lookup_tag): Likewise.
(unqualified_namespace_lookup): Likewise.
(lookup_name_real): Likewise.
(lookup_name_current_level): Likewise.
(lookup_type_current_level): Likewise.
(record_builtin_type): Likewise.
(cp_make_fname_decl): Likewise.
(maybe_inject_for_scope_var): Likewise.
(cp_finish_decl): Remove check for doing_semantic_analysis_p.
(start_function): Use begin_scope, not pushlevel.
(finish_function): Use "kind" field in binding_level, not
the various flags.
(start_method): Use begin_scope, not pushlevel.
(make_label_decl): Do not check expanding_p.
(save_function-data): Do not set expanding_p.
(cxx_push_function_context): Do not clear expanding_p.
* semantics.c (cxx_expand_function_start): Do not set expanding_p.
2003-09-14 Mark Mitchell <mark@codesourcery.com>
* class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for
an bit-field whose width exceeds that of its type.
2003-09-14 Geoffrey Keating <geoffk@apple.com>
* rtti.c (get_tinfo_decl): Set TREE_PUBLIC for typeinfo decls.
2003-09-14 Kazu Hirata <kazu@cs.umass.edu>
* ChangeLog: Follow spelling conventions.
* parser.c: Likewise.
2003-09-13 Richard Henderson <rth@redhat.com>
* decl2.c (finish_file): Check cgraph_assemble_pending_functions
during relaxation loop.
2003-09-11 David Edelsohn <edelsohn@gnu.org>
* decl2.c (var_finalized_p): Swap arms of conditional.
2003-09-10 Nathan Sidwell <nathan@codesourcery.com>
PR c++/11788
* typeck.c (build_address): If it is a function, mark it used.
(build_unary_op): Do not lose object's side-effects when taking
address of static member function.
* class.c (resolve_address_of_overloaded_function): Use
tsubst_flags_t parameter. Only expect overload sets. Adjust.
(instantiate_type): Adjust flags passing. Do not lose object's
side-effects when taking address of static member function.
2003-09-11 Richard Henderson <rth@redhat.com>
* semantics.c (expand_or_defer_fn): Update for new
cgraph_finalize_function argument.
2003-09-10 Richard Henderson <rth@redhat.com>
* decl2.c (cxx_callgraph_analyze_expr): Mark argument unused.
2003-09-10 Jan Hubicka <jh@suse.cz>
* decl2.c (var_finalized_p): New.
(maybe_emit_vtables, write_out_vars, finish_file): Use it.
2003-09-10 Richard Henderson <rth@redhat.com>
* decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
mark_member_pointers.
(lower_function): Remove.
* cp-tree.h: Update to match.
* cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New.
(LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove.
2003-09-09 Richard Henderson <rth@redhat.com>
* semantics.c (expand_or_defer_fn): Update call to
cgraph_finalize_function.
* semantics.c (expand_or_defer_fn): Use cgraph_finalize_function
always.
* decl2.c (finish_file): Avoid out-of-bounds array reference
during memmove.
2003-09-09 Richard Henderson <rth@redhat.com>
* decl2.c (mark_member_pointers): Rename from
mark_member_pointers_and_eh_handlers and don't check eh handlers.
2003-09-09 Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
PR bootstrap/12168
* method.c (use_thunk): Clear DECL_RTL of copied nodes.
2003-09-08 Mark Mitchell <mark@codesourcery.com>
* cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to
c_register_builtin_type.
PR c++/11786
* decl2.c (add_function): Do not complain about seeing the same
non-function twice.
* semantics.c (perform_koenig_lookup): Improve documentation.
PR c++/5296
* pt.c (try_one_overload): Add addr_p parameter.
(resolve_overloaded_unification): Pass it.
2003-09-08 Richard Henderson <rth@redhat.com>
* optimize.c (maybe_clone_body): Inc/dec function_depth.
2003-09-08 Richard Henderson <rth@redhat.com>
* decl.c (finish_function): Clear current_function_decl.
* decl2.c (mark_used): Don't push/pop gc context.
* optimize.c (optimize_function): Likewise.
* tree.c (cp_cannot_inline_tree_fn): Likewise.
* pt.c (instantiate_decl): Inc/dec function_depth instead.
* semantics.c (expand_body): Update for tree_rest_of_compilation
nested argument.
2003-09-07 Gabriel Dos Reis <gcc@integrable-solutions.net>
PR c++/11762
* error.c (dump_decl): Handle namespace-alias-definition.
* decl.c (warn_extern_redeclared_static): There is no point in
checking changes in storage class specifier for a namespace
declaration.
(duplicate_decls): Tidy diagnostic message.
* cxx-pretty-print.c (pp_cxx_left_brace): New macro.
(pp_cxx_right_brace): Likewise.
(pp_cxx_original_namespace_definition): New function.
(pp_cxx_namespace_alias_definition): Likewise.
(pp_cxx_declaration): Use them. Handle NAMESPACE_DECLs.
2003-09-07 Jan Hubicka <jh@suse.cz>
* decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
Avoid re-emitting variables in unit-at-a-time mode.
2003-09-06 Mark Mitchell <mark@codesourcery.com>
PR c++/11867
* call.c (standard_conversion): Improve comments.
(perform_direct_initialization): Make sure we return an expression
of the correct type.
* typeck.c (build_static_cast): Check for ambiguity and
accessibility when performing conversions.
2003-09-06 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cp-tree.h (add_binding): Remove declaration.
* name-lookup.h (supplement_binding): Declare.
* decl.c (add_binding): Move to name-lookup.c.
(push_local_binding): Adjust.
(push_class_binding): Likewise.
(set_identifier_type_value_with_scope): Likewise.
* name-lookup.c (supplement_binding): Rename from add_binding.
Return a bool. Improve documentation.
(set_namespace_binding): Adjust.
* Make-lang.in (cp/name-lookup.o): Depend on toplev.h
2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
PR c++/11794
* class.c (pushclass): Push dependent using decls for nested
classes of templates too.
2003-09-06 Roger Sayle <roger@eyesopen.com>
PR c++/11409
* class.c (resolve_address_of_overloaded_function): When building
list of matching non-template function decls, ignore anticipated
declarations of undeclared or shadowed GCC builtins.
2003-09-06 Steven Bosscher <steven@gcc.gnu.org>
PR c++/11595
* decl.c (define_label): Remove unreachable timevar pop.
Always return the decl, even if the definition is invalid.
2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
PR c++/12167
* parser.c (cp_parser_late_parsing_default_args): Push & pop the
unparsed functions queue.
2003-09-05 Mark Mitchell <mark@codesourcery.com>
PR c++/12163
* call.c (perform_direct_initialization): Correct logic for
direct-initialization of a class type.
PR c++/12146
* pt.c (lookup_template_function): Robustify.
2003-09-05 Nathan Sidwell <nathan@codesourcery.com>
PR c++/11922
* pt.c (tsubst_qualified_id): Make sure we get a non-type.
(tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
is_type_p to lookup_qualified_name.
* semantics.c (finish_call_expr): Refactor some code.
PR c++/12037
* cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
(build_min_non_dep): Declare.
* tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
(build_min_non_dep): New.
* cvt.c (convert_to_void): Don't explicitly copy
TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
* call.c (build_new_method_call): Use build_min_non_dep.
* decl2.c (grok_array_decl): Likewise.
(build_offset_ref_call_from_tree): Likewise.
* typeck.c (finish_class_member_access_expr,
build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
build_x_conditional_expr, build_x_compound_expr): Likewise.
(build_static_cast, build_reinterpret_cast,
build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
* typeck2.c (build_x_arrow): Use build_min_non_dep.
(build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
template.
* rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
(build_dynamic_cast): Set TREE_SIDE_EFFECTS.
* pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
2003-09-04 Richard Henderson <rth@redhat.com>
* decl2.c (mark_member_pointers_and_eh_handlers): Update for
change in cgraph_mark_needed_node arguments.
2003-09-02 Geoffrey Keating <geoffk@apple.com>
PR 12161
* decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
* tree.c (cp_cannot_inline_tree_fn): Likewise.
2003-09-04 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (finish_sizeof, finish_alignof): Remove.
(expr_sizeof): Replace with ...
(cxx_sizeof_or_alignof_expr): ... here.
(cxx_sizeof_or_alignof_type): Make complain parameter a bool.
* parser.c (cp_parser_unary_expression): Commonize alignof and
sizeof handling.
* pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
substitution.
* semantics.c (finish_sizeof, finish_alignof): Remove.
* typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
becomes bool. Set TREE_READONLY.
(expr_sizeof): Replace with ...
(cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
2003-09-04 Mark Mitchell <mark@codesourcery.com>
Remove cast-as-lvalue extension.
* call.c (build_conditional_expr): Correct formatting.
(convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
(initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
* cp-tree.h (non_cast_lvalue_p): Remove.
(real_non_cast_lvalue_p): Remove.
(non_cast_lvalue_or_else): Remove.
* tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
(real_lvalue_p): Adjust call to lvalue_p_1.
(non_cast_lvalue_p): Remove.
(non_cast_lvalue_or_else): Remove.
(lvalue_p): Adjust call to lvalue_p_1.
(lvalue_or_else): Simplify.
* typeck.c (build_unary_op): Use lvalue_or_else, not
non_cast_lvalue_or_else.
(build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
2003-09-03 DJ Delorie <dj@redhat.com>
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
2003-09-03 Mark Mitchell <mark@codesourcery.com>
PR c++/12053
* class.c (include_empty_classes): Correct logic for ABI version 1.
2003-09-03 Richard Henderson <rth@redhat.com>
* optimize.c (optimize_function): Push/pop ggc context around
the call to optimize_inline_calls.
2003-09-02 Scott Brumbaugh <scottb.lists@verizon.net>
PR c++/11553
* parser.c (cp_parser_decl_specifier_seq): Add check for a
duplicate friend decl-specifier.
2003-09-02 Mark Mitchell <mark@codesourcery.com>
PR c++/11847
* pt.c (convert_nontype_argument): Correct representation of
REFERENCE_TYPE expressions.
PR c++/11808
* cp-tree.h (KOENIG_LOOKUP_P): New macro.
(finish_call_expr): Change prototype.
* parser.c (cp_parser_postfix_expression): Adjust call to
finish_call_expr.
* pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
* semantics.c (finish_call_expr): Add koenig_p parameter.
2003-09-01 Mark Mitchell <mark@codesourcery.com>
PR c++/12114
* cp-tree.h (initialize_reference): Change prototype.
* call.c (initialize_reference): Add cleanup parameter.
* decl.c (grok_reference_init): Likewise.
(check_initializer): Likewise.
(cp_finish_decl): Insert a CLEANUP_STMT if necessary.
(duplicate_decls): When replacing an anticipated builtin, do not
honor TREE_NOTHROW.
* typeck.c (convert_for_initialization): Correct call to
initialize_reference.
PR c++/11972
* pt.c (dependent_type_p_r): Pass only the innermost template
arguments to any_dependent_template_arguments_p.
2003-09-01 Josef Zlomek <zlomekj@suse.cz>
* error.c (dump_expr): Kill BIT_ANDTC_EXPR.
* lex.c (init_operators): Kill BIT_ANDTC_EXPR.
* pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
* typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
(tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
2003-08-29 Mark Mitchell <mark@codesourcery.com>
PR c++/12093
* pt.c (build_non_dependent_expr): Do not build a
NON_DEPENDENT_EXPR for a STRING_CST.
PR c++/11928
* search.c (add_conversions): Avoid adding two conversion
operators for the same type.
2003-08-29 Mark Mitchell <mark@codesourcery.com>
PR c++/6196
* pt.c (tsubst_copy_and_build): Correct handling of
address-of-label extension.
* semantics.c (finish_goto_stmt): The address of a label must go
through the lvalue-to-rvalue conversion.
2003-08-29 Richard Henderson <rth@redhat.com>
Jason Merrill <jason@redhat.com>
* cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
(LANG_HOOKS_RTL_EXPAND_STMT): New.
* cp-tree.h (cxx_expand_function_start): Declare.
* decl.c (start_function): Use allocate_struct_function.
Move stmts_are_full_exprs_p assertion from expand_body.
Do not free_after_parsing or free_after_compilation.
(cxx_push_function_context): Move code to set struct function
data from genrtl_start_function.
* optimize.c (optimize_function): Don't inc/dec function_depth.
* semantics.c (expand_body): Use tree_rest_of_compilation.
(cxx_expand_function_start): Rename from genrtl_start_function,
omit bits done by tree_rest_of_compilation.
(genrtl_finish_function): Remove.
(clear_decl_rtl): Move to ../tree-optimize.c.
2003-08-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/11811
* cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
function.
* cxx-pretty-print.h: Declare.
* error.c (dump_template_parameter): Use it.
(dump_type): Likewise.
2003-08-28 Mark Mitchell <mark@codesourcery.com>
* init.c (decl_constant_value): Deal with COND_EXPR specially.
* call.c (build_conditional_expr): Revert previous patch.
PR optimization/5079
* call.c (build_conditional_expr): Use decl_constant_value to
simplify the arguments.
2003-08-26 Dan Nicolaescu <dann@ics.uci.edu>
* parser.c (struct cp_token): Use enum bitfields.
(CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
512B allocation unit.
(cp_parser_token_tree_map_node): Use enum bitfields.
2003-08-26 Nathan Sidwell <nathan@codesourcery.com>
PR c++/11871
* decl.c (push_class_level_binding): Correct old_decl value from
my 2003-07-29 reorganization.
* call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
(build_new_method_call): Add goto finish.
* semantics.c (simplify_aggr_init_exprs_r): Don't set
TREE_SIDE_EFFECTS on a call.
2003-08-25 Richard Henderson <rth@redhat.com>
* cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
2003-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
(cxx_pretty_printer): Adjust base type.
(pp_cxx_function_specifier): Declare.
* cxx-pretty-print.c (pp_cxx_whitespace): New macro.
(pp_cxx_left_paren): Likewise.
(pp_cxx_right_paren): Likewise.
(pp_cxx_dot): Likewise.
(pp_cxx_arrow): Likewise.
(pp_cxx_semicolon): Likewise.
(pp_cxx_identifier): Likewise.
(pp_cxx_cv_qualifier_seq): Likewise.
(pp_cxx_storage_class_specifier): Likewise.
(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_nonconsecutive_character): Tidy.
(pp_cxx_conversion_function_id): New function.
(pp_cxx_template_id): Likewise.
(pp_cxx_template_keyword_if_needed): Likewise.
(pp_cxx_nested_name_specifier): Likewise.
(pp_cxx_unqualified_id): Tidy
(pp_cxx_qualified_id): Handle more nodes.
(pp_cxx_primary_expression): Tidy.
(pp_cxx_postfix_expression): Likewise.
(pp_cxx_new_expression): Tidy.
(pp_cxx_delete_expression): Likewise.
(pp_cxx_cast_expression): New function.
(pp_cxx_pm_expression): Tidy.
(pp_cxx_conditional_expression): Likewise.
(pp_cxx_assignment_operator): New function.
(pp_cxx_assignment_expression): Tidy.
(pp_cxx_expression): New function.
(pp_cxx_function_specifier): Likewise.
(pp_cxx_decl_specifier_seq): Likewise.
(pp_cxx_simple_type_specifier): Tidy.
(pp_cxx_type_specifier_seq): Likewise.
(pp_cxx_ptr_operator): New function.
(pp_cxx_implicit_parameter_type): Likewise.
(pp_cxx_parameter_declaration): Tidy.
(pp_cxx_parameter_declaration_clause): New function.
(pp_cxx_exception_specification): Likewise.
(pp_cxx_direct_declarator): Tidy.
(pp_cxx_declarator): Likewise.
(pp_cxx_ctor_initializer): New function.
(pp_cxx_function_definition): Likewise.
(pp_cxx_abstract_declarator): Tidy.
(pp_cxx_direct_abstract_declarator): Likewise.
(pp_cxx_type_id): Likewise.
(pp_cxx_exception_declaration): New function.
(pp_cxx_statement): Likewise.
(pp_cxx_simple_declaration): Likewise.
(pp_cxx_template_parameter_list): Likewise.
(pp_cxx_template_parameter): Likewise.
(pp_cxx_template_declaration): Likewise.
(pp_cxx_explicit_specialization): Likewise.
(pp_cxx_explicit_instantiation): Likewise.
(pp_cxx_declaration): Tidy.
(pp_cxx_pretty_printer_init): Initialize more fields.
2003-08-25 Mark Mitchell <mark@codesourcery.com>
PR c++/8795
* cp-tree.h (build_cplus_method_type): Remove.
* call.c (standard_conversion): Use build_method_type_directly
instead of build_cplus_method_type.
* class.c (build_clone): Likewise.
(adjust_clone_args): Likewise.
* decl.c (build_ptrmem_type): Likewise.
(grokdeclarator): Likewise.
(check_function_type): Likewise.
* decl2.c (grok_method_quals): Likewise.
(maybe_retrofit_in_chrg): Likewise.
* pt.c (copy_default_args_to_explicit_spec): Likewise.
(tsubst_function_type): Likewise.
(tsubst): Likewise.
* tree.c (build_cplus_method_type): Remove.
* typeck.c (merge_types): Use build_method_type_directly.
2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/3765
* search.c (dfs_access_in_type): Fix typo in comment.
(dfs_accessible_queue_p): Likewise.
(dfs_accessible_p): Only terminate when a friend is found.
(accessible_p): Return immediately if access_in_type allows
access.
2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/641, c++/11876
* friend.c (add_friend): Add complain parameter.
(make_friend_class): Likewise.
(do_friend): Adjust add_friend call.
* decl.c (grokdeclarator): Adjust make_friend_class call.
* parser.c (cp_parser_member_declaration): Likewise.
(cp_parser_template_declaration_after_export): Likewise.
* pt.c (instantiate_class_template): Adjust make_friend_class
and add_friend call.
* cp-tree.h (make_friend_class): Adjust declaration.
(add_friend): Likewise.
2003-08-21 Jason Merrill <jason@redhat.com>
PR c++/11283
* call.c (build_conditional_expr): Ignore cv-qual differences for
non-class types.
2003-08-21 Mark Mitchell <mark@codesourcery.com>
PR c++/11551
* parser.c (cp_parser_id_expression): Add declarator_p parameter.
(cp_parser_primary_expression): Adjust call to
cp_parser_id_expression.
(cp_parser_unqualified_id): Complain about the use of
typedef-names in a destructor declarator.
(cp_parser_postfix_expression): Adjust call to
cp_parser_id_expression.
(cp_parser_type_parameter): Likewise.
(cp_parser_template_argument): Likewise.
(cp_parser_declarator_id): Likewise.
PR c++/11919
* call.c (standard_conversion): Use same_type_p, not pointer
equality, to compare types.
PR c++/10762
* parser.c (cp_parser_using_declaration): Check for invalid uses
of template-ids here...
* decl2.c (do_class_using_decl): ... rather than here.
2003-08-20 Mark Mitchell <mark@codesourcery.com>
PR c++/11834
* pt.c (more_specialized): Bump processing_template_decl.
2003-08-21 Jason Merrill <jason@redhat.com>
PR c++/11614
* decl.c (grokdeclarator): Recognize a flexible array based on the
type, not the form of the declarator.
2003-08-20 Jason Merrill <jason@redhat.com>
* semantics.c (simplify_aggr_init_expr): Split out from
simplify_aggr_init_exprs_r. Convert slot address to match
the return type.
* cp-tree.h: Declare it.
* tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
DECL_NAME of a user variable.
2003-08-20 Nathan Sidwell <nathan@codesourcery.com>
PR c++/11945
* pt.c (build_non_dependent_expr): Look inside COND_EXPR and
COMPOUND_EXPR.
* semantics.c (finish_expr_stmt): Always convert to void.
* typeck.c (build_x_compound_exp): Always convert to void.
2003-08-19 Mark Mitchell <mark@codesourcery.com>
PR c++/11684
* cp-tree.h (grok_op_properties): Change prototype.
* decl.c (grok_op_properties): Add complain parameter.
(grokfndecl): Pass it.
* pt.c (tsubst_decl): Adjust accordingly.
PR c++/10926
* decl.c (start_method): Return immediately if push_template_decl
does not like the declaration.
* pt.c (push_template_decl_real): Disallow member template
destructors.
PR c++/11036
* cp-tree.h (add_binding): Add prototype.
* class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
(maybe_warn_about_overly_private_class): Use
CLASSTYPE_DESTRUCTORS.
(pushclass): Adjust call to set_identifier_type_value.
* decl.c (add_binding): Give it external linkage.
(push_local_binding): Adjust call to add_binding.
(push_class_binding): Likewise.
(set_identifier_type_value_with_scope): Change prototype. Use
add_binding for global bindings.
(set_identifier_type_value): Adjust accordingly.
(pushtag): Likewise.
(pushdecl): Use set_identifier_type_value, not
set_identifier_type_value_with_scope.
(pushdecl_namespace_level): Adjust calls to
SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
(pushdecl_class_level): Likewise.
(lookup_tag): Use select_decl.
(select_decl): Improve comment.
(record_builtin_type): Do not call pushdecl.
(cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
(cp_finish_decl): Adjust call to set_identifier_type_value.
(check_elaborated_type_specifier): Improve checks for invalid uses
of typedefs.
(xref_tag): Adjust call to check_elaborated_type_specifier.
* decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
* name-lookup.c (set_namespace_binding): Use add_binding.
* parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
rather than an IDENTIFIER_NODE, to represent built-in types, if
requested by the caller.
(cp_parser_postfix_expression): Adjust call.
(cp_parser_type_specifier): Likewise.
(cp_parser_elaborated_type_specifier): Adjust call to
check_elaborated_type_specifier.
* typeck2.c (build_functional_cast): Do not perform name lookups.
PR c++/10717
* decl.c (expand_static_init): Remove unnecessary code.
2003-08-19 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/10538, PR c/5582
* cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
2003-08-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/11174
* init.c (build_offset_ref): Perform access checking for
pointer to member correctly.
2003-08-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
2003-08-18 Nathan Sidwell <nathan@codesourcery.com>
PR c++/11957
* cp-tree.h (finish_stmt_expr): Add bool parameter.
* init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
adjust the stmt_expr here.
(build_vec_init): Use finish_stmt_expr_expr, convert result to
array type.
* parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
call.
* pt.c (tsubst_copy): Likewise.
* semantics.c (finish_stmt_expr): Add parameter.
* pt.c (instantiate_class_template): Push to class's scope before
tsubsting base.
2003-08-17 Jan Hubicka <jh@suse.cz>
PR C++/11702
* semantics.c (finish_id_expression): Mark all functions as used.
2003-08-16 Nathan Sidwell <nathan@codesourcery.com>
PR c++/11512
* cvt.c (convert_to_void): Indicate which side of conditional has
no effects, and rhs of comma operator. Test for no sideeffect
expressions here and always build a convert expr.
* init.c (expand_default_init): Convert the init to void.
* typeck.c (build_x_compound_expr): Do not check for side effects
here.
(build_compound_expr): Do not convert lhs when building a
template.
2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
* decl2.c (build_offset_ref_call_from_tree): Use
build_non_dependent_expr.
* error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
* pt.c (build_non_dependent_expr): Set operand.
2003-08-14 Jan Hubicka <jh@suse.cz>
* decl2.c (mark_member_pointers): Rename to...
(mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
(lower_function): Update call.
* except.c (eh_type_info): Break out from ...
(build_eh_type): ... here; tinfo is already used.
(finish_eh_spec_block): Mark tinfos as used.
* semantics.c (finish_handler_params): Mark tinfo as used.
* cp-tree.h (eh_type_info): Declare.
2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (instantiate_class_template): Set location before
substuting bases.
* decl.c (make_typename_type): Use my_friendly_assert.
* pt.c (tsubst_aggr_type): Rearrange context substitution.
2003-08-14 Jan Hubicka <jh@suse.cz>
* method.c (use_thunk): Expand body directly.
2003-08-12 Mark Mitchell <mark@codesourcery.com>
PR c++/11703
* call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
determine whether or not to promote types.
(convert_for_arg_passing): Likewise.
* decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
templates.
* pt.c (tsubst_decl): Do not expect it to be set.
PR c++/9512
PR c++/10923
* cp-tree.h (check_elaborated_type_specifier): Declare.
(handle_class_head): Remove.
(note_got_semicolon): Likewise.
(note_list_got_semicolon): Likewise.
(finish_class_definition): Likewise.
* decl.c (check_elaborated_type_specifier): Make it public.
Robustify.
(handle_class_head): Remove.
* parser.c (cp_parser_elaborated_type_specifier): Use
check_elaborated_type_specifier.
(cp_parser_class_specifier): Do not call finish_class_definition.
(cp_parser_class_head): Or handle_class_head. Check for
over-qualified names.
* semantics.c (finish_class_definition): Remove.
* parser.c (cp_parser_check_for_definition_in_return_type): New
function.
(cp_parser_simple_declaration): Adjust call to
cp_parser_init_declarator.
(cp_parser_decl_specifier_seq): Change type of
declares_class_or_enum parameter.
(cp_parser_explicit_instantiation): Adjust accordingly.
(cp_parser_type_specifier): Change type of
declares_class_or_enum parameter.
(cp_parser_init_declarator): Add declares_class_or_enum
parameter.
(cp_parser_parameter_declaration): Adjust call to
cp_parser_decl_specifier_seq.
(cp_parser_function_definition): Likewise.
(cp_parser_member_declaration): Likewise.
(cp_parser_single_declaration): Likewise.
* cp-tree.h (lang_type_class): Remove has_call_overloaded,
has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
(TYPE_OVERLOADS_CALL_EXPR): Remove.
(TYPE_OVERLOADS_ARRAY_REF): Likewise.
(TYPE_OVERLOADS_ARROW): Likewise.
(CLASSTYPE_GOT_SEMICOLON): Likewise.
* class.c (check_bases): Do not set them.
(finish_struct_1): Likewise.
* decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
(build_ptrmemfunc_type): Likewise.
(grok_op_properties): Do not set TYPE_OVERLOADS_*.
(start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
* decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
* lex.c (note_got_semicolon): Remove.
(note_list_got_semicolon): Likewise.
* parser.c (cp_parser_simple_declaration): Do not call
note_list_got_semicolon.
* pt.c (list_eq): Remove.
(lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
(instantiate_class_template): Do not set TYPE_OVERLOADS*.
(instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
* ptree.c (cxx_print_type): Do not print them.
* semantics.c (finish_member_class_template): Do not call
note_list_got_semicolon.
2003-08-11 Aldy Hernandez <aldyh@redhat.com>
* call.c (standard_conversion): Opaque pointers interconvert.
* testsuite/g++.dg/other/opaque-3.C: New.
2003-08-11 Mark Mitchell <mark@codesourcery.com>
* typeck.c (merge_types): Handle cv-qualified pointer-to-member
types correctly.
2003-08-10 Mark Mitchell <mark@codesourcery.com>
PR c++/11789
* cp-tree.h (get_vbase): Remove.
(get_vbase_types): Remove.
* init.c (expand_member_init): Correct logic for looking up base
classes.
2003-08-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
* error.c (dump_expr): Tidy.
* cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
(pp_cxx_begin_template_argument_list): Likewise.
(pp_cxx_end_template_argument_list): Likewise.
(is_destructor_name): Likewise.
(pp_cxx_unqualified_id): Likewise.
(pp_cxx_qualified_id): Likewise.
(pp_cxx_id_expression): Likewise.
(pp_cxx_new_expression): Likewise.
(pp_cxx_delete_expression): Likewise.
(pp_cxx_pm_expression): Likewise.
(pp_cxx_type_specifier): Rework.
(pp_cxx_type_id): Likewise.
(pp_cxx_primary_expression): Likewise.
(pp_cxx_postfix_expression): Likewise.
(pp_cxx_unary_expression): Likewise.
(pp_cxx_multiplicative_expression): Likewise.
(pp_cxx_conditional_expression): Likewise.
(pp_cxx_assignment_expression): Likewise.
(pp_cxx_pretty_printer_init): Tidy.
2003-08-10 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
NODE is always a TREE_VEC of nonzero size.
(NUM_TMPL_ARGS): NODE is always a TREE_VEC.
* decl2.c (arg_assoc): Template args will be a vec.
* error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
dump_template_argument_list.
(dump_template_parms): Args will be a vec.
* parser.c (cp_parser_template_argument_list): Produce a
vector, not a list.
* pt.c (coerce_template_parms): Args are always vectors.
(mangle_class_name_for_template): Likewise.
(lookup_template_function): Likewise.
(lookup_template_class): Likewise.
(tsubst_template_args): Likewise.
(tsubst_baselink): Use tsubst_template_args.
(tsubst_qualified_id): Likewise.
(tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
(tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
(any_dependent_template_args_p): Args are always vectors.
* tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
PR c++/11670
* call.c (convert_like_real): Add rvalue binding error message.
* error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
really a cast.
PR c++/10530
* pt.c (dependent_type_p_r): A dependent template-id is a class
type with dependent template arguments, or a bound template
template parameter.
(type_dependent_expression_p): A template function decl cannot
have a dependent context.
2003-08-07 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/5767
* parser.c (cp_parser_class_name): Return immediately when scope
is error_mark_node.
2003-08-07 Aldy Hernandez <aldyh@redhat.com>
* cp/Make-lang.in (cp/call.o): Add dependency for target.h.
* cp/call.c (standard_conversion): Support opaque types.
Include target.h.
(strip_top_quals): Use cp_build_qualified_type instead of
TYPE_MAIN_VARIANT.
* cp/typeck.c (convert_for_assignment): Support opaque types.
* testsuite/g++.dg/other/opaque-1.C: New.
* testsuite/g++.dg/other/opaque-2.C: New.
2003-08-06 Aldy Hernandez <aldyh@redhat.com>
* decl.c (grokparms): Use cp_build_qualified_type instead
TYPE_MAIN_VARIANT.
2003-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cxx-pretty-print.h: New file.
* cxx-pretty-print.c: Likewise.
* error.c (scratch_pretty_printer): Change type.
(init_error): Tidy.
(dump_aggr_type): Likewise.
(dump_global_iord): Likewise.
(dump_expr): Likewise.
(dump_char): Remove.
* cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
(cxx_initialize_diagnostics): New function.
* Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
(CXX_PRETTY_PRINT_H): New variable.
(cp/cxx-pretty-print.o): New rule.
(cp/cp-lang.o): Update dependence.
(cp/error.o): Likewise.
2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
* cp-tree.h (struct lang_decl): Don't include c_lang_decl.
(DECL_DECLARED_INLINE_P): Remove.
* decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
if decl is a FUNCTION_DECL. This never made sense, but now it is
required to avoid a tree check failure.
* decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
* optimize.c (maybe_clone_body): Likewise.
2003-08-04 Roger Sayle <roger@eyesopen.com>
* decl.c (cxx_insert_default_attributes): Delete.
* cp-tree.h (cxx_insert_default_attributes): Don't prototype.
* cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
2003-08-03 Nathan Sidwell <nathan@codesourcery.com>
PR c++/11704
* pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
unknown type.
PR c++/11766
* typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
member functions.
2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9447
* cp-tree.def (USING_DECL): Document its type.
* class.c (pushclass): If we're entering a template, push any
dependent using decls it has.
* decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
a dependent scope.
* pt.c (tsubst_decl) <USING_DECL case>: Set type.
(tsubst): Remove USING_DECL checks.
(type_dependent_expression_p): Remove USING_DECL case.
* semantics.c (finish_member_declaration): A USING_DECL's type
indicates whether it is dependent.
2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (pushclass): Remove unneeded parameter.
* class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
(push_nested_class): Adjust pushclass call.
* pt.c (instantiate_class_template): Likewise.
* semantics.c (begin_class_definition): Likewise.
2003-08-01 Nathanael Nerode <neroden@gcc.gnu.org>
* typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
2003-08-01 Mark Mitchell <mark@codesourcery.com>
PR c++/11697
* decl.c (decls_match): Don't ignore the types of template
classes.
PR c++/11744
* pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
2003-08-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/8442, c++/8806
* decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
preferred.
(check_elaborated_type_specifier): Add allow_template_p
parameter. Check tag mismatch and class template.
(xref_tag): Add template_header_p parameter. Add assertion
that name is an IDENTIFIER_NODE. Remove implicit typename
warning. Simplify lookup process if globalize is true.
(cxx_init_decl_processing): Adjust call to xref_tag.
(xref_tag_from_type): Likewise.
* decl2.c (handle_class_head): Likewise.
* parser.c (cp_parser_elaborated_type_specifier,
cp_parser_class_head): Likewise.
* rtti.c (init_rtti_processing, build_dynamic_cast1,
tinfo_base_init, emit_support_tinfos): Likewise.
* class.c (is_base_of_enclosing_class): Remove.
* pt.c (convert_template_argument): Don't accept RECORD_TYPE as
template template argument.
* cp-tree.h (xref_tag): Adjust declaration.
(is_base_of_enclosing_class): Remove.
* NEWS: Document template template argument change.
2003-08-01 Nathan Sidwell <nathan@codesourcery.com>
* parser.c (cp_parser_init_declarator,
cp_paser_member_declaration): Reformat.
* pt.c (lookup_template_class, type_unification_real, unify,
type_dependent_expression_p): Reformat.
PR c++/11295
* cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
tf_stmt_expr_body.
(finish_stmt_expr_expr): Declare.
* parser.c (cp_parser_primary_expression): Tell
cp_parser_compount_statement that it is a statement expression.
(cp_parser_statement, cp_parser_labeled_statement,
cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
in_statement_expr_p parameter.
(cp_parser_expression_statement): Likewise. Call
finish_stmt_expr_expr for final expression of a statement
expression.
(cp_parser_for_init_statement,
cp_parser_implicitly_scoped_statement,
cp_parser_already_scoped_statement, cp_parser_function_definition,
cp_parser_try_block, cp_parser_handled): Adjust.
* pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
(tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
(tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
* semantics.c (finish_expr_stmt): Do not deal with statement
expressions.
(begin_stmt_expr): Clear last_expr_type.
(finish_stmt_expr_expr): New.
(finish_stmt_expr): Process the value expression.
* typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
compound expr inside the target's initializer.
PR c++/11525
* parser.c (cp_parser_primary_expression): Do not set
non-constant-p merely because it is a dependent scope.
PR c++/9447
* decl2.c (do_class_using_decl): Set type to NULL_TREE.
* semantics.c (finish_expr_stmt): Do not convert to void in a
template.
2003-07-31 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (coerce_template_parms): Refactor.
(fn_type_unification): Increment processing_template_decl when
tsubsting an incomplete set of explicit args.
PR c++/11347
* pt.c (instantiate_class_template): Increment
processing_template_decl around the tsubst of a template member
class.
(tsubst_qualified_id): Assert we do not have a dependent scope.
* pt.c (coerce_template_template_parms, lookup_template_class,
can_complete_type_without_circularity, instantiate_class_template,
tsubst_decl, unify): Reformat.
2003-07-31 Jan Hubicka <jh@suse.cz>
* decl2.c (maybe_make_one_only): Use mark_referenced.
* method.c (use_thunk): Likewsie.
2003-07-30 Jan Hubicka <jh@suse.cz>
* class.c (build_vtable_entry_ref): Kill.
(build_vtbl_ref_1): Do not call build_vtable_entry_ref.
(build_vfn_ref): Do not call build_vtable_entry_ref.
* cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
* cp-tree.h (prepare_assemble_variable): Kill.
* cp-decl.c (prepare_assemble_variable): Kill.
2003-07-29 Geoffrey Keating <geoffk@apple.com>
* parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
of setting valid_pch by hand.
2003-07-29 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* decl.c (finish_enum): Initialize underlying_type.
2003-07-29 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9447
* decl.c (add_binding): Add bval local variable.
(push_class_level_binding): Likewise. Allow a USING_DECL to be
pushed.
* decl2.c (do_class_using_decl): The type of a using decl is
unknown.
* parser.c (cp_parser_postfix_expression): Refactor unqualified-id
function call lookup code.
* pt.c (tsubst): A USING_DECL will have unknown type.
(tsubst_copy_and_build): Allow a using decl.
(type_dependent_expression_p): A USING_DECL will make it
dependent.
* semantics.c (finish_member_declaration): Push a dependent using
declaration.
2003-07-28 Mark Mitchell <mark@codesourcery.com>
PR c++/11530
* parser.c (cp_parser_postfix_expression): Do not call mark_used.
* semantics.c (finish_id_expression): Call mark_used for all
declarations.
2003-07-28 Mark Mitchell <mark@codesourcery.com>
PR c++/11667
* call.c (standard_conversion): Allow all integral->enumeral
conversions, after marking them as bad.
* decl.c (finish_enum): Make sure that all enumerators are
properly converted to the underlying type.
(build_enumerator): Set DECL_CONTEXT for namespace-scope
enumeration types.
* pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
(tsubst_enum): Tidy.
* Make-lang.in (typeck.o): Depend on convert.h.
(class.o): Likewise.
(rtti.o): Likewise.
* call.c: Include convert.h.
(convert_arg_to_ellipsis): Use convert_to_real.
* class.c: Include convert.h.
(build_base_path): Use convert_to_integer.
* rtti.c: Include convert.h.
(build_headof): Use convert_to_integer.
* typeck.c: Include convert.h.
(decay_conversion): Use convert_to_integer.
(build_unary_op): Use build_nop.
(get_delta_difference): Use convert_to_integer.
(build_ptrmemfunc): Avoid unnecessary conversions.
2003-07-28 Jan Hubicka <jh@suse.cz>
* decl2.c (mark_member_pointers): Verify that member pointer points to
the function.
2003-07-28 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (begin_compound_stmt): No scope arg is a bool.
(finish_compound_stmt): Remove no scope arg.
* decl.c (register_dtor_fn): Adjust begin_compound_stmt and
end_compound_stmt calls.
(expand_static_init, begin_destructor_body, begin_function_body,
finish_function_body): Likewise.
* decl2.c (start_objects, finish_objects,
start_static_storage_duration_function,
finish_static_storage_duration_function): Likewise.
* init.c (begin_init_stmts, finish_init_stmts,
construct_virtual_base, build_vec_init): Likewise.
* method.c (do_build_assign_ref, synthesize_method): Likewise.
* parser.c (cp_parser_compound_statement,
cp_parser_implicitly_scoped_statement,
cp_parser_already_scoped_statement): Likewise.
* pt.c (tsubst_expr): Likewise.
* semantics.c (begin_compound_stmt): No scope arg is a bool.
(finish_compound_stmt): Remove no scope arg.
* error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
always dyadic.
2003-07-27 Mark Mitchell <mark@codesourcery.com>
* call.c (standard_conversion): Tweak handling of
pointer-to-member types.
* pt.c (tsubst): Correctly qualify pointers-to-data member types.
* typeck.c (comp_ptr_ttypes_real): Check qualifiers on
pointer-to-data member types.
2003-07-27 Nathan Sidwell <nathan@codesourcery.com>
* parser.c (cp_parser_type_parameter): Reformat.
(cp_parser_parameter_declaration): Deprecate default args where
not allowed.
2003-07-26 Nathan Sidwell <nathan@codesourcery.com>
* cfns.h: Rebuilt.
* cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
(begin_global_stmt_expr, finish_global_stmt_expr): Remove.
* init.c (begin_init_stmts): Make static. Return is_global
value. Always call begin_stmt_expr.
(finish_init_stmts): Make static. Add is_global parm. Always
building a stmt tree.
(build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
(build_vec_init): Likewise. Always building a stmt tree.
(expand_default_init): Always building a stmt tree.
(get_temp_regvar): Likewise.
* semantics.c (begin_global_stmt_expr,
finish_global_stmt_expr): Remove.
2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (build_compound_expr): Take LHS & RHS args.
(build_x_compound_expr_from_list): Declare.
* typeck.c (build_x_compound_expr_from_list): New.
(build_x_compound_expr): Adjust.
(build_compound_expr): Remove unreachable code. Take two
parameters, adjust.
* decl.c (grok_reference_init): Use
build_x_compound_expr_from_list.
(expand_static_init): Adjust build_compound_expr call.
(cxx_maybe_build_cleanup): Likewise.
* init.c (perform_member_init): Use
build_x_compound_expr_from_list.
(build_new_1): Likewise.
(build_vec_delete): Adjust build_compound_expr calls.
(build_vbase_delete): Likewise.
* typeck2.c (store_init_value): Use
build_x_compound_expr_from_list.
(build_functional_cast): Likewise.
2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (enum tsubst_flags_t): Add tf_user.
* decl.c (make_typename_type): Pass it.
* pt.c (lookup_template_class): Use it.
(resolve_typename_type): Pass it.
* semantics.c (finish_template_type): Pass it.
2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
PR c++/11617
* cp-tree.h (qualified_name_lookup_error): Declare.
* pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
errors.
(tsubst_expr) <DECL_STMT case>: Likewise.
(tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
* semantics.c (qualified_name_lookup_error): New, broken out of ...
(finish_id_expression): ... here. Use it.
2003-07-25 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
* cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
PR c++/11596
* pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
(tsubst_template_arg): New.
(tsubst_template_arg_vector): Rename to ...
(tsubst_template_args): ... this. Accept a TREE_LIST form. Use
tsubst_template_arg.
(coerce_template_parms): Use tsubst_template_arg for default
value.
(tsubst_template_parms): Likewise.
(tsubst_aggr_type): Adjust.
(tsubst_decl): Likewise.
(tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
(tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
* Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
* error.c: Use the new pretty-printer framework.
2003-07-24 Per Bothner <pbothner@apple.com>
* decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
which causes errors messages to incorrectly mention included files.
2003-07-24 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (convert_to_base_statically): Declare.
* call.c (build_special_member_call): Convert INSTANCE to the base
type.
* class.c (convert_to_base_statically): New method.
* init.c (construct_virtual_base): Use it.
* method.c (do_build_assign_ref): Fix typo in comment.
2003-07-24 Jason Merrill <jason@redhat.com>
* decl.c: Just set truthvalue_* to boolean_*.
2003-07-24 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (reshape_init): Remove unreachable code.
2003-07-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/11513
* cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
2003-07-23 Mark Mitchell <mark@codesourcery.com>
PR c++/11645
* cp-tree.h (accessible_base_p): Declare.
* call.c (build_over_call): Use it.
* search.c (accessible_base_p): New function, split out from ...
(lookup_base): ... here.
PR c++/11517
* call.c (build_conditional_expr): Use perform_implicit_conversion
and error_operand_p. Robustify.
* typeck.c (build_unary_op): Use perform_implicit_conversion.
2003-07-23 Nathan Sidwell <nathan@codesourcery.com>
PR c++/10953
* parser.c (cp_parser_nested_name_specifier): Reset scope on
failure.
(cp_parser_elaborated_type_specifier): Likewise.
2003-07-22 Mark Mitchell <mark@codesourcery.com>
Eliminate use of POINTER_TYPE for pointers-to-members.
* call.c (standard_conversion): Rework pointer-to-member handling.
Add comments.
(add_builtin_candidate): Likewise.
(resolve_scoped_fn_name): Remove.
(build_conditional_expr): Rework pointer-to-member handling.
(compare_ics): Likewise.
* class.c (check_field_decls): Use TYPE_PTR_P.
* cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
handling.
* cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
(TYPE_PTRMEM_P): Add comment.
(TYPE_PTR_P): Simplify.
(TYPE_PTROB_P): Correct definition.
(TYPE_PTR_TO_MEMBER_P): New macro.
(TYPE_PTRMEM_CLASS_TYPE): Adjust.
(TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
(resolved_scoped_fn_name): Remove declaration.
(build_offset_ref): Change prototype.
(resolve_offset_ref): Remove.
(comp_target_types): Remove.
* cvt.c (cp_convert_to_pointer): Rework pointer-to-member
handling.
(convert_to_reference): Use can_convert.
(ocp_convert): Improve error handling. Rework pointer-to-member
handling.
(perform_qualification_conversions): Rework pointer-to-member
handling.
* decl.c (build_ptrmem_type): Handle functions too.
(create_array_type_for_decl): Remove OFFSET_TYPE error message.
(grokdeclarator): Use OFFSET_TYPE for pointers to data members.
(grokparms): Remove OFFSET_TYPE error message.
* dump.c (cp_dump_tree): Rework pointer-to-member handling.
* error.c (dump_type_prefix): Likewise.
* expr.c (cplus_expand_constant): Use build_nop.
* init.c (build_offset_ref): Add address_p parameter. Fold in
necessary bits from resolve_offset_ref.
(resolve_offset_ref): Remove.
* parser.c (cp_parser_postfix_expression): Remove special case
code for OFFSET_TYPE.
* pt.c (convert_nontype_argument): Rework pointer-to-member
handling.
(convert_template_argument): Likewise.
(unify): Likewise.
(invalid_nontype_parm_type_p): Likewise.
(dependent_type_p_r): Likewise.
* rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
(target_incomplete_p_): Rework pointer-to-member
handling.
(get_pseudo_ti_init): Likewise.
(get_pseudo_ti_desc): Likewise.
* semantics.c (finish_qualified_id_expr): Adjust call to
build_offset_ref. Remove use of resolve_offset_ref.
* tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
* typeck.c (target_type): Use TYPE_PTRMEM_P.
(type_unknown_p): Remove obsolete code about the time before
non-dependent expressions were handled correctly.
(qualify_type_recursive): Remove.
(composite_pointer_type_r): New function.
(composite_pointer_type): Use it.
(merge_types): Remove dead comments.
(comp_cv_target_types): Remove.
(comp_target_types): Likewise.
(comp_target_parms): Likewise.
(cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
(build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
(build_binary_op): Do not use of comp_target_types.
(pointer_diff): Remove OFFSET_TYPE case.
(build_unary_op): Adjust pointer-to-member handling.
(unary_complex_lvalue): Likewise.
(check_for_casting_away_constness): Add description parameter.
(build_static_cast): Pass it.
(build_reinterpret_cast): Use check_for_casting_away_constness.
(build_const_cast): Adjust pointer-to-member handling.
(build_c_cast): Likewise.
(convert_for_assignment): Remove OFFSET_TYPE error message.
(comp_ptr_ttypes_real): Adjust pointer-to-member handling.
(comp_ptr_ttypes_reinterpret): Remove.
(casts_away_constness_r): Adjust pointer-to-member handling.
(casts_away_constness): Liekwise.
(strip_all_pointer_quals): Remove.
* typeck2.c (digest_init): Adjust pointer-to-member handling.
(build_m_component_ref): Likewise.
2003-07-22 Wolfgang Bangerth <bangerth@dealii.org>
* lex.c (unqualified_fn_lookup_error): Mention that the error
message needs to be kept in synch with the manual.
2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
PR c++/11614
* decl.c (grokdeclarator): An array member is only a flexible
array member if the field itself is the array.
2003-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10793
* decl.c (xref_basetypes): Handle error_mark_node.
2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
* tree.c (lvalue_p_1): Set it.
* class.c (check_field): Don't allow non-packed non-POD fields to
be packed.
* call.c (reference_binding): Need a temporary for all bitfield
and packed fields.
(convert_like_real): Check it is ok to make a temporary here.
2003-07-21 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (hack_identifier): Remove.
* method.c (hack_identifier): Remove.
* semantics.c (finish_id_expression): Expand hack_identifier
here. Simplify.
2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
semantics.c typeck.c: Remove unnecessary casts.
2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (hack_identifier): Remove.
* method.c (hack_identifier): Remove.
* semantics.c (finish_id_expression): Expand hack_identifier
here. Simplify.
2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (finish_non_static_data_member): Add object param.
* method.c (hack_identifier): Adjust.
* pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
again for a FIELD_DECL.
* semantics.c (finish_non_static_data_member): Add object
parameter. Always save the DECL in the COMPONENT_REF.
* call.c (resolve_scoped_fn_name): Adjust.
2003-07-17 Zack Weinberg <zack@codesourcery.com>
* pt.c (get_bindings): Make definition consistent with
forward declaration.
2003-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/7809
* friend.c (add_friend): Check access for member functions
and templates.
2003-07-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/10668
* typeck.c (build_class_member_access_expr): Improve diagnostic.
2003-07-16 Mark Mitchell <mark@codesourcery.com>
PR c++/11547
* cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
macro.
(DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
* decl.c (duplicate_decls): Merge
DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
* parser.c (cp_parser_postfix_expression): Adjust call to
cp_parser_initializer_list and
cp_parser_parenthesized_expression_list.
(cp_parser_parenthesized_expression_list): Add non_constant_p.
(cp_parser_new_placement): Adjust call to
cp_parser_parenthesized_expression_list.
(cp_parser_direct_new_declarator): Likewise.
(cp_parser_conditional_expression): Remove.
(cp_parser_constant_expression): Parse an assignment-expression,
not a conditional-expression.
(cp_parser_simple_declaration): Resolve expression/declaration
ambiguity more quickly.
(cp_parser_mem_initializer): Adjust call to
cp_parser_parenthesized_expression_list.
(cp_parser_init_declarator): Keep track of whether or not the
initializer is a constant-expression.
(cp_parser_initializer): Add non_constant_p parameter.
(cp_parser_initializer_clause): Likewise.
(cp_parser_initializer_list): Likewise.
(cp_parser_attribute_list): Adjust call to
cp_parser_parenthesized_expression_list.
(cp_parser_functional_cast): Likewise.
* pt.c (tsubst_decl): Copy
DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
(tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
* semantics.c (finish_id_expression): Use
DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2003-07-16 Neil Booth <neil@daikokuya.co.uk>
* lang-options.h: Remove.
2003-07-16 Andrew Pinski <pinskia@physics.uc.edu>
PR c/10962
* class.c (field_decl_cmp): Remove.
(resort_field_decl_cmp): Remove.
(resort_sorted_fields): Remove.
(add_fields_to_vec): Rename to ...
(add_fields_to_record_type): this.
(finish_struct_1): Change to be using
sorted_fields_type's fields.
* cp-tree.h (lang_decl): In lang_decl_u3
change sorted_fields to be a pointer to
sorted_fields_type.
(resort_sorted_fields): Remove prototype.
* search.c (lookup_field_1): Change to be using
sorted_fields_type's fields.
2003-07-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/5421
* decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
is a member of other class.
* friend.c (do_friend): Don't build TEMPLATE_DECL if friend
is a specialization of function template.
2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/10903
* pt.c (convert_nontype_argument): Fix thinko in diagnostic.
Improve.
2003-07-15 Mark Mitchell <mark@codesourcery.com>
* cp-tree.def (LOOKUP_EXPR): Remove.
* cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
(LOOKUP_EXPR_GLOBAL): Remove.
(get_bindings): Remove.
(is_aggr_type_2): Remove.
* call.c (resolved_scoped_fn_name): Remove support for
LOOKUP_EXPR.
* decl.c (grokfndecl): Likewise.
(grokdeclarator): Likewise.
* error.c (dump_decl): Likewise.
(dump_expr): Likewise.
* friend.c (do_friend): Likewise.
* init.c (build_offset_ref): Likewise.
* lex.c (unqualified_fn_lookup_error): Use pedwarn. Do not create
LOOKUP_EXPRs
* mangle.c (write_expression): Remove support for LOOKUP_EXPR.
* parser.c (cp_parser_postfix_expression): Modify Koenig lookup
test.
* pt.c (get_bindings): Give it internal linkage.
(check_explicit_specialization): Remove support for LOOKUP_EXPR.
(lookup_template_function): Likewise.
(for_each_tempalte_parm_r): Likewise.
(tsubst_decl): Likewise.
(tsubst_qualified_id): Handle template template parameters.
(tsubst_copy): Remove support for LOOKUP_EXPR.
(tsubst_copy_and_build): Likewise.
(most_general_template): Likewise.
(value_dependent_expression_p): Likewise.
(type_dependent_expression_p): Note that IDENTIFIER_NODEs are
always dependent.
* semantics.c (perform_koenig_lookup): Do not create
IDENTIFIER_NODEs.
(finish_fname): Likewise.
(finish_id_expression): Likewise.
* tree.c (is_aggr_type_2): Remove.
2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/11531
* typeck.c (check_return_expr): Fix thinko in diagnostic.
2003-07-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10108
* pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
error_mark_node.
2003-07-14 Mark Mitchell <mark@codesourcery.com>
PR c++/11509
* pt.c (dependent_scope_ref_p): New function.
(value_dependent_expression_p): Use it.
(type_dependent_expression_p): Likewise.
* pt.c (tsubst_friend_function): Use reregister_specialization.
PR c++/7019
* cp-tree.h (lookup_qualified_name): Adjust prototype.
* decl.c (lookup_qualified_name): Add complain parameter. Adjust
call to is_aggr_type.
* parser.c (cp_parser_lookup_name): Adjust call to
lookup_qualified_name.
* pt.c (tsubst_qualified_id): Likewise.
(tsubst_copy_and_build): Likewise.
* semantics.c (finish_qualified_id_expr): Deal with erroneous
expressions.
2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/11510
* call.c (op_error): Properly format REALPART_EXPR and
IMAGPART_EXPR.
* error.c (dump_expr): Likewise.
2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
* error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/5293
* call.c (initialize_reference): Improve diagnostic.
2003-07-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/11154
* pt.c (more_specialized_class): Add full_args parameter.
(most_specialized_class): Adjust calls to more_specialized_class.
* cp-tree.h (more_specialized_class): Adjust declaration.
2003-07-14 Dan Nicolaescu <dann@ics.uci.edu>
* lex.c (enum tree_node_kind): Delete.
2003-07-13 Mark Mitchell <mark@codesourcery.com>
PR c++/11503
* cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
(SET_DECL_SELF_REFERENCE_P): Likewise.
* class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
* pt.c (tsubst_decl): Copy it.
* search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
* pt.c (reregister_specialization): Fix thinko in previous change.
* cp-tree.h (cp_id_kind): New type.
(unqualified_name_lookup_error): Change prototype.
(unqualified_fn_lookup_error): New function.
(do_identifier): Remove.
(do_scoped_id): Likewise.
(tsubst_copy_and_build): Change prototype.
(reregister_specialization): New function.
(perform_koenig_lookup): Likewise.
(finish_id_expression): Likewise.
* call.c (build_method_call): Adjust call to
unqualified_name_lookup_error.
* decl.c (duplicate_decls): Use reregister_specialization.
* lex.c (is_global): Remove.
(unqualified_name_lookup_error): Return a value.
(do_identifier): Remove.
(do_scoped_id): Likewise.
(identifier_typedecl_value): Remove.
(unqualified_fn_lookup_error): New function.
* parser.c (cp_parser_id_kind): Remove.
(cp_parser_non_constant_id_expression): Remove.
(cp_parser_primary_expression): Use finish_id_expression.
(cp_parser_class_or_namespace_name): Use cp_id_kind, not
cp_parser_id_kind.
(cp_parser_postfix_expression): Use perform_koenig_lookup.
(cp_parser_template_argument): Use cp_id_kind.
(cp_parser_fold_non_dependent_expr): Adjust call to
tsubst_copy_and_build.
* pt.c (unregister_specialization): Rename to ...
(reregister_specialization): This.
(tsubst_friend_function): Use it.
(maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
(tsubst_qualified_id): Likewise.
(tsubst_expr): Likewise.
(tsubst_copy_and_build): Add function_p parameter. Use
finish_id_expression. Introduce RECUR macro.
(tsubst_non_call_postfix_expression): New function.
(regenerate_decl_from_template): Use reregister_specialization.
* semantics.c (perform_koenig_lookup): New function.
(finish_id_expression): Likewise.
2003-07-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* pt.c (push_access_scope_real): Remove.
(push_access_scope): Move code from push_access_scope_real.
(pop_access_scope): Don't check for TEMPLATE_DECL.
(instantiate_template): Defer access checking during template
substitution.
(regenerate_decl_from_template): Tidy.
2003-07-11 Nathanael Nerode <neroden@gcc.gnu.org>
PR c++/11437
* operators.def: Add definitions for __imag__, __real__.
2003-07-11 Nathan Sidwell <nathan@codesourcery.com>
PR c++/11050
* parser.c (cp_parser_expression_list): Rename to ...
(cp_parser_parenthesized_expression_list): ... here. Add attribute
parameter, parse the surounding parentheses.
(cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
parameters. Return int.
(cp_parser_skip_to_closing_parenthesis or comma): Remove.
(cp_parser_postfix_expression): Adjust function call parsing.
(cp_parser_new_placement): Adjust.
(cp_parser_new_initializer): Likewise.
(cp_parser_cast_expression): Likewise.
(cp_parser_selection_statement): Likewise.
(cp_parser_mem_initializer): Likewise.
(cp_parser_asm_definition): Likewise.
(cp_parser_init_declarator): Likewise.
(cp_parser_declarator): Make
cdtor_or_conv_p an int ptr.
(cp_parser_direct_declarator): Likewise. Check for a parameter
list on cdtors & conv functions.
(cp_parser_initializer): Adjust.
(cp_parser_member_declaration): Adjust.
(cp_parser_attribute_list): Move code into
cp_parser_parens_expression_list.
(cp_parser_functional_cast): Adjust.
* pt.c (type_dependent_expression_p): Erroneous expressions are
non-dependent.
2003-07-11 Geoffrey Keating <geoffk@apple.com>
* decl.c (cp_finish_decl): Handle 'used' attribute.
* cp-lang.c (c_reset_state): New dummy routine.
* cp-tree.h (finish_file): Move prototype to c-common.h.
* parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
2003-07-11 Mark Mitchell <mark@codesourcery.com>
PR c++/8327
* pt.c (tsubst_qualified_id): Implement suggested resolution for
Core Issue 2.
(type_dependent_expression_p): Likewise.
2003-07-10 Mark Mitchell <mark@codesourcery.com>
* typeck.c (build_binary_op): Do not warn about signed
vs. unsigned comparisons in the bodies of templates.
PR c++/9411
* parser.c (cp_parser_postfix_expression): Check dependency of
functions.
2003-07-09 Mark Mitchell <mark@codesourcery.com>
PR c++/10032
* decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
still errors.
PR c++/10527
* error.c (decl_to_string): Do not print default argument
expressions.
* cp-tree.h (break_out_calls): Remove declaration.
* tree.c (break_out_calls): Remove.
* typeck.c (build_modify_expr): Avoid invalid sharing of trees.
2003-07-09 Nathan Sidwell <nathan@codesourcery.com>
PR c++ 9483
* class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
* decl2.c (constructor_name_p): Avoid repeated constructor_name
calls.
* decl.c (grokdeclarator): Refactor ctor/dtor detection.
2003-07-09 Mark Mitchell <mark@codesourcery.com>
* typeck.c (build_x_unary_op): Take note of the fact that
PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
trees.
* parser.c (cp_parser_primary_expression): Preserve the form of
qualified expressions in templates, even if they are not
dependent.
* pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
(tsubst_qualified_id): Likewise.
* search.c (accessible_p): Treat everything in the body of a
template as accessible.
2003-07-08 Mark Mitchell <mark@codesourcery.com>
* cp-tree.def (NON_DEPENDENT_EXPR): New node.
* cp-tree.h (build_call_from_tree): Remove.
(build_member_call): Likewise.
(dependent_template_arg_p): Remove.
(any_dependent_template_arguments_p): New function.
(dependent_template_id_p): Likewise.
(any_type_dependent_arguments_p): Likewise.
(build_non_dependent_expr): Likewise.
(build_non_dependent_args): Likewise.
(build_x_compound_expr): Adjust prototype.
* call.c (build_new_method_call): Handle non-dependent expressions
correctly.
* decl2.c (grok_array_decl): Likewise.
(build_offset_ref_call_from_tree): Likewise.
(build_call_from_tree): Remove.
* error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
(dump_expr): Likewise.
* init.c (build_member_call): Remove.
* mangle.c (write_expression): Update handling for template-ids.
* parser.c (cp_parser_primary_expression): Use
any_dependent_template_arguments_p. Update constant-expression
handling.
(cp_parser_postfix_expression): Use
any_type_dependent_arguments_p. Simplify call processing.
(cp_parser_unary_expression): Simplify.
(cp_parser_expression): Adjust for changes to
build_x_compound_expr.
(cp_parser_template_argument): Implement standard-conforming
parsing of non-type template arguments.
(cp_parser_direct_declarator): Use
cp_parser_fold_non_dependent_expr.
(cp_parser_fold_non_dependent_expr): New function.
(cp_parser_next_token_ends_template_argument_p): Likewise.
* pt.c (convert_template_argument): Do not call
maybe_fold_nontype_arg.
(tsubst_baselink): Likewise.
(tsubst_copy_and_build): Share common code. Make sizeof/alignof
processing work correctly for non-dependent expressions. Adjust
handling of COMPOUND_EXPR. Simplify call processing.
(value_dependent_expression_p): Deal with functional casts and
sizeof/alignof correctly.
(type_dependent_expression_p): Handle overloaded functions.
(any_type_dependent_arguments_p): New function.
(any_dependent_template_arguments_p): Likewise.
(dependent_template_p): Treat SCOPE_REFs as dependent.
(dependent_template_id_p): Simplify.
(build_non_dependent_expr): New function.
(build_non_dependent_args): Likewise.
* semantics.c (finish_stmt_expr): Don't make dependent
statement-expresions have void type.
(finish_call_expr): Handle non-dependent expressions
correctly.
* tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
* typeck.c (cxx_sizeof_or_alignof_type): Give the expression
type size_t, even in templates.
(expr_sizeof): Likewise.
(finish_class_member_access_expr): Handle non-dependent expressions
correctly.
(build_x_indirect_ref): Likewise.
(build_x_binary_op): Likewise.
(build_x_unary_op): Likewise.
(build_x_conditional_expr): Likewise.
(build_x_compound_expr): Likewise.
* typeck2.c (build_x_arrow): Likewise.
2003-07-09 Jan Hubicka <jh@suse.cz>
* cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
* decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
(start_function): Use DECL_ESTIMATED_INSNS.
* optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
* decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
unit-at-a-time
2003-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/11030
* pt.c (instantiate_class_template): Don't call xref_tag to
inject name when the friend class is a specialization.
2003-07-07 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (build_scoped_method_call): Remove.
(lookup_qualified_name): Remove parameter.
(tsubst_copy_and_build): Declare.
(finish_qualified_object_call_expr): Remove.
(check_accessibility_of_qualified_id): New function.
(finish_qualified_id_expr): Likewise.
(non_reference): Likewise.
(build_expr_from-tree): Remove.
* call.c (non_reference): Remove.
(build_scoped_method_call): Likewise.
(build_method_call): Use error_operand_p. Assert that we are not
processing a template.
(standard_conversion): Use non_reference.
* class.c (build_vtbl_entry_ref): Likewise.
(build_vtbl_ref_1): Likewise.
* cvt.c (build_expr_type_conversion): Use non_reference.
* decl.c (lookup_qualified_name): Remove flags parameter.
(grok_op_properties): Use non_reference.
* decl2.c (grok_array_decl): Likewise.
(build_expr_from_tree): Remove.
(build_offset_ref_call_from_tree): Update comment.
* error.c (parm_to_string): Call reinit_global_formatting_buffer.
* except.c (prepare_eh_types): Use non_reference.
(can_convert_eh): Likewise.
* init.c (build_dtor_call): Avoid using build_method_call.
* mangle.c (write_template_param): Remove misleading comment.
* method.c (locate_copy): Use non_reference.
* parser.c (cp_parser_scope_through_which_access_occurs): Remove.
(cp_parser_primary_expression): Do not create SCOPE_REFs is
non-dependent contexts.
(cp_parser_postfix_expression): Use finish_qualified_id_expr.
(cp_parser_direct_declarator): Use tsubst_copy_and_build, not
build_expr_from_tree.
(cp_parser_lookup_name): Adjust call to lookup_qualified_name.
Use check_accessibility_of_qualified_id.
* pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
build_expr_from_tree.
(tsubst_baselink): New function.
(tsubst_qualified_id): Likewise.
(tsubst_copy): Use them. Remove support for METHOD_CALL_EXPR.
(tsubst_expr): Adjust call to lookup_qualified_name.
(tsubst_copy_and_build): Handle SCOPE_REFs specially. Adjust
handling of CALL_EXPRs.
(value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
* rtti.c (get_tinfo_decl_dynamic): Use non_reference.
* search.c (check_final_overrider): Likewise.
* semantics.c (check_accessibility_of_qualified_id): New function.
(finish_qualified_object_call_expr): Remove.
* typeck.c (target_type): Use non_reference.
(cxx_sizeof_or_alignof_type): Likewise.
(dubious_conversion_warnings): Likewise.
(convert_for_initialization): Likewise.
(non_reference): New function.
2003-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* decl.c (print_binding_level, print_other_binding_stack,
print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
stdio calls.
* ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
2003-07-07 Andreas Jaeger <aj@suse.de>
* friend.c: Convert to ISO C90 prototypes.
* Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
language.
* cfns.h: Regenerate.
* typeck.c: Convert remaining prototypes to ISO C90.
* search.c: Likewise.
* decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
* semantics.c (expand_or_defer_fn): Likewise
* mangle.c (discriminator_for_string_literal): Likewise.
* g++spec.c (lang_specific_driver): Likewise.
* search.c (lookup_base_r): Remove unused variable.
2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
* semantics.c: (genrtl_try_block) Adjust emit_line_note
calls.
2003-07-07 Andreas Jaeger <aj@suse.de>
* search.c (lookup_base_r): Remove unused variable.
2003-07-06 Michael Chastain <mec@shout.net>
PR debug/10055
* lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
assigning to input_filename directly.
2003-07-06 Kazu Hirata <kazu@cs.umass.edu>
* call.c: Fix comment formatting.
* class.c: Likewise.
* cp-tree.h: Likewise.
* decl.c: Likewise.
* decl2.c: Likewise.
* error.c: Likewise.
* method.c: Likewise.
* name-lookup.c: Likewise.
* parser.c: Likewise.
* pt.c: Likewise.
* rtti.c: Likewise.
* search.c: Likewise.
* typeck.c: Likewise.
2003-07-06 Mark Mitchell <mark@codesourcery.com>
PR c++/11345
* search.c (lookup_base_r): Remove is_non_public and
within_current_scope parameters. Remove other dead code.
(lookup_base): Adjust call to lookup_base_r.
(adjust_result_of_qualified_name_lookup): Improve comment.
* semantics.c (finish_call_expr): Use maybe_dummy_object.
2003-07-06 Neil Booth <neil@daikokuya.co.uk>
* cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
LANG_HOOKS_MISSING_ARGUMENT): Override.
2003-07-05 Mark Mitchell <mark@codesourcery.com>
PR c++/11431
* typeck.c (build_static_cast): Check for reference conversions
earlier.
2003-07-04 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (perform_integral_promotions): Declare.
* call.c (build_addr_func): Use decay_conversion.
(convert_arg_to_ellipsis): Likewise. Remove misleading comment.
(convert_for_arg_passing): Use perform_integral_promotions.
* cvt.c (build_expr_type_conversion): Use decay_conversion.
(type_promotes_to): Do not return a cv-qualified type.
* decl.c (grok_reference_init): Fix formatting.
(get_atexit_node): Use decay_conversion.
(build_enumerator): Use perform_integral_promotions.
* init.c (build_vec_init): Use decay_conversion.
* semantics.c (finish_expr_stmt): Likewise.
(finish_switch_cond): Use perform_integral_promotions.
* typeck.c (default_conversion): Likewise.
(perform_integral_promotions): New function.
(build_indirect_ref): Use decay_conversion.
(build_array_ref): Use perform_integral_promotions.
(convert_arguments): Use decay_conversion.
(build_unary_op): Use perform_integral_promotions.
(build_c_cast): Use decay_conversion.
(build_modify_expr): Likewise.
(convert_for_initialization): Likewise.
* typeck2.c (build_x_arrow): Likewise.
2003-07-04 Kazu Hirata <kazu@cs.umass.edu>
* call.c: Fix comment typos.
* class.c: Likewise.
* cp-tree.h: Likewise.
* cvt.c: Likewise.
* decl2.c: Likewise.
* decl.c: Likewise.
* init.c: Likewise.
* mangle.c: Likewise.
* parser.c: Likewise.
* pt.c: Likewise.
* search.c: Likewise.
* semantics.c: Likewise.
* tree.c: Likewise.
* typeck.c: Likewise.
2003-07-04 Zack Weinberg <zack@codesourcery.com>
* parser.c (cp_lexer_read_token): No need to handle string
constant concatenation.
2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
(cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
ATTRIBUTE_GCC_CXXDIAG.
2003-07-03 Mark Mitchell <mark@codesourcery.com>
* call.c (build_addr_func): Handle bound pointers-to-members.
(build_method_call): Do not call resolve_offset_ref.
(implicit_conversion): Likewise.
(resolve_scoped_fn_name): Use finish_non_static_data_member, not
resolve_offset_ref.
(resolve_args): Do not call resolve_offset_ref.
(build_conditional_expr): Likewise.
(build_new_method_call): Likewise.
* cp-tree.def (OFFSET_REF): Update documentation.
* cvt.c (cp_convert_to_pointer): Update handling of conversions from
pointers to members to pointers.
(ocp_convert): Do not call resolve_offset_ref.
(convert_to_void): Likewise.
(build_expr_type_conversion): Likewise.
* decl2.c (delete_sanity): Likewise.
* init.c (resolve_offset_ref): Simplify greatly.
(build_vec_delete): Do not call resolve_offset_ref.
* parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
if appropriate.
(cp_parser_unary_expression): Use
cp_parser_simple_cast_expression.
(cp_parser_delete_expression): Likewise.
(cp_parser_cast_expression): Likewise.
(cp_parser_pm_expression): Use cp_parser_binary_op.
(cp_parser_simple_cast_expression): New function.
* rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
* semantics.c (finish_increment_expr): Likewise.
(finish_typeof): Likewise.
* tree.c (lvalue_p_1): Do not handle OFFSET_REF.
* typeck.c (require_complete_type): Do not handle OFFSET_REFs.
(decay_conversion): Do not call resolve_offset_ref.
(finish_class_member_access_expr): Likewise.
(convert_arguments): Likewise.
(build_x_binary_op): Handle DOTSTAR_EXPR.
(condition_conversion): Do not call resolve_offset_ref.
(unary_complex_lvalue): Likewise.
(build_static_cast): Likewise.
(build_reinterpret_cast): Likewise.
(build_const_cast): Likewise.
(build_c_cast): Likewise.
(build_modify_expr): Likewise.
(convert_for_assignment): Likewise.
(convert_for_initialization): Likewise.
* typeck2.c (build_x_arrow): Likewise.
(build_m_component_ref): Simplify.
* call.c (build_scoped_method_call): Use convert_to_void.
(build_method_call): Likewise.
* class.c (check_field_decls): Remove dead code.
* cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
* decl2.c (grok_array_decl): Remove dead code.
(arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
as pointer-to-member representation.
* init.c (build_offset_ref): Tidy.
(build_vec_delete_1): Use convert_to_void.
* mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
as pointer-to-member representation.
2003-07-03 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9162
* decl.c (grokdeclarator): Return friend decls, not
void_type_node.
* decl2.c (grokfield): Alter friend decl check.
* parser.c (struct cp_parser): Document default_arg chain on
unparsed_functions_queue.
(cp_parser_save_default_args): New.
(cp_parser_init_declarator, cp_parser_function_definition,
cp_parser_member_declaration): Call it.
(cp_parser_class_specifier): Remove unused variable. Alter
processing of unparsed_functions_queue.
2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* class.c (add_method, check_field_decl): Fix format specifier.
* decl.c (duplicate_decls, pushdecl, check_goto,
fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
start_enum): Likewise.
* decl2.c (ambiguous_decl): Likewise.
* pt.c (redeclare_class_template): Likewise.
2003-07-02 Nathan Sidwell <nathan@codesourcery.com>
PR c++/10219
* pt.c (type_unification_real): Don't unify exprs of error type.
* tree.c (error_type): Don't die on error_type.
PR c++/9779
* decl2.c (arg_assoc_class): Don't die on NULL type.
* typeck.c (type_unknown_p): Don't die on untyped expressions.
2003-07-01 Mark Mitchell <mark@codesourcery.com>
PR c++/6949
* decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
classes.
2003-07-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* error.c (locate_error): %P takes an `int', not a `tree'.
2003-07-02 Jan Hubicka <jh@suse.cz>
* decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
(finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
clear DECL_DEFER_OUTPUT once function is processed; avoid flags
massaging.
* cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
(expand_or_defer_fn): Declare.
(lower_function): Declare.
* decl.c (start_cleanup_fn): Use expand_or_defer_fn.
* decl2.c: Include cgraph.h and varpool.h
(maybe_emit_vtables): Make explicit instantations as needed.
(mark_member_pointers, lower_function): New functions.
(finish_file): Do unit-at-a-time.
* method.c (synthesize_method): Use expand_or_defer_fn.
* optimize.c (maybe_clone_body): Use expand_or_defer_fn.
* parser.c (cp_parser_function_definition_after_decl): Use
expand_or_defer_fn.
* pt.c (instantiate_decl): Likewise.
* semantics.c: Include cgraph.h
(expand_or_defer_fn): Break out from ...
(expand_body): ... here; deal with unit-at-a-time.
* cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
2003-07-01 Mark Mitchell <mark@codesourcery.com>
* call.c (resolve_scoped_fn_name): Return error_mark_node for
erroneous cases.
2003-07-01 Mark Mitchell <mark@codesourcery.com>
PR c++/11149
* call.c (resolve_scoped_fn_name): Check that the qualifying scope
is a class type.
2003-07-01 Giovanni Bajo <giovannibajo@libero.it>
PR c++/8046
* error.c (dump_decl): Handle BIT_NOT_EXPR as
pseudo destructor calls.
2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (define_label): Replace filename and lineno
arguments with a location_t.
* decl.c (pop_label): Adjust define_label call.
(define_label): Replace filename and lineno arguments with a
location_t.
* semantics.c (finish_label): Adjust define_label call.
2003-07-01 Mark Mitchell <mark@codesourcery.com>
PR c++/9559
* decl2.c (grokfield): Do not build NOP_EXPRs around the
error_mark_node.
2003-06-30 Neil Booth <neil@daikokuya.co.uk>
* Make-lang.in: Update.
* cp-lang.c (c_language): Define.
(LANG_HOOKS_INIT_OPTIONS): Use common hook.
* cp-tree.h (cxx_init_options): Remove.
* lex.c: Don't include diagnostic.h.
(cxx_init_options): Remove.
2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
PR c++/4933
* error.c (dump_expr): Support correctly the COMPOUND_EXPR
tree generated within a template. Use dump_expr to dump an
expression sizeof.
2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
* mangle.c (write_expression): Exit gracefully when trying to
mangle a CALL_EXPR.
2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
PR c++/10750
* parser.c (cp_parser_primary_expression): A VAR_DECL with a
(value- or type-) dependent expression as DECL_INITIAL is a
valid constant-expression (at parser time).
2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
PR c++/11106
* error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
USING_DECL, instead of print_tree_identifier.
2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cp-tree.h (language_to_string): Adjust declaration.
* dump.c (cp_dump_tree): Adjust usage.
* error.c (dump_char): Use output_formatted_scalar. Tidy.
(parm_to_string): Lose unused parameter. Tidy.
(expr_to_string): Likewise.
(code_to_string): Likewise.
(language_to_string): Likewise.
(op_to_string): Likewise.
(assop_to_string): Likewise.
(digit_buffer): Remove.
(dump_type): Format builtin vector type as __vector__.
2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
* error.c (print_integer): Remove.
(dump_type_suffix): Adjust.
(dump_expr): Likewise.
2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
* error.c (print_instantiation_partial_context): Take a
location_t.
(print_instantiation_full_context): Adjust.
(print_instantiation_context): Adjust.
* cp-tree.h (cp_line_of, cp_file_of): Remove.
* error.c (cp_line_of, cp_file_of): Merge into ...
(location_of): ... here. Make static, return a location_t.
(cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
PR c++/10784
* call.c (joust): Move warn_conversion check outwards.
2003-06-27 Zack Weinberg <zack@codesourcery.com>
* decl.c (build_typename_type)
* mangle.c (write_template_template_arg)
* parser.c (cp_parser_scope_through_which_access_occurs)
* pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
* repo.c (get_base_filename)
* semantics.c (maybe_convert_cond):
Mark the definition static, matching the forward declaration.
2003-06-27 Mark Mitchell <mark@codesourcery.com>
PR c++/10468
* pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
2003-06-27 Mark Mitchell <mark@codesourcery.com>
PR c++/10796
* decl.c (finish_enum): Implement DR377.
* decl.c (cp_finish_decl): Don't make variables with reference
type readonly while they are being initialized.
2003-06-26 Mark Mitchell <mark@codesourcery.com>
PR c++/11332
* typeck.c (build_static_cast): Avoid returning expressions with
reference type.
2003-06-26 Nathan Sidwell <nathan@codesourcery.com>
* call.c (build_op_delete_call): Use strip_array_call. Correct
error message to say 'delete' or 'delete[]'.
2003-06-26 Giovanni Bajo <giovannibajo@libero.it>
PR c++/8266
* pt.c (check_explicit_specialization): When looking up a
template function from an identifier outside class-scope, bind
it to CP_DECL_CONTEXT.
2003-06-25 Mark Mitchell <mark@codesourcery.com>
PR c++/10990
* search.c (lookup_base_r): Rely on accessible_p, rather than
trying to emulate that logic here.
PR c++/10931
* call.c (convert_like): Pass issue_conversion_warnings.
(convert_like_with_context): Likewise.
(convert_like_real): Add issue_conversion_warnings parameter.
(perform_direct_initialization_if_possible): New function.
* cp-tree.h (perform_direct_initialization_if_possible): Declare it.
* typeck.c (check_for_casting_away_constness): New function.
(build_static_cast): Rewrite.
2003-06-24 Nathan Sidwell <nathan@codesourcery.com>
* call.c (enforce_access): Assert we get a binfo.
(build_op_delete_call): Pass a binfo to
perform_or_defer_access_check.
* class.c (alter_access): Likewise.
* decl.c (make_typename_type): Likewise.
(make_unbound_class_template): Likewise.
* lex.c (do_identifier): Likewise.
* method.c (hack_identifier): Likewise.
* parser.c (cp_parser_lookup_name): Likewise.
* search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
test.
* semantics.c (finish_non_static_data_member): Likewise.
(perform_or_defer_access_check): Expect a binfo.
* typeck.c (comptypes): Expect types.
* mangle.c (find_substitution): Don't pass a non-type to same_type_p
* friend.c (make_friend_class): Likewise.
* pt.c (check_default_tmpl_args): Likewise.
(lookup_template_class): Likewise.
2003-06-24 Jan Hubicka <jh@suse.cz>
* method.c (thunk_labelno): Move outside ifdef block to make garbage
collector happy.
2003-06-24 Jan Hubicka <jh@suse.cz>
* class.c (build_vtable): Make vtables.
* cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
* decl2.c (output_vtable_inherit): Rename to ...
(prepare_assemble_variable): ... this one; change interface.
(maybe_emit_vtables): Do not call output_vtable_inherit.
* cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
* cp-tree.h (prepare_assemble_variable): New.
2003-06-23 Andrew Pinski <pinskia@physics.uc.edu>
* method.c: add prototype for make_alias_for_thunk.
(thunk_labelno, make_alias_for_thunk): only define
if ASM_OUTPUT_DEF is defined.
2003-06-23 Jakub Jelinek <jakub@redhat.com>
* method.c (thunk_labelno): New variable.
(make_alias_for_thunk): New function.
(use_thunk): Use it if defined ASM_OUTPUT_DEF. Put the thunk
into the same section as the function it is calling.
Include gt-cp-method.h.
* Make-lang.in (gt-cp-method.h): Depend on s-gtype.
(cp/method.o): Depend on gt-cp-method.h.
* config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
2003-06-23 Jan Hubicka <jh@suse.cz>
* decl.c (register_dtor_fn): Mark cleanup as used.
* decl2.c (mark_vtable_entries): Skip nops.
* rtti.c (get_tinfo_ptr): Mark tinfo as used.
(build_dynamic_cast_1): Likewise.
(tinfo_base_init): Likewise.
(emit_tinfo_decl): Likewise.
2003-06-23 Jakub Jelinek <jakub@redhat.com>
* mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
to it.
2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/10784
* call.c (joust): Warn about choosing conversion sequence only if
-Wconversion.
2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/10864
* call.c (op_error): Tidy.
* error.c (dump_expr): Properly format 'T()' when T is an
aggregate type.
2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/10915
* decl.c (grok_op_properties): Warn possible confusing conversion
only if -Wconversion.
2003-06-20 Mark Mitchell <mark@codesourcery.com>
PR c++/10749
* parser.c (cp_parser_class_head): See through dependent names
when parsing a class-head.
PR c++/10845
* pt.c (try_class_unification): Correct handling of member class
templates.
2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
* semantics.c (genrtl_finish_function): Adjust
expand_function_end call.
2003-06-19 Mark Mitchell <mark@codesourcery.com>
PR c++/10939
* pt.c (tsubst_decl): Do not try to substitute into non-dependent
functions.
(value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
PR c++/9649
* cp-tree.h (pushdecl_class_level): Change prototype.
(push_class_level_binding): Likewise.
* decl.c (add_binding): Reject duplicate static data members.
(pushdecl_class_level): Return a value indicating whether or not
the binding was valid.
(push_class_level_binding): Likewise.
* semantics.c (finish_member_declaration): Don't keep invalid
declarations.
PR c++/11041
* call.c (initialize_reference): Do not use cp_finish_decl to emit
temporary variables.
* cp-tree.h (static_aggregates): Declare.
(pushdecl_top_level_and_finish): Likewise.
* decl.c (pushdecl_top_level_1): New function.
(pushdecl_top_level): Use it.
(pushdecl_top_level_and_finish): New function.
(initialize_local_var): Remove redundant code.
(cp_finish_decl): Remove support for RESULT_DECLs. Don't check
building_stmt_tree.
* decl.h (static_aggregates): Remove.
* decl2.c (get_guard): Use pushdecl_top_level_and_finish.
* rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
(tinfo_base_init): Likewise.
2003-06-19 Matt Austern <austern@apple.com>
PR c++/11228
* init.c (build_zero_init): Assert that number of array elements
is an integer constant.
(build_default_init) Don't use build_zero_init for arrays with
variable number of elements.
2003-06-19 Andreas Jaeger <aj@suse.de>
* cp-tree.h: Remove duplicated declarations.
2003-06-18 Nathanael Nerode <neroden@gcc.gnu.org>
* pt.c: Convert to ISO C.
* semantics.c: Convert to ISO C.
2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
at_least_as_qualified_p, more_qualified_p): Return bool.
* typeck.c: ANSIFY function definitions.
(comp_array_types): Take redeclaration bool parameter.
(comptypes): Rearrange STRICT handling.
(at_least_as_qualified_p, more_qualified_p,
comp_cv_qualification): Cache cv quals.
(compparms): Rearrange loop.
2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (COMPARE_RELAXED): Rename to ...
(COMPARE_DERIVED): ... here. Adjust comment.
(resolve_typename_type_in_current_instantiation): Remove.
(cp_tree_equal, comptypes): Return a bool.
* cvt.c (convert_to_reference): Adjust comptypes call.
* pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
(resolve_typename_type_in_current_instantiation): Remove.
* tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
calls. Refactor code.
* typeck.c (comp_array_types): Return bool. Lose callback.
parameter. Adjust cp_tree_equal calls.
(comptypes): Return bool. Adjust strict handling. Remove relaxed
enumeration and java type handling. Deal with typename types here.
Adjust recursive and cp_tree_equals calls. Adjust base and derived
checking.
(comp_target_types): Remove unreachable code. Adjust
same_or_base_type_p calls.
(ptr_reasonably_similar): Adjust base and derived check.
* typeck.c (maybe_warn_about_returning_address_of_local): Remove
unused calculation.
(check_return_expr): Adjust error messages.
* cp-tree.def (SCOPE_REF): Correct comment.
2003-06-17 Mark Mitchell <mark@codesourcery.com>
* mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
string again.
2003-06-17 Robert Abeles <rabeles@archaelogic.com>
* optimize.c (dump_function): Form complete flag name by
prefixing 'fdump-' to string returned by dump_flag_name().
2003-06-17 Mark Mitchell <mark@codesourcery.com>
* mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
string.
2003-06-17 Jason Merrill <jason@redhat.com>
PR c++/10929
* decl.c (grokfndecl): Don't mark a function inline for
-finline-functions if it isn't defined.
2003-06-17 Mark Mitchell <mark@codesourcery.com>
PR c++/10712
* class.c (handle_using_decl): Robustify.
PR c++/11105
* cp-tree.h (DECL_CONV_FN_TYPE): New method.
* mangle.c (struct globals): Remove internal_mangling_p.
(write_unqualified_name): Use DECL_CONV_FN_TYPE.
(write_template_parm): Don't write out the level number.
(conv_type_names): New variable.
(hash_type): New function.
(compare_type): Likewise.
(mangle_conv_op_name_for_type): Don't try to mangle conversion
operator names.
* search.c (lookup_conversion_operator): New function.
(lookup_fnfields_1): Use it.
2003-06-17 Andreas Jaeger <aj@suse.de>
* except.c: Remove duplicate declaration of push_eh_cleanup.
* call.c: Remove extra declaration of inhibit_warnings.
2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
2003-06-16 Jens-Michael Hoffmann <jensmh@gmx.de>
* mangle.c: Convert to ISO C.
2003-06-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
macro.
2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
* tree.c: Convert to ISO C.
2003-06-16 Kazu Hirata <kazu@cs.umass.edu>
* cp-tree.h: Follow spelling conventions.
* mangle.c: Likewise.
* method.c: Likewise.
* parser.c: Likewise.
2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (start_function): Adjust init_function_start call.
* method.c (use_thunk): Likewise.
* semantics.c (genrtl_start_function): Likewise.
2003-06-14 Neil Booth <neil@daikokuya.co.uk>
* Make-lang.in: Remove c-options.o.
2003-06-13 Nathanael Nerode <neroden@gcc.gnu.org>
* lex.c: Convert to ISO C.
2003-05-19 Jens-Michael Hoffmann <jensmh@gmx.de>
* init.c: removes use of PARAMS macro. Use ISO style function
declarations. (Not copyright-significant change.)
* rtti.c: Remove PARAMS.
* typeck2.c: Convert to ISO C.
2003-06-12 Mark Mitchell <mark@codesourcery.com>
PR c++/10635
* typeck.c (build_c_cast): Check that the destination type is
complete.
2003-06-11 Mark Mitchell <mark@codesourcery.com>
PR c++/10432
* cp-tree.h (finish_declarator): Remove.
* decl.c (cp_finish_decl): Make sure to pop_nested_class even for
erroneous declarations.
* semantics.c (finish_declarator): Remove.
2003-06-11 Roger Sayle <roger@eyesopen.com>
* decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
global static constructor/destructor if it will be empty, i.e.
either doesn't call any ctors/dtors or only calls pure or const
ctors/dtors.
2003-06-11 Mark Mitchell <mark@codesourcery.com>
* mangle.c (tm_p.h): Include it.
* Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
PR c++/11131
* tree.c (cp_cannot_inline_fn): Check for "inline" before
instantiation.
2003-06-10 Jason Merrill <jason@redhat.com>
PR c++/10968
* pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
2003-06-10 Andrew Pinski <pinskia@physics.uc.edu>
* decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
(start_cleanup_cnt): New.
2003-06-10 Mark Mitchell <mark@codesourcery.com>
PR c++/11131
* cp-tree.h (template_for_substitution): Declare.
* decl2.c (mark_used): Use it when figuring out whether or not a
function is inline.
* pt.c (template_for_substitution): Give it external linkage.
* tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
possible.
2003-06-09 Zack Weinberg <zack@codesourcery.com>
PR 8861
* mangle.c (write_real_cst): New function. Implement
ABI-compliant mangling of floating-point literals when
-fabi-version>=2; provide backward compatibility with 3.3 when
-fabi-version=1 (with warning). Clarify commentary.
(write_template_arg_literal): Use write_real_cst.
2003-06-07 Andreas Jaeger <aj@suse.de>
* cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
2003-06-07 Neil Booth <neil@daikokuya.co.uk>
* cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
(LANG_HOOKS_HANDLE_OPTION): Override.
* cp-tree.h (cxx_init_options): Update.
* lex.c (cxx_init_options): Update.
2003-06-05 Jan Hubicka <jh@suse.cz>
* Make-lang.in: Add support for stageprofile and stagefeedback
2003-06-04 J"orn Rennecke <joern.rennecke@superh.com>
* decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
2003-06-04 Andreas Jaeger <aj@suse.de>
* g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
2003-06-03 Jason Merrill <jason@redhat.com>
* cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
* cp/decl.c (reshape_init): Handle vectors.
* testsuite/g++.dg/init/array10.C: New.
2003-06-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10940
* pt.c (check_explicit_specialization): Check for 'static'
earlier.
2003-05-31 Diego Novillo <dnovillo@redhat.com>
* class.c (dump_array): Call CONSTRUCTOR_ELTS to access
the operand of a CONSTRUCTOR node.
2003-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
* decl.c (cp_binding_level::this_entity): Rename from this_class.
(cxx_scope_descriptor): New function.
(cxx_scope_debug): Likewise.
(push_binding_level): Use it.
(pop_binding_level): Likewise.
(suspend_binding_level): Likewise.
(resume_binding_level): Likewise.
(pushlevel_class): Adjust use of this_class.
(pushtag): Likewise.
(lookup_name_real): Likewise.
(global_scope_name): New variable.
(initialize_predefined_identifiers): Initialize it.
(push_namespace): Use it.
(make_cxx_scope): New function.
(pushlevel): Use it.
(pushlevel_class): Likewise.
(push_binding_level): Simplify. Loose the last two arguments.
(make_binding_level): Remove.
(initial_push__namespace_scope): New function.
(push_namespace): Use it. Simplify.
(cxx_init_decl_processing): Likewise.
(declare_namespace_level): Remove.
2003-05-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10956
* pt.c (instantiate_decl): Don't use full template arguments if
we are dealing with specializations.
2003-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
* decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
(binding_depth): Unconditionally define.
(is_class_level): Likewise.
(indent): Likewise. Take an indenting parameter.
(push_binding_level): Remove conditional definittion.
(pop_binding_level): Likewise.
(suspend_binding_level): Likewise.
(resume_binding_level): Likewise.
(pushlevel): Likewise.
(pushlevel_class): Likewise.
(poplevel_class): Likewise.
(pop_everything): Likewise.
2003-05-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
* name-lookup.h (global_scope_p): New macro.
* decl.c (pop_binding_level): Use it. Don't refer directly to
global_binding_level.
(suspend_binding_level): Likewise.
(global_bindings_p): Likewise.
(print_other_binding_stack): Likewise.
(print_binding_stack): Likewise.
(maybe_push_to_top_level): Likewise.
(pushdecl_namespace_level): Likewise.
(cxx_init_decl_processing): Likewise.
(start_decl): Likewise.
(cp_finish_decl): Likewise.
(start_function): Likewise.
(global_binding_level): Remove.
2003-05-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* parser.c (cp_parser_explicit_instantiation): Restore old
access before template instantiation.
2003-05-23 Geoffrey Keating <geoffk@apple.com>
* lang-specs.h: Use -o to specify preprocessor's output file.
Make -no-integrated-cpp work when building PCH files.
2003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10682
* pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
check for implicitly created typedef to an enum.
2003-05-21 Jason Merrill <jason@redhat.com>
* init.c (build_vec_delete): Copy the address into a temporary
variable before calling build_vec_delete_1.
* decl2.c (delete_sanity): Don't call stabilize_reference.
2003-05-21 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (register_specialization): Update the decl's location,
if necessary.
(check_explicit_specialization): Likewise.
2003-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
2003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
PR c++/9738
* decl.c (duplicate_decls): Re-invoke make_decl_rtl
if the old decl had instantiated DECL_RTL.
(Base on Richard Henderson 2003-05-13 patch to c-decl.c).
2003-05-19 Matt Austern <austern@apple.com>
* lang-options.h: Document -Wno-invalid-offsetof
* typeck.c (build_class_member_access_expr): Don't complain about
(Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
* name-lookup.c (free_binding_entry): fix where the GTY markers are.
(binding_entry_make): Make entry->chain NULL after getting an entry.
fix the spelling of chain in a comment.
(binding_table_free): speed up by having temporary variable.
(binding_table_new): set table->chain to be NULL after allocating
a table.
(cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
binding->previous to NULL after getting an binding for speed.
2003-05-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cp-tree.h (struct lang_type_class): Replace data member tags
with hash-table nested_udts.
(CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
* class.c (unreverse_member_declarations): Don't touch
CLASSTYPE_TAGS.
(pushclass): Use cxx_remember_type_decls.
* decl.c (struct cp_binding_level): Replace data member tags with
hash-table type_decls.
(pop_binding_level): Handle level->type_decls.
(kept_level_p): Adjust.
(poplevel): Remove unused local variable.
(bt_print_entry): New function.
(print_binding_level): Use it.
(push_namespace): Build current_binding_level->type_decls.
(maybe_process_template_type_declaration): Adjust.
(pushtag): Likewise.
(clear_anon_tags): Use binding_table_remove_anonymous_types.
(gettags): Remove.
(cxx_remember_type_decls): Rename from storetags. Adjust.
(lookup_tag): Use binding_table_find_anon_type. Tidy.
(lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
(cxx_init_decl_processing): Build global_binding_level->type_decls.
(store_parm_decls): Remove pointless code.
* name-lookup.c (free_binding_entry): New variable.
(ENTRY_INDEX): New macro.
(struct binding_table_s): New datatype.
(binding_entry_make): New function.
(binding_entry_free): Likewise.
(binding_table_construct): Likewise.
(binding_table_free): Likewise.
(binding_table_new): Likewise.
(binding_table_expand): Likewise.
(binding_table_insert): Likewise.
(binding_table_find): Likewise.
(binding_table_find_anon_type): Likewise.
(binding_table_reverse_maybe_remap): Likewise.
(binding_table_remove_anonymous_types): Likewise.
(binding_table_foreach): Likewise.
* name-lookup.h (binding_table): New type.
(binding_entry): Likewise.
(bt_foreach_proc): Likewise.
(struct binding_entry_s): New datatype.
(SCOPE_DEFAULT_HT_SIZE): New macro.
(CLASS_SCOPE_HT_SIZE): Likewise.
(NAMESPACE_ORDINARY_HT_SIZE): Likewise.
(NAMESPACE_STD_HT_SIZE): Likewise.
(GLOBAL_SCOPE_HT_SIZE): Likewise.
(binding_table_new): Declare.
(binding_table_free): Likewise.
(binding_table_insert): Likewise.
(binding_table_find_anon_type): Likewise.
(binding_table_reverse_maybe_remap): Likewise.
(binding_table_remove_anonymous_types): Likewise.
(binding_table_foreach): Likewise.
(binding_table_find): Likewise.
(cxx_remember_type_decls): Likewise.
* pt.c (bt_instantiate_type_proc): New function.
(do_type_instantiation): Use it.
* search.c (lookup_field_r): Use binding_table_find.
2003-05-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* semantics.c (perform_deferred_access_checks): Don't discard
checked access.
2003-05-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
libiberty VA_ macros, always use stdarg.
* rtti.c (create_pseudo_type_info): Likewise.
* tree.c (build_min_nt, build_min): Likewise.
2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* ptree.c (cxx_print_type, cxx_print_xnode): Use string
concatentation on HOST_WIDE_INT_PRINT_* format specifier to
collapse multiple function calls into one.
* tree.c (debug_binfo): Likewise.
2003-05-15 Jason Merrill <jason@redhat.com>
PR c++/5388
* call.c (conditional_conversion): Don't consider implicit
conversions if T2 is a base of T1.
* cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
(ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
* parser.c (cp_parser_primary_expression): Convert a static data
member from reference.
2003-05-15 Mark Mitchell <mark@codesourcery.com>
* call.c (build_op_delete_call): Avoid creating unnecessary types.
* class.c (instantiate_type): Remove tests for tf_no_attributes.
* cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
(COMPARE_NO_ATTRIBUTES): Remove.
* typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
PR c++/8385
* semantics.c (finish_typeof): Refine type-dependency check.
2003-05-13 Jason Merrill <jason@redhat.com>
* typeck.c (build_modify_expr): Don't always stabilize the lhs and
rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* method.c (synthesize_method): Call push/pop_deferring_access_checks.
2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10230, c++/10481
* semantics.c (finish_non_static_data_member): Handle when the
non-static member is not from a base of the current class type.
2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10552
* pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
template and has dependent context.
2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9252
* cp-tree.h (saved_scope): Remove check_access field.
(tsubst_flags_t): Remove tf_parsing.
* decl.c (maybe_push_to_top_level): Don't initialize
scope_chain->check_access.
(make_typename_type, make_unbound_class_template): Don't use
tf_parsing.
(register_dtor_fn): Use push/pop_deferring_access_checks
instead of scope_chain->check_access.
* method.c (use_thunk): Likewise.
* parser.c (cp_parser_explicit_instantiation
(cp_parser_constructor_declarator_p): Don't call
push/pop_deferring_access_checks here.
(cp_parser_template_argument, cp_parser_class_name): Don't use
tf_parsing.
(yyparse): Check flag_access_control.
* pt.c (instantiate_class_template): Call
push/pop_deferring_access_checks.
* semantics.c (push_deferring_access_checks): Propagate
dk_no_check.
(perform_or_defer_access_check): Make sure basetype_path is
a type before comparison.
* call.c (build_op_delete_call, build_over_call): Use
perform_or_defer_access_check.
* class.c (alter_access): Likewise.
* init.c (build_offset_ref): Likewise.
* lex.c (do_identifier): Likewise.
* method.c (hack_identifier): Likewise.
* search.c (lookup_member): Likewise.
* semantics.c (finish_non_static_data_member): Likewise.
(simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
instead of flag_access_control.
2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9554
* parser.c (cp_parser_class_name): Remove check_access parameter.
All caller adjusted. Update declaration.
(cp_parser_lookup_name): Likewise.
* semantics.c (push_deferring_access_checks): Change parameter type
to enum deferring_kind. All caller adjusted.
(resume_deferring_access_checks): Adjust to use new enum.
(stop_deferring_access_checks): Likewise.
(perform_or_defer_access_check): Likewise.
* cp-tree.h (deferring_kind): New enum.
(deferred_access): Adjust field type.
(push_deferring_access_checks): Update declaration.
2003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10555, c++/10576
* pt.c (lookup_template_class): Handle class template with
multiple levels of parameters when one of the levels contain
errors.
2003-05-08 Jason Merrill <jason@redhat.com>
* init.c (build_new_1): Don't reuse a TARGET_EXPR in an
expression. Undo some of the recent reorg.
2003-05-07 Richard Henderson <rth@redhat.com>
PR c++/10570
* cfns.gperf: Comment out POSIX thread cancellation points,
plus abort and raise.
* cfns.h: Regenerate.
2003-05-07 Jason Merrill <jason@redhat.com>
* call.c (build_conditional_expr): Don't assume that the folded
expression has result_type.
2003-05-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* typeck.c (build_unary_op): Deal with const qualifier in
invalid pointer-to-member earlier.
2003-05-05 Jason Merrill <jason@redhat.com>
PR c++/9537
* call.c (conditional_conversion): Build an RVALUE_CONV if
we're just changing the cv-quals.
(build_conditional_expr): Don't call convert to change
cv-quals.
2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10496
* typeck.c (build_unary_op): Don't output const qualifier when
output invalid pointer-to-member diagnostics.
2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* decl.c: Fix typos.
2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/4494
* decl.c (start_function): Use same_type_p to check return type
of main.
2003-05-03 Zack Weinberg <zack@codesourcery.com>
PR c/10604
* cp/typeck.c (build_x_compound_expr): No need to check
extra_warnings as well as warn_unused_value.
2003-05-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9364, c++/10553, c++/10586
* decl.c (make_typename_type): Don't crash on illegal code.
2003-05-03 Nathan Sidwell <nathan@codesourcery.com>
* class.c (finish_struct): Use location_t and input_location
directly.
* decl.c (make_label_decl): Likewise.
(use_label): Likewise.
* decl2.c (warn_if_unknown_interface): Likewise.
(start_static_initialization_or_destruction): Likewise.
(generate_ctor_or_dtor_function): Likewise.
(finish_file): Likewise.
* error.c (print_instantiation_full_context): Likewise.
* init.c (create_temporary_var): Likewise.
* method.c (synthesize_method): Likewise.
* parser.c (cp_token): Likewise.
(cp_lexer_set_source_position_from_token): Likewise.
(cp_lexer_get_preprocessor_token): Likewise.
(cp_parser_statement): Likewise.
* pt.c (tsubst_friend_function): Likewise.
(instantiate_class_template): Likewise.
(tsubst_decl): Likewise.
(tsubst): Likewise.
(instantiate_decl): Likewise.
* semantics.c (begin_class_definition): Likewise.
(expand_body): Likewise.
2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
* class.c (finish_struct): Rename lineno to input_line.
* decl.c (push_binding_level, pop_binding_level,
suspend_binding_level, resume_binding_level, make_label_decl,
use_label, start_function): Likewise.
* decl2.c (warn_if_unknown_interface,
start_static_initialization_or_destruction,
generate_ctor_or_dtor_function, finish_file): Likewise.
* error.c (cp_line_of, print_instantiation_full_context,
print_instantiation_context): Likewise.
* except.c (check_handlers_1, check_handlers): Likewise.
* init.c (create_temporary_var): Likewise.
* method.c (use_thunk, synthesize_method): Likewise.
* parser.c (cp_lexer_set_source_position_from_token,
cp_lexer_get_preprocessor_token): Likewise.
* pt.c (push_tinst_level, pop_tinst_level,
tsubst_friend_function, instantiate_class_template, tsubst_decl,
tsubst, tsubst_expr, instantiate_decl): Likewise.
* semantics.c (genrtl_try_block, finish_label_stmt,
begin_class_definition, expand_body,
genrtl_finish_function): Likewise.
* tree.c (build_min_nt, build_min): Likewise.
2003-05-01 Mark Mitchell <mark@codesourcery.com>
* decl2.c (comdat_linkage): Don't externalize explicit
instantiations.
2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10554
* decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
is not NULL.
2003-05-01 Steven Bosscher <steven@gcc.gnu.org>
* cp-tree.h (struct lang_id2): Remove. Move fields from here...
(struct lang_identifier): ... to here.
(LANG_ID_FIELD): Remove.
(SET_LANG_ID): Remove.
(IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
(SET_IDENTIFIER_LABEL_VALUE): Likewise.
(IDENTIFIER_IMPLICIT_DECL): Likewise.
(SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
(IDENTIFIER_ERROR_LOCUS): Likewise.
(SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/8772
* pt.c (convert_template_argument): Correct diagnostic.
2003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9432, c++/9528
* decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
2003-04-30 Garbiel Dos Reis <gcc@integrable-solutions.net>
* decl.c (check_previous_goto_1): Adjust prototype.
(check_previous_goto): Adjust use.
(check_switch_goto): Likewise.
(use_label): Adjust.
(check_previous_goto_1): Don't use pedwarn_with_file_and_line.
(struct named_label_use_list): Use location_t datatype.
2003-04-29 Mark Mitchell <mark@codesourcery.com>
PR c++/10551
* pt.c (mark_decl_instantiated): Defer all explicit instantiations
that have not yet been written out.
2003-04-29 Mark Mitchell <mark@codesourcery.com>
PR c++/10549
* class.c (layout_class_type): Mark overlong bitfields as having
the maximum size permitted by their type, after layout.
PR c++/10527
* error.c (dump_expr): Correctly handling of NEW_EXPR.4
2003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* call.c (build_operator_new_call): Fix typo.
* lang-options.h: Likewise.
2003-04-29 Mark Mitchell <mark@codesourcery.com>
PR c++/10515
* cp-tree.h (lookup_field_1): Declare it.
* search.c (lookup_field_1): Make it public.
* decl.c (reshape_init): Handle designated initializers.
* decl.c (maybe_commonize_var): Further tweak support for systems
without weak symbols.
2003-04-27 Mark Mitchell <mark@codesourcery.com>
* decl.c (maybe_commonize_var): Fix thinko in last patch.
2003-04-27 Mark Mitchell <mark@codesourcery.com>
PR c++/10506
* method.c (use_thunk): Decrement immediate_size_expand.
PR c++/10503
* cp-tree.h (DECL_VAR_MARKED_P): New macro.
(DECL_MAYBE_TEMPLATE): Remove.
* class.c (fixed_type_or_null): Avoid infinite recursion.
* decl.c (maybe_commonize_var): Make the code match the comments.
* pt.c (instantiate_decl): Move call to import_export_decl.
2003-04-26 Mark Mitchell <mark@codesourcery.com>
* decl2.c (finish_file): Fix merge botch.
2003-04-25 Mark Mitchell <mark@codesourcery.com>
* decl2.c (finish_file): Don't call import_export_decl for
functions that are not defined.
(handle_class_head): Robustify.
* pt.c (instantiate_decl): Do not call cp_finish_decl for
variables that are not defined.
2003-04-24 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
* call.c (print_z_candidates): Fix off by one error.
2003-04-24 Nathan Sidwell <nathan@codesourcery.com>
PR c++/10337
* call.c (joust): Don't warn about conversion ops that are exact
or cv-conversions. Rearrange to avoid multiple type comparisons.
2003-04-23 Mark Mitchell <mark@codesourcery.com>
PR c++/10471
* call.c (build_cxx_call): Robustify.
2003-04-23 Neil Booth <neil@daikokuya.co.uk>
* Make-lang.in (lex.o): Remove mbchar.h.
* lex.c (MULTIBYTE_CHARS): Lose.
* parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
in c-lex.c.
2003-04-23 Mark Mitchell <mark@codesourcery.com>
PR c++/9847
* cp-tree.h (duplicate_tag_error): Remove.
* class.c (duplicate_tag_error): Remove.
* semantics.c (begin_class_definition): Return immediately for a
duplicate class definition.
PR c++/10451
* decl.c (grokdeclarator): Correct logic for "mutable" errors.
2003-04-22 Mark Mitchell <mark@codesourcery.com>
PR c++/10446
* search.c (lookup_fnfields_1): Handle empty slots in the method
vector.
PR c++/10428
* decl.c (check_elaborated_type_specifier): New function, split
out from ...
(xref_tag): ... here. Use the new function in more places.
* rtti.c (throw_bad_typeid): Use build_cxx_call.
2003-04-21 Mark Mitchell <mark@codesourcery.com>
* call.c (build_over_call): Use build_cxx_call.
(build_cxx_call): New method, split out of build_over_call.
* cp-tree.h (language_function): Add can_throw.
(build_cxx_call): Declare it.
* decl.c (finish_function): If a function does not contain any
calls to functions that can throw an exception, indicate that
fact.
* decl2.c (mark_used): Do not defer the instantiation of
functions, if the current function does not throw.
* optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
* pt.c (instantiate_decl): Make sure import_export_decl is called
before emitting things.
* rtti.c (throw_bad_cast): Use build_cxx_call.
(build_dynamic_cast_1): Likewise.
* typeck.c (build_function_call): Likewise.
2003-04-21 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9881
* typeck.c (build_unary_op): Fold all COMPONENT_REF addr
expressions. Reverts my 2002-08-08 patch.
* typeck.c (comp_ptr_ttypes_real): Swap final && operands for
cheaper early exit.
2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
* cp/decl2.c (start_static_storage_duration_function): Take count
arg, don't check if it wraps round.
(generate_ctor_or_dtor_function): Add locus arg, use it.
(generate_ctor_and_dtor_functions_for_priority): Data arg is a
locus.
(finish_file): Set line numbers to past EOF for synthesized
functions.
2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
PR c++/10405
* search.c (lookup_field_1): Final scan goes backwards for
types, forwards for non-types.
2003-04-17 Roger Sayle <roger@eyesopen.com>
PR c/10375
* decl.c (duplicate_decls): Preserve "const", "noreturn" and
"nothrow" function attributes.
2003-04-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10347
* pt.c (type_dependent_expression_p): Handle array new.
2003-04-15 Mark Mitchell <mark@codesourcery.com>
PR c++/10381
* parser.c (cp_parser_primary_expression): Reorganize logic for
dealing with name lookup failures.
2003-04-15 Jason Merrill <jason@redhat.com>
* decl2.c (mark_used): Don't instantiate anything if
skip_evaluation.
2003-04-14 Ziemowit Laski <zlaski@apple.com>
* tree.c (build_cplus_array_type_1): Do not call
uses_template_parms() on a NULL index_type.
2003-04-13 Roger Sayle <roger@eyesopen.com>
* decl.c (duplicate_decls): Preserve pure and malloc attributes.
2003-04-12 Mark Mitchell <mark@codesourcery.com>
PR c++/10300
* init.c (build_new_1): Reorganize.
2003-04-12 Zack Weinberg <zack@codesourcery.com>
* class.c (initialize_array)
* decl.c (reshape_init)
* decl2.c (build_expr_from_tree)
* init.c (build_zero_init)
* pt.c (tsubst_copy, tsubst_copy_and_build)
* rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
(ptm_initializer, class_initializer, get_pseudo_ti_init)
* semantics.c (finish_compound_literal)
* typeck.c (build_ptrmemfunc1)
* typeck2.c (store_init_value, process_init_constructor)
(build_functional_cast): Use build_constructor.
2003-04-12 Zack Weinberg <zack@codesourcery.com>
* call.c (print_z_candidates): Use gcc_gettext_width, not
strlen, to determine how much padding to use.
2003-04-10 Zack Weinberg <zack@codesourcery.com>
* decl.c: Update all calls to shadow_warning.
2003-04-10 Mark Mitchell <mark@codesourcery.com>
* class.c (layout_class_type): Correct handling for overlong
bit-fields whose width is the same as an integer type.
2003-04-06 Zack Weinberg <zack@codesourcery.com>
* cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
* cp-lang.c (cp_tree_size): New function.
(LANG_HOOKS_TREE_SIZE): Override.
* cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
(union lang_tree_node): Remove common and srcloc members.
(build_srcloc_here): Don't prototype.
* decl.c (cp_tree_node_structure): Kill SRCLOC case.
* pt.c (pending_templates): Correct comment.
* tree.c (build_srcloc, build_srcloc_here): Kill.
2003-04-06 Zack Weinberg <zack@codesourcery.com>
* call.c: Include intl.h.
(print_z_candidate): Always use inform; get rid of errfn
argument. Reorganize so that all the strings get picked up
by xgettext. Note obligation of caller to pass first argument
through gettext.
(print_z_candidates): Update to match. Indent second and
successive candidates by strlen() of translated message.
(joust): Restructure ambiguous-conversion pedwarn so that
translators see a complete sentence. Update calls to
print_z_candidate.
* Make-lang.in (cp/call.o): Update dependencies.
2003-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* decl.c (set_current_binding_level): Delete, revert last change.
(current_binding_level): Modify to allow it as as lvalue.
2003-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* name-lookup.c (find_binding): Pass appropriate pointer type to
POP_TIMEVAR_AND_RETURN.
2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Make-lang.in (cp-warn): Add $(STRICT_WARN).
* cp-tree.h: Don't insist on having GNUC.
2003-04-03 Jason Merrill <jason@redhat.com>
* cvt.c (ocp_convert): Only abort if we try to convert an object
of TREE_ADDRESSABLE type.
* class.c (build_vtable): Set DECL_ALIGN here.
(get_vtable_decl): Not here.
(layout_vtable_decl): Or here.
(create_vtable_ptr): Or here.
(layout_class_type): Or here.
(check_bitfield_decl): Don't mess with field alignment.
2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
DEF_ASSN_OPERATOR): Delete spurious semi-colon.
* rtti.c (dfs_class_hint_mark): Likewise.
* decl.c (push_local_name, push_class_level_binding,
maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
functions returning void.
* decl2.c (add_using_namespace): Likewise.
* decl.c (print_binding_level, print_other_binding_stack,
print_binding_stack): Cast argument of %p specifier to void*.
* ptree.c (cxx_print_decl): Likewise.
* cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
VAR_FUNCTION_OR_PARM_DECL_CHECK,
VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
* decl.c (set_current_binding_level): New macro. Use throughout
when setting the current binding level.
* cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
in enum.
* method.c (mangling_flags): Likewise.
* cp-tree.h (lang_type_header): Add __extension__ and use
CHAR_BITFIELD for members.
2003-04-02 Geoffrey Keating <geoffk@apple.com>
PR other/9274
* mangle.c: Include gt-cp-mangle.h.
(subst_identifiers): Mark with GTY.
* config-lang.in (gtfiles): Add cp/mangle.c.
* Make-lang.in: (gt-cp-mangle.h): New rule.
(cp/mangle.o): Depends on gt-cp-mangle.h.
2003-04-01 Andrew Pinski <pinskia@physics.uc.edu>
* config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
after \$(srcdir)/cp/name-lookup.h.
* name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file.
* Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
(cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
2003-03-31 Jason Merrill <jason@redhat.com>
PR java/10145
* class.c (check_field_decl): Don't set DECL_ALIGN.
2003-03-30 Mark Mitchell <mark@codesourcery.com>
PR c++/7647
* decl.c (grokdeclarator): Tidy, slightly.
* search.c (lookup_field_1): Add want_type parameter.
(lookup_field_r): Adjust call to lookup_field_1.
2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
* Make-lang.in (cp/name-lookup.o): Add more dependencies.
2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cp-tree.h (binding_for_name: Move to name-lookup.h Adjust
prototype.
(cxx_scope_find_binding_for_name): Likewise.
* decl.c (find_binding: Move to name-lookup.c.
(binding_for_name): Likewise.
(cxx_scope_find_binding_for_name): Likewise.
(BINDING_LEVEL): Remove.
(push_binding): Tidy.
(push_class_binding): Likewise.
(pop_binding): Likewise.
(poplevel): Likewise.
(poplevel_class): Likewise.
(set_identifier_type_value_with_scope): Likewise.
(push_overloaded_decl): Likewise.
(lookup_tag): Likewise.
(unqualified_namespace_lookup): Likewise.
(lookup_name_current_level): Likewise.
(maybe_inject_for_scope_var): Likewise.
(namespace_binding): Move to name-lookup.c.
(set_namespace_binding): Likewise.
* decl2.c (lookup_using_namespace): Tidy.
(qualified_lookup_using_namespace): Likewise.
(do_toplevel_using_decl): Likewise.
* name-lookup.c: Include "timevar.h"
* name-lookup.h (cxx_scope): Declare.
(struct cxx_binding): Lose member "has_level". Adjust "scope"
member declaration.
(BINDING_SCOPE): Adjust definition.
(BINDING_HAS_LEVEL_P): Remove.
2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
* name-lookup.c: New file.
* name-lookup.h: Likewise..
* decl.c (push_binding): Adjust use cxx_binding_make.
(free_bindings): Move to name-lookup.c
(pop_binding): Use cxx_binding_free.
(binding_for_name): Tidy.
* cp-tree.h: Include "name-lookup.h"
(cxx_binding_make): Move to name-lookup.h
(cxx_binding_clear): Likewise.
(struct cxx_binding): Likewise.
(LOCAL_BINDING_P): Likewise.
(INHERITED_VALUE_BINDING_P): Likewise.
(BINDING_SCOPE): Likewise.
(BINDING_HAS_LEVEL_P): Likewise.
(BINDING_VALUE): Likewise.
(BINDING_TYPE): Likewise.
* config-lang.in (gtfiles): Add cp/name-lookup.h
* Make-lang.in (cp/name-lookup.o): New rule.
(CXX_OBJS): Add cp/name-lookup.o
(CXX_TREE_H): Add cp/name-lookup.h
2003-03-28 Jason Merrill <jason@redhat.com>
PR c++/10245
* cvt.c (force_rvalue): New fn.
* call.c (build_conditional_expr): Use it.
* cp-tree.h: Declare it.
2003-03-28 Mike Stump <mrs@apple.com>
* error.c (dump_expr): Add 0x to printed hex numbers to make
output match source code better.
2003-03-28 Mark Mitchell <mark@codesourcery.com>
PR c++/10218
* decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
definitions.
* decl2.c (generate_ctor_or_dtor_function): Tolerate a
non-existant ssdf_decls array.
(finish_file): Call generator_ctor_or_dtor_function when there are
static constructors or destructors and no other static
initializations.
2003-03-28 Nathan Sidwell <nathan@codesourcery.com>
PR c++/10047
* decl2.c (finish_file): Don't warn about explicitly instantiated
inline decls.
2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
PR c++/10224
* pt.c (lookup_template_class): Only check instantiated args if
they do not contain template parameters.
2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
PR c++/10158
* parser.c (cp_parser_function_definition): Set
DECL_INITIALIZED_IN_CLASS for members.
* pt.c (instantiate_decl): Only reduce the template args for
friends that are not defined in class.
2003-03-25 Jason Merrill <jason@redhat.com>
* call.c (print_z_candidate): Change name of first arg to msgid.
(joust): Add comment for translators.
2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9898, PR c++/383, DR 322
* pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
through reference types on both PARM and ARG.
2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
PR c++/10119
* error.c (dump_expr) <BASELINK>: Use dump_expr.
* pt.c (maybe_fold_nontype_args): New function.
(tsubst_copy) <SCOPE_REF>: Subst any template_id args.
<TEMPLATE_ID_EXPR>: Break out folding code, call it.
(tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
maybe_fold_nontype_args.
2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
PR c++/10026
* decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
2003-03-23 Mark Mitchell <mark@codesourcery.com>
PR c++/7086
* typeck.c (cxx_mark_addressable): Adjust call to
gen_mem_addressof or put_var_into_stack.
2003-03-22 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9978, c++/9708
* cp-tree.h (instantiate_template): Add tsubst_flags parameter.
* call.c (add_template_candidate_real): Adjust
instantiate_template call.
* class.c (resolve_address_of_overloaded_function): Likewise.
* decl.c (build_enumerator): Set TREE_CONSTANT.
* pt.c (check_instantiated_args): New.
(push_inline_template_parms_recursive): Set TREE_CONSTANT,
TREE_READONLY.
(build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
(reduce_template_parm_level): Likewise.
(process_template_parm): Likewise.
(check_explicit_specialization): Adjust instantiate_template call.
(convert_template_argument): Don't check non-type argument here.
(lookup_template_class): Check them here.
(tsubst_friend_function): Adjust instantiate_template call.
(instantiate_template): Add tsubst_flags parameter, use it. Check
instantiated args.
2003-03-21 Zack Weinberg <zack@codesourcery.com>
* decl.c: Update calls to shadow_warning.
2003-03-21 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9898
* error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
(dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
2003-03-20 Mark Mitchell <mark@codesourcery.com>
* cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
friends.
* cp/pt.c (instantiate_class_template): Fix formatting.
2003-03-14 Matt Austern <austern@apple.com>
* cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
(unemitted_tinfo_decl_p): Remove.
(emit_tinfo_decl): Change declaration to remove unused parameter.
* decl2.c (finish_file): Change tinfo emission to loop through
unemitted_tinfo_decls array instead of looping through all decls.
* rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
unused second parameter.
(init_rtti_processing): initialize unemitted_tinfo_decls varray.
(get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
(emit_tinfo_decl): remove unused second parameter, add assertion
that decl hasn't already been emitted.
2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
* dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
type from 'int' to 'bool'. Replace 0 and 1 with true and false in
return statements.
2003-03-19 Jason Merrill <jason@redhat.com>
PR c++/8316, c++/9315, c++/10136
* call.c (print_z_candidate): Split out from...
(print_z_candidiates): ...here.
(joust): Use it.
2003-03-17 Roger Sayle <roger@eyesopen.com>
PR c++/10031
* decl.c (duplicate_decls): Use the new type when prototyping
anticipated decls, even when the types match. This defines the
exception list for the built-in function.
2003-03-17 Jason Merrill <jason@redhat.com>
PR c++/10091
* typeck.c (build_class_member_access_expr): Compare
TYPE_MAIN_VARIANTs.
2003-03-17 Mark Mitchell <mark@codesourcery.com>
PR c++/9639
* parser.c (cp_parser_declarator_id): Clear parser->scope.
2003-03-16 Jason Merrill <jason@redhat.com>
PR c++/9993
* decl.c (finish_function): Only allow the NRVO to use variables
declared at function scope.
2003-03-17 Andreas Jaeger <aj@suse.de>
* Make-lang.in (cp/TAGS): Remove.
2003-03-16 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9629
* cp-tree.h (struct language_function): Add in_base_initializer.
(in_base_initializer): define it.
(expand_member_init): Remove INIT param.
* init.c (expand_member_init): Remove INIT param, return the member.
(emit_mem_initializers): Set in_base_initializer.
* class.c (build_base_path): Check in_base_initializer.
* parser.c (cp_parser_mem_initializer): Set in_base_initializer.
* pt.c (tsubst_initializer_list): Likewise.
2003-03-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
* decl.c (binding_for_name): Fix initialization thinko.
2003-03-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
Compile-time improvement: 2/n.
* cp-tree.h (struct cxx_binding): New datatype;
(struct lang_identifier): Use it.
(LOCAL_BINDING_P): Adjust definition.
(INHERITED_VALUE_BINDING_P): Likewise.
(BINDING_SCOPE): Likewise.
(BINDING_HAS_LEVEL_P): Likewise.
(BINDING_VALUE): Likewise.
(BINDING_TYPE): Likewise.
(IDENTIFIER_VALUE): Likewise.
(struct tree_binding): Remove.
(TS_CP_BINDING): Likewise.
((union lang_tree_node): Remove field "binding".
(cxx_binding_clear): New macro.
(binding_for_name): Adjust return type.
(qualified_lookup_using_namespace): Adjust prototype.
(lookup_using_namespace): Adjust prototype.
(cxx_scope_find_binding_for_name): Declare.
* cp-tree.def: Remove CPLUS_BINDING definition.
* decl.c (push_binding): Adjust local variable type.
(add_binding): Likewise.
(push_class_binding): Likewise.
(pop_binding): Likewise.
(poplevel): Likewise.
(poplevel_class): Likewise.
(free_bindings): Adjust type.
(find_binding): Adjust return type, add a third parameter. Remove
non-useful assertion now that we use static typing.
(cxx_scope_find_binding_for_name): New function.
(binding_for_name): Use it. Adjust local variable type. Simplify.
(namespace_binding): Simplify.
(set_namespace_binding): Likewise.
(set_identifier_type_value_with_scope): Adjust local variable type.
(lookup_tag): Don't type-abuse of local variable 'old'.
(lookup_namespace_name): Likewise. Allocate binding on stack.
(select_decl): Adjust prototype.
(unqualified_namespace_lookup): Allocate binding on stack.
Don't type-abuse of local variable 'val'.
(lookup_name_real): Likewise.
(maybe_inject_for_scope_var): Adjust local variable type.
(cp_tree_node_structure): Remove CPLUS_BINDING case label.
(namespace_binding): Adjust logic, simplify.
(BINDING_LEVEL): Adjust definition.
(push_class_level_binding): Adjust local variable type.
(struct cxx_saved_binding): Adjust field 'binding' type.
* decl2.c (ambiguous_decl): Adjust prototype.
(lookup_using_namespace): Adjust local variable type.
(qualified_lookup_using_namespace): Catch type error and correct
ensueing logic error.
(do_nonmember_using_decl): Adjust local variable type. Allocate
temporary cxx_binding on stack.
(do_toplevel_using_decl): Adjust local variable type.
* ptree.c (cxx_print_cxx_binding): New function.
(cxx_print_identifier): Use it.
(cxx_print_xnode): Delete CPLUS_BINDING case label.
2003-03-15 Roger Sayle <roger@eyesopen.com>
* tree.c (count_functions): Fix whitespace.
2003-03-15 Neil Booth <neil@daikokuya.co.uk>
* Make-lang.in: Update.
2003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/6440
* pt.c (maybe_process_partial_specialization): Handle
member class template when enclosing class template is
explicit specialized.
(most_general_template): Stop looking when DECL is already
specialized.
2003-03-13 Jason Merrill <jason@redhat.com>
PR c++/9420
* search.c (lookup_conversions): Call complete_type here.
* call.c (implicit_conversion): Not here.
2003-03-13 Mark Mitchell <mark@codesourcery.com>
* decl2.c (do_nonmember_using_decl): Correct handling of
simultaneous type/non-type bindings.
* call.c (initialize_reference): Remove bogus assertion.
* decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
2003-03-12 Andrew Lewycky <andrew@mxc.ca>
PR c++/7050
* expr.c (cxx_expand_expr): Return const0_rtx for throw
expressions.
2003-03-11 Mark Mitchell <mark@codesourcery.com>
PR c++/9474
* decl2.c (do_nonmember_using_decl): Do not call duplicate decls
to merge old and new declarations.
2003-03-12 Alexandre Oliva <aoliva@redhat.com>
* g++.1: Remove.
* Make-lang.in (c++.generated-manpages): Build cp/g++.1.
(cp/g++.1): Build it from scratch in the build tree.
(c++.install-man): Depend on it. Install it from the build tree.
(c++.mostlyclean): Clean it.
2003-03-11 Mark Mitchell <mark@codesourcery.com>
PR c++/9474
* decl2.c (do_nonmember_using_decl): Do not call duplicate decls
to merge old and new declarations.
PR c++/9924
* decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
2003-03-11 Jason Merrill <jason@redhat.com>
PR c++/9820
* search.c (lookup_member): Fix handling of functions in a class
being defined.
2003-03-11 Mark Mitchell <mark@codesourcery.com>
PR c++/8700
* call.c (convert_class_to_reference): Adjust usage of
splice_viable.
(any_viable): Remove.
(splice_viable): Combine with any_viable.
(print_z_candidates): Avoid printing duplicates.
(build_user_type_conversion_1): Adjust usage of splice_viable.
(build_new_function_call): Likewise.
(build_operator_new_call): Likewise.
(build_object_call): Likewise.
(build_conditional_expr): Likewise.
(build_new_op): Likewise.
(build_new_method_call): Likewise.
(joust): Remove spurious comment.
* cp-tree.h (DECL_FRIENDLIST): Correct documentation.
* decl2.c (arg_assoc_class): Simplify.
* friend.c (add_friend): Likewise.
2003-03-11 Jason Merrill <jason@redhat.com>
PR c++/8660
* decl2.c (check_classfn): A member template only matches a
member template.
2003-03-11 Neil Booth <neil@daikokuya.co.uk>
* Make-lang.in (CXX_C_OBJS): Update.
* lang-specs.h: Don't define __GNUG__ here.
2003-03-10 Mark Mitchell <mark@codesourcery.com>
* call.c (perform_overload_resolution): New function.
(build_new_function_call): Use it.
(build_operator_new_call): Likewise.
(add_candidates): Add explicit_targs and template_only parameters.
(build_new_op): Adjust accordingly.
* cp-tree.h (build_operator_new_call): New function.
(build_function_call_real): Remove.
(build_function_call_maybe): Likewise.
* init.c (build_new_1): Use build_operator_new_call.
* typeck.c (build_function_call_real): Rename to ...
(build_function_call): ... this.
2003-03-10 Devang Patel <dpatel@apple.com>
PR c++/9394
* g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
2003-03-10 Jason Merrill <jason@redhat.com>
PR c++/9798
* decl.c (push_using_directive): Push before recursing.
PR c++/9868, c++/9524
* call.c (resolve_scoped_fn_name): Handle the case of a function
pointer member.
* decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
argument in the pointer-to-member case.
2003-03-09 Mark Mitchell <mark@codesourcery.com>
PR c++/9373
* cp-lang.c (cxx_get_alias_set): Use alias set zero for
pointers to member functions.
PR c++/8534
* decl.c (build_ptrmemfunc_type): Do not allow default arguments
in pointer-to-member-function types.
2003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
* expr.c (cplus_expand_constant): Use C90 prototype style.
(cxx_expand_expr): Likewise.
2003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9970
* decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
functions.
2003-03-08 Geoffrey Keating <geoffk@apple.com>
* lang-specs.h (c++-header): Change .pch to .gch.
2003-03-08 Neil Booth <neil@daikokuya.co.uk>
* cp-tree.h (cxx_init): Update prototype.
* lex.c (cxx_init): Similarly.
2003-03-08 Mark Mitchell <mark@codesourcery.com>
PR c++/9823
* cp-tree.h (begin_mem_initializers): Remove.
* parser.c (cp_parser_mem_initializer_list): Inline it here.
Do not call finish_mem_initializers if not in a constructor.
(cp_parser_class_head): Fix typo in error message.
* semantics.c (begin_mem_initializers): Remove.
* testsuite/g++.dg/parser/constructor1.C: New test.
PR c++/9809
* call.c (add_function_candidate): Skip builtin fuctions that have
not yet been declared.
PR c++/9982
* init.c (build_new_1): Correct logic for determining whether or
not to use an array cookie.
PR c++/9524
* parser.c (cp_parser_postfix_expression): Call
finish_non_static_data_member, even when processing_template_decl.
PR c++/9912
* cp-tree.h (is_ancestor): New function.
(handle_class_head): Change prototype.
* decl2.c (is_namespace_ancestor): Rename to ...
(namespace_anecestor): ... this.
(set_decl_namespace): Adjust accordingly.
(handle_class_head): Remove unnecessary parameters.
* parser.c (cp_parser_class_head): Check that
nested-name-specifiers are used appropriately.
2003-03-07 Mark Mitchell <mark@codesourcery.com>
* call.c (reference_binding): Remove REF_IS_VAR parameter.
(implicit_conversion): Adjust call to reference_binding.
(make_temporary_var_for_ref_to_type): Add TYPE parameter.
(initialize_reference): Adjust handling for references bound to
rvalues.
* cp-tree.h (make_temporary_var_for_ref_to_temp): Change
prototype.
(real_non_cast_lvalue_p): New method.
* cvt.c (build_up_reference): Adjust use of
make_temporary_var_for_ref_to_temp.
* tree.c (real_non_cast_lvalue_p): New method.
2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
* except.c (init_exception_processing): Use C90 prototype style.
(cp_protect_cleanup_actions): Likewise.
(prepare_eh_type): Likewise.
(build_eh_type_type): Likewise.
(build_exc_ptr): Likewise.
(do_begin_catch): Likewise.
(dtor_nothrow): Likewise.
(do_end_catch): Likewise.
(push_eh_cleanup): Likewise.
(decl_is_java_type): Likewise.
(choose_personality_routine): Likewise.
(initialize_handler_parm): Likewise.
(expand_start_catch_block): Likewise.
(expand_end_catch_block): Likewise.
(begin_eh_spec_block): Likewise.
(finish_eh_spec_block): Likewise.
(do_allocate_exception): Likewise.
(do_free_exception): Likewise.
(wrap_cleanups_r): Likewise.
(stabilize_throw_expr): Likewise.
(build_throw): Likewise.
(complete_ptr_ref_or_void_ptr_p): Likewise.
(is_admissible_throw_operand): Likewise.
(nothrow_libfn_p): Likewise.
(can_convert_eh): Likewise.
(check_handlers_1): Likewise.
(check_handlers): Likewise.
2003-03-06 Mark Mitchell <mark@codesourcery.com>
* call.c (merge_conversion_sequences): New function.
(build_conv): Set ICS_USER_FLAG for USER_CONVs.
(convert_class_to_reference): Correct handling of second
standard conversion sequence in a user-defined conversion
sequence.
(build_user_type_conversion_1): Use merge_conversion_sequences.
* cp-tree.def: Add comments for CONV nodes.
* rtti.c (get_tinfo_decl): Use build_address/build_nop.
2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
* error.c (init_error): Use C90 prototype style.
(dump_scope): Likewise.
(dump_qualifiers): Likewise.
(dump_template_argument): Likewise.
(dump_template_argument_list): Likewise.
(dump_template_parameter): Likewise.
(dump_template_bindings): Likewise.
(dump_type): Likewise.
(dump_typename): Likewise.
(class_key_or_enum): 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_exception_spec): Likewise.
(dump_function_name): Likewise.
(dump_template_parms): Likewise.
(dump_char): Likewise.
(dump_expr_list): Likewise.
(dump_expr): Likewise.
(dump_binary_op): Likewise.
(dump_unary_op): Likewise.
(type_as_string): Likewise.
(expr_as_string): Likewise.
(decl_as_string): Likewise.
(context_as_string): Likewise.
(lang_decl_name): Likewise.
(cp_file_of): Likewise.
(cp_line_of): Likewise.
(decl_to_string): Likewise.
(expr_to_string): Likewise.
(fndecl_to_string): Likewise.
(code_to_string): Likewise.
(language_to_string): Likewise.
(parm_to_string): Likewise.
(op_to_string): Likewise.
(type_to_string): Likewise.
(assop_to_string): Likewise.
(args_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.
(function_category): Likewise.
(print_instantiation_full_context): Likewise.
(print_instantiation_partial_context): Likewise.
(maybe_print_instantiation_context): Likewise.
(print_instantiation_context): Likewise.
(cp_printer): Likewise.
(print_integer): Likewise.
(print_non_consecutive_character): Likewise.
(locate_error): Likewise.
2003-03-06 Mark Mitchell <mark@codesourcery.com>
PR c++/9965
* call.c (reference_binding): Add ref_is_var parameter.
(implicit_conversion): Adjust call to reference_binding.
(initialize_reference): Likewise.
PR c++/9400
* decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
PARM_DECLs.
PR c++/9791
* class.c (get_basefndecls): Use lookup_fnfields_1.
2003-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9188
* parser.c (cp_parser_type_parameter): Remove redundant `expect'
in error message.
(cp_parser_single_declaration): Likewise.
2003-03-05 Jason Merrill <jason@redhat.com>
PR c++/9440
* call.c (build_conditional_expr): Use convert rather than an
explicit NOP_EXPR.
2003-03-02 Matt Austern <austern@apple.com>
* decl.c (cp_binding_level): Add static_decls varray member.
(add_decl_to_level): Add static/inline namespace scope
declarations to static_decls array.
(wrapup_global_for_namespace): Pass static_decls only, instead of
all decls, to wrapup_global_declarations/check_global_declarations.
(push_namespace): Initialize static_decls for ordinary namespaces.
(cxx_init_decl_processing): Initialize static_decls for global
namespace.
2003-03-05 Mark Mitchell <mark@codesourcery.com>
* class.c (end_of_class): Correct thinko.
2003-03-04 Nathanael Nerode <neroden@gcc.gnu.org>
* config-lang.in: Replace ${libstdcxx_version} by its value.
2003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cp-tree.h (cxx_saved_binding): Declare.
(struct saved_scope): Adjust type of field 'old_binding'.
* decl.c (cxx_saved_binding_make): New macro.
(struct cxx_saved_binding): Define.
(store_bindings): Adjust prototype. Use cxx_saved_binding to save
C++ bindings.
(maybe_push_to_top_level): Adjust local variable type.
(pop_from_top_level): Likewise.
2003-03-04 Tom Tromey <tromey@redhat.com>
* Make-lang.in (c++.tags): New target.
2003-03-04 Neil Booth <neil@daikokuya.co.uk>
* Make-lang.in: Update.
2003-03-03 Jason Merrill <jason@redhat.com>
* decl.c (finish_enum): Do set the type in a template. Simplify.
* pt.c (tsubst_enum, tsubst_copy): Revert last patch.
2003-03-03 Mark Mitchell <mark@codesourcery.com>
PR c++/9878
* call.c (convert_class_to_reference): Correct conversion
sequences.
(reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
(implicit_conversion): Adjust call to reference_binding.
(add_candidate): Change type of candidates parameter.
(add_function_candidate): Likewise.
(add_conv_candidate): Likewise.
(build_builtin_candidate): Likewise.
(add_builtin_candidate): Likewise.
(add_builtin_candidates): Likewise.
(add_template_candidate_real): Likewise.
(add_template_candidate): Likewise.
(add_template_conv_candidate): Likewise.
(build_user_type_conversion_1): Adjust accordingly.
(build_object_call): Likewise.
(build_conditional_expr): Likewise.
(add_candidates): Likewise.
(build_new_op): Likewise.
(convert_like_real): Use USER_CONV_CAND. Use build_nop.
(build_new_method_call): Adjust calls to add_function_candidate.
(make_temporary_var_for_ref_to_temp): New function.
(initialize_reference): Add decl parameter.
* class.c (build_rtti_vtbl_entries): Use build_address and
build_nop.
* cp-tree.h (initialize_reference): Change prototype.
(make_temporary_var_for_ref_to_temp): New function.
(build_type_conversion): Change prototype.
(build_address): New function.
(build_nop): Likewise.
* cvt.c (cp_convert_to_pointer): Adjust call to
build_type_conversion. Avoid indicating redundant NOP_EXPRs.
Use build_nop.
(convert_to_pointer_force): Use build_nop.
(build_up_reference): Use make_temporary_var_for_ref_to_temp.
(convert_to_reference): Adjust call to build_type_conversion.
(ocp_convert): Likewise.
(build_type_conversion): Remove for_sure parameter.
* decl.c (grok_reference_init): Use initialize_reference.
* typeck.c (build_address): New function.
(build_nop): Likewise.
(build_unary_op): Use them.
(build_ptrmemfunc): Tidy slightly.
(convert_for_initialization): Adjust call to
initialize_reference.
* typeck2.c (store_init_value): Remove #if 0'd code.
2003-03-03 Jason Merrill <jason@redhat.com>
* decl.c (start_function): Clear DECL_NUM_STMTS.
* class.c (get_vtable_decl): Use vtbl_type_node.
(build_primary_vtable): Check for it.
2003-03-02 Aldy Hernandez <aldyh@redhat.com>
* decl.c (check_initializer): Check for vector_opaque_p.
2003-03-02 Ashif Harji <asharji@uwaterloo.ca>
* lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
invoke an external cpp during compilation.
2003-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
* decl.c (duplicate_decls): Convert use of warning_with_decl() to
that of warning().
(start_decl): Likewise.
(start_function): Likewise.
2003-03-01 Neil Booth <neil@daikokuya.co.uk>
* Make-lang.in (CXX_C_OBJS): Update.
2003-02-28 Mark Mitchell <mark@codesourcery.com>
PR c++/9892
* pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
instantiating it.
2003-02-28 Aldy Hernandez <aldyh@redhat.com>
* parser.c (cp_parser_init_declarator): Revert opaque
vector_opaque_p change.
Do not include target.h.
2003-02-28 Mark Mitchell <mark@codesourcery.com>
PR c++/9879
* cp-tree.h (build_zero_init): Add parameter.
* decl.c (cp_finish_decl): Adjust call.
* init.c (build_zero_init): Add nelts parameter. Adjust recursive
calls.
(build_default_init): Add nelts parameter. Adjust calls to
build_zero_init.
(build_new_1): Adjust call to build_default_init.
* typeck2.c (process_init_constructor): Adjust call to build_zero_init.
2003-02-26 Devang Patel <dpatel@apple.com>
* decl.c (finish_enum): Merge two 'for' loops. Copy value node if
required. Postpone enum setting for template decls.
(build_enumerator): Delay copying value node until finish_enum
(). Remove #if 0'ed code.
* pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
(tsubst_copy): Add check for enum type.
2003-02-25 Mark Mitchell <mark@codesourcery.com>
PR c++/9683
* decl2.c (prune_vars_needing_no_initialization): Do not throw
away initializations for DECL_EXTERNAL VAR_DECLs.
(finish_file): Adjust accordingly.
* pt.c (instantiate_decl): Do not defer VAR_DECLs.
2003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
* decl.c (add_binding): Time TV_NAME_LOOKUP.
(push_class_binding): Likewise.
(set_namespace_binding): Likewise.
2003-02-24 Mark Mitchell <mark@codesourcery.com>
PR c++/9836
* cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
specializations back to the main template.
* parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
* pt.c (resolve_typename_type): Likewise.
2003-02-24 Jeffrey D. Oldham <oldham@codesourcery.com>
PR c++/9778
* pt.c (tsubst_copy_and_build): For a templated function inside a
scope, process template arguments.
2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9602
* typeck2.c (abstract_virtuals_error): Don't check when
TYPE is still template parameter dependent.
2003-02-23 Mark Mitchell <mark@codesourcery.com>
PR c++/5333
* cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
* parser.c (cp_parser_diagnose_invalid_type_name): Use it.
* pt.c (instantiate_class_template): Don't try to instantiate
dependent types.
(resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
2003-02-21 Mark Mitchell <mark@codesourcery.com>
PR c++/9749
* decl.c (grokdeclarator): Do not allow parameters with variably
modified types.
2003-02-21 Nathan Sidwell <nathan@codesourcery.com>
* search.c (grow_bfs_bases): Remove. Fold into ...
(bfs_walk): ... here, fix fencepost error. Fix merge lossage
in previous patch.
2003-02-20 Mark Mitchell <mark@codesourcery.com>
PR c++/9729
* mangle.c (mangle_conv_op_name_for_type): Issue an error message
when the G++ 3.2 ABI prevents correct compilation.
2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
Change base class access representation. Share virtual base
binfos.
* cp/call.c (build_special_member_call): Remove binfo_for_vbase
call.
* cp/class.c (build_base_path): Likewise.
(build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
(build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
(make_new_vtable): Adjust.
(force_canonical_binfo_r): Delete.
(force_canonical_binfo): Delete.
(mark_primary_virtual_base): Delete.
(dfs_unshared_virtual_bases): Delete.
(mark_primary_bases): Adjust.
(maybe_warn_about_overly_private_class): Adjust.
(dfs_base_derived_from): Delete.
(base_derived_from): Follow the inheritance chain.
(struct find_final_overrider_data): Add vpath member.
(dfs_find_final_overrider): Adjust.
(dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
(find_final_overrider): Adjust.
(update_vtable_entry_for_fn): Adjust.
(modify_all_vtables): Adjust.
(walk_subobject_offsets): Adjust.
(layout_nonempty_base_or_field): Adjust.
(layout_empty_base): Remove last parameter. Adjust.
(build_base_field): Adjust.
(build_base_fields): Adjust.
(propagate_binfo_offsets): Remove last parameter. Adjust.
(dfs_set_offset_for_unshared_vbases): Delete.
(layout_virtual_bases): Adjust.
(finish_struct_1): Adjust.
(init_class_processing): Don't init access nodes.
(dfs_get_primary_binfo): Delete.
(get_primary_binfo): Adjust.
(dump_class_hierarchy_r): Remove most derived arg, add IGO
parameter. Adjust.
(dump_class_hierarchy): Adjust.
(finish_vtbls): Adjust.
(get_original_base): Delete.
(build_vtt_inits): Adjust.
(dfs_build_secondary_vptr_vtt_inits): Adjust.
(dfs_ctor_vtable_bases_queue_p): Adjust.
(build_ctor_vtbl_group): Adjust.
(dfs_accumulate_vtbl_inits): Adjust.
(build_vtbl_initializer): Adjust.
(build_vbase_offset_vtbl_entries): Adjust.
(add_vcall_offset_vtbl_entries_1): Adjust.
* cp/cp-tree.h (CPTI_ACCESS_*): Remove.
(access_*_node): Remove.
(CANONICAL_BINFO): Delete.
(BINFO_UNSHARED_MARKED): Remove.
(BINFO_MARKED): Set LANG_FLAG_0 directly.
(SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
(BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
(SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
Delete.
(BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
(SET_BINFO_NEW_VTABLE_MARKED): Adjust.
(SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
Delete.
(BINFO_DEPENDENT_BASE_P): New.
(dfs_walk, dfs_walk_real): Queue function takes derived binfo and
index.
(markedp, unmarkedp): Adjust.
(dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
find_vbase_instance, binfo_for_vbase): Delete.
(copied_binfo, original_binfo): Declare.
(finish_base_specifier): Add virtual_p arg.
(unshare_base_binfos): Delete.
(copy_base_binfos): Declare.
(reverse_path): Delete.
* cp/decl.c (xref_basetypes): Access and virtuality passed
differently. Don't copy direct base binfos here. Call
copy_base_binfos.
* cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
(initialize_vtbl_ptrs): Adjust.
(expand_member_init): Adjust.
* cp/parser.c (cp_parser_base_specifier): Adjust.
* cp/pt.c (instantiate_class_template): Adjust.
(get_template_base_recursive): Adjust.
* cp/rtti.c (get_pseudo_ti_init): Adjust.
(get_pseudo_ti_desc): Adjust.
* cp/tree.c (unshare_base_binfos): Rename to ...
(copy_base_binfos): ... here, reimplement.
(make_binfo): Set BINFO_DEPENDENT_BASE_P.
(reverse_path): Remove.
* cp/typeck.c (get_delta_difference): Adjust error messages.
* cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
* cp/search.c (lookup_base_r): Adjust.
(dynamic_cast_base_recurse): Adjust.
(canonical_binfo): Remove.
(dfs_canonical_queue): Remove.
(dfs_assert_unmarked_p): Remove.
(assert_canonical_unmarked): Remove.
(shared_marked_p, shared_unmarked_p): Remove.
(BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
(dfs_access_in_type): Adjust.
(access_in_type): Adjust.
(dfs_accessible_queue_p): Adjust.
(dfs_accessible_p): Adjust.
(is_subobject_of_p_1, is_subobject_of_p): Remove.
(struct lookup_field_info): Remove from_dep_base_p field.
(lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
(lookup_field_r): Remove dependent base code.
(lookup_member): Likewise.
(dfs_walk, dfs_walk_real): Add access arg to queue fn.
(dfs_unmarked_real_bases_queue_p): Remove.
(dfs_marked_real_bases_queue_p): Remove.
(dfs_skip_vbases): Remove.
(dfs_get_pure_virtuals): Adjust.
(markedp, unmarkedp): Adjust.
(marked_vtable_pathp, unmarked_vtable_pathp): Remove.
(marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
(dfs_unmark): Adjust.
(dfs_get_vbase_types):Remove.
(dfs_build_inheritance_graph_order): Remove.
(get_vbase_types): Remove
(dfs_find_vbase_instance): Remove.
(find_vbase_instance): Remove.
(dfs_debug_unmarkedp): Adjust.
(dependent_base_p): Remove.
(dfs_push_type_decls): Adjust.
(dfs_push_decls): Adjust.
(dfs_no_overlap_yet): Adjust.
(copied_binfo): New function.
(original_binfo): New function.
(binfo_for_vbase): Remove.
2003-02-18 Zack Weinberg <zack@codesourcery.com>
* cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
(bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
vectors, for speed.
2003-02-18 Mark Mitchell <mark@codesourcery.com>
PR c++/9704
* class.c (layout_class_type): In the 3.2 ABI, take into account
trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
2003-02-18 Matt Austern <austern@apple.com>
* cp/cp-lang.c: Change lang hooks so that final_write_globals does
nothing for C++.
* cp/decl.c (wrapup_globals_for_namespace): Remove special
handling of global namespace.
2003-02-18 Geoffrey Keating <geoffk@apple.com>
* cp-tree.h (rid_to_yy): Delete.
(C_RID_YYCODE): Delete.
(finish_file): Delete redundant declaration.
2003-02-18 Jason Merrill <jason@redhat.com>
PR c++/9623
* decl.c (reshape_init): Don't mess with initializer labels.
PR c++/9485
* parser.c (cp_parser_postfix_expression): Set idk properly for
object->scope::member.
2003-02-18 Ben Elliston <bje@redhat.com>
PR other/7350
* decl.c (duplicate_decls): Fix typo in comment.
2003-02-17 Michael Elizabeth Chastain <mec@shout.net>
PR debug/9717
* class.c (build_base_field): Mark fields for base classes with
DECL_IGNORED_P.
2003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9457
* pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
CONSTRUCTOR_ELTS only once.
2003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9459
* error.c (dump_type_prefix): Handle TYPEOF_TYPE.
(dump_type_suffix): Likewise.
2003-02-14 Nathan Sidwell <nathan@codesourcery.com>
* search.c: ANSIfy function declarations and definitions.
* cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
* call.c (build_method_call, resolve_scoped_fn_name,
build_java_interface_fn_ref): Adjust lookup_field, lookup_member
calls.
* class.c (handle_using_decl): Likewise.
* decl.c (make_typename_type, make_unmound_class_template,
start_decl, compute_array_index_type): Likewise.
* decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
* init.c (expand_member_init, build_member_call): Likewise.
* pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
resolve_typename_type): Likewise.
* typeck.c (lookup_destructor, finish_class_member_access_exprm
build_prememfunc_access_expr): Likewise.
2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
* decl2.c: Include "timevar.h".
(namespace_ancestor): Time name lookup.
(add_using_namespace): Likewise.
(lookup_using_namespace): Likewise.
(qualified_lookup_using_namespace): Likewise.
(decl_namespace): Likewise.
(lookup_arg_dependent): Likewise.
* lex.c (do_identifier): Likewise.
(do_scoped_id): Likewise.
* pt.c (lookup_template_class): Likewise.
2003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
* decl.c: (define_label): Fix warning for return 0 instead of NULL.
2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
* decl.c: Include "timevar.h".
(poplevel): Time name lookup.
(find_binding): Likewise.
(push_namespace): Likewise.
(pop_nested_namespace): Likewise.
(store_bindings): Likewise.
(maybe_push_to_top_level): Likewise.
(pop_from_top_level): Likewise.
(push_local_name): Likewise.
(pushtag): Likewise.
(pushdecl): Likewise.
(pushdecl_with_scope): Likewise.
(pushdecl_namespace_level): Likewise.
(pushdecl_top_level): Likewise.
(pushdecl_class_level): Likewise.
(push_class_level_binding): Likewise.
(push_using_decl): Likewise.
(push_using_directive): Likewise.
(push_overloaded_decl): Likewise.
(lookup_label): Likewise.
(define_label): Likewise.
(lookup_tag): Likewise.
(lookup_tag_reverse): Likewise.
(lookup_namespace_name): Likewise.
(select_decl): Likewise.
(unqualified_namespace_lookup): Likewise.
(lookup_name_real): Likewise.
(lookup_name_current_level): Likewise.
(lookup_type_current_level): Likewise.
(maybe_inject_for_scope_var): Likewise.
(xref_tag): Likewise.
* Make-lang.in (cp/decl.o): Add dependency on timevar.h
2003-02-12 Phil Edwards <pme@gcc.gnu.org>
* decl.c (build_enumerator): Remove unneeded test.
2003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
* cp-tree.h (struct lang_type_header): Make all fields unsigned
char.
2003-02-03 Mark Mitchell <mark@codesourcery.com>
PR c++/7129
* call.c (z_candidate): Add args.
(convert_class_to_reference): Set it.
(implicit_conversion): Tidy.
(add_candidate): Add args parameter.
(add_function_candidate): Adjust call to add_candidate.
(add_conv_candidate): Likewise.
(build_builtin_candidate): Likewise.
(build_user_type_conversion_1): Eliminate wasteful tree_cons
usage.
(build_new_function_call): Likewise.
(build_object_call): Likewise.
(add_candidates): New function.
(build_new_op): Use it.
(covert_like_real): Adjust call to build_over_call.
(build_over_call): Remove args parameter.
* operators.def: Add <?= and >?=.
2003-02-01 Richard Sandiford <rsandifo@redhat.com>
* typeck.c (build_indirect_ref): Don't check flag_volatile.
2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/8849
* pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
(BINFO_LANG_ELTS): New #define.
* tree.c (make_binfo): Use BINFO_LANG_ELTS.
2003-01-30 Geoffrey Keating <geoffk@apple.com>
* cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
2003-01-30 Mark Mitchell <mark@codesourcery.com>
* class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
for class types.
* cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
rather than TYPE_LANG_FLAG_0.
(TYPE_BUILT_IN): Remove.
(TYPE_DEPENDENT_P): New macro.
(TYPE_DEPENDENT_P_VALID): Likewise.
(lang_type_class): Add fields_readonly.
* decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
* pt.c (dependent_type_p_r): New function, split out from ...
(dependent_type_p): ... here. Memoize results.
* search.c (dependent_base_p): Use dependent_type_p, not
uses_template_parms.
* typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
for class types.
2003-01-29 Mark Mitchell <mark@codesourcery.com>
* call.c (build_field_call): Use build_new_op, not build_opfncall.
(prep_operand): New function.
(build_new_op): Use it. Remove dead code.
* class.c (pushclass): Change "modify" parameter type from int to
bool.
(currently_open_class): Use same_type_p, not pointer equality.
(push_nested_class): Adjust calls to pushclass, remove modify
parameter.
* cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
(pushclass): Change prototype.
(push_nested_class): Likewise.
(grokoptypename): Remove.
(build_opfncall): Remove.
(value_dependent_expression_p): Declare.
(resolve_typename_type): Likewise.
(resolve_typename_type_in_current_instantiation): Likewise.
(enter_scope_of): Remove.
(tsubst): Remove.
(tsubst_expr): Likewise.
(tsubst_copy): Likewise.
(tsubst_copy_and_build): Likewise.
* decl.c (warn_about_implicit_typename_lookup): Remove.
(finish_case_label): Return error_mark_node for erroneous labels.
(start_decl): Adjust calls to push_nested_class.
(grokfndecl): Call push_scope/pop_scope around call to
duplicate_decls.
(grokdeclarator): Do not call tsubst.
(start_function): Adjust calls to push_nested_class.
* decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
(check_classfn): Use push_scope/pop_scope around type comparisions.
(grokoptypename): Remove.
(push_sscope): Adjust call to push_nested_class.
* error.c (dump_type): Show cv-qualification of typename types.
* init.c (build_member_call): Use build_new_op, not
build_opfncall.
* method.c (build_opfncall): Remove.
* parser.c (cp_parser): Add allow_non_constant_expression_p and
non_constant_expression_p.
(cp_parser_constant_expression): Adjust prototype.
(cp_parser_resolve_typename_type): Remove.
(cp_parser_non_constant_expression): New function.
(cp_parser_non_constant_id_expression): Likewise.
(cp_parser_new): Set allow_non_constant_expression_p and
non_constant_expression_p.
(cp_parser_primary_expression): Reject `this' and `va_arg' in
constant-expressions. Note that dependent names aren't really
constant.
(cp_parser_postfix_expression): Reject conversions to non-integral
types in constant-expressions. Neither are increments or
decrements.
(cp_parser_unary_expression): Reject increments and decrements in
constant-expressions.
(cp_parser_direct_new_declarator): Adjust call to
cp_parser_constant_expression.
(cp_parser_cast_expression): Reject conversions to non-integral
types in constant-expressions.
(cp_parser_assignment_expression): Rejects assignments in
constant-expressions.
(cp_parser_expression): Reject commas in constant-expressions.
(cp_parser_labeled_statement): Adjust call to
cp_parser_constant_expression.
(cp_parser_direct_declarator): Simplify array bounds, even in
templates, when they are non-dependent. Use
resolve_typename_type, not cp_parser_resolve_typename_type.
(cp_parser_class_head): Use resolve_typename_type, not
cp_parser_resolve_typename_type.
(cp_parser_member_declaration): Adjust call to
cp_parser_constant_expression.
(cp_parser_constant_initializer): Likewise.
(cp_parser_constructor_declarator): Use resolve_typename_type, not
cp_parser_resolve_typename_type.
(cp_parser_late_parsing_default_args): Adjust call to
push_nested_class.
* pt.c (tsubst): Give it internal linkage.
(tsubst_expr): Likewise.
(tsubst_copy): Likewise.
(tsubst_copy_and_build): Likewise.
(push_access_scope_real): Likewise.
(tsubst_friend_class): Likewise.
(instantiate_class_template): Adjust call to pushclass.
(value_dependent_expression_p): Give it external linkage.
Robustify.
(resolve_typename_type): New function.
* semantics.c (finish_call_expr): Use build_new_op, not
build_opfncall.
(begin_constructor_declarator): Remove.
(begin_class_definition): Adjust call to pushclass.
(enter_scope_of): Remove.
* typeck.c (comptypes): Resolve typename types as appropriate.
(build_x_indirect_ref): Use build_new_op, not build_opfncall.
(build_x_compound_expr): Likewise.
(build_modify_expr): Likewise.
(build_x_modify_expr): Likewise.
* typeck2.c (build_x_arrow): Likewise.
2003-01-29 Fariborz Jahanian <fjahanian@apple.com>
* pt.c (last_pending_template) Declare GTY().
2003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/8591
* parser.c (cp_parser_elaborated_type_specifier): Convert
TEMPLATE_DECL to TYPE_DECL only when processing template friends.
(cp_parser_maybe_treat_template_as_class): Remove redundant tests.
2003-01-28 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9437
* pt.c (unify): Don't unify '*T' with 'U C::*'.
PR c++/3902
* parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
inside a declarator.
2003-01-27 Nathan Sidwell <nathan@codesourcery.com>
* class.c (update_vtable_entry_for_fn): Add index parameter.
Generate vcall thunk for covariant overriding from a virtual
primary base.
(dfs_modify_vtables): Adjust.
2003-01-25 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9403
* parser.c (cp_parser_class_or_namespace_name): Reject duplicate
template keyword.
(cp_parser_base_specifier): Look for and consume a
TEMPLATE keyword. Replace switch with array index.
PR c++/795
* semantics.c (finish_non_static_data_member): Remember the
field's type even in a template.
PR c++/9415
* pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
already scoped.
PR c++/8545
* parser.c (cp_parser_cast_expression): Be more tentative.
2003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* cp-tree.h (flagged_type_tree_s): Remove.
(check_for_new_type): Likewise.
* typeck2.c (check_for_new_type): Likewise.
2003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
* dump.c: ANSIfy function declarations and definitions.
* cp-tree.h, decl.h: Get rid of PARAMS. Again.
2003-01-22 Mark Mitchell <mark@codesourcery.com>
PR c++/9354
* init.c (build_new): Set the type of the new-expression, even
when processing_templte_decl.
PR c++/9216
* parser.c (cp_parser_primary_expression): Improve error message
for templates used in an expression context.
PR c++/8696
* parser.c (cp_parser_decl_specifier_seq): Commit to tentative
parse when encountering "typedef".
2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
* class.c, parser.c: ANSIfy function definitions and declarations.
2003-01-22 Mark Mitchell <mark@codesourcery.com>
PR c++/9328
* error.c (dump_decl): For an OVERLOAD, just print the name of the
function; it doesn't make sense to try to print its type.
* semantics.c (finish_typeof): Issue errors about invalid uses.
PR c++/9298
* parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
function.
(cp_parser_expression_statement): Use it.
(cp_parser_explicit_instantiation): Likewise.
* pt.c (do_decl_instantiation): Improve error handling logic.
2003-01-22 Mark Mitchell <mark@codesourcery.com>
PR c++/9384
* parser.c (cp_parser_using_declaration): Issue error messages
about name resolution failures here.
PR c++/9388
* class.c (currently_open_derived_class): Use dependent_type_p.
* cp-tree.h (dependent_type_p): New function.
(dependent_template_arg_p): Likewise.
(dependent_template_p): Likewise.
(type_dependent_expression_p): Likewise.
* parser.c (cp_parser_dependent_type_p): Remove.
(cp_parser_value_dependent_type_p): Likewise.
(cp_parser_type_dependent_expression_p): Likewise.
(cp_parser_dependent_template_arg_p): Likewise.
(cp_parser_dependent_template_id_p): Likewise.
(cp_parser_dependent_template_p): Likewise.
(cp_parser_diagnose_invalid_type_name): Replace
cp_parser_dependent_type_p with dependent_type_p, etc.
(cp_parser_primary_expresion): Likewise.
(cp_parser_nested_name_specifier_opt): Likewise.
(cp_parser_postfix_expression): Likewise.
(cp_parser_unary_expression): Likewise.
(cp_parser_template_name): Likewise.
(cp_parser_class_name): Likewise.
(cp_parser_lookup_name): Likewise.
* pt.c (dependent_type_p): New function.
(value_dependent_expression_p): Likewise.
(type_dependent_expression_p): Likewise.
(dependent_template_arg_p): Likewise.
(dependent_template_id_p): Likewise.
(dependent_template_p): Likewise.
PR c++/9285
PR c++/9294
* parser.c (cp_parser_simple_declaration): Return quickly when
encountering errors.
2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
Make-lang.in (cp/decl.o-warn): Add -Wno-error.
2003-01-17 Jason Merrill <jason@redhat.com>
PR c++/9167, c++/9358
* decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
2003-01-17 Jason Merrill <jason@redhat.com>
PR c++/9342
* call.c (build_conditional_expr): Always do lvalue-rvalue
conversion.
2003-01-17 Mark Mitchell <mark@codesourcery.com>
PR c++/9294
* cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
* cp-tree.h (BASELINK_BINFO): Adjust.
(BASELINK_FUNCTIONS): Likewise.
(BASELINK_ACCESS_BINFO): Likewise.
(tree_baselink): New structure.
(cp_tree_node_structure_enum): Add TS_CP_BASELINK.
(lang_tree_node): Add baselink.
* decl.c (cp_tree_node_structure): Add BASELINK case.
* search.c (build_baselink): Adjust.
* tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
test from TREE_LIST case.
PR c++/9272
* parser.c (cp_parser_constructor_declarator_p): Do not assume
that a constructor cannot be declared outside of its own class.
* parser.c (cp_parser_resolve_typename_type): If the scope cannot
be resolved, neither can the qualified name.
* rtti.c (get_pseudo_ti_desc): Fix thinko.
2003-01-16 Jason Merrill <jason@redhat.com>
PR c++/8564
* init.c (build_vec_init): Re-add maxindex parm.
(perform_member_init, build_aggr_init): Pass it.
(build_new_1): Pass it. Use an incomplete array type for full_type.
* typeck.c (build_modify_expr): Pass it.
* cp-tree.h: Adjust.
2003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
* cp-tree.h (tsubst_copy_and_build): New declaration.
* pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
(tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
(tsubst_copy_and_build): New function.
2003-01-16 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (lang_type_class): Remove is_partial_instantiation.
(PARTIAL_INSTANTIATION_P): Remove.
(IMPLICIT_TYPENAME_P): Likewise.
(IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
(build_typename_type): Remove declaration.
(parmlist_is_exprlist): Likewise.
* decl.c (build_typename_type): Make it static, remove third
parameter.
(push_class_binding): Don't do implicit typename stuff.
(make_typename_type): Likewise.
(lookup_name_real): Likewise.
(grokdeclarator): Don't try to convert declarations into
initializations. Don't do implicit typename stuff.
(parmlist_is_exprlist): Remove.
(xref_basetypes): Simplify.
* decl2.c (grokfield): Don't try to convert declarations into
initializations.
(build_anon_union_vars): Do this while processing templates, too.
(finish_anon_union): Likewise.
* error.c (dump_type): Remove implicit typename handling.
* parser.c (cp_parser_diagnose_invalid_type_name): New method.
(cp_parser_primary_expression): Correct handling of names not
found by unqualified name lookup in templates.
(cp_parser_nested_name_specifier_opt): Avoid checking dependency
of types when possible.
(cp_parser_simple_declaration): Complain intelligently about some
invalid declarations.
(cp_parser_member_declaration): Likewise.
(cp_parser_constructor_declarator_p): Don't check when we're in a
function scope.
* pt.c (instantiate_class_template): Remove
PARTIAL_INSTANTIATION_P gunk.
* search.c (lookup_field_r): Don't build implicit typenames.
(marked_pushdecls_p): Don't enter dependent base types.
(unmarked_pushdecls_p): Likewise.
* semantics.c (begin_class_definition): Remove implicit typename
stuff.
2003-01-16 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9212
* parser.c (cp_parser_direct_declarator): If accepting either
abstract or named, the name must be an unqualified-id.
2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* class.c (layout_virtual_bases): Avoid signed/unsigned warning.
2003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* decl2.c (check_classfn): Fix uninitialized warning.
(build_anon_union_vars): Likewise.
* pt.c (tsubst_copy): Likewise.
2003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
Further conform g++'s __vmi_class_type_info to the C++ ABI
specification.
* rtti.c (dfs_class_hint_mark): Do not set hints not specified by
the specification.
(class_hint_flags): Likewise.
2003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* config-lang.in: Add semantics.c to gtfiles.
* cp-tree.h (flagged_type_tree_s): Remove lookups field.
(saved_scope): Likewise.
(type_lookups): Remove.
(deferred_access): New structure.
(type_access_control): Remove.
(save_type_access_control): Likewise.
(reset_type_access_control): Likewise.
(decl_type_access_control): Likewise.
(push_deferring_access_checks): Declare.
(resume_deferring_access_checks): Likewise.
(stop_deferring_access_checks): Likewise.
(pop_deferring_access_checks): Likewise.
(get_deferred_access_checks): Likewise.
(pop_to_parent_deferring_access_checks): Likewise.
(perform_deferred_access_checks): Likewise.
(perform_or_defer_access_check): Likewise.
* decl.c (make_typename_type): Use perform_or_defer_access_check.
(make_unbound_class_template): Likewise.
(grokdeclarator): Don't call decl_type_access_control.
* parser.c (cp_parser_context): Remove deferred_access_checks
and deferring_access_checks_p fields.
(cp_parser_context_new): Adjust.
(cp_parser): Remove access_checks_lists.
(cp_parser_defer_access_check): Remove.
(cp_parser_start_deferring_access_checks): Remove.
(cp_parser_stop_deferring_access_checks): Remove.
(cp_parser_perform_deferred_access_checks): Remove.
(cp_parser_nested_name_specifier_opt): Use new deferred access
functions.
(cp_parser_simple_declaration): Likewise.
(cp_parser_template_id): Likewise.
(cp_parser_function_definition): Likewise.
(cp_parser_class_specifier): Likewise.
(cp_parser_lookup_name): Likewise.
(cp_parser_single_declaration): Likewise.
(cp_parser_pre_parsed_nested_name_specifier): Likewise.
(cp_parser_parse_tentatively): Likewise.
(cp_parser_parse_definitely): Likewise.
(yyparse): Likewise.
(cp_parser_init_declarator): Remove access_checks parameter.
Use new deferred access functions.
(cp_parser_function_definition_from_specifiers_and_declarator):
Likewise.
(cp_parser_class_head): Remove deferring_access_checks_p and
saved_access_checks parameters. Use new deferred access functions.
(cp_parser_member_specification_opt): Don't call
reset_type_access_control.
* search.c (type_access_control): Remove.
* semantics.c: Include "gt-cp-semantics.h".
(deferred_type_access_control): Remove.
(deferred_access_stack): New variable.
(deferred_access_free_list): Likewise.
(push_deferring_access_checks): New function.
(resume_deferring_access_checks): Likewise.
(stop_deferring_access_checks): Likewise.
(pop_deferring_access_checks): Likewise.
(get_deferred_access_checks): Likewise.
(pop_to_parent_deferring_access_checks): Likewise.
(perform_deferred_access_checks): New function, adapted from
cp_parser_perform_deferred_access_checks.
(perform_or_defer_access_check): New function, adapted from
cp_parser_defer_access_check.
(current_type_lookups): Remove.
(deferred_type_access_control): Likewise.
(decl_type_access_control): Likewise.
(save_type_access_control): Likewise.
(reset_type_access_control): Likewise.
(begin_function_definition): Adjust.
(begin_class_definiton): Likewise.
2003-01-13 Jason Merrill <jason@redhat.com>
PR c++/8748
* class.c (build_base_path): Take the address before calling save_expr.
* call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
all the ambiguous conversions are bad.
* class.c (maybe_warn_about_overly_private_class): Don't stop
searching when we find a nonprivate method.
* typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
2003-01-12 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (get_arglist_len_in_bytes): Remove.
PR c++/9264
* parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
typeame types more robustly.
2003-01-11 Phil Edwards <pme@gcc.gnu.org>
* parser.c: Fix comment typos.
2003-01-10 Mark Mitchell <mark@codesourcery.com>
PR c++/9099
* parser.c (cp_parser_scope_through_which_access_occurs): Handle
an object_type which is not a class type.
2003-01-10 Geoffrey Keating <geoffk@apple.com>
* parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
(cp_parser_late_parsing_default_args): Likewise.
2003-01-10 Nathanael Nerode <neroden@gcc.gnu.org>
* cfns.gperf: ANSIfy function declarations.
* cfns.h: Regenerate.
* cp-tree.h: ANSIfy function declarations.
2003-01-10 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (reparse_absdcl_as_expr): Remove.
(reparse_absdcl_as_casts): Likewise.
(reparse_decl_as_expr): Likewise.
(finish_decl_parsing): Likewise.
* decl2.c (reparse_absdcl_as_expr): Remove.
(reparse_absdcl_as_casts): Likewise.
(repase_decl_as_expr): Likewise.
(finish_decl_parsing): Likewise.
PR c++/9128
PR c++/9153
PR c++/9171
* parser.c (cp_parser_pre_parsed_nested_name_specifier): New
function.
(cp_parser_nested_name_specifier_opt): Correct the
check_dependency_p false.
(cp_parser_postfix_expression): Fix formatting.
(cp_parser_decl_specifier_seq): Avoid looking for constructor
declarators when possible.
(cp_parser_template_id): Avoid performing name-lookup when
possible.
(cp_parser_class_head): Do not count specializations when counting
levels of templates.
(cp_parser_constructor_declarator_p): Return immediately if
there's no chance that the tokens form a constructor declarator.
* rtti.c (throw_bad_typeid): Add comment. Do not return an
expression with reference type.
(get_tinfo_decl_dynamic): Do not return an expression with
reference type.
(build_typeid): Add comment. Do not return an expression with
reference type.
* typeck.c (build_class_member_access_expr): Improve handling of
conditionals and comma-expressions as objects.
2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
* cfns.gperf: ANSIfy function declarations.
* cfns.h: Regenerate.
* cp-tree.h: ANSIfy function declarations.
* parser.c: ANSIfy function declarations & definitions.
* decl.c (bad_specifiers): Fix parameter order error I introduced.
2003-01-09 Geoffrey Keating <geoffk@apple.com>
Merge from pch-branch:
2003-01-09 Geoffrey Keating <geoffk@apple.com>
Merge to tag pch-merge-20030102:
* semantics.c (finish_translation_unit): Don't call finish_file.
* parser.c: Don't include ggc.h.
(cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
read first token here. Don't allow PCH files after the first
token is read.
(cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
(cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
(cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
(cp_parser_late_parsing_for_member): Don't duplicate call to
cp_lexer_set_source_position_from_token.
(cp_parser_late_parsing_default_args): Likewise.
(yyparse): Call finish_file after clearing the_parser.
2002-12-11 Geoffrey Keating <geoffk@apple.com>
* Make-lang.in: Remove $(GGC_H) from all dependencies.
(CXX_TREE_H): Add $(GGC_H).
* class.c: Don't include ggc.h.
(field_decl_cmp): Make parameters be 'const void *' to match qsort.
(method_name_cmp): Likewise.
(resort_data): New variable.
(resort_field_decl_cmp): New.
(resort_method_name_cmp): New.
(resort_sorted_fields): New.
(resort_type_method_vec): New.
(finish_struct_methods): Delete cast.
(finish_struct_1): Delete cast.
* cp-tree.h: Include ggc.h.
(struct lang_type_class): Add reorder attribute to field `methods'.
(union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
(resort_sorted_fields): New prototype.
(resort_type_method_vec): New prototype.
* call.c: Don't include ggc.h.
* decl.c: Likewise.
* decl2.c: Likewise.
* init.c: Likewise.
* lex.c: Likewise.
* method.c: Likewise.
* optimize.c: Likewise.
* parse.y: Likewise.
* pt.c: Likewise.
* repo.c: Likewise.
* search.c: Likewise.
* semantics.c: Likewise.
* spew.c: Likewise.
* tree.c: Likewise.
* lang-specs.h: Remove comment.
2002-12-03 Geoffrey Keating <geoffk@apple.com>
* cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
(operator_name_info): Mark to be saved for PCH, specify size.
(assignment_operator_name_info): Likewise.
2002-11-19 Geoffrey Keating <geoffk@apple.com>
* decl.c (anon_cnt): Mark to be saved for PCH.
2002-10-25 Geoffrey Keating <geoffk@apple.com>
* lex.c (init_reswords): Delete now-untrue comment.
Allocate ridpointers using GGC.
2002-10-04 Geoffrey Keating <geoffk@apple.com>
* cp-tree.h (union lang_decl_u2): Add tags to all fields.
* g++spec.c (lang_specific_driver): Don't include standard
libraries in `added'.
2002-08-27 Geoffrey Keating <geoffk@redhat.com>
* decl2.c (finish_file): Call c_common_write_pch.
* Make-lang.in (CXX_C_OBJS): Add c-pch.o.
2002-08-17 Geoffrey Keating <geoffk@redhat.com>
* g++spec.c (lang_specific_driver): Treat .h files as C++ header
files when using g++.
* lang-specs.h: Handle compiling C++ header files.
2003-01-09 Jakub Jelinek <jakub@redhat.com>
* decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
2003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* pt.c (push_access_scope_real): Call push_to_top_level for
function in namespace scope.
(pop_access_scope): Call pop_from_top_level for function in
namespace scope.
2003-01-09 Jakub Jelinek <jakub@redhat.com>
* decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
* Make-lang.in (c++.install-common, c++.install-man,
c++.uninstall): Prepend $(DESTDIR) to destination paths in
all (un)installation commands.
(c++.install-common): Rewrite $(LN) commands to support
DESTDIR with "ln" as well as with "ln -s".
2003-01-08 Jason Merrill <jason@redhat.com>
* parser.c (cp_parser_primary_expression): See through explicitly
scoped ALIAS_DECLs, too.
2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
* decl.c: Remove some #if 0 code.
* decl.c: ANSIfy function declarations.
2003-01-07 Mark Mitchell <mark@codesourcery.com>
* parser.c (cp_parser_asm_definition): Correct handling of omitted
operands.
2003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9030
* decl.c (make_typename_type): Check access only when tf_error.
(make_unbound_class_template): Likewise.
* pt.c (saved_access_scope): New variable.
(push_access_scope_real): New function.
(push_access_scope): Likewise.
(pop_access_scope): Likewise.
(tsubst_default_argument): Use them.
(instantiate_template): Likewise.
(regenerate_decl_from_template): Likewise.
(instantiate_decl): Likewise.
(get_mostly_instantiated_function_type): Likewise.
2003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
* tree.c: Delete bogus #if 0 code.
2003-01-07 Andreas Schwab <schwab@suse.de>
* class.c (layout_class_type): Don't use
PCC_BITFIELD_TYPE_MATTERS if not defined.
2003-01-06 Mark Mitchell <mark@codesourcery.com>
PR c++/9165
* decl2.c (build_cleanup): Mark the object as used.
* pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
(hash_local_specialization): New function.
(register_local_specialization): Revert 2003-01-05 change.
(instantiate_decl): Use hash_local_specialization when creating
the local_specializations table.
* decl2.c (mark_used): Do not synthesize thunks.
* class.c (layout_class_type): Correct handling of unnamed
bitfields wider than their types.
PR c++/9189
* parser.c (cp_parser): Remove default_arg_types. Update
documentation for unparsed_functions_queues.
(cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
parameter.
(cp_parser_new): Don't set parser->default_arg_types.
(cp_parser_function_definition): Adjust usage of
unparsed_funtions_queues.
(cp_parser_class_specifier): Don't mess with
parser->default_arg_types. Handle default argument processing in
a separate phase from function body processing.
(cp_parser_template_declaration_after_export): Adjust usage of
unparsed_functions_queues.
(cp_parser_late_parsing_for_member): Do not handle default
arguments.
2003-01-06 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9109
* parser.c (cp_parser_declarator_kind): New enum.
(cp_parser_declarator): Adjust.
(cp_parser_direct_declarator): Adjust. Allow for either named or
abstract declarator. Prefer abstract, if possible. Allow
parenthesized function name.
(cp_parser_condition): Adjust cp_parser_declarator call.
(cp_parser_explicit_instantiation): Likewise.
(cp_parser_init_declarator): Likewise.
(cp_parser_type_id): Likewise.
(cp_parser_function_definition): Likewise.
(cp_parser_member_declaration): Likewise.
(cp_parser_parameter_declaration): Use cp_parser_declarator to do
the tentative parsing.
(cp_parser_exception_declaration): Likewise.
2003-01-05 Mark Mitchell <mark@codesourcery.com>
* parser.c (cp_parser_template_parameter): Adjust call to
cp_parser_parameter_declaration.
(cp_parser_parameter_declaration_list): Likewise.
(cp_parser_parameter_declaration): Replace
greater_than_is_operator_p with template_parm_p parameter. Do not
cache tokens for template default arguments.
* pt.c (retrieve_local_specialization): Use htab_find, not
htab_find_with_hash.
(register_local_specialization): Use htab_find_slot, not
htab_find_slot_with_hash.
(instantiate_decl): Pass a hash function to htab_create.
2003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* parser.c (cp_parser_binary_expression,
cp_parser_multiplicative_expression,
cp_parser_additive_expression, cp_parser_shift_expression,
cp_parser_relational_expression, cp_parser_equality_expression,
cp_parser_and_expression, cp_parser_exclusive_or_expression,
cp_parser_inclusive_or_expression,
cp_parser_logical_and_expression, cp_parser_logical_or_expression,
cp_parser_binary_expression): Const-ify.
2003-01-04 Mark Mitchell <mark@codesourcery.com>
* method.c (use_thunk): Disable access control while building the
body of the thunk.
2003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
* cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
front end.
2003-01-03 Matt Austern <austern@apple.com>
* cp-tree.h (struct lang_type_class): add field for key method
(cp_global_trees): rename dynamic_classes to keyed_classes
(key_method): add definition
* class.c (finish_struct_1): compute class's key method, and add
the class to keyed_classes list if there is no key method.
* decl.c (finish_function): add class to keyed_classes list if we
see a definition of the class's key method.
* pt.c (instantiate_class_template): add template specialization
of a dynamic class to keyed_classes list.
* decl2.c (key_method): remove
(finish_file): iterate only through keyed_classes list when
deciding whether to emit vtables, remove class from its list after
we do the emission.
2003-01-02 Jason Merrill <jason@redhat.com>
* call.c (build_conditional_expr): Stabilize lvalues properly.
* cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
* tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
Don't allow CALL_EXPR or VA_ARG_EXPR, either.
* call.c (convert_like_real): Call decl_constant_value for an
IDENTITY_CONV even if there are no more conversions.
* cvt.c (build_up_reference): Don't push unnamed temps.
* decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
* dump.c (cp_dump_tree): Don't try to dump class-specific fields
for a backend struct.
* except.c (wrap_cleanups_r, build_throw): Make
MUST_NOT_THROW_EXPRs void.
* init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
* init.c (build_vec_delete_1): Pre-evaluate the base address.
* init.c (get_temp_regvar): Simplify logic.
* tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
our replacement is a decl.
* decl.c (cp_make_fname_decl): Push the decls inside the
outermost scope.
2003-01-03 Nathan Sidwell <nathan@codesourcery.com>
PR c++/45, c++/3784
* tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
the same too.
2003-01-03 Graham Stott <graham.stott@btinternet.com>
* parser.c (struct cp_parser): Add access_checks_lists field
(cp_parser_simple_declaration): Use.
(cp_parser_init_declarator): Likewise.
2003-01-02 Mark Mitchell <mark@codesourcery.com>
* parser.c (cp_parser_declaration): Accept the __extension__
keyword before the declaration.
PR c++/2843
* parser.c (cp_parser_parameter_declaration): Allow attributes to
appear after the declarator.
* call.c (build_new_method_call): Fix typo in message format
string.
2003-01-02 Mark Mitchell <mark@codesourcery.com>
* parser.c (cp_lexer_next_token_is): Declare it inline.
(cp_lexer_set_source_position_from_token): Likewise.
(cp_lexer_debugging_p): Likewise.
(cp_parser_parsing_tentatively): Likewise.
(cp_parser_nested_name_specifier_opt): Reduce the number of calls
to the cp_lexer_peek_token.
* parser.c (cp_parser_sizeof_operand): Do not evaluate the
expression.
2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
* cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
cp/repo.c: Fix copyright years.
2003-01-01 Neil Booth <neil@daikokuya.co.uk>
* lex.c: Remove superfluous include of cpplib.h.
(CONSTRAINT): Define without conditions.
(init_cp_pragma): Use c_register_pragma.
2002-12-31 Neil Booth <neil@daikokuya.co.uk>
* .cvsignore: Remove.
2002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
* call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
copyright header.
* lex.h: parse.y is dead, so don't mention it. Also replace the
copyright header with the default GNU copyright header.
2002-12-31 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
(lookup_name_namespace_only): Likewise.
(begin_only_namespace_names): Likewise.
(end_only_namespace_names): Likewise.
* decl.c (only_namespace_names): Remove.
(qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
(lookup_name_real): Do not check only_namespace_names.
(lookup_name_namespace_only): Remove.
(begin_only_namespace_names): Likewise.
(end_only_namespace_names): Likewise.
* parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
nested-name-specifiers more gracefully.
(cp_parser_class_or_namespace_name): Avoid looking up namespace
names when they cannot possibly appear.
(cp_parser_template_name): Adjust call to cp_parser_lookup_name.
(cp_parser_elaborated_type_specifier): Likewise.
(cp_parser_namespace_name): Only look for namespace names.
(cp_parser_lookup_name): Add is_namespace parameter.
(cp_parser_lookup_name_simple): Adjust call to
cp_parser_lookup_name.
* parser.c (cp_parser_dependent_type_p): Fix thinko.
2002-12-31 Neil Booth <neil@daikokuya.co.uk>
* .cvsignore: Update.
2002-12-31 Nathan Sidwell <nathan@codesourcery.com>
* class.c (modify_vtable_entry): Remove unused variable.
(get_vcall_index): Always expect a non-thunk.
(update_vtable_entry_for_fn): Combine covariant adjustments, when
overriding a thunk. Pass get_vcall_index a non-thunk.
* decl2.c (finish_file): Mark undefined inlines as extern.
2002-12-31 Mark Mitchell <mark@codesourcery.com>
* cp-tree.def (RETURN_INIT): Remove.
* cp-tree.h (DECL_IN_MEMORY_P): Remove.
(scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
(note_level_for_for): Remove.
(note_level_for_try): Likewise.
(note_level_for_catch): Likewise.
(finish_named_return_value): Likewise.
(do_pushlevel): Change prototype.
(pending_lang_change): Remove.
* decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
sk_for.
(note_level_for_for): Remove.
(note_level_for_try): Likewise.
(note_level_for_catch): Likewise.
(maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
* parser.c (cp_parser_context_free_list): Make it "deletable".
(cp_parser_template_argument): Remove misleading comment.
* pt.c (tsubst_expr): Remove RETURN_INIT code.
* semantics.c (genrtl_named_return_value): Remove.
(do_pushlevel): Take a scope kind as an argument.
(begin_if_stmt): Adjust.
(begin_while_stmt): Likewise.
(begin_for_stmt): Likewise.
(finish_for_init_stmt): Likewise.
(begin_switch_stmt): Likewise.
(begin_handler): Likewise.
(begin_compound_stmt): Likewise.
(finish_named_return_value): Remove.
(cp_expand_stmt): Remove RETURN_INIT case.
* tree.c (cp_statement_code_p): Remove RETURN_INIT case.
2002-12-31 Mark Mitchell <mark@codesourcery.com>
PR c++/9112
* parser.c (cp_parser_direct_declarator): Handle erroneous
parenthesized declarators correctly.
2002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cp-tree.h (pending_lang_change): Declare.
2002-12-30 Mark Mitchell <mark@codesourcery.com>
* parser.c (cp_parser_context_free_list): New variable.
(cp_parser_context_new): Use it.
(cp_parser_error): Check return code from
cp_parser_simulate_error.
(cp_parser_simulate_error): Return a value.
(cp_parser_id_expression): Optimize common case.
(cp_parser_class_name): Likewise.
(cp_parser_class_specifier): Adjust call to
cp_parser_late_parsing_default_args.
(cp_parser_lookup_name): Optimize common case.
(cp_parser_late_parsing_for_member): Adjust call to
cp_parser_late_parsing_default_args.
(cp_parser_late_parsing_default_args): Add scope parameter.
(cp_parser_require): Avoid creating the error message unless it's
needed.
(cp_parser_parse_definitely): Place free'd contexts on the free
list.
* parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
2002-12-30 David Edelsohn <edelsohn@gnu.org>
* parser.c (cp_parser_parameter_declaration_clause): Treat system
header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
* config-lang.in, Make-lang.in, operators.def, cp-tree.def:
GCC, not GNU CC.
2002-12-30 Mark Mitchell <mark@codesourcery.com>
* parse.y: Remove.
* spew.c: Likewise.
* Make-lang.in (gt-cp-spew.h): Remove.
* cp-tree.h (do_pending_lang_change): Remove.
(do_identifier): Change prototype.
(finish_id_expr): Remove.
* decl.c (lookup_name_real): Remove yylex variable.
* decl2.c (build_expr_from_tree): Adjust call to do_identifier.
* lex.c (init_cpp_parse): Remove.
(reduce_cmp): Likewise.
(token_cmp): Likewise.
(yychar): Likewise.
(lastiddecl): Likewise.
(token_count): Likewise.
(reduce_count): Likewise.
(yyhook): Likewise.
(print_parse_statistics): Likewise.
(do_pending_lang_change): Likewise.
(do_identifier): Remove parsing parameter.
* lex.h (lastiddecl): Remove.
(looking_for_typename): Remove.
(looking_for_template): Likewise.
(pending_lang_change): Likewise.
(yylex): Likewise.
* semantics.c (finish_id_expr): Remove.
* decl.c (grokdeclarator): Diagnost "extern thread" and "static
thread" correctly.
2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
* decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
end, not the C front end.
2002-12-30 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (THUNK_TARGET): New macro.
(THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
(finish_thunk): Remove offset parms.
* class.c (find_final_overrider): Look through thunks.
(get_vcall_index): Use THUNK_TARGET.
(update_vtable_entry_for_fn): Look through thunks. Set covariant
fixed offset here. Adjust finish_thunk call.
(build_vtbl_initializer): Adjust finish_thunk calls.
* mangle.c (mangle_call_offset): Remove superfluous if.
(mangle_thunk): Adjust.
* method.c (make_thunk): Adjust.
(finish_thunk): Adjust.
(thunk_adjust): Remove assert.
(use_thunk): Use THUNK_TARGET
* dump1.c (cp_dump_tree): Adjust thunk dumping.
PR c++/9054
* class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
* dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
Remove traditional C constructs 4/n.
* decl2.c (grok_method_quals, warn_if_unknown_interface,
grok_x_components, cp_build_parm_decl, build_artificial_parm,
maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
delete_sanity, check_member_template, check_java_method,
check_classfn, finish_static_data_member_decl, grokfield,
grokbitfield, grokoptypename, grok_function_init,
cplus_decl_attributes, constructor_name, defer_fn,
build_anon_union_vars, finish_anon_union, coerce_new_type,
coerce_delete_type, comdat_linkage, maybe_make_one_only,
key_method, import_export_vtable, import_export_class,
output_vtable_inherit, import_export_decl, import_export_tinfo,
build_cleanup, get_guard, get_guard_bits, get_guard_cond,
set_guard, start_objects, finish_objects,
start_static_storage_duration_function,
finish_static_storage_duration_function, get_priority_info,
start_static_initialization_or_destruction,
finish_static_initialization_or_destruction,
do_static_initialization, do_static_destruction,
prune_vars_needing_no_initialization, write_out_vars,
reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
add_using_namespace, merge_functions, ambiguous_decl,
lookup_using_namespace, lookup_using_namespace,
qualified_lookup_using_namespace, set_decl_namespace,
decl_namespace, current_decl_namespace, push_decl_namespace,
pop_decl_namespace, push_scope, pop_scope, add_function,
arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
lookup_arg_dependent, do_namespace_alias,
validate_nonmember_using_decl, do_nonmember_using_decl,
do_toplevel_using_decl, do_local_using_decl,
do_class_using_decl, do_using_directive, check_default_args,
mark_used, handle_class_head): Use C90 prototypings. Use booleans.
* parser.c (cp_parser_class_head): Use booleanss.
* decl.c (walk_globals, walk_vtables): Likewise.
* cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
walk_globals): Change return type from 'int' to 'bool'.
* rtti.c (init_rtti_processing, build_headof, throw_bad_cast
throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
qualifier_flags, tinfo_base_init, generic_initializer,
ptr_initializer, dfs_class_hint_mark, ptm_initializer,
dfs_class_hint_unmark, class_hint_flags, class_initializer,
typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
* repo.c (repo_compile_flags, repo_template_declared,
repo_template_defined, repo_class_defined, repo_get_id,
repo_template_used, repo_vtable_used, repo_inline_used,
repo_tinfo_used, repo_template_instantiated, extract_string,
open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
finish_repo): Likewise.
* ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
cxx_print_xnode): Likewise..
* cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
cxx_warn_unused_global_decl, cp_expr_size): Likewise.
* cxxfilt.c (demangle_it, print_demangler_list, usage,
standard_symbol_characters, hp_symbol_characters, main, fatal):
Likewise.
(strip_underscore): Change type from 'int' to 'bool'.
(main): Use boolean constants.
2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
Remove traditional C constructs 3/n.
* cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
build_up_reference, warn_ref_binding, convert_to_reference,
convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
convert_to_void, convert, convert_force, build_type_conversion,
build_expr_type_conversion, type_promotes_to,
perform_qualification_conversions): Use C90 prototyping style.
* decl2.c (grok_array_decl): Use boolean constant.
(delete_sanity): Likewise.
* typeck.c (build_unary_op): Likewise.
* semantics.c (finish_switch_cond): Likewise.
* parser.c (cp_parser_direct_new_declarator): Likewise.
* init.c (build_new): Likewise.
2002-12-27 Mark Mitchell <mark@codesourcery.com>
* Make-lang.in (po-generated): Remove parse.c.
(CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
($(srcdir)/cp/parse.h): Remove target.
($(srcdir)/cp/parse.c): Likewise.
(gt-cp-parse.h): Likewise.
(gt-cp-parser.h): New target.
(c++.distclean): Do not remove parse.output.
(c++.maintainer-clean): Do not remove parse.c or parse.h.
(cp/spew.o): Remove target.
(cp/lex.o): Adjust dependencies.
(cp/pt.o): Likewise.
(cp/parse.o): Likewise.
(cp/TAGS): Do not mention parse.c.
(cp/parser.o): New target.
* NEWS: Mention the new parser.
* call.c (build_scoped_method_call): Simplify.
(build_method_call): Likewise.
(build_new_function_call): Adjust calls to add_function_candidate
and add_template_candidate.
(build_new_op): Improve handling of erroroneous operands.
(convert_default_arg): Remove circular argument processing.
(name_as_c_string): New function.
(build_new_method_call): Use it.
(perform_implicit_conversion): Use error_operand_p.
* class.c (finish_struct_anon): Use constructor_name_p.
(check_field_decls): Likewise.
(pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
(resolve_address_of_overloaded_function): Likewise.
(instantiate_type): Tweak pointer-to-member handling.
(get_primary_binfo): Remove incorrect assertion.
* config-lang.in (gtfiles): Add parser.c, remove parse.c.
* cp-tree.h (DEFARG_TOKENS): New macro.
(default_arg): New structure.
(cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
(lang_tree_node): Add default_arg.
(cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
(type_info_ref_type): New macro.
(saved_scope): Make processing_explicit_instantiation a boolean.
(check_access): New field.
(unparsed_text): Remove.
(language_function): Remove unparsed_inlines.
(error_operand_p): New macro.
(lang_decl): Adjust pending_inline_info.
(DEFARG_POINTER): Remove.
(tag_types): Add typenames.
(lookup_ualified_name): Declare.
(lookup_name_real): Likewise.
(shadow_tag): Adjust prototype.
(get_scope_of_declarator): Declare it.
(process_next_inline): Remove it.
(check_for_missing_semicolon): Likewise.
(maybe_get_template_decl_from_type_decl): Declare it.
(finish_label_stmt): Adjust prototype.
(finish_non_static_data_meber): Declare it.
(finish_pseudo_destructor_call_expr): Rename to ...
(finish_pseudo_destructor_expr): ... this.
(finish_compound_literal): Declare it.
(begin_inline_definitions): Remove it.
(init_spew): Remove.
(peekyylex): Likewise.
(arbitrate_lookup): Likewise.
(frob_opname): Likewise.
(maybe_snarf_defarg): Likewise.
(add_defarg_fn): Likewise.
(do_pending_defargs): Likewise.
(done_pending_defargs): Likewise.
(unprocessed_defarg_fn): Likewise.
(replace_defarg): Likewise.
(end_input): Likewise.
(get_overloaded_fn): Likewise.
* cvt.c (convert_to_reference): Improve error handling.
* decl.c (lookup_name_real): Do not declare it static.
(maybe_push_to_top_level): Set check_access.
(identifier_type_value): Adjust call to lookup_name_real.
(lookup_qualified_name): New method.
(lookup_name_real): Remove special-case parsing code.
(lookup_name-nonclass): Adjust call to lookup_name_real.
(lookup_name_namespace_only): Likewise.
(lookup_name): Likewise.
(check_tag_decl): Return the type declared.
(shadow_tag): Likewise.
(register_dtor_fn): Tweak check_access.
(grokfndecl): Use constructor_name_p.
(get_scope_of_declarator): New function.
(grokdeclarator): Obscure tweaks for slightly different declarator
representations.
(start_method): Return error_mark_node to indicate failure.
(cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
* decl2.c (constructor_name_full): Simplify.
(constructor_name): Use it.
(build_expr_from_tree): Adjust for changes to do new parser.
(push_scope): Improve robustness.
(validate_nonmember_using_decl): Process declarations, not names.
(do_class_using_decl): Likewise.
(handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
here.
* error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
* expr.c (cxx_expand_expr): Handle BASELINKs.
* init.c (member_init_ok_or_else): Issue more errors.
(build_offset_ref): Tweak handling of FUNCTION_DECLs.
* lex.c: Do not include parse.h.
(yypring): Do not declare.
(yylval): Likewise.
(make_reference_declarator): Remove error-generating code.
(rid_to_yy): Remove.
(cxx_init): Do not call init_spew.
(yypring): Remove.
(check_for_missing_semicolon): Remove.
* lex.h (got_scope): Remove.
(got_object): Remove.
* method.c (hack_identifier): Use finish_non_static_data_member.
(implicitly_declare_fn): Adjust use of constructor_name.
* parser.c: New file.
* pt.c (parse.h): Do not include it.
(maybe_get_template_decl_from_template): Do not declare it.
(finish_member_template_decl): Tweak.
(begin_explicit_instantiation): Adjust for
processing_explicit_instantiation being boolean.
(end_explicit_instantiation): Likewise.
(maybe_process_partial_specialization): Tighten specialization
test.
(retrieve_local_specialization): Adjust ue of hash table.
(eq_local_specializations): New function.
(register_local_specialization): Likewise.
(push_template_decl_real): Remove unnecessary test.
(maybe_get_template_decl_from_type_decl): Don't make it static.
(for_each_template_parm_r): Handle TYPEOF_TYPE.
(tsubst_copy): Use retrieive_local_specialization to handle
PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
Handle COMPONENT_REFs with pseudo-destructor-expressions.
Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
(tsubst_expr): Pass decls, not names, to do_local_using_decl.
(unify): Tweak handling of CONST_DECLs.
(regenerate_decl_from_template): Use push_nested_class.
(template_for_substitution): New funciton.
(instantiate_decl): Use it. Register parameters as local
specializations.
* rtti.c (init_rtti_processing): Set type_info_ref_type.
(build_typeid): Use it.
(get_typeid): Likeise.
* search.c (accessible_p): Use check_access, not
flag_access_control.
(adjust_result_of_qualified_name_lookup): Pay attention to the
context_class.
* semantics.c (finish_asm_stmt): Adjust error handling.
(finish_label_stmt): Return the statement.
(finish_non_static_data_member): New function.
(finish_class_expr): Handle BASELINKs.
(finish_call_expr): Handle PSEUDO_DTOR_EXPR.
(finish_object_call_expr): Simplify handling during templates.
(finish_pseudo_destructor_call_expr): Rename to ...
(finish_pseudo_dtor_expr): ... this.
(finish_compound_literal): New function.
(begin_inline_definitions): Remove.
(finish_sizeof): Remove special template handling.
* spew.c: Do not include parse.h.
* tree.c (get_overloaded_fn): Remove.
* typeck.c (build_class_member_access_expr): Handle
PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
(lookup_destructor): New function.
(finish_class_member_access_expr): Use it.
(convert_arguments): Simplify.
(build_unary_op): Handle BASELINKs.
2002-12-26 Nathan Sidwell <nathan@codesourcery.com>
PR c++/4803
* decl2.c (mark_used): Defer inline functions.
(finish_file): Merge deferred_fns loops. Check all used
inline functions have a definition.
* method.c (make_thunk): Thunks are not inline.
PR c++/5116, c++/764
* call.c (build_new_op): Make sure template class operands are
instantiated.
2002-12-24 Nathan Sidwell <nathan@codesourcery.com>
PR C++/7964
* cp-tree.h (resolve_scoped_fn_name): Prototype.
* call.c (resolve_scoped_fn_name): New function. Deal with
more template expansion. Broken out of ...
* parse.y (parse_finish_call_expr): ... here. Call it.
* decl2.c (build_expr_from_tree, CALL_EXPR): Use
resolve_scoped_fn_name and build_call_from_tree.
PR c++/9053
* decl.c (duplicate_decls): Templates may be disambiguated by
return type.
PR c++/8702
* decl2.c (check_classfn): Use lookup_fnfield_1. List all
conversion operators on failure.
2002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
Remove traditional C constructs 2/n.
* call.c (tourney, build_field_call, equal_functions, joust,
compare_ics, build_over_call, build_java_interface_fn_ref,
convert_like_real, op_error, build_object_call, resolve_args,
build_vfield_ref, check_dtor_name, build_scoped_method_call,
build_addr_func, build_call, build_method_call, null_ptr_cst_p,
sufficient_parms_p, build_conv, non_reference, strip_top_quals,
standard_conversion, reference_related_p,
reference_compatible_p, convert_class_to_reference,
direct_reference_binding, reference_binding,
,implicit_conversion, is_complete, promoted_arithmetic_type_p,
add_template_conv_candidate, any_viable, any_strictly_viable,
build_this, splice_viable, print_z_candidates,
build_user_type_conversion, build_new_function_call,
conditional_conversion, build_conditional_expr, build_new_op,
build_op_delete_call, enforce_access, call_builtin_trap,
convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
convert_default_arg, type_passed_as, convert_for_arg_passing,
in_charge_arg_for_name, is_properly_derived_from,
maybe_handle_implicit_object, maybe_handle_ref_bind,
source_type, add_warning, can_convert, can_convert_arg,
perform_implicit_conversion, can_convert_arg_bad,
initialize_reference, add_conv_candidate,
add_template_candidate_real, add_template_candidate): Ansify.
2002-12-22 Nathan Sidwell <nathan@codesourcery.com>
PR c++/8572
* cp-tree.h (grokoptypename): Add SCOPE parameter.
* decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
if in a template scope.
* parse.y (unoperator): Return the scope.
(operator_name): Adjust grokoptypename call.
2002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
* decl.c (make_unbound_class_template): Adjust. Check for tf_error.
* pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
* ChangeLog: Fix a typo.
* class.c: Fix comment typos.
* cp-tree.h: Likewise.
2002-12-18 Jason Merrill <jason@redhat.com>
Handle anonymous unions at the tree level.
C++ ABI change: Mangle anonymous unions using the name of their
first named field (by depth-first search). Should not cause
binary compatibility problems, though, as the compiler previously
didn't emit anything for affected unions.
* cp-tree.def (ALIAS_DECL): New tree code.
* decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
first field, not the largest.
(finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
push the decl, and write it out at namespace scope.
* decl.c (lookup_name_real): See through an ALIAS_DECL.
(pushdecl): Add namespace bindings for ALIAS_DECLs.
* rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
of a decl which doesn't have one.
* typeck.c (build_class_member_access_expr): Don't recurse if
we already have the type we want.
2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/8099
* friend.c (make_friend_class): Allow partial specialization
when declaration is not a template friend.
2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/3663
* pt.c (lookup_template_class): Copy TREE_PRIVATE and
TREE_PROTECTED to created decl nodes.
2002-12-18 Mark Mitchell <mark@codesourcery.com>
* class.c (build_base_field): Do not set DECL_PACKED on the
FIELD_DECL.
2002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cp-tree.h (struct tree_srcloc): Use location_t.
(SOURCE_LOCUS): New.
(SRCLOC_FILE, SRCLOC_LINE): Adjust.
2002-12-17 Jason Merrill <jason@redhat.com>
* decl.c (finish_function): Also complain about no return in
templates.
* semantics.c (finish_return_stmt): Also call check_return_expr in
templates.
* typeck.c (check_return_expr): In a template, just remember that we
saw a return.
2002-12-16 Jason Merrill <jason@redhat.com>
* semantics.c (simplify_aggr_init_exprs_r): Don't change the type
of the CALL_EXPR.
* semantics.c (do_pushlevel): Call pushlevel after adding the
SCOPE_STMT.
(do_poplevel): Call poplevel before adding the SCOPE_STMT.
* parse.y (function_body): Go back to using compstmt.
* decl.c (pushdecl): Skip another level to get to the parms level.
* call.c (build_new_method_call): Use is_dummy_object to determine
whether or not to evaluate the object parameter to a static member
function.
2002-12-14 Jason Merrill <jason@redhat.com>
* semantics.c (simplify_aggr_init_exprs_r): Also prepend the
return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
* tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
don't bother with an AGGR_INIT_EXPR.
(cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
just generate a new decl normally. Take return slot parm.
* cp-tree.h: Adjust prototype.
2002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR C++/8031
* cvt.c (convert_to_pointer_force): Don't try comparing against
erronous type.
2002-12-13 Geoffrey Keating <geoffk@apple.com>
* cp-tree.h: Have the multiple-include guards around
the entire file.
2002-12-10 David Edelsohn <edelsohn@gnu.org>
* cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
for SPEW_DEBUG.
(snarf_method): Same.
(snarf_defarg): Same.
2002-12-10 Mark Mitchell <mark@codesourcery.com>
PR c++/8372
* pt.c (tsubst_copy): Handle destructor names more correctly.
2002-12-10 Matt Austern <austern@apple.com>
* cp-tree.h: get rid of needs_virtual_reinit bit.
2002-12-09 Mark Mitchell <mark@codesourcery.com>
* NEWS: Document removal of in-class initialization extension for
static data members of non-arithmetic, non-enumeration type.
* decl.c (check_static_variable_definition): Do not allow that
extension.
* decl2.c (grokfield): Do not call digest_init when processing
templates.
2002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* error.c (dump_expr): Fix format specifier warning.
2002-12-04 Geoffrey Keating <geoffk@apple.com>
* class.c (finish_struct_1): Correct comment.
* cp-tree.c (DECL_SORTED_FIELDS): Likewise.
2002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR C++/8799
* error.c (dump_expr): Don't ever try to dump a non-existent
expression.
2002-12-03 Nathan Sidwell <nathan@codesourcery.com>
Implement covariant returns.
* cp-tree.h (IS_AGGR_TYPE_2): Remove.
(struct lang_decl_flags): Add this_thunk_p flag.
Rename vcall_offset to virtual_offset.
(struct lang_decl): Rename delta to fixed_offset.
(DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
(SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
(THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
(THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
(make_thunk): Add this_adjusting arg.
(finish_thunk): Declare.
(mangle_thunk): Add this_adjusting arg.
* class.c (get_vcall_index): Use base function for lookup.
(update_vtable_entry_for_fn): Generate covariant thunk.
(finish_struct_1): Set DECL_VINDEX to NULL for thunks.
(build_vtbl_initializer): Use base function for lookup.
Finish covariant thunk here. Adjust thunk generation.
* dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
Adjust thunk dumping.
* mangle.c (mangle_call_offset): New function.
(mangle_thunk): Adjust for covariant thunks.
* method.c (make_thunk): Adjust. Do not set name here.
(finish_thunk): New function. Set name here.
(use_thunk): Generate covariant thunks too.
(thunk_adjust): New function.
* search.c (covariant_return_p): Remove. Fold into ...
(check_final_overrider): ... here. Simplify.
* semantics.c (emit_associated_thunks): Walk covariant thunk lists.
2002-12-03 Jason Merrill <jason@redhat.com>
PR c++/8674
* call.c (build_over_call): Check specifically for TARGET_EXPR
when eliding.
PR c++/8461, c++/8625
* call.c (convert_for_arg_passing): Don't mess with error_mark_node.
(cp_convert_parm_for_inlining): Remove.
* cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
Remove.
* cp-tree.h (ADDR_IS_INVISIREF): Remove.
* except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
* call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
an ambiguous conversion.
2002-12-03 Mark Mitchell <mark@codesourcery.com>
PR c++/8688
* decl.c (reshape_init): Handle erroneous initializers.
2002-12-02 Mark Mitchell <mark@codesourcery.com>
PR c++/8720
* spew.c (remove_last_token): Make sure that last_chunk is set
correctly.
PR c++/8615
* error.c (dump_expr): Handle character constants with
TREE_OVERFLOW set.
2002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
DR 180
* decl.c (grokdeclarator): Require class-key for all friend class.
Output the correct type and context in the error message.
2002-12-01 Mark Mitchell <mark@codesourcery.com>
PR c++/5919
* pt.c (unify): Use variably_modified_type_p to test validity of
template argument types.
PR c++/8727
* cp-tree.h (lang_type_class): Add typeinfo_var.
(CLASSTYPE_TYPEINFO_VAR): New macro.
* rtti.c (get_tinfo_decl): Use it.
PR c++/8663
* init.c (expand_member_init): Always get the main variant of a
base class.
2002-12-01 Mark Mitchell <mark@codesourcery.com>
PR c++/8332
PR c++/8493
* decl.c (cxx_init_decl_processing): Use size_type_node, not
c_size_type_node.
* decl2.c (coerce_new_type): Likewise.
* except.c (do_allocate_exception): Likewise.
2002-11-30 Zack Weinberg <zack@codesourcery.com>
* call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
typeck2.c: Include coretypes.h and tm.h.
* Make-lang.in: Update dependencies.
2002-11-30 Mark Mitchell <mark@codesourcery.com>
PR c++/8227
* decl.c (layout_var_decl): Deal gracefully with erroneous types.
(check_initializer): Validate the type of the initialized
variable, even if the initializer is absent.
* typeck.c (cp_type_quals): Deal gracefully with erroneous types.
PR c++/8214
* typeck.c (convert_for_assignment): Do not use
decl_constant_value on the operand.
PR c++/8511
* pt.c (instantiate_decl): Handle template friends defined outside
of the class correctly.
2002-11-29 Joe Buck <jbuck@synopsys.com>
* parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
anonymous structs.
2002-11-29 Mark Mitchell <mark@codesourcery.com>
* class.c (walk_subobject_offsets): Recur on binfos as well as on
types.
(layout_nonempty_base_or_field): Pass it a binfo when processing a
base class.
(layout_empty_base): Likewise.
(build_base_field): Likewise.
2002-11-27 Mark Mitchell <mark@codesourcery.com>
* class.c (build_base_field): Make sure we get the canonical base
when descending through primary bases.
2002-11-26 Geoffrey Keating <geoffk@apple.com>
* decl.c (check_initializer): Don't error on initialisation of
a scalar with a brace-enclosed expression.
2002-11-26 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
(template_parms_equal): Remove prototype.
* typeck.c (buuld_indirect_ref): Reformat.
2002-11-25 Jason Merrill <jason@redhat.com>
* init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
and a DO_STMT.
2002-11-25 Mark Mitchell <mark@codesourcery.com>
* tree.c (cp_build_qualified_type_real): Correct handling of
array types.
* class.c (walk_subobject_offsets): Fix thinko.
(build_base_field): Record offsets of empty bases in primary
virtual bases.
(layout_class_type): Record offsets of empty bases in fields.
* search.c (is_subobject_of_p_1): Fix thinko.
(lookup_field_queue_p): Likewise.
2002-11-24 Mark Mitchell <mark@codesourcery.com>
* class.c (layout_class_type): Reuse tail padding when laying out
virtual bases.
2002-11-22 Mark Mitchell <mark@codesourcery.com>
* rtti.c (qualifier_flags): Fix thinko.
2002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
Remove traditional C constructs 1/n.
* cp-tree.h (init_method, set_mangled_name_for_decl,
build_opfncall, hack_identifier, make_thunk, use_thunk,
synthesize_method, implicitly_declare_fn,
skip_artificial_parms_for, optimize_function, calls_setjmp_p,
maybe_clone_body): Remove use of PARAMS.
* method.c (do_build_assign_ref, do_build_copy_constructor,
synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
Likewise.
(synthesize_method): Use 'bool' type and constants instead of
'int'.
(locate_copy): Likewise.
(implicitly_declare_fn): Likewise.
* optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
Remove old-style declaration.
(maybe_clone_body): Use 'bool' type and constants.
2002-11-21 Glen Nakamura <glen@imodulo.com>
PR c++/8342
* typeck.c (get_member_function_from_ptrfunc): Make sure that a
SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
of the branches of a COND_EXPR.
2002-11-19 Mark Mitchell <mark@codesourcery.com>
* pt.c (for_each_template_parm): Free allocated memory.
* search.c (is_subobject_of_p_1): New function.
(is_subobject_of_p): Avoid walking virtual bases multiple times.
2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
* g++spec.c (lang_specific_spec_functions): New.
2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
* ChangeLog: Follow spelling conventions.
* class.c: Likewise.
* decl2.c: Likewise.
2002-11-14 Zack Weinberg <zack@codesourcery.com>
* search.c (dfs_push_decls): Do not try to reorder elements
3..n of method_vec if method_vec has only two elements.
Reverse order of two tests to avoid accessing unallocated
memory.
2002-11-14 Mark Mitchell <mark@codesourcery.com>
* class.c (dfs_find_final_overrider): Adjust so that the most
derived object is a binfo, rather than a class type.
(find_final_overrider): Likewise.
(add_vcall_offset_vtbl_entries_1): Simplify accordingly.
(add_vcall_offset): Likewise.
2002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/8389
* pt.c (instantiate_template): Push class scope for member
functions.
(get_mostly_instantiated_function_type): Likewise. Don't call
tsubst on context. Remove CONTEXTP and TPARMSP parameters.
* cp-tree.h (get_mostly_instantiated_function_type): Adjust.
* mangle.c (write_encoding, write_unqualified_name): Adjust.
2002-11-07 Mark Mitchell <mark@codesourcery.com>
* class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
vcall offfsets. Split out ...
(add_vcall_offset): ... new function.
PR c++/8338
* pt.c (for_each_template_parm): Add htab parameter.
(process_partial_specialization): Adjust call.
(push_template_decl_real): Likewise.
(pair_fn_data): Add visited.
(for_each_template_parm_r): Avoid walking duplicates more than
once.
(uses_template_parms): Adjust call to for_each_template_parm.
2002-11-07 Mark Mitchell <mark@codesourcery.com>
* class.c (add_implicitly_declared_members): Put implicitly
declared functions at the end of TYPE_METHODs when -fabi-version
is at least 2.
2002-11-05 Geoffrey Keating <geoffk@apple.com>
* decl2.c (finish_file): Correct spelling.
2002-11-03 Mark Mitchell <mark@codesourcery.com>
* call.c (build_special_member_call): Do not try to lookup VTTs by
name.
* class.c (vtbl_init_data): Add generate_vcall_entries.
(get_vtable_decl): Do not look up virtual tables by name.
(copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
(set_primary_base): Do not set CLASSTYPE_RTTI.
(determine_primary_base): Likewise.
(get_matching_virtual): Remove.
(get_vcall_index): New function.
(update_vtable_entry_for_fn): Do not try to use virtual thunks
when they are not required. Assign vcall indices at this point.
(finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
Do update dynamic_classes.
(build_vtt): Do not add VTTs to the symbol table.
(build_ctor_vtbl_group): Likewise.
(build_vtbl_initializer): Simplify handling of vcall indices.
(build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
for the most derived class.
(add_vcall_offset_vtbl_entries_1): But do not actually add them to
the vtable.
* cp-tree.h (dynamic_classes): New macro.
(lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
(CLASSTYPE_RTTI): Remove.
(CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
(CLASSTYPE_VCALL_INDICES): New macro.
(CLASSTYPE_VTABLES): Likewise.
(BV_USE_VCALL_INDEX_P): Remove.
(build_vtable_path): Remove.
* decl2.c (finish_vtable_vardecl): Remove.
(key_method): Remove #if 0'd code.
(finish_vtable_vardecl): Rename to ...
(maybe_emit_vtables): ... this.
(finish_file): Use it.
* search.c (look_for_overrides_here): Update comment.
2002-11-01 Zack Weinberg <zack@codesourcery.com>
PR c/7353 redux
* decl2.c (grokfield): Reject TYPE_DECLs with initializers.
2002-10-30 Jason Merrill <jason@redhat.com>
PR c++/8186
* cp-tree.h (ADDR_IS_INVISIREF): New macro.
* call.c (convert_for_arg_passing): Set it.
* except.c (stabilize_throw_expr): Recurse for such an arg.
2002-10-31 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (lang_decl_flags): Remove init_priority.
(lang_decl): Add delta.
(GLOBAL_INIT_PRIORITY): Remove.
(THUNK_DELTA): Revise definition.
* decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
* dump.c (cp_dump_tree): Don't dump it.
2002-10-30 Mark Mitchell <mark@codesourcery.com>
PR c++/8160
* typeck2.c (process_init_constructor): Call complete_array_type.
PR c++/8149
* decl.c (make_typename_type): Issue errors about invalid results.
2002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
Core issue 287, PR c++/7639
* cp-tree.h (lang_type_class): Add decl_list field.
(CLASSTYPE_DECL_LIST): New macro.
(maybe_add_class_template_decl_list): Add declaration.
* class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
(unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
(maybe_add_class_template_decl_list): New function.
(add_implicitly_declared_members): Use it.
* decl.c (maybe_process_template_type_declaration): Likewise.
(pushtag): Likewise.
* friend.c (add_friend): Likewise.
(make_friend_class): Likewise.
* semantics.c (finish_member_declaration): Likewise.
(begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
* pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
to process members and friends in the order of declaration.
2002-10-29 Mark Mitchell <mark@codesourcery.com>
PR c++/8287
* decl.c (finish_destructor_body): Create the label to jump to
when returning from a destructor here.
(finish_function_body): Rather than here.
2002-10-25 Zack Weinberg <zack@codesourcery.com>
PR c++/7266
* decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
SCOPE_REF is not null before dereferencing it.
2002-10-25 Mark Mitchell <mark@codesourcery.com>
* call.c (build_over_call): Use DECL_CONTEXT, not
DECL_VIRTUAL_CONTEXT.
* class.c (modify_vtable_entry): Don't mess with
DECL_VIRTUAL_CONTEXT.
(set_vindex): Remove.
(set_primary_base): Remove vfuns_p parameter.
(determine_primary_base): Likewise.
(modify_all_vtables): Likewise.
(layout_class_type): Likewise. Adjust calls to other functions
accordingly.
(finish_struct_1): Adjust calls to modified functions. Set
DECL_VINDEX here.
* cp-tree.h (lang_type_class): Remove vsize.
(CLASSTYPE_VSIZE): Remove.
(lang_decl): Remove thunks.
(DECL_THUNKS): Adjust.
(DECL_VIRTUAL_CONTEXT): Remove.
(duplicate_decls): Don't copy it.
* pt.c (build_template_decl): Don't set it.
(tsubst_decl): Likewise.
* typeck.c (expand_ptrmemfunc_cst): Don't use it.
* class.c (build_vtbl_initializer): Don't use build_vtable_entry.
(build_vtable_entry): Remove.
* cp-tree.h (BINFO_VIRTUALS): Expand documentation.
(lang_decl): Add thunks.
(DECL_THUNKS): New macro.
* decl.c (duplicate_decls): Copy it.
* method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
* semantics.c (emit_associated_thunks): Simplify.
2002-10-24 David Edelsohn <edelsohn@gnu.org>
PR c++/7228
* cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
lang_type structure exists before accessing field.
(SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
(CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
(SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
* class.c (check_field_decls): Use new macros.
* typeck2.c (process_init_constructor): Remove redundant check for
existence of lang_type structure.
2002-10-24 Mark Mitchell <mark@codesourcery.com>
* class.c (end_of_base): New method.
(end_of_class): Use it. Check indirect virtual bases.
* class.c (check_field_decls): Fix typo.
2002-10-23 Mark Mitchell <mark@codesourcery.com>
PR c++/8067
* decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
related variables.
PR c++/7679
* spew.c (next_token): Do not return an endless stream of
END_OF_SAVED_INPUT tokens.
(snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
the cached token stream.
(snarf_defarg): Likewise.
2002-10-23 Zack Weinberg <zack@codesourcery.com>
* cp-lang.c (cp_var_mod_type_p): New: C++ hook for
variably_modified_type_p.
* cp-tree.h: Remove prototype of variably_modified_type_p.
* tree.c (variably_modified_type_p): Remove; now implemented
in language-independent code.
2002-10-22 Mark Mitchell <mark@codesourcery.com>
PR c++/6579
* spew.c (snarf_parenthesized_expression): New function.
(snarf_block): Use it.
2002-10-22 Richard Henderson <rth@redhat.com>
* method.c (use_thunk): Always compute vcall_value; assert that
it is not zero. Use can_output_mi_thunk; use output_mi_thunk
for vcall thunks as well.
2002-10-21 Mark Mitchell <mark@codesourcery.com>
* class.c (empty_base_at_nonzero_offset_p): New function.
(layout_nonempty_base_or_field): Do not check for conflicts when
laying out a virtual base using the GCC 3.2 ABI.
(build_base_field): Correct checking for presence of empty classes
at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
* class.c (include_empty_classes): Use normalize_rli.
(layout_class_type): Likewise.
* decl.c (reshape_init): Tweak handling of character arrays.
PR c++/8218
* cp-tree.h (lang_type_class): Add contains_empty_class_p.
(CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
* class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
(check_field_decls): Likewise.
(layout_class_type): Likewise.
(finish_struct_1): Initialize it.
(walk_subobject_offsets): Use it to prune searches.
2002-10-20 Mark Mitchell <mark@codesourcery.com>
* method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
* optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
TARGET_ASM_OUTPUT_MI_THUNK in comments.
2002-10-18 Zack Weinberg <zack@codesourcery.com>
* decl.c (start_decl): Point users of the old initialized-
typedef extension at __typeof__.
2002-10-18 Mark Mitchell <mark@codesourcery.com>
* Make-lang.in (method.o): Depend on TARGET_H.
* method.c (target.h): Include it.
(use_thunk): Use target hooks. Use vcall thunks, if available.
2002-10-18 Mark Mitchell <mark@codesourcery.com>
* class.c (base_derived_from): Make sure return value is a bool.
2002-10-18 Mark Mitchell <mark@codesourcery.com>
* class.c (find_final_overrider_data_s): Remove overriding_fn and
overriding_base.
(dfs_base_derived_from): New function.
(base_derived_from): Likewise.
(dfs_find_final_overrider): Use base_derived_from.
(find_final_overrider): Adjust.
2002-10-18 Jason Merrill <jason@redhat.com>
PR c++/8080
* semantics.c (finish_for_cond, finish_while_cond): Don't mess
with condition decls in a template.
2002-10-17 Nathan Sidwell <nathan@codesourcery.com>
* class.c (add_method): Compare template parms too.
2002-10-17 Mark Mitchell <mark@codesourcery.com>
PR c++/7584
* class.c (handle_using_decl): Allow the declaration used to be
from an ambiguous base.
* pt.c (convert_template_argument): Revert this change:
2002-10-16 Mark Mitchell <mark@codesourcery.com>
* pt.c (convert_template_argument): Do not fold non-type
template rguments when inside a template.
* init.c (expand_default_init): Handle brace-enclosed initializers
correctly.
2002-10-16 Mark Mitchell <mark@codesourcery.com>
* mangle.c (write_expression): Correct handling of enumeration
constants.
(write_template_arg): Likewise.
* pt.c (convert_template_argument): Do not fold non-type template
arguments when inside a template.
PR c++/7478
* cvt.c (convert_to_reference): Allow references as the incoming
type.
2002-10-16 Mark Mitchell <mark@codesourcery.com>
PR c++/7524
* method.c (do_build_assign_ref): Use cp_build_qualified_type, not
build_qualified_type.
2002-10-15 Richard Henderson <rth@redhat.com>
* error.c (dump_expr): Use real_to_decimal directly, and with
the new arguments.
2002-10-15 Mark Mitchell <mark@codesourcery.com>
* decl.c (reshape_init): Fix typo.
* cp-tree.h (operator_name_info_t): Add arity.
* lex.c (init_operators): Initialize it.
* mangle.c (write_conversion_operator_name): New function.
(write_unqualified_name): Use it.
(write_template_args): Accept template arguments as a TREE_LIST.
(write_expression): Adjust handling of qualified names to match
specification.
2002-10-15 Jason Merrill <jason@redhat.com>
* call.c (call_builtin_trap): New fn.
(convert_arg_to_ellipsis): Use it. Downgrade error to warning.
(build_call): Don't set current_function_returns_abnormally outside
a function.
2002-10-14 Mark Mitchell <mark@codesourcery.com>
* class.c (check_field_decls): Remove empty_p parameter. Instead,
clear CLASSTYPE_EMPTY_P.
(build_base_field): Likewise.
(build_base_fields): Likewise.
(check_bases_and_members): Likewise.
(create_vtbl_ptr): Likewise.
(layout_class_type): Likewise. Ensure that empty classes have
size zero when used as base classes in the 3.2 ABI.
(finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
parameter.
(is_empty_class): Correct definition when using post-3.2 ABI.
* cp-tree.h (lang_type_class): Add empty_p.
(CLASSTYPE_EMPTY_P): New macro.
2002-10-12 Nathan Sidwell <nathan@codesourcery.com>
* init.c (build_delete): Do not apply save_expr for arrays.
(build_vec_delete): Likewise.
2002-10-14 Mark Mitchell <mark@codesourcery.com>
* decl.c (layout_var_decl): Call layout_decl even for variables
whose type is an array with unspecified bounds.
PR c++/7176
* lex.c (do_identifier): Add another option for the parsing
parameter.
* parse.y (do_id): Use it.
2002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
PRs C++/6803, C++/7721 and C++/7803
* decl.c (grokdeclarator): Gracefully handle template-name as
decl-specifier.
2002-10-11 Jason Molenda <jmolenda@apple.com>
* init.c (build_field_list): Provide uses_unions_p with a default
value.
2002-10-11 Mark Mitchell <mark@codesourcery.com>
PR c++/5661
* cp-tree.h (variably_modified_type_p): New function.
(grokdeclarator) Tighten check for variably modified types as
fields.
* pt.c (convert_template_argument): Do not allow variably modified
types as template arguments.
* tree.c (variably_modified_type_p): New function.
* NEWS: Document removal of "new X = ..." extension.
* class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
brace-enclosed initializers.
* cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
(initialize_local_var): Remove declaration.
(expand_static_init): Likewise.
* decl.c (next_initializable_field): New function.
(reshape_init): Likewise.
(check_initializer): Use them. Build dynamic initializer for
aggregates here too.
(initialize_local_var): Simplify, and incorporate cleanup
insertion code as well.
(destroy_local_var): Remove.
(cp_finish_decl): Tidy.
(expand_static_init): Fold checks for whether or not a variable
needs initialization into this function. Simplify.
* decl2.c (do_static_initialization): Simplify.
* init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
be done for us automatically.
(expand_default_init): Handle brace-enclosed initializers
correctly.
(expand_aggr_init_1): Remove RTL-generation code.
(build_vec_init): Remove "new X = ..." support.
* parse.y (new_initializer): Likewise.
* rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
brace-enclosed initializer.
(create_pseudo_type_info): Likewise.
* typeck2.c (store_init_value): Don't try to handle digest_init
being called more than once.
(digest_init): Tidy handling of brace-enclosed initializers.
2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* decl.c (typename_hash): Use htab_hash_pointer.
2002-10-10 Jim Wilson <wilson@redhat.com>
* decl.c (duplicate_decls): Don't call decl_attributes.
2002-10-09 Zack Weinberg <zack@codesourcery.com>
PR c/7353
* decl.c (start_decl): Unconditionally issue error for
'typedef foo = bar'.
(cp_finish_decl): Remove special case for TYPE_DECL with initializer.
(grokdeclarator): Remove redundant error for 'typedef foo = bar'.
2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* decl2.c (prune_vtable_vardecl): Delete unused function.
2002-10-03 Mark Mitchell <mark@codesourcery.com>
PR c++/7754
* decl2.c (finish_anon_union): Do not expand anonymous unions when
procesing template functions.
* pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
type. Call layout_decl.
(tsubst_expr, case DECL_STMT): Handle anonymous unions.
2002-10-07 Richard Henderson <rth@redhat.com>
* decl2.c, pt.c: Revert c++/7754 fix.
2002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/7804
* error.c (dump_expr) [REAL_CST]: Output in decimal format.
2002-10-03 Mark Mitchell <mark@codesourcery.com>
PR c++/7931
* pt.c (for_each_template_parm_r): Handle BASELINKs.
PR c++/7754
* decl2.c (finish_anon_union): Do not expand anonymous unions when
procesing template functions.
* pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
type. Call layout_decl.
(tsubst_expr, case DECL_STMT): Handle anonymous unions.
2002-10-03 Mark Mitchell <mark@codesourcery.com>
PR c++/8006
* mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
template parameters.
(globals): Add entity and need_abi_warning.
(decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
CLASSTYPE_TEMPLATE_INFO.
(is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
TYPE_TI_TEMPLATE.
(write_prefix): Handle typename types correctly.
(write_template_prefix): Handle template template parameters
correctly.
(start_mangling): Add entity parameter.
(finish_mangling): Warn about names whose mangling will change.
(mangle_decl_string): Adjust.
(mangle_type_string): Likewise.
(mangle_special_for_type): Likewise.
(mangle_ctor_vtbl_for_type): Likewise.
(mangle_thunk): Likewise.
(mangle_guard_variable): Likewise.
(mangle_ref_init_variable): Likewise.
2002-10-02 Mark Mitchell <mark@codesourcery.com>
PR c++/7188.
* cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
* cp-tree.h (emit_base_init): Rename to ....
(emit_mem_initializers): ... this.
(expand_member_init): Change prototype.
* init.c (perform_member_init): Compute explicit, rather than
requiring it as a parameter.
(sort_member_init): Rename to ...
(sort_mem_initializers): ... this. Process bases and data members
together.
(sort_base_init): Remove.
(emit_base_init): Rename to ...
(emit_mem_initializers): ... this.
(expand_aggr_vbase_init_1): Remove.
(construct_virtual_bases): Rename to ...
(construct_virtual_base): ... this.
(expand_member_init): Rework handling of base initializers.
* method.c (do_build_copy_constructor): Use
finish_mem_initializers.
* parse.y (member_init): Adjust calls to expand_member_init.
* pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
(tsubst_initializer_list): Use expand_member_init.
* semantics.c (finish_mem_intiailizers): Simplify.
2002-10-02 Matt Austern <austern@apple.com>
* decl.c (walk_vtables_r): Fixed typo that caused result to
never get a nonzero value.
2002-10-02 Roger Sayle <roger@eyesopen.com>
PR optimization/6627
* cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
from here, and move it to tree.h.
* decl.c (cxx_init_decl_processing): If storing the vbit
in function pointers, ensure that force_align_functions_log
is atleast one.
2002-10-02 Matt Austern <austern@apple.com>
* class.c (check_field_decls): Changed warning about const member
variables so that it doesn't get issued for a class aggregate.
2002-10-01 Mark Mitchell <mark@codesourcery.com>
* decl.c (cp_finish_decl): Make sure array types are laid out,
even if the array bounds are unknown.
2002-10-01 Steve Ellcey <sje@cup.hp.com>
* class.c (build_vtbl_initializer): Change build_c_cast
to build1.
2002-10-01 Mark Mitchell <mark@codesourcery.com>
* decl.c (cp_finish_decl): Make sure array types are laid out,
even if the array bounds are unknown.
* decl.c (cp_finish_decl): Correct check for dynamic
initialization of thread-local storage.
2002-09-30 Nathan Sidwell <nathan@codesourcery.com>
* tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
overloaded.
2002-09-30 Steve Ellcey <sje@cup.hp.com>
* class.c (build_vtbl_initializer): Add cast.
(add_vcall_offset_vtbl_entries_1):
Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
2002-09-30 Mark Mitchell <mark@codesourcery.com>
* class.c (walk_subobject_offsets): Correct the calculation of
offsets for virtual bases. Correct the counting of array
elements.
(layout_nonempty_base_or_field): Simplify. Correct the
calculation of offsets to be propagated through the binfo
hierarchy.
(build_base_field): Avoid creating a FIELD_DECL for empty bases.
Add the FIELD_DECL to TYPE_FIELDS.
(build_base_fields): Adjust accordingly.
(layout_virtual_bases): Use build_base_field.
(end_of_class): Return a tree, not an integer.
(warn_about_ambiguous_direct_bases): Rename to ...
(warn_about_ambiguous_bases): ... this.
(include_empty_classes): New function.
(layout_class_type): Create an alternative version of the type to
be used when as a base class type. Do not call
finish_record_layout until we are done laying out the class.
* cp-tree.h (lang_type_class): Remove size, size_unit. Add
as_base.
(CLASSTYPE_SIZE): Reimplement.
(CLASSTYPE_SIZE_UNIT): Likewise.
(CLASSTYPE_ALIGN): Likweise.
(CLASSTYPE_USER_ALIGN): Likewise.
(CLASSTYPE_AS_BASE): New macro.
(DECL_INITIALIZED_P): Likewise.
(extract_init): Remove prototype.
(build_forced_zero_init): Rename to ...
(build_zero_init): ... this.
(force_store_init_value): Remove.
* decl.c (obscure_complex_init): Remove.
(duplicate_decls): Copy DECL_INITIALIZED_P.
(check_initializer): Do not leave junk in DECL_INITIAL.
(cp_finish_decl): Handle zero-initialization of entities with
static storage duration.
* expr.c (extract_init): Remove.
* init.c (build_forced_zero_init): Remove.
(build_zero_init): New function.
(build_default_init): Use it.
(build_field_list): Skip FIELD_DECLs for base subobjects.
(push_base_cleanups): Likewise.
* method.c (do_build_assign_ref): Likewise.
(synthesize_exception_spec): Likewise.
* pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
(regenerate_decl_from_template): To not set DECL_INITIAL for a
static data member whose initialization took place in its class.
(instantiate_decl): Do not pass an initializer to cp_finish_decl
in that situation.
* search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
(dfs_unuse_fields): Likewise.
* tree.c (pod_type_p): Handle error_mark_node.
(zero_init_p): Likewise.
* typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
subobjects.
* typeck2.c (store_init_value): Remove #if 0'd code.
(force_store_init_value): Remove.
(process_init_constructor): Use build_zero_init.
2002-09-29 Nathan Sidwell <nathan@codesourcery.com>
PR c++/7788
* rtti.c (unemitted_tinfo_decl_p): Check it has a field.
2002-09-29 Kazu Hirata <kazu@cs.umass.edu>
* cp-tree.h: Fix comment typos.
* decl.c: Likewise.
* pt.c: Likewise.
2002-09-25 Mark Mitchell <mark@codesourcery.com>
* cp/class.c (contains_empty_class_p): New method.
(walk_subobject_offsets): Correct computation of field offset.
(layout_empty_base): Correct placement of emtpy base classes.
(layout_class_type): Warn about ABI changes.
2002-09-23 Mark Mitchell <mark@codesourcery.com>
* cp/class.c (layout_virtual_bases): Do not round the size of the
type to a multiple of the alignment before laying out virtual bases.
(layout_class_type): Correct handling of bit-fields that are wider
than their type inside unions. Round the size of the type to a
even number of bytes when computing the size without virtual
bases.
* cp/cp-tree.h (abi_version_at_least): New macro.
2002-09-21 Kazu Hirata <kazu@cs.umass.edu>
* ChangeLog: Follow spelling conventions.
* ChangeLog.2: Likewise.
* call.c: Likewise.
* class.c: Likewise.
* cp-tree.h: Likewise.
* cvt.c: Likewise.
* decl.c: Likewise.
* decl2.c: Likewise.
* except.c: Likewise.
* friend.c: Likewise.
* g++spec.c: Likewise.
* init.c: Likewise.
* lex.c: Likewise.
* mangle.c: Likewise.
* method.c: Likewise.
* operators.def: Likewise.
* optimize.c: Likewise.
* pt.c: Likewise.
* rtti.c: Likewise.
* search.c: Likewise.
* semantics.c: Likewise.
* spew.c: Likewise.
* tree.c: Likewise.
* typeck.c: Likewise.
2002-09-18 Devang Patel <dpatel@apple.com>
* cp/cp-tree.h: New prototype for walk_vtabls().
* cp/decl.c (walk_vtables_r): New function.
(struct cp_binding_level): Add new members, namespaces,
names_size and vtables.
(add_decl_to_level): Add decl in namespaces or vtables
chain, if conditions match.
(walk_vtables): New function.
(walk_namespaces_r): Travers separate namespace chain
for namespace decls.
(wrapup_globals_for_namespace): Use names_size instead
of list_length().
* cp/decl2.c (finish_file): Use walk_vtables() instead of
walk_globals() to walk vtable decls.
2002-09-18 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (grokdeclarator): Use assert, not internal_error. Don't
ICE with invalid pointers & references.
2002-09-17 Zack Weinberg <zack@codesourcery.com>
* Make-lang.in: Remove all references to the demangler.
* cxxfilt.c: Moved to binutils.
2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
PR c++/7718
* pt.c (tsubst_decl): Remove assert.
Remove DR 295 implementation.
* pt.c (check_cv_quals_for_unify): Disable function & method cases.
* tree.c (cp_build_qualified_type_real): Likewise. Don't warn
about ignoring volatile qualifiers.
* search.c (lookup_member): Correct documentation.
2002-09-16 Geoffrey Keating <geoffk@apple.com>
* cp-tree.h (union lang_tree_node): Add chain_next option.
2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
* parse.y (parse_finish_call_expr): Check lookup_member result.
PR c++/7015
* semantic.c (finish_asm_stmt): Fix operand/output_operands
thinko.
* typeck.c (c_expand_asm_operands): Protect from error_mark_node.
2002-09-15 Nathan Sidwell <nathan@codesourcery.com>
PR c++/7919
* call.c (build_over_call): Convert this pointer for fns found by
using decls.
2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
* ChangeLog: Follow spelling conventions.
* ChangeLog.1: Likewise.
2002-09-14 Nathan Sidwell <nathan@codesourcery.com>
PR c++/7768
* pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
2002-09-14 Kazu Hirata <kazu@cs.umass.edu>
* error.c: Fix comment formatting.
* except.c: Likewise.
* expr.c: Likewise.
* friend.c: Likewise.
* g++spec.c: Likewise.
* init.c: Likewise.
* lex.c: Likewise.
* mangle.c: Likewise.
* method.c: Likewise.
* optimize.c: Likewise.
* pt.c: Likewise.
* rtti.c: Likewise.
* search.c: Likewise.
* semantics.c: Likewise.
* spew.c: Likewise.
* tree.c: Likewise.
* typeck.c: Likewise.
* typeck2.c: Likewise.
2002-09-13 Matt Austern <austern@apple.com>
PR C++/7828
* cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
* cp/call.c: Change call-by-const-reference mechanism to use
non_cast_lvalue_p when deciding whether the create a temporary.
We need a temporary when passing, e.g. (long) x by const ref.
2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
* decl.c: Fix comment formatting.
* decl2.c: Likewise.
2002-09-12 Kazu Hirata <kazu@cs.umass.edu>
* call.c: Fix comment formatting.
* class.c: Likewise.
* cp-lang.c: Likewise.
* cp-tree.h: Likewise.
* cvt.c: Likewise.
2002-09-11 Zack Weinberg <zack@codesourcery.com>
* Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
* cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
minor adjustments (use version_string, eliminate yet another
duplicate of xmalloc)
2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* cp-tree.h (require_complete_eh_spec_types): Add prototype.
2002-09-05 Jason Merrill <jason@redhat.com>
* typeck2.c (add_exception_specifier): Only pedwarn for an
incomplete type.
(require_complete_eh_spec_types): New fn.
(cxx_incomplete_type_diagnostic): Also support pedwarning.
* typeck.c (complete_type_or_diagnostic): Likewise.
* call.c (build_call): Call require_complete_eh_spec_types.
* rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
on an incomplete type.
2002-09-04 Jakub Jelinek <jakub@redhat.com>
* decl.c (start_cleanup_fn): Clear interface_only before
start_function, restore it afterwards.
2002-09-02 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (finish_builtin_type): Remove.
* decl2.c (finish_builtin_type): Move to common code.
* decl.c (build_ptrmemfunc_type): Adjust.
* rtti.c (create_pseudo_type_info): Adjust.
(create_tinfo_types): Adjust.
2002-08-31 Jason Merrill <jason@redhat.com>
* cp-lang.c (cp_expr_size): Allow initialization from a
CONSTRUCTOR.
2002-08-30 Richard Henderson <rth@redhat.com>
PR opt/7515
* tree.c: Include target.h.
(cp_cannot_inline_tree_fn): Don't auto-inline functions that
don't bind locally.
* Makefile.in (tree.o): Update.
2002-08-27 Mark Mitchell <mark@codesourcery.com>
* class.c (layout_virtual_bases): Warn about bugs in G++ that
result in incorrect object layouts.
(layout_class_type): Likewise.
2002-08-24 Matt Austern <austern@apple.com>
* tree.c (lvalue_p_1): Add argument for whether casts of lvalues
are allowable.
(real_lvalue_p): Update caller.
(lvalue_p): Ditto.
(non_cast_lvalue_or_else): New.
* tree.h: Declare it.
* typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
2002-08-22 Mark Mitchell <mark@codesourcery.com>
* typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
and COND_EXPR specially; fix error message output.
2002-08-22 Jason Merrill <jason@redhat.com>
* pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
* semantics.c (nullify_returns_r): Likewise.
2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
Fix PR/7621
* typeck.c (finish_class_member_access_expr): Diagnose cases where
name lookup finds nothing.
2002-08-15 Jason Merrill <jason@redhat.com>
* semantics.c (finish_then_clause): Remove redundant assignment.
(finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
extra binding level outside the if/switch statement.
(finish_while_cond, finish_for_cond): Rewrite complex condition
into the loop body.
2002-08-15 Alexandre Oliva <aoliva@redhat.com>
* parse.y (sizeof, alignof, typeof): New non-terminals to
increment skip_evaluation. Replace terminals with them and
decrement skip_evaluation at the end of rules using them.
* decl2.c (mark_used): Don't assemble_external if
skipping evaluation.
2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
Fix PR/7504
* parse.y (parse_finish_call_expr): Handle incomplete
type used to name a scope.
2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
PR c++/7598
* typeck.c (build_unary_op): Fold offsetof idiom. Fixes
regression caused by my 2002-08-08 patch.
2002-08-13 Mark Mitchell <mark@codesourcery.com>
* decl.c (pushdecl_class_level): Honor requests to bind names to
OVERLOADs.
2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* decl2.c (build_call_from_tree): Fix uninitialized variable.
* parse.y (parse_finish_call_expr): Likewise.
* repo.c (old_args, old_dir, old_main): Const-ify.
2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
* decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
* optimize.c (maybe_clone_body): Likewise.
* pt.c (tsubst_enum): Likewise.
(lookup_template_class): Likewise.
* tree.c (cp_copy_res_decl_for_inlining): Likewise.
2002-08-10 Neil Booth <neil@daikokuya.co.uk>
* lang-specs.h: Remove -ansi.
2002-08-10 Nathan Sidwell <nathan@codesourcery.com>
* tree.c (maybe_dummy_object): Replace // with /* */
2002-08-09 Mark Mitchell <mark@codesourcery.com>
* call.c (standard_conversion): Use build_ptrmem_type.
* cp-tree.h (build_ptrmem_type): New function.
(adjust_result_of_qualified_name_lookup): Likewise.
* decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
static data members.
(build_ptrmem_type): New function.
(grokdeclarator): Do not use build_offset_type when encountering a
qualified name.
* parse.y (parse_finish_call_expr): Use
adjust_result_of_qualified_name_lookup.
* search.c (adjust_result_of_qualified_name_lookup): New function.
* typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
accessing OFFSET_TYPEs directly.
2002-08-08 Mike Stump <mrs@apple.com>
* call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
(type_decays_to): Likewise.
* class.c (find_final_overrider): Likewise.
(maybe_note_name_used_in_class): Likewise.
* decl.c (current_tmpl_spec_kind): Likewise.
(add_binding): Likewise.
(push_class_binding): Likewise.
(duplicate_decls): Likewise.
(layout_var_decl): Likewise.
(grokfndecl): Likewise.
(grokdeclarator): Likewise.
(check_default_argument): Likewise.
* decl2.c (handle_class_head): Likewise.
* error.c (dump_template_decl): Likewise.
* init.c (build_offset_ref): Likewise.
* pt.c (check_specialization_scope): Likewise.
(determine_specialization): Likewise.
(check_explicit_specialization): Likewise.
(maybe_check_template_type): Likewise.
(process_partial_specialization): Likewise.
(check_default_tmpl_args): Likewise.
(push_template_decl_real): Likewise.
(convert_template_argument): Likewise.
(try_class_unification): Likewise.
(get_bindings_real): Likewise.
(do_decl_instantiation): Likewise.
* semantics.c (begin_function_definition): Likewise.
(finish_member_declaration): Likewise.
(check_multiple_declarators): Likewise.
* typeck.c (comp_array_types): Likewise.
(comptypes): Likewise.
(expr_sizeof): Likewise.
(build_binary_op): Likewise.
(dubious_conversion_warnings): Likewise.
(check_return_expr): Likewise.
2002-08-08 Mark Mitchell <mark@codesourcery.com>
* typeck.c (build_class_member_access_expr): Do not return
error_mark_node when no error has occurred.
2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
* typeck.c (build_component_addr): Remove.
(build_unary_op): Just check it's not a bitfield, and then build
an ADDR_EXPR.
2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
* class.c (convert_to_base): Correct check for error_mark_node.
(create_vtable_ptr): Remove unused VFUNS_P parm.
2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
* cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
2002-08-07 Mark Mitchell <mark@codesourcery.com>
Rework build_component_ref.
* call.c (build_vfield_ref): Do not go through build_component_ref.
(build_field_call): Use build_class_member_access_expr.
(build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
(build_object_call): Likewise.
* class.c (convert_to_base): New function.
(type_requires_array_cookie): Use BASELINK_FUNCTIONS.
(instantiate_type): Handle BASELINKs.
* cp-tree.def (BASELINK): New tree code.
* cp-tree.h (BASELINK_P): Reimplement.
(SET_BASELINK_P): Remove.
(BASELINK_BINFO): Reimplement.
(BASELINK_FUNCTIONS): Likewise.
(BASELINK_ACCESS_BINFO): Likewise.
(BASELINK_OPTYPE): Likewise.
(convert_to_base): New function.
(name_p): Likewise.
(build_object_ref): Remove.
(build_component_ref_1): Likewise.
(build_component_ref): Likewise.
(build_x_component_ref): Likewise.
(build_class_member_access_expr): New function.
(finish_class_member_access_expr): Likewise.
(build_ptrmemfunc_access_expr): Likewise.
* decl.c (grokdeclarator): Handle BASELINKs.
* decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
finish_class_member_access_expr.
(arg_assoc): Handle BASELINKs.
(do_class_using_decl): Likewise.
* error.c (dump_decl): Likewise.
(dump_expr): Use build_ptrmemfunc_access_expr.
* except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
destructors.
(build_throw): Use BASELINK_FUNCTIONS.
* init.c (perform_member_init): Use
build_class_member_access_expr.
(build_offset_ref): Handle BASELINKs. Use
build_class_member_access_expr.
* method.c (hack_identifier): Likewise.
* parse.y (do_id): Use BASELINK, not TREE_LIST.
(primary): Remove uses of build_object_ref.
* pt.c (lookup_template_function): Handle BASELINKs.
(resolve_overloaded_unification): Likewise.
* search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
(lookup_field): Use BASELINK, not TREE_LIST.
(lookup_fnfiels): Likewise.
(setup_class_bindings): Likewise.
* semantics.c (finish_object_call_expr): Do not use
build_method_call when we already know what function is being
called.
* spew.c (identifier_type): Use BASELINK, not TREE_LIST.
* tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
TREE_CHAIN.
(name_p): New function.
* typeck.c (build_object_ref): Remove.
(build_component_ref_1): Likewise.
(build_x_component_ref): Likewise.
(build_class_member_access_expr): New function.
(finish_class_member_access_expr): Likewise.
(build_ptrmemfunc_access_expr): Likewise.
(get_member_function_from_ptrfunc): Use
build_ptrmemfunc_access_expr.
(build_binary_op): Likewise.
(build_unary_op): Likewise.
(build_ptrmemfunc): Likewise.
(pfn_from_ptrmemfunc): Likewise.
* typeck2.c (build_m_component_ref): Adjust comment.
2002-08-07 Neil Booth <neil@daikokuya.co.uk>
* Make-lang.in (CXX_C_OBJS): Update.
* cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
* cp-tree.h (cxx_decode_option): Remove.
* decl2.c (compare_options, lang_f_options, unsupported_options,
cxx_decode_option): Remove.
2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
* typeck.c (build_x_unary_op): Handle pointer-to-member.
2002-08-05 Geoffrey Keating <geoffk@redhat.com>
* class.c: Don't include obstack.h.
(popclass):
* decl2.c: Delete bogus comment.
* error.c: Don't include obstack.h.
* except.c: Likewise.
(dump_type): Correct comment.
* method.c: Don't include obstack.h.
* tree.c: Likewise.
2002-08-04 Gabriel Dos Reis <gdr@nerim.net>
Fix PR/2213
* cvt.c (cp_convert_to_pointer): Reject conversions from integral
expressions to pointer-to-data-member of pointer-to-member-functions.
2002-08-04 Geoffrey Keating <geoffk@redhat.com>
* cvt.c (ocp_convert): Delete obsolete code.
* parse.y (permanent_obstack): Delete declaration.
* pt.c (permanent_obstack): Delete declaration.
* repo.c (permanent_obstack): Delete declaration.
(open_repo_file): Use xmalloc instead of permanent_obstack.
(init_repo): Use xstrdup instead of permanent_obstack.
2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (VF_DERIVED_VALUE): Remove.
* class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
PR 7470.
C++ ABI change - vfunc ordering.
* class.c (add_virtual_function): Remove.
(dfs_modify_all_vtables): Take list of all declared
virtuals. Assign all that are not in primary base.
(check_for_override): Adjust comments.
(create_vtable_ptr): Take single list of virtuals. Build chain
of declared virtuals here.
(layout_class_type): Take single list of virtuals. Adjust.
(finish_struct_1): Keep virtuals on single list. Adjust.
2002-08-02 Mark Mitchell <mark@codesourcery.com>
* init.c (build_member_call): Use build_new_method_call, not
build_method_call.
2002-08-02 Krister Walfridsson <cato@df.lth.se>
* Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
2002-08-02 Mark Mitchell <mark@codesourcery.com>
* call.c (build_method_call): Issue a more helpful error message
about ambiguous method names.
2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
* tree.c (build_shared_int_cst): Make cache file scope, and
GTY it.
2002-08-02 Jason Merrill <jason@redhat.com>
* cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
(cp_expr_size): New fn.
* call.c (build_over_call): Lose empty class hackery.
(convert_arg_to_ellipsis): Promote non-POD warning to error.
* typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
* semantics.c (expand_body): Do tree optimization in the function
context, too.
2002-08-01 Neil Booth <neil@daikokuya.co.uk>
* cp-tree.h: Move all warning and flag declarations to c-common.h.
* decl.c: Move all warning and flag variables to c-common.c.
* decl2.c: Move all warning and flag variables to c-common.c.
* lex.c (flag_digraphs): Remove.
(warn_traditional): Now in c-common.c.
2002-07-31 Mark Mitchell <mark@codesourcery.com>
* call.c (build_field_call): Do not look up the field by name.
(build_method_call): Simplify.
(struct z_candidate): Add access_path and conversion_path. Remove
basetype_path.
(convert_class_to_reference): Adjust use of
add_function_candidate.
(add_candidate): Add conversion_path argument.
(add_function_candidate): Use it.
(add_conv_dndidate): Likewise.
(build_builtin_candidate): Likewise.
(add_template_candidate_real): Add conversion_path argument.
(add_template_conv_candidate): Likewise.
(add_template_candidate): Likewise.
(build_user_type_conversion_1): Use it.
(build_new_function_call): Remove name lookup code. Adjust use of
add_template_candidate and add_function_candidate.
(build_new_op): Likewise.
(convert_like_real): Use build_special_member_call.
(build_over_call): Use cand->conversion_path.
(build_special_member_call): New method.
(build_new_method_call): Remove name lookup code.
* cp-tree.def (OFFSET_REF): Update documentation.
(TEMPLATE_ID_EXPR): Likewise.
* cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
(BASELINK_OPTYPE): Likewise.
(build_new_method_call): Adjust prototype.
(build_special_member_call): New method.
(build_baselink): New method.
(build_offset_ref_call_from_tree): Likewise.
(build_call_from_tree): Likewise.
(finish_qualified_call_expr): Remove.
(finish_call_expr): Adjust prototype.
(build_x_function_call): Remove.
* cvt.c (ocp_convert): Use build_special_member_call.
* decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
(build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
CALL_EXPR.
(build_offset_ref_call_from_tree): New function.
(build_call_from_tree): Likewise.
* init.c (expand_cleanup): Use build_special_member_call.
(expand_default_init): Likewise.
(build_member_call): Use finish_call_expr.
(build_new_1): Use build_special_member_call.
(push_base_cleanups): Likewise.
* method.c (do_build_assign_ref): Likewise.
* parse.y (template_id): Do not pass a COMPONENT_REF to
lookup_template_function.
(primary): Use parse_finish_call_epxr, not finish_call_expr.
(parse_finish_call_expr): New function.
* pt.c (lookup_template_function): Add assertions.
* search.c (lookup_base): Allow T to be a binfo.
(build_baselink): New function.
(lookup_member): Use it.
* semantics.c (finish_call_expr): Do not do name lookup.
(finish_object_call_expr): Remove #if 0'd code.
(finish_qualified_call_expr): Remove.
* typeck.c (build_x_function_call): Remove.
(build_static_case): Use build_special_member_call.
* typeck2.c (build_functional_cast): Likewise.
2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
* lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
2002-07-30 Gabriel Dos Reis <gdr@nerim.net>
* cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
2002-07-30 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
documentation.
2002-07-29 Alan Modra <amodra@bigpond.net.au>
* cp-tree.h: Comment typo fix.
2002-07-29 Richard Earnshaw <rearnsha@arm.com>
* spew.c (space_for_token): Allocate zeroed memory for a new token
chunk.
2002-07-27 Roger Sayle <roger@eyesopen.com>
* decl.c (builtin_function_1): No need to explicitly mark
BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
2002-07-27 Roger Sayle <roger@eyesopen.com>
* decl2.c (cxx_decode_option): Support -fno-builtin-foo.
2002-07-26 Jason Merrill <jason@redhat.com>
* call.c (build_over_call): Likewise.
(cp_convert_parm_for_inlining): New fn.
(convert_for_arg_passing): New fn.
(convert_default_arg, build_over_call): Use it.
(type_passed_as): New fn.
* pt.c (tsubst_decl): Use it.
* decl2.c (cp_build_parm_decl): New fn.
(build_artificial_parm): Use it.
(start_static_storage_duration_function): Likewise.
* decl.c (start_cleanup_fn, grokdeclarater): Likewise.
(grokparms): Don't mess with DECL_ARG_TYPE.
* typeck.c (convert_arguments): Use convert_for_arg_passing.
* cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
Define.
* cp-tree.h: Declare new fns.
2002-07-26 Neil Booth <neil@daikokuya.co.uk>
* cp-tree.h (flag_operator_names): Remove.
* decl2.c (flag_operator_names): Remove.
(lang_f_options): Remove operator-names.
* lex.c (D_OPNAME): Remove.
(reswords): Remove operator names.
(rid_to_yy): Remove operator names.
(init_reswords): No need to handle D_OPNAME.
* spew.c (read_process_identifier): There are no operator
names.
2002-07-26 Jason Merrill <jason@redhat.com>
* dump.c (cp_dump_tree): Call c_dump_tree.
* Make-lang.in (CXX_C_OBJS): Add c-dump.o.
2002-07-25 Neil Booth <neil@daikokuya.co.uk>
* error.c (print_whitespace): Remove.
* g++spec.c (LIBUNWIND): Move.
* mangle.c (mangled_position, write_signed_number): Remove.
2002-07-25 Neil Booth <neil@daikokuya.co.uk>
* decl2.c (cxx_decode_option): Similarly.
2002-07-25 Gabriel Dos Reis <gdr@nerim.net>
* cp-tree.h (cxx_sizeof_nowarn): Now a macro.
(cxx_sizeof_or_alignof_type): Take a third argument.
(cxx_sizeof): Adjust definition.
(cxx_alignof): Likewise.
* init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
* typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
complaining.
(c_sizeof_nowarn): Remove definition.
(build_unary_op): Use cxx_sizeof_nowarn.
2002-07-24 Geoffrey Keating <geoffk@redhat.com>
* tree.c (cp_build_qualified_type_real): When copying
pointer-to-method types, unshare the record that holds
the cached pointer-to-member-function type.
2002-07-23 Neil Booth <neil@daikokuya.co.uk>
* cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
2002-07-23 Gabriel Dos Reis <gdr@nerim.net>
Fix PR/7363:
* typeck.c (cxx_sizeof_or_alignof_type): New function.
(c_sizeof): Remove definition.
(expr_sizeof): Use cxx_sizeof.
* decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
* decl.c (finish_destructor_body): Use cxx_sizeof.
* semantics.c (finish_alignof): Likewise.
(finish_alignof): Use cxx_alignof.
* cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
(cxx_sizeof_or_alignof_type): Declare.
(my_friendly_assert): Move to ../c-common.h.
2002-07-23 Neil Booth <neil@daikokuya.co.uk>
* class.c, method.c, pt.c, search.c: Don't define obstack macros.
2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/7347, c++/7348
* cp-tree.h (tsubst_flags_t): Add tf_parsing.
* decl.c (make_typename_type): Use it.
(make_unbound_class_template): Likewise.
(lookup_name_real): Don't call type_access_control if scope is
template parameter dependent.
* parse.y (template_arg): Call make_unbound_class_template with
tf_parsing set.
(nest_name_specifier): Call make_typename_type with tf_parsing set.
(typename_sub0): Likewise.
(typename_sub1): Likewise.
(instantiate_decl): Push class scope.
* pt.c (regenerate_decl_from_template): Call pushclass and popclass
for both static variable and member function template.
(instantiate_decl) Call pushclass and popclass when tsubst'ing type
and arguments.
* search.c (type_access_control): Do type access for TEMPLATE_DECL
too.
2002-07-20 Roger Sayle <roger@eyesopen.com>
* decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
test by using positive_option. Make whitespace consistent.
2002-07-20 Gabriel Dos Reis <gdr@nerim.net>
* spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
members with 'locus'. Adjust use throughout.
(struct feed): Likewise.
(alloc_unparsed_test): Change prototype, take a 'const location_t *'.
Adjust use.
(snarf_defarg): Use error(), not error_with_file_and_line().
2002-07-19 Chris Demetriou <cgd@broadcom.com>
* lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
cpp_options is included.
2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/2862, c++/2863
* pt.c (determine_specialization): Compare the length of
TYPE_ARG_TYPES. Tidy.
2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/3797
* decl.c (duplicate_decls): Don't propagate inlining parameters from
olddecl to newdecl when newdecl is a specialization of the
instantiation olddecl.
2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/4802, c++/5387
* decl.c (make_typename_type): Use enforce_access.
2002-07-17 Scott Snyder <snyder@fnal.gov>
PR c++/7320
* rtti.c (get_tinfo_decl): Set DECL_COMDAT.
2002-07-12 Mark Mitchell <mark@codesourcery.com>
* class.c (add_method): Correct handling of conversion operators.
2002-07-11 Mark Mitchell <mark@codesourcery.com>
PR c++/7224
* class.c (add_method): Simplify.
2002-07-11 Jason Merrill <jason@redhat.com>
PR c++/7279
* tree.c (cp_copy_res_decl_for_inlining): Also copy
TREE_ADDRESSABLE.
2002-07-10 Graham Stott <graham.stott@btinternet.com>
* pt.c (template_parm_this_level_p, push_template_decl_real):
Pass depth as int pointer.
2002-07-11 Tim Josling <tej@melbpc.org.au>
Remove front end hard coding from gengtype.c.
* config-lang.in (gtfiles): Add files needed for this front end.
2002-07-10 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (unqualified_name_lookup_error): Declare it.
(begin_function_definition): Adjust prototype.
* lex.c (unqualified_name_lookup_error): New function, split out
from ...
(do_identifier): ... here.
* parse.y (parse_begin_function_definition): New function.
(fn.def1): Use it.
* semantics.c (begin_function_definition): Accept decl-specifiers
and attributes as separate parameters.
2002-07-10 Jason Merrill <jason@redhat.com>
PR c++/6255
* decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
modifying the old one.
2002-07-09 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (constructor_name_p): Declare it.
(check_template_template_default_arg): Likewise.
* class.c (handle_using_decl): Use constructor_name_p.
* decl.c (grokdeclarator): Likewise.
* decl2.c (constructor_name_p): Define it.
* init.c (build_member_call): Use constructor_name_p.
* parse.y (template_parm): Use check_template_template_default_arg.
* pt.c (check_explicit_specialization): Use constructor_name_p.
* semantics.c (check_template_template_default_arg): New function.
2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* pt.c (can_complete_type_without_circularity): Add static to
function definition.
2002-07-08 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (have_extern_spec): Declare it
* decl.c (have_extern_spec): Define it.
(start_decl): Eliminate use of used_extern_spec.
(start_function): Likewise.
* parse.y (have_extern_spec): Remove declaration.
(used_extern_spec): Likewise.
(frob_specs): Eliminate use of used_extern_spec.
(.hush_warning): Likewise.
2002-07-07 Mark Mitchell <mark@codesourcery.com>
* Make-lang.in (cp/parse.o): Depend on decl.h.
* cp-tree.h (do_decl_instantiation): Change prototype.
* parse.y: Include decl.h.
(parse_decl_instantiation): New function.
(explicit_instantiation): Use it.
* pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
and DECLSPECS.
2002-07-07 Roger Sayle <roger@eyesopen.com>
* error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
constructor and destructor tests when passed a TEMPLATE_DECL.
2002-07-05 Jason Merrill <jason@redhat.com>
* cvt.c (cp_convert_to_pointer): Call force_fit_type for null
pointers.
PR optimization/7145
* tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
Repair damage on weak-impared targets caused by my previous patch.
* cp-tree.h (import_export_tinfo): Add parameter.
* decl2.c (import_export_tinfo): Add parameter, post adjust
DECL_COMDAT.
* rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
import_export_tinfo.
2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/6944
* init.c (build_aggr_init): Remove qualifiers of init before calling
build_vec_init.
(build_vec_init): Flatten multi-dimensional array during cleanup.
(build_vec_delete_1): Abort if the type of each element is array.
2002-07-03 Graham Stott <graham.stott@btinternet.com>
* pt.c (instantiate_class_template): Fix typo.
2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
by CVS conflict in my last patch.
2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/6716
* pt.c (can_complete_type_without_circularity): New function.
(instantiate_class_template): Use it.
* typeck2.c (cxx_incomplete_type_diagnostic): Improve error
message due to incomplete fields.
2002-07-01 Mark Mitchell <mark@codesourcery.com>
PR c++/7112
* mangle.c (write_expression): Add mangling for sizeof when
applied to a type.
* operators.def: Remove stale comment.
2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
(CPTI_TYPE_INFO_PTR_TYPE): ... this.
(tinfo_decl_type): Replace with ...
(type_info_ptr_type): ... this.
(import_export_tinfo): Declare.
(tinfo_decl_p): Rename to ...
(unemitted_tinfo_decl_p): ... this.
* decl2.c (import_export_decl): Break out tinfo handling into ...
(import_export_tinfo): ... here. New function.
(finish_file): Adjust.
* rtti.c (TINFO_REAL_NAME): New macro.
(init_rtti_processing): Create the tinfo types.
(get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
(get_tinfo_decl): Adjust.
(get_tinfo_ptr): New function.
(get_type_id): Use it.
(tinfo_base_init): Create vtable decl here, if it doesn't exist.
(ptr_initializer): Use get_tinfo_ptr.
(ptm_initializer): Likewise.
(synthesize_tinfo_var): Break into ...
(get_pseudo_ti_init): ... this. Just create the initializer.
(get_pseudo_ti_desc): .. and this.
(create_real_tinfo_var): Remove.
(create_pseudo_type_info): Don't create the vtable decl here.
(get_vmi_pseudo_type_info): Remove.
(create_tinfo_types): Adjust.
(tinfo_decl_p): Rename to ...
(unemitted_tinfo_decl_p): ... here. Adjust.
(emit_tinfo_decl): Adjust. Create the initializer.
2002-06-27 Mark Mitchell <mark@codesourcery.com>
PR c++/6695
* pt.c (tsubst_friend_class): Substitute into the context of the
friend before using it.
2002-06-26 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (xref_tag): Change prototype.
(handle_class_head): Likewise.
(build_x_component_ref): Likewise.
* decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
(xref_tag): Take attributes as a separate parameter.
(xref_tag_from_type): Adjust call to xref_tag.
* decl2.c (build_expr_from_tree): Adjust call to
build_x_component_ref.
(handle_class_head): Take attributes as a separate parameter.
* parse.y (parse_xref_tag): New function.
(parse_handle_class_head): Likewise.
(primary): Use parse_xref_tag.
(class_head_decl): Use parse_handle_class_head.
(class_head_defn): Likewise.
* rtti.c (init_rtti_processing): Adjust call to xref_tag.
(build_dynamic_cast_1): Likewise.
(create_pseudo_type_info): Likewise.
(emit_support_tinfos): Likewise.
* typeck.c (build_object_ref): Adjust call to
build_x_component_ref.
(build_x_component_ref): Remove protect parameter.
2002-06-25 Mark Mitchell <mark@codesourcery.com>
* call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
* class.c (handle_using_decl): Likewise.
(instantiate_type): Likewise.
* cp-tree.h (BASELINK_FUNCTIONS): New macro.
(xref_basetypes): Change prototype.
(begin_mem_initializers): New function.
(get_overloaded_fn): Likewise.
* decl.c (xref_basetypes): Simplify.
* error.c (dump_expr): Use BASELINK_FUNCTIONS.
* init.c (build_offset_ref): Likewise.
* parse.y (base_init): Use begin_mem_initializers().
(structsp): Adjust call to xref_basetypes.
* pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
(instantiate_class_template): Adjust call to xref_basetypes.
* semantics.c (begin_mem_initializers): New function.
* tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
(really_overloaded_fn): Likewise.
(get_overloaded_fn): New function.'
(get_first_fn): USe BASELINK_FUNCTIONS.
2002-06-24 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (SCALAR_TYPE_P): New macro.
(check_for_out_of_scope_variable): New function.
(at_class_scope_p): Likewise.
(finish_fname): Likewise.
* class.c (finish_struct): Use at_function_scope_p.
* decl.c (check_for_out_of_scope_variable): New function, split
out from do_identifier.
(finish_enum): Use at_function_scope_p.
* lex.c (do_identifier): Use check_for_out_of_scope_variable.
* parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
(primary): Use at_function_scope_p.
* search.c (at_class_scope_p): New function.
* semantics.c (finish_fname): Likewise.
(check_multiple_declarators): Use at_function_scope_p.
2002-06-23 Mark Mitchell <mark@codesourcery.com>
* parse.y (parse_scoped_id): New function.
(primary): Use it.
* cp-tree.h (do_scoped_id): Adjust declaration.
* lex.c (do_scoped_id): Remove call to yylex.
* decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
* typeck2.c (add_exception_specifier): Use tree_cons, rather than
expanding it inline.
2002-06-23 Matt Thomas <matt@3am-software.com>
* decl.c (finish_function): Change "#ifdef VMS_TARGET" to
"#if VMS_TARGET".
2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* mangle.c (integer_type_codes): Const-ify.
2002-06-20 Richard Henderson <rth@redhat.com>
PR c++/6747
* typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
Call put_var_into_stack.
2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
array size calculation.
2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/6892
* pt.c (tsubst_expr): Handle FILE_STMT.
2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/6723
* pt.c (lookup_template_class): Don't build complete argument of
BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
argument.
2002-06-19 Akim Demaille <akim@epita.fr>
* parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
decl.h's TYPENAME.
* spew.c, lex.c: Adjust.
* parse.y (explicit_instantiation): Add empty action to override
the default $$ = $1 where it introduces a type clash.
2002-06-14 Jason Merrill <jason@redhat.com>
* semantics.c (begin_for_stmt): Push the 'for' scope before
adding the FOR_STMT.
C++ ABI changes.
* class.c (build_base_field): Set DECL_PACKED.
(layout_class_type): Don't use tail padding of PODs.
* mangle.c (write_unqualified_name): Fix template conversion op
mangling.
2002-06-16 Richard Henderson <rth@redhat.com>
PR opt/6793
* tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
after template instantiation.
2002-06-16 Richard Henderson <rth@redhat.com>
* cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
* cp-tree.h (compiler_error): Remove declaration.
* lex.c (compiler_error): Remove definition.
2002-06-14 Steve Ellcey <sje@cup.hp.com>
* g++spec.c (LIBUNWIND): New.
(lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
2002-06-13 Jessica Han <jessica@cup.hp.com>
* class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
(build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
(build_vbase_offset_vtbl_entries): Likewise.
* rtti.c (build_headof): Likewise.
(get_tinfo_decl_dynamic): Likewise.
(create_pseudo_type_info): Likewise.
2002-06-12 Stan Shebs <shebs@apple.com>
* mpw-config.in: Remove file, no longer used.
* mpw-make.sed: Ditto.
2002-06-07 Zack Weinberg <zack@codesourcery.com>
* decl2.c: Update call to cpp_handle_option.
2002-06-07 H.J. Lu (hjl@gnu.org)
* decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
* error.c (cp_error_at): Fix typo.
2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
* error.c (cp_diagnostic_starter): Adjust call.
(maybe_print_instantiation_context): Change prototype to take a
'diagnostic_info *'.
(print_instantiation_full_context): Likewise.
(print_instantiation_partial_context): Likewise.
(cp_diagnostic_starter): Likewise.
(cp_diagnostic_finalizer): Likewise.
(cp_print_error_function): Likewise.
(cp_printer): Take a secondary parameter as a 'text_info *'.
Remove output_state savings. Adjust calls.
2002-06-03 Geoffrey Keating <geoffk@redhat.com>
* pt.c (inline_parm_levels): Mark for GC.
* mangle.c (start_mangling): Allocate G.substitutions here...
(init_mangle): ... rather than here.
(finish_mangling): Clear the varray pointer when done with it.
* spew.c (yylexstring): Don't use VARRAY_FREE.
* search.c (bfs_walk): Don't use VARRAY_FREE.
* decl2.c (pending_statics): Use gengtype to mark.
(deferred_fns): Likewise.
(ssdf_decls): Likewise.
(init_decl2): Delete.
* decl.c (pop_from_top_level): Don't use VARRAY_FREE.
(cxx_init_decl_processing): Don't call init_decl2.
(cxx_pop_function_context): Don't use VARRAY_FREE.
* cp-tree.h (struct saved_scope): No need for special marking
of varrays.
(struct language_function): Likewise.
(local_classes): Use gengtype to mark.
(init_decl2): Delete prototype.
* class.c (init_class_processing): Don't use
ggc_add_tree_varray_root.
(build_vtbl_initializer): Don't use VARRAY_FREE.
* decl.c (typename_compare): Don't use same_type_p.
* decl.c: Include hashtab.h instead of hash.h.
(typename_hash): Update to use htab_h.
(typename_compare): Likewise.
(typename_htab): Use gengtype to mark.
(build_typename_type): Update to use htab_h.
* Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
* Make-lang.in (gt-cp-tree.h): New rule.
(cp/tree.o): Depend on gt-cp-tree.h.
* config-lang.in (gtfiles): Add cp/tree.c.
* tree.c: Include gt-cp-tree.h.
(list_hash_table): Use gengtype to mark.
(init_tree): Use gengtype to mark trees.
* Make-lang.in (cp/decl.o): Add debug.h dependency.
* call.c (struct z_candidate): Use gengtype.
(USER_CONV_CAND): Use WRAPPER_ZC.
(convert_class_to_reference): Use build_zc_wrapper.
(build_type_conversion_1): Likewise.
(build_over_call): Use WRAPPER_ZC.
(add_warning): Use build_zc_wrapper.
* cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
* cp-tree.h (struct lang_identifier): Use gengtype.
(struct template_parm_index_s): Likewise.
(struct ptrmem_cst): Likewise.
(struct tree_binding): Likewise.
(struct tree_overload): Likewise.
(struct tree_srcloc): Likewise.
(struct tree_wrapper): Likewise. Also modify to have a pointer
to struct z_candidate rather than void.
(enum cp_tree_node_structure_enum): New.
(union lang_tree_node): New.
(cxx_mark_tree): Delete prototype.
(cp_tree_node_structure): New prototype.
(build_ptr_wrapper): Delete prototype.
(build_int_wrapper): Delete prototype.
(build_zc_wrapper): New prototype.
* decl.c: Include debug.h
(cxx_mark_tree): Delete.
(cp_tree_node_structure): New.
* tree.c (build_ptr_wrapper): Delete.
(build_int_wrapper): Delete.
(build_zc_wrapper): New.
* cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
Correct typo. Patch from k_fukui@highway.ne.jp.
* semantics.c (current_stmt_tree): Update for change to
struct language_function.
(finish_mem_initializers): Likewise.
* decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
* cp-tree.h (struct language_function): Rename from
cp_language_function. Change all uses.
(cp_function_chain): Don't need to cast.
* class.c (duplicate_tag_error): Reset discriminator.
(check_bases_and_members): Update for data structure changes.
* cp-tree.h (struct lang_id2): Use gengtype.
(flagged_type_tree): Likewise.
(SET_LANG_ID): Use GGC on struct lang_id2.
(struct cp_language_function): Use gengtype. Remove field
'x_vcalls_possible_p'.
(current_vcalls_possible_p): Delete.
(struct lang_type_header): New.
(struct lang_type_class): Rename from struct lang_type. Include
struct lang_type_header.
(struct lang_type_ptrmem): New.
(struct lang_type): New.
(LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
(LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
(TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
(struct lang_decl_flags): Use gengtype. Add discriminators.
(struct lang_decl): Use gengtype. Add and use discriminators.
Update the macros that reference moved fields.
(LANG_DECL_U2_CHECK): New function. Use it when appropriate.
(SET_DECL_THUNK_P): Set discriminator too.
(clear_inline_text_obstack): Delete prototype.
(finish_inline_definitions): Delete prototype.
(mark_pending_inlines): Delete prototype.
(lang_check_failed): New prototype.
* decl.c (struct named_label_use_list): Use gengtype.
(struct named_label_list): Likewise.
(mark_binding_level): Delete.
(mark_named_label_lists): Delete.
(push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
(cxx_init_decl_processing): Use generated marker routine.
(begin_destructor_body): Delete dead set to
current_vcalls_possible_p.
(mark_lang_function): Delete.
(mark_cp_function_context): Delete.
(lang_mark_tree): Use generated marker routines.
* decl2.c (start_objects): Set discriminator when setting
GLOBAL_INIT_PRIORITY.
* lex.c (retrofit_lang_decl): Set discriminators.
(copy_lang_type): Update for changes to lang_type structure.
(cp_make_lang_type): Set discriminator.
* parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
* search.c: Include ggc.h.
* semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
(finish_inline_definitions): Delete.
* spew.c (struct token): Use gengtype.
(struct token_chunk): New.
(struct unparsed_text): Use gengtype. Store tokens in chunks.
(struct feed): Use gengtype.
(feed_obstack): Delete.
(feed): Mark as GC root.
(pending_inlines): Mark as GC root.
(pending_inlines_tail): Likewise.
(processing_these_inlines): Likewise.
(token_obstack): Make static.
(first_token): Likewise.
(init_spew): Don't initialize deleted things; use gengtype for roots.
(clear_inline_text_obstack): Delete.
(feed_input): Use GC for struct feed. Update for changes to
struct unparsed_text.
(mark_pending_inlines): Delete.
(next_token): Rename from add_token. Change all callers. Update
for changes to struct unparsed_text.
(space_for_token): New.
(remove_last_token): New.
(alloc_unparsed_text): New.
(snarf_block): Take an unparsed_text. Update for changes to struct
unparsed_text.
(snarf_method): Update for changes to struct unparsed_text.
(snarf_defarg): Update for changes to struct unparsed_text.
* tree.c (lang_check_failed): New.
* Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
(cp/spew.o): Add dependency on gt-<filename>.h.
(cp/decl2.o): Add dependency on gt-<filename>.h.
(cp/call.o): Add dependency on gt-<filename>.h.
(cp/pt.o): Add dependency on gt-<filename>.h.
(cp/repo.o): Add dependency on gt-<filename>.h.
(cp/parse.o): Add dependency on gt-<filename>.h.
* call.c: Use gengtype for roots.
* config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
decl2.c parse.y pt.c repo.c spew.c.
* cp-tree.h: Use gengtype for roots.
(struct saved_scope): Use GGC, gengtype.
(cp_parse_init): Delete prototype.
(init_pt): Delete prototype.
* decl.c: Use gengtype for roots.
(mark_saved_scope): Delete.
(cxx_init_decl_processing): Don't call deleted initilisation
routines.
(signed_size_zero_node): Delete, unused.
* decl.h: Use gengtype for roots.
* decl2.c: Use gengtype for roots.
* lex.h: Use gengtype for roots.
* parse.y: Use gengtype for roots.
(cp_parse_init): Delete.
* pt.c: Use gengtype for roots.
(init_pt): Delete.
* repo.c: Use gengtype for roots.
* spew.c: Use gengtype for roots.
* Make-lang.in: Allow for filename changes. Add gtype-cp.h.
(cp/decl.o): Add dependency on gtype-cp.h.
* decl.c: Remove use of add_deletable_root, use GTY marker instead.
Include gtype-cp.h. Allow for filename changes.
* Make-lang.in (cp/gt-decl.h): Generate using gengtype.
(cp/decl.o): Add cp/gt-decl.h dependency.
* config-lang.in (gtfiles): New.
* tree.h: Rename struct binding_level to struct cp_binding_level.
* decl.c: Rename struct binding_level to struct cp_binding_level.
Include cp/gt-decl.h.
(struct cp_binding_level): Use gengtype.
(make_binding_level): Use GGC on struct cp_binding_level.
(mark_binding_level): Use gt_ggc_m_cp_binding_level.
(cxx_init_decl_processing): Mark free_binding_level as
deletable.
* decl.c (mark_cp_function_context): Update calling sequence.
* decl.c (start_function): Don't free 'struct
cp_language_function'.
(pop_cp_function_context): Likewise.
(save_function_data): Allocate it using GC.
* semantics.c (genrtl_start_function): Don't free 'struct
cp_language_function'.
2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
* lang-specs.h: Use cpp_debug_options.
2002-05-28 Zack Weinberg <zack@codesourcery.com>
* mangle.c, tree.c: Include real.h.
* Make-lang.in: Update dependency lists.
2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
* lex.c: Don't include c-lex.h.
* parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
* spew.c (yyungetc, snarf_block): Remove indent_level handling.
2002-05-22 Richard Henderson <rth@redhat.com>
* decl.c (obscure_complex_init): Check for VAR_DECL
before using DECL_THREAD_LOCAL.
2002-05-22 Richard Henderson <rth@redhat.com>
* decl.c (check_tag_decl): Handle RID_THREAD.
(obscure_complex_init): Reject run-time init of tls.
(grokvardecl, grokdeclarator): Handle RID_THREAD.
* lex.c (reswords): Add __thread.
(rid_to_yy): Map RID_THREAD to SCSPEC.
2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
* cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
* cp-tree.h (cxx_post_options): Kill.
* cp-lex.c (cxx_post_options): Kill.
2002-05-21 Richard Henderson <rth@redhat.com>
* lex.c (rid_to_yy): Add RID_THREAD.
2002-05-21 Alexandre Oliva <aoliva@redhat.com>
* init.c (build_vec_init): Test for trivial copy-assignment when
copy-assigning arrays.
2002-05-20 Andreas Jaeger <aj@suse.de>
* init.c (build_default_init): Remove unused variable.
2002-05-20 Alexandre Oliva <aoliva@redhat.com>
* call.c (any_strictly_viable): New.
(build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/186, DR 259
* pt.c (do_decl_instantiation): Don't complain explicit
instantiation after explicit specialization.
(do_type_instantiation): Likewise.
2002-05-19 Alexandre Oliva <aoliva@redhat.com>
* cp-tree.h (complete_type_or_diagnostic): Changed prototype,
renamed from...
(complete_type_or_else): ... this. Redefined as macro.
(cxx_incomplete_type_diagnostic): Declare.
(cxx_incomplete_type_error): Define as macro.
* init.c (build_delete): Warn about incomplete types other than
void, and use the built-in operator delete for them.
* typeck.c (complete_type_or_diagnostic): Renamed from
complete_type_or_else. Added warn_only argument, passed to...
* typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
warnings or errors depending on new warn_only argument. Renamed
from...
(cxx_incomplete_type_error): ... this. New implementation in
terms of cxx_incomplete_type_diagnostic.
2002-05-18 Jason Merrill <jason@redhat.com>
PR c++/6611
* decl2.c (import_export_decl): If we clear
DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/6620
* pt.c (verify_class_unification): Don't check if PARM is template
parameter dependent. Simplify.
(unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
parameter dependent expression.
2002-05-14 Jason Merrill <jason@redhat.com>
* rtti.c (get_tinfo_decl): Don't call comdat_linkage.
Do set DECL_COMDAT.
(synthesize_tinfo_var): Take the public decl.
(create_real_tinfo_var): Likewise. Check DECL_COMDAT.
(emit_tinfo_decl): Adjust. Call import_export_decl.
* decl2.c (import_export_decl): Simplify tinfo decl handling.
2002-05-14 Alexandre Oliva <aoliva@redhat.com>
* cp-tree.h (struct lang_type): Added non_zero_init.
(CLASSTYPE_NON_ZERO_INIT_P): New macro.
(zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
* class.c (check_field_decls): Test non_zero_init.
* cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
zero-to-NULL conversions.
* decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
type that needs zero-initialization without zeros.
(check_initializer_decl): Compute zero-initializer for types
that require a non-trivial one.
* init.c (build_forced_zero_init): New function.
(build_default_init): Use it.
* tree.c (zero_init_p): New function.
* typeck2.c (force_store_init_value): New function.
(process_init_constructor): Create non-trivial zero-initializers
for array members and class fields.
2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
* lang-specs.h: Remove redundant -lang-c++.
2002-05-13 Jason Merrill <jason@redhat.com>
* class.c (build_vtbl_ref_1): Use fixed_type_or_null.
(fixed_type_or_null): See through reference vars.
(build_base_path): Vtable contents are constant.
* typeck.c (get_member_function_from_ptrfunc): Likewise.
2002-05-12 Jason Merrill <jason@redhat.com>
* cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
structs are safe.
2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
* cp-tree.h (flag_ansi): Remove.
* decl2.c (flag_ansi): Remove.
(cxx_decode_option): Set flag_iso and flag_undef.
2002-05-09 Jason Merrill <jason@redhat.com>
* typeck.c (get_member_function_from_ptrfunc): Reorganize.
Use subtraction rather than a bitmask to get the index.
* cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
* pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
* Make-lang.in (decl2.o): Update.
* cp-tree.h (warn_multichar): Remove.
* decl2.c: Include c-common.h.
(warn_multichar): Remove.
2002-05-03 Jason Merrill <jason@redhat.com>
* tree.c (build_cplus_array_type): Only const and volatile get
special handling.
* decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
2002-04-30 Mark Mitchell <mark@codesourcery.com>
ABI change, returning simple classes from functions.
* class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
TYPE_HAS_TRIVIAL_INIT_REF is false or
TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
2002-04-30 Jason Merrill <jason@redhat.com>
PR debug/6436
* decl.c (grokdeclarator): Don't override TYPE_NAME of an
anonymous class with a typedef if there are attributes.
2002-04-29 Paul Eggert <eggert@twinsun.com>
* parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
2002-04-29 Jakub Jelinek <jakub@redhat.com>
PR c++/6477
* decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
non-NULL first.
2002-04-29 Mark Mitchell <mark@codesourcery.com>
PR c++/6492
* pt.c (tsubst_friend_class): If the friend has an explicit scope,
enter that scope before name lookup.
PR c++/6486
* method.c (do_build_copy_constructor): Avoid building
cv-qualified reference types.
2002-04-29 Nathan Sidwell <nathan@codesourcery.com>
PR c++/5719
* decl.c (grok_op_properties): Assignment ops don't have to return
by value. operator% should.
2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
PR c/6343
* decl.c (duplicate_decls): Call merge_weak.
2002-04-26 Richard Henderson <rth@redhat.com>
* parse.y (malloced_yyss, malloced_yyvs): New.
(yyoverflow): Re-add. Set them.
(free_parser_stacks): New.
2002-04-26 Mark Mitchell <mark@codesourcery.com>
PR c++/6497
* method.c (do_build_assign_ref): Pass a derivation to
build_method_call when calling base class assignment operators.
2002-04-26 Richard Henderson <rth@redhat.com>
* parse.y (yyoverflow): Revert.
2002-04-26 Richard Henderson <rth@redhat.com>
PR c/3581
* parse.y (string): Remove. Update all uses to use STRING
instead, and not call combine_strings.
* rtti.c (tinfo_name): Use fix_string_type.
* semantics.c (finish_asm_stmt): Don't call combine_strings.
* spew.c (yylexstring): New.
(read_token): Use it.
2002-04-25 Richard Henderson <rth@redhat.com>
PR c/2161
* parse.y (yyoverflow): New.
2002-04-25 Jason Merrill <jason@redhat.com>
PR c++/5607
* search.c (check_final_overrider): No longer static.
* class.c (update_vtable_entry_for_fn): Call it.
* cp-tree.h: Adjust.
2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
* cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
* cp-tree.h (cxx_set_yydebug): Die.
* lex.c (YYDEBUG): Get from c-lex.h.
(cxx_set_yydebug): Remove.
* parse.y: Include c-lex.h.
(YYDEBUG): Get from c-lex.h.
2002-04-24 Mark Mitchell <mark@codesourcery.com>
PR c++/6438.
* cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
void.
2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
* cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
Redefine.
* cp-tree.h (cp_attribute_table): Rename.
* decl.c (lang_attribute_table): Remove declaration.
(cxx_init_decl_processing): Don't set it.
* tree.c (cp_attribute_table): Rename.
2002-04-24 Jason Merrill <jason@redhat.com>
PR c++/6331
* method.c (do_build_copy_constructor): Use cp_build_qualified_type.
* typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
The pedwarn for array assignment is now unconditional.
* tree.c (build_cplus_array_type_1): Still process simple array types
normally in templates.
PR c++/6395
* decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
stuff for comdats.
2002-04-23 Jakub Jelinek <jakub@redhat.com>
* parse.y (check_class_key): Allow KEY to be union/enum/struct/class
node with attributes.
2002-2-23 David O'Brien <obrien@FreeBSD.org>
* g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
2002-04-23 Mark Mitchell <mark@codesourcery.com>
PR c++/6256:
* pt.c (tsubst_friend_class): Handle templates with explicit
nested names.
PR c++/6331:
* typeck.c (merge_types): Remember the cv-qualification of pointer
types when merging them.
2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
* cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
* cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
cxx_mark_function_context): New.
* decl.c (push_cp_function_context, pop_cp_function_context,
mark_cp_function_context): Rename for consistency.
(cxx_init_decl_processing): Don't set old hooks.
2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
* call.c (convert_type_from_ellipsis): Rename, update.
* cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
* cp-tree.h (convert_type_from_ellipsis): Rename.
* decl.c (cxx_init_decl_processing): Don't set hook.
2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
* call.c (build_new_method_call): Update.
* cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
* cp-tree.h (cxx_incomplete_type_error): New.
* decl.c (grokdeclarator, grokparms): Update.
* decl2.c (check_classfn): Update.
* pt.c (tsubst): Update.
* typeck.c (complete_type_or_else, expr_sizeof,
decay_conversion): Update.
* typeck2.c (incomplete_type_error): Rename.
(add_exception_specifier): Update.
2002-04-18 Jason Merrill <jason@redhat.com>
PR c++/5658
* search.c (setup_class_bindings): A class template qualifies as a
type binding.
2002-04-17 Jakub Jelinek <jakub@redhat.com>
PR c++/6316
* decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
before expanding.
2002-04-16 Mark Mitchell <mark@codesourcery.com>
* init.c (begin_init_stmts): Remove commented out code.
(finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
* semantics.c (begin_gobal_stmt_expr): Adjust call to
expand_start_stmt_expr.
2002-04-15 Mark Mitchell <mark@codesourcery.com>
* decl.c (register_dtor_fn): Pass the address of dso_handle, not
dso_handle itself, to __cxa_atexit.
2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
* error.c (cxx_print_error_function): Adjust call to macros.
2002-04-14 Jakub Jelinek <jakub@redhat.com>
* class.c (layout_virtual_bases): Do all dsize computation on trees.
2002-04-14 Jason Merrill <jason@redhat.com>
* typeck.c (get_member_function_from_ptrfunc): Don't do
gratuitious division and multiplication on
ptrmemfunc_vbit_in_delta targets.
2002-04-12 Mark Mitchell <mark@codesourcery.com>
PR c++/5373.
* semantics.c (finish_expr_stmt): Remember the type of the
expression before any conversions are performed.
2002-04-12 Mark Mitchell <mark@codesourcery.com>
PR c++/5189.
* call.c (add_template_candidate_real): Do not treat member
templates as copy constructors.
2002-04-12 Mark Mitchell <mark@codesourcery.com>
* decl.c (duplicate_decls): Do not copy the RTL for a variable
declaration if the old variable had an incomplete type and the new
variable does not.
(complete_vars): Do not call layout_decl for completed variables.
2002-04-12 Richard Sandiford <rsandifo@redhat.com>
* decl.c (duplicate_decls): Don't try to unify an implicit typedef
with an explicit one.
(follow_tag_typedef): New.
(lookup_tag): Use it to extract the tag of an explicit typedef.
(xref_tag): Likewise.
2002-04-11 Andrew Haley <aph@redhat.com>
* typeck.c (type_after_usual_arithmetic_conversions):
If two types have the same variant, return immediately.
When two floating-point operands are the same precision:
convert to float if one of the operands is float;
if neither operand is one of the standard types, return the type
of the first operand.
2002-04-10 Nathan Sidwell <nathan@codesourcery.com>
PR c++/5507
* decl.c (make_typename_type): Remove implicit typenameness.
2002-04-09 Jason Merrill <jason@redhat.com>
PR optimization/6189
* semantics.c (genrtl_start_function): Don't free
DECL_SAVED_FUNCTION_DATA for inline functions.
* init.c (build_member_call): For now, don't convert to
intermediate base if it would cause an error.
2002-04-08 Paolo Carlini <pcarlini@unitus.it>
* parse.y (namespace_qualifier, maybe_identifier,
begin_explicit_instantiation, end_explicit_instantiation,
apparent_template_type, .finish_template_type,
do_id, maybe_init, defarg_again, component_decl_1):
Add ending ';', in accordance with POSIX.
2002-04-06 Mark Mitchell <mark@codesourcery.com>
PR c++/5571
* class.c (layout_class_type): Remember incomplete static
variables.
(finish_struct_1): Call complete_vars, not
hack_incomplete_structures.
* cp-tree.h (hack_incomplete_structures): Rename to ...
(complete_vars): ... this.
(struct saved_scope): Remove incomplete.
(namespace_scope_incomplete): Remove.
* decl.c (struct binding_level): Remove incomplete.
(incomplete_vars): New variable.
(mark_binding_level): Don't mark incomplete.
(print_binding_level): Don't print it.
(mark_saved_scope): Don't mark incomplete.
(pushdecl): Use maybe_register_incopmlete_var.
(cxx_init_decl_processing): Register incomplete_vars for GC.
(start_decl_1): Clarify error message.
(hack_incomplete_vars): Remove.
(maybe_register_incomplete_var): New function.
(complete_vars): Likewise.
2002-04-06 Jason Merrill <jason@redhat.com>
PR c++/4934
* error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
set before checking it.
PR c++/525
* init.c (build_member_call): Use build_scoped_ref.
(resolve_offset_ref): Likewise.
* call.c (build_scoped_method_call): Likewise.
* tree.c (maybe_dummy_object): Kludge around current_class_type being
wrong.
* typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
* cp-tree.h: Adjust.
* init.c (push_base_cleanups): Just use build_scoped_method_call.
PR c++/6179
* method.c (implicitly_declare_fn): Pass unqualified type to
synthesize_exception_spec.
2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
* cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
* cvt.c: Update comment.
* init.c (expand_cleanup_for_base): Update.
* semantics.c (finish_parenthesized_expr): Update.
* typeck.c (cp_truthvalue_conversion): Update.
2002-04-04 Jason Merrill <jason@redhat.com>
* semantics.c (finish_eh_cleanup): New fn.
* cp-tree.h: Add prototype.
* init.c (perform_member_init, expand_cleanup_for_base): Use
finish_eh_cleanup.
* cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
* cp-tree.h: Remove references.
* decl.c (begin_constructor_body, end_constructor_body): Likewise.
* dump.c (cp_dump_tree): Likewise.
* pt.c (tsubst_expr): Likewise.
* semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
(cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
* tree.c (cp_statement_code_p): Likewise.
* init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
PR c++/5636
* semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
cleanup for nrv.
PR c++/5104
* typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
specifiers.
[METHOD_TYPE]: Use same code as FUNCTION_TYPE.
2002-04-03 Richard Henderson <rth@redhat.com>
* cp-lang.c (cxx_warn_unused_global_decl): New.
(LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
* cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
* tree.c (init_tree): Don't set hook.
2002-04-03 Roger Sayle <roger@eyesopen.com>
PR c++/5998:
* decl.c (duplicate_decls): Don't mess with assembler names when
redeclaring builtin functions as static.
2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
* call.c (build_addr_func): Update.
* class.c (resolve_address_of_overloaded_function): Update.
* cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
* cp-tree.h (cxx_mark_addressable): New.
* decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
* decl2.c (build_cleanup): Update.
* except.c (build_throw): Update.
* init.c (resolve_offset_ref): Update.
* pt.c (convert_nontype_argument): Update.
* semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
* typeck.c (decay_conversion, build_array_ref, build_unary_op,
unary_complex_lvalue): Update.
(mark_addressable): Rename.
2002-04-01 Roger Sayle <roger@eyesopen.com>
PR c++/5998:
* decl.c (duplicate_decls): Overwrite the RTL when (and only
when) overwriting a built-in function. Don't use COPY_DECL_RTL,
but follow the SET_DECL_RTL idiom used elsewhere in the function.
2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
* cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
* decl.c (grokdeclarator): Update.
* mangle.c (write_integer_cst): Update.
* typeck.c (build_binary_op): Update.
2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
* cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
* lex.c (cxx_init): Don't set hook.
2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
* Make-lang.in (error.o): Update.
* cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
* cp-tree.h (struct diagnostic_context): Predeclare.
(cxx_print_error_function): New.
* error.c: Include langhooks-def.h.
(lang_print_error_function): Rename. Update.
(init_error): Don't set hook.
2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
* cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
Redefine.
* cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
* decl.c (finish_enum): Similarly.
* error.c (dump_type): Similarly.
* lex.c (cxx_init): Similarly.
* mangle.c (write_builtin_type): Similarly.
* typeck.c (comptypes): Similarly.
2002-03-28 Roger Sayle <roger@eyesopen.com>
PR c++/5998:
* decl.c (cxx_init_decl_processing): Re-enable built-in functions
in the g++ front-end.
(duplicate_decl): Allow redefinition of anticipated built-ins.
Fix inlining problem by over-writing the old DECL_RTL.
(lookup_namespace_name): Fail to find an identifier in the
specified namespace if its still anticipated.
(builtin_function_1): New function split out from builtin_function
to create a builtin in the current namespace with given context.
(builtin_function): Call builtin_function_1 to define the
appropriate builtins in both the std and global namespaces.
(select_decl): Don't test for anticipated decls here.
(unqualified_namespace_lookup): Instead ignore them whilst
searching through scopes and namespaces.
* decl2.c (do_nonmember_using_decl): If a using declaration
specifies an anticipated built-in function, mark it as no longer
anticipated in that scope.
(ambiguous_decl): Avoid resolving to an anticipated decl.
* lex.c (do_scoped_id): Fail to find an identifier in the global
namespace if its still anticipated.
2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
* cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
* cp-tree.h (cp_make_lang_type): Rename.
* lex.c (cp_make_lang_type): Rename.
(make_aggr_type): Update.
* tree.c (init_tree): Don't set make_lang_type_fn.
2002-03-29 Jakub Jelinek <jakub@redhat.com>
PR c++/6073
* class.c (finish_struct_1): Update static field's DECL_MODE even
if its type is a variant of t.
2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
* cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
* cp-tree.h (cxx_insert_default_attributes): New.
* decl.c (insert_default_attributes): Rename.
2002-03-27 Mark Mitchell <mark@codesourcery.com>
PR c++/4884
* call.c (build_op_delete_call): Allow for the fact the placement
may be a COMPOUND_EXPR.
2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
* cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
* cp-tree.h (init_cplus_expand): Remove.
(cxx_expand_expr): New.
* expr.c (cplus_expand_expr): Rename cxx_expand_expr,
fix prototype.
(init_cplus_expand): Remove.
* lex.c (cxx_init): Don't call init_cplus_expand.
2002-03-26 Mark Mitchell <mark@codesourcery.com>
PR c++/4884.
* init.c (build_new_1): Allow for the fact the result of
build_function_call may be a COMPOUND_EXPR.
2002-03-26 Nathan Sidwell <nathan@codesourcery.com>
PR c++/5682
* cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
(dfs_skip_nonprimary_vbases_unmarkedp): Remove.
(dfs_skip_nonprimary_vbases_markedp): Remove.
* search.c (get_shared_vbase_if_not_primary): Remove.
(dfs_skip_nonprimary_vbases_unmarkedp): Remove.
(dfs_skip_nonprimary_vbases_markedp): Remove.
(dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
(dfs_marked_real_bases_queue_p): Likewise.
2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
* cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
* cp-tree.h (cxx_mark_tree): New.
* decl.c (lang_mark_tree): Rename cxx_mark_tree.
2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
* cp-tree.h (cxx_maybe_build_cleanup): New.
* decl.c (destroy_local_var, hack_incomplete_structures): Update.
(maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
* tree.c (build_target_expr): Update.
* cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
* decl2.c (cxx_decode_option): Handle -E.
* lang-specs.h (default_compilers): Preprocess with cc1plus.
* lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
2002-03-23 Jakub Jelinek <jakub@redhat.com>
PR c++/6037
* decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
* error.c (dump_type): Be careful about implicit typenames.
2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
PR C++/3656
* semantics.c (finish_base_specifier): Handle erronous base
classes.
2002-03-22 Zack Weinberg <zack@codesourcery.com>
* error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
REAL_IS_NOT_DOUBLE.
2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
* typeck.c (get_member_function_from_ptrfunc): Scale idx down to
an index into the vtable_entry array regardless of
TARGET_PTRMEMFUNC_VBIT_LOCATION.
2002-03-21 Aldy Hernandez <aldyh@redhat.com>
* tree.c (cp_cannot_inline_tree_fn): Same.
2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
* cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
insert_block, getdecls, global_bindings_p): New.
2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
PR c++/4361
* mangle.c (struct globals) Add internal_mangling_p member.
(write_template_param): Do internal mangling, if needed.
(mangle_conv_op_name_for_type): Request internal mangling.
2002-03-20 Jason Merrill <jason@redhat.com>
PR c++/2136
* init.c (build_delete): Check access for a member op delete here.
* decl2.c (delete_sanity): Not here.
2002-03-19 Jason Merrill <jason@redhat.com>
PR c++/5118
* class.c (get_vfield_name): Use the constructor_name.
2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
* cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
* cp-tree.h (lang_printable_name): Rename.
* error.c (lang_decl_name): Use new hook.
* lex.c (cxx_init): Remove old hook.
* pt.c (tsubst_decl): Use new hook.
* tree.c (lang_printable_name): Rename.
2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
PR c++/3882
* pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
(tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
only after recording the declaration.
2002-03-18 Jason Merrill <jason@redhat.com>
PR c++/2039
* init.c (resolve_offset_ref): Hand off to build_component_ref.
PR c++/4222, c++/5995
* call.c (build_over_call): Fix empty class logic.
PR c++/3870
* cp-tree.h (struct saved_scope): Add last_parms field.
* decl.c (maybe_push_to_top_level): Save last_function_parms.
(pop_from_top_level): Restore it.
PR c++/4377
* mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
NON_LVALUE_EXPRs.
PR c++/4003
* pt.c (tsubst_friend_function): Use decl_namespace_context.
PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
* class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
type with a nontrivial destructor.
2002-03-17 Jason Merrill <jason@redhat.com>
PR c++/4460
* class.c (build_base_path): Virtual base layout is fixed in
in-charge [cd]tors.
2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
* cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
* parse.y (yyparse): Remove macro.
2002-03-17 Jason Merrill <jason@redhat.com>
PR c++/5757
* init.c (build_new_1): Pass the right pointer to op delete.
2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
PR c++/4361
* cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
conversion operators go.
(struct lang_decl_flags): Add template_conv_p and unused
bitfields.
(DECL_TEMPLATE_CONV_FN_P): New macro.
* call.c (build_user_type_conversion_1): Don't check second type
conversion of overload set first.
* class.c (add_method): Make sure templated conversion operators
all end up on slot 2.
* lex.c (do_identifier): A conversion operator token might be
satisfied by a templated conversion operator.
* pt.c (check_explicit_specialization): Use
CLASSTYPE_FIRST_CONVERSION_SLOT.
(template_parm_this_level_p): New function.
(push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
* search.c (lookup_fnfields_1): Template conversions will be on
the first slot.
* typeck.c (build_component_ref): Preserve the type of an
conversion operator name on the overload type.
(build_x_function_call): Retrieve the conversion operator name.
2002-03-15 Richard Henderson <rth@redhat.com>
* init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
2002-03-15 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (CLEANUP_DECL): Remove.
(CLEANUP_EXPR): Likewise.
* decl.c (destroy_local_var): Simplify.
(maybe_build_cleanup): Tidy.
* dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
* semantics.c (cp_expand_stmt): Likewise.
* cp/tree.c (cp_statement_code_p): Likewise.
2002-03-15 Jason Merrill <jason@redhat.com>
PR c++/5857
* decl.c (duplicate_decls): Use merge_types instead of common_type.
* typeck.c (common_type): Just hand off to
type_after_usual_arithmetic_conversions and
composite_pointer_type.
(merge_types): New fn.
(commonparms): Use it instead of common_type.
(type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
(composite_pointer_type): Also handle attributes.
* cp-tree.h: Declare merge_types.
* decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
variables.
* decl2.c (maybe_make_one_only): Also mark the decl as needed.
2002-03-14 Richard Henderson <rth@redhat.com>
* decl.c: Include c-pragma.h.
(start_decl, start_function): Invoke maybe_apply_pragma_weak.
* Make-lang.in: Update dependencies.
2002-03-14 Jakub Jelinek <jakub@redhat.com>
PR c++/5908
* call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
* cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
2002-03-12 Richard Sandiford <rsandifo@redhat.com>
* mangle.c (write_builtin_type): Handle 128-bit integers even if
they are not a standard integer type.
2002-03-12 Richard Sandiford <rsandifo@redhat.com>
* cp-tree.h (init_init_processing): Remove declaration.
* init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
* decl.c (cxx_init_decl_processing): Don't call init_init_processing.
2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
Define.
* decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
tree_code_length.
* lex.c (cplus_tree_code_type, cplus_tree_code_length,
cplus_tree_code_name): Delete.
(cxx_init): Don't call add_c_tree_codes, instead set
lang_unsafe_for_reeval. Don't try to copy into the various
tree_code arrays.
2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
PR c++/5659
* decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
* decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
definitions.
2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
DR209 is now not a defect.
* cp-tree.h (skip_type_access_control): Remove.
* decl.c (grokdeclarator): Do type access control for friend
declarations.
* semantics.c (decl_type_access_control): Don't reset
current_type_lookups.
(save_type_access_control): Always save the lookups.
(skip_type_access_control): Remove.
(finish_class_definition): Don't change type_lookups.
2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
It is incorrect.
* typeck.c (build_static_cast): Compare non-qualified types
with pointer to member conversions.
2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
Daniel Berlin <dan@dberlin.org>
* cp-lang.c (ok_to_generate_alias_set_for_type): New function.
(cxx_get_alias_set): Use it.
2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* cp-tree.h (stabilize_expr): Prototype.
2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
* cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
conditional return void.
2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
* cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
* cp-tree.h (cxx_unsave): New.
* tree.c (cp_unsave): Rename cxx_unsave, update prototype.
(init_tree): Update.
2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
explicit sizeof/sizeof.
* decl2.c (cxx_decode_option): Likewise.
* lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
PR c++/775
* decl.c (lookup_tag): Only reject enum/class mismatch, not
class/union mismatch.
* parse.y (check_class_key): New function.
(structsp): Call it.
2002-03-01 Michael Matz <matz@suse.de>
* typeck.c (cp_pointer_int_sum): Complete inner type which is
used later by size_in_bytes().
2002-03-01 Phil Edwards <pme@gcc.gnu.org>
* cp-tree.h: Require __GNUC__ to be #defined.
(build_init): Add missing prototype.
2002-03-01 Jason Merrill <jason@redhat.com>
* except.c: Don't include decl.h or obstack.h. Do include
tree-inline.h.
(build_throw): Destroy temporaries from the thrown
expression before calling __cxa_throw. Construct a thrown
temporary directly into the exception object.
(stabilize_throw_expr): New function.
(wrap_cleanups_r): New function.
* tree.c (stabilize_expr): New function.
* init.c (build_init): New function.
* Make-lang.in (cp/except.o): Adjust .h deps.
2002-02-28 Jason Merrill <jason@redhat.com>
* search.c (lookup_base_r): Don't clear is_non_public just because
we found a friendly scope.
* decl.c (finish_function): Only warn about missing return
statement with -Wreturn-type.
2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
* class.c (build_clone): Update.
* cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
* cp-tree.h (cxx_dup_lang_specific_decl): New.
* lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
(copy_decl): Update.
* method.c (make_thunk): Update.
2002-02-27 Zack Weinberg <zack@codesourcery.com>
* decl2.c: Delete traditional-mode-related code copied from
the C front end but not used, or used only to permit the
compiler to link.
2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
PR c++/4093
* cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
to void.
2002-02-22 Jakub Jelinek <jakub@redhat.com>
PR other/5746
* semantics.c (finish_switch_cond): Don't call get_unwidened
if error_mark_node.
2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
PR c++/2645, DR 295
* cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
tf_keep_type_decl.
(make_typename_type): Use tsubst_flags_t.
* decl.c (make_typename_type): Adjust. Return non-artificial
TYPE_DECLs, if required.
(grokdeclarator): Simplify CVR qualification handling. Allow bad
qualifiers on typedef types.
* decl2.c (handle_class_head): Adjust make_typename_type call.
* parse.y (nested_name_specifier): Likewise.
(typename_sub0): Likewise.
(typename_sub1): Likewise.
* pt.c (convert_template_argument): Adjust make_typename_type
return value.
(tsubst): Adjust cp_build_qualified_type_real calls.
(check_cv_quals_for_unify): Cope with allowing bad qualifications
on template type parms.
(instantiate_decl): Recheck substitutions to give warnings on bad
qualifications.
* tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
2002-02-21 Aldy Hernandez <aldyh@redhat.com>
* cp/decl.c (duplicate_decls): Merge always_inline attribute.
* cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
unless DECL_ALWAYS_INLINE.
2002-02-20 Jakub Jelinek <jakub@redhat.com>
* typeck.c (cp_pointer_int_sum): Renamed from
pointer_int_sum, call pointer_int_sum.
2002-02-20 Jakub Jelinek <jakub@redhat.com>
* decl.c (duplicate_decls): Return 0 if issued error about
redeclaration.
2002-02-19 Jason Merrill <jason@redhat.com>
ABI change: Mangle `void (A::*)() const' as
M1AKFvvE, not MK1AFvvE.
* mangle.c (write_function_type): Write cv-quals for member
function type here.
(write_pointer_to_member_type): Not here.
2002-02-18 Jason Merrill <jason@redhat.com>
* pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
(do_decl_instantiation): Likewise.
2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
PR c++/5685
* decl.c (duplicate_decls): Make warning unconditional
if duplicate default argument declarations are present.
2002-02-17 Jakub Jelinek <jakub@redhat.com>
* typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
shortening.
2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
remove incorrect comment. Move #if 0'd code to common path. Use
IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
2002-02-13 Jason Merrill <jason@redhat.com>
* decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
(finish_function): Don't warn if current_function_returns_null.
* typeck2.c (digest_init): Do handle values of vector type.
* typeck2.c (digest_init, process_init_constructor): Treat vectors
like arrays.
2002-02-11 Jason Merrill <jason@redhat.com>
* parse.y (reserved_declspecs): Don't handle attributes.
(reserved_typespecquals): Handle them here.
* Make-lang.in (parse.c): Adjust expected conflicts.
2002-02-08 Jakub Jelinek <jakub@redhat.com>
* parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
instead of compstmt.
(compstmt_or_stmtexpr): Renamed from compstmt.
(compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
Rename instantiate_type_flags to tsubst_flags_t & expand use.
* cp-tree.h (instantiate_type_flags): Rename to ...
(tsubst_flags_t): ... here. Rename itf_complain to tf_error,
add tf_warning flag.
(instantiate_type): Adjust prototype.
(tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
do_type_instantiation, cp_build_qualified_type_real): Likewise.
cp_build_qualified_type: Adjust.
* class.c (instantiate_type): Adjust parameter. Rename itf_* to
tf_*.
* call.c (standard_conversion): Rename itf_* to tf_*.
(reference_binding): Likewise.
(convert_like_real): Likewise.
* cvt.c (cp_convert_to_pointer): Likewise.
(convert_to_reference): Likewise.
* decl.c (lookup_namespace_name): Use tf_* flags.
(make_typename_type): Likewise.
(grokdeclarator): Likewise.
* pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
(coerce_template_template_parms, convert_template_argument,
coerce_template_parms, maybe_get_template_decl_from_type_decl,
lookup_template_class, tsubst_friend_function, tsubst_friend_class,
instantiate_class_template, tsubst_template_arg_vector,
tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
tsubst_decl, tsubst_arg_types, tsubst_function_type,
tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
instantiate_template, fn_type_unification,
resolve_overloaded_unification, verify_class_unification,
unify, get_bindings_real, do_type_instantiation,
regenerate_decl_from_template, instantiate_decl,
tsubst_initializer_list, tsubst_enum,
get_mostly_instantiated_function_type,
invalid_nontype_parm_type_p): Likewise.
* tree.c (cp_build_qualified_type_real): Likewise.
* typeck.c (build_binary_op): Rename itf_* to tf_*.
(build_ptrmemfunc): Likewise.
(convert_for_assignment): Likewise.
2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
PR c++/109
* decl.c (grokdeclarator): Allow friend declarations from
dependent types.
* decl2.c (handle_class_head): Don't push into template parm contexts.
* pt.c (push_template_decl_real): Template parm contexts are never
being defined.
2002-02-05 Alexandre Oliva <aoliva@redhat.com>
* class.c: Include target.h.
(check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
bit-field layout.
* Make-lang.in: Adjust deps.
2002-02-05 Jason Merrill <jason@redhat.com>
* error.c (dump_type): Be more helpful about VECTOR_TYPE.
2002-02-04 Jakub Jelinek <jakub@redhat.com>
* semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
(finish_switch_cond): Set SWITCH_TYPE.
2002-02-04 Richard Henderson <rth@redhat.com>
* method.c (use_thunk): Always initialize the block tree. Reindent.
* semantics.c (expand_body): Emit thunks after function, not before.
2002-02-04 Jason Merrill <jason@redhat.com>
* decl.c (start_function): Call cplus_decl_attributes immediately
after grokdeclarator.
* decl.c (start_function): Combine DECL_RESULT handling code.
2002-02-03 Jason Merrill <jason@redhat.com>
* xref.c: Remove.
* Make-lang.in (CXX_OBJS): Remove cp/xref.o
(cp/xref.o): Remove dependencies.
* class.c (finish_struct_1, check_methods): Don't call xref fns.
(finish_struct_1): Likewise.
* friend.c (make_friend_class): Likewise.
* lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
* spew.c (read_process_identifier): Likewise.
2002-02-01 Jason Merrill <jason@redhat.com>
PR c++/4872
* decl.c (finish_function): Warn about a non-void function with
no return statement and no abnormal exit.
* cp-tree.h (struct cp_language_function): Add returns_abnormally.
(current_function_returns_abnormally): New macro.
* call.c (build_call): Set it.
* typeck.c (build_component_ref): Always complain about offsetof
constructs on non-PODs. Only make it an error for members of
virtual bases.
* error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
(dump_function_decl): Always dump parms.
* decl2.c (finish_static_data_member_decl): Complain about a local
class with a static data member.
PR c++/4286
* search.c (lookup_field_1): Don't xref a static data member
just because we looked it up.
2002-01-31 Jason Merrill <jason@redhat.com>
* Make-lang.in (parse.c): Handle .output file.
PR c++/3395
* decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
not TREE_TYPE.
* semantics.c (finish_class_definition): Adjust.
Allow attributes in parms and casts.
* parse.y (named_parm): Don't strip attrs.
(declmods): Remove 'attributes' production.
(nonempty_cv_qualifiers): Accept attributes.
(ATTRIBUTE): Give precedence.
* decl.c (groktypename): Handle attributes.
(grokparms): Likewise.
2002-01-29 Jakub Jelinek <jakub@redhat.com>
* decl2.c (cxx_decode_option): Pass 0 as last argument to
cpp_handle_option.
* lang-specs.h: Use cpp_unique_options instead of cpp_options
when used together with cc1_options.
2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
PR c++/5132
* typeck2.c (digest_init): Make sure non-array core type is
instantiated.
* decl2.c (reparse_absdcl_as_casts): Just store the type in the
constructor, rather than build a new one.
(build_expr_from_tree, CONSTRUCTOR case): Be careful with the
PURPOSE of constructor elts.
2002-01-23 Zack Weinberg <zack@codesourcery.com>
* Make-lang.in (parse.c): Adjust expected number of
shift-reduce conflicts.
(decl.o): Depend on diagnostic.h.
* decl.c: Include diagnostic.h.
(grokdeclarator): Check for null pointer.
(finish_function): Don't abort when
current_binding_level->parm_flag != 1, if errors have
occurred; throw away the statement tree and extra binding
levels, and continue.
* lex.c (note_list_got_semicolon): Check for null pointer.
* method.c (hack_identifier): Just return error_mark_node if
value is error_mark_node.
* parse.y (primary: TYPEID(type_id)): No need to use
TYPE_MAIN_VARIANT here.
(handler_seq): Accept an empty list of catch clauses and
generate a fake handler block to avoid later crashes.
(ansi_raise_identifier): Accept the error token too.
* semantics.c (begin_class_definition,
finish_class_definition): Check for error_mark_node.
2002-01-23 Zack Weinberg <zack@codesourcery.com>
* typeck2.c (friendly_abort): Delete definition.
* cp-tree.h (friendly_abort): Don't prototype.
(my_friendly_assert): Use fancy_abort.
2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
* cp-tree.h (my_friendly_abort): Remove.
2002-01-23 Jakub Jelinek <jakub@redhat.com>
* spew.c (pending_inlines, pending_inlines_tail,
processing_these_inlines): Make static.
(mark_pending_inlines): Remove static.
(begin_parsing_inclass_inline): If in function, save pi
for GC to cp_function_chain->unparsed_inlines instead.
(process_next_inline): Likewise.
* cp-tree.h (struct cp_language_function): Add unparsed_inlines.
(mark_pending_inlines): Add prototype.
* decl.c (spew_debug): Remove unused extern.
(mark_lang_function): Call mark_pending_inlines.
2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
* call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
Change my_fancy_abort() to abort().
2002-01-23 Jason Merrill <jason@redhat.com>
PR c++/5453
* class.c (fixed_type_or_null): Fix thinko.
PR c++/3331
* init.c (resolve_offset_ref): Use build_indirect_ref.
* decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
2002-01-22 Jason Merrill <jason@redhat.com>
* parse.y (function_body): Suppress the block for the outermost
curly braces.
* decl.c (pushdecl): Don't try to skip it.
(begin_function_body): Keep the block we create, not the next one.
* init.c (emit_base_init): Don't mess with keep_next_level.
* class.c (build_base_path): Tweak formatting.
2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
Fix regression introduced with patch for c++/775
* parse.y (class_head_defn): Check for template specializations
with a different class-key.
2002-01-17 Jason Merrill <jason@redhat.com>
* decl.c (begin_constructor_body, begin_destructor_body): New fns.
(begin_function_body): Call them and keep_next_level.
* init.c (emit_base_init): Call keep_next_level.
* semantics.c (setup_vtbl_ptr): Lose.
* cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
(vtbls_set_up_p): Lose.
* pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
* method.c (do_build_copy_constructor): Likewise.
(synthesize_method): Call finish_mem_initializers.
* parse.y (nodecls): Likewise.
* error.c (dump_type_suffix): Print the exception specs before
recursing.
(dump_function_decl): Here, too.
* cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
2002-01-10 Ira Ruben <ira@apple.com>
PR c++/907
* decl.c (start_method): Handle attrlist.
2002-01-10 Jakub Jelinek <jakub@redhat.com>
* decl2.c (max_tinst_depth): Increase default limit to 500.
2002-01-10 Graham Stott <grahams@redhat.com>
* spew.c (YYCHAR): Uppercase macro parameter and add
parenthesis.
(YYCODE): Likewise.
(NAME): Uppercase macro parameter.
2002-01-09 Graham Stott <grahams@redhat.com>
* decl.h (grokdeclarator): Wrap long line.
* semantics.c (FINISH_COND): Uppercase macro paramaters and
add parenthesis.
2002-01-08 Graham Stott <grahams@redhat.com>
* xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
(PALLOC): Uppercase macro parameter and whitespace.
(SALLOC): Uppercase macro parameter.
(SFREE): Uppercase macros parameter, add parenthese and
whitespace.
(STREQL): Uppercase macro parameter and whitespace.
(STRNEQ): Likewise.
(STRLSS): Likewise.
(STRLEQ): Likewise.
(STRGTR): Likewise.
(STRGEQ): Likewise.
* call.c (convert_like): Add parenthesis and wrap.
(convert_like_with_context): Likewise.
(ICS_RANK): Whitespace.
(NEED_TEMPORARY_P): Remove parenthesis.
* class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
whitespace.
(VTT_MARKED_BINFO_P): Likewise.
* decl.c (BINDING_LEVEL): Add parenthesis.
(DEF_OPERATOR): Likewise.
* mangle.c (MANGLE_TRACE): Add parenthesis.
(MANGLE_TRACE_TREE): Likewise.
(write_signed_number): Likewise.
(write_unsigned_number): Likewise.
* pt.c (ccat): Uppercase macro parameter.
(cat): Likewise
* search.c (SET_BINFO_ACCESS): Add parenthesis.
2002-01-07 Jason Merrill <jason@redhat.com>
* decl2.c (coerce_new_type): Downgrade error for size_t mismatch
to pedwarn.
PR c++/3536
* method.c (make_thunk): If !flag_weak, give the thunk the
function's linkage.
(use_thunk): Here, too.
2002-01-07 Graham Stott <grahams@redhat.com>
* error.c: Update copyright date.
(print_scope_operator): Add parenthesis.
(print_left_paren): Likewise.
(print_right_paren): Likewise.
(print_left_bracket): Likewise.
(print_right_bracket): Likewise.
(print_template_argument_list_start): Likewise.
(print_template_argument_list_end): Likewise.
(print_non_consecutive_character): Likewise.
(print_tree_identifier): Likewise.
(print_identifier): Likewise.
(NEXT_CODE): Uppercase macro parameter.
(ident_fndecl): Delete unused.
(GLOBAL_THING): Likewise.
2002-01-06 Graham Stott <grahams@redhat.com>
* cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
(VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
(VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
(RECORD_OR_UNION_TYPE_CHECK): Likewise.
(BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
(C_IS_RESERVED_WORD): Uppercase macro parameter.
(C_RID_YYCODE) Likewise.
(ptrmem_cst): Use rtx.
(LOCAL_BINDING_P): Add whitespace.
(INHERITED_VALUE_BINDING_P): Likewise.
(BINDING_SCOPE): Wrap long line.
(BINDING_HAS_LEVEL_P): Remove parenthesis.
(BINDING_VALUE): Wrap long line.
(BINDING_TYPE): Whitespace.
(IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
(SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
(IDENTIFIER_NAMESPACE_VALUE): Likewise.
(SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
(same_type_p): Uppercase macro parameters.
(same_type_ignoring_top_level_qualifiers_p): Likewise.
(OVL_FUNCTION): Wrap long line.
(OVL_CHAIN): Whitespace.
(OVL_CURRENT): Add parenthesis and whitespace.
(OVL_NEXT): Whitespace.
(OVL_USED): Likewise.
(IDENTIFIER_TYPE_VALUE): Likewise.
(REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
(SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
(LANG_ID_FIELD): Whitespace.
(SET_LANG_ID(NODE,VALUE,NAME): Likewise.
(IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
(SET_IDENTIFIER_LABEL_VALUE): Whitespace.
(IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
(SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
(IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
(SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
(IDENTIFIER_VIRTUAL_P): Likewise.
(IDENTIFIER_OPNAME_P): Likewise.
(IDENTIFIER_TYPENAME_P): Remove parenthesis.
(C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
(C_SET_EXP_ORIGINAL_CODE): Likewise.
(TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
(TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
(IS_AGGR_TYPE): Uppercase macro parameter.
(CLASS_TYPE_P): Likewise.
(IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
(IS_AGGR_TYPE_2): Whitespace.
(TAGGED_TYPE_P): Uppercase macro parameter.
(TYPE_BUILT_IN): Whitespace.
(TYPE_FOR_JAVA): Likewise.
(FUNCTION_ARG_CHAIN): Remove parenthesis.
(FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
(FUNCTION_FIRST_USER_PARAM): Likewise.
(PROMOTES_TO_AGGR_TYPE): Whitespace.
(DERIVED_FROM_P): Add parenthesis and wrap.
(UNIQUELY_DERIVED_FROM_P): Likewise.
(ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
(PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
(CLASSTYPE_USE_TEMPLATE): Whitespace.
(CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
(TYPE_GETS_DELETE): Add parenthesis.
(TYPE_HAS_CONVERSION): Add parenthesis and wrap.
(TYPE_HAS_ASSIGN_REF): Likewise,
(TYPE_HAS_CONST_ASSIGN_REF): Likewise.
(TYPE_HAS_INIT_REF): Likewise.
(TYPE_HAS_CONST_INIT_REF): Likewise.
(TYPE_BEING_DEFINED): Likewise.
(TYPE_LANG_SPECIFIC): Likewise.
(CLASSTYPE_RTTI): Likewise.
(TYPE_OVERLOADS_CALL_EXPR): Likewise.
(TYPE_OVERLOADS_ARRAY_REF): Likewise.
(TYPE_OVERLOADS_ARROW): Likewise.
(TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
(TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
(CLASSTYPE_METHOD_VEC): Likewise.
(CLASSTYPE_MARKED_N): Likewise.
(CLASSTYPE_MARKED): Likewise.
(CLASSTYPE_MARKED2): Likewise.
(CLASSTYPE_MARKED3): Likewise.
(CLASSTYPE_MARKED4): Likewise.
(CLASSTYPE_MARKED5): Likewise.
(CLASSTYPE_MARKED6): Likewise.
(SET_CLASSTYPE_MARKED): Whitespace.
(CLEAR_CLASSTYPE_MARKED): Likewise.
(SET_CLASSTYPE_MARKED2): Likewise.
(CLEAR_CLASSTYPE_MARKED2): Likewise.
(SET_CLASSTYPE_MARKED3): Likewise.
(CLEAR_CLASSTYPE_MARKED3): Likewise.
(SET_CLASSTYPE_MARKED4): Likewise.
(CLEAR_CLASSTYPE_MARKED4): Likewise.
(SET_CLASSTYPE_MARKED5): Likewise.
(CLEAR_CLASSTYPE_MARKED5): Likewise.
(SET_CLASSTYPE_MARKED6): Likewise.
(CLEAR_CLASSTYPE_MARKED6): Likewise.
(CLASSTYPE_TAGS): Likewise.
(CLASSTYPE_VSIZE): Likewise.
(CLASSTYPE_VBASECLASSES): Likewise.
(CANONICAL_BINFO): Add parenthesis.
(CLASSTYPE_SIZE(NODE): Likewise.
(CLASSTYPE_SIZE_UNIT): Likewise.
(CLASSTYPE_ALIGN(NODE): Likewise.
(CLASSTYPE_USER_ALIGN): Likewise.
(TYPE_JAVA_INTERFACE): Likewise.
(CLASSTYPE_PURE_VIRTUALS): Likewise.
(CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
(TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
(CLASSTYPE_HAS_MUTABLE): Likewise.
(CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
(CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
(CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
(CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
(CLASSTYPE_INTERFACE_ONLY): Likewise.
(CLASSTYPE_INTERFACE_KNOWN): Likewise.
(CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
(SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
(SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
(SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
(CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
(BINFO_UNSHARED_MARKED): Whitespace.
(BINFO_MARKED): Whitespace and wrap.
(SET_BINFO_MARKED): Likewise.
(CLEAR_BINFO_MARKED): Likewise.
(BINFO_VTABLE_PATH_MARKED): Likewise.
(SET_BINFO_VTABLE_PATH_MARKED): Likewise.
(CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
(BINFO_SUBVTT_INDEX): Remove parenthesis.
(BINFO_VPTR_INDEX): Likewise.
(BINFO_PRIMARY_BASE_OF): Likewise,
(CLASSTYPE_VFIELDS): Whitespace.
(VF_DERIVED_VALUE): Wrap long line.
(NAMESPACE_LEVEL): Whitespace.
(CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
(DEFARG_POINTER): Whitespace.
(DECL_NEEDED_P): Remove parenthesis.
(DECL_LANGUAGE): Whitespace.
(SET_DECL_LANGUAGE): Add parenthesis.
(DECL_CONSTRUCTOR_P): Whitespace and wrap.
(DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
(DECL_IN_AGGR_P): Whitespace.
(DECL_FRIEND_P): Likewise.
(DECL_BEFRIENDING_CLASSES): Likewise.
(DECL_STATIC_FUNCTION_P): Whitespace and wrap.
(DECL_NONCONVERTING_P): Whitespace.
(DECL_PURE_VIRTUAL_P): Likewise.
(DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
(DECL_PENDING_INLINE_INFO): Whitespace.
(DECL_SORTED_FIELDS): Likewise.
(DECL_DEFERRED_FN): Likewise.
(DECL_TEMPLATE_INFO): Likewise.
(CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
(TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
(SET_TYPE_TEMPLATE_INFO): Add parenthesis.
(TMPL_ARGS_LEVEL): Likewise.
(SET_TMPL_ARGS_LEVEL): Likewise.
(INNERMOST_TEMPLATE_PARMS): Whitespace.
(C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
(INTEGRAL_CODE_P(CODE): Add parenthesis.
(CP_INTEGRAL_TYPE_P): Remove parenthesis.
(TYPE_HAS_CONSTRUCTOR): Whitespace.
(TREE_HAS_CONSTRUCTOR): Likewise.
(TYPE_HAS_DESTRUCTOR): Likewise.
(TYPE_HAS_REAL_ASSIGN_REF): Likewise.
(TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
(TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
(TYPE_HAS_COMPLEX_INIT_REF): Likewise.
(TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
(TYPE_PTRMEMFUNC_P): Likewise.
(TYPE_PTRMEMFUNC_FLAG): Likewise.
(TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
(TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
(TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
(TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
(DECL_ACCESS): Whitespace.
(DECL_GLOBAL_CTOR_P): Remove parenthesis.
(DECL_GLOBAL_DTOR_P): Likewise.
(GLOBAL_INIT_PRIORITY): Likewise.
(DECL_TEMPLATE_PARMS): Likewise.
(DECL_TEMPLATE_RESULT): Likewise.
(DECL_TEMPLATE_INSTANTIATIONS): Likewise.
(DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
(DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
(SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
(PRIMARY_TEMPLATE_P): Add parenthesis.
(DECL_USE_TEMPLATE): Whitespace.
(CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
(SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
(CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
(SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
(CALL_DECLARATOR_PARMS): Remove parenthesis.
(CALL_DECLARATOR_QUALS): Likewise.
(CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
(TEMP_NAME_P): Wrap.
(VFIELD_NAME_P): Likewise.
(B_SET): Uppercase macro parameters and add parenthesis.
(B_CLR): Likewise.
(B_TST): Likewise.
(LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
(LOOKUP_TYPES_ONLY): Uppercase macro parameters.
(LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
(same_or_base_type_p): Likewise.
(cp_deprecated): Likewise.
2002-01-05 Richard Henderson <rth@redhat.com>
* semantics.c (expand_body): Revert last change.
2002-01-04 Jason Merrill <jason@redhat.com>
PR c++/4122
* class.c (update_vtable_entry_for_fn): Set delta to zero for a
lost primary.
* class.c (build_vtbl_initializer): Check for a lost primary
before calculating the vtable entry to throw away.
2002-01-02 Jason Merrill <jason@redhat.com>
* semantics.c (expand_body): Call outlining_inline_function when
emitting an inline function out of line.
2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
PR c++/5116, c++/764 reversion
* call.c (build_new_op): Revert the instantiations. They are
incorrect.
2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
PR c++/5089
* decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
PR c++/3716
* pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
(tsubst, case POINTER_TYPE): Handle pmfs here.
(tsubst, case OFFSET_TYPE): Check it is not an offset to
reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
PR c++/35
* cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
(DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
* pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
PARM_DECL.
(tsubst_template_parms): Break up loop statements.
(tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
parm PARM_DECLs don't get promoted.
2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
PR c++/5123
* typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
(build_x_function_call): Cope with a COMPONENT_REF containing a
TEMPLATE_ID_EXPR.
2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
PR c++/5213
* pt.c (convert_template_argument): Be more careful determining
when RECORD_TYPE templates are or are not templates.
2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
PR c++/775
* cp-tree.h (handle_class_head): Adjust prototype.
* decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
parameters. Use for all class heads.
* parse.y (named_class_head_sans_basetype, named_class_head,
named_complex_class_head_sans_basetype,
named_class_head_sans_basetype_defn,
unnamed_class_head): Remove.
(class_head, class_head_apparent_template): Recognize class heads
(class_head_decl, class_head_defn): New reductions. Process class
heads.
(structsp): Adjust class definition and class declaration
reductions.
(maybe_base_class_list): Give diagnostic on empty list.
2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
PR c++/4379
* typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
single non-static member.
(unary_complex_lvalue): If it cannot be a pointer to member, don't
make it so. Check it is not pointer to reference.
2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
PR c++/5132
* decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
are processing a template decl.
2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
PR c++/5116, c++/764
* call.c (build_new_op): Make sure template class operands are
instantiated. Simplify arglist construction.
2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
* call.c (build_user_type_conversion_1): Use my_friendly_assert
rather than if ... abort.
* cvt.c (convert_to_reference): Likewise.
* semantics.c (setup_vtbl_ptr): Likewise.
* pt.c (lookup_template_class): Comment typo.
2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
PR c++/5125
* pt.c (push_template_decl_real): Make sure DECL has
DECL_LANG_SPECIFIC.
2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
PR c++/335
* init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
for non-reference fields.
* typeck.c (require_complete_type): Use resolve_offset_ref).
2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
PR c++/196
* parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
PR c++/160
* typeck.c (build_modify_expr): Remove old unreachable code & tidy
up. Don't stabilize_references when initializing a reference.
2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* decl2.c (lang_f_options): Const-ify.
2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
* config-lang.in (diff_excludes): Remove.
2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
PR c++/90
* typeck.c (build_function_call_real): Use original function
expression for errors.
2001-12-18 Jason Merrill <jason@redhat.com>
PR c++/3242
* class.c (add_method): Do compare 'this' quals when trying to match a
used function. Don't defer to another used function.
2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (instantiate_clone): Remove, fold into ...
(instantiate_template): ... here. Simplify by removing mutual
recursion.
* typeck2.c (build_m_component_ref): Don't cv qualify the function
pointed to by a pointer to function.
* class.c (delete_duplicate_fields_1): Typo.
2001-12-18 Jason Merrill <jason@redhat.com>
C++ ABI change: destroy value arguments in caller.
* semantics.c (genrtl_start_function, genrtl_finish_function): Don't
create an extra binding level for the parameters.
* decl.c (store_parm_decls): Don't do parameter cleanups.
2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
* call.c (build_new_method_call): Use '%#V'.
* error.c (cv_to_string): Use V parameter to determine padding.
2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
* call.c, decl2.c, init.c: Use "built-in" and "bit-field"
spellings in messages.
2001-12-17 Zack Weinberg <zack@codesourcery.com>
* cp-tree.h: Delete #defines for cp_error, cp_warning,
cp_pedwarn, and cp_compiler_error.
* call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
typeck2.c: Change calls to the above macros to use their
language-independent equivalents: error, warning, pedwarn, and
internal_error respectively.
2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
* decl2.c (finish_file): Remove back_end_hook.
2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
* ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
* lang-options.h: Use American spelling in messages.
2001-12-13 Jason Merrill <jason@redhat.com>
* Make-lang.in (parse.h): Separate rule, just depend on parse.c.
Use cleanups to run base and member destructors.
* init.c (push_base_cleanups): New function, split out from...
(build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
* decl.c (finish_destructor_body): Move vbase destruction code to
push_base_cleanups.
(begin_function_body, finish_function_body): New fns.
(finish_function): Move [cd]tor handling and call_poplevel to
finish_function_body.
(pushdecl): Skip the new level.
* semantics.c (genrtl_try_block): Don't call end_protect_partials.
(setup_vtbl_ptr): Call push_base_cleanups.
* method.c (synthesize_method): Call {begin,end}_function_body.
* pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
* cp-tree.h: Declare new fns.
* parse.y (function_body, .begin_function_body): New nonterminals.
(fndef, pending_inline, function_try_block): Use function_body.
(ctor_initializer_opt, function_try_block): No longer has a value.
(base_init): Remove .set_base_init token.
(.set_base_init, compstmt_or_error): Remove.
* Make-lang.in (parse.c): Expect two fewer s/r conflicts.
* optimize.c (maybe_clone_body): Fix parameter updating.
2001-12-12 Jason Merrill <jason@redhat.com>
* decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
* semantics.c (genrtl_start_function): Don't pass
parms_have_cleanups or push an extra binding level.
(genrtl_finish_function): Lose cleanup_label cruft.
* cp-tree.h (struct cp_language_function): Remove x_ctor_label.
(ctor_label): Remove.
* semantics.c (finish_return_stmt): Lose ctor_label support.
* decl.c (finish_constructor_body, mark_lang_function): Likewise.
* typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
dtor_label.
* call.c (build_new_method_call): Let resolves_to_fixed_type_p
check for [cd]tors.
* class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
* decl.c (finish_function): Check VMS_TARGET, not VMS.
* decl.c (start_cleanup_fn): Remove redundant pushlevel.
(end_cleanup_fn): And poplevel.
* semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
if we're in a template.
2001-12-12 Jakub Jelinek <jakub@redhat.com>
* cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
THIS_NAME_P): Delete.
* spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
with internal naming scheme.
* error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (grokdeclarator): Deprecated implicit typename use.
2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
PR g++/51
* parse.y (frob_specs): Indicate it is a language linkage which
contained the extern.
* decl.c (grokdeclarator): Allow extern language linkage with
other specifiers.
2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
PR g++/72
* decl.c (add_binding): Don't reject duplicate typedefs involving
template parameters.
2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
* parse.y, semantics.c: Similarly.
2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
PR g++/87
* cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
(copy_args_p): Rename to ...
(copy_fn_p): ... here.
(grok_special_member_properties): New function.
(grok_op_properties): Lose VIRTUALP parameter.
(copy_assignment_arg_p): Remove.
* call.c (build_over_call): Use copy_fn_p.
* decl.c (grokfndecl): Reformat. Adjust call to
grok_op_properties.
(copy_args_p): Rename to ...
(copy_fn_p): ... here. Reject template functions. Check for pass
by value.
(grok_special_member_properties): Remember special functions.
(grok_ctor_properties): Don't remember them here, just check.
(grok_op_properties): Likewise.
(start_method): Call grok_special_member_properties.
* decl2.c (grokfield): Likewise.
(copy_assignment_arg_p): Remove.
(grok_function_init): Don't remember abstract assignment here.
* pt.c (instantiate_class_template): Call
grok_special_member_properties.
(tsubst_decl): Adjust grok_op_properties call.
2001-12-08 Aldy Hernandez <aldyh@redhat.com>
* lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
RID_TYPES_COMPATIBLE_P.
2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
* semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
call to build_aggr_init.
* cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
* parse.y: Replace uses of the string non-terminal with STRING.
Don't perform string concatentaion here.
(string): Remove non-terminal.
* semantics.c (finish_asm_stmt): Don't concatenate strings here.
2001-12-05 Jason Merrill <jason@redhat.com>
* cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
(LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
* tree.c (cp_start_inlining, cp_end_inlining): New fns.
* pt.c (push_tinst_level): No longer static.
* cp-tree.h: Declare them.
* init.c (resolve_offset_ref): Don't check access for the base
conversion to access a FIELD_DECL.
* cp-tree.h (TYPE_REFFN_P): New macro.
* decl.c (bad_specifiers): Check it, too.
* rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
on the __*_type_info type if we haven't seen a definition.
2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
* decl.c: Include c-common.h.
(shadow_warning): Move to c-common.c.
2001-12-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
PR g++/164
* init.c (sort_base_init): Allow binfos to be directly specified.
* method.c (do_build_copy_constructor): Explicitly convert to the
base instance.
(do_build_assign_ref): Likewise.
2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
* decl.c (xref_basetypes): Don't use C99 construct in tag_code
declaration and initialization.
2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
* typeck2.c: Remove leading capital from diagnostic messages, as
per GNU coding standards.
2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
PR c++/3394
* decl.c (xref_basetypes): Handle attributes between
'class' and name.
2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
PR g++/3381
* parse.y (named_complex_class_head_sans_basetype): Add new
reduction.
* Make-lang.in (parse.c): Adjust expected conflict count.
2001-12-03 Jason Merrill <jason@redhat.com>
* class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
immediate binfos for our virtual bases.
2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
* call.c (build_java_interface_fn_ref): Similarly.
* except.c (is_admissible_throw_operand): Similarly.
* init.c (build_java_class_ref): Similarly.
* xref.c (open_xref_file): Similarly.
2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
* class.c (finish_struct): Remove trailing periods from messages.
* decl.c (check_tag_decl): Similarly.
* lex.c (cxx_set_yydebug): Similarly.
* typeck2.c (friendly_abort): Similarly.
2001-11-29 Mark Mitchell <mark@codesourcery.com>
PR c++/3048
* cp-tree.h (ovl_member): Remove.
* decl2.c (merge_functions): Handle extern "C" functions
specially.
* tree.c (ovl_member): Remove.
2001-11-29 Mark Mitchell <mark@codesourcery.com>
PR c++/4842
* class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
FUNCTION_DECL, as input.
(mark_overriders): Remove.
(warn_hidden): Rework for the new ABI.
2001-11-29 Mark Mitchell <mark@codesourcery.com>
PR c++/3471
* call.c (convert_like_real): Do not build additional temporaries
for rvalues of class type.
2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
(ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
(PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
(DERIVED_FROM_P): Likewise.
(enum base_access): Renumber, add ba_quiet bit mask.
(get_binfo): Remove.
(get_base_distance): Remove.
(binfo_value): Remove.
(ACCESSIBLY_DERIVED_FROM_P): Remove.
* call.c (standard_conversion): Use lookup_base.
* class.c (strictly_overrides): Likewise.
(layout_virtual_bases): Likewise.
(warn_about_ambiguous_direct_bases): Likewise.
(is_base_of_enclosing_class): Likewise.
(add_vcall_offset_vtbl_entries_1): Likewise.
* cvt.c (build_up_reference): Adjust comment.
* init.c (build_member_call): Reformat.
* search.c (get_binfo): Remove.
(get_base_distance_recursive): Remove.
(get_base_distance): Remove.
(lookup_base_r): Tweak.
(lookup_base): Add ba_quiet control. Complete the types here.
(covariant_return_p): Use lookup_base.
* tree.c (binfo_value): Remove.
(maybe_dummy_object): Use lookup_base.
* typeck.c (build_static_cast): Use lookup_base.
(get_delta_difference): Likewise.
* typeck2.c (binfo_or_else): Use lookup_base.
(build_scoped_ref): Add back error_mark_check.
(build_m_component_ref): Use lookup_base.
2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
* Make-lang.in (c++.generated-manpages): New dummy target.
2001-11-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* Make-lang.in (cp-lang.o): Depends on c-common.h.
* cp-lang.c (c-common.h): Include.
(LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
* decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
* expr.c (init_cplus_expand): Don't set lang_expand_constant.
2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
* decl2.c (c_language): Move to c-common.c.
* lex.c (cxx_post_options, cxx_init_options): Use c-common.c
functions.
(cxx_init): Update.
2001-11-26 Jason Merrill <jason@redhat.com>
* call.c (joust): Remove COND_EXPR hack.
2001-11-25 Aldy Hernandez <aldyh@redhat.com>
* search.c (lookup_base_r): Declare bk in variable declaration
space.
2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
PR g++/3145
* class.c (build_vbase_pointer): Remove.
(build_vbase_path): Remove.
(build_base_path): New function.
* cp-tree.h (base_access, base_kind): New enumerations.
(build_base_path): Declare.
(convert_pointer_to_real): Remove.
(convert_pointer_to): Remove.
(lookup_base): Declare.
(convert_pointer_to_vbase): Remove.
* call.c (build_scoped_method_call): Use lookup_base &
build_base_path instead of convert_pointer_to_real,
get_base_distance & get_binfo.
(build_over_call): Likewise.
* cvt.c (cp_convert_to_pointer): Likewise.
(convert_to_pointer_force): Likewise.
(build_up_reference): Likewise.
(convert_pointer_to_real): Remove.
(convert_pointer_to): Remove.
* init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
instead of convert_pointer_to_vbase & build_vbase_path.
(emit_base_init): Use build_base_path instead of
convert_pointer_to_real.
(expand_virtual_init): Lose unrequired conversions.
(resolve_offset_ref): Use lookup_base and build_base_path
instead of convert_pointer_to.
* rtti.c (build_dynamic_cast_1): Use lookup_base &
build_base_path instead of get_base_distance & build_vbase_path.
* search.c (get_vbase_1): Remove.
(get_vbase): Remove.
(convert_pointer_to_vbase): Remove.
(lookup_base_r): New function.
(lookup_base): New function.
* typeck.c (require_complete_type): Use lookup_base &
build_base_path instead of convert_pointer_to.
(build_component_ref): Likewise.
(build_x_function_call): Likewise.
(get_member_function_from_ptrfunc): Likewise.
(build_component_addr): Likewise.
* typeck2.c (build_scoped_ref): Likewise.
2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* cp-tree.h (CP_TYPE_QUALS): Removed.
* decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
* cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
* dump.c (cp_dump_tree): Use void* dump_info argument to match
lang-hooks prototype.
* call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
CP_TYPE_QUALS changed to cp_type_quals.
* Make-lang.in: References to c-dump.h changed to tree-dump.h.
(CXX_C_OBJS): Remove c-dump.o.
2001-11-21 Mark Mitchell <mark@codesourcery.com>
PR c++/3637
* pt.c (lookup_template_class): Ensure that all specializations
are registered on the list corresponding to the most general
template.
2001-11-20 Mark Mitchell <mark@codesourcery.com>
* call.c (non_reference): Add documentation.
(convert_class_to_reference): Do not strip reference types
from conversion operators.
(maybe_handle_ref_bind): Simplify.
(compare_ics): Correct handling of references.
2001-11-19 John Wilkinson <johnw@research.att.com>
* dump.c (dump_op): New function.
(cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
2001-11-19 Mark Mitchell <mark@codesourcery.com>
PR4629
* semantics.c (finish_sizeof): Make sure that expression created
while processing a template do not have a type.
(finish_alignof): Likewise.
* typeck.c (c_sizeof): Likewise.
(expr_sizeof): Likewise.
2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
* lex.c (cxx_finish): Call c_common_finish.
(finish_parse): Remove.
2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
when displaying error message about missing array bounds.
2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
CONST_CAST_EXPR.
* operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
* cp-tree.h (print_class_statistics): Restore.
2001-11-15 Jason Merrill <jason@redhat.com>
* method.c (use_thunk): Don't emit debugging information for thunks.
* parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
* decl.c (make_typename_type): Handle getting a class template.
* search.c (lookup_field_r): A class template is good enough for
want_type.
* call.c (convert_like_real): Only use cp_convert for the bad part.
(standard_conversion): Also allow bad int->enum.
* typeck.c (ptr_reasonably_similar): Also allow functions to
interconvert. Pointers to same-size integers are reasonably
similar.
* cvt.c (convert_to_void): If we build a new COND_EXPR, always
give it void type.
2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
PR g++/3154
* init.c (sort_base_init): Remove unreachable code.
(expand_member_init): Adjust comment to reflect reality. Simplify
and remove unreachable code.
2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
* cp-tree.h (init_reswords, cxx_init_decl_processing): New.
(cxx_init): Update prototype.
* decl.c (init_decl_processing): Rename. Move null node init
to its creation time.
* lex.c (cxx_init_options): Update.
(cxx_init): Combine with old init_parse; also call
cxx_init_decl_processing.
2001-11-14 Richard Sandiford <rsandifo@redhat.com>
* decl.c (check_initializer): Try to complete the type of an
array element before checking whether it's complete. Don't
complain about arrays with complete element types but an
unknown size.
(cp_finish_decl): Build the hierarchical constructor before
calling maybe_deduce_size_from_array_init.
2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
* Make-lang.in: Change all uses of $(manext) to $(man1ext).
2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
PR g++/4206
* parse.y (already_scoped_stmt): Remove.
(simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
2001-11-12 H.J. Lu <hjl@gnu.org>
* cvt.c (ocp_convert): Don't warn the address of a weak
function is always `true'.
2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
* cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
* cp-tree.h (print_class_statistics): Remove.
(cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
cxx_print_identifier, cxx_set_yydebug): New.
* lex.c (set_yydebug): Rename c_set_yydebug.
* ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
lang_print_xnode): Rename.
* tree.c (print_lang_statistics): Rename.
2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* class.c (dump_array): Fix format specifier warning.
2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
* cp-lang.c (LANG_HOOKS_NAME): Override.
(struct lang_hooks): Constify.
* lex.c (cxx_init_options): Update.
(lang_identify): Remove.
* parse.y (language_string): Remove.
2001-11-08 Andreas Franck <afranck@gmx.de>
* Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
DEMANGLER_CROSS_NAME): Handle program_transform_name the way
suggested by autoconf.
(GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
(c++.install-common): Use the transformed target alias names.
2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
* Make-lang.in: Update.
* cp-lang.c: Include langhooks-def.h.
2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* lex.c (copy_lang_type): Add static prototype.
2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* pt.c (unify): Handle SCOPE_REF.
2001-11-01 Jakub Jelinek <jakub@redhat.com>
* tree.c (cp_copy_res_decl_for_inlining): Adjust
DECL_ABSTRACT_ORIGIN for the return variable.
2001-10-31 Zack Weinberg <zack@codesourcery.com>
* Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
* ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
semantics.c, spew.c: Fix spelling errors.
2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
2001-10-25 Zack Weinberg <zack@codesourcery.com>
* cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
pop_everything.
2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* cp-lang.c (cxx_get_alias_set): New function.
Point LANG_HOOKS_GET_ALIAS_SET to it.
2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
* cp-tree.h (make_unbound_class_template): Prototype new function.
* decl.c (make_unbound_class_template): New function.
* decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
* error.c (dump_type): Likewise.
* mangle.c (write_type): Likewise.
* parse.y (template_parm): Likewise.
(template_argument): Use make_unbound_class_template.
* pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
(tsubst): Likewise.
(tsubst_copy): Likewise.
(unify): Likewise.
* tree.c (walk_tree): Likewise.
* typeck.c (comptypes): Likewise.
2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
extra calls into fewer ones.
2001-10-18 Alexandre Oliva <aoliva@redhat.com>
* decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
Warn when merging inline with attribute noinline.
(start_decl, start_function): Warn if inline and attribute
noinline appear in the same declaration.
2001-10-16 H.J. Lu <hjl@gnu.org>
* cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
for tree checking disabled.
2001-10-16 Hans-Peter Nilsson <hp@axis.com>
* cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
2001-10-15 Richard Sandiford <rsandifo@redhat.com>
* pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
(unify): Only handle MINUS_EXPR specially if the above flag is set
and the subtracted constant is 1. Clear the flag on recursive calls.
Set it when unifying the maximum value in an INTEGER_TYPE's range.
2001-10-15 Richard Sandiford <rsandifo@redhat.com>
* decl.c (bad_specifiers): Don't allow exception specifications
on any typedefs.
2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
* cp/lex.c (init_cp_pragma): Similarly.
2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* pt.c (lookup_template_class): Build complete template arguments
for BOUND_TEMPLATE_TEMPLATE_PARM.
2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* cp-tree.h (TYPE_BINFO): Update comment.
(BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
(TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
(TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
(copy_type): Prototype new function.
* lex.c (copy_lang_decl): Gather tree node statistics.
(copy_lang_type): New function.
(copy_type): Likewise.
(cp_make_lang_type): Create lang_type for
BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
and BOUND_TEMPLATE_TEMPLATE_PARM.
* pt.c (tsubst): Use copy_type instead of copy_node.
* search.c (lookup_field_1): Ignore TYPENAME_TYPE.
2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* pt.c (determine_specialization): Ignore functions without
DECL_TEMPLATE_INFO.
2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
PR g++/4476
* typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
2001-10-11 Jason Merrill <jason_merrill@redhat.com>
* typeck2.c (store_init_value): Don't re-digest a bracketed
initializer.
* class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
ANON_AGGR_TYPE_P.
2001-10-11 Richard Henderson <rth@redhat.com>
* class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
of an asm statement.
(build_vtbl_ref_1): Split out from build_vtbl_ref.
(build_vfn_ref): Use it to handle vtable descriptors before
calling build_vtable_entry_ref.
* decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
2001-10-10 Richard Henderson <rth@redhat.com>
* parse.y (asm_operand): Allow named operands.
* semantics.c (finish_asm_stmt): Tweek for changed location
of the operand constraint.
2001-10-09 Jason Merrill <jason_merrill@redhat.com>
* call.c (standard_conversion): Add bad conversion between
integers and pointers.
(convert_like_real): Don't use convert_for_initialization for bad
conversions; complain here and use cp_convert.
(build_over_call): Don't handle bad conversions specially.
(perform_implicit_conversion): Allow bad conversions.
(can_convert_arg_bad): New fn.
* cp-tree.h: Declare it.
* typeck.c (convert_for_assignment): Use it.
(ptr_reasonably_similar): Any target type is similar to void.
2001-10-08 Alexandre Oliva <aoliva@redhat.com>
* Make-lang.in (CXX_OBJS): Added cp-lang.o.
(cp/cp-lang.o): New rule.
* cp-tree.h: Declare hooks.
* tree.c: Make hooks non-static.
(init_tree): Don't initialize hooks here.
* lex.c: Likewise. Move definition of lang_hooks to...
* cp-lang.c: ... new file.
2001-10-08 Richard Henderson <rth@redhat.com>
* cp-tree.h (struct lang_decl_flags): Remove declared_inline.
(DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* class.c (build_vtable_entry_ref): Const-ify.
* decl.c (predefined_identifier,
initialize_predefined_identifiers): Likewise.
* init.c (build_new_1): Likewise.
* lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
Likewise.
2001-10-05 Alexandre Oliva <aoliva@redhat.com>
* optimize.c (struct inline_data): Moved to ../tree-inline.c.
(INSNS_PER_STMT): Likewise.
(remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
(copy_body, initialize_inlined_parameters): Likewise.
(declare_return_variable, inlinable_function_p): Likewise.
(expand_call_inline, expand_calls_inline): Likewise.
(optimize_inline_calls, clone_body): Likewise.
* tree.c (walk_tree): Moved to ../tree-inline.c.
(walk_tree_without_duplicates): Likewise.
(copy_tree_r, remap_save_expr): Likewise.
2001-10-04 Alexandre Oliva <aoliva@redhat.com>
* Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
(cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
* cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
(TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
(flag_inline_trees): Moved declaration to ../tree-inline.h.
(walk_tree): Moved declaration to ../tree-inline.h.
(walk_tree_without_duplicates, copy_tree_r): Likewise.
(remap_save_expr): Likewise.
* decl.c: Include tree-inline.h.
(lang_mark_tree): Don't mark inlined_fns.
* decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
* optimize.c: Include tree-inline.h.
(optimize_inline_calls): Move declaration to ../tree.h, as
non-static.
(remap_decl): Use language-independent constructs and hooks.
(remap_block, copy_body_r, declare_return_variable): Likewise.
(inlinable_function_p): Likewise. Don't test for
DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
no longer language-specific.
(optimize_inline_calls): Likewise. Make it non-static. Moved
call of dump_function to...
(optimize_function): Here...
(clone_body): New function, extracted from...
(maybe_clone_body): ... here. Build decl_map locally and pass
it on to clone_body.
* pt.c, semantics.c: Include tree-inline.h.
* tree.c: Likewise.
(cp_walk_subtrees): New language-specific hook for tree inlining.
(cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
cp_is_overload_p, cp_auto_var_in_fn_p,
cp_copy_res_decl_for_inlining): Likewise.
(walk_tree): Move language-specific constructs into...
(cp_walk_subtrees): this new function.
(copy_tree_r): Use language-independent constructs and hooks.
(init_tree): Initialize tree inlining hooks.
(remap_save_expr): Adjust prototype so that the declaration
does not require the definition of splay_tree.
2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
* rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
to build the declaration instead of the declaration itself.
2001-10-02 Jason Merrill <jason_merrill@redhat.com>
* decl2.c (cxx_decode_option): Add 'else'.
* spew.c (end_input): No longer static.
* cp-tree.h: Declare it.
* parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
* call.c (build_over_call), typeck.c (build_function_call_real):
Pass type attributes to check_function_format rather than name or
assembler name. Don't require there to be a name or assembler
name to check formats.
2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
* decl.c (init_decl_processing): Don't call
init_function_format_info. Initialize lang_attribute_table
earlier.
(builtin_function): Call decl_attributes.
(insert_default_attributes): New.
2001-10-01 Jason Merrill <jason_merrill@redhat.com>
* decl.c (grokdeclarator): Copy array typedef handling from C
frontend.
* decl.c (grokdeclarator): Copy too-large array handling from C
frontend.
2001-09-29 Alexandre Oliva <aoliva@redhat.com>
* config-lang.in (target_libs): Added target-gperf, so that we
don't try to build it if C++ is disabled.
2001-09-23 Zack Weinberg <zack@codesourcery.com>
* Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
(cp/errfn.o): Delete rule.
(cp/error.o): Depend on flags.h.
* errfn.c: Delete file.
* cp-tree.h: Declare warn_deprecated. Remove definitions of
TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
internal_error respectively. Make cp_deprecated into a macro.
Don't define cp_printer typedef or declare cp_printers.
* error.c: Include flags.h.
Delete: struct tree_formatting_info, print_function_argument_list,
print_declaration, print_expression, print_function_declaration,
print_function_parameter, print_type_id, print_cv_qualifier_seq,
print_type_specifier_seq, print_simple_type_specifier,
print_elaborated_type_specifier, print_rest_of_abstract_declarator,
print_parameter_declaration_clause, print_exception_specification,
print_nested_name_specifier, and definition of cp_printers.
(locate_error): New function.
(cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
rewritten in terms of locate_error and diagnostic.c.
(cp_tree_printer): Rename cp_printer; wire up to *_to_string
instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
(init_error): Adjust to match.
2001-09-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* Make-lang.in (CXX_C_OBJS): Add attribs.o.
2001-09-21 Richard Henderson <rth@redhat.com>
* class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
(build_vtbl_initializer): Likewise.
(build_vfn_ref): New.
* cp-tree.h: Declare it.
* call.c (build_over_call): Use it.
* decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
* typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
2001-09-21 J"orn Rennecke <amylaar@redhat.com>
* decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
Table-driven attributes.
* decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
* decl2.c (cplus_decl_attributes): Only take one attributes
parameter.
* cp-tree.c (cplus_decl_attributes): Update prototype.
* class.c (finish_struct), decl.c (start_decl, start_function),
decl2.c (grokfield), friend.c (do_friend), parse.y
(parse_bitfield): Update calls to cplus_decl_attributes.
* decl.c (grokdeclarator): Take a pointer to a single ordinary
attribute list.
* decl.h (grokdeclarator): Update prototype.
* decl2.c (grokfield): Take a single ordinary attribute list.
* friend.c (do_friend): Likewise.
* decl.c (shadow_tag, groktypename, start_decl,
start_handler_parms, grokdeclarator, grokparms, start_function,
start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
(process_template_parm, do_decl_instantiation): Pass single
ordinary attribute lists around.
* decl.c (grokdeclarator): Correct handling of nested attributes.
Revert the patch
1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (grokdeclarator): Embedded attrs bind to the right,
not the left.
.
* cp-tree.h (cp_valid_lang_attribute): Remove declaration
(cp_attribute_table): Declare.
* decl.c (valid_lang_attribute): Don't define.
(lang_attribute_table): Define.
(init_decl_processing): Initialize lang_attribute_table instead of
valid_lang_attribute.
* tree.c (cp_valid_lang_attribute): Remove.
(handle_java_interface_attribute, handle_com_interface_attribute,
handle_init_priority_attribute): New functions.
(cp_attribute_table): New array.
* decl2.c (import_export_class): Don't use
targetm.valid_type_attribute.
2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
* Make-lang.in (cp/error.o): Depend on real.h
* error.c: #include "real.h"
2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
xmalloc/strcpy/strcat.
2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
Const-ification.
* pt.c (tsubst_decl): Likewise.
2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* decl2.c (lang_f_options): Const-ification.
* lex.c (cplus_tree_code_name): Likewise.
* spew.c (yyerror): Likewise.
2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
PR c++/3986
* class.c (force_canonical_binfo_r): Check & move an indirect
primary base first.
(force_canonical_binfo): Check that it's not already
canonical.
(mark_primary_virtual_base): Remove BINFO parameter.
(mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
Remove TYPE_NONCOPIED_PARTS.
* cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
CLASSTYPE_PURE_VIRTUALS.
(TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
* class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
(layout_class_type): Don't call fixup_inline_methods here ...
(finish_struct_1): ... call it here.
2001-09-04 Mark Mitchell <mark@codesourcery.com>
* decl.c (duplicate_decls): Remove code deadling with
DECL_SAVED_INSNS.
* decl2.c (finish_file): Likewise.
* pt.c (instantiate_decl): Likewise.
* semantics.c (expand_body): Don't defer local functions if
they wouldn't be deferred for some other reason. Don't
generate RTL for functions that will not be emitted.
(genrtl_start_function): Remove code deadling with
DECL_SAVED_INSNS.
(genrtl_finish_function): Likewise.
2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
PR c++/4203
* call.c (build_over_call): Do not optimize any empty base
construction.
2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* error.c (dump_template_decl): Output template parameters
together with their specifiers.
Output `class' prefix for template template parameter.
(dump_decl): Fix formatting.
2001-08-30 Kurt Garloff <garloff@suse.de>
* optimize.c (inlinable_function_p): Allow only smaller single
functions. Halve inline limit after reaching recursive limit.
2001-08-30 Joern Rennecke <amylaar@redhat.com>
Jason Merrill <jason_merrill@redhat.com>
* class.c (build_vtable_entry_ref): Subtract in char*, not
ptrdiff_t.
2001-08-23 Jason Merrill <jason_merrill@redhat.com>
* tree.c (cp_build_qualified_type_real): Use get_qualified_type.
(build_cplus_array_type): Use cp_build_qualified_type, not
TYPE_MAIN_VARIANT, to get an unqualified version.
* decl2.c (grok_alignof): Lose.
(build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
* typeck.c (c_alignof): Lose.
* semantics.c (finish_sizeof, finish_alignof): New.
* parse.y: Use them.
* cp-tree.h: Declare them.
2001-08-22 Jason Merrill <jason_merrill@redhat.com>
* pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
* tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
2001-08-19 Jakub Jelinek <jakub@redhat.com>
* typeck2.c (add_exception_specifier): Only require complete type if
not in processing template declaration.
2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
GNU_xref_start_scope and GNU_xref_end_scope.
* tree.c (TYPE_HASH): Moved to ../tree.h.
2001-08-16 Mark Mitchell <mark@codesourcery.com>
* cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
on COMPOUND_EXPRs.
2001-08-14 Richard Henderson <rth@redhat.com>
* class.c, cp-tree.h (build_vfn_ref): Remove.
* call.c, rtti.c: Replace all refernces with build_vtbl_ref.
2001-08-13 Mark Mitchell <mark@codesourcery.com>
* call.c (build_over_call): Mark COMPOUND_EXPRs generated for
empty class assignment as having side-effects to avoid
spurious warnings.
2001-08-13 Zack Weinberg <zackw@panix.com>
* Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
* except.c: Include libfuncs.h.
2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
* decl.c (grokdeclarator): Clarify diagnostic message.
2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* decl2.c (do_nonmember_using_decl): Replace using directive
with using declaration in the error message.
2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
criterion to avoid rebuilding expression tree instead of
processing_template_decl.
2001-08-07 Jason Merrill <jason_merrill@redhat.com>
Support named return value optimization for inlines, too.
* decl.c (finish_function): Nullify returns here.
* semantics.c (genrtl_start_function): Not here.
(cp_expand_stmt): Don't mess with CLEANUP_STMTs.
(nullify_returns_r): No longer static. Just clear RETURN_EXPR.
Also nullify the CLEANUP_STMT for the nrv.
* cp-tree.h: Declare it.
* optimize.c (declare_return_variable): Replace the nrv with the
return variable.
* typeck.c (check_return_expr): Be more flexible on alignment check.
Ignore cv-quals when checking for a matching type.
2001-08-09 Richard Henderson <rth@redhat.com>
* decl2.c (finish_objects): Use target hooks instead of
assemble_constructor and assemble_destructor.
2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
* g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
PR c++/3820
Stop using TYPE_NONCOPIED_PARTS.
* call.c (build_over_call): Be careful when copy constructing
or assigning to an empty class.
* class.c (check_bases_and_members): It has a
COMPLEX_ASSIGN_REF if it has a vptr.
(layout_class_type): Don't add empty class padding to
TYPE_NONCOPIED_PARTS.
(finish_struct_1): Don't add the VFIELD either.
* cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
initialization.
2001-08-07 Jason Merrill <jason_merrill@redhat.com>
* tree.c (walk_tree): Walk siblings even if !walk_subtrees.
2001-08-06 Richard Henderson <rth@redhat.com>
* decl2.c (finish_objects): Pass a symbol_ref and priority to
assemble_{constructor,destructor}. Remove priority handling.
2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
Don't allow template-id in using-declaration.
* decl2.c (validate_nonmember_using_decl): Handle template-ids.
(do_class_using_decl): Likewise.
2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
* cp/spew.c (read_token): No need to pop buffers.
2001-08-02 Stan Shebs <shebs@apple.com>
* cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
(fnaddr_from_vtable_entry): Remove decl.
* method.c (use_thunk): Update comment.
2001-08-01 Andrew Cagney <ac131313@redhat.com>
* repo.c (get_base_filename): Change return value to const char
pointer.
2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
Kill -fhonor-std.
* NEWS: Document.
* cp-tree.h (flag_honor_std): Remove.
(CPTI_FAKE_STD): Remove.
(std_node): Remove comment about it being NULL.
(fake_std_node): Remove.
* decl.c (in_fake_std): Remove.
(walk_namespaces_r): Remove fake_std_node check.
(push_namespace): Remove in_fake_std code.
(pop_namespace): Likewise.
(lookup_name_real): Remove fake_std_node check.
(init_decl_processing): Always create std_node. Always add
std:: things there.
(builtin_function): Always put non '_' fns in std.
* decl2.c (flag_honor_std): Remove.
(lang_f_options): Remove honor-std.
(unsupported_options): Add honor-std.
(set_decl_namespace): Remove fake_std_node check.
(validate_nonmember_using_decl): Likewise.
(do_using_directive): Likewise.
(handle_class_head): Likewise.
* dump.c (cp_dump_tree): Likewise.
* except.c (init_exception_processing): Adjust.
* init.c (build_member_call): Remove fake_std_node check.
(build_offset_ref): Likewise.
* lang-options.h: Remove -fhonor-std, -fno-honor-std.
* rtti.c (init_rtti_processing): Adjust.
2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
* tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
operand while calling cp_tree_equal.
2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
The 3.0 ABI no longer has vbase pointer fields.
* cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
FORMAT_VBASE_NAME): Remove.
* method.c (do_build_copy_constructor): Adjust.
(do_build_assign_ref): Adjust.
* search.c (lookup_field_r): Adjust.
* typeck.c (build_component_ref): Adjust.
The 3.0 ABI always has a vtable pointer at the start of every
polymorphic class.
* rtti.c (build_headof_sub): Remove.
(build_headof): Adjust.
(get_tinfo_decl_dynamic): No need to check flag_rtti
here. Adjust.
(create_real_tinfo_var): Explain why we need a hidden name.
2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
PR c++/3631
* class.c (update_vtable_entry_for_fn): The fixed adjustment
of a virtual thunk should be from declaring base.
2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
* class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
the shared virtual base, so preserving inheritance graph order.
2001-07-30 Andreas Jaeger <aj@suse.de>
* decl2.c: Remove unused var global_temp_name_counter.
2001-07-28 Richard Henderson <rth@redhat.com>
* method.c (pending_inlines): Remove.
2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
* class.c (mark_primary_virtual_base): Don't adjust base
offsets here.
(dfs_unshared_virtual_bases): Adjust them here.
(mark_primary_bases): Explain why we adjust at the end.
2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
* class.c (finish_struct_1): When copying the primary base's
VFIELD, make sure we find it is at offset zero.
2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
tsubst_expr for default template arguments.
2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
PR c++/3621
* spew.c (yylex): Only copy the token's lineno, if it is
nonzero.
2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
PR c++/3624
* call.c (resolve_args): Simplify, call
convert_from_reference.
(build_new_op): Resolve and convert from reference ARG1
earlier. Adjust ARG2 & ARG3 resolve and conversion.
2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (last_function_parm_tags): Remove.
(current_function_parm_tags): Remove.
(init_decl_processing): Adjust.
(start_function): Adjust.
(store_parm_decls): Adjust.
PR c++/3152
* decl.c (grokdeclarator): Detect when a function typedef is
declaring a function, and create last_function_parms correctly.
2001-07-25 Jason Merrill <jason_merrill@redhat.com>
* call.c (joust): Only prefer a non-builtin candidate to a builtin
one if they have the same signature.
* cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
it rather than toplevel_bindings_p. Give it a mangled name if static.
(convert_to_reference): Adjust.
* decl2.c (get_temp_name): Lose.
* mangle.c (mangle_ref_init_variable): New fn.
(mangle_guard_variable): Strip the ref-init header.
* cp-tree.h: Adjust.
* decl.c (cp_finish_decl): Add the DECL_STMT after processing the
initializer.
(grok_reference_init): Always use DECL_INITIAL.
2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
PR c++/3416
* call.c (build_conditional_expr): Recheck args after
conversions.
* cp-tree.h (build_conditional_expr): Move to correct file.
* typeck.c (decay_conversion): Diagnose any unknown types
reaching here.
(build_binary_op): Don't do initial decay or default
conversions on overloaded functions.
(build_static_cast): Don't do a decay conversion here.
2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
PR c++/3543
* typeck.c (condition_conversion): Resolve an OFFSET_REF.
* expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
* class.c (build_vtbl_or_vbase_field): Remove, move into ...
(create_vtbl_ptr): ... here.
2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
* class.c (build_vbase_offset_vbtl_entries): Look for
non-primary base of which we are a sub vtable.
2001-07-24 Phil Edwards <pme@sources.redhat.com>
* semantics.c (finish_this_expr): Remove unused code.
2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
Simplify rtti, now we've only one ABI.
* cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
CPTI_TINFO_VAR_ID.
(tinfo_decl_id, tinfo_var_id): Remove.
(get_typeid_1): Remove.
* rtti.c
(init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
(typeid_ok_p): New function.
(build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
(get_tinfo_decl): Remove old abi documentation.
(tinfo_from_decl): Remove.
(get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
(get_typeid_1): Remove.
(get_base_offset): Remove.
(synthesize_tinfo_var): Absorb get_base_offset.
(create_real_tinfo_var): Don't use tinfo_decl_id.
2001-07-23 Graham Stott <grahams@redhat.com>
* cp/class.c (type_requires_array_cookie): Fix use of uninitialized
variable has_two_argument_delete_p.
2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
* cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
(CPTI_INDEX_IDENTIFIER): Remove.
(CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
(delta2_identifier): Remove.
(index_identifier): Remove.
(pfn_or_delta2_identifier): Remove.
(flag_vtable_thunks): Remove.
(VTABLE_DELTA2_NAME): Remove.
(VTABLE_INDEX_NAME): Remove.
(FNADDR_FROM_VTABLE_ENTRY): Adjust.
(vfunc_ptr_type_node): Adjust.
(VTABLE_NAME_PREFIX): Adjust.
(build_vfn_ref): Lose first parameter.
(fixup_all_virtual_upcast_offsets): Remove.
* decl.c (initialize_predefined_identifiers): Remove
delta2_identifier, index_identifier, pfn_or_delta2_identifier.
(init_decl_processing): Remove no-vtable-thunk code.
* decl2.c (flag_vtable_thunks): Remove.
(mark_vtable_entries): Remove no-vtable-thunk code.
* error.c (dump_decl): Remove no-vtable-thunk code.
(dump_expr): Adjust ptr to member function code.
* init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
code.
* rtti.c (build_headof): Remove no-vtable-thunk code.
(get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
* search.c (get_base_distance): Remove expand_upcast_fixups case.
(virtual_context) Remove.
(expand_upcast_fixups): Remove.
(fixup_virtual_upcast_offsets): Remove.
(fixup_all_virtual_upcast_offsets): Remove.
* typeck.c (get_member_function_from_ptrfunc): Remove
no-vtable-thunk code.
* call.c (build_over_call): Adjust call to build_vfn_ref.
* class.c (build_vfn_ref): Lose first parameter. Remove
no-vtable-thunk code.
(build_rtti_vtbl_entries): Remove no-vtable-thunk code.
(build_vtable_entry): Remove no-vtable-thunk code.
2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
Remove old-abi remnants. Remove comments about old abi
behavior. Remove references to 'new-abi' in comments.
* cp-tree.h: Adjust comments.
(vbase_offsets_in_vtable_p): Delete.
(vcall_offsets_in_vtable_p): Delete.
(vptrs_present_everywhere_p): Delete.
(all_overridden_vfuns_in_vtables_p): Delete.
(merge_primary_and_secondary_vtables_p): Delete.
(TYPE_CONTAINS_VPTR_P): Adjust.
(VTT_NAME_PREFIX): Remove.
(CTOR_VTBL_NAME_PREFIX): Remove.
(init_vbase_pointers): Remove.
* class.c: Adjust coments.
(build_vbase_pointer_fields): Delete.
(build_vbase_pointer): Remove old-abi code.
(build_secondary_vtable): Likewise.
(modify_all_vtables): Likewise.
(create_vtable_ptr): Likewise.
(layout_class_type): Likewise.
(finish_struct_1): Likewise.
(finish_vtbls): Likewise.
(dfs_finish_vtbls): Delete.
(build_vbase_offset_vtbl_entries): Remove old-abi code.
* cvt.c: Adjust comments.
* decl.c: Adjust comments.
* decl2.c: Adjust comments.
* init.c: Adjust comments.
(construct_virtual_bases): Remove old-abi code.
* lang-specs.h: Remove -fno-new-abi.
* mangle.c: Adjust comments.
* rtti.c: Adjust comments.
(get_base_offset): Remove old-abi-code.
* search.c: Adjust comments.
(dfs_init_vbase_pointers): Remove.
(dfs_vtable_path_unmark): Remove.
(init_vbase_pointers): Remove.
* semantics.c: Adjust comments.
(emit_associated_thunks): Remove old-abi code.
* typeck.c: Adjust comments.
2001-07-20 Daniel Berlin <dan@cgsoftware.com>
* Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
params.h.
2001-07-19 Mark Mitchell <mark@codesourcery.com>
* class.c (finish_struct_anon): Forbid nested classes.
2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
* decl2.c: Don't include dwarfout.h and dwarf2out.h.
* optimize.c: Include debug.h.
(maybe_clone_body): Use debug hook.
* semantics.c: Include debug.h.
(expand_body): Use debug hook.
2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
* spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
2001-07-18 Mark Mitchell <mark@codesourcery.com>
* class.c (type_requires_array_cookie): New function.
(check_methods): Don't try to figure out whether the type needs a
cookie here.
(check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
* cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
(TYPE_VEC_NEW_USES_COOKIE): Reimplement.
* pt.c (instantiate_class_template): Don't set
TYPE_VEC_DELETE_TAKES_SIZE.
* NEWS: Document ABI changes from GCC 3.0.
2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
* NEWS (Changes in GCC 3.0): Fix typo.
2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
* decl2.c (cplus_decl_attributes): Take a pointer to the node to
which attributes are to be attached, and a flags argument. Update
call to decl_attributes.
(grokfield): Update call to decl_attributes.
* class.c (finish_struct): Update call to cplus_decl_attributes.
* cp-tree.h (cplus_decl_attributes): Update prototype.
* decl.c (start_decl, grokdeclarator, start_function): Update
calls to decl_attributes and cplus_decl_attributes.
* friend.c (do_friend): Update call to cplus_decl_attributes.
* parse.y (parse_bitfield): Update call to cplus_decl_attributes.
2001-07-12 Mark Mitchell <mark@codesourcery.com>
* decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
for `register' variables with an asm-specification.
2001-07-11 Mark Mitchell <mark@codesourcery.com>
* semantics.c (finish_asm_stmt): Mark the output operands
to an asm addressable, if necessary.
2001-07-11 Ben Elliston <bje@redhat.com>
* Revert this change -- there is a subtle bug.
PR c++/80
* decl.c (finish_enum): New "attributes" argument; pass it to
cplus_decl_attributes. Use a narrower type if the enum is packed.
* cp-tree.h (finish_enum): Adjust prototype.
* parse.y (enum_head): New non-terminal.
(structsp): Use it. Enums now may be preceded or followed by
optional attributes -- pass their chained tree to finish_enum().
* pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
2001-07-10 Mark Mitchell <mark@codesourcery.com>
* pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
variables.
2001-07-10 Jason Merrill <jason_merrill@redhat.com>
* semantics.c (cp_expand_stmt): Fix for null
current_function_return_value.
2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
* call.c (build_op_delete_call): Initialize fn.
(convert_like_real): Delete conditional.
(joust): Initialize *w and *l.
* class.c: Add prototype for binfo_ctor_vtable.
(get_primary_binfo): Initialize result.
* init.c (build_java_class_ref): Initialize name.
2001-07-09 Erik Rozendaal <dlr@acm.org>
* typeck.c (unary_complex_lvalue): Do not duplicate the
argument to modify, pre-, or post-increment when used as an
lvalue and when the argument has side-effects.
2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
* decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
(start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
cplus_decl_attributes even if attrs is NULL.
* friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
* decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
calls to decl_attributes.
2001-07-06 Ira Ruben <ira@apple.com>
* cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
be DECL_TEMPLATE_RESULT.
2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* cp-tree.h (copy_template_template_parm): Rename to ...
(bind_template_template_parm): ... here.
* tree.c (copy_template_template_parm): Rename to ...
(bind_template_template_parm): ... here. Remove the case when
NEWARGS is NULL_TREE.
(copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
BOUND_TEMPLATE_TEMPLATE_PARM.
* pt.c (lookup_template_class): Adjust.
2001-07-05 Jason Merrill <jason_merrill@redhat.com>
* cvt.c (convert_lvalue): New fn.
* cp-tree.h: Declare it.
* method.c (do_build_assign_ref): Use it.
(do_build_copy_constructor): Convert parm to base types
before calling base constructors.
* typeck.c (check_return_expr): Check DECL_ALIGN instead of
DECL_USER_ALIGN. Check flag_elide_constructors instead of
optimize.
* semantics.c (cp_expand_stmt): Don't destroy the named return value.
2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
* optimize.c (optimize_inline_calls): New function, broken out
of ...
(optimize_function): ... here. Call it. Don't inline if it is
a thunk.
(dump_function): Print name of dump flag causing this dump.
* semantics.c (expand_body): Move thunk inline check to
optimize_function.
2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
* typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
(comptypes): Use target.comp_type_attributes.
2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
* error.c (lang_print_error_function): Add a `diagnostic_context *'
parameter. Tweak.
2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
* decl2.c (import_export_class): Update.
2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
* error.c (init_error): Adjust settings.
2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
* error.c (init_error): Adjust settings.
2001-06-19 Richard Sandiford <rsandifo@redhat.com>
* except.c (initialize_handler_parm): Expect __cxa_begin_catch to
return pointers to data members by reference rather than by value.
2001-06-18 Jason Merrill <jason_merrill@redhat.com>
Implement the Named Return Value optimization.
* cp-tree.h (struct cp_language_function): Add x_return_value.
(current_function_return_value): Now a macro.
* decl.c: Don't define it.
(define_label, finish_case_label): Don't clear it.
(init_decl_processing): Don't register it with GC.
* semantics.c (genrtl_finish_function): Don't check it for
no_return_label. Copy the RTL from the return value to
current_function_return_value and walk, calling...
(nullify_returns_r): ...this new fn.
* typeck.c (check_return_expr): Set current_function_return_value.
2001-06-15 Jason Merrill <jason_merrill@redhat.com>
* class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
sharing a ctor vtable with. Merge code for cases 1 and 2.
(binfo_ctor_vtable): New fn.
(build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
2001-06-14 Jason Merrill <jason_merrill@redhat.com>
* class.c (dfs_find_final_overrider): Fix logic.
* class.c (update_vtable_entry_for_fn): Uncomment optimization to use
virtual thunk instead of non-virtual.
(get_matching_virtual): Uncomment.
* pt.c (unify): Don't recurse between the POINTER_TYPE and the
OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
PARM, not ARG.
2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
* class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
we've not emerged from the hierarchy of RTTI_BINFO on reaching
a non-virtual base.
2001-06-13 Mark Mitchell <mark@codesourcery.com>
* NEWS: Update release number.
2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
PR c++/3130, c++/3131, c++/3132
* cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
* class.c (force_canonical_binfo_r): Move
BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
virtual bases unless they're primary and what they're primary
too has been moved.
(dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
derived binfo.
(mark_primary_bases): Use BINFO_UNSHARED_MARKED.
(layout_nonempty_base_or_field): Add most derived type
parameter. Adjust.
(layout_empty_base): Likewise.
(build_base_field): Likewise.
(build_base_fields): Likewise.
(propagate_binfo_offsets): Add most derived type
parameter. Skip non canonical virtual bases too.
(dfs_set_offset_for_unshared_vbases): Don't skip primary
bases. Do skip canonical bases.
(layout_virtual_bases): Adjust.
(layout_class_type): Adjust.
(dfs_get_primary_binfo): Build list of virtual primary base
candidates.
(get_primary_binfo): Check that the shared virtual primary
base candidate was found first.
(accumulate_vtbl_inits): Don't do anything for non-vptr
containing binfos. For case 1 primary virtual bases, keep
checking that we've not emerged from the hierarchy of RTTI_BINFO.
2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
PR c++/3089
* class.c (dfs_accumulate_vtbl_inits): Always walk down the
hierarchy looking for primary bases for a ctor
vtable. Recursively call oneself, if we meet our primary via
this route and haven't met it yet via inheritance graph order.
2001-06-11 Mark Mitchell <mark@codesourcery.com>
* lang-options.h: Emit documentation for -fno-honor-std, not
-fhonor-std.
2001-06-10 Alexandre Oliva <aoliva@redhat.com>
* typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
Don't clobber delta.
(expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
2001-06-10 Mark Mitchell <mark@codesourcery.com>
Gabriel Dos Reis <gdr@codesourcery.com>
* Make-lang.in (cp/call.o): Depend on diagnostic.h
(cp/typeck.o): Depend on diagnostic.h
(cp/typeck2.o): Depend on diagnostic.h
(cp/repo.o): Depend on dignostic.h
* typeck.c: #include diagnostic.h
(convert_for_initialization): Remove extern declaration for
warningcount and errorcount.
* call.c: #include diagnostic.h
(convert_like_real): Remove extern declaration for warnincount and
errorcount.
* repo.c: #include diagnostic.h
* typeck2.c: #include diagnostic.h
2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
in previous change.
2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
PR c++/2929
* friend.c (do_friend): Use push_decl_namespace for classes at
namespace scope.
2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
Jason Merrill <jason_merrill@redhat.com>
PR c++/3061
* class.c (build_secondary_vtable): Use assert, rather than an error
message.
(dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
(dfs_accumulate_vtbl_inits): A lost primary virtual base may
be between ORIG_BINFO and RTTI_BINFO, but neither of them.
Don't set BINFO_VTABLE for a primary virtual base.
2001-06-07 Mark Mitchell <mark@codesourcery.com>
* decl.c (duplicate_decls): Update source position information
when a template function is defined.
2001-06-07 Phil Edwards <pme@sources.redhat.com>
* lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
PR c++/2914
* decl.c (pushtag): Don't push into a complete type's scope.
2001-06-06 Jason Merrill <jason_merrill@redhat.com>
* cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
(struct lang_decl_flags): Lose generate_with_vtable_p.
(BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
* class.c (copy_virtuals): Adjust.
* decl2.c (mark_vtable_entries): Adjust.
* method.c (make_thunk, build_vtable_entry): Adjust.
* class.c (update_vtable_entry_for_fn): Only look as far as the
first defining class.
(build_vtbl_initializer): Put nothing in the slot for a function only
defined in a lost primary virtual base.
(add_vcall_offset_vtbl_entries_1): Use the same code for
the lost primary case and the normal case.
(dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
(get_vfield_offset, get_derived_offset): Lose.
(dfs_find_final_overrider): Use look_for_overrides_here.
(get_matching_virtual): New fn.
* semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
not BV_VCALL_INDEX.
* search.c (look_for_overrides_here): Split out from...
(look_for_overrides_r): Here.
* class.c (find_final_overrider): Return error_mark_node on error.
* decl2.c (key_method): #if 0 accidental change.
2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
* call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
(build_over_call): Likewise.
* decl.c (grokparms): Likewise.
* pt.c (tsubst_decl): Likewise.
* typeck.c (convert_arguments): Likewise.
2001-06-05 Mark Mitchell <mark@codesourcery.com>
* semantics.c (begin_class_definition): Robustify.
* pt.c (instantiate_decl): Tell the repository code about the
clones, not the cloned functions.
* repo.c (repo_template_used): Explicitly instantiate the cloned
function, not the clones.
2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
* call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
ICS_BAD_FLAG on created conversion.
(compare_ics): Break out rank.
2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (xref_tag): Remove extraneous %s on dependent name
lookup warning.
2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
* class.c (layout_vtable_decl): Fix off by one error on
build_index_type.
(build_vtt): Likewise.
(build_ctor_vtbl_group): Likewise.
2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
* class.c (maybe_indent_hierarchy): New function.
(dump_class_hierarchy_r): Add flags. Dump extra binfo
information, if enabled. Use maybe_indent_hierarchy. Adjust
output format.
(dump_class_hierarchy): Adjust prototype. Adjust output format.
(dump_array, dump_vtable, dump_vtt): New functions.
(finish_struct_1): Adjust hierarchy dumping.
(initialize_vtable): Call dump_vtable.
(build_vtt): Call dump_vtt.
(build_ctor_vtbl_group): Call dump_vtable.
* decl2.c (flag_dump_class_layout): Remove.
(cxx_decode_option): Remove dump translation unit
and dump class hierarchy check. Call dump_switch_p.
(finish_file): Adjust dumping.
(dump.c): Only dump base classes if not TDF_SLIM.
Only dump namespace members if not TDF_SLIM.
* optimize.c (dump_function): New function.
(optimize_function): Call dump_function.
* semantics.c (expand_body): Use dump_enabled_p.
2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
PR g++/2936
Part missed from first commit
* decl2.c (finish_anon_union): Copy context.
2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
PR g++/2936
* optimize.c (remap_decl): Remap anonymous aggregate members too.
2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
PR g++/2823
* semantics.c (expand_body): Don't optimize thunks.
2001-05-25 Sam TH <sam@uchicago.edu>
* cp-tree.h lex.h: Fix header include guards.
2001-05-25 Mark Mitchell <mark@codesourcery.com>
* decl.c (init_decl_processing): Tweak.
2001-05-24 Mark Mitchell <mark@codesourcery.com>
* decl.c (duplicate_decls): Tidy.
(init_decl_processing): Always set flag_no_builtin.
2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
PR c++/2184
* decl2.c (do_local_using_decl): Push the decls, even in a
template.
2001-05-22 Mark Mitchell <mark@codesourcery.com>
* optimize.c (initialize_inlined_parameters): Don't set
TREE_READONLY for a VAR_DECL taking the place of an inlined
PARM_DECL.
2001-05-22 Jason Merrill <jason_merrill@redhat.com>
* class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
* tree.c (cp_valid_lang_attribute): Warn about use of com_interface
attribute.
2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
* parse.y: Refer to compound literals as such, not as
constructor-expressions.
2001-05-21 Mark Mitchell <mark@codesourcery.com>
* call.c (build_op_delete_call): Ignore exception-specifications
when looking for matching delete operators.
* init.c (build_new_1): Compute whether or not the allocation
function used is a placement allocation function or not, and
communicate this information to build_op_delete_call.
2001-05-21 Jason Merrill <jason_merrill@redhat.com>
* class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
(build_vtbl_ref): Adjust.
(dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
* decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
Re-add vtable-gc.
(unsupported_options): Correspondingly.
* decl2.c (maybe_make_one_only): Check flag_weak, not
supports_one_only().
* cp-tree.def (START_CATCH_STMT): Lose.
* dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
* tree.c (cp_statement_code_p): Don't case it.
* semantics.c (cp_expand_stmt): Likewise.
* cp-tree.h (START_CATCH_TYPE): Lose.
(HANDLER_TYPE): New.
* except.c (expand_start_catch_block): Don't start any blocks.
Return the type.
(expand_end_catch_block): Don't end any blocks.
* parse.y (handler): Don't pass anything from finish_handler_parms
to finish_handler.
* pt.c (tsubst_expr): Likewise.
* semantics.c (begin_handler): Call note_level_for_catch here.
(finish_handler_parms): Don't return anything.
(genrtl_catch_block, begin_catch_block): Lose.
(genrtl_handler): Call expand_start_catch here.
2001-05-18 Jason Merrill <jason_merrill@redhat.com>
* class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
(get_vtable_decl, build_vtt): Not here.
2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
PR c++/2781
* optimize.c (update_cloned_parm): Copy addressability and other
flags.
2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* pt.c (determine_specialization): Ignore artificial functions.
2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
* cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
(C_RID_CODE): Remove.
* lex.c (cxx_init_options): Call set_identifier_size. Update.
(init_parse): Don't do it here.
2001-05-18 Diego Novillo <dnovillo@redhat.com>
* decl2.c (finish_objects): Use the original SYMBOL_REF from the
function declaration to avoid stripping the symbol's attributes.
2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (pushdecl): Adjust error string.
(xref_tag): Adjust friend class injection warning. Remove the
inherited name from the class shadowed scope.
2001-05-17 Mark Mitchell <mark@codesourcery.com>
* except.c (cp_protect_cleanup_actions): New function.
(init_exception_processing): Don't set protect_cleanup_actions
here. Do set lang_protect_cleanup_actions.
2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
* spew.c (read_token): Call yyerror on all unexpected tokens.
2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
* init.c (member_init_ok_or_else): Take a tree rather than
string for name.
(expand_member_init): Adjust.
2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
* decl.c (duplicate_decls): Suppress warning about duplicate
decls if the first decl is a friend.
2001-05-12 Zack Weinberg <zackw@stanford.edu>
* except.c (choose_personality_routine): Export. Add
explanatory comment. Take an enum languages, not a boolean.
(initialize_handler_parm): Adjust to match.
* cp-tree.h: Prototype choose_personality_routine.
* lex.c (handle_pragma_java_exceptions): New function.
(init_cp_pragma): Register #pragma GCC java_exceptions.
2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
* method.c (build_mangled_C99_name): Remove unused prototype.
2001-05-12 Alexandre Oliva <aoliva@redhat.com>
* cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
* typeck.c (get_member_function_from_ptrfunc,
build_ptrmemfunc, expand_ptrmemfunc_cst): Take
TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
Reverted Geoff Keating's 2001-05-03's patch.
2001-05-11 Ira Ruben <ira@apple.com>
* cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
* cp-tree.h (finish_label_expr, lookup_label): Delete.
* parse.y: Update for '&&'; don't issue warning here.
* semantics.c (finish_label_expr): Delete.
2001-05-07 Mark Mitchell <mark@codesourcery.com>
* splay-tree.h (splay_tree_max): New function.
(splay_tree_min): Likewise.
2001-05-03 Geoffrey Keating <geoffk@redhat.com>
* cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
(pfn_vflag_identifier): Define.
Update comment about layout of pointer functions.
(build_ptrmemfunc1): Update prototype.
(expand_ptrmemfunc_cst): Update prototype.
* decl.c (initialize_predefined_identifiers): Initialize
pfn_vflag_identifier.
(build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
an extra field to the type.
* expr.c (cplus_expand_constant): Pass 'flag' between
expand_ptrmemfunc_cst and build_ptrmemfunc1.
* typeck.c (get_member_function_from_ptrfunc): When
FUNCTION_BOUNDARY < 16, look at additional field to determine
if a pointer-to-member is a real pointer or a vtable offset.
(build_ptrmemfunc1): Add new parameter to contain extra field.
(build_ptrmemfunc): Pass the extra field around.
(expand_ptrmemfunc_cst): Add new parameter to return extra field.
(pfn_from_ptrmemfunc): Ignore the extra field.
2001-05-03 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (flag_inline_trees): Update documentation.
* decl.c (init_decl_processing): Adjust handling of
flag_inline_functions and flag_inline_trees to support -O3.
(grokfndecl): Set DECL_INLINE on all functions if that's what
the user requested.
(save_function_data): Clear DECL_INLINE in
current_function_cannot_inline is non-NULL.
* decl2.c (flag_inline_trees): Update documentation.
2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
* dump.c (cp_dump_tree, USING_STMT case): New case.
* tree.c (cp_statement_code_p): Add USING_STMT.
* decl2.c (do_using_directive): Add the using directive statement.
* tree.c (walk_tree): Reformat an if block.
2001-05-02 Mark Mitchell <mark@codesourcery.com>
* decl.c (compute_array_index_type): Don't try to do anything with
the indices when processing a template.
2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* call.c: NULL_PTR -> NULL.
* class.c: Likewise.
* cvt.c: Likewise.
* decl.c: Likewise.
* decl2.c: Likewise.
* except.c: Likewise.
* init.c: Likewise.
* rtti.c: Likewise.
* search.c: Likewise.
* tree.c: Likewise.
* typeck.c: Likewise.
* typeck2.c: Likewise.
2001-05-02 Mark Mitchell <mark@codesourcery.com>
* decl2.c (do_using_directive): Revert previous patch.
2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.def (USING_STMT): New statement node.
* cp-tree.h (USING_STMT_NAMESPACE): New macro.
* decl2.c (do_using_directive): Add USING_STMT to statement
tree. Don't emit errors when processing template decl.
* pt.c (tsubst_expr, USING_STMT case): New case.
* semantics.c (cp_expand_stmt, USING_STMT case): New case.
2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
* call.c (build_new_op): Convert args from reference here.
(build_conditional_expr): Don't convert here.
2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
* spew.c (last_token_id): New static variable.
(read_token): Set it here.
(yyerror): Use it here.
2001-04-30 Richard Henderson <rth@redhat.com>
* cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
* decl.c: Likewise.
2001-04-30 Mark Mitchell <mark@codesourcery.com>
* gxxint.texi: Remove.
* Make-lang.in: Remove all traces of gxxint.texi.
2001-04-30 Mark P Mitchell <mark@codesourcery.com>
* decl2.c (start_static_initialization_or_destruction): Correct
logic to handle the -fno-use-cxa-atexit case.
2001-04-30 Mark Mitchell <mark@codesourcery.com>
* optimize.c (update_cloned_parm): New function.
(maybe_clone_body): Use it. Update the `this' parameter too.
2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
* decl2.c (unsupported_options): Add new-abi.
* lang-options.h: Remove no longer supported options.
2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
* except.c (can_convert_eh): Don't check template parms,
typename types etc.
2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
* optimize.c (maybe_clone_body): Copy parameter names and locations.
2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (adjust_clone_args): Prototype new function.
* class.c (adjust_clone_args): New function.
* decl.c (start_function): Call it for in charge ctors.
2001-04-26 Mark Mitchell <mark@codesourcery.com>
* method.c (use_thunk): Make sure that thunks really are emitted
when requested.
2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
* mangle.c (write_chars): New macro.
(hwint_to_ascii): New function
(write_number): Use it.
(write_integer_cst): Deal with really big numbers.
2001-04-25 Mark Mitchell <mark@codesourcery.com>
* optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
the clone.
2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (grokdeclarator): Set context of namespace scope
TYPE_DECLS.
2001-04-24 Zack Weinberg <zackw@stanford.edu>
* cp/optimize.c: Include hashtab.h.
(struct inline_data): Add tree_pruner.
(expand_call_inline, expand_calls_inline): Use it when calling
walk_tree.
(optimize_function): Initialize and free tree_pruner.
2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
Lazy __FUNCTION__ generation.
* cp-tree.def (FUNCTION_NAME): Remove.
* cp-tree.h (function_name_declared_p): Remove.
(cp_fname_init): Prototype.
* decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
don't call declare_function_name. Call start_fname_decls.
(cp_make_fname_decl): Adjust parameters. Generate the name. Don't
clobber the line number.
(cp_fname_init): New function.
(start_function): Call start_fname_decls.
(finish_function): Call finish_fname_decls.
* lex.c (reswords): Add slots for __FUNCTION__ et al.
(rid_to_yy): Add mappings for __FUNCTION__ et al.
* optimize.c (maybe_clone_body): Remove function_name_declared_p.
* parse.y (VAR_FUNC_NAME): New token.
(primary): Add VAR_FUNC_NAME.
* pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
generation.
(tsubst, FUNCTION_NAME case): Remove.
(tsubst_copy, FUNCTION_NAME case): Remove.
(tsubst_expr, DECL_STMT case): Be careful with a
DECL_PRETTY_FUNCTION_P.
(instantiate_decl): Remove function_name_declared_p.
* semantics.c (begin_compound_statement): Don't call
declare_function_name here.
(setup_vtbl_ptr). Don't save & restore function_name_declared_p.
(finish_translation_unit): Call finish_fname_decls.
(expand_body): Remove function_name_declared_p.
* typeck2.c (digest_init): Allow any ERROR_MARK.
2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (tsubst_decl): Use VOID_TYPE_P.
* semantics.c: Fix some typos.
2001-04-23 Phil Edwards <pme@sources.redhat.com>
* cp/decl2.c (flag_honor_std): Always initialize to 1.
2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
2001-04-23 Jason Merrill <jason_merrill@redhat.com>
* except.c (build_throw): Wrap the initialization of the exception
object in a MUST_NOT_THROW_EXPR.
(do_free_exception): #if 0.
2001-04-20 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (finish_enum): Change prototype.
* decl.c (finish_enum): Reorganize.
* parse.y (structsp): Adjust calls to finish_enum.
2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
* tree.c (cp_tree_equal): Adjust final switch formatting. Add
't' case.
2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
* class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
(layout_empty_base): Return at end flag.
(build_base_field): Likewise.
(build_base_fields): Likewise.
(layout_virtual_bases): Don't add 1 to eoc value.
(end_of_class): Use full size for empty bases.
(layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
empty bases. Don't add 1 to eoc value. Only add trailing padding
if we're an empty class with no empty bases.
(dump_class_hierarchy): Dump size and alignment.
2001-04-20 Jakub Jelinek <jakub@redhat.com>
* call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
ICS_BAD_FLAG.
2001-04-20 Jakub Jelinek <jakub@redhat.com>
* search.c (lookup_field_r): If looking for type and non-TYPE_DECL
is found, look first if name does not match the structure name.
2001-04-19 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
set.
(SET_DECL_LANGUAGE): New macro.
* decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
(pushdecl): Likewise.
(build_library_fn_1): Likewise.
(build_cp_library_fn): Likewise.
(grokfndecl): Likewise.
(grokvardecl): Mark `extern "C"' variables as having C linkage.
* decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
* lex.c (retrofit_lang_decl): Likewise.
* mangle.c (mangle_decl_string): Don't mangle the names of
variables declared with C language linkage.
* semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
* semantics.c (simplify_aggr_init_exprs_r): Don't restore
flag_access_control from uninitialized storage.
2001-04-15 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
* mangle.c (write_pointer_to_member_type): Fix mangling of
pointers to cv-qualified member function types.
* init.c (build_delete): Create a SAVE_EXPR for the address if
we're going to use it more than once.
2001-04-13 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
(expand_ptremfunc_cst): Change prototype.
(delta2_from_ptrmemfunc): Remove.
* expr.c (cplus_expand_constant): Adjust call to
expand_ptrmemfunc_cst.
* typeck.c (build_ptrmemfunc1): Simplify.
(build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
results in a constant.
(expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
(delta2_from_ptrmemfunc): Remove.
(pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
2001-04-12 Jason Merrill <jason_merrill@redhat.com>
* cp-tree.h (decl_namespace_list): New macro.
(struct saved_scope): Add decl_ns_list.
* decl.c (mark_saved_scope): Mark it.
* decl2.c: Lose static decl_namespace_list.
(init_decl2): Don't save it.
2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* cp-tree.h (warn_return_type, yylex): Delete redundant
declarations.
* decl.c (current_class_depth, global_namespace): Likewise.
* decl2.c (current_class_depth, flag_gnu_xref): Likewise
* repo.c (flag_use_repository): Likewise.
2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
set_block, pushdecl, getdecls, gettags, init_decl_processing,
maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
lvalue_or_else, print_lang_statistics, comp_target_types,
unsigned_type, signed_type, signed_or_unsigned_type,
build_function_call, mark_addressable, incomplete_type_error):
Delete redundant declarations.
2001-04-11 Jason Merrill <jason_merrill@redhat.com>
* cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
(TYPE_ANONYMOUS_P): New macro.
(TAGGED_TYPE_P): New macro.
* decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
(grokfndecl, grokvardecl, grokdeclarator): Likewise.
* tree.c (no_linkage_helper): Likewise.
* semantics.c (begin_class_definition): Likewise.
* pt.c (convert_template_argument): Likewise.
* lex.c (check_for_missing_semicolon): Likewise.
2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
* class.c (dfs_unshared_virtual_bases): New function.
(mark_primary_bases): Call it.
(check_bases): Ignore virtual bases when determining
nearly-emptiness.
2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
* method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
2001-04-11 Mark Mitchell <mark@codesourcery.com>
* optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
cloned function to the clone.
2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
* semantics.c: Include expr.h.
2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
* method.c (implicitly_declare_fn): Commonize code for copy ctor
and assignment op. Set TREE_USED for parameter.
2001-04-10 Mark Mitchell <mark@codesourcery.com>
* class.c (find_final_overrider_data): Add `candidates'.
(dfs_find_final_overrider): Don't issue error messages
prematurely.
(find_final_overrider): Issue error messages here.
(build_base_field): Don't warn about amgibuous direct bases here.
(warn_about_ambiguous_direct_bases): New function.
(layout_class_type): Use it.
2001-04-10 Richard Henderson <rth@redhat.com>
* typeck.c (build_array_ref): Push the array reference inside
COMPOUND_EXPR and COND_EXPR.
2001-04-05 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
* decl.c (duplicate_decls): Adjust accordingly.
(maybe_commonize_var): Likewise.
(grokfndecl): Likewise.
(start_function): Likewise.
(start_method): Likewise.
* decl2.c (key_method): Likewise.
(import_export_decl): Likewise.
* method.c (implicitly_declare_fn): Likewise.
* optimize.c (maybe_clone_body): Likewise.
2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
* lang-specs.h: Add __DEPRECATED.
2001-04-05 J"orn Rennecke <amylaar@redhat.com>
* search.c (get_dynamic_cast_base_type): When building a new
constant, set its type to ssizetype.
2001-04-04 Jakub Jelinek <jakub@redhat.com>
* optimize.c (expand_call_inline): Only add newly inlined statements
into inlined_stmts.
2001-04-03 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
(OPERATOR_FORMAT): Likewise.
(OPERATOR_TYPENAME_FORMAT): Likewise.
* operators.def: Remove old name-mangling information.
* decl.c (grok_op_properties): Adjust accordingly.
* lex.c (init_operators): Likewise.
* rtti.c (get_tinfo_decl): Issue error messages about types that
have variable size.
2001-04-03 Mark Mitchell <mark@codesourcery.com>
* decl2.c (import_export_decl): Don't call import_export_class
when processing an inline member function.
* semantics.c (expand_body): Call import_export_decl before
emitting inline functions.
2001-03-28 Richard Henderson <rth@redhat.com>
IA-64 ABI Exception Handling:
* cp-tree.def (EH_SPEC_BLOCK): New.
(MUST_NOT_THROW_EXPR): New.
* cp-tree.h: Update changed function declarations.
(CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
(CPTI_CALL_UNEXPECTED): New.
(struct cp_language_function): Rename x_eh_spec_try_block
to x_eh_spec_block.
(EH_SPEC_STMTS, EH_SPEC_RAISES): New.
* decl.c (current_binding_level): If no current function
bindings, revert to scope_chain.
(initialize_predefined_identifiers): Remove __cp_push_exception.
(store_parm_decls): Use begin_eh_spec_block.
(finish_function): Use finish_eh_spec_block.
(mark_lang_function): Update for name changes.
* decl2.c (finish_file): No mark_all_runtime_matches.
* dump.c (cp_dump_tree): Handle new tree codes.
* error.c (dump_expr) [BIND_EXPR]: Fix typo.
* except.c (catch_language_init, catch_language): Remove.
(init_exception_processing): Don't set language code.
Initialize call_unexpected_node, protect_cleanup_actions,
eh_personality_libfunc, lang_eh_runtime_type.
(call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
(get_eh_type, get_eh_caught, get_eh_handlers): Remove.
(prepare_eh_type): Split out type canonicalizations ...
(build_eh_type_type): ... from here.
(build_eh_type_type_ref): Remove.
(mark_all_runtime_matches): Remove.
(build_exc_ptr): New.
(do_begin_catch, do_end_catch): New.
(do_pop_exception): Remove.
(build_terminate_handler): Remove.
(choose_personality_routine): Split out language choice from ...
(initialize_handler_parm): ... here.
Use MUST_NOT_THROW_EXPR.
(expand_start_catch_block): Use do_begin_catch. Simplify Java
exception object handling.
(expand_start_eh_spec, expand_end_eh_spec): Remove.
(expand_exception_blocks, alloc_eh_object): Remove.
(begin_eh_spec_block, finish_eh_spec_block): New.
(do_allocate_exception, do_free_exception): New.
(expand_throw): Merge into ...
(build_throw): ... here. Update for abi.
* expr.c (cplus_expand_expr): No expand_internal_throw.
Handle MUST_NOT_THROW_EXPR.
* pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
* semantics.c (*) Update for except.h name changes.
(genrtl_try_block): No protect_with_terminate.
(genrtl_eh_spec_block): New.
(genrtl_handler): Don't emit the goto here.
(cp_expand_stmt): Handle EH_SPEC_BLOCK.
(genrtl_finish_function): Don't expand_exception_blocks.
* tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
2001-03-28 Richard Henderson <rth@redhat.com>
* decl.c (struct named_label_list): Rename eh_region to
in_try_scope, add in_catch_scope.
(struct binding_level): Rename eh_region to is_try_scope,
add is_catch_scope.
(note_level_for_try): Rename from note_level_for_eh.
(note_level_for_catch): New.
(poplevel): Copy both is_try_scope and is_catch_scope to
the named_label_list struct.
(check_previous_goto_1): Don't check for catch block via
DECL_ARTIFICIAL; use in_try_scope instead.
(check_goto): Likewise.
* cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
* except.c (expand_start_catch_block): Call note_level_for_catch.
* semantics.c (begin_compound_stmt): Update for note_level_for_try.
2001-03-27 Richard Henderson <rth@redhat.com>
* except.c: Use USING_SJLJ_EXCEPTIONS instead of
exceptions_via_longjmp.
2001-03-27 Phil Edwards <pme@sources.redhat.com>
* pt.c (check_default_tmpl_args): Make error messages clearer.
2001-03-26 Phil Edwards <pme@sources.redhat.com>
* error.c: Also undefine 'A' macro used for cp_printers definition.
2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Make-lang.in: Depend on $(SYSTEM_H), not system.h.
2001-03-26 Mike Yang <yang@research.att.com>
Mark Mitchell <mark@codesourcery.com>
* dump.c (dump_access): New function.
(cp_dump_tree): Use it. Dump basetype information for class
types.
2001-03-26 Mark Mitchell <mark@codesourcery.com>
* Makefile.in (optimize.o): Depend on params.h.
(duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
(init_decl_processing): Set flag_no_inline when doing
inlining-on-trees.
* optimize.c: Include params.h.
(struct inline_data): Improve documentation of FNS. Add
FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
(INSNS_PER_STMT): New macro.
(remap_block): Use CLONING_P.
(inlinable_function_p): Don't inline big functions.
(expand_call_inline): Keep track of how much inlining we've done.
(optimize_function): Set FIRST_INLINED_FN.
(maybe_clone_body): Set CLONING_P.
* semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
tree nodes.
(genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
rest_of_compilation. Clear DECL_RTL for local variables
afterwards.
(clear_decl_rtl): New function.
2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
Implement DR 209
* cp-tree.h (skip_type_access_control,
reset_type_access_control): Prototype.
* decl.c (grokdeclarator): Access of friends is not checked.
* parse.y (component_decl_list): Reset type access control.
* semantics.c (decl_type_access_control): Clear
current_type_lookups.
(save_type_access_control): Don't save if not deferring.
(skip_type_access_control, reset_type_access_control): New
functions.
(begin_class_definition): Do type access control for basetypes.
Start deferred access control.
(finish_class_definition): Resume immediate access control if
this is a local class.
2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* class.c (add_method): Use memcpy/memmove, not bcopy.
* decl.c (duplicate_decls): Likewise.
2001-03-23 Jakub Jelinek <jakub@redhat.com>
* mangle.c (write_discriminator): Use `_0' for discriminator 1,
not `_'.
2001-03-23 Jakub Jelinek <jakub@redhat.com>
* decl.c (local_names): Define.
(push_local_name): New.
(grok_reference_init): Return init if initializing static reference
variable with non-constant instead of emitting it.
Move expand_static_init call to cp_finish_decl.
(layout_var_decl): Call push_local_name.
(maybe_commonize_var): Allow inlining functions even if they have
static local variables, use comdat_linkage for them if flag_weak.
(check_initializer): Call obscure_complex_init if
grok_reference_init returned nonzero.
(save_function_data): Clear x_local_names.
(pop_cp_function_context): Free x_local_names.
(mark_inlined_fns): Remove.
(mark_lang_function): Mark x_local_names.
(lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
Mark inlined_fns as tree, remove call to mark_inlined_fns.
* class.c (alter_access): Ensure DECL_ACCESS is never set if
DECL_DISCRIMINATOR_P.
* cp-tree.h (cp_language_function): Add x_local_names.
(lang_decl_flags): Add discriminator into u2.
(lang_decl_inlined_fns): Remove.
(lang_decl): inlined_fns is now a TREE_VEC.
(DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
* optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
TREE_VEC, not a custom structure.
(optimize_function): Likewise.
* mangle.c (discriminator_for_local_entity): Discriminate among
VAR_DECL local entities.
* search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
is not valid.
2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
Add support for Java interface method calls.
* cp-tree.h (struct lang_type): Add java_interface flag.
(TYPE_JAVA_INTERFACE): New macro.
* tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
by setting TYPE_JAVA_INTERFACE.
* call.c (java_iface_lookup_fn): New static.
(build_over_call): If calling a method declared in a
TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
expression which resolves the function address.
(build_java_interface_fn_ref): New function.
2001-03-22 Richard Henderson <rth@redhat.com>
* Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
* except.c: Don't include it.
2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
based on an idea from Joe Buck <jbuck@synopsys.com>
* parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
New nonterminals.
(data_def, component_decl): Add reductions to bad_decl.
2001-03-22 Jakub Jelinek <jakub@redhat.com>
* method.c (do_build_assign_ref): Don't use build_modify_expr for
anonymous aggregates, since they don't have assignment operator
method.
* decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
assignment operators for anonymous structure fields.
2001-03-21 Jason Merrill <jason@redhat.com>
* pt.c (instantiate_decl): Abort if we see a member constant
instantiation that doesn't already have its initializer.
Downgrade explicit instantiation without definition to pedwarn.
* cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
* class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
(import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
* cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
(pending_vtables): Remove.
* decl2.c (pending_vtables): Remove.
(import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
CLASSTYPE_VTABLE_NEEDS_WRITING.
(import_export_class): Likewise.
(init_decl2): Don't mark pending_vtables.
* lex.c (handle_pragma_vtable): Just sorry.
* pt.c (instantiate_class_template): Don't mess with
CLASSTYPE_VTABLE_NEEDS_WRITING.
(mark_class_instantiated): Likewise.
* ptree.c (print_lang_type): Don't print it.
* semantics.c (begin_class_definition): Don't set it.
* pt.c (template_tail): Replace with last_pending_template.
(maybe_templates, maybe_template_tail): Remove.
(add_pending_template): Adjust.
(instantiate_pending_templates): Adjust.
* cp-tree.h (struct saved_scope): Remove lang_stack field.
(current_lang_stack): Remove.
* decl.c (maybe_push_to_top_level): Don't initialize it.
(duplicate_decls): Use current_lang_depth.
(xref_basetypes): Likewise.
* class.c (current_lang_depth): New fn.
(push_lang_context): Use more varray functionality.
(pop_lang_context): Likewise.
* error.c (GLOBAL_THING): Always use '__'.
2001-03-21 Mark Mitchell <mark@codesourcery.com>
* class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
* mangle.c (mangle_decl_string): Mangle the names of overloaded
operators, even when they have `extern "C"' linkage.
2001-03-19 Mark Mitchell <mark@codesourcery.com>
* class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
where it's not necessary.
(add_method): Remove optimization involving comparison of
DECL_ASSEMBLER_NAME.
(build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
where it's not necessary.
(check_methods): Likewise.
(build_clone): Likewise.
(built_vtt): Likewise.
* cp-tree.h (DECL_NEEDED_P): Likewise.
* decl.c (pushtag): Likewise.
(duplicate_decls): Likewise.
(pushdecl): Likewise.
(builtin_function): Likewise.
(build_library_fn_1): Set DECL_LANGUAGE for library functions.
(build_cp_library_fn): Likewise.
(maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
where it's not necessary.
(make_rtl_for_nonlocal_decl): Likewise.
(cp_finish_decl): Likewise.
(grokfndecl): Likewise.
(grokvardecl): Likewise.
(grokdeclarator): Likewise.
(start_function): Likewise.
(cp_missing_return_ok_p): Likewise.
* decl2.c (grokclassfn): Likewise.
(check_classfn): Likewise.
(finish_static_data_member_decl): Likewise.
(grokfield): Likewise.
* error.c (GLOBAL_IORD_P): Remove.
(dump_global_iord): Improve output.
(dump_decl): Avoid using DECL_ASSEMBLER_NAME.
* except.c (nothrow_libfn_p): Summarily reject any function not in
namespace-scope.
* init.c (build_java_class_ref): Don't explicitly set
DECL_ASSEMBLER_NAME after calling mangle_decl.
* mangle.c (mangle_decl_string): Handle extern "C" functions.
(mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
* method.c (set_mangled_name_for_decl): Don't explicitly set
DECL_ASSEMBLER_NAME after calling mangle_decl.
(make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
IDENTIFIER_GLOBAL_VALUE for the thunk.
* pt.c (set_mangled_name_for_template_decl): Remove.
(check_explicit_specialization): Don't use it.
(looup_template_class): Don't set DECL_ASSEMBLER_NAME.
(tsubst_friend_function): Likewise.
(tsubst_decl): Likewise.
(regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
* rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
where it's not necessary.
(tinfo_base_init): Likewise.
(create_real_tinfo_var): Likewise.
* search.c (looup_field_1): Likewise.
* semantics.c (finish_named_return_value): Likewise.
* tree.c (init_tree): Set lang_set_decl_assembler_name.
2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
Correct semantics restrictions checking in throw-expression.
* except.c (is_admissible_throw_operand): New function.
(build_throw): Use it.
2001-03-14 Mark Mitchell <mark@codesourcery.com>
* decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
and its ilk.
2001-03-14 Mark Mitchell <mark@codesourcery.com>
* class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
* cp-tree.h (DECL_IN_MEMORY_P): Likewise.
* decl.c (duplicate_decls): Likewise.
(builtin_function): Likewise.
(build_library_fn): Likewise.
(build_cp_library_fn): Likewise.
(check_initializer): Likewise.
(cp_finish_decl): Likewise.
* decl2.c (grokfield): Likewise.
(grok_function_init): Remove #if 0'd code.
(finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
* friend.c (do_friend): Likewise.
* init.c (get_temp_regvar): Likewise.
* method.c (make_thunk): Likewise.
* pt.c (tsubst_friend_function): Likewise.
(tsubst_decl): Likewise.
(regenerate_decl_from_template): Likewise.
* semantics.c (genrtl_named_return_value): Likewise.
(expand_body): Likewise.
(genrtl_finish_function): Likewise.
* tree.c (cp_tree_equal): Likewise.
2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
* call.c (convert_like_real): Add extra semantics to INNER
parameter. Don't convert to temporary if a user conversion
gives us an lvalue that we're about to bind to a reference.
Set INNER to indicate pending reference binding on recursive
calls.
2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
* cp/lex.c: Delete duplicate pending_lang_change.
2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
* cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
Similarly.
* cp/repo.c (get_base_filename, open_repo_file): Similarly.
* cp/cp-tree.h: Remove file_name_nondirectory prototype.
2001-03-09 Zack Weinberg <zackw@stanford.edu>
* Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
2001-03-08 Stan Shebs <shebs@apple.com>
* cp-tree.h (set_identifier_local_value): Remove unused decl.
2001-03-06 Zack Weinberg <zackw@stanford.edu>
* spew.c: Remove references to CPP_OSTRING.
2001-03-06 Andrew Haley <aph@redhat.com>
* typeck.c (convert_arguments): Check that we have an fndecl.
2001-03-05 Andrew Haley <aph@redhat.com>
* typeck.c (convert_arguments): Don't do ellipsis conversion for
__built_in_constant_p.
2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
* typeck.c (build_static_cast): Allow enum to enum conversions
as per DR 128.
2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
* class.c (check_field_decls): Pointers to member do not a
non-pod struct make, as per DR 148.
2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
* call.c (joust): cp_pedwarn when using gnu extension concerning
worst conversion sequences.
2001-03-01 Zack Weinberg <zackw@stanford.edu>
* decl.c: Replace all uses of 'boolean' with 'bool'.
2001-03-01 Zack Weinberg <zackw@stanford.edu>
* lang-specs.h: Add zero initializer for cpp_spec field to
all array elements that need one. Don't put an #ifdef inside
the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
use it.
2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
Implement using decls inside template functions.
* decl2.c (validate_nonmember_using_decl): Don't special case
fake_std_node in the global namespace. Don't reject early when
processing a template.
(do_local_using_decl): Add to statement tree. Don't do further
processing when building a template.
* pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
* decl2.c (do_nonmember_using_decl): Don't complain if we find
same function. Do complain about ambiguating extern "C"
declarations.
2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
Remove floating point and complex type template constant parms.
* pt.c (convert_nontype_argument): Remove REAL_TYPE and
COMPLEX_TYPE extensions.
(invalid_nontype_parm_type_p): Likewise.
2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
* except.c (call_eh_info): Revert "match_function"'s type.
2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
Fix ctor vtable vcall offsets.
* class.c (struct vtbl_init_data_s): Add rtti_binfo member.
(build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
(get_matching_base): Remove.
(get_original_base): New function.
(build_vtbl_initializer): Initialize vid.rtti_binfo.
Use a virtual thunk for a ctor vtable with an index
(add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
primary base within a constructor vtable. Only set
BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
when primary base has been lost.
* cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
* call.c (joust): Ensure more_specialized()'s argument length
parameter has correct value for constructors.
2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
* except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
* decl.c (mark_inlined_fns): Prototype.
2001-02-22 Mark Mitchell <mark@codesourcery.com>
* spew.c (yylex): Correct handling of friends.
2001-02-22 Mark Mitchell <mark@codesourcery.com>
* mangle.c (write_encoding): Pass write_function_type the
FUNCTION_DECL for the function being encoded.
(write_function_type): Pass it along to write_bare_function_type.
(write_bare_function_type): Pass it along to write_method_parms.
(write_method_parms): Don't mangle the compiler-generated
parameters to a constructor or destructor.
2001-02-22 Andreas Jaeger <aj@suse.de>
* optimize.c: Include toplev.h for
note_deferral_of_defined_inline_function prototype.
2001-02-22 Jakub Jelinek <jakub@redhat.com>
* cp-tree.h (struct lang_decl_inlined_fns): New.
(struct lang_decls): Add inlined_fns.
(DECL_INLINED_FNS): New macro.
* optimize.c (struct inline_data): Add inlined_fns.
(declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
(inlinable_function_p): Likewise, fix typo in comment,
function is not inlinable if it already inlined function currently
being optimized.
(expand_call_inline): Add fn to inlined_fns if necessary.
(optimize_function): Initialize inlined_fns.
Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
* decl.c (mark_inlined_fns): New function.
(lang_mark_tree): Call it.
2001-02-21 Jason Merrill <jason@redhat.com>
* cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
(DECL_UNINLINABLE): Move to middle-end.
* class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
* decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
* class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
* optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
parms and outer BLOCK. note_deferral_of_defined_inline_function.
* method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
second parm of op=.
2001-02-19 Mark Mitchell <mark@codesourcery.com>
* decl2.c (set_decl_namespace): Allow explicit instantiations in
any namespace.
2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* optimize.c (expand_call_inline): Don't walk subtrees of type
nodes.
2001-02-18 Mark Mitchell <mark@codesourcery.com>
* class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
for a destructor.
2001-02-18 Jason Merrill <jason@redhat.com>
Do put the VTT parameter in DECL_ARGUMENTS.
* cp-tree.h (struct cp_language_function): Add x_vtt_parm.
(current_vtt_parm): New macro.
(struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
(DECL_HAS_VTT_PARM_P): New macro.
(DECL_VTT_PARM): Remove.
(FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
* decl.c (duplicate_decls): Only copy the operator code if
appropriate.
(start_function): Set current_vtt_parm.
(lang_mark_tree): Don't mark vtt_parm.
* decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
* class.c (build_clone): Maybe remove the VTT parm.
* optimize.c (maybe_clone_body): Set up the VTT parm.
* pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
* call.c (build_over_call): Just allow the VTT arg.
* method.c (make_thunk): Don't set DECL_VTT_PARM.
(do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
(synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
* decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
* error.c (dump_function_decl): Likewise.
* call.c (build_user_type_conversion_1, convert_like_real): Abort
if we try to call a constructor with in-charge or VTT parms.
* method.c (skip_artificial_parms_for): New fn.
* call.c (add_function_candidate, build_over_call): Call it.
* call.c (build_new_method_call): Use current_vtt_parm.
* init.c (expand_virtual_init): Likewise.
* class.c (same_signature_p): No longer static.
* cp-tree.h: Declare it.
* search.c (look_for_overrides_r): Use it.
2001-02-17 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (new_abi_rtti_p): Remove.
(name_mangling_version): Likewise.
(flag_do_squangling): Likewise.
* class.c (build_rtti_vtbl_entries): Remove old ABI support.
* decl.c (grokfndecl): Likewise.
* decl2.c (name_mangling_version): Remove.
(flag_do_squangling): Likewise.
(lang_f_options): Remove `squangle'.
(unsupported_options): Add `squangle'.
(cxx_decode_option): Issue a warning about uses of
-fname-mangling-version.
(finish_file): Remove old ABI support.
* pt.c (check_explicit_specialization): Likewise.
(tsubst_decl): Likewise.
* rtti.c (init_rtti_processing): Likewise.
(build_headof): Likewise.
(get_tinfo_decl_dynamic): Likewise.
(tinfo_from_decl): Likewise.
(build_dynamic_cast_1): Likewise.
(synthesize_tinfo_var): Likewise.
* init.c (build_new): Allow enumeration types for the array-bounds
in a direct-new-declarator.
* semantics.c (finish_typeof): Resolve OFFSET_REFs.
* pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
TREE_PROTECTED from the template being specialized.
2001-02-17 Jason Merrill <jason@redhat.com>
* decl2.c (build_artificial_parm): Set TREE_READONLY.
* decl.c (bad_specifiers): Allow throw specs on things with
pointer-to-function or -member-function type.
* init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
a pmf.
2001-02-17 Mark Mitchell <mark@codesourcery.com>
* call.c (check_dtor_name): Handle template names correctly.
2001-02-16 Jason Merrill <jason@redhat.com>
* cp-tree.h (DECL_USE_VTT_PARM): Remove.
* decl2.c (maybe_retrofit_in_chrg): Don't create it.
* optimize.c (maybe_clone_body): Don't substitute it.
* call.c (build_new_method_call): Check in_chrg instead.
* init.c (expand_virtual_init): Likewise.
2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
* decl.c (check_tag_decl): Make sure a typedef for an anonymous
class-type introduces at least a type-name.
2001-02-16 Jakub Jelinek <jakub@redhat.com>
* call.c (convert_like_real): Create a temporary for non-lvalue.
2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
* cp-tree.h: Fix typos in comments.
2001-02-16 Jason Merrill <jason@redhat.com>
* optimize.c (remap_block): If we're compiling a clone, pass the
new block to insert_block.
2001-02-16 Mark Mitchell <mark@codesourcery.com>
* semantics.c (finish_asm_stmt): Robustify.
2001-02-15 Mark Mitchell <mark@codesourcery.com>
* pt.c (push_template_decl_real): Don't remangle the name of a
class template.
2001-02-15 Jim Meyering <meyering@lucent.com>
* Make-lang.in (c++.install-common): Depend on installdirs.
(c++.install-info): Likewise.
(c++.install-man): Likewise.
2001-02-15 Mark Mitchell <mark@codesourcery.com>
* typeck2.c (build_m_component_ref): Robustify.
2001-02-15 Alexandre Oliva <aoliva@redhat.com>
* friend.c (do_friend): Don't take the nested [template] class
into account when deciding whether to warn about the friend
function not referring to a template function.
2001-02-14 Jakub Jelinek <jakub@redhat.com>
* typeck.c (build_unary_op): Clarify error message.
2001-02-08 Aldy Hernandez <aldyh@redhat.com>
* parse.y (component_constructor_declarator): allow optional
parentheses around constructor class name.
2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
section.
* init.c (emit_base_init): Remove incorrect comment about
virtual bases.
* method.c (make_thunk): Fix comment alignment.
2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
Kill remnants of this is variable.
* cp-tree.h (flag_this_is_variable): Remove.
* decl2.c (flag_this_is_variable): Remove.
* class.c (fixed_type_or_null): Add cdtor parm. Adjust.
(build_vbase_path): The path is non-static, even in a cdtor.
(resolves_to_fixed_type_p): Add additional return value.
* search.c (init_vbase_pointers): Adjust.
* tree.c (lvalue_p_1): Adjust.
* typeck.c (mark_addressable): Adjust.
2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (unify): Don't check cv quals of array types.
2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
* tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
check whether we already have the type.
2001-02-13 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
* call.c (build_op_delete_call): Simplify to remove duplicate
code.
* class.c (clone_function_decl): Don't build the deleting variant
of a non-virtual destructor.
* decl.c (finish_destructor_body): Don't call delete if this is a
non-virtual destructor.
* init.c (build_delete): Explicitly call `operator delete' when
deleting an object with a non-virtual destructor.
2001-02-13 Jason Merrill <jason@redhat.com>
* lang-specs.h: Add more __EXCEPTIONS.
2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
* typeck2.c (process_init_constructor): Check
TREE_HAS_CONSTRUCTOR before issuing missing init warning.
2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
Remove spurious information in comment. Allow further
adjustments of REFERENCE_TYPE args.
2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
* errfn.c (cp_deprecated): Tweak diagnostic text.
* parse.y (new_initializer): Deprecate initializer lists
extension.
2001-02-12 Mark Mitchell <mark@codesourcery.com>
Remove old ABI support.
2001-02-11 Mark Mitchell <mark@codesourcery.com>
* decl2.c (flag_vtable_thunks): Always set it to 1.
(flag_new_abi): Likewise.
* lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
* Makefile.in (g++spec.o): Fix typo.
2001-02-09 Jason Merrill <jason@redhat.com>
* lang-specs.h: Restore definition of __EXCEPTIONS.
2001-02-08 Jason Merrill <jason@redhat.com>
* search.c (shared_member_p): New function.
(lookup_field_r): Use it.
* cp-tree.h (SHARED_MEMBER_P): Remove.
* method.c (process_overload_item): Handle template-dependent array
bounds.
* pt.c (type_unification_real): If we end up with undeduced nontype
parms, try again.
* decl.c (lookup_name_real): Tweak warning to refer to decls, not
types.
* typeck2.c (friendly_abort): Don't say anything if we have
earlier errors or sorries.
* decl.c (check_tag_decl): Notice attempts to redefine bool and
wchar_t. Ignore if in_system_header.
* decl.c (maybe_push_cleanup_level): New fn...
(start_decl_1): ...split out from here.
* cvt.c (build_up_reference): Use it.
* cp-tree.h: Declare it.
2001-02-07 Mark Mitchell <mark@codesourcery.com>
* lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
spec.
2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (lookup_template_class): Make sure it's a primary
template or template_template_parm when called from the parser.
(instantiate_template_class): Add assertion.
2001-02-05 Alexandre Oliva <aoliva@redhat.com>
* method.c (build_mangled_name) [old abi]: Protect flush_repeats()
from error_mark_node.
2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
Fix specification and implementation bugs in V3 ABI
construction vtables.
* cp-tree.h (flag_dump_class_layout): New flag.
(BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
(BINFO_LOST_PRIMARY_P): New flag.
(SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
(BINFO_PRIMARY_MARKED_P): Rename to ...
(BINFO_PRIMARY_P): ... here.
(binfo_via_virtual): New prototype.
* decl2.c (flag_dump_class_layout): New flag.
(cxx_decode_option): Set it. Adjust -fdump-translation-unit to
use `=' as a file name separator.
* init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
bases.
(build_vtbl_address): If this is a virtual primary base, then
get the vtbl of what it is ultimately primary for.
* search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
for BINFO_PRIMARY_P.
(dfs_skip_nonprimary_vbases_markedp): Likewise.
(get_shared_vbase_if_not_primary): Likewise.
(dfs_get_pure_virtuals): Likewise.
(expand_upcast_fixups): Likewise.
(fixup_virtual_upcast_offsets): Likewise.
(dfs_find_vbase_instance): Likewise.
(find_vbase_instance): Likewise.
(binfo_from_vbase): Adjust comment to reflect reality.
(binfo_via_virtual): New function.
* class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
for binfo walking during VTT construction.
(dfs_mark_primary_bases): Remove.
(force_canonical_binfo_r): New function.
(force_canonical_binfo): New function.
(mark_primary_virtual_base): New function.
(mark_primary_bases): Walk in inheritance graph order, use
mark_primary_virtual_base.
(determine_primary_base): Use some more intermediate variables.
(dfs_find_final_overrider): Don't check for overriding along a
virtual path.
(dfs_modify_vtables): Walk into primary virtual bases too.
(walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
(build_base_fields): Likewise.
(dfs_set_offset_for_unshared_vbases): Likewise.
(layout_virtual_bases): Likewise.
(end_of_class): Likewise.
(finish_struct_1): Call dump_class_hierarchy, if requested.
(dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
(dump_class_hierarchy_r): Add stream parameter. Emit more information.
(dump_class_hierarchy): Add file parameter. Append to file, if
required.
(finish_vtbls): Adjust accumulate_vtbl_inits call.
Use canonical base for virtual bases.
(build_vtt): Add more comments. Adjust build_vtt_inits call.
(build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
virtual VTTs.
(dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
from DATA. We want virtual primary bases and all bases via virtual.
Only set BINFO_VPTR_INDEX for top level. Look up from a primary
virtual base when not a construction vtable.
(dfs_ctor_vtable_bases_queue_p): New DFS predicate.
(build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
Use canonical bases when processing virtual bases.
(accumulate_vtbl_inits): We're interested in any base via a
virtual path.
(dfs_accumulate_vtbl_inits): If this is a primary virtual base
within a construction vtable, determine what is being overridden.
(build_vtbl_initializer): Add more comments
(add_vcall_offset_vtbl_entries_1): Adjust comment.
(build_rtti_vtbl_entries): Check if the base has lost its
primary.
2001-02-05 Mark Mitchell <mark@codesourcery.com>
* Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* decl.c (pushdecl): Call abort instead of fatal.
* except.c (decl_is_java_type): Call fatal_error instead of fatal.
* init.c (build_new_1): Likewise.
(build_java_class_ref): Call internal_error and fatal_error, not fatal.
* decl.c (build_typename_type): hash_table_init now returns void.
decl.c (init_decl_processing): Make an error non-fatal.
2001-02-04 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
Document.
(CLASSTYPE_INTERFACE_KNOWN): Likewise.
(SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
(SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
(SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
* decl.c (maybe_commonize_var): Use the new name-mangling where
appropriate.
* decl2.c (comdat_linkage): Enhance comments. Make all
compiler-generated things static, if COMDAT is not available.
(get_tinfo_decl): Do not make typeinfo objects that belong in the
library COMDAT.
(tinfo_base_init): Use the correct mangled name for typeinfo
strings, and push them into the global scope.
(typeinfo_in_lib_p): New function.
(synthesize_tinfo_var): Use it.
(create_real_tinfo_var): Likewise.
2001-02-03 Jakub Jelinek <jakub@redhat.com>
* decl.c (push_class_binding): Use context_for_name_lookup instead
of CP_DECL_CONTEXT.
* search.c (context_for_name_lookup): Remove static. Check for NULL
context in the loop.
* cp-tree.h (context_for_name_lookup): Add prototype.
2001-02-02 Jakub Jelinek <jakub@redhat.com>
* cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
* tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
Remove.
* call.c (convert_class_to_reference, build_user_type_conversion_1,
add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
2001-02-02 Mark Mitchell <mark@codesourcery.com>
* Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
of macros used when compiling g++spec.c.
* g++spec.c (lang_specific_driver): Link with the shared
libgcc by default.
2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
* decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
make_reference_declarator, make_call_declarator), method.c
(implicitly_declare_fn), parse.y (namespace_using_decl,
notype_unqualified_id, expr_or_declarator, new_type_id,
after_type_declarator, direct_after_type_declarator,
notype_declarator, complex_notype_declarator,
complex_direct_notype_declarator, qualified_id,
notype_qualified_id, overqualified_id, direct_new_declarator,
absdcl, direct_abstract_declarator, conversion_declarator), pt.c
(tsubst), semantics.c (begin_constructor_declarator): Use build_nt
instead of build_parse_node.
2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
(minus_one_node): Moved to top level gcc directory. Renamed
to integer_minus_one_node.
* init.c (init_init_processing): Don't set minus_one_node.
(build_vec_init): Use integer_minus_one_node.
* rtti.c (get_tinfo_decl_dynamic): Likewise.
2001-01-28 Jakub Jelinek <jakub@redhat.com>
* optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
identical and they would be replaced with constant, remove
MODIFY_EXPR from the tree.
2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Make-lang.in: Remove all dependencies on defaults.h.
* call.c: Don't include defaults.h.
* decl.c: Likewise.
* decl2.c: Likewise.
* except.c: Likewise.
* pt.c: Likewise.
* rtti.c: Likewise.
* tree.c: Likewise.
* typeck.c: Likewise.
2001-01-25 Jakub Jelinek <jakub@redhat.com>
* mangle.c (write_mangled_name, write_encoding): Mangle overloaded
operators even in "C" linkage.
* method.c (set_mangled_name_for_decl): Likewise.
* decl.c (grokfndecl): Call set_mangled_name_for_decl even for
overloaded operators in "C" linkage.
2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (tsubst_decl): Remove IN_DECL parameter.
(tsubst_arg_types): Check parameter is not void.
(tsubst): Adjust tsubst_decl call.
2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
* call.c (add_builtin_candidate): Quote std properly, from
previous change.
2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* pt.c (check_explicit_specialization): Clone constructors and
destructors.
2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
indicates anything special about template depth. Make sure we
only count the user visible template classes.
2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
* call.c (build_conv): Typo in comment.
(add_builtin_candidate): Add more explanation.
Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
when we have enumeral types.
(add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
candidates for relops and eqops.
(joust): Simplify control flow. Allow a non-template user
function to hide a builtin.
2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
(more_specialized): Add deduction parameter.
* call.c (joust): Adjust more_specialized call.
* pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
(get_bindings_order): Remove.
(get_bindings_real): Add DEDUCE parameter.
(maybe_adjust_types_for_deduction): Return extra unify flags. Do
REFERENCE_TYPE jig for DEDUCE_ORDER.
(type_unification_real): Deal with DEDUCE_ORDER. Use result of
maybe_adjust_types_for_deduction.
(more_specialized): Add DEDUCE parameter. Call get_bindings_real
directly.
(try_one_overload): Use result of maybe_adjust_types_for_deduction.
(check_cv_quals_for_unify): Use new unify qualifier flags.
(unify): Clear new unify qualifier flags.
(get_bindings_real): Add DEDUCE parameter.
(get_bindings): Adjust call to get_bindings_real.
(get_bindings_overload): Likewise.
(most_specialized_instantiation): Adjust call to
more_specialized.
2001-01-19 Jason Merrill <jason@redhat.com>
* decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
* decl.c (init_decl_processing): Just force -fvtable-thunks on if
-fnew-abi.
2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
* decl2.c (arg_assoc_class): Fix double iteration logic.
2001-01-19 Jason Merrill <jason@redhat.com>
* init.c (build_delete): Always call convert_force to strip cv-quals.
* decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
* lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
* g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
* search.c (get_vbase_1): Count only virtual bases.
2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
* class.c (duplicate_tag_error): Robustify flag clearing.
2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (lookup_template_class): Add complain parm.
* decl.c (lookup_namespace_name): Adjust call to
lookup_template_class.
(make_typename_type): Likewise.
* semantics.c (finish_template_type): Likewise.
* pt.c (lookup_template_class): Add complain parm. Adjust.
(tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
(tsubst): Likewise.
2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (copy_default_args_to_explicit_spec): Preserve
object's CV quals. Reorganize.
2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
* typeck.c (build_modify_expr): Say `initialization' for
INIT_EXPRs.
* init.c (build_default_init): Convert to enumeral type, if
needed.
2001-01-18 Jakub Jelinek <jakub@redhat.com>
* parse.y (nomods_initdcl0): Properly set things up for
initdcl0_innards.
2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
(type_unification_real): Set it.
(unify): Use it.
2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (finish_destructor_body): Convert to vbase pointer here.
2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
* semantics.c (begin_class_definition): Check we're not inside a
template parm list.
2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
* tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
BASELINK_P.
2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
* call.c (build_over_call): Add comment.
2001-01-16 Daniel Berlin <dberlin@redhat.com>
* cvt.c (ocp_convert): Handle vector type conversion
* typeck2.c (digest_init): Handle vector type initializations
2001-01-16 Phil Edwards <pme@sources.redhat.com>
* g++spec.c: Don't add libraries needlessly if -fsyntax-only
was given.
2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (check_nontype_parm): Rename to ...
(invalid_nontype_parm_type_p): ... here.
(process_template_parm): Adjust.
(convert_template_argument): Adjust.
2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (check_nontype_parm): New function.
(process_template_parm): Use it.
(convert_template_argument): Use it.
(convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
member.
2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
* tree.c: Add defaults.h
(cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
* Make-lang.in (cp/tree.o): Add defaults.h.
2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
* Make-lang.in (CXX_C_OBJS): Add c-format.o.
2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
* g++.1: Change to be ".so man1/gcc.1".
2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
* Make-lang.in (c++.info, c++.install-info): Build and install g++
internals info.
(c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
($(srcdir)/cp/g++int.info): New target.
* gxxint.texi: Add info directory entry. Use @@ in email address.
* .cvsignore: Update.
2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
* typeck.c (build_c_cast): Do template processing earlier.
Always pedwarn on array casts.
2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
* friend.c (make_friend_class): Make sure a templated class is
actually a template.
2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
* decl2.c (get_guard): Set linkage from guarded decl.
2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
* call.c (convert_default_arg): Check for unprocessed
DEFAULT_ARG.
* cp-tree.h (replace_defarg): Move to spew.c.
(maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
spew.c, which is where they really are.
(done_pending_defargs): Declare.
(unprocessed_defarg_fn): Declare.
* decl.c (replace_defarg): Move to spew.c
* parse.y (structsp): Call done_pending_defargs.
* spew.c (defarg_fns): Rearrange list structure.
(defarg_fnsdone): New static variable.
(defarg_depfns): New static variable.
(init_spew): Adjust.
(add_defarg_fn): Store the type in TREE_TYPE.
(do_pending_defargs): Detect and deal with ordering constraints
and circularity.
(done_pending_defargs): New function.
(unprocessed_defarg_fn): New function.
(replace_defarg): Moved from decl.c. Robustify. Don't save
if circularity detected.
2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (unify): Check array has a domain, before checking
whether it is variable sized.
2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (grokparms): Unobfuscate and get correct diagnostic for
parameters with pointers to arrays of unknown bound.
2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
* parse.y (template_parm_header, template_spec_header): New
reductions. Split out from ...
(template_header): ... here. Use them.
(template_template_parm): Use template_parm_header.
* semantics.c (finish_template_template_parm): Add assert.
2001-01-10 Mark Mitchell <mark@codesourcery.com>
* mangle.c (write_builtin_type): Fix thinko.
* pt.c (copy_default_args_to_explicit_spec_1): New function.
(copy_default_args_to_explicit_spec): Likewise.
(check_explicit_specialization): Use it.
* class.c (finish_struct_1): Remove last argument in call to
make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
* decl.c (builtin_function): Likewise.
(build_cp_library_fn): Likewise.
(check_initializer): Likewise.
(make_rtl_for_nonlocal_decl): Likewise.
(cp_finish_decl): Likewise.
(start_function): Likewise.
* decl2.c (finish_anon_union): Likewise.
* friend.c (do_friend): Likewise.
* init.c (build_java_class_ref): Likewise.
* method.c (make_thunk): Likewise.
* pt.c (tsubst_friend_function): Likewise.
* semantics.c (expand_body): Likewise.
2001-01-10 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
looking at DECL_CLONED_FUNCTION for non-functions.
2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
* error.c (dump_template_parameter): Use parm to determine how
to print default value.
2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
* class.c (duplicate_tag_error): Clear more flags.
2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
* call.c (build_new_method_call): Use binfo_for_vbase.
2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
* cp-tree.h (flag_cond_mismatch): Don't declare.
* decl2.c (flag_cond_mismatch): Don't define.
(lang_f_options): Remove cond-mismatch.
(unsupported_options): Add cond-mismatch.
2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
* class.c (handle_using_decl): Reject using of constructor name
of sourcing class. Allow injecting of a method with same name as
nested class. Fixup error messages.
2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
* decl2.c (lang_decode_option): Handle -Wformat=2.
2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (lang_decl_flags): Rename defined_in_class to
initialized_in_class.
(DECL_DEFINED_IN_CLASS_P): Rename to ...
(DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
* decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
(cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
* pt.c (check_default_tmpl_args): Adjust for
DECL_INITIALIZED_IN_CLASS_P.
(instantiate_class_template): Likewise.
(instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
* class.c (finish_struct): Constify saved_filename.
2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
* class.c (duplicate_tag_error): Adjust diagnostic.
(finish_struct): Locally set location to start of struct.
* decl.c (fixup_anonymous_aggr): Use cp_error_at.
2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (struct binding_level): Adjust class_shadowed comments
to reflect reality.
(push_class_level_binding): Adjust comments to reflect reality.
Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
Don't set TREE_VALUE on the class_shadowed list.
2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
* decl2.c (acceptable_java_type): Allow references too.
* init.c (build_java_class_ref): When using the new ABI, search
`class$' and have it mangled with `mangle_decl.'
* mangle.c (write_java_integer_type_codes): New function.
(write_builtin_type): Detect and mangle Java integer and real
types.
2001-01-07 Mark Mitchell <mark@codesourcery.com>
* decl2.c (grokfield): Don't accept `asm' specifiers for
non-static data members.
2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* expr.c (cplus_expand_expr): Don't reset `target'.
2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
* cp/decl2.c (cxx_post_options): Call cpp_post_options.
2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
* parse.y (template_datadef): Check for error_mark_node.
2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.def (DEFAULT_ARG): Make `x' class.
2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
* decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
(record_builtin_type): Make non-static.
(flag_short_double): Don't declare.
(init_decl_processing): Remove the creation of many tree nodes now
in c_common_nodes_and_builtins.
(build_void_list_node): New function.
* decl2.c (flag_short_double, flag_short_wchar): Don't define.
* cp-tree.h (flag_short_wchar): Don't declare.
2001-01-04 Mark Mitchell <mark@codesourcery.com>
* call.c (build_conv): Don't use build1 for USER_CONV.
* pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
* lex.c (lang_init): Call c_common_lang_init.
2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
* search.c (lookup_fnfields_here): Remove.
(look_for_overrides_r): Use lookup_fnfields_1.
Ignore functions from using declarations.
2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
Implement exceptions specifiers for implicit member functions.
* cp-tree.h (merge_exceptions_specifiers): Declare new function.
* method.c (synthesize_exception_spec): New function.
(locate_dtor, locate_ctor, locate_copy): New functions.
(implicitly_declare_fn): Generate the exception spec too.
* search.c (check_final_overrider): Check artificial functions
too.
* typeck2.c (merge_exception_specifiers): New function.
2001-01-03 Jason Merrill <jason@redhat.com>
* init.c (build_default_init): New fn.
(perform_member_init): Split out from here.
(build_new_1): Use it. Simplify initialization logic.
(build_vec_init): Take an array, rather than a pointer and maxindex.
Speed up simple initializations. Don't clean up if we're assigning.
* cp-tree.h: Adjust.
* decl2.c (do_static_initialization): Remove TREE_VEC case.
* parse.y (new_initializer): Return void_zero_node for ().
* typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
* typeck2.c (digest_init): Only complain about user-written
CONSTRUCTORs.
2000-12-22 Mike Stump <mrs@wrs.com>
* decl2.c: (max_tinst_depth): Increase to 50.
2001-01-02 Mark Mitchell <mark@codesourcery.com>
* class.c (invalidate_class_lookup_cache): Zero the
previous_class_values.
* cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
TREE_INT_CST_HIGH.
(CLASSTYPE_TEMPLATE_LEVEL): Likewise.
* decl.c (free_bindings): New variable.
(push_binding): Don't create a new binding if we have one on the
free list.
(pop_binding): Put old bindings on the free list.
(init_decl_processing): Use size_int, not build_int_2.
Register free_bindings as a GC root.
(cp_make_fname_decl): Use size_int, not build_int_2.
(push_inline_template_parms_recursive): Likewise.
(end_template_parm_list): Likewise.
(for_each_template_parm): Do not use walk_tree_without_duplicates.
(tsubst_template_parms): Use size_int, not build_int_2.
(tsubst): Likewise.
* rtti.c (get_vmi_pseudo_type_info): Likewise.
2001-01-02 Richard Henderson <rth@redhat.com>
* parse.y (asm): Set ASM_INPUT_P.
2001-01-02 Jason Merrill <jason@redhat.com>
* tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
for v3 ABI.
* typeck.c (cp_truthvalue_conversion): New fn.
* cvt.c (ocp_convert): Use it.
* cp-tree.h: Lose c-common.c decls.
* typeck.c (build_unary_op): Restore old &a.f diagnostic code.
* cvt.c (convert_to_void): Use type_unknown_p.
* typeck.c (strip_all_pointer_quals): Also strip quals from
pointer-to-member types.
* Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
parse.y as C.
* call.c (build_new_method_call): Do evaluate the object parameter
when accessing a static member.
* typeck.c (build_component_ref): Likewise.
2001-01-02 Andreas Jaeger <aj@suse.de>
* decl.c (cp_missing_noreturn_ok_p): New.
(init_decl_processing): Set lang_missing_noreturn_ok_p.
2000-12-29 Jakub Jelinek <jakub@redhat.com>
* decl.c (init_decl_processing): Fix sign of wchar_type_node.
2000-12-29 Mark Mitchell <mark@codesourcery.com>
* class.c (pushclass): Remove #if 0'd code.
* cp-tree.h (overload_template_name): Remove.
* decl.c (store_bindings): Simplify.
(pop_from_top_level): Likewise.
* pt.c (overload_template_name): Remove.
(instantiate_decl): Don't call push_to_top_level if it's not
needed.
2000-12-28 Mark Mitchell <mark@codesourcery.com>
* pt.c (register_local_specialization): Don't return a value.
(lookup_template_class): Use move-to-front heuristic when looking
up template instantiations.
(instantiate_decl): Only push_to_top_level when we're actually
going to instantiate the template.
2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
* search.c (binfo_for_vtable): Return least derived class, not
most. Handle secondary vtables.
2000-12-22 Jason Merrill <jason@redhat.com>
* pt.c (more_specialized): Don't optimize len==0.
(fn_type_unification): If we're adding the return type, increase len.
* typeck.c (build_binary_op): Fix pmf comparison logic.
* call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
DECL_STATIC_FUNCTION_P.
* semantics.c (genrtl_finish_function): Don't try to jump to
return_label unless it exists.
In partial ordering for a call, ignore parms for which we don't have
a real argument.
* call.c (joust): Pass len to more_specialized.
(add_template_candidate_real): Strip 'this', pass len.
* pt.c (more_specialized): Pass len down. Lose explicit_args parm.
(get_bindings_order): New fn. Pass len down.
(get_bindings_real): Strip 'this', pass len.
(fn_type_unification): Likewise.
(type_unification_real): Succeed after checking 'len' args.
(most_specialized_instantiation): Lose explicit_args parm.
* class.c (resolve_address_of_overloaded_function): Strip 'this',
pass len.
2000-12-21 Jason Merrill <jason@redhat.com>
* pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
DECL_TEMPLATE_RESULT.
* search.c (lookup_field_r): Call lookup_fnfields_1, not
lookup_fnfields_here.
* parse.y (typename_sub2): Return the TYPE_DECL, not the type.
* call.c (build_object_call): Also allow conversions that return
reference to pointer to function.
(add_conv_candidate): Handle totype being ref to ptr to fn.
(build_field_call): Also allow members of type reference to function.
Lose support for calling pointer to METHOD_TYPE fields.
* error.c (dump_expr): Handle *_CAST_EXPR.
* typeck2.c (build_scoped_ref): Always convert to the naming class.
* tree.c (break_out_cleanups): Lose.
* cp-tree.h: Remove prototype.
* typeck.c (build_component_ref): Don't break_out_cleanups.
(build_compound_expr): Likewise.
* semantics.c (finish_expr_stmt): Likewise.
2000-12-20 Richard Henderson <rth@redhat.com>
* cp-tree.h: Update declarations.
* decl.c (finish_case_label): Return the new stmt node.
* semantics.c (finish_goto_stmt): Likewise.
(finish_expr_stmt, finish_return_stmt): Likewise.
(finish_break_stmt, finish_continue_stmt): Likewise.
(finish_asm_stmt): Likewise.
* parse.y (already_scoped_stmt): Set STMT_LINENO.
(compstmt, implicitly_scoped_stmt, stmt): Likewise.
(simple_if, simple_stmt): Return the new stmt node.
(save_lineno): New.
2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
* cp-tree.h: Don't declare warn_long_long.
2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
IS_AGGR_TYPE.
2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* pt.c (unify): Handle when both ARG and PARM are
BOUND_TEMPLATE_TEMPLATE_PARM.
2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
DECL_TEMPLATE_PARM_P.
2000-12-15 Jason Merrill <jason@redhat.com>
* init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
* init.c (build_new_1): Don't strip quals from type.
* decl.c (pushdecl): Don't check for linkage on a non-decl.
* call.c (build_op_delete_call): See through ARRAY_TYPEs.
* call.c (build_new_function_call): Lose space before paren in
error message.
(build_new_method_call): Likewise.
* typeck2.c (build_m_component_ref): Propagate quals from datum.
2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* pt.c (check_explicit_specialization): Propagate default
function arguments to explicit specializations.
2000-12-13 DJ Delorie <dj@redhat.com>
* typeck.c (build_binary_op): Do signed/unsigned warnings for >?
and <? operators.
2000-12-08 Jason Merrill <jason@redhat.com>
* error.c (dump_function_name): Don't let the user see __comp_ctor.
Clean up copy-initialization in overloading code.
* call.c (build_user_type_conversion_1): Die if we are asked to
convert to the same or a base type.
(implicit_conversion): Avoid doing so. Lose reference binding code.
(convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
direct-initialization. Also do direct-init part of copy-init.
(build_user_type_conversion): Don't provide context to convert_like.
* cvt.c (ocp_convert): build_user_type_conversion will now provide
the constructor call for copy-init.
* pt.c (tsubst_decl): Call clone_function_decl here if this is an
instantiation of a member template.
(do_decl_instantiation): Not here.
2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
* class.c (check_field_decls): Don't special case anonymous
fields in error messages.
(note_name_declared_in_class): Use %D on diagnostic.
* tree.c (pod_type_p): Use strip_array_types.
(cp_valid_lang_attribute): Likewise.
* typeck.c (cp_type_quals): Strip arrays separately, to avoid
multiple evaluations.
(cp_has_mutable_p): Use strip_array_types.
2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (sufficient_parms_p): Declare new function.
* call.c (sufficient_parms_p): New function, broken out of ...
(add_function_candidate): ... here. Use it.
(add_conv_candidate): Use it.
* decl.c (grok_ctor_properties): Use it.
2000-12-07 Jakub Jelinek <jakub@redhat.com>
* optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
* decl2.c (lang_decode_option): Handle -Wformat-security.
2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* pt.c (verify_class_unification): New function.
(get_class_bindings): Use it.
(try_class_unification): Tidy.
(unify): Handle when argument of a template-id is not
template parameter dependent.
(template_args_equal): Handle when TREE_CODE's do not match.
2000-12-06 Alexandre Oliva <aoliva@redhat.com>
* lang-specs.h (c++): When invoking the stand-alone preprocessor
for -save-temps, pass all relevant -Defines to it, and then don't
pass them to cc1plus.
2000-12-05 Will Cohen <wcohen@redhat.com>
* decl.c (finish_case_label): Cleared
more_cleanups_ok in surrounding function scopes.
(define_label): Likewise.
2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
(get_matching_virtual): Remove.
(look_for_overrides): Declare new function.
* decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
DECL_VINDEX here.
* class.c (check_for_override): Move base class iteration code
to look_for_overrides.
* search.c (next_baselink): Remove.
(get_virtuals_named_this): Remove.
(get_virtual_destructor): Remove.
(tree_has_any_destructors_p): Remove.
(struct gvnt_info): Remove.
(check_final_overrider): Remove `virtual' from error messages.
(get_matching_virtuals): Remove. Move functionality to ...
(look_for_overrides): ... here, and ...
(look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
to be overriding.
2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
* typeck.c (get_delta_difference): If via a virtual base,
return zero.
* cvt.c (cp_convert_to_pointer): If via a virtual base, do no
adjustment.
2000-12-04 Richard Henderson <rth@redhat.com>
* error.c (dump_tree): Use output_add_string not OB_PUTS.
2000-12-04 Jason Merrill <jason@redhat.com>
* mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
(write_builtin_type): Pass intSI_type_node and the like through
type_for_mode.
* method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
Pass intSI_type_node and the like through type_for_mode.
* decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
* pt.c (tsubst, unify): Likewise.
* tree.c (walk_tree): Likewise.
* error.c (dump_type): Likewise.
(dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
* Make-lang.in: Tweak top comment for emacs.
(cp/TAGS): Restore.
* except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
* class.c (clone_function_decl): Robustify.
2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
* decl.c (store_bindings): Only search in the non modified
old_bindings for duplicates.
2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
* error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
TYPE_POLYMORPHIC_P.
* typeck.c (build_static_cast): Remove unused variable.
2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* pt.c: Fix typo in comment.
2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
* decl2.c (warn_format): Remove definition.
(lang_decode_option): Handle -Wformat-nonliteral,
-Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
* decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
(init_decl_processing): Don't create string_type_node,
const_string_type_node, wint_type_node, intmax_type_node,
uintmax_type_node, default_function_type, ptrdiff_type_node and
unsigned_ptrdiff_type_node. Adjust position of call to
c_common_nodes_and_builtins.
(identifier_global_value): New function.
2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
* call.c (standard_conversion): Reject pointer to member
conversions from ambiguous, inaccessible or virtual bases.
* typeck.c (build_static_cast): Don't check pointers to members
specially.
2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
* method.c (do_build_copy_constructor): Preserve cv
qualifications when accessing source object members.
(do_build_assign_ref): Likewise. Remove separate diagnostics for
unnamed fields.
2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
* method.c (do_build_assign_ref): Construct appropriately
CV-qualified base reference. Don't allow const casts in base
conversion.
2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
* call.c (build_over_call): Use VOID_TYPE_P. Don't die on
incomplete return type.
2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
* parse.y (base_class.1): Produce a _TYPE not a _DECL.
* semantics.c (finish_base_specifier): Accept a _TYPE not a
_DECL.
2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
* spew.c (yyerror): Cope if yylval.ttype is NULL.
2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (grokdeclarator): Diagnose undefined template contexts.
2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (grokdeclarator): Do type access control on friend
class.
2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
bison parser ickiness.
* pt.c (tsubst_friend_function): Enter namespace scope when
tsubsting the function name.
* cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
* cvt.c (cp_convert_to_pointer): Add force parameter.
Allow conversions via virtual base if forced.
(convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
(ocp_convert): Likewise.
* search.c (binfo_from_vbase): Return the virtual base's binfo.
* typeck.c (get_delta_difference): Adjust handling of virtual
bases.
2000-11-26 Mark Mitchell <mark@codesourcery.com>
* tree.c (struct list_hash): Remove.
(list_hash_table): Make it be an htab.
(struct list_proxy): New type.
(list_hash_eq): New function.
(list_hash_pieces): Renamed from ...
(list_hash): ... this.
(list_hash_lookup): Remove.
(list_hash_add): Remove.
(hash_tree_cons): Use the generic hashtable.
(mark_list_hash): Remove.
(init_tree): Create the hashtable.
2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
* method.c (build_mangled_C9x_name): Rename to
build_mangled_C99_name. Change C9X references in comments to
refer to C99.
2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
* parse.y (unary_expr): Move VA_ARG from here ...
(primary): ... to here.
2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
* semantics.c (finish_id_expr): If type is error_mark, return
error_mark.
2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (lookup_template_class): Simplify loop exit constructs.
Cope when there is no partial instantiation of a template
template member.
2000-11-23 J"orn Rennecke <amylaar@redhat.com>
* Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
2000-11-22 Mark Mitchell <mark@codesourcery.com>
* mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
prefix.
* pt.c (do_decl_instantiate): Explicitly clone constructors and
destructors that haven't already been cloned.
2000-11-20 Richard Henderson <rth@redhat.com>
* parse.y (yyparse_1): Rename the parser entry point.
2000-11-20 Alex Samuel <samuel@codesourcery.com>
* mangle.c (write_name): Use <unscoped-name> for names directly in
function scope.
(write_unscoped_name): Accept names directly in function scope.
2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
* lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
* parse.y (extdef): Add EXPORT reduction.
* spew.c (yylex): Don't skip export here.
2000-11-19 Mark Mitchell <mark@codesourcery.com>
* decl.c (init_decl_processing): Correct name of pure virtual
function under the new ABI.
* rtti.c (throw_bad_cast): Likewise, for bad cast function.
(throw_bad_typeid): Likewise for bad typeid function.
2000-11-18 Mark Mitchell <mark@codesourcery.com>
* decl.c (grokparms): Don't even function types of `void' type,
either.
* mangle.c (write_type): Don't crash when confronted with the
error_mark_node.
* decl.c (grokparms): Don't create parameters of `void' type.
2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
* lex.c (mark_impl_file_chain): Delete.
(init_parse): Remove call to ggc_add_string_root. No need to
ggc_strdup a string constant. Do not add impl_file_chain to GC
roots.
(handle_pragma_implementation): No need to ggc_strdup main_filename.
2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
* decl.c (grokdeclarator): Don't reject void parms here.
(require_complete_types_for_parms): Simplify, use
complete_type_or_else.
(grokparms): Remove bitrot. Remove funcdef parm.
Deal with ellipsis parm lists here.
* semantics.c (finish_parmlist): Don't append void_list_node
here. Set PARMLIST_ELLIPSIS_P.
2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
* typeck2.c (incomplete_type_error): Reorganize to avoid
excessive diagnostics.
2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
* lex.c (struct impl_files, internal_filename): Constify a char *.
2000-11-16 Mark Mitchell <mark@codesourcery.com>
* mangle.c (write_special_name_constructor): Don't generate
assembler junk when confronted with an old-style constructor.
(write_special_name_destructor): Likewise.
(mangle_decl_string): Do it here instead.
2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
* call.c (op_error): Make error messages clearer.
2000-11-15 Mark Mitchell <mark@codesourcery.com>
* decl.c (wrapup_globals_for_namespace): Don't mark things
TREE_ASM_WRITTEN when they're not.
2000-11-15 Jason Merrill <jason@redhat.com>
* typeck2.c (friendly_abort): Uncount the error before handing
off to fancy_abort.
2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
* typeck.c (lookup_anon_field): Cope with qv qualifiers.
2000-11-14 Mark Mitchell <mark@codesourcery.com>
* class.c (build_vtbl_initializer): Fix typo in comment.
* typeck.c (expr_sizeof): Don't crash on errors.
2000-11-14 Jim Wilson <wilson@redhat.com>
* lang-specs.h: Add %2 after %(cc1_options).
2000-11-14 Richard Henderson <rth@redhat.com>
* typeck.c (c_sizeof): Be strict about casting result value
back to c_size_type_node.
(expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
* typeck.c (build_unary_op): Use boolean_increment from
c-common.c, moving the relevant code there.
2000-11-11 Jason Merrill <jason@redhat.com>
* typeck.c (mark_addressable): Don't call put_var_into_stack.
* decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
in inlines.
2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
* lex.c (copy_lang_decl): Likewise.
2000-11-09 Mark Mitchell <mark@codesourcery.com>
* dump.c (cp_dump_tree): Don't dump function bodies here.
* Make-lang.in (CXX_C_OBJS): Add c-dump.o.
(dump.o): Update dependency list.
* cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
(flag_dump_translation_unit): Likewise.
(CP_TYPE_QUALS): Adjust definition.
(DECL_C_BIT_FIELD): Remove.
(SET_DECL_C_BIT_FIELD): Likewise.
(CLEAR_DECL_C_BIT_FIELD): Likewise.
(add_maybe_template): Likewise.
(strip_array_types): Likewise.
(dump_node_to_file): Likewise.
(cp_dump_tree): New function.
* decl.c (init_decl_processing): Set lang_dump_tree.
* decl2.c (flag_dump_translation_unit): Remove.
* dump.c: Move most of it to ../c-dump.c.
(cp_dump_tree): New function.
* pt.c (add_maybe_template): Remove.
* typeck.c (strip_array_types): Likewise.
2000-11-07 Eric Christopher <echristo@redhat.com>
* decl.c (init_decl_processing): Change definition of
__wchar_t to wchar_t. Remove artificial declaration of
wchar_t.
* lex.c: Change instances of __wchar_t to wchar_t.
2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
* lex.c (do_identifier): Don't lookup_name for operators.
* parse.y (operator): Save looking_for_typename.
(unoperator): Restore it.
* spew.c (frob_opname): Use nth_token for lookahead.
2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (grok_op_properties): Always use coerce_new_type and
coerce_delete_type.
* decl2.c (coerce_new_type): Use c_size_type_node. Preserve
exception specification. Tidy up.
(coerce_delete_type): Preserve exception specification. Tidy up.
2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
* class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
(push_binding_level), error.c (cp_tree_printer), pt.c
(process_partial_specialization, tsubst_template_arg_vector),
search.c (lookup_member): Use memset () instead of bzero ().
2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (build_ptrmemfunc_type): Allow error_mark_node.
2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
* Make-lang.in (c++.distdir): Remove.
2000-11-04 Mark Mitchell <mark@codesourcery.com>
* decl2.c (do_nonmember_using_decl): Allow `extern "C"'
declarations from different namespaces to be combined.
2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
* decl.c: Include tm_p.h.
2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
* tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
* dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
(build_overload_value), repo.c (open_repo_file), xref.c
(open_xref_file): Use strchr () and strrchr () instead of index ()
and rindex ().
2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
* call.c (build_over_call): Call fold on the CALL_EXPR.
2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
* error.c (dump_template_decl): Separate template hearders with
space not comma.
2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
* error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
TS_* flags with corresponding TFF_*. Adjust prototypes of
functions (which used to take a tree_string_flags) to take an int.
* cp-tree.h (enum tree_string_flags): Remove
(TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
(type_as_string, decl_as_string, expr_as_string,
context_as_string): Adjust prototype.
* class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
instead of TS_PLAIN.
* pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
plain `0'.
2000-10-30 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
(linkage_kind): New enumeration.
(decl_linkage): New function.
* decl2.c (comdat_linkage): Extend comment.
* error.c (dump_function_decl): Print the arguments used to
instantiate a template, even when not printing the type of the
function.
* pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
not TREE_PUBLIC, to test for external linkage.
* tree.c (decl_linkage): New function.
2000-10-28 Mark Mitchell <mark@codesourcery.com>
* pt.c (instantiate_decl): Always instantiate static data members
initialized in-class.
2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
* Make-lang.in: Move all build rules here from Makefile.in,
adapt to new context. Wrap all rules that change the current
directory in parentheses. Expunge all references to $(P).
When one command depends on another and they're run all at
once, use && to separate them, not ;. Add OUTPUT_OPTION to
all object-file generation rules. Delete obsolete variables.
* Makefile.in: Delete.
* config-lang.in: Delete outputs= line.
2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
* error.c (dump_function_decl): Print no space between
`ptr-operator' the `type-specifier' of the return type.
(dump_type_prefix): Make sure we put space at the appropriate
place.
2000-10-23 Jason Merrill <jason@redhat.com>
* call.c (equal_functions): Also call decls_match for extern "C" fns.
2000-10-22 Jason Merrill <jason@redhat.com>
* call.c (build_conditional_expr): Use ocp_convert to force
rvalue conversion.
2000-10-22 Mark Mitchell <mark@codesourcery.com>
* call.c (standard_conversion): Use RVALUE_CONVs for all
expressions that satisfy lvalue_p, not just those that satisfy
real_lvalue_p.
* optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
* typeck.c (c_sizeof): Return an expression of `size_t' type,
not one with TYPE_IS_SIZETYPE set.
(dubious_conversion_warnings): Remove special-case code.
2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
* decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
* error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
(dump_type_prefix): Print vector-of-int as 'int vector'.
(dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
* tree.c (walk_tree): Handle VECTOR_TYPE.
* decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
2000-10-21 Jason Merrill <jason@redhat.com>
* parse.y (operator): Set got_object from got_scope.
Set looking_for_typename.
* decl.c (lookup_name_real): Clear val after setting from_obj.
Reorganize diagnostic.
2000-10-20 Jason Merrill <jason@redhat.com>
* tree.c (walk_tree): Don't walk into default args.
* error.c (dump_expr): Use host_integerp.
2000-10-20 David Edelsohn <edelsohn@gnu.org>
* typeck2.c (abstract_virtuals_error): Use "because" instead of
"since" in error message.
2000-10-20 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
* decl.c (revert_static_member_fn): Fixed typo.
2000-10-19 Mark Mitchell <mark@codesourcery.com>
* class.c (subobject_offset_fn): New type.
(dfs_record_base_offsets): Remove.
(record_base_offsets): Likewise.
(dfs_search_base_offsets): Likewise.
(record_subobject_offset): New function.
(check_subobject_offset): Likewise.
(walk_subobject_offsets): Likewise.
(record_subobject_offsets): Likewise.
(layout_conflict_p): Reimplement.
(layout_nonempty_base_or_field): Correct handling of type
conflicts during layout.
(layout_empty_base): Likewise.
(build_base_field): Adjust to handle new representation of empty
base offset table.
(build_base_fields): Likewise.
(layout_virtual_bases): Likewise.
(splay_tree_compare_integer_csts): New function.
(layout_class_type): Use a splay_tree, rather than a varray, to
represent the offsets of empty bases.
* cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
* decl.c (select_decl): Don't return declarations that are
DECL_ANTICIPATED.
2000-10-18 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
(fake_std_node): New macro.
* decl.c (in_std): Rename to ...
(in_fake_std): ... this.
(flag_no_builtin): Remove.
(flag_no_nonansi_builtin): Likewise.
(walk_namespaces_r): Use fake_std_node.
(push_namespace): Use std_identifier.
(pop_namespace): Use in_fake_std.
(lookup_name_real): Use fake_std_node.
(init_decl_processing): When -fhonor-std, create the `std'
namespace. Don't create a dummy fake_std_node in that case.
Adjust call to c_common_nodes_and_builtins. Use std_identifier.
(builtin_function): Put builtins whose names don't begin
with `_' in the std namespace.
* decl2.c (flag_no_builtin): Remove.
(flag_no_nonansi_builtin): Likewise.
(set_decl_namespace): Use fake_std_node.
(validate_nonmember_using_decl): Likewise.
(do_using_directive): Likewise.
(handle_class_head): Likewise.
* dump.c (dequeue_and_dump): Likewise.
* except.c (init_exception_processing): Use std_identifier.
* init.c (build_member_call): Use fake_std_node.
* rtti.c (init_rtti_processing): Use std_identifier.
2000-10-17 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (back_end_hook): Remove declaration.
* decl2.c (back_end_hook): Remove definition.
* dump.c (dequeue_and_dump): Dump TREE_USED.
2000-10-17 Brad Lucier <lucier@math.purdue.edu>
* spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
* decl.c (WINT_TYPE): Define.
(init_decl_processing): Create types unsigned_ptrdiff_type_node,
c_size_type_node, signed_size_type_node and wint_type_node.
2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
* decl2.c (warn_missing_format_attribute): New variable.
(lang_decode_option): Decode -Wmissing-format-attribute.
2000-10-16 Mark Mitchell <mark@codesourcery.com>
* typeck.c (qualify_type): Remove.
(composite_pointer_type): Fix handling of conversions to `cv void*'.
2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (parse.c, parse.h): Fix think-o in last patch.
2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (parse.c, parse.h): Create atomically.
2000-10-12 Mark Mitchell <mark@codesourcery.com>
* class.c (current_obstack): Remove.
* decl.c (ggc_p): Remove.
(start_decl): Don't use decl_tree_cons.
(grokdeclarator): Don't use build_decl_list.
(start_function): Don't use decl_tree_cons.
(finish_function): Don't mess with obstacks.
* decl2.c (grok_x_components): Don't use build_decl_list.
* lex.c (make_call_declarator): Don't call decl_tree_cons.
(implicitly_declare_fn): Don't call build_decl_list.
* parse.y (frob_specs): Don't call build_decl_list or
decl_tree_cons.
(expr_or_declarator_intern): Don't call decl_tree_cons.
(primary): Don't call build_decl_list.
(fcast_or_absdcl): Likewise.
(typed_declspecs): Don't call decl_tree_cons.
(reserved_declspecs): Don't call build_decl_list.
(declmods): Likewise.
(reserved_typespecquals): Likewise.
(aggr): Likewise.
(new_type_id): Likewise.
(cv_qualifiers): Likewise.
(after_type_declarator_intern): Likewise.
(notype_declarator_intern): Likewise.
(absdcl_intern): Likewise.
(named_parm): Likewise.
* pt.c (most_specialized_class): Likewise.
* repo.c (temporary_obstack): Make it a structure, not a pointer.
(init_repo): Initialize it.
* search.c (current_obstack): Remove.
* typeck2.c (add_exception_specifier): Don't call build_decl_list.
2000-10-09 Richard Henderson <rth@cygnus.com>
* Make-lang.in (CXX_EXTRA_HEADERS): Remove.
(c++ language support bits for libgcc): Remove.
(c++.clean): Remove cplib2.txt cleanup.
* config-lang.in (headers, lib2funcs): Remove.
* exception.cc, new.cc, new1.cc, new2.cc: Remove files.
* tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
* inc/cxxabi.h, inc/exception, inc/new: Remove files.
* inc/new.h, inc/typeinfo: Remove files.
2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
* decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
defined.
(init_decl_processing): Initialize intmax_type_node and
uintmax_type_node.
2000-10-06 Richard Henderson <rth@cygnus.com>
* cp-tree.h (struct cp_language_function): Remove x_result_rtx.
(original_result_rtx): Remove.
* decl.c (save_function_data): Don't clear x_result_rtx.
(mark_lang_function): Don't mark it either.
* expr.c (fixup_result_decl): Remove.
* semantics.c (genrtl_named_return_value): Frob the return decl
before calling emit_local_var.
(genrtl_finish_function): Don't call fixup_result_decl.
Always emit the jump to return_label.
2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (lookup_template_class): Set current access for enum.
(tsubst_enum): Set file & line for enum decl.
* spew.c (yylex): Remove unused variable.
2000-10-05 Richard Henderson <rth@cygnus.com>
* semantics.c (genrtl_finish_function): Don't init or check
can_reach_end; remove noreturn and return value checks.
2000-10-05 Tom Tromey <tromey@cygnus.com>
* init.c (build_java_class_ref): Use `build_static_name' with a
suffix, not a prefix, to build the class object's name.
2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (access_kind): Fix comment typo.
* decl2.c (grokfield): Fix diagnostic typo.
* semantics.c (finish_template_type): Fix comment typo.
(finish_qualified_object_call_expr): Likewise.
2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (tsubst_expr, DECL_STMT case): Don't process if
tsubsting fails.
2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
* spew.c (frob_id): New static function.
(frob_opname): Use it.
(yylex): Use it.
2000-10-01 Mark Mitchell <mark@codesourcery.com>
* decl.c (lang_mark_false_label_stack): Remove.
* lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
* gxxint.texi: Use @email for formatting email addresses.
2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
* error.c: Remove direct obstack manipulation. Replace with
output_buffer-based formatting. Adjust calls to removed macros.
(obstack_chunk_alloc, obstack_chunk_free): Remove.
(OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
2000-09-24 Mark Mitchell <mark@codesourcery.com>
* ir.texi: Move to ../c-tree.texi.
2000-09-20 Jason Merrill <jason@redhat.com>
* decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
2000-09-21 Andreas Jaeger <aj@suse.de>
* errfn.c: Move declaration of cp_printer and cp_printers to ...
* cp-tree.h: ... here.
* error.c: Remove declaration of cp_printer.
2000-09-20 Mark Mitchell <mark@codesourcery.com>
* tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
2000-09-20 Hans-Peter Nilsson <hp@axis.com>
* except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
users.
2000-09-18 Mark Mitchell <mark@codesourcery.com>
* decl.c (start_function): Robustify.
2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* cp-tree.h (check_function_format): Accept a `status' parameter.
* call.c, typeck.c: Updates calls to `check_function_format'.
2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
* decl2.c (handle_class_head): Always push some scope even
in the error case.
2000-09-16 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (struct cp_language_function): Remove
x_scope_stmt_stack and name_declared.
(current_scope_stmt_stack): Remove.
(function_name_declared_p): New macro.
(struct lang_decl_flags): Use c_lang_decl as a base class.
(context): Remove.
(struct lang_decl): Replace saved_tree with context.
(DECL_FRIEND_CONTEXT): Adjust accordingly.
(SET_DECL_FRIEND_CONTEXT): Likewise.
(DECL_VIRTUAL_CONTEXT): Likewise.
(DECL_SAVED_TREE): Remove.
(C_DECLARED_LABEL_FLAG): Likewise.
(cplus_expand_expr_stmt): Don't declare.
(add_decl_stmt): Likewise.
(add_scope_stmt): Likewise.
* decl.c (mark_stmt_tree): Remove.
(case_compare): Likewise.
(finish_case_label): Use c_add_case_label.
(init_decl_processing): Set more language-specific hooks.
(build_enumerator): Fix typo in comment.
(cplus_expand_expr_stmt): Remove.
(mark_lang_function): Use mark_c_language_function.
(lang_mark_tree): Use c_mark_lang_decl.
* decl2.c: Change order of inclusion.
* except.c: Likewise.
* expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
back on c_expand_expr.
* friend.c: Include expr.h.
* init.c: Change order of inclusion.
* Makefile.in: Update dependencies.
* lex.h (free_lang_decl_chain): Remove.
* optimize.c (maybe_clone_body): Use function_name_declared_p.
* pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
it doesn't exist.
(instantiate_decl): Use function_name_declared_p.
* semantics.c (lang_expand_expr_stmt): Remove.
(set_current_function_name_declared): Likewise.
(current_function_name_declared): Likewise.
(begin_compound_stmt): Use function_name_declared_p.
(add_decl_stmt): Remove.
(setup_vtbl_ptr): Use function_name_declared_p.
(add_scope_stmt): Remove.
(current_scope_stmt_stack): New function.
(cp_expand_stmt): Don't handle SCOPE_STMTs.
(expand_body): Use function_name_declared_p.
* tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
* typeck.c: Change order of includes.
(convert_sequence): Remove.
2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
* lex.c (reswords): Add _Complex.
2000-09-14 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* Make-lang.in (cplib2.txt): Depend on cp/Makefile.
2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
* init.c (begin_init_stmts): Don't use // comments.
2000-09-12 Jason Merrill <jason@redhat.com>
* decl.c (maybe_deduce_size_from_array_init): Set do_default for
all non-extern arrays.
* decl.c (grokdeclarator): Complain about 'friend T' for implicit
typenames, too. Downgrade complaint to pedwarn.
(xref_tag): Warn about surprising behavior of 'friend struct T'.
* decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
'class This::Inherited'.
2000-09-12 Mark Mitchell <mark@codesourcery.com>
* decl.c (finish_case_label): Given the LABEL_DECL a
DECL_CONTEXT.
2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
* error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
New macros.
(sorry_for_unsupported_tree, print_scope_operator,
print_left_paren, print_right_paren, print_left_bracket,
print_right_bracket, print_whitespace): Likewise.
(aggr_variety): Rename to class_key_or_enum.
(print_type): Rename to print_type_id.
(print_type_specifier_seq, print_simple_type_specifier,
print_elaborated_type_specifier,
print_rest_of_abstract_declarator,
print_parameter_declaration_clause, print_exception_specification,
print_nested_name_specifier, print_template_id,
typedef_original_name, print_template_argument_list_start,
print_template_argument_list_end): New functions.
2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
* ir.texi: Add more documentation.
2000-09-11 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (struct saved_scope): Remove x_function_parms.
(current_function_parms): Don't define.
(struct cp_language_function): Remove parms_stored.
(current_function_just_assigned_this): Don't define.
(current_function_parms_stored): Likewise.
(static_ctors): Declare.
(static_dtors): Likewise.
(SF_EXPAND): Don't define.
(expand_start_early_try_stmts): Remove declaration.
(store_parm_decls): Likewise.
* decl.c (static_ctors): Don't declare.
(static_dtors): Likewise.
(struct binding_level): Remove this_block.
(poplevel): Remove dead code.
(set_block): Likewise.
(mark_binding_level): Don't mark this_block.
(mark_saved_scope): Don't mark x_function_parms.
(init_decl_processing): Don't add current_function_parms as a GC
root.
(check_function_type): Change prototype.
(start_function): Remove RTL-generation code.
(expand_start_early_try_stmts): Remove.
(store_parm_decls): Give it internal linkage. Remove
RTL-generation code.
(finish_function): Remove RTL-generation code.
* decl2.c (static_ctors): Fix formatting.
(static_dtors): Likewise.
* method.c (use_thunk): Don't call store_parm_decls.
(synthesize_method): Likewise.
* optimize.c (maybe_clone_body): Likewise.
* parse.y (fn.def2): Likewise.
(.set_base_init): Likewise.
(nodecls): Likewise.
* pt.c (instantiate_decl): Likewise.
* rtti.c (synthesize_tinfo_fn): Likewise.
* semantics.c (genrtl_try_block): Simplify.
(expand_body): Use genrtl_start_function and
genrtl_finish_function.
(genrtl_start_function): New function.
(genrtl_finish_function): Likewise.
2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
* error.c (cp_tree_printer, case 'P'): Append break.
2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (frob_opname): Declare.
* parse.y (saved_scopes): New static variable.
(cp_parse_init): Adjust.
(do_id): If lastiddecl is NULL, do do_identifier.
(operator): Save scope information.
(unoperator): New reduction. Restore scope information.
(operator_name): Append unoperator. Call frob_opname.
* spew.c (frob_opname): Define.
2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
* decl.c, rtti.c: Include defaults.h if not already included.
Don't define the *_TYPE_SIZE macros.
2000-09-09 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (push_switch): Change prototype.
(check_cp_case_value): Remove declaration.
(decl_constant_value): Likewise.
* decl.c (struct cp_switch): Add switch_stmt and cases.
(case_compare): New function.
(push_switch): Set switch_stmt. Initialize cases.
(pop_switch): Clean up cases.
(define_case_label): Rename to ...
(finish_case_label): ... this. Do semantic analysis for case
labels here.
(start_function): Correct comment.
* decl2.c (check_cp_case_value): Remove.
* expr.c (do_case): Remove.
* pt.c (tsubst_expr): Adjust call to finish_case_label.
* semantics.c (genrtl_do_poplevel): Remove declaration.
(RECHAIN_STMTS): Remove.
(finish_break_stmt): Use build_break_stmt.
(finish_continue_stmt): Use build_continue_stmt.
(finish_switch_cond): Adjust condition here, rater than in
c_expand_start_case.
(finish_case_label): Remove.
* typeck.c (c_expand_return): Remove.
(c_expand_start_case): Likewise.
2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
* ir.texi: Document type nodes.
2000-09-06 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (init_cp_semantics): Declare.
(genrtl_try_block): Don't declare.
(genrtl_handler): Likewise.
(genrtl_catch_block): Likewise.
(genrtl_ctor_stmt): Likewise.
(genrtl_subobject): Likewise.
(genrtl_do_poplevel): Likewise.
(genrtl_named_return_value): Likewise.
* lex.c (init_parse): Call init_cp_semantics.
* semantics.c (genrtl_try_block): Give it internal linkage.
(genrtl_handler): Likewise.
(genrtl_catch_block): Likewise.
(genrtl_ctor_stmt): Likewise.
(genrtl_subobject): Likewise.
(genrtl_do_poplevel): Likewise.
(genrtl_named_return_value): Likewise.
(lang_expand_stmt): Rename to ...
(cp_expand_stmt): ... this. Only handle C++-specific nodes.
(init_cp_semantics): Define.
* decl.c (initialize_local_var): Remove RTL-generating code.
* semantics.c (genrtl_try_block): Fix formatting.
Move statement-tree facilities from C++ to C front-end.
* cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
(void_zero_node): Remove.
(stmt_tree): Likewise.
(scope_chain): Adjust.
(language_function): Rename to cp_language_function.
(cp_function_chain): Adjust.
(current_stmt_tree): Remove.
(last_tree): Likewise.
(last_expr_type): Likewise.
(struct lang_decl): Adjust.
(STMT_IS_FULL_EXPR_P): Remove.
(add_tree): Remove.
(begin_stmt_tree): Likewise.
(finish_stmt_tree): Likewise.
(walk_tree_fn): Likewise.
(walk_stmt_tree): Likewise.
* class.c (finish_struct): Replace use of add_tree with add_stmt.
* decl.c (mark_stmt_tree): Adjust type.
(init_decl_processing): Don't build void_zero_node.
(initialize_local_var): Adjust usage of current_stmt_tree.
(finish_enum): Use add_stmt, not add_tree.
(save_function_data): Adjust use of language_function.
(finish_constructor_body): Use add_stmt, not add_tree.
(finish_destructor_body): Likewise.
(push_cp_function_context): Adjust use of language_function.
(pop_cp_function_context): Likewise.
(mark_lang_function): Likewise.
(mark_cp_function_context): Likewise.
* init.c (build_aggr_init): Adjust use of current_stmt_tree.
(build_vec_init): Likewise.
* semantics.c (SET_LAST_STMT): Remove.
(RECHAIN_STMTS): Don't use it.
(stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
(current_stmt_tree): Define.
(add_tree): Remove.
(finish_goto_stmt): Use add_stmt, not add_tree.
(finish_expr_stmt): Likewise.
(begin_if_stmt): Likewise.
(finish_then_clause): Likewise.
(begin_while_stmt): Likewise.
(begin_do_stmt): Likewise.
(finish_return_stmt): Likewise.
(begin_for_stmt): Likewise.
(finish_break_stmt): Likewise.
(finish_continue_stmt): Likewise.
(begin_switch_stmt): Likewise.
(finish_case_label): Likewise.
(begin_try_block): Likewise.
(begin_function_try_block): Likewise.
(begin_handler): Likewise.
(begin_catch_block): Likewise.
(begin_compound_stmt): Likewise.
(begin_asm_stmt): Likewise.
(finish_asm_stmt): Likewise.
(finish_label_stmt): Likewise.
(add_decl_stmt): Likewise.
(finish_subobject): Likewise.
(finish_decl_cleanup): Likewise.
(finish_named_return_value): Likewise.
(setup_vtbl_ptr): Likewise.
(add_scope_stmt): Likewise.
(finish_stmt_expr): Likewise.
(prune_unused_decls): Remove.
(begin_stmt_tree): Likewise.
(finish_stmt_tree): Likewise.
(prep_stmt): Adjust use of current_stmt_tree.
(lang_expand_stmt): Likewise.
* tree.c (statement_code_p): Remove.
(cp_statement_code_p): New function.
(walk_stmt_tree): Remove.
(init_tree): Set lang_statement_code_p.
2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
Integrated preprocessor.
* Make-lang.in, Makefile.in: Remove all references to input.c,
gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
* gxx.gperf, hash.h, input.c: Delete.
* lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
initialized properly.
* class.c (fixup_pending_inline): Take a tree, not a
struct pending_inline *. All callers changed.
(init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
RID_PROTECTED entries in ridpointers[] array here.
* decl.c (duplicate_decls): Do not refer to struct
pending_inline.
(record_builtin_type, init_decl_processing): Use RID_MAX not
CP_RID_MAX.
(grokdeclarator): Use C_IS_RESERVED_WORD.
* decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
cpplib.
(grok_x_components): Do not inspect pending_inlines chain.
* cp-tree.h (struct lang_identifier): Add rid_code entry.
(C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
(flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
(DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
TIME_IDENTIFIER_FILEINFO): Kill.
Update prototypes.
* lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
single 32-bit word.
* parse.y: Call do_pending_inlines unconditionally.
reinit_parse_for_method is now snarf_method. fn.defpen is no
longer necessary. Remove unnecessary <itype> annotation on
SCOPE. Do not refer to end_of_file or struct pending_inline.
* semantics.c (begin_inline_definitions): Call
do_pending_inlines unconditionally.
* lex.c: Remove all code now shared with C front end.
Initialize cpplib properly if USE_CPPLIB. Put reserved words
into the get_identifier table. Rewrite pragma handling to
work with the registry. Move code to save tokens for later
processing to spew.c.
* spew.c: Rewrite everything in terms of token streams instead
of text. Move routines here from lex.c / input.c as
appropriate. GC-mark trees hanging off the pending inlines
chain.
2000-09-06 Mark Mitchell <mark@codesourcery.com>
* NEWS: Mention that the named return value extension has been
deprecated.
* cp-tree.h (original_result_rtx): Define.
(TREE_REFERENCE_EXPR): Remove.
(DECL_VPARENT): Likewise.
(pushdecl_nonclass_level): Likewise.
(store_return_init): Likewise.
(reinit_lang_specific): Likewise.
(genrtl_named_return_value): Change prototype.
* decl.c (original_result_rtx): Remove.
(cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
Do not generate RTL for local variables here.
(store_return_init): Remove.
* semantics.c (genrtl_named_return_value): Simplify. Fold in
store_return_init.
(finish_named_return_value): Adjust accordingly. Warn that this
extension is deprecated.
(lang_expand_stmt): Adjust call to genrtl_named_return_value.
2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (type_unification_real): Replace switch with if.
(unify): Tsubst non-type parms before comparing.
2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
* error.c (dump_typename): New function, broken out of ...
(dump_type): ... here. Use it.
* typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
* init.c (build_offset_ref): Deal with namespace scoped
TEMPLATE_ID_EXPRs.
2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
* class.c (resolve_address_of_overloaded_function): Add
explanation message.
* decl.c (define_case_label): Reformat explanation.
* decl2.c (finish_static_data_member_decl): Likewise.
(grokfield): Likewise.
* friend.c (do_friend): Likewise.
2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
* tree.c (walk_tree): Expose tail recursion.
(walk_stmt_tree): New function.
* cp-tree.h: Prototype walk_stmt_tree.
* semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
the BLOCKs directly. If a BLOCK has no variables after
pruning, discard it.
(finish_stmt_tree): Use walk_stmt_tree. No need to save and
restore the line number.
2000-09-05 Mark Mitchell <mark@codesourcery.com>
* Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
(pt.o): Remove dependency on HTAB_H.
* cp-tree.h: Include hashtab.h.
(walk_tree): Change prototype.
(walk_tree_without_duplicates): New function.
* decl.c (check_default_argument): Use it.
* optimize.c (remap_decl): Adjust calls to walk_tree.
(copy_body): Likewise.
(expand_calls_inline): Likewise.
(calls_setjmp_p): Use walk_tree_without_duplicates.
* pt.c: Don't include hashtab.h.
(for_each_template_parm): Use walk_tree_without_duplicates.
* semantics.c (finish-stmt_tree): Likewise.
(expand_body): Likewise.
* tree.c (walk_tree): Add additional parameter.
(walk_tree_without_duplicates): New function.
(count_trees): Use it.
(verify_stmt_tree): Adjust call to walk_tree.
(find_tree): Use walk_tree_without_duplicates.
(no_linkage_check): Likewise.
(break_out_target_exprs): Adjust call to walk_tree.
(cp_unsave): Likewise.
2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
(TEMPLATE_TEMPLATE_PARM): Adjust comment.
* cp-tree.h (TYPE_BINFO): Adjust comment.
(TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
(TEMPLATE_TYPE_PARM_INDEX): Likewise.
(IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
(TYPE_TEMPLATE_INFO): Likewise.
(TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
* class.c (push_nested_class): Likewise.
* decl.c (lookup_name_real): Likewise.
(grokdeclarator): Likewise.
(grok_op_properties): Likewise.
(xref_tag): Likewise.
(xref_basetypes): Likewise.
* decl2.c (constructor_name_full): Likewise.
(arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
(arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
* error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
(dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
(dump_type_suffix): Likewise.
* init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
instead.
(get_aggr_from_typedef): Likewise.
* mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
(write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
(write_template_parm): Likewise.
(write_template_template_parm): Check tree code instead of
using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
* method.c (build_overload_nested_name): Add
BOUND_TEMPLATE_TEMPLATE_PARM.
(process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
* parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
* pt.c (convert_template_argument): Check tree code instead of
using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
(for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
(for_each_template_parm): Adjust comment.
(tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
(tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
(unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
template_args_equal to compare template template parameter cases.
* ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
* search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
instead.
* tree.c (copy_template_template_parm): Decide whether to create
a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
(walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
(copy_tree_r): Likewise.
* typeck.c (comptypes): Likewise. Check tree code instead of
using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
* decl.c (finish_function): Move the code for handling functions
marked with the constructor and destructor attributes inside the
expand_p block.
2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
* init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (lookup_template_class): Remove abort.
* tree.c (get_type_decl): Allow error_mark_node.
2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
* decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
TEMPLATE_ID_EXPRs.
2000-09-03 Mark Mitchell <mark@codesourcery.com>
* operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
new ABI mangling.
2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
* parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
union tag mismatch error reporting.
2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
* call.c (build_scoped_method_call): Check it is not a namespace.
2000-08-30 Jason Merrill <jason@redhat.com>
* cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
* tree.c (bot_manip): Check TREE_CONSTANT rather than
!TREE_SIDE_EFFECTS. Call break_out_target_exprs and
build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
* decl.c (start_function): Always call make_function_rtl.
2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
* semantics.c (prune_unused_decls): New function.
(finish_stmt_tree): Call it via walk_tree.
2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
* class.c (build_secondary_vtable): Constify a char *.
* decl.c (init_decl_processing): Initialize function_id_node,
pretty_function_id_node, and func_id_node.
* input.c (struct input_source): Constify 'str'.
(feed_input): Constify first argument.
* mangle.c (write_identifier): Constify argument.
* pt.c (mangle_class_name_for_template): Constify argument.
2000-08-29 Mark Mitchell <mark@codesourcery.com>
* typeck.c (mark_addressable): Remove code that pokes around in
RTL.
2000-08-28 Jason Merrill <jason@redhat.com>
* lex.c (file_name_nondirectory): Move to toplev.c.
* cp-tree.h (LOCAL_CLASS_P): New macro.
* class.c (finish_struct_1): Use it.
2000-08-27 Alex Samuel <samuel@codesourcery.com>
* mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
(write_encoding): Pass another argument to write_name.
(write_name): Add ignore_local_scope parameter. Fix handling of
local names.
(write_nested_name): Use write_unqualified_name.
(write_prefix): Likewise. Skip out on FUNCTION_DECLs.
(write_template_prefix): Use write_unqualified_name.
(write_component): Remove.
(write_local_name): Add parameter. Use direct local entity to
discriminator calculation.
(write_class_enum_type): Pass another argument to write_name.
(write_template_template_arg): Likewise.
(make_guard_variable): Likewise.
2000-08-27 Jason Merrill <jason@redhat.com>
* decl.c (pushdecl): Matching decls for local externs are found in
the current level. Propagate linkage information from previous
declarations.
2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
* ir.texi (Expressions): Fix typo.
2000-08-25 Greg McGary <greg@mcgary.org>
* tree.c (init_tree): Use ARRAY_SIZE.
2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
* error.c (cp_tree_printer): Rework.
2000-08-25 Mark Mitchell <mark@codesourcery.com>
* Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
dyn-string.o.
(CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
(cp-demangle.o): Remove target.
(dyn-string.o): Likewise.
* decl.c (grokfndecl): Require that `main' return an `int'.
* mangle.c (write_encoding): Don't mangle return types for
conversion functions.
2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
* error.c (tree_formatting_info): New data type.
(tree_being_formatted): New macro.
(tree_formatting_flags): Likewise.
(put_whitespace): Likewise.
(print_tree_identifier): Likewise.
(print_identifier): Likewise.
(cp_tree_printer, print_function_argument_list, print_declaration,
print_expression, print_function_declaration,
print_function_parameter, print_type, print_cv_qualifier): New
functions.
(init_error): Initialize lang_printer.
2000-08-24 Jason Merrill <jason@redhat.com>
* typeck.c (build_ptrmemfunc): Just reinterpret if there's no
adjustment necessary.
2000-08-24 Greg McGary <greg@mcgary.org>
* cp-tree.h (MAIN_NAME_P): Remove macro.
2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
* error.c (print_instantiation_context): Don't forget to flush the
buffer.
2000-08-23 Jason Merrill <jason@redhat.com>
* typeck.c (build_ptrmemfunc): Save the input pmf.
* method.c (process_modifiers): Use same_type_p.
2000-08-23 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
* mangle.c (write_function_type): Change prototype.
(write_encoding): Don't mangle return types for
constructors or destructors.
(write_type): Adjust call to write_function_type.
* pt.c (instantiate_template): Instantiate alternate entry points
when instantiating the main function.
2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
* error.c (cp_print_error_function): Don't use embedded '\n' in
output_printf.
2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
* decl.c (init_decl_processing): Remove bogus initialization.
* error.c (lang_print_error_function): Restore here.
(init_error): Initialize print_error_function.
2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
* decl2.c (arg_assoc): Revert my 2000-08-11 change.
2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
* Makefile.in (error.o): Depends on diagnostic.h
* cp-tree.h (problematic_instantiation_changed,
record_last_problematic_instantiation, current_instantiation,
print_instantiation_context): Declare.
(maybe_print_template_context): Remove.
* decl.c (init_decl_processing): Set print_error_function to NULL.
(lang_print_error_function): Remove, since we're using a new
machinery.
* error.c: #include diagnostic.h
(function_category): New function.
(cp_diagnostic_starter): Likewise.
(cp_diagnostic_finalizer): Likewise.
(cp_print_error_function): Likewise.
(maybe_print_instantiation_context): Likewise.
(print_instantiation_full_context): Likewise.
(print_instantiation_partial_context): Likewise.
(print_instantiation_context): Define.
(init_error): Initialize diagnostic pager and finalizer.
* pt.c (problematic_instantiation_changed): Define.
(record_last_problematic_instantiation): Likewise.
(current_instantiation): Likewise.
(maybe_print_template_context): Remove.
(print_template_context): Likewise.
(current_tinst_level): Make static to reflect Brendan Kehoe's
change of 1995-04-13.
(push_tinst_level): Call print_instantiation_context.
2000-08-21 Nix <nix@esperi.demon.co.uk>
* lang-specs.h: Do not process -o or run the assembler if
-fsyntax-only.
2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
* decl.c (flag_hosted, flag_noniso_default_format_attributes): New
variables.
* decl2.c (lang_decode_option): Disable gettext attributes for
-ansi.
2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
* lex.c (lang_init_options): Default diagnostic message maximum
length to 80, when line-wrapping.
2000-08-20 Mark Mitchell <mark@codesourcery.com>
* class.c (build_vtbl_initializer): Clear the entire
vtbl_init_data. Start keeping track of the functions for which we
have created vcall offsets here.
(dfs_build_vcall_offset_vtbl_entries): Remove.
(build_vcall_offset_vtbl_entries): Reimplement.
(add_vcall_offset_vtbl_entries_r): New function.
(add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
computing when vcall offsets are necessary.
2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (member_function_or_else): Use cp_error ... %T.
(grokdeclarator): Likewise.
(start_method): Likewise.
* friend.c (make_friend_class): Use cp_pedwarn ... %T.
2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
* decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
TYPE_DECLs.
2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (PTRMEM_OK_P): New macro.
(itf_ptrmem_ok): New enumeration value.
* class.c (resolve_address_of_overloaded_function): Add PTRMEM
argument. Diagnose implicit pointer to member.
(instantiate_type): Don't diagnose implicit pointer to member
here. Pass itf_ptrmem_ok if ok. Adjust calls to
resolve_address_of_overloaded_function.
* init.c (build_offset_ref): Set PTRMEM_OK_P.
(resolve_offset_ref): Don't diagnose implicit pointer to member here.
* semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
* typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
(build_unary_op): Deal with single non-static member in
microsoft-land.
2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
* decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (enum_name_string): Remove prototype.
(report_case_error): Remove prototype.
* cp/typeck2.c (enum_name_string): Remove.
(report_case_error): Remove.
* error.c (dump_expr): Deal with enum values directly.
Correctly negate integer constant.
2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
* inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
(__cxa_vec_delete2, __cxa_vec_delete3): Declare.
* vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
(__cxa_vec_delete2, __cxa_vec_delete3): Implement.
(__cxa_vec_new): Use __cxa_vec_new2.
(__cxa_vec_delete): Use __cxa_vec_delete2.
2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
* vec.cc (__cxa_vec_new): Set "C" linkage.
(__cxa_vec_ctor): Likewise.
(__cxa_vec_cctor): Likewise.
(__cxa_vec_dtor): Likewise.
(__cxa_vec_delete): Likewise.
* inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
(__cxa_vec_ctor): Likewise.
(__cxa_vec_cctor): Likewise.
(__cxa_vec_dtor): Likewise.
(__cxa_vec_delete): Likewise.
2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
* class.c (instantiate_type): Reinstate local variable
deleted in previous change.
* cvt.c (cp_convert_to_pointer): Pass itf_complain, not
itf_no_attributes.
2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (instantiate_type_flags): New enumeration.
(instantiate_type): Change parameter.
* class.c (instantiate_type): Adjust prototype. Adjust.
* call.c (standard_conversion): Adjust instantiate_type call.
(reference_binding): Likewise.
(build_op_delete_call): Likewise.
(convert_like_real): Likewise.
* cvt.c (cp_convert_to_pointer): Likewise.
(convert_to_reference): Likewise.
* pt.c (convert_nontype_argument): Likewise.
* typeck.c (build_binary_op): Likewise.
(build_ptrmemfunc): Likewise.
(convert_for_assignment): Likewise.
2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (CPTR_AGGR_TAG): New global tree node.
(current_aggr): Define.
* decl.c (grokdeclarator): Make sure a friend class is an
elaborated type specifier.
* parse.y (current_aggr): Remove static definition.
(cp_parse_init): Adjust.
(structsp): Clear and restore current_aggr.
(component_decl_list): Clear current_aggr.
* error.c (dump_type, case TYPENAME_TYPE): Don't emit the
aggregate tag on the typename's context.
* pt.c (tsubst_friend_class): Return error_mark_node, if
parms becomes NULL.
(instantiate_class_template): Ignore error_mark_node friend types.
2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
* cvt.c (warn_ref_binding): New static function, broken out of ...
(convert_to_reference): ... here. Use it.
2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
* parse.y (template_arg): Add rule for template qualified with
global scope.
2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
* decl2.c (add_function): Reorganize.
(arg_assoc): Do not consider function template decls.
2000-08-11 Jason Merrill <jason@redhat.com>
* decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
looking inside.
2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (resolve_scope_to_name): Remove unused prototype.
(lookup_nested_tag): Likewise.
* decl2.c (grokfield): Fix comment to reflect many types of _DECLs
can be produced.
2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
* parse.y (named_complex_class_head_sans_basetype): Remove
always true if.
2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
* decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
explicit TEMPLATE_ID_EXPR args.
(build_expr_from_tree, case CALL_EXPR): Likewise.
2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (check_tag_decl): Diagnose typename's which don't
declare anything.
2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
* init.c (build_aggr_init): Reject bogus array initializers
early.
2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
* rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
runtime.
* cp/tinfo.cc (__dynamic_cast): Likewise.
* cp/inc/cxxabi.h (__dynamic_cast): Likewise.
2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
* cvt.c (convert_to_pointer_force): Fix error message when
attempting to cast from ambiguous base.
2000-08-08 Jason Merrill <jason@redhat.com>
* pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
(tsubst_template_arg_vector): Likewise.
* decl2.c (build_anon_union_vars): Choose the largest field; don't
assume that one will be as large as the union.
2000-08-07 Kazu Hirata <kazu@hxi.com>
* cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
* decl.c (pop_labels): Likewise.
2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
* inc/cxxabi.h (__pbase_type_info): Changed member names to match
specifications.
(__pointer_to_member_type_info): Likewise.
(__base_class_info): Likewise.
(__class_type_info): Likewise.
(__si_class_type_info): Likewise.
(__vmi_class_type_info): Likewise.
* tinfo.cc (__si_class_type_info::__do_find_public_src):
Changed member names to match specifications.
(__vmi_class_type_info::__do_find_public_src): Likewise.
(__si_class_type_info::__do_dyncast): Likewise.
(__vmi_class_type_info::__do_dyncast): Likewise.
(__si_class_type_info::__do_upcast): Likewise.
(__vmi_class_type_info::__do_upcast): Likewise.
* tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
(__pbase_type_info::__pointer_catch): Likewise.
(__pointer_type_info::__pointer_catch): Likewise.
(__pointer_to_member_type_info::__pointer_catch): Likewise.
2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
* Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
* Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
(cc1plus): Link with $(BACKEND) and $(C_OBJS).
2000-08-04 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (add_method): Change prototype.
* class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
Don't double the size of the method vector in the error case.
(handle_using_decl): Adjust call to add_method.
(add_implicitly_declared_members): Likewise.
(clone_function_decl): Likewise.
* decl2.c (check_classfn): Likewise.
* semantics.c (finish_member_declaration): Likewise.
2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
* decl.c (flag_isoc94): New variable.
2000-08-02 Jason Merrill <jason@redhat.com>
* pt.c (do_type_instantiation): Add complain parm; don't complain
if called recursively.
* cp-tree.h, parse.y: Adjust.
2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
* decl2.c: Silently ignore -Wstrict-prototypes; warn about
-Wno-strict-prototypes.
* g++spec.c: Adjust type of second argument to
lang_specific_driver, and update code as necessary.
* cp-tree.h: Don't prototype min_precision here.
(my_friendly_assert): Cast expression to void.
* semantics.c (do_poplevel): Initialize scope_stmts.
2000-08-02 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (DECL_NEEDED_P): Tweak.
2000-07-28 Jason Merrill <jason@redhat.com>
* lang-specs.h: Use %i in rule for .ii files.
2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
* lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
2000-07-30 Mark Mitchell <mark@codesourcery.com>
Allow indirect primary bases.
* cp-tree.h (struct lang_type): Remove vfield_parent. Add
primary_base.
(CLASSTYPE_VFIELD_PARENT): Remove.
(CLASSTYPE_PRIMARY_BINFO): Reimplement.
(BINFO_PRIMARY_BINFO): Remove.
(CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
(BINFO_VBASE_PRIMARY_P): Likewise.
(BINFO_PRIMARY_BASE_OF): New macro.
(BINFO_INDIRECT_PRIMARY_P): Likewise.
(get_primary_binfo): New function.
* decl.c (lang_mark_tree): Make lang_type::primary_base.
* class.c (vcall_offset_data_s): Rename to ...
(vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
and add ctor_vtbl_p.
(get_derived_offset): Use get_primary_binfo.
(dfs_mark_primary_bases): Adjust handling of virtual primary
bases.
(mark_primary_bases): Likewise.
(set_primary_base): Take a binfo, not an integer, as a
representation of the primary base.
(indirect_primary_base_p): Remove.
(determine_primary_base): Adjust for indirect primary bases.
(dfs_find_final_overrider): Fix typo in coment.
(update_vtable_entry_for_fn): Use get_primary_binfo.
(layout_nonempty_base_or_field): Tweak.
(build_base_fields): Adjust for new primary base semantics.
(dfs_propagate_binfo_offsets): Remove.
(propagate_binfo_offsets): Rewrite.
(dfs_set_offset_for_shared_vbases): Remove.
(layout_virtual_bases): Don't use it.
(layout_class_type): Set CLASSTYPE_SIZE correctly under the new
ABI.
(finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
CLASSTYPE_VFIELD_PARENT.
(dfs_get_primary_binfo): New function.
(get_primary_binfo): Likewise.
(dump_class_hierarchy_r): Tweak printing of primary bases.
(build_vtbl_initializer): Fix typo in comments. Use
vtbl_init_data.
(build_vcall_and_vbase_vtbl_entries): Likewise.
(build_vbaes_offset_vtbl_entries): Likewise.
(dfs_build_vcall_offset_vtbl_entries): Adjust setting of
BV_VCALL_INDEX to handle indirect primary bases.
(build_vcall_offset_vtbl_entries): Use vtbl_init_data.
(build_rtti_vtbl_entries): Likewise.
* search.c (get_shared_vbase_if_not_primary): Tweak.
(find_vbase_instance): Likewise.
(binfo_for_vtable): Simplify.
* tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
(make_binfo): Make it have 11 entries.
2000-07-30 Alex Samuel <samuel@codesourcery.com>
* mangle.c (DECL_TEMPLATE_ID_P): Remove.
(CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
ascertaining primaryness.
(G): Remove template_args.
(decl_is_template_id): New function.
(write_encoding): Use decl_is_template_id.
(write_name): Likewise. Handle type_decls. Get main variant of
type decls.
(write_nested_name): Likewise.
(write_prefix): Likewise.
(write_template_prefix): Likewise.
(write_special_name_constructor): Remove defunct production from
comment.
(write_bare_function_type): Remove comment about absent parameter.
(write_template_template_arg): Add missing grammar production to
comment.
2000-07-27 Jason Merrill <jason@redhat.com>
* decl.c (duplicate_decls): If common_type produces a non-typedef
type for a typedef, just use the old type.
2000-07-27 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (function_depth): Declare.
(verify_stmt_tree): Likewise.
(find_tree): Likewise.
* decl.c (function_depth): Give it external linkage.
* optimize.c (optimize_function): Increment and decrement it.
* tree.c (verify_stmt_tree_r): New function.
(verify_stmt_tree): Likewise.
(find_tree_r): Likewise.
(find_tree): Likewise.
2000-07-27 Jason Merrill <jason@redhat.com>
* pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
TYPE_PTRMEMFUNC_P.
* cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
2000-07-26 Mark Mitchell <mark@codesourcery.com>
* decl.c (start_cleanup_fn): Mark the function as `inline'.
* decl2.c (get_guard): Call cp_finish_decl, not
rest_of_decl_compilation, for local guards.
* lex.c (do_identifier): Remove unused variable.
2000-07-26 Marc Espie <espie@cvs.openbsd.org>
* parse.y: Add missing ';'.
2000-07-26 Mark Mitchell <mark@codesourcery.com>
* parse.y (empty_parms): Use `()', not `(...)', when in the scope
of `extern "C++"'.
2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
Kill strict_prototype. Backwards compatibility only for
non NO_IMPLICIT_EXTERN_C systems.
* cp-tree.h (flag_strict_prototype): Remove.
(strict_prototype): Remove.
(strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
* decl.c (maybe_push_to_top_level): Adjust.
(pop_from_top_level): Adjust.
(decls_match): Only allow sloppy parm matching for ancient
system headers.
(init_decl_processing): Adjust.
(grokdeclarator): Adjust.
* decl2.c (flag_strict_prototype): Remove.
(strict_prototype): Remove.
(strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
(lang_f_options): Remove "strict-prototype".
(unsupported-options): Add "strict-prototype".
* lex.c (do_identifier): Adjust.
(do_scoped_id): Adjust.
* parse.y (empty_parms): Adjust.
* class.c (push_lang_context): Adjust.
(pop_lang_context): Adjust.
* typeck.c (comp_target_parms): Adjust.
2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (poplevel): Deal with anonymous variables at for scope.
(maybe_inject_for_scope_var): Likewise.
2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
* decl.c: Remove all signal handling code, now done in toplev.c.
2000-07-23 Mark Mitchell <mark@codesourcery.com>
* decl.c (make_rtl_for_nonlocal_decl): Rework.
* pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
correctly.
2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
* cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
Define my_friendly_assert and my_friendly_abort as macros
which may call friendly_abort. Prototype friendly abort, not
my_friendly_abort or my_friendly_assert.
* decl.c (signal_catch): Report the signal caught in the error
message. Call fatal directly.
* typeck2.c (ack, my_friendly_assert): Delete.
(my_friendly_abort): Rename to friendly_abort. Expect file,
line, and function parameters. Report the abort code, then
call fancy_abort. Do not mask an abort if errors have
already occurred.
2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
* typeck.c (comp_target_parms): Remove obsolete parameter.
(comp_target_types): Adjust.
2000-07-17 Jason Merrill <jason@redhat.com>
* typeck.c (mark_addressable): Never set TREE_USED.
* call.c (build_call): Don't abort on calls to library functions
that have been declared normally.
* typeck.c (build_binary_op): Fix grammar in warning.
* exception.cc (__eh_free): Fix prototype.
* decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
* decl.c (pushdecl): Handle seeing an OVERLOAD in
IDENTIFIER_NAMESPACE_VALUE.
2000-07-16 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
* method.c (use_thunk): Correct handling of vcall offsets.
2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
* .cvsignore: parse.h and parse.c have no cp- prefix.
2000-07-13 Mark Mitchell <mark@codesourcery.com>
* .cvsignore: New file.
2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
* lang-specs.h: Use the new named specs. Remove unnecessary braces.
2000-07-12 Mark Mitchell <mark@codesourcery.com>
* Makefile.in ($(PARSE_H)): Depend directly on parse.y.
* parse.c: Remove.
* parse.h: Likewise.
2000-07-11 Mark Mitchell <mark@codesourcery.com>
* class.c (layout_class_type): Add pointers to virtual bases after
base classes under the old ABI.
2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
* semantics.c (finish_for_stmt): Remove call to emit_line_note.
(finish_continue_stmt): Likewise.
(begin_for_stmt): Remove call to note_level_for_for.
(finish_goto_stmt): Change call from build_min_nt
to build_stmt.
(finish_expr_stmt): Likewise.
(begin_if_stmt): Likewise.
(begin_while_stmt): Likewise.
(finish_while_stmt): Likewise.
(finish_return_stmt): Likewise.
(begin_for_stmt): Likewise.
(finish_for_stmt): Likewise.
(finish_break_stmt): Likewise.
(begin_switch_stmt): Likewise.
(finish_case_label): Likewise.
(genrtl_try_block): Likewise.
(begin_try_block): Likewise.
(begin_handler): Likewise.
(begin_compound_stmt): Likewise.
(finish_asm_stmt): Likewise.
(finish_label_stmt): Likewise.
(add_decl_stmt): Likewise.
(finish_subobject): Likewise.
(finish_decl_cleanup): Likewise.
(finish_named_return_value): Likewise.
(setup_vtbl_ptr): Likewise.
(add_scope_stmt): Likewise.
* decl.c (finish_constructor_body): Likewise.
(finish_destructor_body): Likewise.
* optimize.c (copy_body_r): Likewise.
(initialize_inlined_parameters): Likewise.
(declare_return_variable): Likewise.
(expand_call_inline): Likewise.
2000-07-10 Jakub Jelinek <jakub@redhat.com>
* semantics.c (expand_body): Sync interface information
at the end of function body expansion.
2000-07-09 Jason Merrill <jason@redhat.com>
* init.c (build_new_1): Bail early if the call to new fails.
* decl.c (compute_array_index_type): Check specifically for
an INTEGER_CST, not just TREE_CONSTANT.
* decl.c (duplicate_decls): Don't call duplicate_decls on
the DECL_TEMPLATE_RESULT.
(decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
codes.
* error.c (dump_template_bindings): Don't crash if we had an
invalid argument list.
* typeck.c (c_expand_start_case): Do narrowing here.
* semantics.c (finish_switch_cond): Not here.
2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
* parse.y (asm_clobbers): Do string concatenation.
2000-07-09 Mark Mitchell <mark@codesourcery.com>
* decl.c (pushtag): Don't put local classes in template functions
on the local_classes list.
2000-07-04 Scott Snyder <snyder@fnal.gov>
* decl2.c (get_guard): Add missing return for old ABI local
variable case.
2000-07-09 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (char_type_p): New function.
* decl.c (init_decl_processing): Don't initialize
signed_wchar_type_node or unsigned_wchar_type_node.
(complete_array_type): Handle brace-enclosed string-constants.
* rtti.c (emit_support_tinfos): Remove #if 0'd code.
* tree.c (char_type_p): New function.
* typeck2.c (digest_init): Use char_type_p.
2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (tsubst): Don't layout type, if it's error_mark.
2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (instantiate_pending_templates): Reset template level.
2000-07-05 Jason Merrill <jason@redhat.com>
* call.c (joust): Don't complain about `operator char *()' beating
`operator const char *() const'.
2000-07-04 scott snyder <snyder@fnal.gov>
Jason Merrill <jason@redhat.com>
* repo.c (repo_get_id): Handle the case where a class with virtual
bases has a null TYPE_BINFO_VTABLE.
2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
Jason Merrill <jason@redhat.com>
* parse.y (member_init): Just pass in the type.
* init.c (expand_member_init): Handle getting a type.
2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
Jason Merrill <jason@redhat.com>
* decl.c (finish_function): Warn if a function has no return
statement.
Suggested by Andrew Koenig.
* typeck.c (check_return_expr): Do set current_function_returns_value
if we got an error_mark_node.
2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
* decl2.c (push_decl_namespace): Push the original namespace.
2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
* semantics.c (begin_class_definition): Clear it.
2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
* cp-tree.h (genrtl_goto_stmt): Remove declaration.
(genrtl_expr_stmt): Likewise.
(genrtl_decl_stmt): Likewise.
(genrtl_if_stmt): Likewise.
(genrtl_while_stmt): Likewise.
(genrtl_do_stmt): Likewise.
(genrtl_return_stmt): Likewise.
(genrtl_for_stmt): Likewise.
(genrtl_break_stmt): Likewise.
(genrtl_continue_stmt): Likewise.
(genrtl_scope_stmt): Likewise.
(genrtl_switch_stmt): Likewise.
(genrtl_case_label): Likewise.
(genrtl_begin_compound_stmt): Likewise.
(genrtl_finish_compound_stmt): Likewise.
(genrtl_compound_stmt): Likewise.
(genrtl_asm_stmt): Likewise.
* init.c (begin_init_stmts): Remove call to
genrtl_begin_compound_stmt.
(finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
* semantics.c (lang_expand_stmt): Changed call to
genrtl_compound_stmt to ignore return value.
2000-07-02 Mark Mitchell <mark@codesourcery.com>
* mangle.c (canonicalize_for_substitution): Return the canonical
variant of a type.
* decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
TYPE_DECL.
* typeck.c (commonparms): Remove obstack manipulations.
2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
* Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
* Makefile.in (OBJS): Added ../c-semantics.o.
(OBJDEPS): Likewise.
* cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
../c-common.h.
(struct stmt_tree): Added comment.
(current_function_name_declared): Removed.
(stmts_are_full_exprs_p): Likewise.
(genrtl_do_pushlevel): Likewise.
(genrtl_clear_out_block): Likewise.
(COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
(DECL_ANON_UNION_ELEMS): Likewise.
(emit_local_var): Likewise.
(make_rtl_for_local_static): Likewise.
(do_case): Likewise.
(expand_stmt): Likewise.
(genrtl_decl_cleanup): Likewise.
(c_expand_asm_operands): Likewise.
(c_expand_return): Likewise.
(c_expand_start_case): Likewise.
* decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
(emit_local_var): Likewise.
(initialize_local_var): Change reference to
stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
Change reference to stmts_are_full_exprs_p to
current_stmt_tree->stmts_are_full_exprs_p.
(push_cp_function_context): Likewise.
* expect.c (expand_throw): Change reference to
stmts_are_full_exprs_p.
* init.c (build_aggr_init): Change reference to
stmts_are_full_exprs_p.
(build_vec_init): Likewise.
* optimize.c (maybe_clone_body): Change reference to
current_function_name_declared to
cp_function_chain->name_declared.
* pt.c (instantiate_decl): Change reference to
current_function_name_declared to
cp_function_chain->name_declared.
* semantics.c (expand_cond): Moved declaration to c-common.h.
(genrtl_do_pushlevel): Moved to c-semantics.c.
(genrtl_clear_out_block): Likewise.
(genrtl_goto_stmt): Likewise.
(genrtl_expr_stmt): Likewise.
(genrtl_decl_stmt): Likewise.
(gerntl_if_stmt): Likewise.
(genrtl_while_stmt): Likewise.
(genrtl_do_stmt): Likewise.
(genrtl_return_stmt): Likewise.
(genrtl_for_stmt): Likewise.
(genrtl_break_stmt): Likewise.
(genrtl_continue_stmt): Likewise.
(genrtl_scope_stmt): Likewise.
(genrtl_switch_stmt): Likewise.
(genrtl_case_label): Likewise.
(genrtl_begin_compound_stmt): Likewise.
(genrtl_finish_compound_stmt): Likewise.
(genrtl_compound_stmt): Likewise.
(genrtl_asm_stmt): Likewise.
(genrtl_decl_cleanup): Likewise.
(expand_cond): Likewise.
(expand_stmt): Renamed to ...
(lang_expand_stmt): ... this.
(lang_expand_expr_stmt): Initialize.
(set_current_function_name_declared): Likewise.
(stmts_are_full_exprs_p): Likewise.
(current_function_name_declared): Likewise.
(anon_aggr_type_p): Likewise.
(do_poplevel): Change reference to
stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
Change reference to stmts_are_full_exprs_p to
current_stmt_tree->stmts_are_full_exprs_p.
(add_tree): Likewise.
(finish_expr_stmt): Likewise.
(prep_stmt): Likewise.
(lang_expand_stmt): Likewise.
(begin_compound_stmt): Change reference to
current_function_name_declared to
cp_function_chain->name_declared and call to
current_function_name_declared().
(setup_vtbl_ptr): Likewise.
(genrtl_do_poplevel): Removed.
2000-06-30 Jason Merrill <jason@redhat.com>
* init.c (init_init_processing): Go back to aligning like
double_type_node for old ABI.
(get_cookie_size): Make cookie larger if we get a type that needs
more alignment.
(build_vec_delete): Call it.
* typeck.c (qualify_type_recursive): New fn.
(composite_pointer_type): Use it.
(build_binary_op): Use composite_pointer_type.
2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
Jason Merrill <jason@redhat.com>
* typeck.c (check_return_expr): Don't complain about returning
NULL from operator new if -fcheck-new.
* cp-tree.h: Declare flag_check_new here.
* init.c: Not here.
2000-06-28 Alex Samuel <samuel@codesourcery.com>
* mangle.c (find_substitution): Use same_type_p.
(write_encoding): Don't check for substitutions.
2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
* parse.y (expr_no_comma_rangle): New non-terminal.
(template_parm): Use it for default parameter case.
(template_arg): Use it.
(expr_no_commas): Remove commented out undefined extensions.
* Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
* parse.h, parse.c: Rebuilt.
2000-06-30 Mark Mitchell <mark@codesourcery.com>
* semantics.c (genrtl_asm_stmt): Don't decay input operands here.
(finish_asm_stmt): Do it here, instead.
* cp-tree.h (ridpointers): Don't declare.
* decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
(record_builtin_java_type): Likewise.
(init_decl_processing): Likewise.
* lex.c: Move inclusion of lex.h.
(ridpointers): Don't define.
(init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
RID_MAX.
* lex.h (enum rid): Rename to ...
(enum cp_rid): ... this.
(ridpointers): Don't declare.
* parse.y: Move inclusion of lex.h.
* parse.c: Regenerated.
* spew.c: Move inclusion of lex.h.
* cp-tree.h (struct language_function): Remove temp_name_counter.
(temp_name_counter): Remove.
(get_temp_name): Change prototype.
(get_guard): New function.
(get_guard_cond): Likewise.
(set_guard): Likewise.
* cvt.c (build_up_reference): Adjust call to get_temp_name.
* decl.c (expand_static_init): Use get_guard and friends to
implement guard variables.
* decl2.c (get_temp_name): Assume that the variables created are
always static.
(get_sentry): Rename to ...
(get_guard): ... this. Implement new ABI guard variables.
(get_guard_bits): New function.
(get_guard_cond): Likewise.
(set_guard): Likewise.
(start_static_initialization_or_destruction): Use them.
(do_static_initialization): Replace sentry with guard throughout.
(do_static_destruction): Likewise.
* init.c (create_temporary_var): Add comment.
2000-06-28 Alex Samuel <samuel@codesourcery.com>
* mangle.c (find_substitution): Use same_type_p.
(write_encoding): Don't check for substitutions.
2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
* parse.y (expr_no_comma_rangle): New non-terminal.
(template_parm): Use it for default parameter case.
(template_arg): Use it.
(expr_no_commas): Remove commented out undefined extensions.
* Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
* parse.h, parse.c: Rebuilt.
2000-06-29 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (flag_const_strings): Remove.
(warn_parentheses): Likewise.
(warn_format): Likewise.
(common_type): Likewise.
(default_conversion): Likewise.
(build_binary_op): Likewise.
(cp_build_binary_op): New macro.
* call.c (build_new_op): Use cp_build_binary_op instead of
build_binary_op.
* class.c (build_vtable_entry_ref): Likewise.
* decl.c (expand_static_init): Likewise.
(compute_array_index_type): Likewise.
(build_enumerator): Likewise.
* decl2.c (delete_sanity): Likewise.
(start_static_initialization_or_destruction): Likewise.
* error.c (dump_type_suffix): Likewise.
* init.c (resolve_offset_ref): Likewise.
(build_new): Likewise.
(build_new_1): Likewise.
(build_vec_delete_1): Likewise.
(build_vec_init): Likewise.
(build_delete): Likewise.
* rtti.c (synthesize_tinfo_fn): Likewise.
(synthesize_tinfo_var): Likewise.
* search.c (expand_upcast_fixups): Likewise.
(fixup_all_virtual_upcast_offsets): Likewise.
* typeck.c (build_array_ref): Likewise.
(get_member_function_from_ptrfunc): Likewise.
(build_binary_op): Add parameter.
(pointer_int_sum): Use cp_build_binary_op.
(pointer_diff): Likewise.
(build_modify_expr): Likewise.
(get_delta_difference): Likewise.
(build_ptrmemfunc): Likewise.
2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
* decl.c (create_implicit_typedef): Adjust.
* decl2.c (build_artificial_parm): Adjust.
* method.c (implicitly_declare_fn): Adjust.
* pt.c (push_inline_template_parms_recursive): Adjust.
(process_template_parm): Adjust.
(overloaded_template_name): Adjust.
* semantics.c (finish_template_template_parm): Adjust.
2000-06-28 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
* class.c (update_vtable_entry_for_fn): Correct logic for deciding
where to emit thunks.
(build_vtt): Adjust call to build_vtt_inits.
(build_vtt_inits): Add parameter to indicate whether or not
sub-VTTs for virtual bases should be included. Adjust handling of
construction vtables.
(get_matching_base): New function.
(dfs_build_vtt_inits): Rename to ...
(dfs_build_secondary_vptr_vtt_inits): Adjust handling of
construction vtables.
(dfs_fixup_binfo_vtbls): Likewise.
(build_ctor_vtbl_groups): Build construction vtables for virtual
bases, too.
(accumulate_vtbl_inits): Tweak logic for deciding whether or not
to build construction vtbls.
(dfs_accumulate_vtbl_inits): Adjust handling of
construction vtables.
* pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
types correctly.
2000-06-27 Mark Mitchell <mark@codesourcery.com>
* decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
* search.c (hides): Remove.
(is_subobject_of_p): Add most_derived parameter. Use
CANONICAL_BINFO.
(lookup_field_queue_p): Adjust.
(lookup_field_r): Adjust.
2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
* decl2.c (handle_class_head): Bash typedefs to the type's main
decl.
2000-06-25 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
(begin_global_stmt_expr): ... this.
(genrtl_finish_stmt_expr): Rename to ...
(finish_global_stmt_expr): ... this.
* init.c (begin_init_stmts): Adjust calls.
(finish_init_stmts): Likewise.
* semantics.c (genrtl_begin_stmt_expr): Rename to ...
(begin_global_stmt_expr): ... this.
(genrtl_finish_stmt_expr): Rename to ...
(finish_global_stmt_expr): ... this.
2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
* search.c (lookup_member): Fix typo in comment.
2000-06-24 Jason Merrill <jason@redhat.com>
* decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
(push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
* parse.y (complex_direct_notype_declarator): Support global_scope.
* Makefile.in: Adjust conflict count.
2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
* parse.y (template_arg): Convert TEMPLATE_DECL
that is a template template parameter to
TEMPLATE_TEMPLATE_PARM here.
* cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
* cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
(copy_template_template_parm): Adjust prototype.
* decl.c (grokdeclarator): Remove dead code.
* pt.c (process_template_parm): Tidy.
(lookup_template_class): Construct nodes in
copy_template_template_parm.
(tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
lookup_template_class. Use TYPE_TI_TEMPLATE.
* tree.c (copy_template_template_parm): Add NEWARGS
parameter.
(mapcar): Adjust call to copy_template_template_parm.
* typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
* method.c (build_template_template_parm_names): Change error
code to avoid compilation warning.
* gxxint.texi: Document template template parameter
name mangling.
2000-06-21 Alex Samuel <samuel@codesourcery.com>
* Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
(CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
(cp-demangle.o): New rule.
(dyn-string.o): Likewise.
* inc/cxxabi.h (__cxa_demangle): New declaration.
2000-06-22 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
(BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
(lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
a tree, not an int.
(THUNK_GENERATE_WITH_VTABLE_P): New macro.
(make_thunk): Change prototype.
(emit_thunk): Rename to use_thunk.
(mangle_thunk): Change prototype.
* class.c (get_derived_offset): Simplify.
(copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
BV_GENERATE_THUNK_WITH_VTABLE_P.
(build_primary_vtable): Simplify.
(add_virtual_function): Use BV_FN, rather than TREE_VALUE.
(dfs_find_base): Remove.
(update_vtable_entry_for_fn): Correct bug in finding the base
where a virtual function was first declared. Figure out whether
or not to emit a vcall-thunk with the vtables in which it appears.
Correct logic for deciding whether to use an ordinary thunk, or a
vcall thunk.
(finish_struct_1): Remove unnecssary code.
(build_vtbl_initializer): Use ssize_int for the running counter of
negative indices.
(build_vtbl_initializer): Only use vcall thunks where necessary.
Mark thunks as needing to be emitted with their vtables, or not.
(build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
indices. Use size_binop.
(dfs_build_vcall_offset_vtbl_entries): Don't rely on
BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
size_binop.
(build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
(build_vtable_entry): Mark thunks as needing to be emitted with
their vtables, or not.
* decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
* decl2.c (mark_vtable_entries): Use use_thunk instead of
emit_thunk.
* dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
information.
* error.c (dump_expr): Use BV_FN.
* mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
not an int.
* method.c (make_thunk): Likewise.
(emit_thunk): Rename to use_thunk. Allow callers to decide
whether or not to actually emit the thunk. Adjust for changes in
representation of vcall offsets.
* search.c (dfs_get_pure_virtuals): Use BV_FN.
* semantics.c (emit_associated_thunks): New function.
(expand_body): Use it.
* ir.texi: Adjust descriptions of thunks.
2000-06-22 Jason Merrill <jason@redhat.com>
* pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
(tsubst_friend_function): Copy it here.
* decl.c (grok_op_properties): Fix typo.
* decl2.c (delete_sanity): Clarify warning, avoid failure on
deleting void*.
* pt.c (check_explicit_specialization): Clarify error.
* decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
an old OVERLOAD when we're declaring a non-function.
(pushdecl, destroy_local_var): Check for error_mark_node.
(warn_extern_redeclared_static): Also bail early if
we're a CONST_DECL.
(push_overloaded_decl): Ignore an old error_mark_node.
2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
* call.c (build_x_va_arg): Check if in a template decl.
* pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (push_lang_context): TYPE_NAME gets you to the Java
types DECLs.
* decl.c (check_goto): Computed gotos assumed OK.
2000-06-20 Jason Merrill <jason@redhat.com>
* pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
for which we don't need to look for instantiations.
2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
* parse.y (program): Always call finish_translation_unit.
* parse.c, parse.h: Rebuilt.
2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
* method.c: Don't include hard-reg-set.h.
2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
* rtti.c (get_base_offset): Cope when vbase field is in a base.
2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
* call.c (build_conditional_expr): Use VOID_TYPE_P.
* cvt.c (cp_convert_to_pointer): Likewise.
(convert_to_void): Likewise.
* error.c (dump_expr): Likewise.
* except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
* init.c (build_delete): Likewise.
* method.c (emit_thunk): Likewise.
* optmize.c (declare_return_variable): Likewise.
* rtti.c (get_tinfo_decl_dynamic): Likewise.
(get_typeid): Likewise.
(build_dynamic_cast_1): Likewise.
* typeck.c (composite_pointer_type): Likewise.
(common_type): Likewise.
(build_indirect_ref): Likewise.
(build_binary_op): Likewise.
(build_x_compound_expr): Likewise.
(check_return_expr): Likewise.
* typeck2.c (add_exception_specifier): Likewise.
* mangle.c (write_method_parms): Use direct comparison for end
of parmlist.
2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
* cp-tree.h (genrtl_try_block): Declare function.
(genrtl_handler): Likewise.
(genrtl_catch_block): Likewise.
(genrtl_ctor_stmt): Likewise.
(genrtl_subobject): Likewise.
(genrtl_decl_cleanup): Likewise.
(genrtl_do_poplevel): Likewise.
(genrtl_do_pushlevel): Likewise.
(genrtl_clear_out_block): Likewise.
(genrtl_goto_stmt): Likewise.
(genrtl_expr_stmt): Likewise.
(genrtl_decl_stmt): Likewise.
(genrtl_if_stmt): Likewise.
(genrtl_while_stmt): Likewise.
(genrtl_do_stmt): Likewise.
(genrtl_return_stmt): Likewise.
(genrtl_for_stmt): Likewise.
(genrtl_break_stmt): Likewise.
(genrtl_continue_stmt): Likewise.
(genrtl_scope_stmt): Likewise.
(genrtl_switch_stmt): Likewise.
(genrtl_case_label): Likewise.
(genrtl_begin_compound_stmt): Likewise.
(genrtl_finish_compound_stmt): Likewise.
(genrtl_compound_stmt): Likewise.
(genrtl_asm_stmt): Likewise.
(genrtl_named_return_value): Likewise.
(genrtl_begin_stmt_expr): Likewise.
(genrtl_finish_stmt_expr): Likewise.
(finish_for_stmt): Removed first argument.
(finish_switch_stmt): Likewise.
* semantics.c (genrtl_try_block): Define function.
(genrtl_handler): Likewise.
(genrtl_catch_block): Likewise.
(genrtl_ctor_stmt): Likewise.
(genrtl_subobject): Likewise.
(genrtl_decl_cleanup): Likewise.
(genrtl_do_poplevel): Likewise.
(genrtl_do_pushlevel): Likewise.
(genrtl_clear_out_block): Likewise.
(genrtl_goto_stmt): Likewise.
(genrtl_expr_stmt): Likewise.
(genrtl_decl_stmt): Likewise.
(genrtl_if_stmt): Likewise.
(genrtl_while_stmt): Likewise.
(genrtl_do_stmt): Likewise.
(genrtl_return_stmt): Likewise.
(genrtl_for_stmt): Likewise.
(genrtl_break_stmt): Likewise.
(genrtl_continue_stmt): Likewise.
(genrtl_scope_stmt): Likewise.
(genrtl_switch_stmt): Likewise.
(genrtl_case_label): Likewise.
(genrtl_begin_compound_stmt): Likewise.
(genrtl_finish_compound_stmt): Likewise.
(genrtl_compound_stmt): Likewise.
(genrtl_asm_stmt): Likewise.
(genrtl_named_return_value): Likewise.
(genrtl_begin_stmt_expr): Likewise.
(genrtl_finish_stmt_expr): Likewise.
(finish_for_stmt): Removed first argument and generate rtl
specific code.
(finish_switch_stmt): Likewise.
(do_poplevel): Removed generate rtl specific code.
(do_pushlevel): Likewise.
(add_tree): Likewise.
(finish_goto_stmt): Likewise.
(finish_expr_stmt): Likewise.
(begin_if_stmt): Likewise.
(finish_if_stmt_cond): Likewise.
(finish_then_clause): Likewise.
(begin_else_clause): Likewise.
(finish_else_clause): Likewise.
(finish_if_stmt): Likewise.
(clear_out_block): Likewise.
(begin_while_stmt): Likewise.
(finish_while_stmt_cond): Likewise.
(finish_while_stmt): Likewise.
(begin_do_stmt): Likewise.
(finish_do_body): Likewise.
(finish_do_stmt): Likewise.
(finish_return_stmt): Likewise.
(begin_for_stmt): Likewise.
(finish_for_init_stmt): Likewise.
(finish_for_cond): Likewise.
(finish_for_expr): Likewise.
(finish_break_stmt): Likewise.
(finish_continue_stmt): Likewise.
(begin_switch_stmt): Likewise.
(finish_switch_cond): Likewise.
(finish_case_label): Likewise.
(begin_try_block): Likewise.
(begin_function_try_block): Likewise.
(finish_try_block): Likewise.
(finish_cleanup_try_block): Likewise.
(finish_cleanup): Likewise.
(finish_function_try_block): Likewise.
(finish_handler_sequence): Likewise.
(finish_function_handler_sequence): Likewise.
(begin_handler): Likewise.
(finish_handler_parms): Likewise.
(begin_catch_block): Likewise.
(finish_handler): Likewise.
(begin_compound_stmt): Likewise.
(finish_compound_stmt): Likewise.
(finish_asm_stmt): Likewise.
(finish_label_stmt): Likewise.
(finish_label_decl): Likewise.
(finish_subobject): Likewise.
(finish_decl_cleanup): Likewise.
(finish_named_return_value): Likewise.
(begin_stmt_expr): Likewise.
(finish_stmt_expr): Likewise.
* decl.c (initialize_local_var): Changed call to finish_expr_stmt
to call genrtl_expr_stmt when appropriate.
* init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
begin_compound_expr to call genrtl_begin_stmt_expr and
genrtl_begin_compound_expr when appropriate.
(finish_init_stmts): Changed calls to finish_compound_expr and
finish_stmt_expr to call genrtl_finish_compound_expr and
genrtl_finish_stmt_expr when appropriate.
(expand_default_init): Changed call to finish_expr_stmt to call
genrtl_expr_stmt when appropriate.
(build_vec_init): Likewise.
* parse.y (simple_stmt): Removed first argument from call to
finish_for_stmt. Removed first argument from call to
finish_switch_stmt.
* parse.c: Regenerated.
* pt.c (tsubst_expr): Removed first argument from call to
finish_for_stmt. Removed first argument from call to
finish_switch_stmt.
2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
* cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
* lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
(cplus_tree_code_length[]): Likewise.
(cplus_tree_code_name[]): Likewise.
(init_parse): Added call to add_c_tree_codes. Changed
LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
2000-06-16 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (finish_mem_initializers): Declare.
(count_trees): Likewise.
* parse.y (base_init): Use finish_mem_initializers.
* semantics.c (finish_mem_initializers): New function.
* tree.c (count_trees_r): Prototype. Use DATA parameter to store
the number of trees.
(n_trees): Remove.
(count_trees): Don't use it.
2000-06-15 Jason Merrill <jason@redhat.com>
* tree.c (count_trees): New debugging function.
* typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
* init.c (build_member_call): Pull out the name of a DECL.
* Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
* semantics.c (expand_body): Push to TV_INTEGRATION here.
* optimize.c (optimize_function): Not here.
* pt.c (instantiate_decl): Push to TV_PARSE.
2000-06-15 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (struct language_function): Remove x_base_init_list
and x_member_init_list.
(current_base_init_list): Remove.
(current_member_init_list): Likewise.
(setup_vtbl_ptr): Change prototype.
(emit_base_init): Likewise.
(expand_member_init): Likewise.
(reinit_parse_for_function): Remove.
* decl.c (save_function_data): Don't clear x_base_init_list and
x_member_init_list.
(mark_language_function): Don't mark them.
* init.c (perform_member_init): Tweak comment.
(sort_member_init): Take the list of initializers as an argument.
(sort_base_init): Likewise.
(emit_base_init): Likewise.
(expand_member_init): Return the initializer. Don't use global
variables.
* lex.c (reinit_parse_for_function): Remove.
* method.c (build_template_parm_names): Correct substitution.
(do_build_copy_constructor): Don't use current_member_init_list
and current_base_init_list.
(synthesize_method): Likewise.
* parse.y (base_init): Split mem-initializers into
base-initializers and field-initializers.
(member_init_list): Build up the list here.
(member_init): Return the initializer.
(fn.depfn): Don't use reinit_parse_for_function.
* parse.c: Regenerated.
* pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
ERROR_MARK.
(tsubst_expr): Don't use current_member_init_list
and current_base_init_list.
(tsubst_expr_values): Rename to ...
(tsubst_initializer_list): ... this. Use convert_from_reference.
* semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
and current_base_init_list.
(begin_function_definition): Don't call reinit_parse_for_function.
* dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
* error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
correctly.
* cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
* cp-tree.h (IF_COND): Move to c-common.h.
(THEN_CLAUSE): Likewise.
(ELSE_CLAUSE): Likewise.
(WHILE_COND): Likewise.
(WHILE_BODY): Likewise.
(DO_COND): Likewise.
(DO_BODY): Likewise.
(RETURN_EXPR): Likewise.
(EXPR_STMT_EXPR): Likewise.
(FOR_INIT_STMT): Likewise.
(FOR_COND): Likewise.
(FOR_EXPR): Likewise.
(FOR_BODY): Likewise.
(SWITCH_COND): Likewise.
(SWITCH_BODY): Likewise.
(CASE_LOW): Likewise.
(CASE_HIGH): Likewise.
(GOTO_DESTINATION): Likewise.
(COMPOUND_BODY): Likewise.
(ASM_CV_QUAL): Likewise.
(ASM_STRING): Likewise.
(ASM_OUTPUTS): Likewise.
(ASM_INPUTS): Likewise.
(ASM_CLOBBERS): Likewise.
(DECL_STMT_DECL): Likewise.
(STMT_EXPR_STMT): Likewise.
(LABEL_STMT_LABEL): Likewise.
(SCOPE_BEGIN_P): Likewise.
(SCOPE_END_P): Likewise.
(SCOPE_STMT_BLOCK): Likewise.
(SCOPE_NULLIFIED_P): Likewise.
(SCOPE_NO_CLEANUPS_P): Likewise.
(SCOPE_PARTIAL_P): Likewise.
(ASM_VOLATILE_P): Likewise.
(STMT_LINENO): Likewise.
(STMT_LINENO_FOR_FN_P): Likewise.
* cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
SCOPE_STMT, CASE_LABEL, STMT_EXPR.
* Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
* Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
(cc1plus$(exeext)): Added $(srcdir)/c-common.def.
* lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
(cplus_tree_code_length[]): Added '#include "c-common.def"'.
(cplus_tree_code_name[]): Added '#include "c-common.def"'.
2000-06-14 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
* class.c (dfs_find_final_overrider): Set it appropriately.
(dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
avoid unneeded secondary vptrs.
2000-06-13 Jakub Jelinek <jakub@redhat.com>
* class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
(check_bitfield_decl, check_field_decl): Likewise.
(build_vtbl_or_vbase_field, build_base_field): Likewise.
(layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
* decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
(xfer_tag, finish_enum): Likewise.
* decl2.c (finish_builtin_type): Likewise.
* init.c (init_init_processing): Likewise.
* pt.c (instantiate_class_template): Likewise.
* rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
* cp-tree.h (struct lang_type): Add user_align member.
(CLASSTYPE_USER_ALIGN): Define.
2000-06-13 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
* Make-lang.in (c++.install-common): Install g++-cross in
$(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
$(target_alias)-g++ and $(target_alias)-c++.
2000-06-12 Mark Mitchell <mark@codesourcery.com>
* class.c (vcall_offset_data_s): Add last_init and fns.
(overrides): Rename to same_signature_p.
(dfs_find_final_overrider): Adjust accordingly.
(mark_overriders): Likewise.
(warn_hidden): Likewise.
(build_vtbl_initializer): Reorganize machinery for building things
at negative offsets.
(build_vcall_and_vbase_vtbl_entries): Likewise.
(build_vbase_offset_vtbl_entries): Likewise.
(dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
offset entries. Do not create two entries for functions with the
same signature.
(build_vcall_offset_vtbl_entries): Initialize vod->fns.
(build_rtti_vtbl_entries): Reorganize machinery for building things
at negative offsets.
* optimize.c (expand_call_inline): Don't recurse into the code
used to initialize the parameters more than once.
2000-06-11 Mark Mitchell <mark@codesourcery.com>
* mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
(is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
(find_substitution): Only use the `Sa' substitution for
std::allocator, not instantiations of it.
(write_template_prefix): Move comment. Only use a TREE_LIST to
represent substitutions for a member template.
(write_array_type): Mangle array dimensions correctly.
* optimize.c (maybe_clone_body): Copy more information from the
cloned function.
* pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
on the regenerated declaration.
2000-06-11 Chip Salzenberg <chip@valinux.com>
Mark Mitchell <mark@codesourcery.com>
* class.c (build_vtable): Clarify comment.
(build_ctor_vtbl_group): Pass the most derived type to
build_vtable.
2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* decl2.c (compare_options): Don't needlessly cast away const-ness.
2000-06-10 Mark Mitchell <mark@codesourcery.com>
* decl.c (add_binding): Handle duplicate declarations of external
variables.
2000-06-09 Chip Salzenberg <chip@valinux.com>
Mark Mitchell <mark@codesourcery.com>
* mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
argument.
(write_signed_number): New macro.
(write_unsigned_number): Likewise.
(write_source_name): Use them.
(write_number): Handle signed and unsigned values.
(write_integer_cst): Use tree_int_cst_sgn, and use
write_unsigned_number or write_signed_number as appropriate.
(write_discriminator): Use write_unsigned_number or
write_signed_number as appropriate.
(write_template_arg_literal): Likewise.
(write_array_type): Use tree_low_cst.
(write_template_parm): Use write_unsigned_number or
write_signed_number as appropriate.
(write_substitution): Adjust call to write_number.
(write_type): Get the TYPE_MAIN_VARIANT before mangling it.
(write_expression): Handle non-type template arguments of
reference type correctly.
(mangle_thunk): Use write_signed_number.
2000-06-09 Chip Salzenberg <chip@valinux.com>
* mangle.c (find_substition): Don't mangle objects with typename
substitutions (e.g. "cin" as "Si").
2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
* call.c (add_candidate): Use ggc_alloc_cleared.
* decl.c (lookup_label): Likewise.
* lex.c (retrofit_lang_decl): Likewise.
2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
* semantics.c (expand_body): Push to TV_EXPAND.
* optimize.c (optimize_function): Push to TV_INTEGRATION.
* decl.c (start_function): Always call announce_function.
* tinfo2.cc: Just declare abort.
2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
* lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
whenever @ is a symbolic name.
2000-06-08 Jakub Jelinek <jakub@redhat.com>
* method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
2000-06-07 Mark Mitchell <mark@codesourcery.com>
* decl.c (pushdecl): Look up functions by DECL_NAME, not
DECL_ASSEMBLER_NAME.
2000-06-06 Mark Mitchell <mark@codesourcery.com>
* decl2.c (c_language): Define.
2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
* lex.c (lang_init_options): Tweak.
* decl2.c: Remove #inclusion of diagnostic.h
(lang_decode_option): Move diagnostic formatting options to
toplevel.
* lang-options.h: Remove documentation for diagnostic options.
* Makefile.in (lex.o): Depends upon diagnostic.h
2000-06-06 Mark Mitchell <mark@codesourcery.com>
* decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
the same DECL_RESULT, it's not a redefinition.
* pt.c (tsubst_decl): Remove code to handle illegal
specializations.
2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
* exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
* search.c (maybe_suppress_debug_info): Don't check
CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
* pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
here if extern_p.
Remember instantiation context in deferred instantiations.
* cp-tree.h (struct tinst_level): Remove.
(TINST_DECL, TINST_LINE, TINST_FILE): New macros.
* pt.c (current_tinst_level): Now a tree.
(print_template_context, push_tinst_level, pop_tinst_level,
tinst_for_decl): Adjust.
(reopen_tinst_level): New fn.
(init_pt): Register current_tinst_level as a root.
(add_pending_template): Put current_tinst_level in TREE_PURPOSE
of the pending templates list.
(instantiate_pending_templates): Adjust. Call reopen_tinst_level.
* lex.c (extract_interface_info): Adjust.
* decl2.c (warn_if_unknown_interface): Adjust.
2000-06-05 Mark Mitchell <mark@codesourcery.com>
* class.c (indirect_primary_base_p): New function.
(determine_primary_base): Use it.
2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
Update new-abi dynamic cast algorithm.
* tinfo.cc (__class_type_info::__dyncast_result): Add
whole_details. Adjust constructor.
(__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
Avoid unnecessary searching.
(__dynamic_cast): Adjust for __dyncast_result::whole_details.
2000-06-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* decl.c (init_decl_processing): Don't call record_component_aliases.
* tree.c (build_cplus_array_type_1): Likewise.
2000-06-04 Mark Mitchell <mark@codesourcery.com>
* ir.texi: Correct typo.
* mangle.c (write_expression): Handle non-type template arguments
with reference type.
* method.c (build_overload_value): Likewise.
* pt.c (convert_nontype_argument): Explicitly represent conversion
to a reference with an ADDR_EXPR.
(unify): Always unify arguments in left-to-right order.
2000-06-03 Alex Samuel <samuel@codesourcery.com>
Mark Mitchell <mark@codesourcery.com>
* Make-lang.in (CXX_SRCS): Add mangle.c.
* Makefile.in (CXX_OBJS): Add mangle.o.
(mangle.o): New rule.
* class.c (local_classes): New variable.
* class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
(get_vtt_name): Use mangle_vtt_name for new ABI.
(init_class_processing): Initialize local_classes.
(build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
* cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
(std_identifier): New macro.
(DECL_VOLATILE_MEMFUNC_P): New macro.
(DECL_NAMESPACE_STD_P): Likewise.
(local_classes): Declare.
(get_mostly_instantiated_function_type): Declare.
(init_mangle): Declare.
(mangle_decl): Likewise.
(mangle_type_string): Likewise.
(mangle_type): Likewise.
(mangle_typeinfo_for_type): Likewise.
(mangle_typeinfo_string_for_type): Likewise.
(mangle_vtbl_for_type): Likewise.
(mangle_vtt_for_type): Likewise.
(mangle_ctor_vtbl_for_type): Likewise.
(mangle_thunk): Likewise.
(mangle_conv_op_name_for_type): Likewise.
(mangle_guard_variable): Likewise.
* decl.c (pushtag): Keep track of local classes.
(initialize_predefined_identifiers): Initialize std_identifier.
(init_decl_processing): Use std_identifier.
(start_decl): Don't treat instantiations as specializations.
(grokdeclarator): Likewise.
(grokvardecl): Call mangle_decl for new ABI. Only set mangled
name for fully-instantiated templates.
* decl2.c (grokclassfn): Use set_mangled_name_for_decl for
destructors with the new ABI.
(finish_static_data_member_decl): Use mangle_decl under the new ABI.
(grokfield): Use mangle_type for new ABI.
(grokoptypename): Use mangle_conv_op_for_type for new ABI.
(get_sentry): Use mangle_guard_variable for new ABI.
(start_static_initialization_or_destruction): Likewise.
* expr.c (extract_aggr_init): Remove.
(extract_scalar_init): Likewise.
(extract_init): Remove #if 0'd code.
* mangle.c: New function.
* method.c (build_mangled_name): Assert not flag_new_abi.
(build_static_name): Likewise.
(build_decl_overload_real): Likewise.
(build_typename_overload): Likewise.
(build_overload_with_type): Likewise.
(build_overload_name): Likewise.
(get_ctor_vtbl_name): Likewise.
(start_squangling): Likewise.
(get_id_2): Likewise.
(set_mangled_name_for_decl): Call mangle_decl for new ABI.
(init_method): Call init_mangle for new ABI.
(make_thunk): Call mangle_thunk for new ABI.
* operators.def: Correct new ABI manglings for the `%' operator.
Add `::' operator.
* pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
(lookup_template_class): Call mangle_decl for new ABI.
(get_mostly_instantiated_function_type): New function.
(set_mangled_name_for_template_decl): Use it.
(tsubst_decl): Use set_mangled_name_for_decl for destructors with
the new ABI. Use mangle_conv_op_name_for_type for instantiated
conversion op names.
* rtti.c (tinfo_name): Call mangle_type_string for new ABI.
(get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
(tinfo_base_init): Likewise. Mangle typeinfo string name with
mangle_typeinfo_string_for_type.
2000-06-03 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
(INNERMOST_TEMPLATE_ARGS): New macro.
(innermost_args): Remove.
(get_innermost_template_args): New function.
* decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
* error.c (dump_function_decl): Be caution when using
most_general_template.
* method.c (build_template_parm_names): Use
INNERMOST_TEMPLATE_ARGS.
* pt.c (add_to_template_args): Tidy comment
(get_innermost_template_args): New function.
(check_explicit_specialization): Clear DECL_INITIAL for a new
specialization.
(process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
Tidy.
(push_template_decl): Always register specializations of the most
general template.
(convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
(coerce_template_parms): Likewise.
(lookup_template_class): Likewise.
(innermost_args): Remove.
(tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
(tsubst_decl): Handle tricky specializations. Use
get_innermost_template_args.
(instantiate_template): Simplify handling of partial
instantiations.
(get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
(most_general_template): Reimplement, in a more straightforward
manner.
(regenerate_decl_from_template): Tweak formatting. Use
TMPL_ARGS_DEPTH for clarity.
(set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
* dump.c (dequeue_and_dump): Dump information about thunks.
2000-06-01 Richard Henderson <rth@cygnus.com>
* decl.c (init_decl_processing): Set lang_get_alias_set first thing.
2000-06-01 Richard Henderson <rth@cygnus.com>
* decl2.c (unsupported_options): Fix typo, make const.
(lang_decode_option): Fix bsearch argument order.
2000-06-01 Mark Mitchell <mark@codesourcery.com>
* init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
on FIELD_DECLs.
2000-05-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* cp-tree.h (c_get_alias_set): Deleted.
* Makefile.in (decl.o): Include ../expr.h.
* decl.c (expr.h): Include.
(init_decl_processing): Call record_component_aliases for arrays.
(grokdeclarator): Likewise.
Set TREE_ADDRESSABLE for fields that aren't bitfields.
* tree.c (build_cplus_array_type_1): Call record_component_aliases.
2000-05-31 Mark Mitchell <mark@codesourcery.com>
Remove guiding declaration support.
* cp/cp-tree.h (flag_dump_translation_unit): Make it const.
(flag_guiding_decls): Remove.
* call.c (build_user_type_conversion_1): Remove support for
guiding decls.
(build_new_function_call): Likewise.
(build_new_op): Likewise.
(build_new_method_call): Likewise.
* decl.c (start_function): Likewise.
* friend.c (is_friend): Likewise.
(do_friend): Likewise.
* decl2.c ((flag_dump_translation_unit): Make it const.
(flag_guiding_decls): Remove.
(unsupported_options): New variable
(compare_options): New function.
(lang_decode_option): Use them.
* decl.c (build_cp_library_fn): Set DECL_CONTEXT.
* method.c (mangle_expression): Adjust test for legal expression
operators.
* pt.c (instantiate_decl): Save and restore the local
specializations list.
2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
* decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
2000-05-30 Mark Mitchell <mark@codesourcery.com>
* call.c (add_template_candidate_real): Handle member template
constructors for classes with virtual bases.
(build_user_type_conversion_1): Use in_charge_arg_for_name.
(build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
* ir.texi: Update thunk documentation.
* call.c (joust): Fix handling of overloaded builtin operators.
2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
* cp-tree.h (DECL_ANTICIPATED): New macro.
Document new use of DECL_LANG_FLAG_7.
* decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
in the user namespace.
* lex.c (do_identifier): If the identifier's declaration has
DECL_ANTICIPATED on, it has not yet been declared. But do not
replace it with an ordinary implicit declaration.
* tinfo2.cc: Include stdlib.h.
2000-05-29 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
* class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
CLASSTYPE_ALIGN.
2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
* decl2.c (lang_decode_option): Use skip_leading_substring instead
of plain strncmp.
2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
* operators.def (<?): Duplicated, should have been...
(>?): this. Fixed.
2000-05-27 Alex Samuel <samuel@codesourcery.com>
Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (ansi_opname): Make it a macro.
(ansi_assopname): Likewise.
(struct lang_decl_flags): Add assignment_operator_p.
(struct lang_decl): Add operator_code.
(DECL_VTT_PARM): Adjust.
(DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
overloaded operator.
(SET_OVERLOADED_OPERATOR_CODE): New macro.
(DECL_ASSIGNMENT_OPERATOR_P): New macro.
(DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
(opname_tab): Remove.
(assignop_tab): Likewise.
(operator_name_info_t): New type.
(operator_name_info): New variable.
(assignment_operator_name_info): Likewise.
(build_cp_library_fn): Remove declaration.
(push_cp_library_fn): Likewise.
(operator_name_string): Likewise.
(build_decl_overload): Likewise.
* call.c (print_z_candidates): Simplify.
(build_object_call): Adjust usage of ansi_opname. Use
DECL_OVERLOADED_OPERATOR_P.
(op_error): Adjust operator name lookup.
(build_conditional_expr): Adjust usage of ansi_opname.
(build_new_op): Likewise.
(build_op_delete_call): Likewise.
(build_over_call): Likewise.
(joust): Use DECL_OVERLOADED_OPERATOR_P.
* decl.c (duplicate_decls): Copy operator_code.
(init_decl_processing): Adjust parameters to push_cp_library_fn.
(builtin_function): Adjust parameters to build_library_fn_1.
(build_library_fn_1): Accept an overloaded operator code.
(build_library_fn): Pass ERROR_MARK.
(build_cp_library_fn): Accept an overloaded operator code.
(push_cp_library_fn): Likewise.
(grokfndecl): Tweak.
(grokdeclarator): Simplify code to compute names of overloaded
operators. Adjust use of ansi_opname.
(ambi_op_p): Work on tree_codes, not identifiers.
(unary_op_p): Likewise.
(grok_op_properties): Likewise.
(start_function): Use DECL_OVERLOADED_OPERATOR_P.
(lang_mark_tree): Don't try to mark the operator_code.
* decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
* error.c (dump_decl): Remove special handling for operator
names.
(dump_function_name): Likewise.
(dump_expr): Adjust name lookup of operators.
(op_to_string): Simplify.
(assop_to_string): Likewise.
* init.c (build_new_1): Adjust use of ansi_opname.
* lex.c (opname_tab): Remove.
(assignop_tab): Likewise.
(ansi_opname): Likewise.
(ansi_assopname): Likewise.
(operator_name_string): Likewise.
(reinit_lang_specific): Likewise.
(operator_name_info): New variable.
(assignment_operator_name_info): Likewise.
(init_operators): New function.
(init_parse): Use it.
(do_identifier): Adjust use of ansi_opname.
* method.c (mangle_expression): Don't use ansi_opname for
mangling.
(build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
(build_decl_overload): Remove.
(build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
(do_build_assign_ref): Adjust use of ansi_opname.
(synthesize_method): Likewise.
(implicitly_declare_fn): Likewise.
* operators.def: New file.
* parse.y (operator): Adjust use of ansi_opname.
* pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
(set_mangled_name_for_template_decl): Don't play games with
current_namespace.
(special_function_p): Adjust use of ansi_opname.
* typeck.c (check_return_expr): Likewise.
* Make-lang.in (cc1plus): Depend on operators.def.
* Makefile.in (lex.o): Likewise.
(decl.o): Likewise.
2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
* Make-lang.in (cplib2.ready): Eradicate.
2000-05-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* method.c (mangle_expression): Use TREE_CODE_LENGTH.
* tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
(built_min, cp_tree_equal): Likewise.
2000-05-26 Mark Mitchell <mark@codesourcery.com>
* class.c (layout_nonempty_base_or_field): Replace
`record_layout_info' with `record_layout_info_s'.
2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
Fix goto checking.
* cp-tree.h (struct language_function): x_named_labels is now
a struct named_label_list*.
* decl.c (struct named_label_use_list): Renamed from...
(struct named_label_list): ...this. New struct.
(push_binding_level): Don't set eh_region.
(note_level_for_eh): New fn.
(pop_label): Take label and old value directly.
(pop_labels): Adjust for new named_labels format.
(lookup_label): Likewise.
(poplevel): Note characteristics of a binding level containing a
named label. Mess with named label lists earlier.
(mark_named_label_lists): New fn.
(mark_lang_function): Call it.
(use_label): New fn, split out from...
(make_label_decl): ...here. Don't call it.
(decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
check_previous_gotos): New fns, split out from...
(define_label): ...here.
(check_switch_goto): New fn.
(define_case_label): Call it.
(check_goto): New fn.
* semantics.c (finish_goto_stmt): Call it and use_label.
(begin_compound_stmt): If we're a try block, call note_level_for_eh.
(expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
2000-05-26 Mark Mitchell <mark@codesourcery.com>
* class.c (build_vtable_entry_ref): Correct usage of
get_vtbl_decl_for_binfo.
* decl2.c (grokclassfn): Set DECL_LANGUAGE here.
* method.c (implicitly_declare_fn): Not here.
2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
(CPTI_PTMD_DESC_TYPE): ... here.
(ptmd_desc_type_node): Rename to ...
(ptm_desc_type_node): ... here.
* decl.c: Likewise.
* rtti.c (ptmd_initializer): Rename to ...
(ptm_initializer): ... here.
(sythesize_tinfo_var): Adjust. Deal with pointer to member
function.
(create_tinfo_types): Adjust.
2000-05-25 Mark Mitchell <mark@codesourcery.com>
Finish implementation of VTTs.
* cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
CPTI_VTT_PARM_IDENTIFIER.
(vtt_parm_identifier): New macro.
(vtt_parm_type): Likewise.
(BINFO_SUBVTT_INDEX): Likewise.
(BINFO_VPTR_INDEX): Likewise.
(struct lang_decl): Add vtt_parm.
(DECL_VTT_PARM): New macro.
(DECL_USE_VTT_PARM): Likewise.
(DECL_NEEDS_VTT_PARM_P): Likewise.
(get_vtt_name): Declare.
(build_artificial_parm): Likewise.
(fixup_all_virtual_upcast_offsets): Likewise.
(expand_indirect_vtbls_init): Remove.
* call.c (build_new_method_call): Pass the vtt to subobject
constructors and destructors.
* class.c (get_vtt_name): Give it external linkage.
(build_clone): Handle the magic VTT parameters for clones.
(clone_function_decl): Fix typo in comment.
(build_vtt): Keep track of the indices in the VTTs where various
entities are stored.
(build_vtt_inits): Likewise.
(dfs_build_vtt_inits): Likewise.
(build_ctor_vtbl_group): Tweak type of construction vtables.
(dfs_accumulate_vtbl_inits): Build vtables for all bases, even
primary bases, when building construction vtables.
* decl.c (duplicate_decls): Handle DECL_VTT_PARM.
(initialize_predefined_identifiers): Add vtt_parm_identifier.
(init_decl_processing): Initialize vtt_parm_type.
(grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
(lang_mark_tree): Make vtt_parm.
* decl2.c (build_artificial_parm): New function.
(maybe_retrofit_in_chrg): Use it. Add VTT parameters.
(grokclassfn): Use build_artificial_parm.
* init.c (initialize_vtbl_ptrs): Call
fixup_all_virtual_upcast_offsets directly.
(perform_member_init): Use the complete subobject destructor for
member cleanups.
(build_vtbl_address): New function.
(expand_virtual_init): Handle VTTs.
* optimize (maybe_clone_body): Likewise.
* search.c (fixup_all_virtual_upcast_offsets): Give it external
linkage.
(expand_indirect_vtbls_init): Remove.
* semantics.c (setup_vtbl_ptr): Fix typos in comment.
* tree.c (make_binfo): Make them bigger.
2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
* inc/cxxabi.h (__pbase_type_info): Define, based on
__pointer_type_info.
(__pointer_type_info): Derive from __pbase_type_info. Adjust.
(__pointer_to_member_type_info): Likewise.
* tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
(__pointer_to_member_type_info::__is_pointer_p): Remove.
(__pointer_type_info::__do_catch): Rename to ...
(__pbase_type_info::__do_catch): ... here. Adjust.
(__pbase_type_info::__pointer_catch): Implement.
(__pointer_type_info::__pointer_catch): Adjust.
(__pointer_to_member_type_info::__pointer_catch): Adjust.
2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
* tinfo.h (__user_type_info::contained_virtual_p): New
predicate.
* tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
shaped hierarchy.
(__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
diamond shaped hierarchy. Add early out for mixed diamond and
duplicate shaped hierarchy.
2000-05-24 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (build_delete): Change prototype.
(build_vec_delete): Likewise.
* call.c (build_scoped_method_call): Use special_function_kind
values to indicate the kind of destruction to be done.
(build_method_call): Likewise.
* decl.c (finish_destructor_body): Likewise.
(maybe_build_cleanup_1): Likewise. Rename to ...
(maybe_build_cleanup): ... this.
* decl2.c (delete_sanity): Use special_function_kind
values to indicate the kind of destruction to be done.
(build_cleanup): Likewise.
* init.c (perform_member_init): Likewise.
(build_vec_delete_1): Likewise.
(build_dtor_call): Simplify.
(build_delete): Use special_function_kind
values to indicate the kind of destruction to be done.
(build_vbase_delete): Likewise.
(build_vec_delete): Likewise.
* init.c (sort_member_init): Fix typo in error message generation
code.
2000-05-15 Donald Lindsay <dlindsay@cygnus.com>
* semantics.c (begin_class_definition): make the packed
attribute be sensitive to the "-fpack-struct" command line flag
2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
Update new-abi upcast algorithm.
* inc/cxxabi.h (__class_type_info::__do_upcast): Change
prototype and meaning of return value.
(__si_class_type_info::__do_upcast): Likewise.
(__vmi_class_type_info::__do_upcast): Likewise.
* tinfo.cc (__class_type_info::__upcast_result): Replace
whole2dst with part2dst. Adjust ctor.
(__class_type_info::__do_upcast): Adjust call of worker function.
(__class_type_info::__do_upcast): Adjust.
(__si_class_type_info::__do_upcast): Adjust. Use parent's
__do_upcast.
(__vmi_class_type_info::__do_upcast): Likewise. Fix private
virtual base in diamond hierarchy bug.
2000-05-23 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
and bitfield to tinfo_fn_p.
(DECL_TINFO_FN_P): Adjust.
(SET_DECL_TINFO_FN_P): Likewise.
(DECL_MUTABLE_P): Likewise.
(DECL_C_BIT_FIELD): Likewise.
(SET_DECL_C_BIT_FIELD): Likewise.
(CLEAR_DECL_C_BIT_FIELD): Likewise.
(DECL_UNINLINABLE): Likewise.
* class.c (alter_access): Call retrofit_lang_decl if ncessary.
(handle_using_decl): Remove assertion.
(build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
to build FIELD_DECLs.
(build_base_field): Likewise.
(layout_class_type): Likewise.
* decl.c (init_decl_processing): Likewise.
(build_ptrmemfunc_type): Likewise.
(grokdeclarator): Likewise.
* decl2.c (grok_x_components): Likewise.
* except.c (call_eh_info): Likewise.
* init.c (init_init_processing): Likewise.
* rtti.c (expand_class_desc): Likewise.
(create_pseudo_type_info): Likewise.
(get_vmi_pseudo_type_info): Likewise.
(create_tinfo_types): Likewise.
* ptree.c (print_lang_decl): Adjust.
* typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
before checking DECL_MUTABLE_P.
* decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
parameters for template functions.
* pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
destructors as well as constructors.
2000-05-22 Mark Mitchell <mark@codesourcery.com>
* class.c (build_ctor_vtbl_group): Set inits.
* optimize.c (maybe_clone_body): Set DECL_INLINE and
DECL_THIS_INLINE appropriately for clones.
* cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
(DECL_CONV_FN_P): Simplify.
(DECL_OPERATOR): Remove.
(language_to_string): Declare.
* decl.c (duplicate_decls): Fix typo in comment.
(grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
(grok_op_properties): Use DECL_CONV_FN_P instead of
IDENTIFIER_TYPENAME_P.
* dump.c (dequeue_and_dump): Dump the language linkage of
declarations.
* error.c (language_to_string): Give it external linkage.
* method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
(implicitly_declare_fn): Set DECL_LANGUAGE.
* pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
IDENTIFIER_TYPENAME_P.
(tsubst_decl): Likewise.
(tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
* semantics.c (finish_member_declaration): Don't mark members of
classes declared in an extern "C" region as extern "C".
2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
* decl2.c (qualified_lookup_using_namespace): Look through
namespace aliases.
* decl.c (push_using_decl): Return the old decl on namespace level.
2000-05-21 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
(VTT_NAME_PREFIX): New macro.
(CTOR_VTBL_NAME_PREFIX): Likewise.
(get_ctor_vtbl_name): New function.
* class.c (get_vtable_name): Simplify.
(get_vtt_name): New function.
(get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
(dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
when a virtual base becomes primary.
(finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
VTTs.
(finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
additional parameters.
(dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
(initialize_array): New function.
(build_vtt): Likewise.
(build_vtt_inits): Likewise.
(dfs_build_vtt_inits): Likewise.
(dfs_fixup_binfo_vtbls): Likewise.
(build_ctor_vtbl_group): Likewise.
(initialize_vtable): Use initialize_array.
(accumulate_vtbl_inits): Reimplement to handle construction
vtables.
(dfs_accumulate_vtbl_inits): Likewise.
(bulid_vtbl_initializer): Adjust parameter name.
* method.c (build_typename_overload): Remove #if 0'd code.
(get_ctor_vtbl_name): New function.
* search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
(init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
* cp-tree.h (struct lang_type): Remove search_slot.
(CLASSTYPE_SEARCH_SLOT): Remove.
(emit_base_init): Change prototype.
(initialize_vtbl_ptrs): Likewise.
(expand_indirect_vtbls_init): Likewise.
(clear_search_slots): Remove.
* decl.c (lang_mark_tree): Don't mark search_slot.
* init.c (initialize_vtbl_ptrs): Simplify.
(emit_base_init): Likewise.
* search.c (struct vbase_info): Document decl_ptr.
(convert_pointer_to_single_level): Remove.
(dfs_find_vbases): Remove.
(dfs_init_base_pointers): Simplify.
(dfs_clear_vbase_slots): Remove.
(dfs_vtable_path_unmark): New function.
(init_vbase_pointers): Simplify.
(expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
(expand_indirect_vtbls_init): Simplify. Don't call
mark_all_temps_used.
* semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
initialize_vtbl_ptrs.
2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
* except.c: Add static prototypes.
2000-05-20 H.J. Lu <hjl@gnu.org>
* Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
2000-05-19 Mark Mitchell <mark@codesourcery.com>
Don't create a separate copy of virtual bases for the
CLASSTYPE_VBASECLASSES list.
* cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
(BINFO_FOR_VBASE): Remove.
(CANONICAL_BINFO): Adjust.
(binfo_for_vbase): New function.
* class.c (build_vbase_pointer_fields): Use binfo_for_vbase
instead of BINFO_FOR_VBASE.
(build_vbase_pointer): Likewise.
(build_secondary_vtable): Likewise.
(dfs_mark_primary_bases): Likewise.
(mark_primary_bases): Likewise.
(layout_nonempty_base_or_field): Likewise.
(dfs_set_offset_for_shared_vbases): Likewise.
(dfs_set_offset_for_unshared_vbases): Likewise.
(layout_virtual_bases): Likewise. Adjust for changes to the
CLASSTYPE_VBASECLASSES list.
(dump_class_hierarchy_r): Use binfo_for_vbase
instead of BINFO_FOR_VBASE.
(dump_class_hierarchy): Likewise.
(finish_vtbls): Likewise.
(build_vtbl_initializer): Adjust for changes to the
CLASSTYPE_VBASECLASSES list.
(build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
* decl.c (finish_destructor_body): Adjust for changes to the
CLASSTYPE_VBASECLASSES list.
* init.c (sort_base_init): Use binfo_for_vbase.
(construct_virtual_bases): Adjust for changes to the
CLASSTYPE_VBASECLASSES list.
(expand_member_init): Use binfo_for_vbase.
(build_vbase_delete): Adjust for changes to the
CLASSTYPE_VBASECLASSES list.
* method.c (do_build_copy_constructor): Likewise.
* rtti.c (get_base_offset): Use binfo_for_vbase.
(expand_class_desc): Remove #if 0'd code.
* search.c (struct vbase_info): Remove vbase_types.
(get_base_distance): Use binfo_for_vbase.
(lookup_field_queue_p): Use CANONICAL_BINFO.
(get_shared_vbase_if_not_primary): Use binfo_for_vbase.
(get_pure_virtuals): Adjust for changes to the
CLASSTYPE_VBASECLASSES list.
(dfs_find_vbases): Use binfo_for_vbase.
(dfs_init_vbase_pointers): Likewise.
(init_vbase_pointers): Don't initialize vi.vbase_types.
(virtual_context): Use binfo_for_vbase.
(fixup_all_virtual_upcast_offsets): Adjust for changes to the
CLASSTYPE_VBASECLASSES list.
(expand_indirect_vtbls_init): Simplify.
(dfs_get_vbase_types): Don't replicate virtual bases.
(find_vbase_instance): Use binfo_for_vbase.
(binfo_for_vbase): New function.
* typeck.c (get_delta_difference): Use binfo_for_vbase.
2000-05-17 Mark Mitchell <mark@codesourcery.com>
* decl2.c (finish_anon_union): Generalize error messages to handle
anonymous structures.
* init.c (perform_member_init): Remove `name' parameter.
(build_field_list): New function.
(sort_member_init): Handle anonymous union initialization order
correctly. Check for multiple initializations of the same union.
(emit_base_init): Don't look up fields by name here.
(expand_member_init): Record the result of name lookup for future
reference.
* typeck.c (build_component_ref): Fix formatting.
2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
* decl.c (pop_label): Replace warn_unused with warn_unused_label.
* typeck.c (build_x_compound_expr): Replace warn_unused with
warn_unused_value.
* decl2.c (lang_decode_option): Update -Wall unused flags by
calling set_Wunused.
2000-05-16 Mark Mitchell <mark@codesourcery.com>
* cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
* init.c (dfs_vtable_path_unmark): Remove.
* search.c (marked_new_vtable_p): Likewise.
(unmarked_new_vtable_p): Likewise.
(dfs_search_slot_nonempty_p): Likewise.
(dfs_mark): Likewise.
(dfs_vtable_path_unmark): Likewise.
(dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
(dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
(dfs_init_vbase_pointers): Remove special-case new ABI code.
(dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
(init_vbase_pointers): Simplify.
(expand_indirect_vtbls_init): Likewise.
* class.c (copy_virtuals): New function.
(build_primary_table): Use it.
(build_secondary_vtable): Likewise.
(modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
indicate that no vcall offset is required.
(add_virtual_function): Likewise.
(modify_all_vtables): Likewise.
(dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
(dfs_accumulate_vtbl_inits): Likewise.
(build_vtbl_initializer): Make changes to handle construction
vtables.
(dfs_build_vcall_offset_vtbl_entries): Likewise.
(build_rtti_vtbl_entries): Likewise.
(build_vtable_entries): Handle a NULL vcall_index.
2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
* decl2.c (lang_decode_option): Fix thinko.
2000-05-14 Jason Merrill <jason@casey.cygnus.com>
* except.c (check_handlers): New fn.
* cp-tree.h: Declare it.
* semantics.c (finish_handler_sequence): Call it.
(finish_function_handler_sequence): Likewise.
(finish_handler_parms): Set TREE_TYPE on the handler.
* cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
* search.c (get_base_distance_recursive): If protect>1, ignore
special access.
(get_base_distance): Don't reduce watch_access.
2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
* lex.c: #include diagnostic.h.
(lang_init_options): Set default prefixing rules.
* lang-options.h: Add -fdiagnostics-show-location=.
* decl2.c: #include diagnostic.h.
(lang_decode_option): Handle -fdiagnostics-show-location=.
2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
* tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
* vec.cc: Revert my 2000-05-07 change.
2000-05-11 Jason Merrill <jason@casey.cygnus.com>
* class.c (check_field_decls): Complain about non-static data
members with same name as class in class with constructor.
2000-05-10 Jason Merrill <jason@casey.cygnus.com>
* decl.c (grokdeclarator): Allow non-static data members with
same name as class.
2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
* cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
and pending_inline.filename. Update prototypes.
* decl.c (define_label): Constify filename parameter.
* decl2.c (warn_if_unknown_interface): Constify local char *.
* input.c Constify input_source.filename. Don't declare
input_filename or lineno. Constify filename parameter to feed_input.
* lex.c (init_parse): Constify parameter and return value.
(cp_pragma_interface, cp_pragma_implementation): Constify
filename argument.
(reinit_parse_for_method, reinit_parse_for_block,
reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
Constify local char *.
* pt.c: Don't declare lineno or input_filename.
(print_template_context, tsubst_friend_function, tsubst_decl,
tsubst, instantiate_decl): Constify local char *.
* semantics.c (expand_body): Constify local char *.
* tree.c (build_srcloc): Constify filename parameter.
* typeck.c (c_expand_asm_operands): Constify filename
parameter.
2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
* tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
offsetof expansion.
2000-05-08 Branko Cibej <branko.cibej@hermes.si>
* inc/cxxabi.h: Fix typos in comment.
(__base_class_info::__offset): Use a static_cast.
2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
* inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
of std::size_t and std::ptrdiff_t respectively.
* tinfo.cc: Likewise.
* vec.cc: Likewise.
2000-05-06 Richard Henderson <rth@cygnus.com>
* typeck.c (build_c_cast): Don't warn integer->pointer size
mismatch for constants.
2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
* rtti.c (ptmd_initializer): Set non-public, if class is
incomplete.
* inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
(__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
__cxa_vec_delete): Likewise.
* tinfo.cc (__dynamic_cast): Likewise.
* vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
__cxa_vec_delete): Likewise.
2000-05-04 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
(SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
(lang_decl_flags): Add vcall_offset.
(THUNK_VCALL_OFFSET): Use it.
* decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
* method.c (make_thunk): Create the lang_decl here, not in
emit_thunk.
(emit_thunk): Make generic thunks into ordinary functions once
they have been fed to expand_body.
* semantics.c (expand_body): Set current_function_is_thunk here.
2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* class.c (update_vtable_entry_for_fn): Prototype.
* pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
and `tmpl'.
* search.c (dfs_build_inheritance_graph_order): Prototype.
2000-05-04 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (special_function_kind): Add various kinds of
destructors.
(special_function_p): New function.
* class.c (overrides): Don't let one kind of destructor override
another.
* decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
whether or not to instantiate a template.
* tree.c (special_function_p): Define.
2000-05-03 Mark Mitchell <mark@codesourcery.com>
* cp-tree.def (THUNK_DECL): Remove.
* cp-tree.h (DECL_THUNK_P): New macro.
(DECL_NON_THUNK_FUNCTION_P): Likewise.
(DECL_EXTERN_C_FUNCTION_P): Likewise.
(SET_DECL_THUNK_P): Likewise.
(DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
(FNADDR_FROM_VTABLE_ENTRY): Likewise.
(DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
* decl.c (decls_match): Use DECL_EXTERN_C_P.
(duplicate_decls): Likewise.
(pushdecl): Likewise. Adjust thunk handling.
(grokfndecl): Use DECL_EXTERN_C_P.
* decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
* dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
* except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
* expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
* method.c (make_thunk): Use SET_DECL_THUNK_P. Set
DECL_NO_STATIC_CHAIN.
(emit_thunk): Don't play games with TREE_CODE on thunks. Don't
set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
* search.c (covariant_return_p): Remove THUNK_DECL handling.
* ir.texi: Update.
2000-05-01 Jason Merrill <jason@casey.cygnus.com>
* tree.c (walk_tree): Set lineno.
2000-05-01 Mark Mitchell <mark@codesourcery.com>
* exception.cc: Update license notice.
* new.cc: Likewise.
* new1.cc: Likewise.
* new2.cc: Likewise.
* tinfo.cc: Likewise.
* tinfo2.cc: Likewise.
* vec.cc: Likewise.
* inc/cxxabi.h: Likewise.
* inc/exception: Likewise.
* inc/new: Likewise.
* inc/new.h: Likewise.
* inc/typeinfo: Likewise.
2000-05-01 Jason Merrill <jason@casey.cygnus.com>
* tree.c (build_target_expr_with_type): If we already have a
TARGET_EXPR, just return it.
* optimize.c (initialize_inlined_parameters): Don't generate an
EXPR_STMT if we can just use DECL_INITIAL.
* decl.c (emit_local_var): Only make the initialization a
full-expression if stmts_are_full_exprs_p.
2000-05-01 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
macro.
* call.c (standard_conversion): Use it.
(direct_reference_binding): Likewise.
(build_over_call): Likewise.
(is_properly_derived_from): Likewise.
(compare_ics): Likewise.
* class.c (resolves_to_fixed_type_p): Likewise.
* optimize.c (declare_return_variable): Likewise.
* pt.c (is_specialization_of): Likewise.
(unify): Likewise.
* typeck.c (comp_target_parms): Likeiwse.
(build_static_cast): Likewise.
(build_reinterpret_cast): Likewise.
(build_const_cast): Likewise.
(comp_ptr_ttypes_real): Likewise.
(comp_ptr_ttypes_const): Likewise.
* typeck2.c (process_init_constructor): Likewise.
2000-04-30 Scott Snyder <snyder@fnal.gov>
* decl.c (finish_destructor_body): Use the base destructor when
destroying virtual bases.
2000-04-30 Mark Mitchell <mark@codesourcery.com>
* expr.c (cplus_expand_expr): Preserve temporaries when expanding
STMT_EXPRs.
* optimize.c (struct inline_data): Add target_exprs field.
(declare_return_variable): When a function returns an aggregate,
use the variable declared in the TARGET_EXPR as the remapped
DECL_RESULT.
(expand_call_inline): Update the pending target_exprs stack.
(optimize_function): Initialize the stack.
* decl2.c (finish_file): Fix typo in comment.
* method.c (emit_thunk): Don't try to return a `void' value.
* optimize.c (initialize_inlined_parameters): If the parameter is
addressable, we need to make a new VAR_DECL, even if the
initializer is constant.
2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
* decl.c (grok_op_properties): Add an extra check of argtypes.
2000-04-27 Mark Mitchell <mark@codesourcery.com>
* optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
variables.
(initialize_inlined_parameters): Try to avoid creating new
VAR_DECLs.
2000-04-27 Alex Samuel <samuel@codesourcery.com>
* lex.c (my_get_run_time): Remove.
(init_filename_times): Use get_run_time instead of my_get_run_time.
(check_newline): Likewise.
(dump_time_statistics): Likewise.
* decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
of computing elapsed time explicitly.
2000-04-26 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
* init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
* call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
before calling decl_constant_value.
* class.c (check_bitfield_decl): Likewise.
* cvt.c (ocp_convert): Likewise.
(convert): Likewise.
* decl.c (compute_array_index_type): Likewise.
(build_enumerator): Likewise.
* decl2.c (check_cp_case_value): Likewise.
* pt.c (convert_nontype_argument): Likewise.
(tsubst): Likewise.
* typeck.c (decay_conversion): Likewise.
(build_compound_expr): Likewise.
(build_reinterpret_cast): Likewise.
(build_c_cast): Likewise.
(convert_for_assignment): Likewise.
2000-04-26 Jason Merrill <jason@casey.cygnus.com>
* decl.c (finish_function): Don't play games with DECL_INLINE.
2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
* ir.texi: Correct typo.
2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
* decl.c (grokdeclarator): Reject VLAs as members.
2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
* call.c (standard_conversion): Accept conversion between
COMPLEX_TYPEs.
* cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
* decl2.c (finish_file): Remove double setup for accounting
compile time.
2000-04-24 Robert Lipe <robertlipe@usa.net>
* cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
* new.cc (set_new_handler): Needs to be in std::.
2000-04-23 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (lang_decl): Remove pretty_function_p.
(DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
language-specific node.
* decl.c (cp_make_fname_decl): Use build_decl, not
build_lang_decl, to build the variables.
(grokvardecl): Don't call build_lang_decl for local variables in
templates.
(grokdeclarator): Don't call build_lang_decl for local type
declarations in templates.
* lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
zero'd memory, rather than calling memset.
* pt.c: Include hashtab.h.
(local_specializations): New variable.
(retrieve_local_specialization): Use it.
(register_local_specialization): Likewise.
(tsubst_decl): Don't assume local variables have
DECL_LANG_SPECIFIC.
(instantiate_decl): Set up local_specializations.
* Makefile.in (HTAB_H): New variable.
2000-04-23 Richard Henderson <rth@cygnus.com>
* typeck.c (c_expand_asm_operands): Restore the original
contents of the output list.
2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
* ir.texi: Document complex number representation.
2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
* rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
(target_incomplete_p): New function.
(tinfo_base_init): Create comdat NTBS name variable.
(ptr_initializer): Add non_public parameter. Calculate it.
(ptmd_initializer): Likewise.
(synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
(create_real_tinfo_var): Add non_public parameter. Use it.
Push proxy into global namespace.
* inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
New enumeration.
* inc/typeinfo (type_info::before, type_info::operator==):
Compare __name addresses.
* tinfo2.cc: Remove new-abi builtins comment.
2000-04-20 Jason Merrill <jason@casey.cygnus.com>
* typeck.c (build_x_function_call): Resolve an OFFSET_REF.
* call.c (joust): Exit early if we get the same function, too.
* decl2.c (key_method): Return NULL_TREE for template classes.
(import_export_class): Don't need to check for template classes.
2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
* lex.c: Remove references to cccp.c.
2000-04-18 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (lang_decl_flags): Remove const_memfunc and
volatile_memfunc. Add destructor_attr. Adjust dummy.
(DECL_DESTRUCTOR_P): Use destructor_attr.
(DECL_CONST_MEMFUNC_P): Reimplement.
(DECL_VOLATILE_MEMFUNC_P): Remove.
* class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
(overrides): Use DECL_DESTRUCTOR_P.
(check_for_override): Likewise.
* decl.c (start_function): Likewise.
* decl2.c (grokfclassfn): Likewise.
(check_classfn): Likewise.
(grok_function_init): Likewise.
2000-04-17 Mark Mitchell <mark@codesourcery.com>
* decl2.c (grokfield): Issue error on illegal data member
declaration.
2000-04-17 Mark P Mitchell <mark@codesourcery.com>
* method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
2000-04-16 Mark Mitchell <mark@codesourcery.com>
* class.c (build_vtable_entry): Don't build thunks for type-info
functions.
2000-04-16 Jason Merrill <jason@casey.cygnus.com>
* decl.c (decls_match): Allow a redeclaration of a builtin to
specify args while the builtin did not.
2000-04-15 Mark Mitchell <mark@codesourcery.com>
* cp-tree.def (THUNK_DECL): Add to documentation.
* cp-tree.h (flag_huge_objects): Declare.
* class.c (modify_vtable_entry): Tidy.
(update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
Calculate delta appropriately for the new ABI.
(dfs_modify_vtables): Use it.
(modify_all_vtables): Fix thinko in code to add overriding copies
of functions to primary vtables.
(build_clone): Fix typo in comment.
(clone_function_decl): Correct order of destructors in vtable.
(build_vbase_offset_vtbl_entries): Adjust comment.
(dfs_vcall_offset_queue_p): Remove.
(dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
(build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
(build_vtable_entry): Correct check for pure virtual functions.
Don't declare flag_huge_objects.
* decl.c (flag_huge_objects): Remove declaration.
* method.c (make_thunk): Tweak mangling for vcall offset thunks.
Use int_size_in_bytes.
(emit_thunk): Handle vcall offset thunks.
2000-04-15 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* decl2.c (parse_time, varconst_time): Delete declarations.
(finish_file): Delete LINENO declaration.
START_TIME and THIS_TIME now long.
2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
* class.c (build_base_field): Reformat comment.
* inc/cxxabi.h (stddef.h): Comment inclusion.
(__base_class_info::__offset): Comment shift.
2000-04-12 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
(cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
(cp_push_exception_identifier): New macro.
(DECL_COMPLETE_DESTRUCTOR_P): New macro.
(DECL_BASE_DESTRUCTOR_P): Likewise.
(DECL_DELETING_DESTRUCTOR_P): Likewise.
(get_vtbl_decl_for_binfo): Fix formatting.
(in_charge_arg_for_name): New macro.
(maybe_build_cleanup_and_delete): Remove declaration.
* call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
(in_charge_arg_for_name): New function.
(build_new_method_call): Use it. Handle cloned destructors.
(build_clone): Don't make the base constructor virtual.
Automatically defer generated functions.
(clone_function_decl): Handle destructors, too.
(clone_constructors_and_destructors): Likewise.
(create_vtable_ptr): Don't create a vtable entry for a cloned
function.
* decl.c (predefined_identifier): Add ctor_or_dtor_p.
(initialize_predefined_identifiers): Update appropriately.
(finish_destructor_body): Simplify.
(maybe_build_cleanup_and_delete): Remove.
* except.c (expand_throw): Handle new-ABI destructors.
* init.c (expand_cleanup_for_base): Use base_dtor_identifier.
(build_dtor_call): New function.
(build_delete): Use it. Simplify.
* optimize.c (maybe_clone_body): Handle destructors.
* search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
* exception.cc (cleanup_fn): New typedef.
(CALL_CLEANUP): New macro.
(cp_eh_info): Use them.
(__cp_push_exception): Likewise.
(__cp_pop_exception): Likewise.
2000-04-11 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
(complete_dtor_identifier): New macro.
(CLASSTYPE_FIRST_CONVERSION): Remove.
(CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
(CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
(CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
(CLASSTYPE_CONSTRUCTORS): Likewise.
(CLASSTYPE_DESTRUCTORS): Likewise.
(lang_decl): Add cloned_function.
(DECL_COMPLETE_CONSTRUCTOR_P): New macro.
(DECL_BASE_CONSTRUCTOR_P): Likewise.
(DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
(DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
(DECL_CLONED_FUNCTION_P): Likewise.
(DECL_CLONED_FUNCTION): Likewise.
(clone_function_decl): Declare.
(maybe_clone_body): Likewise.
* call.c (build_user_type_conversion_1): Call complete object
constructors in the new ABI.
(build_new_method_call): Don't add in-charge parameters under the
new ABI.
* class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
CLASSTYPE_DESTRUCTOR_SLOT.
(build_clone): New function.
(clone_function_decl): Likewise.
(clone_constructors_and_destructors): Likewise.
(check_bases_and_members): Use it.
* decl.c (iniitialize_predefined_identifiers): Initialize
complete_dtor_identifier.
(finish_function): Don't add extra code to a clone.
(lang_mark_tree): Mark cloned_function.
* decl2.c (mark_used): Don't bother trying to instantiate things
we synthesized.
* dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
* method.c (set_mangled_name_for_decl): Don't treat clones as
constructors.
(synthesize_method): Sythesize cloned functions, not the clones.
* optimize.c (inline_data): Update comment on ret_label.
(remap_block): Don't assume DECL_INITIAL exists.
(copy_body_r): Allow ret_label to be NULL.
(maybe_clone_body): Define.
* pt.c (tsubst_decl): Handle clones.
(instantiate_clone): New function.
(instantiate_template): Use it.
(set_mangled_name_for_template_decl): Don't treat clones as
constructors.
* search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
* semantics.c (expand_body): Clone function bodies as necessary.
* optimize.c (remap_decl): Avoid sharing structure for arrays
whose size is only known at run-time.
* tree.c (copy_tree_r): Don't copy PARM_DECLs.
* cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
to has_in_charge_parm_p.
(DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
(DECL_HAS_IN_CHARGE_PARM_P): ... this.
(DECL_COPY_CONSTRUCTOR_P): New macro.
* call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
(build_user_type_conversion_1): Likewise.
(convert_like_real): Likewise.
(build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
* decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
(copy_args_p): Likewise.
(grok_ctor_properties): Likewise.
(start_function): Likewise.
* decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
* error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
* init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
* method.c (do_build_copy_constructor): Use
DECL_HAS_IN_CHARGE_PARM_P.
(synthesize_method): Likewise.
* pt.c (instantiate_template): Remove goto.
* tree.c (build_cplus_method_type): Remove mention of obstacks in
comment.
* cp-tre.h (finish_function): Change prototype.
* decl.c (end_cleanup_fn): Adjust caller.
(finish_function): Take only one parameter.
* decl2.c (finish_objects): Adjust caller.
(finish_static_storage_duration_function): Likewise.
* method.c (emit_thunk): Likewise.
* parse.y: Likewise.
* parse.c: Regenerated.
* pt.c (instantiate_decl): Likewise.
* rtti.c (synthesize_tinfo_fn): Likewise.
* semantics.c (expand_body): Likewise.
* cp-tree.h (copy_decl): New function.
* class.c (finish_struct_1): Use it.
* lex.c (copy_decl): Define it.
* pt.c (tsubst_decl): Likewise.
* tree.c (copy_template_template_parm): Likewise.
* cp-tree.h (lang_type): Remove has_nonpublic_ctor and
has_nonpublic_assign_ref.
(TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
(TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
* class.c (finish_struct_methods): Don't set
TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
(interface_only): Don't declare.
(interface_unknown): Likewise.
2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
* tree.h (HAVE_TEMPLATES): Remove definition.
* lang-options.h (-fthis-is-variable): Remove documentation.
2000-04-10 Jason Merrill <jason@casey.cygnus.com>
* class.c (instantiate_type): Handle object-relative template-id.
* semantics.c (finish_expr_stmt): Call convert_to_void here.
* decl.c (cplus_expand_expr_stmt): Not here.
* rtti.c (build_dynamic_cast_1): Call non_lvalue.
Initialize exprtype earlier.
* parse.y (fn.def1): Check for defining types in return types.
* decl.c (check_tag_decl): Notice extra fundamental types.
Diagnose empty decls in classes, too.
* decl.c (grokdeclarator): Don't override an anonymous name if no
declarator was given.
* cvt.c (convert_to_void): Call resolve_offset_ref.
* typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
* decl2.c (decl_namespace): Handle getting a type.
* typeck.c (build_c_cast): Re-enable warning for cast between
pointer and integer of different size.
2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
* inc/cxxabi.h (__pointer_type_info): Add restrict and
incomplete flags.
(__pointer_type_info::__pointer_catch): New virtual function.
(__pointer_to_member_type_info): Derive from
__pointer_type_info. Adjust.
(__pointer_to_member_type_info::__do_catch): Remove.
(__pointer_to_member_type_info::__is_pointer_p): Declare.
(__pointer_to_member_type_info::__pointer_catch): Declare.
* rtti.c (qualifier_flags): Add restrict flag.
(ptmd_initializer): Reorder members.
(create_tinfo_types): Expand comments. Reorder
ptmd_desc_type_node members.
* tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
Implement.
(__pointer_type_info::__do_catch): Move specific code into
__pointer_catch. Call it.
(__pointer_type_info::__pointer_catch): Non-pointer-to-member
specific catch checking. Fix void conversion check.
(__pointer_to_member_type_info::__do_catch): Remove.
(__pointer_to_member_type_info::__pointer_catch): Implement.
2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
* lex.c (init_parse): Remove traces of classof and headof.
* decl2.c (flag_operator_names): Default to 1.
(lang_decode_option): Do not set it for -ansi.
2000-04-09 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (struct lang_decl): Remove main_decl_variant.
(DECL_MAIN_VARIANT): Remove.
* decl.c (duplicate_decls): Don't set it.
(start_function): Likewise.
(lang_mark_tree): Don't mark it.
* decl2.c (defer_fn): Don't use it.
* lex.c (retrofit_lang_decl): Don't set it.
* pt.c (tsubst_decl): Likewise.
* ptree.c (print_lang_decl): Don't print it.
* typeck.c (mark_addressable): Don't use it.
2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
* vec.cc: Include <new> and <exception>.
(__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
(__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
terminate.
(__cxa_vec_delete): Catch dtor exceptions.
2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
Prepend __ to implementation defined names.
* inc/typeinfo (type_info): Rename _name to __name.
(type_info::type_info): Rename parameter.
(type_info::operator==, type_info::operator!=,
type_info::before): Likewise.
(type_info::is_pointer_p, type_info::is_function_p,
type_info::do_catch, type_info::do_upcast): Prepend __. Rename
parameters.
* inc/cxxabi.h
(__fundamental_type_info::__fundamental_type_info) Rename parameters.
(__pointer_type_info::__pointer_type_info): Likewise.
(__pointer_type_info::is_pointer_p,
__pointer_type_info::do_catch): Prepend __. Rename parameters.
(__array_type_info::__array_type_info): Rename parameters.
(__function_type_info::__function_type_info): Likewise.
(__function_type_info::is_function_p): Prepend __.
(__enum_type_info::__enum_type_info): Rename parameters.
(__pointer_to_member_type_info::__pointer_to_member_type_info):
Likewise.
(__pointer_to_member_type_info::do_catch): Prepend __. Rename
parameters.
(__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
(__class_type_info::__class_type_info): Rename parameters.
(__class_type_info::sub_kind): Prepend __. Adjust member names.
(__class_type_info::upcast_result,
__class_type_info::dyncast_result): Prepend __. Move definition
into tinfo.cc.
(__class_type_info::do_upcast, __class_type_info::do_catch,
__class_type_info::find_public_src,
__class_type_info::do_dyncast,
__class_type_info::do_find_public_src): Prepend __. Rename
parameters.
(__si_class_type_info::__si_class_type_info): Rename parameters.
(__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
__si_class_type_info::do_find_public_src): Prepent __. Rename
parameters.
(__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
(__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
__vmi_class_type_info::do_find_public_src): Prepent __. Rename
parameters.
(__dynamic_cast): Rename parameters.
* tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
type_info::do_catch, type_info::do_upcast): Prepend __.
(contained_p, public_p, virtual_p, contained_public_p,
contained_nonpublic_p, contained_nonvirtual_p): Adjust.
(__class_type_info::do_catch,
__class_type_info::do_upcast): Prepend __. Adjust.
(__class_type_info::__upcast_result,
__class_type_info::__dyncast_result): Move from inc/cxxabi.h.
Adjust.
(__class_type_info::find_public_src): Prepend __. Adjust.
(__class_type_info::do_find_public_src,
__si_class_type_info::do_find_public_src,
__vmi_class_type_info::do_find_public_src): Likewise.
(__class_type_info::do_dyncast,
__si_class_type_info::do_dyncast,
__vmi_class_type_info::do_dyncast): Likewise.
(__class_type_info::do_upcast,
__si_class_type_info::do_upcast,
__vmi_class_type_info::do_upcast): Likewise.
(__dynamic_cast): Adjust.
* tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
(__function_type_info::is_function_p): Likewise.
(__pointer_type_info::do_catch): Likewise. Adjust.
(__pointer_to_member_type_info::do_catch): Likewise. Adjust.
(__throw_type_match_rtti_2): Adjust.
(__is_pointer): Adjust.
2000-04-08 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
(complete_ctor_identifier): New macro.
(special_function_kind): Add sfk_copy_constructor and
sfk_assignment_operator.
(LOOKUP_HAS_IN_CHARGE): Remove.
(cons_up_default_function): Rename to ...
(implicitly_declare_fn): ... this.
* call.c (build_new_method_call): Add in-charge parameters for
constructors here.
* class.c (add_implicitly_declared_members): Change parameter name
from cant_have_assignment to cant_have_const_assignment.
Replace calls to cons_up_default_function to implicitly_declare_fn.
* cvt.c (ocp_convert): Use complete_ctor_identifier.
* decl.c (initialize_predefined_identifiers): Initialize it.
(start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
complex expression.
* init.c (expand_default_init): Don't calculate the in-charge
parameter here.
(build_new_1): Likewise.
* lex.c (cons_up_default_function): Move to method.c.
* method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
(implicitly_declare_fn): New function.
* typeck.c (build_static_cast): Use complete_ctor_identifier.
(build_modify_expr): Likewise.
* typeck2.c (build_functional_cast): Likewise.
Under the new ABI, constructors don't return `this'.
* cp-tree.h (warn_reorder): Declare.
(special_function_kind): New enum.
(global_base_init_list): Remove declaration.
(emit_base_init): Don't return a value.
(check_base_init): Don't declare.
(is_aggr_typedef): Likewise.
* decl.c (check_special_function_return_type): New function.
(return_types): Remove.
(grokdeclarator): Use check_special_function_return_type.
(start_function): Don't initialize ctor_label under the new ABI.
(finish_construtor_body): Don't create a corresponding LABEL_STMT.
* init.c (begin_init_stmts): Move to top of file.
(finish_init_stmts): Likewise.
(warn_reorder): Don't declare.
(emit_base_init): Don't create a STMT_EXPR here. Don't return a
value.
(check_base_init): Remove.
(is_aggr_typedef): Likewise.
(build_new_1): Don't use the return value of a constructor.
* semantics.c (setup_vtbl_ptr): Don't use the return value
of emit_base_init.
* typeck.c (check_return_expr): Don't magically convert return
statements into `return this' in constructors under the new ABI.
* cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
(base_ctor_identifier): New macro.
(base_dtor_identifier): Likewise.
(deleting_dtor_identifier): Likewise.
* decl.c: Don't include obstack.h.
(obstack_chunk_alloc): Don't define.
(obstack_chunk_free): Likewise.
(struct predefined_identifier): New type.
(initialize_predefined_identifiers): New function.
(init_decl_processing): Use it.
(debug_temp_inits): Remove.
(start_method): Don't call preserve_data.
(hack_incomplete_structures): Update comment.
* init.c (init_init_processing): Don't initialize
nelts_identifier.
(build_offset_rf): Remove dead code.
(build_delete): Use CLASSTYPE_N_BASECLASSES.
* search.c (init_search_processing): Don't initialize
vptr_identifier.
2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
some sign_compare warnings.
2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
Rename abi::__vmi_class_type_info members.
* inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
base_list, detail_masks members to vmi_flags, vmi_base_count,
vmi_bases and vmi_flags_masks respectively.
(__vmi_class_type_info::vmi_flags_masks): Rename
details_unknown_mask to flags_unknown_mask.
* tinfo.cc (__class_type_info::do_upcast): Adjust.
(__vmi_class_type_info::do_find_public_src): Adjust.
(__vmi_class_type_info::do_dyncast): Adjust.
(__vmi_class_type_info::do_upcast): Adjust.
2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
* tinfo.cc (convert_to_base): New function.
(get_vbase_offset): Remove. Move into convert_to_base.
(__vmi_class_type_info::do_find_public_src): Adjust.
(__vmi_class_type_info::do_dyncast): Adjust.
(__vmi_class_type_info::do_upcast): Adjust.
2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
* tinfo.cc (operator=): Use __builtin_strcmp.
* tinfo2.cc (before): Likewise.
2000-04-06 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
(DECL_SAVED_INLINE): Rename to ...
(DECL_DEFERRED_FN): ... this.
(in_function_p): Remove declaration.
(mark_inline_for_output): Rename to ...
(defer_fn): ... this.
* decl.c (finish_function): Adjust call to mark_inline_for_output.
(in_function_p): Remove definition.
* decl2.c (saved_inlines): Rename to ...
(deferred_fns): ... this.
(saved_inlines_used): Rename to ...
(deferred_fns_used): ... this.
(mark_inline_for_output): Rename to ...
(defer_fn): ... this.
(finish_file): Adjust accordingly.
(init_decl2): Likewise.
* lex.c (cons_up_default_function): Likewise.
* pt.c (mark_decl_instantiated): Likewise.
(instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
circumstances.
* rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
* semantics.c (expand_body): Defer more functions.
2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
* vec.cc: New file.
* Make-lang.in (CXX_LIB2FUNCS): Add it.
(vec.o): Build it.
* inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
__cxa_vec_delete): Declare.
2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
* rtti.c (dfs_class_hint_mark): New static function.
(dfs_class_hint_unmark): New static function.
(class_hint_flags): Use them.
2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
* decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
2000-04-05 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (instantiate_decl): Change prototype.
* decl2.c (mark_used): Adjust call.
* optimize.c (inlinable_function_p): Adjust handling of templates.
* pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
(do_type_instantiation): Likewise.
(instantiate_decl): Defer more templates.
(instantiate_pending_templates): Adjust logic to handle inline
friend functions.
* Makefile.in (GGC_H): New variable. Use it throughout in place
of ggc.h.
* call.c: Don't include obstack.h. Include ggc.h.
(obstack_chunk_alloc): Don't define.
(obstack_chunk_free): Likewise.
(add_candidate): Allocate the z_candidate with ggc_alloc_obj.
* decl.c (push_switch): Use xmalloc to allocate the cp_switch.
(pop_switch): Free it.
* decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
* dump.c (dequeue_and_dump): Don't try to print the bit_position
if we don't have a DECL_FIELD_OFFSET.
Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
* optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
special_function_p.
2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* cfns.gperf (hash, libc_name_p): Prototype.
* rtti.c (build_dynamic_cast_1): Constification.
* search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
* semantics.c (deferred_type_access_control): Prototype.
2000-04-04 Mark Mitchell <mark@codesourcery.com>
Correct many new ABI issues regarding vbase and vcall offset
layout.
* cp-tree.h (BINFO_VTABLE): Document.
(struct lang_type): Tweak formatting.
(BINFO_PRIMARY_BINFO): Add to documentation.
(CLASSTYPE_VSIZE): Fix typo in comment.
(CLASSTYPE_VBASECLASSES): Update documentation.
(BINFO_VBASE_MARKED): Remove.
(SET_BINFO_VBASE_MARKED): Likewise.
(CLEAR_BINFO_VBASE_MARKED): Likewise.
(BINFO_FIELDS_MARKED): Remove.
(SET_BINFO_FIELDS_MARKED): Likewise.
(CLEAR_BINFO_FIELDS_MARKED): Likewise.
(enum access_kind): New enumeration.
(num_extra_vtbl_entries): Remove declaration.
(size_extra_vtbl_entries): Likewise.
(get_vtbl_decl_for_binfo): New function.
(dfs_vbase_unmark): Remove declaration.
(mark_primary_bases): Likewise.
* class.c (SAME_FN): Remove.
(struct vcall_offset_data_s): Move definition.
(build_vbase_pointer): Use `build', not `build_binary_op', to
access the vbase pointer under the new ABI.
(build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
(build_primary_vtable): Likewise.
(dfs_mark_primary_bases): Move here from search.c.
(mark_primary_bases): Likewise.
(determine_primary_bases): Under the new ABI, don't make a base
class a primary base just because we don't yet have any virtual
functions.
(layout_vtable_decl): Use get_vtbl_decl_for_binfo.
(num_vfun_entries): Remove.
(dfs_count_virtuals): Likewise.
(num_extra_vtbl_entries): Likewise.
(size_extra_vtbl_entries): Likewise.
(layout_virtual_bases): Iterate in inheritance graph order under
the new ABI.
(finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
indicate that a vfield is present.
(init_class_processing): Initialize access_public_node, etc., from
ak_public, etc.
(get_vtbl_decl_for_binfo): New function.
(dump_class_hierarchy_r): Likewise.
(dump_class_hierarchy): Use it.
(finish_vtbls): Build the vtbls in inheritance graph order.
(dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
(initialize_vtable): Use get_vtbl_decl_for_binfo.
(accumulate_vtbl_inits): Add comments explaining why a pre-order
walk is required.
(dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
where the vptr points, even for primary vtables.
(build_vtbl_initializer): Adjust handling of vbase and vcall
offsets.
(build_vcall_and_vbase_vtable_entries): New function.
(dfs_build_vbase_offset_vtbl_entries): Remove.
(build_vbase_offset_vtbl_entries): Reimplement.
(dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
were already handled in a primary base class vtable.
(build_vcall_offset_vtbl_entries): Adjust.
(build_rtti_vtbl_entries): Adjust.
* decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
* init.c (expand_virtual_init): Simplify.
* repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
* rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
* search.c (BINFO_ACCESS): New macro.
(SET_BINFO_ACCESS): Likewise.
(dfs_access_in_type): Manipulate access_kinds, not access nodes.
(access_in_type): Likewise.
(dfs_accessible_p): Likewise.
(protected_accessible_p): Likewise.
(lookup_fnfields_1): Adjust documentation.
(dfs_mark_primary_bases): Move to class.c
(mark_primary_bases): Likewise.
(dfs_vbase_unmark): Remove.
(virtual_context): Use BINFO_FOR_VBASE.
(dfs_get_vbase_types): Simplify.
(dfs_build_inheritance_graph_order): New function.
(get_vbase_types): Use it.
* tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
* tinfo.cc (get_vbase_offset): New function.
(__vmi_class_type_info::do_find_public_src): Use it.
(__vmi_class_type_info::do_dyncast): Likewise.
(__vmi_class_type_info::do_upcast): Likewise.
2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
* lang-specs.h: Pass -fno-show-column to the preprocessor.
2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
* rtti.c (class_hint_flags): Rename flags.
(class_initializer): Remove flags.
(synthesize_tinfo_var): Combine offset and flags. Add flags
for __vmi_class_type_info.
(create_tinfo_types): Remove flags from __class_type_info and
__si_class_type_info. Merge flags and offset from
base_class_type_info.
* inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
(__base_class_info::is_virtual_p): Adjust.
(__base_class_info::is_public_p): Adjust.
(__base_class_info::offset): New accessor.
(__class_type_info::details): Remove member.
(__class_type_info::__class_type_info): Lose details.
(__class_type_info::detail_masks): Remove.
(__si_class_type_info::__si_class_type_info): Lose details.
(__vmi_class_type_info::details): New member.
(__vmi_class_type_info::__vmi_class_type_info): Adjust.
(__vmi_class_type_info::detail_masks): New member.
* tinfo.cc (__class_type_info::do_upcast): Initialize result
with unknown_details_mask.
(__vmi_class_type_info::do_find_public_src): Adjust
(__vmi_class_type_info::do_dyncast): Adjust.
(__vmi_class_type_info::do_upcast): Set result details, if
needed. Adjust.
(__dynamic_cast): Temporarily #if out optimization.
2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
* rtti.c (get_tinfo_decl): Mark used.
(emit_tinfo_decl): Don't optimize polymorphic type_info. Only
mark as dealt with, if we output it.
2000-03-28 Mark Mitchell <mark@codesourcery.com>
* class.c: Reorganize to put virtual function table initialization
machinery at the end of the file.
2000-03-28 Jason Merrill <jason@casey.cygnus.com>
* class.c (finish_struct): Use bitsize_zero_node.
* pt.c (instantiate_class_template): Likewise.
2000-03-28 Mark Mitchell <mark@codesourcery.com>
Put RTTI entries at negative offsets in new ABI.
* class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
vbase offset at index -3, not -1.
(build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
(dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
(build_rtti_vtbl_entries): New function.
(set_rtti_entry): Remove.
(build_primary_vtable): Don't use it.
(build_secondary_vtable): Likewise.
(start_vtable): Remove.
(first_vfun_index): New function.
(set_vindex): Likewise.
(add_virtual_function): Don't call start_vtable. Do call
set_vindex.
(set_primary_base): Rename parameter.
(determine_primary_base): Likewise.
(num_vfun_entries): Don't use skip_rtti_stuff.
(num_extra_vtbl_entries): Include RTTI information.
(build_vtbl_initializer): Use build_rtti_vtbl_entries.
(skip_rtti_stuff): Remove.
(dfs_modify_vtables): Don't use it.
(modify_all_vtables): Don't use start_vtable. Do use set_vindex.
(layout_nonempty_base_or_field): Update size handling.
(create_vtable_ptr): Tweak.
(layout_class_type): Adjust parameter names.
(finish_struct_1): Simplify.
* cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
(skip_rtti_stuff): Remove.
(first_vfun_index): New function.
(dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
(dfs_vtable_path_marked_real_bases_queue_p): Remove.
(marked_vtable_pathp): Declare.
(unmarked_vtable_pathp): Likewise.
* error.c (dump_expr): Use first_vfun_index to calculate vtable
offsets.
* rtti.c (build_headof): Look for RTTI at negative offsets.
(get_tinfo_decl_dynamic): Likewise.
(tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
here.
(create_pseudo_type_info): Do it here instead. Adjust so that
vptr points at first virtual function.
* search.c (marked_vtable_pathp): Make it global.
(unmarked_vtable_pathp): Likewise.
(dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
(dfs_vtable_path_marked_real_bases_queue_p): Likewise.
(dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
(get_pure_virtuals): Likewise.
(expand_upcast_fixups): Likewise.
* tree.c (debug_binfo): Likewise.
* tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
negative offset.
2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* class.c (check_field_decl): Fix typo.
(build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
(check_methods): Likewise.
(check_field_decls): Likewise.
Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
* cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
Use DECL_RESULT_FLD, not DECL_RESULT.
* decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
* lex.c (identifier_type): Likewise.
* pt.c (determine_specialization, lookup_template_class): Likewise.
(tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
(resolve_overloaded_unification, more_specialized): Likewise.
* semantics.c (finish_member_declaration): Likewise.
* typeck.c (build_x_function_call): Likewise.
2000-03-26 Mark Mitchell <mark@codesourcery.com>
* class.c (layout_empty_base): Handle empty bases with non-byte
alignment.
(build_base_field): Likewise.
(layout_virtual_bases): Likewise.
* class.c (finish_struct_1): Fix typo in this change:
Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2000-03-25 Mark Mitchell <mark@codesourcery.com>
* decl.c (grokdeclarator): Count partial specializations when
keeping track of how many template classes have been seen.
* dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* class.c (build_vbase_pointer_fields): layout_field now place_field.
(get_vfield_offset): Use byte_position.
(set_rtti_entry): Set OFFSET to ssizetype zero.
(get_binfo_offset_as_int): Deleted.
(dfs_record_base_offsets): Use tree_low_cst.
(dfs_search_base_offsets): Likewise.
(layout_nonempty_base_or_field): Reflect changes in RLI format
and call byte_position.
(layout_empty_base): Convert offset to ssizetype.
(build_base_field): use rli_size_unit_so_far.
(dfs_propagate_binfo_offsets): Do computation in proper type.
(layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
(layout_class_type): Reflect changes in RLI names and fields.
(finish_struct_1): Set DECL_FIELD_OFFSET.
* dump.c (dequeue_and_dump): Call bit_position.
* expr.c (cplus_expand_constant): Use byte_position.
* rtti.c (expand_class_desc): Use bitsize_one_node.
* typeck.c (build_component_addr): Use byte_position and don't
special case for zero offset.
2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
* rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
tinfo object.
(emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
vtable.
2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
* call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
DECL_P macros.
* decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
make_typename_type, check_initializer, cp_finish_decl,
xref_tag): Likewise.
* decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
decl_namespace, arg_assoc_template_arg, arg_assoc,
validate_nonmember_using_decl, do_class_using_decl): Likewise.
* error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
args_to_string): Likewise.
* friend.c (is_friend): Likewise.
* lex.c (note_got_semicolon, note_list_got_semicolon,
is_global): Likewise.
* method.c (build_overload_nested_name, build_overload_value,
build_qualified_name, build_qualified_name, hack_identifier): Likewise.
* parse.y (typename_sub, typename_sub1): Likewise.
* pt.c (push_inline_template_parms_recursive, check_template_shadow,
process_partial_specialization, convert_template_argument,
template_args_equal, add_pending_template, lookup_template_class,
for_each_template_parm_r, maybe_fold_nontype_arg,
tsubst, instantiate_template, type_unification_real, unify,
instantiate_pending_templates, set_mangled_name_for_template_decl):
Likewise.
* repo.c (repo_get_id, repo_template_used): Likewise.
* search.c (lookup_field_1): Likewise.
* tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
* xref.c (classname): Likewise.
2000-03-22 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
(CANONICAL_BINFO): New macro.
(BINFO_NEW_VTABLE_MARKED): Use it.
(SET_BINFO_NEW_VTABLE_MARKED): Likewise.
(CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
* class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
not TREE_TYPE.
(build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
(build_secondary_vtable): Likewise.
(dfs_finish_vtbls): Likewise.
(dfs_accumulate_vtbl_inits): Likewise.
(accumulate_vtbl_inits): New function.
(finish_vtbls): Make sure that virtual bases come after
non-virtual bases in the vtable group.
(record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
(finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
* search.c (struct vbase_info): Move definition.
(marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
(unmarked_new_vtable_p): Likewise.
(dfs_mark_vtable_path): Remove.
(dfs_mark_new_vtable): Remove.
(dfs_unmark_new_vtable): Likewise.
(dfs_clear_search_slot): Likewise.
(dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
(dfs_clear_vbase_slots): Likewise.
(init_vbase_pointers): LIkewise.
2000-03-22 Jason Merrill <jason@casey.cygnus.com>
* typeck.c (type_after_usual_arithmetic_conversions): Prefer a
SIZETYPE to a non-SIZETYPE.
2000-03-21 Mark Mitchell <mark@codesourcery.com>
* class.c (layout_virtual_bases): Adjust names in conditionally
compiled code.
* class.c (record_base_offsets): New function.
(layout_conflict_p): Likewise.
(layout_nonempty_base_or_field): Use it.
(layout_empty_base): New function.
(build_base_field): Use it.
(build_base_fields): Update comment.
(layout_virtual_bases): Fold in a little code form
layout_basetypes. Use layout_empty_base.
(layout_basetypes): Remove.
(end_of_class): New function.
(layout_class_type): Use it. Adjust.
* cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
(fntype_p): Remove.
* search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
comment.
(dfs_skip_nonprimary_vbases_markedp): Likewise.
* typeck.c (fntype_p): Remove.
* cp-tree.h (TI_SPEC_INFO): Remove.
(CLASSTYPE_TI_SPEC_INFO): Likewise.
* pt.c (process_partial_specialization): Likewise.
* class.c (build_base_field): Fix thinko in computation of binfo
offsets.
* tree.c (mark_local_for_remap_p): Mark variables declared in
TARGET_EXPRs as well.
2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
* typeck.c (require_complete_type, complete_type,
complete_type_or_else, c_sizeof, c_sizeof_nowarn,
build_array_ref, convert_arguments, pointer_diff,
build_x_unary_op, build_unary_op, build_c_cast,
build_modify_expr): Use COMPLETE_TYPE_P etc.
* call.c (is_complete, convert_like_real,
build_new_method_call): Likewise.
* class.c (build_vbase_pointer_fields, check_bases,
build_base_field, finish_struct_1, pushclass): Likewise.
* cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
* decl.c (maybe_process_template_type_declaration, pushtag,
pushdecl, redeclaration_error_message, start_decl, start_decl_1,
layout_var_decl, check_initializer, cp_finish_decl,
grokdeclarator, require_complete_types_for_parms,
grok_op_properties, xref_tag, xref_basetypes,
check_function_type): Likewise.
* decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
* friend.c (do_friend): Likewise.
* init.c (build_offset_ref): Likewise.
* parse.y (structsp): Likewise.
* pt.c (maybe_process_partial_specialization,
tsubst_friend_function, instantiate_class_template, tsubst,
do_type_instantiation, instantiate_pending_templates): Likewise.
* repo.c (repo_get_id): Likewise.
* rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
synthesize_tinfo_var, emit_support_tinfos): Likewise.
* search.c (lookup_fnfields_1, lookup_conversions): Likewise.
* semantics.c (begin_class_definition): Likewise.
* tree.c (build_cplus_method_type): Likewise.
* typeck2.c (digest_init, build_functional_cast,
add_exception_specifier): Likewise.
* parse.h, parse.c: Regenerated.
2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
* inc/cxxabi.h: New header file. Define new-abi entry points.
(__pointer_type_info::target): Rename member to ...
(__pointer_type_info::type): ... here.
(__base_class_info::type): Rename member to ...
(__base_class_info::base): ... here.
* Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
* cp-tree.h (CPTI_ABI): New global tree enumeration.
(abi_node): New global tree node.
* decl.c (abi_node): Document.
(init_decl_processing): Initialize abi_node.
* rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
(get_vmi_pseudo_type_info): Likewise.
(create_tinfo_types): Likewise.
(emit_support_tinfos): Likewise.
* tinfo.h (cxxabi.h): Include for new-abi.
Move rtti class definitions to new header file.
* tinfo.cc (abi): Use the namespace.
(std): Move new abi rtti classes from here ...
(__cxxabiv1): ... to here.
* tinfo2.cc (cxxabi.h): Include for new-abi.
Move rtti class definitions to new header file.
(std): Move new abi rtti classes from here ...
(__cxxabiv1): ... to here.
* inc/typeinfo (__class_type_info): Move into __cxxabiv1
namespace.
2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
Jason Merrill <jason@casey.cygnus.com>
* method.c (build_overload_int): Use host_integerp.
2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
* init.c (build_offset_ref): Handle the case of a templated member
function.
2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
* except.c (expand_exception_blocks): Clear catch_clauses_last.
2000-03-18 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
* class.c (check_bitfield_decl): Turn illegal bitfields into
non-bitfields.
(dfs_propagate_binfo_offsets): Adjust for new size_binop
semantics.
(dfs_offset_for_unshared_vbases): Likewise.
* cvt.c (cp_convert_to_pointer): Convert NULL to a
pointer-to-member correctly under the new ABI.
* expr.c (cplus_expand_constant): Don't use cp_convert when
turning an offset into a pointer-to-member.
* init.c (resolve_offset_ref): Don't adjust pointers-to-members
when dereferencing them under the new ABI.
* typeck.c (get_member_function_from_ptrfunc): Tweak calculation
of pointers-to-members under the new ABI.
* class.c (check_bitfield_decl): Remove restriction on really long
bitfields.
(layout_class_type): Implement new ABI handling of bitfields
longer than their types.
2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
* parse.y (extdefs): Call ggc_collect.
* parse.c: Regenerated.
2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
* class.c (build_base_field): Use TYPE_ALIGN to examine a type.
(note_name_declared_in_class): Use OVL_CURRENT to get at a
potential overload.
2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* class.c (build_vbase_path): Use integer_zerop.
(build_vtable_entry): Use tree_low_cst.
(get_vfield_offset): Use bit_position.
(dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
Use tree_low_cst.
(check_bitfield_decl): Set DECL_SIZE using convert.
(build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
(layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
Use tree_low_cst.
(finish_struct_1): Use bit_position.
(dump_class_hierarchy): Use tree_low_cst.
* cp-tree.h (min_precision): Add declaration.
* decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
* error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
(dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
* expr.c (cplus_expand_constant): Use bit_position.
* init.c (build_vec_init): Use host_integerp and tree_low_cst.
* rtti.c (get_base_offset): Use bit_position.
* typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
host_integerp, and tree_low_cst.
(pointer_int_sum): Use integer_zerop.
(build_component_addr): Use bit_position.
2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
* typeck.c (require_complete_type): Don't assume size_zero_node.
(complete_type_or_else): Likewise.
2000-03-16 Steven Grady <grady@digitaldeck.com>
Jason Merrill <jason@casey.cygnus.com>
* rtti.c (build_dynamic_cast_1): Improve diagnostics.
2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
* decl2.c (grokfield): Bail out if type is error_mark_node.
2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
* tinfo2.cc (__ptr_to_member_data): Rename to ...
(__pointer_to_member_data): ... here. Adjust.
* rtti.c (create_tinfo_types): Adjust.
2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
* decl.c (ref_desc_type_node): Undocument.
* rtti.c (ptr_ref_initializer): Rename to ...
(ptr_initializer): ... here. Adjust comments.
(ptmd_initializer): Fix comment thinko.
(synthesize_tinfo_var): Remove REFERENCE_TYPE case.
(create_tinfo_types): Remove ref_desc_type_node init.
* tinfo2.cc (__reference_type_info): Remove.
2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (cp_finish_decl): Remove obsolete comment.
* typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
2000-03-14 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h: Tweak documentation.
* class.c (build_vbase_pointer_fields): Layout the fields, too.
(avoid_overlap): Remove.
(get_binfo_offset_as_int): New function.
(dfs_serach_base_offsets): Likewise.
(layout_nonempty_base_or_field): Likewise.
(build_base_field): Layout fields here. Avoid placing two objects
of the same type at the same address, under the new ABI.
(build_base_fields): Adjust accordingly.
(create_vtable_ptr): Return the new field, but don't attach it to
TYPE_FIELDS.
(remove_base_field): Remove.
(remove_base_fields): Remove.
(layout_basetypes): Adjust accordingly.
(layout_class_type): Call layout_field for each field, rather than
just making a wholesale call to layout_type.
2000-03-14 Jeff Sturm <jsturm@sigma6.com>
* except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
2000-03-13 Jason Merrill <jason@casey.cygnus.com>
* decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
* except.c (dtor_nothrow): New fn.
(do_pop_exception): Use it. Take type parm.
(push_eh_cleanup): Take type parm.
(expand_start_catch_block): Pass it.
(build_eh_type_type_ref): Accept null type.
2000-03-12 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (revert_static_member_fn): Change prototype.
* decl.c (grokfndecl): Adjust call to revert_static_member_fn.
(grok_op_properties): Likewise.
(start_function): Likewise.
(revert_static_member_fn): Simplify.
* pt.c (check_explicit_specialization): Adjust call to
revert_static_member_fn.
2000-03-11 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (scope_kind): New type.
(tmpl_spec_kind): Likewise.
(declare_pseudo_global_level): Remove.
(pseudo_global_level_p): Rename to template_parm_scope_p.
(pushlevel): Remove declaration.
(begin_scope): New function.
(finish_scope): Likewise.
(current_tmpl_spec_kind): Likewise.
* decl.c (struct binding_level): Shorten parm_flag to 2 bits.
Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
Add template_spec_p.
(toplevel_bindings_p): Adjust.
(declare_pseudo_global_level): Remove.
(pseudo_global_level_p): Rename to template_parm_scope_p.
(current_tmpl_spec_kind): New function.
(begin_scope): Likewise.
(finish_scope): Likewise.
(maybe_push_to_top_level): Adjust.
(maybe_process_template_type_declaration): Likewise.
(pushtag): Likewise.
(pushdecl_nonclass_level): Likewise.
(lookup_tag): Likewise.
(grokfndecl): Handle member template specializations. Share
constructor and non-constructor code.
* decl2.c (check_classfn): Handle member template specializations.
* pt.c (begin_template_parm_list): Use begin_scope.
(begin_specialization): Likewise.
(end_specialization): Likewise.
(check_explicit_specialization): Use current_tmpl_spec_kind.
Handle member template specializations.
(end_template_decl): Use finish_scope. Remove call to
get_pending_sizes.
(push_template_decl_real): Remove bogus error message.
(tsubst_decl): Fix typo in code contained in comment.
(instantiate_template): Handle member template specializations.
(most_general_template): Likewise.
2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
* lex.c (whitespace_cr): Compress consecutive calls to warning().
(do_identifier): Ditto for error().
* pt.c (convert_nontype_argument): Ditto for cp_error().
(convert_template_argument): Ditto for cp_pedwarn().
2000-03-11 Jason Merrill <jason@casey.cygnus.com>
* exception.cc (__check_null_eh_spec): New fn.
* except.c (expand_end_eh_spec): Call it if the spec is throw().
2000-03-10 Jason Merrill <jason@casey.cygnus.com>
* decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
* except.c (expand_end_eh_spec): Add the return type.
* rtti.c (throw_bad_cast): Add the parmtypes.
(throw_bad_typeid): Likewise.
* semantics.c (expand_stmt): Only leave out rtl for unused
artificials, and set DECL_IGNORED_P on them as well.
* decl.c (wrapup_globals_for_namespace): Likewise.
2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (maybe_commonize_var): Skip all artificial decls.
* pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
2000-03-10 Jason Merrill <jason@casey.cygnus.com>
* lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
* cp-tree.h: Declare flag_enforce_eh_specs.
* decl.c (store_parm_decls, finish_function): Check it.
C library functions don't throw.
* Makefile.in (cfns.h): New target.
(except.o): Depend on it.
* Make-lang.in (cc1plus): Depend on cfns.gperf.
* cfns.gperf: New file.
* cfns.h: Generated.
* except.c: Include it.
(nothrow_libfn_p): New fn.
* decl.c (grokfndecl): Use it.
* cp-tree.h: Declare it.
* decl.c (push_overloaded_decl_1, auto_function,
define_function): Lose.
(build_library_fn_1): New static fn.
(builtin_function): Use it.
(get_atexit_node): Use build_library_fn_ptr.
(build_library_fn, build_cp_library_fn, build_library_fn_ptr,
build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
push_void_library_fn, push_throw_library_fn): New fns.
* cp-tree.h: Declare them.
(cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
(throw_bad_cast_node, throw_bad_typeid_node): Lose.
* except.c (init_exception_processing, call_eh_info, do_pop_exception,
(expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
* rtti.c (build_runtime_decl): Lose.
(throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
build_dynamic_cast_1, expand_si_desc, expand_class_desc,
expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
* call.c (build_call): Remove result_type parm.
Call mark_used on unused artificial fns.
* init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
2000-03-09 Jason Merrill <jason@casey.cygnus.com>
* call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
appropriate.
* decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
* except.c (call_eh_info, alloc_eh_object, expand_throw): Set
TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
* rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
expand_generic_desc): Likewise.
2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
* exception.cc (__cp_pop_exception): Cleanup the original object.
2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (grok_op_properties): Merge conversion to void warning
with other silly op warnings.
2000-03-08 Jason Merrill <jason@casey.cygnus.com>
* typeck2.c (process_init_constructor): Set TREE_PURPOSE of
array CONSTRUCTOR elements. Don't use expr_tree_cons.
2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (cp_make_fname_decl): New function.
(wrapup_globals_for_namespace): Don't emit unused static vars.
(init_decl_processing): Remove comment about use of
array_domain_type. Set make_fname_decl.
(cp_finish_decl): Remove __FUNCTION__ nadgering.
* semantics.c (begin_compound_stmt): Remove
current_function_name_declared flagging.
(expand_stmt): Don't emit unused local statics.
* typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
specially.
2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
* typeck.c (convert_for_assignment): Don't look at array
initializer.
* call.c (convert_like_real): Likewise.
2000-03-07 Jason Merrill <jason@casey.cygnus.com>
Add initial support for '\uNNNN' specifier.
* lex.c (read_ucs): New fn.
(readescape, skip_white_space): Call it.
(is_extended_char, is_extended_char_1): New fns.
(utf8_extend_token): New fn, #if 0'd out.
(real_yylex): Treat extended chars like letters.
* search.c (note_debug_info_needed): Walk the bases even if we
weren't deferring the type itself.
2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* decl2.c (finish_objects): Constify a char*.
* method.c (emit_thunk): Likewise.
2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
* typeck.c (dubious_conversion_warnings): Look through
REFERENCE_TYPE.
2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* class.c (dfs_modify_vtables): I is now unsigned.
(check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
(build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
* error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
* init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
* method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
* typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
Call integer_all_onesp.
* typeck2.c (process_init_constructor): Use compare_tree_int.
* lang-specs.h (as): Don't call if -syntax-only.
2000-03-06 Mark Mitchell <mark@codesourcery.com>
* expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
RTL_EXPR_HAS_NO_SCOPE after all.
2000-03-05 Mark Mitchell <mark@codesourcery.com>
* expr.c (cplus_expand_expr, case STMT_EXPR): Use
expand_start_stmt_expr and expand_end_stmt_expr directly. Set
RTL_EXPR_HAS_NO_SCOPE.
* pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
later.
* dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
* call.c (convert_like): Macrofy.
(convert_like_with_context): New macro.
(convert_like_real): Renamed from convert_like. Add calling
context parameters, for diagnostics. Add recursive flag. Call
dubious_conversion_warnings for outer conversion.
(build_user_type_conversion): Use convert_like_with_context.
(build_over_call): Likewise. Don't warn about dubious
conversions here. Adjust convert_default_arg calls.
(convert_default_arg): Add context parameters for diagnostics.
Pass through to convert_like_with_context.
* cp-tree.h (convert_default_arg): Add context parameters.
(dubious_conversion_warnings): Prototype new function.
* typeck.c (convert_arguments): Adjust convert_default_arg call.
(dubious_conversion_warnings): New function, broken
out of convert_for_assignment.
(convert_for_assignment): Adjust.
2000-03-03 Jason Merrill <jason@casey.cygnus.com>
* decl2.c (key_method): Break out from...
(import_export_vtable, import_export_class): ...here.
* decl.c (finish_function): Don't mess with flag_keep_inline_functions.
* decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
* search.c (note_debug_info_needed, dfs_debug_mark,
dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
* decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
typos.
2000-03-02 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
(TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
(TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
(lang_type): Split gets_new into has_new and has_array_new.
(TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
(TYPE_GETS_NEW): Split into ...
(TYPE_HAS_NEW_OPERATOR): ... this, and ...
(TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
(DECL_ARRAY_DELETE_OPERATOR_P): New macro
(build_op_new_call): Don't declare.
(build_new_1): Likewise.
* call.c (build_op_new_call): Remove.
* class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
instead of TYPE_NEEDS_DESTRUCTOR.
(finish_struct_bits): Likewise.
(add_implicitly_declared_members): Likewise.
(check_field_decl): Likewise.
(check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
correctly under the new ABI.
* decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
instead of TYPE_NEEDS_DESTRUCTOR.
(initialize_local_var): Likewise.
(destroy_local_var): Likewise.
(cp_finish_decl): Likewise.
(register_dtor_fn): Likewise.
(grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
TYPE_VEC_DELETE_TAKES_SIZE here.
(xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
(store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
(finish_destructor_body): Likewise.
(maybe_build_cleanup_1): Likewise.
* decl2.c (do_static_destruction): Likewise.
* init.c (build_new_1): Make it static.
(perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
(expand_cleanup_for_base): Likewise.
(get_cookie_size): New function.
(build_new_1): Handle array-new cookies correctly under the new
ABI.
(build_vec_delete_1): Likewise.
(build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
(build_delete): Likewise.
(build_vec_delete): Handle array-new cookies correctly under the new
ABI.
* lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
* pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
TYPE_HAS_ARRAY_NEW_OPERATOR.
* ptree.c (print_lang_type): Check them.
* search.c (context_for_name_lookup): Fix typo in comment.
(tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
* tree.c (break_out_cleanups): Likewise.
(build_cplus_array_test_1): Likewise.
(cp_build_qualified_type_real): Likewise.
* typeck.c (complete_type): Likewise.
* g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
the command-line, not the end.
2000-03-01 Jason Merrill <jason@casey.cygnus.com>
* pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
2000-03-02 Tom Tromey <tromey@cygnus.com>
* cp-tree.h (build_java_class_ref): Declare.
* init.c (build_java_class_ref): No longer static.
* except.c (expand_throw): Generate a Java-style `throw' if the
thrown object is a "Java" object.
(initialize_handler_parm): Generate a Java-style lookup of
exception info if the caught object is a "Java" object.
(catch_language, catch_language_init): New globals.
(decl_is_java_type): New function.
(expand_start_catch_block): Don't call push_eh_info() or
push_eh_cleanup() when handling a Java-style "catch". Pass Java
class reference to build_catch_block.
2000-03-02 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* typeck.c (comptypes): Treat sizetype like its language equivalent.
2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
* typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
to merge reference/pointer code and fix incorrect warnings.
2000-02-29 Jason Merrill <jason@casey.cygnus.com>
* search.c (protected_accessible_p): Use context_for_name_lookup.
* init.c (construct_virtual_bases): Fix thinko.
* typeck.c (expand_ptrmemfunc_cst): Fix thinko.
2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
* decl.c (current_function_decl): Move to toplev.c.
2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (fn_type_unification): Unify return type, whenever
provided.
(get_bindings_real): Only pass return type when necessary.
Remove explicit return type check.
* class.c (resolve_address_of_overloaded_function): Pass desired
return type to fn_type_unification.
2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
DECL_FIELD_SIZE.
(check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
DECL_FIELD_SIZE.
* rtti.c (expand_class_desc): Likewise.
* cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
(THUNK_VCALL_OFFSET): Likewise.
(THUNK_DELTA): Reflect changes in ../tree.h.
2000-02-28 Jason Merrill <jason@casey.cygnus.com>
* search.c (protected_accessible_p): Also allow the access if
the member is public in DERIVED. Lose TYPE parm.
(friend_accessible_p): Lose TYPE parm.
(accessible_p): Adjust.
2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
on things that are not sizes; ssize_binop deleted.
Call size_diffop when appropriate.
(dfs_build_vcall_offset_vtbl_entries): Likewise.
(build_primary_vtable, build_secondary_vtable): Likewise.
(dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
Variable I is HOST_WIDE_INT.
(get_vfield_offset): Pass proper types to size_binop.
(size_extra_vtbl_entries, layout_virtual_bases): Likewise.
(finish_struct_1): Likewise.
(skip_rtti_stuff): Arg N is now pointer to signed.
(layout_class_type): Use size_zero_node.
* cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
* cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
* decl.c (complete_arry_type): Pass proper types to size_binop.
(xref_basetypes): BINFO_OFFSET is sizetype.
* error.c (dump_expr): Don't use size_binop non-sizes.
* expr.c (cplus_expand_constant): Pass proper types to size_binop.
* init.c (construct_virtual_bases): Fix type error.
(build_vec_delete_1): Pass proper type to size_binop and don't
fold result.
* lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
* rtti.c (get_base_offset): Pass proper type to size_binop.
* search.c (dfs_find_vbases): Fix type error.
(expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
(dfs_get_vbase_types): BINFO_OFFSET is sizetype.
* tree.c (debug_binfo): Variable N is signed.
Use HOST_WIDE_INT_PRINT_DEC.
* typeck.c (comptypes): sizetype is same as equivalent integer type.
(c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
size_one_node and size_zero_node.
(c_alignof): Use size_one_node.
(build_component_addr): Pass proper types to size_binop.
(expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
2000-02-26 Jason Merrill <jason@casey.cygnus.com>
Implement class scope using-declarations for functions.
* class.c (handle_using_decl): Call add_method for used functions.
Use IDENTIFIER_CLASS_VALUE to check for conflicts.
(add_method): Used functions are hidden by local functions.
(check_bases_and_members): Handle using-decls before finalizing
CLASSTYPE_METHOD_VEC.
* call.c (add_function_candidate): Add ctype parm; if nonzero,
override the type of 'this' accordingly.
(add_template_candidate, add_template_candidate_real): Add ctype parm.
(convert_class_to_reference, build_user_type_conversion_1,
build_new_function_call, build_object_call, build_new_op,
build_new_method_call): Pass ctype parm.
* search.c (lookup_member): Put rval_binfo, not basetype_path, in
the baselink.
* call.c (convert_class_to_reference, build_user_type_conversion_1,
build_new_function_call, build_object_call, build_new_op,
build_new_method_call, build_op_delete_call): Don't get basetype_path
from a baselink.
* typeck.c (build_component_ref): Likewise.
* init.c (build_offset_ref): Likewise.
(resolve_offset_ref): Don't call enforce_access.
Call build_scoped_ref.
* typeck2.c (build_scoped_ref): Simplify. Do nothing if it
would cause an error or if -pedantic.
* class.c (alter_access): Lose binfo parm.
2000-02-26 Mark Mitchell <mark@codesourcery.com>
* semantics.c (simplify_aggr_init_exprs_p): Don't walk into
types.
2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
* rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
pseudo_type_info creation into the std namespace
2000-02-26 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
(import_export_class): Remove declaration.
* decl2.c (import_export_class): Make it static.
* dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
EXPR_WITH_FILE_LOCATION.
* lex.c (check_newline): Tweak filename/lineno setting.
* semantics.c (begin_while_stmt): Fix typo in comment.
2000-02-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* lang-options.h (-fmessage-length=): Add missing option.
* Make-lang.in (CXX_SRCS): Add .h files and sort list.
2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
* Make-lang.in: Delete refs to LIBGCC2_DEPS.
2000-02-25 Jim Wilson <wilson@cygnus.com>
* optimize.c (expand_call_inline): Emit the return label before
evaluating the return value.
2000-02-24 Mark Mitchell <mark@codesourcery.com>
* lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
than duplicating functionality here.
* optimize.c: Include input.h.
(expand_call_inline): Use push_srcloc and pop_srcloc.
* parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
* parse.c: Regenerated.
* Makefile.in (lex.o): Depend on input.h.
(optimize.o): Likewise.
2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (grokdeclarator): Diagnose qualifiers on non-member
function type, rather than ICE.
2000-02-23 Jason Merrill <jason@casey.cygnus.com>
* decl.c (grokdeclarator): Call decl_type_access_control.
* parse.y (parse_end_decl): Don't call decl_type_access_control if
decl is null.
2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (decls_match): Remove obsolete static member nadgering.
2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
* decl.c (grokdeclarator): Change ANSI to ISO.
* lex.c (consume_string, readescape, do_identifier): Likewise.
(parse_float, real_yylex): Likewise.
* parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
(unary_expr, new_initializer, cast_expr, primary, primary_no_id,
new_type_id, maybe_label_decls, simple_stmt,
for.init.statement): Likewise.
* pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
* semantics.c (finish_named_return_value): Likewise.
* parse.c: Regenerate.
2000-02-21 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
(CPTI_CLASS_STAR_TYPE): Remove.
(vtable_index_type): Likewise.
(class_star_type_node): Remove.
(TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
(build_binary_op_nodefault): Remove.
* call.c (build_new_op): Use build_binary_op instead of
build_binary_op_nodefault.
* decl.c (init_decl_processing): Remove class_star_type_node
initialization. Make delta_type_node ptrdiff_type_node under the
new ABI. Initialize vtable_index_type.
(build_ptrmemfunc_type): Build different structures for the new
ABI.
(build_enumerator): Use build_binary_op instead of
build_binary_op_nodefault.
* method.c (build_overload_value): Mangle pointers-to-members
appropriately under the new ABI.
* typeck.c (build_array_ref): Use build_binary_op instead of
build_binary_op_nodefault.
(get_member_function_from_ptrfunc): Adjust for the new ABI.
(build_binary_op_nodefault): Rename to ...
(build_binary_op): ... this. Remove old version. Adjust for
pointer-to-member comparisons under the new ABI.
(build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
(build_ptrmemfunc): Adjust for the new ABI.
(expand_ptrmemfunc_cst): Likewise.
(delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
(pfn_from_ptrmemfunc): Adjust for the new ABI.
2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
* call.c (build_object_call): Compress consecutive calls to
cp_error.
(build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
(build_op_delete_call): Adjust message formatting.
* class.c (check_bases): Compress consecutive calls to
cp_pedwarn.
(finish_struct_anon): Say 'ISO C++'.
* decl.c (start_decl): Same here.
(grok_reference_init): Likewise.
(grokfndecl): Correct message formatting.
(grokfndecl): Improve diagnostic.
(check_static_variable_definition): Likewise. Say 'ISO C++'
(compute_array_index_type): Say 'ISO C++'
(create_array_type_for_decl): Compress consecutive calls to
cp_error.
(grokdeclarator): Say 'ISO C++'
(grok_op_properties): Likewise.
* decl2.c (delete_sanity): Clairify diagnostic.
(check_member_template): Same here.
(grok_function_init): Use consistent terminology.
* expr.c (do_case): Say 'ISO C++'
* friend.c (do_friend): Compress consecutive calls to warning.
2000-02-20 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
* class.c (build_secondary_vtable): Reorganize. Don't create a
new vtable under the new ABI.
(layout_vtable_decl): Don't add num_extra_vtbl_entries when
computing the size.
(build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
the initializing elements.
(initialize_vtable): New function.
(dfs_finish_vtbls): Use it.
(dfs_accumulate_vtbl_inits): New function.
(finish_vtbls): Merge primary and secondary vtables under the new
ABI.
(finish_struct_1): Remove redundant call to layout_vtable_decl.
* init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
aren't VAR_DECLs.
* class.c (build_vtable): New function, split out from ...
(get_vtable_decl): ... here, and ...
(build_secondary_vtable): ... here.
* pt.c (tsubst_decl): Fix formatting.
2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* class.c (build_primary_vtable, layout_vtable_decl): Likewise.
(avoid_overlap, build_base_field): Likewise.
(build_base_field, build_base_fields, is_empty_class):
Test DECL_SIZE with integer_zero.
(layout_class_type): Set CLASSTYPE_SIZE_UNIT.
* cp-tree.h (struct lang_type): New field size_unit.
(CLASSTYPE_SIZE_UNIT): New macro.
* decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
(cp_finish_decl): Delete -Wlarger-than processing.
* optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
* pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
* tree.c (make_binfo): binfo vector is one entry longer.
(walk_tree): Walk DECL_SIZE_UNIT.
2000-02-19 Mark Mitchell <mark@codesourcery.com>
* class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
comment.
(build_vtable_entry): Don't assume all vtable entries are
functions.
(build_vtbl_initializer): Adjust accordingly.
(get_vtable_decl): Fix formatting.
2000-02-18 Jason Merrill <jason@casey.cygnus.com>
* semantics.c (deferred_type_access_control): Walk the entire
type_lookups list.
(save_type_access_control): Rename from
initial_deferred_type_access_control. Just remember the value.
(decl_type_access_control): New fn.
(begin_function_definition): Use deferred_type_access_control, after
we've started the function. Set type_lookups to error_mark_node.
* parse.y (frob_specs, fn.def1): Adjust.
(parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
(parse_end_decl, parse_bitfield0, parse_method): New fns.
(fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
(after_type_component_declarator0): Likewise.
(after_type_component_declarator): Likewise.
(notype_component_declarator): Likewise.
* cp-tree.h: Adjust.
* decl.c (redeclaration_error_message): Allow redeclaration of
namespace-scope decls.
2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
* typeck2.c (my_friendly_abort): Use GCCBUGURL.
2000-02-17 Mark Mitchell <mark@codesourcery.com>
* class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
* decl2.c (grokclassfn): Likewise.
* ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
* decl2.c (lang_decode_option): Don't set default message length
here.
* lex.c (lang_init_options): Set it here.
2000-02-16 Mark Mitchell <mark@codesourcery.com>
Make DECL_CONTEXT mean the class in which a member function was
declared, even for a virtual function.
* cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
(DECL_FRIEND_CONTEXT): New macro.
(DECL_REAL_CONTEXT): Remove.
(SET_DECL_FRIEND_CONTEXT): Likewise.
(DECL_VIRTUAL_CONTEXT): Adjust.
(DECL_CLASS_SCOPE_P): Use TYPE_P.
(add_friends): Remove.
(hack_decl_function_context): Likewise.
* call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
CP_DECL_CONTEXT.
(build_over_call): Fix indentation. Use DECL_CONTEXT
instead of DECL_CLASS_CONTEXT.
* class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
(add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
(strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
(build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
(build_base_field): Likewise.
(finish_struct_1): Likewise.
(build_self_reference): Likewise.
* decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
DECL_REAL_CONTEXT.
(pushtag): Use decl_function_context, not
hack_decl_function_context.
(decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
(duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
(pushdecl): Remove bogus code.
(start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
(cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
(grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
Use decl_function_context, nothack_decl_function_context.
(grokvardecl): Don't set DECL_CLASS_CONTEXT.
(grokdeclarator): Likewise. Use decl_function_context, not
hack_decl_function_context.
(copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
(start_function): Use DECL_FRIEND_CONTEXT, not
DECL_CLASS_CONTEXT. Use decl_function_context, not
hack_decl_function_context.
(finish_function): Use decl_function_context, not
hack_decl_function_context.
(maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
DECL_CLASS_CONTEXT.
(grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
(finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
(grokfield): Likewise.
(finish_builtin_type): Likewise.
(finish_vtable_vardec): Use decl_function_context, not
hack_decl_function_context.
(import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
(start_static_initialization_or_destruction): Likewise.
(finish_static_initialization_or_destruction): Likewise.
(mark_used): Adjust logic for deciding when to synthesize methods.
* dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
DECL_REAL_CONTEXT.
* error.c (dump_function_decl): Use DECL_CONTEXT, not
DECL_CLASS_CONTEXT.
* friend.c (is_friend): Likewise.
(add_friends): Remove.
(do_friend): Use SET_DECL_FRIEND_CONTEXT.
* lex.c (begin_definition_of_inclass_inline): Use
decl_function_context, not hack_decl_function_context.
(process_next_inline): Likewise.
(do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
* method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
DECL_CLASSS_CONTEXT.
(hack_identifier): Likewise.
(synthesize_method): Use decl_function_context, not
hack_decl_function_context.
* pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
DECL_REAL_CONTEXT.
(is_member_template): Use decl_function_context, not
hack_decl_function_context. Use DECL_CONTEXT, not
DECL_CLASS_CONTEXT.
(build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
DECL_CLASS_CONTEXT.
(check_default_tmpl_args): Use CP_DECL_CONTEXT, not
DECL_REAL_CONTEXT.
(push_template_decl_real): Likewise.
(instantiate_class_template): Don't call add_friends.
(tsubst_default_argument): Use DECL_CONTEXT, not
DECL_REAL_CONTEXT.
(tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
(set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
DECL_CLASS_CONTEXT.
* repo.c (repo_inline_used): Likewise.
* search.c (current_scope): Adjust for new _CONTEXT macros.
(context_for_name_lookup): Use CP_DECL_CONTEXT, not
DECL_REAL_CONTEXT.
(friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
(lookup_fnfields_here):Likewise.
(check_final_overrider): Likewise.
(init_vbase_pointers): Likewise.
(virtual_context): Likewise.
* semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
(expand_body): Use decl_function_context, not
hack_decl_function_context.
* tree.c (hack_decl_function_context): Remove.
* typeck.c (build_x_function_call): Use DECL_CONTEXT, not
DECL_CLASS_CONTEXT.
* typeck2.c (error_not_base_type): Likewise.
2000-02-15 Jason Merrill <jason@casey.cygnus.com>
* decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
* lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
* decl2.c (lang_decode_option): Enable automatic line wrapping.
2000-02-13 Jason Merrill <jason@casey.cygnus.com>
* parse.y (frob_specs): Split out...
(parse_decl): From here.
(fn.def2): Call initial_deferred_type_access_control.
(after_type_component_declarator0): Call frob_specs.
(notype_component_declarator0): Likewise.
* search.c (friend_accessible_p): Nested classes are friends of their
enclosing classes.
2000-02-10 Mark Mitchell <mark@codesourcery.com>
* ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
used to create an implicit temporary.
* class.c (dfs_modify_vtables): Tweak calculation of functions to
override.
2000-02-08 Nathan Sidwell <nathan@acm.org>
* typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
strip array element qualifiers too.
2000-02-07 Mark Mitchell <mark@codesourcery.com>
* decl.c (store_parm_decls): Don't build cleanups for parameters
while processing_template_decl.
2000-02-07 Jason Merrill <jason@casey.cygnus.com>
* cp-tree.h (struct saved_scope): Add incomplete field.
(namespace_scope_incomplete): New macro.
* decl.c (pushdecl): Use it.
(hack_incomplete_structures): Use it. See through artificial
binding levels.
(mark_saved_scope): Mark it.
Implement access control for nested types.
* search.c (type_access_control): New fn.
(accessible_p): Now we do perform access control for types.
* semantics.c (deferred_type_access_control): New fn.
(initial_deferred_type_access_control): New fn.
(begin_function_definition): Call it. Add lookups parm.
* decl.c (struct binding_level): Add this_class field.
(pushlevel_class): Set it.
(mark_binding_level): Mark it.
(lookup_name_real): Use it. Call type_access_control.
(mark_saved_scope): Mark lookups field.
* cp-tree.h (flagged_type_tree): Add lookups field.
(struct saved_scope): Add lookups field.
(type_lookups): New macro.
* parse.y (declmods): Now <ftype>.
(parse_decl): Add lookups parm. Call
initial_deferred_type_access_control.
(lang_extdef): Clear type_lookups.
(typed_declspecs, declmods, typespec): Set lookups field.
(initdcl): Call deferred_type_access_control.
(fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
component_decl_1, named_parm): Adjust.
* friend.c (is_friend): Nested classes are friends of their
enclosing classes.
* class.c (currently_open_derived_class): New fn.
* method.c (hack_identifier): Use it.
* lex.c (do_identifier): Remove obsolete code.
* parse.y (typed_typespecs): Propagate new_type_flag properly.
2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
* tinfo.h: Remove apostrophes from C++ comment (xgettext
thinks this file is plain C).
2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (call.o): Depend on $(EXPR_H).
* call.c: Include "expr.h".
* class.c (dump_class_hierarchy): Add prototype.
* search.c (dfs_get_pure_virtuals): Likewise.
2000-02-1 Ulrich Drepper <drepper@redhat.com>
* parse.y (simple_stmt): Allow :: token in asm parameter list.
* parse.c: Rebuilt.
2000-01-31 Jim Wilson <wilson@cygnus.com>
* class.c (build_vtbl_or_vbase_field): New parameter fcontext.
Store it in DECL_FCONTEXT.
(build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
2000-01-31 Jason Merrill <jason@casey.cygnus.com>
* tinfo.h (old abi): #include "tconfig.h".
* tinfo.cc (convert_to_base): Move into old abi section.
2000-01-31 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
(CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
(BINFO_PRIMARY_BINFO): New macro.
(BF_DELTA): Rename to ...
(BV_DELTA): ... this.
(BF_VCALL_INDEX): Rename to ...
(BV_VCALL_INDEX): ... this.
(BF_FN): Rename to ...
(BV_FN): ... this.
* class.c (build_vbase_path): Adjust for changes to reverse_path.
(set_rtti_entry): Rename BF_ macros to BV_ variants.
(modify_vtable_entry): Simplify.
(add_virtual_function): Rename BF_ macros to BV_ variants.
(build_vtable_initializer): Likewise.
(get_class_offset_1): Remove.
(dfs_get_class_offset): Likewise.
(get_class_offset): Likewise.
(dfs_find_final_overrider): New function.
(find_final_overrider): Likewise.
(modify_one_vtable): Remove.
(dfs_find_base): New function.
(dfs_modify_vtables): Fold modify_one_vtable in here. Use
find_final_overrider.
(modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
virtuals.
(dfs_fixup_vtable_deltas): Remove.
(override_one_vtable): Remove.
(merge_overrides): Likewise.
(layout_virtual_bases): Make sure BINFO_OFFSET is set right for
unreal chilren of virtual bases.
(finish_struct_1): Don't use merge_overrides. Don't use
dfs_fixup_vtable_deltas.
* tree.c (reverse_path): Return a TREE_LIST, not a chain of
BINFOs.
2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
Jason Merrill <jason@yorick.cygnus.com>
* tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
* exception.cc (__throw_bad_typeid): Add missing std::.
2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* cp-tree.h (make_thunk): PROTO -> PARAMS.
2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
* cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
Runtime support for new-abi rtti.
* inc/typeinfo (type_info::operator!=): Define in class.
(type_info::before, type_info::name, type_info::operator==,
type_info::operator!=): Define new ABI implementations.
(type_info::is_pointer_p, type_info::is_function_p): Declare
new virtual functions.
(type_info::do_catch, type_info::do_upcast): Likewise.
* tinfo.h (__base_class_info): Define new class.
(__class_type_info): Likewise.
(__si_class_type_info): Likewise.
(__vmi_class_type_info): Likewise.
(__dynamic_cast): Prototype.
* tinfo.cc: Conditionalize old and new rtti mechanisms.
(type_info::is_pointer_p): Define new function.
(type_info::is_function_p): Likewise.
(type_info::do_catch): Likewise.
(type_info::do_upcast): Likewise.
(vtable_prefix): New structure for vtable access.
(adjust_pointer): Define new template function.
(contained_p, public_p, virtual_p, contained_public_p,
contained_nonpublic_p, contained_nonvirtual_p): Define new
functions.
(nonvirtual_base_type): New local variable.
(__class_type_info::~__class_type_info): Define.
(__si_class_type_info::~__si_class_type_info): Likewise.
(__vmi_class_type_info::~__vmi_class_type_info): Likewise.
(__class_type_info::do_catch): Define new function.
(__class_type_info::do_upcast): Likewise.
(__class_type_info::find_public_src): Likewise.
(__class_type_info::do_find_public_src): Likewise.
(__si_class_type_info::do_find_public_src): Likewise.
(__vmi_class_type_info::do_find_public_src): Likewise.
(__class_type_info::do_dyncast): Likewise.
(__si_class_type_info::do_dyncast): Likewise.
(__vmi_class_type_info::do_dyncast): Likewise.
(__class_type_info::do_upcast): Likewise.
(__si_class_type_info::do_upcast): Likewise.
(__vmi_class_type_info::do_upcast): Likewise.
(__dynamic_cast): Likewise.
* tinfo2.cc (__fundamental_type_info): Define new class.
(__pointer_type_info): Likewise.
(__reference_type_info): Likewise.
(__array_type_info): Likewise.
(__function_type_info): Likewise.
(__enum_type_info): Likewise.
(__ptr_to_member_type_info): Likewise.
(__fundamental_type_info::~__fundamental_type_info): Define.
(__pointer_type_info::~__pointer_type_info): Likewise.
(__reference_type_info::~__reference_type_info): Likewise.
(__array_type_info::~__array_type_info): Likewise.
(__function_type_info::~__function_type_info): Likewise.
(__enum_type_info::~__enum_type_info): Likewise.
(__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
(__pointer_type_info::do_catch): Define new function.
(__ptr_to_member_type_info::do_catch): Define new function.
(__throw_type_match_rtti_2): Use new ABI interface, if enabled.
(__is_pointer): Likewise.
* exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
2000-01-30 Mark Mitchell <mark@codesourcery.com>
* cp/class.c (build_vtable): Rename to build_primary_vtable.
(prepare_fresh_vtable): Rename to build_secondary_vtable.
(make_new_vtable): New function.
(modify_vtable_entry): Handle generation of new vtables correctly.
(modify_one_vtable): Remove unused parameter.
(dfs_fixup_vtable_deltas): Likewise.
(override_one_vtable): Use build_secondary_vtable.
(finish_struct_1): Use build_primary_vtable and
build_secondary_vtable.
2000-01-28 Ulrich Drepper <drepper@redhat.com>
* cp/decl.c: Adjust variable names, comments, help strings.
2000-01-29 Nathan Sidwell <nathan@acm.org>
* new2.cc (operator delete[]): Use operator delete, don't assume
implementation.
2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
* class.c (build_vtbl_initializer): Add argument to
build_vtable_entry call.
2000-01-27 Mark Mitchell <mark@codesourcery.com>
* cp-tree.def (THUNK_DECL): Discuss vcall indices.
* cp-tree.h (BINFO_VIRTUALS): Update documentation.
(BF_DELTA): New macro.
(BF_VCALL_INDEX): Likewise.
(BF_FN): Likewise.
(THUNK_VCALL_OFFSET): Likewise.
(make_thunk): Change prototype.
* class.c (build_vtable_entry): Integrate
build_vtable_entry_for_fn. Handle vcall indices.
(build_vtable_entry_for_fn): Remove.
(set_rtti_entry): Handle vcall indices. Use BF_DELTA,
BF_VCALL_INDEX, BF_FN.
(modify_vtable_entry): Integrate common code from
modify_one_vtable and dfs_fixup_vtable_deltas.
(add_virtual_function): Set BF_VCALL_INDEX.
(build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
and BF_FN.
(modify_one_vtable): Simplify.
(dfs_fixup_vtable_deltas): Likewise.
(override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
* method.c (make_thunk): Handle vcall indices.
2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
Compiler side new abi rtti (not enabled).
* cp-tree.h (new_abi_rtti_p): New macro.
(emit_support_tinfos): Prototype new function.
(tinfo_decl_p): Likewise.
(emit_tinfo_decl): Likwise.
* rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
macros.
(doing_runtime): New local static.
(init_rtti_processing): Add new-abi initializer.
(get_tinfo_decl): Add new-abi logic.
(tinfo_from_decl): Likewise.
(build_dynamic_cast_1): Likewise.
(qualifier_flags): New static function.
(tinfo_base_init): Likewise.
(generic_initializer): Likewise.
(ptr_ref_initializer): Likewise.
(ptmd_initializer): Likewise.
(class_hint_flags): Likewise.
(class_initializer): Likewise.
(synthesize_tinfo_var): Likewise.
(create_real_tinfo_var): Likewise.
(create_pseudo_type_info): Likewise.
(get_vmi_pseudo_type_info): Likewise.
(create_tinfo_types): Likewise.
(emit_support_tinfos): New global function.
(tinfo_decl_p): New global predicate.
(emit_tinfo_decl): New global function.
* class.c (set_rtti_entry): Generalize for old and new rtti.
(build_vtbl_initializer): Likewise.
* decl2.c (finish_file): Likewise.
2000-01-27 Jim Wilson <wilson@cygnus.com>
* optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
2000-01-27 Mike Stump <mrs@wrs.com>
* decl.c (pushdecl): Fix up shadow warnings with respect to implicit
for scopes.
2000-01-26 Jason Merrill <jason@casey.cygnus.com>
* pt.c (unify): Use fold, not maybe_fold_nontype_arg.
2000-01-26 J"orn Rennecke <amylaar@cygnus.co.uk>
* optimize.c (calls_setjmp_r): Supply new argument
to special_function_p.
2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* call.c: PROTO -> PARAMS.
* class.c: Likewise.
* cp-tree.h: Likewise.
* cvt.c: Likewise.
* decl.c: Likewise.
* decl.h: Likewise.
* decl2.c: Likewise.
* dump.c: Likewise.
* errfn.c: Likewise.
* error.c: Likewise.
* except.c: Likewise.
* expr.c: Likewise.
* init.c: Likewise.
* input.c: Likewise.
* lex.c: Likewise.
* lex.h: Likewise.
* method.c: Likewise.
* optimize.c: Likewise.
* parse.y: Likewise.
* pt.c: Likewise.
* repo.c: Likewise.
* rtti.c: Likewise.
* search.c: Likewise.
* semantics.c: Likewise.
* spew.c: Likewise.
* tree.c: Likewise.
* typeck.c: Likewise.
* typeck2.c: Likewise.
* xref.c: Likewise.
2000-01-25 Richard Henderson <rth@cygnus.com>
* typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
2000-01-25 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (vcall_offset_in_vtable_p): New macro.
* class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
(struct vcall_offset_data_s): New type.
(dfs_vcall_offset_queue_p): New function.
(dfs_build_vcall_offset_vtbl_entries): Likewise.
(build_vcall_offset_vtbl_entries): Likewise.
(layout_vtable_decl): Likewise.
(num_vfun_entries): Likewise.
(num_extra_vtbl_entries): Add the entries for vcall offsets.
(build_vtbl_initializer): Likewise.
(dfs_finish_vtabls): Use layout_vtable_decl.
(modify_one_vtables): Always duplicate vtables under the new ABI.
(finish_struct_1): Use layout_vtable_decl.
2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* decl.c (member_function_or_else): Change third arg from a format
specifier to an `enum overload_flags'. Callers changed.
2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
* typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
build_const_cast, get_delta_difference, check_return_expr): Avoid
ANSI string concatenation usage.
2000-01-24 Mark Mitchell <mark@codesourcery.com>
* class.c (layout_class_type): Put the fields required to make a
class non-empty at the end, not the beginning, of the TYPE_FIELDs
list.
2000-01-24 Jason Merrill <jason@casey.cygnus.com>
* pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
template.
* decl2.c (mark_used): Do instantiate inlines that have been
explicitly instantiated.
2000-01-24 Richard Henderson <rth@cygnus.com>
* call.c (build_over_call): Use expand_tree_builtin.
* typeck.c (build_function_call_real): Likewise.
(build_binary_op_nodefault): Handle unordered compares.
2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
* cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
cp_tree_index values.
(throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
New global node #defines for them.
* rtti.c (call_void_fn): Replace with ...
(build_runtime_decl): ... new static function.
(throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
(throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
(build_dynamic_cast_1): Always produce correctly typed result.
Explicitly produce type_info addresses. Use dynamic_cast_node.
* exception.cc (__throw_bad_cast): Return `void *'.
(__throw_bad_typeid): Return `const type_info &'.
2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
* cp-tree.h (get_vtable_decl): Prototype new function.
* class.c (get_vtable_decl): New function. Broken out from ...
(build_vtable): ... here. Use it.
* decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
by get_vtable_decl.
2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
* cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
(CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
(CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
(CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
(CPTI_TINFO_VAR_ID): New enumeration.
(__tp_desc_type_node, __access_mode_type_node,
__bltn_desc_type_node, __user_desc_type_node,
__class_desc_type_node, __ptr_desc_type_node,
__attr_desc_type_node, __func_desc_type_node,
__ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
(ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
enum_desc_type_node, class_desc_type_node,
si_class_desc_type_node, vmi_class_desc_type_node,
ptmd_desc_type_node, base_desc_type_node): New #defines.
(tinfo_fn_id, tinfo_fn_type): Rename to ...
(tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
(tinfo_var_id): New enumeration.
(DECL_TINFO_FN_P): Augment comment.
* decl.c (cp_global_trees): Adjust documentation.
* rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
tinfo_decl_type and tinfo_var_id.
(get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
(build_typeid): Remove unused variable.
(get_tinfo_var): Use tinfo_var_id.
(tinfo_name): New static function.
(get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
(tinfo_from_decl): Likewise.
(get_base_offset): New static function, broken out of
expand_class_desc.
(expand_si_desc): Use tinfo_name.
(expand_class_desc): Likewise. Lose local static variable.
Use base_desc_type_node. Use get_base_offset.
(expand_ptr_desc): Use tinfo_name.
(expand_attr_desc): Likewise.
(expand_generic_desc): Likewise.
* tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
* tinfo.h (__GXX_ABI_VERSION): Test value and existence.
2000-01-23 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (__eprintf): Remove declaration.
* tree.c (__eprintf): Remove definition.
2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
2000-01-23 Brad Lucier <lucier@math.purdue.edu>
* class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
2000-01-23 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (register_dtor_fn): New function.
* decl.c (destroy_local_static): Rename to ...
(register_dtor_fn): ... this. Give it external linkage.
(expand_static_init): Use it.
* decl2.c (do_static_initialization): Likewise, if using
__cxa_atexit.
(do_static_destruction): Check that __cxa_atexit is not in use.
(finish_file): Don't call do_static_destruction if using
__cxa_atexit.
* typeck.c (convert_arguments): Restore two-message error
reporting.
2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
Remap dynamic cast hint values to be consistent across ABIs.
* search.c (dynamic_cast_base_recurse): Remap generated value.
(get_dynamic_cast_base_type): Adjust documentation.
* tinfo.h (__user_type_info::dyncast): Likewise.
(__user_type_info::find_public_subobj): Remap BOFF meaning.
* tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
(__class_type_info::do_dyncast): Likewise.
(__class_type_info::do_find_public_subobj): Likewise.
* tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
* typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
* typeck2.c (incomplete_type_error): Restore previous
cp_error and cp_error_at call sequence.
2000-01-20 Brad Lucier <lucier@math.purdue.edu>
* class.c (dump_class_hierarchy): Make format agree with argument;
cast pointer to unsigned long and print with %lx.
2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
* decl2.c (lang_decode_option): Set default line-wrap length to 72.
* typeck.c (composite_pointer_type, common_type,
comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
build_function_call_real, convert_arguments,
build_binary_op_nodefault, pointer_int_sum, pointer_diff,
build_unary_op, mark_addressable, build_compound_expr,
build_static_cast, build_reinterpret_cast, build_const_cast,
build_c_cast, build_modify_expr, get_delta_difference,
build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
'ISO C++'. Fusion consecutive calls to diagnostic message routines
into a single one.
* typeck2.c (readonly_error, abstract_virtuals_error,
process_init_constructor, check_for_new_type): Likewise.
2000-01-19 Mark Mitchell <mark@codesourcery.com>
* tree.c (bot_manip): Set DECL_CONTEXT for newly created
VAR_DECLs.
2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
* cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
(build_x_typeid): Likewise.
(get_tinfo_fn): Likewise.
(get_tinfo_fn_unused): Rename to ...
(get_tinfo_decl): ... here.
* rtti.c (build_headof): Replace logic error with assertion.
(get_tinfo_fn_dynamic): Rename to ...
(get_tinfo_decl_dynamic): ... here. Make static. Use
complete_type_or_else.
(build_x_typeid): Move into ...
(build_typeid): ... here. Adjust call to
get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
throw_bad_typeid expression.
(get_tinfo_fn_unused): Rename to ...
(get_tinfo_decl): ... here. Adjust comment.
(get_tinfo_fn): Delete.
(tinfo_from_decl): New static function.
(get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
(get_typeid): Use complete_type_or_else.
(build_dynamic_cast_1): Adjust calls to
get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
* parse.y (primary): Adjust call to build_typeid.
* except.c (build_eh_type_type_ref): Adjust call to
get_tinfo_decl. Mark as used.
* class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
* decl2.c (build_expr_from_tree): Adjust call to build_typeid.
* parse.c: Regenerated.
2000-01-17 Mark Mitchell <mark@codesourcery.com>
* class.c (fixed_type_or_null): Don't clear NONNULL. Document
calling convention.
(resolves_to_fixed_type_p): Document calling convention.
* rtti.c (build_x_typeid): Initialize NONNULL.
* cp-tree.h (build_shared_int_cst): New function.
* call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
* class.c (modify_vtable_entry): Likewise.
(add_virtual_function): Split out code to generated shared
INTEGER_CSTs to build_share_int_cst.
(modify_all_vtables): Handle all the overridden functions here.
Add overridden functions from non-primary virtual bases to the
primary vtable.
(finish_struct_1): Adjust call to modify_all_vtables. Add
overridden functions from non-primary bases to the vtable.
* tree.c (build_shared_int_cst): New function.
* cp-tree.h (scratchalloc): Remove.
(build_scratch_list): Likewise.
* call.c (convert_class_to_reference): Replace build_scratch_list
and build_expr_list with build_tree_list.
(add_candidate): Replace scratchalloc with expralloc. Note memory
leak.
(build_user_type_conversion_1): Replace build_scratch_list
and build_expr_list with build_tree_list.
(build_new_op): Likewise.
(build_op_delete_call): Likewise.
(convert_like): Likewise.
* cvt.c (ocp_convert): Likewise.
* decl.c (start_decl): Likewise.
(start_function): Likewise.
(finish_destructor_body): Likewise.
(maybe_build_cleanup_1): Likewise.
* decl2.c (reparse_decl_as_expr): Likewise.
* init.c (perform_member_init): Likewise.
(expand_cleanup_for_base): Likewise.
(build_builtin_delete_call): Likewise.
(build_new_1): Likewise.
(build_delete): Likewise.
* method.c (do_build_assign_ref): Likewise.
* parse.y (already_scoped_stmt): Likewise.
(nontrivial_exprlist): Likewise.
(net_initializer): Likewise.
(initlist): Likewise.
* parse.c: Regenerated.
* rtti.c (build_x_typeid): Likewise.
(build_dynamic_cast_1): Likewise.
* typeck.c (build_x_compound_expr): Likewise.
(build_static_cast): Likewise.
(build_modify_expr): Likewise.
* cp-tree.h (DECL_VINDEX): Add documentation.
* class.c (build_vtable_entry): Likewise.
(start_vtable): Add comment.
(add_virtual_function): Replace pending_hard_virtuals with
overridden_virtuals and pending_virtuals with new_virtuals.
Replace redundant assignments with assertions.
(check_for_override): Add comment.
(check_bases_and_members): Replace pending_hard_virtuals with
overridden_virtuals and pending_virtuals with new_virtuals.
(create_vtbl_ptr): Likewise.
(layout_class_type): Likewise.
(finish_struct_1): Likewise. Add comments.
2000-01-16 Mark Mitchell <mark@codesourcery.com>
* class.c (finish_struct_1): Replace redundant code with
assertions.
* cp-tree.h (flag_new_abi): Move.
(flag_use_cxa_atexit): Likewise.
(flag_honor_std): Likewise.
(flag_rtti): Likewise.
(vbase_offsets_in_vtable_p): Define.
(vptrs_present_everywhere_p): Likewise.
(TYPE_CONTAINS_VPTR_P): Likewise.
(dfs_walk_real): Declare.
* class.c (build_vbase_pointer_fields): Check
vbase_offsets_in_vtable_p.
(dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
BINFO_VPTR_FIELD.
(build_vbase_offset_vtbl_entries): Simplify.
(build_vbase_offset_vtbl_entries): Adjust.
(build_vbase_pointer): Add ability to look up vbase offsets in
vtable.
(start_vtable): New function.
(add_virtual_function): Use it.
(determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
(num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
(build_vtbl_initializer): Take the type of the complete object as
input. Use it to correctly calculate vbase offsets.
(dfs_finish_vtbls): Pass the complete type to
build_vtbl_initializer.
(check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
(create_vtable_ptr): Create a vtable even if there are no
new virtual functions, under the new ABI.
(finish_struct_1): Likewise.
(get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
* decl.c (exapnd_static_init): Remove call to
preserve_initializer.
* decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
vtables.
* init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
(expand_virtual_init): Use vbase_offsets_in_vtable_p.
(construct_virtual_bases): Don't initialize virtual base pointers
under the new ABI.
(build_aggr_init): Clean up comment.
(expand_aggr_init_1): Likewise.
* rtti.c (expand_class_desc): Store the virtual function table
index where the vbase offset lives in the offset field.
* search.c (dfs_walk_real): Make it global.
(dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
* tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
* tinfo.h (USItype): Make it signed under the new ABI.
* tinfo.cc (convert_to_base): New function. Encapsulate base
conversion logic here.
(__class_type_info::do_upcast): Use it.
(__class_type_info::do_dyncast): Likewise.
(__class_type_info::do_find_public_subobj): Likewise.
* init.c (construct_virtual_bases): Don't look up the addresses of
virtual bases at run-time.
* class.c (build_vbase_pointer): Relocate.
(build_vbase_pointer_fields): Likewise.
(dfs_build_vbase_offset_vtbl_entries): Likewise.
(build_vbase_offset_vtbl_entries): Likewise.
* decl.c (init_decl_processing): Complain if -fnew-abi
-fno-vtable-thunks is used.
* decl2.c (lang_decode_option): Don't couple flag_honor_std to
flag_new_abi.
2000-01-15 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (num_extra_vtbl_entries): New function.
(size_extra_vtbl_entries): Likewise.
(dfs_vtable_path_unmark): Likewise.
(dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
(dfs_vtable_path_marked_real_bases_queue_p): Likewise.
* class.c (num_extra_vtbl_entries): New function.
(size_extra_vtbl_entries): Likewise.
(dfs_build_vbase_offset_vtbl_entries): New function.
(build_vbase_offset_vtbl_entries): Likewise.
(build_vtbl_initializer): Use it.
(finish_struct_1): Adjust vtable sizes (using
num_extra_vtbl_entries).
* expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
THUNK_DECL is non-NULL before expanding it.
* init.c (expand_virtual_init): Adjust the vtable pointer by
size_extra_vtbl_entries before storing it.
* search.c (get_shared_vase_if_not_primary): Adjust prototype.
Handle TREE_LIST parameters here, not in the dfs_* functions.
(dfs_unmarked_real_bases_queue_p): Adjust.
(dfs_marked_real_bases_queue_p): Likewise.
(dfs_vtable_path_unmarked_real_bases_queue_p): New function.
(dfs_vtable_path_marked_real_bases_queue_p): New function.
(dfs_vtable_path_unmark): Likewise.
2000-01-14 Mark Mitchell <mark@codesourcery.com>
* optimize.c (copy_body_r): Clear the operand three of a
TARGET_EXPR when copying it.
2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
* method.c (build_decl_overload_real): Check whether we are in ::
before returning __builtin_new/delete.
2000-01-13 Mark Mitchell <mark@codesourcery.com>
* pt.c (tsubst_friend_function): Improve comment.
(instantiate_decl): Avoid crashing when a "nested" function is
instantiated from the top level.
* dump.c (dqeueue_and_dump): Dump
DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
* g++spec.c (lang_specific_driver): Add -fnew-abi if
ENABLE_NEW_GXX_ABI defined.
* Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
2000-01-12 Mark Mitchell <mark@codesourcery.com>
* decl.c (start_cleanup_fn): Call pushdecl.
* call.c (convert_class_to_reference): Fix typos.
(build_conditional_expr): Handle errors gracefully.
* class.c (push_nested_class): Likewise.
* cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
(DECL_THIS_EXTERN): Use it.
(DECL_THIS_STATIC): Likewise.
* cvt.c (convert_to_void): Handle errors gracefully.
(build_expr_type_conversion): Likewise.
* decl.c (maybe_push_decl): Likewise.
(start_decl_1): Likewise.
(require_complete_types_for_parms): Likewise.
* parse.y (structsp): Likewise.
(base_class): Likewise.
* parse.c: Regenerated.
* pt.c (finish_member_template_decl): Likewise.
* typeck.c (decay_conversion): Likewise.
* cp-tree.h (dfs_skip_vbases): New function.
(find_vbase_instance): Likewise.
* class.c (determine_primary_base): Allow a nearly empty base to
serve as a primary base class under the new ABI.
(get_class_offset_1): Rename to ...
(dfs_get_class_offset): ... this. Simplify. Don't issue error
messages here.
(get_class_offset): Use it. Issue error messages here.
(dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
find the right copies of virtual bases.
(fixup_vtable_deltas1): Rename to ...
(dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
bases as primary bases.
(fixup_vtable_deltas): Remove.
(override_one_vtable): Handle virtual bases as primary bases.
(merge_overrides): Likewise.
(finish_struct_1): Likewise.
(dump_class_hierarchy): Dump primary-ness of bases as well.
* search.c (mark_primary_bases): Use a pre-order traversal to
handle primary virtual bases.
(dfs_skip_vbases): New fiunction.
(expand_upcast_fixups): Adjust to handle primary virtual bases.
(fixup_virtual_upcast_offsets): Likewise.
(fixup_all_virtual_upcast_offsets): Likewise.
(dfs_find_vbase_instances): New function.
(find_vbase_instance): Likewise.
2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
* lex.c (DIR_SEPARATOR): Delete macro.
2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
* decl2.c (lang_decode_option): Handle automatic line wrapping
option.
2000-01-11 Mark Mitchell <mark@codesourcery.com>
* friend.c (do_friend): Don't resolve scopes when processing
template declarations, even if the qualifying scope doesn't
involve template parameters.
2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
* class.c (dfs_modify_vtables_queue_p): Remove.
(modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
and dfs_marked_real_bases_queue_p instead of
dfs_modify_vtables_queue_p.
* class.c (build_vbase_path): Simplify.
(dfs_propagate_binfo_offsets): New function.
(propagate_binfo_offsets): Use it.
(remove_base_field): Simplify.
(dfs_set_offset_for_vbases): Remove.
(dfs_set_offset_for_shared_vbases): New function.
(dfs_set_offset_for_unshared_vbases): Likewise.
(layout_virtual_bases): Use them.
(layout_basetypes): Don't call propagate_binfo_offsets.
* search.c (dfs_get_vbase_types): Clone completely fresh binfos
for the vbases.
* class.c (build_base_field): New function, split out from ...
(build_base_fields): ... here. Use it. Allocate primary bases
first, under the new ABI.
(get_vtable_entry): Remove.
(remove_base_field): New function, split out from ...
(remove_base_fields): ... here. Adjust since primary bases come
first under the new ABI.
* cp-tree.h (expand_direct_vtbls_init): Remove declaration.
(initialize_vtbl_ptrs): New function.
(expand_indirect_vtbls_init): Change prototype.
(convert_pointer_to_vbase): Declare.
* init.c (expand_direct_vtbls_init): Remove.
(dfs_initialize_vtbl_ptrs): New function.
(initialize_vtbl_ptrs): Likewise.
(emit_base_init): Use initialize_vtbl_ptrs.
* search.c (convert_pointer_to_vbase): Make it global.
(expand_indirect_vtbls_init): Remove vtable initialization code.
* semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
* class.c (dfs_finish_vtbls): New function.
(finish_vtbls): Use it.
(dump_class_hierarchy): New function.
* cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
(BINFO_VBASE_PRIMARY_P): New macro.
(BINFO_VIRTUALS): Add to documentation.
(SET_BINFO_PRIMARY_MARKED_P): Remove.
(CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
(dfs_mark_primary_bases_queue_p): Likewise.
(dfs_unmarked_real_bases_queue_p): New function.
(dfs_marked_real_bases_queue_p): Likewise.
* search.c (dfs_mark_primary_bases): Adjust.
(mark_primary_bases): Likewise.
(get_shared_vbase_if_not_primary): New function.
(dfs_unmarked_real_bases_queue_p): Likewise.
(dfs_marked_real_bases_queue_p): Likewise.
(dfs_get_pure_virtuals): Simplify.
(get_pure_virtuals): Likewise.
2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* lex.c: Include tm_p.h.
2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
* lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
2000-01-06 Jason Merrill <jason@casey.cygnus.com>
* decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
* pt.c (instantiate_decl): Defer comdat templates that might not be
needed.
* cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
* decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
(finish_file): Likewise.
* decl2.c (import_export_class): Undo 12/14 change.
* error.c (dump_decl): operator new, not operatornew.
* class.c (field_decl_cmp): A nontype is "greater" than a type.
* search.c (lookup_field_1): Look for the last field with the
desired name.
2000-01-05 Nathan Sidwell <nathan@acm.org>
* decl2.c (lookup_arg_dependent): Deal with FNS not being a
FUNCTION_DECL.
2000-01-05 Nathan Sidwell <nathan@acm.org>
* typeck.c (build_static_cast): Don't strip target qualifiers
when casting from a class.
2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* class.c (warn_hidden): Initialize variable `fndecl'.
2000-01-03 Ulrich Drepper <drepper@cygnus.com>
* decl.c (flag_isoc9x): New variable to be able to use code in
c-common.c. For now always zero.
2000-01-03 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
* class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
or unshare_base_binfos for virtual bases here.
* search.c (dfs_get_vbase_types): Do it here.
(get_vbase_types): Adjust.
2000-01-02 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
(BINFO_PRIMARY_MARKED_P): Use flag 5.
(SET_BINFO_PRIMARY_MARKED_P): Likewise.
(CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
(unmark_primary_bases): Remove declaration.
(unmarkedp): Declare.
(dfs_vbase_unmark): Likewise.
* class.c (determine_primary_base): Return immediately if there
are no base classes. Call mark_primary_bases here.
(modify_all_direct_vtables): Remove.
(modify_all_indirect_vtables): Remove.
(dfs_modify_vtables_queue_p): New function.
(dfs_modify_vtables): New function.
(modify_all_vtables): Use them.
(build_base_fields): Build FIELD_DECLs for primary virtual base
classes.
(create_vtable_ptr): Don't call determine_primary_base here.
(dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
(dfs_set_offset_for_vbases): ... this.
(layout_virtual_bases): Use it.
(layout_class_type): Call determine_primary_base here.
* search.c (unmarkedp): Make it global.
(shared_marked_p): Simplify.
(shared_unmarked_p): Likewise.
(dfs_primary_bases_queue_p): Remove.
(dfs_unmark_primary_bases): Likewise.
(unmark_primary_bases): Likewise.
(mark_primary_bases): Simplify.
(get_pure_virtuals): Don't call mark_primary_bases here.
(dfs_vbase_unmark): New function.
(get_vbase_types): Simplify.
* class.c (struct base_info): Remove.
(determine_primary_base): Take has_virtual_p rather than a
base_info as input. Don't calculate max_has_virtual.
(finish_struct_bits): Remove max_has_virtual argument.
(create_vtable_ptr): Remove max_has_virtual_p argument.
(layout_virtual_bases): Remove max argument.
(layout_basetypes): Likewise.
(layout_class_type): Remove max_has_virtual_p argument.
(finish_struct_1): Remove max_has_virtual.
* cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
(layout_basetypes): Remove.
* class.c (propagate_binfo_offsets): Moved here from tree.c.
Update to handle primary virtual bases.
(remove_base_fields): New function, split out from
layout_basetypes.
(dfs_mark_primary_bases_and_set_vbase_offsets): New function.
(layout_virtual_bases): New function, split out from
layout_basetypes. Update to handle primary virtual bases.
(layout_basetypes): Moved here from tree.c. Use
remove_base_fields and layout_virtual_bases.
* search.c (dfs_mark_primary_bases_queue_p): New function.
(mark_primary_bases): Use it.
* tree.c (CEIL): Remove.
(propagate_binfo_offsets): Remove.
(layout_basetypes): Remove.
2000-01-01 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
(BINFO_PRIMARY_MARKED_P): New macro.
(SET_BINFO_PRIMARY_MARKED_P): Likewise.
(CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
(mark_primary_bases): New function.
(unmark_primary_bases): Likewise.
* search.c (get_abstract_virtuals_1): Remove.
(dfs_mark_primary_bases): New function.
(mark_primary_bases): Likewise.
(dfs_unmark_primary_bases): Likewise.
(unmark_primary_bases): Likewise.
(dfs_get_pure_virtuals): Likewise.
2000-01-01 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (skip_rtti_stuff): Adjust prototype.
* class.c (skip_rtti_stuff): Reorganize parameters and return value.
(modify_one_vtable): Adjust.
(fixup_vtable_deltas1): Likewise.
(override_one_vtable): Likewise.
* search.c (get_abstract_virtuals_1): Likewise.
(get_pure_virtuals): Likewise.
(expand_upcast_fixups): Likewise.
* tree.c (debug_binfo): Likewise.
* class.c (build_vtable): Don't return a value. Don't rebuild
vtables for bases that have already been handled.
(prepare_fresh_vtable): Don't rebuild vtables for bases that have
already been handled.
(modify_one_vtable): Adjust accordingly.
(fixup_vtable_deltas1): Likewise.
(finish_struct_1): Likewise.
2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
* call.c (build_new_method_call): Also check destructors.
|