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
|
1999-12-31 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (VF_NORMAL_VALUE): Remove.
* class.c (struct base_info): Remove vfield, vfields, and rtti.
(set_primary_base): New function, split out from ...
(finish_base_struct): ... here. Rename to ...
(determine_primary_base): ... this. Simplify.
(create_vtable_ptr): Tweak accordingly.
(finish_struct_1): Simplify.
* cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation.
(CLASSTYPE_N_BASECLASSES): Likewise.
(BINFO_FOR_VBASE): New macro.
(get_vbase_types): Change prototype.
* class.c (build_vbase_path): Use BINFO_FOR_VBASE.
(prepare_fresh_vtable): Likewise.
(finish_vtbls): Likewise.
(get_class_offset_1): Likewise.
(modify_all_indirect_vtables): Likewise.
(build_vbase_pointer_fields): Likewise.
* decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here.
* init.c (sort_base_init): Use BINFO_FOR_VBASE.
(expand_member_init): Likewise.
* search.c (get_base_distance): Likewise.
(lookup_field_queue_p): Likewise.
(virtual_context): Likewise.
(get_vbase_types): Don't return a value. Set
CLASSTYPE_VBASECLASSES here.
* typeck.c (get_delta_difference): Use BINFO_FOR_VBASE.
1999-12-30 Mark Mitchell <mark@codesourcery.com>
* class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS.
1999-12-29 Mark Mitchell <mark@codesourcery.com>
* class.c (create_vtable_ptr): Put the vtable at the beginning of
the class, not the end, in the new ABI.
* tree.c (propagate_binfo_offsets): Do the right thing for the new
ABI.
1999-12-29 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (lang_type): Add nearly_empty_p. Adjust dummy.
(CLASSTYPE_NEARLY_EMPTY_P): New macro.
* class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P.
(check_field_decls): Likewise.
(check_bases_and_members): Likewise.
1999-12-28 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (do_inline_function_hair): Remove.
* class.c (layout_class_type): New function, split out from
finish_struct_1.
(fixup_pending_inline): Likewise.
(fixup_inline_methods): New function.
* method.c (fixup_pending_inline): Remove.
(do_inline_function_hair): Likewise.
* decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
new ABI.
* cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
(CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
(CLASSTYPE_PURE_VIRTUALS): ... this.
(lang_decl_flags): Replace abstract_virtual with pure_virtual.
(DECL_ABSTRACT_VIRTUAL_P): Rename to ...
(DECL_PURE_VIRTUAL_P): ... this.
(get_abstract_virtuals): Rename to ...
(get_pure_virtuals): ... this.
* call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with
DECL_ABSTRACT_VIRTUAL_P. Replace CLASSTYPE_ABSTRACT_VIRTUALS with
CLASSTYPE_PURE_VIRTUALS.
* class.c (build_vtable_entry): Likewise.
(finish_struct_bits): Likewise. Call get_pure_virtuals, not
get_abstract_virtuals.
(build_vtbl_initializer): Likewise.
(override_one_vtable): Likewise.
(check_methods): Likewise.
* decl.c (duplicate_decls): Likewise.
(redeclaration_error_message): Likewise.
(lang_mark_tree): Likewise.
* decl2.c (grok_function_init): Likewise.
(import_export_vtable): Likewise.
(import_expor_class): Likewise.
* typeck2.c (abstract_virtuals_error): Likewise.
* xref.c (GNU_xref_member): Likewise.
* search.c (get_abstract_virtuals): Rename to get_pure_virtuals.
1999-12-26 Zack Weinberg <zack@wolery.cumb.org>
* cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
throughout.
1999-12-26 Mark Mitchell <mark@codesourcery.com>
* decl.c (store_return_init): Use mode of old RTL generated for
DECL_RESULT, not the mode of DECL_RESULT itself.
* semantics.c (finish_named_return_value): Set DECL_UNINLINABLE
for functions that used named return values.
1999-12-24 Mark Mitchell <mark@codesourcery.com>
* semantics.c (expand_body): Use
note_deferral_of_defined_inline_function.
1999-12-22 Mark Mitchell <mark@codesourcery.com>
* dump.c (dequeue_and_dump): Handle CTOR_STMTs.
1999-12-22 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
* error.c (dump_decl): Support named return values.
1999-12-20 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
(CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
(CLASSTYPE_PRIMARY_BINFO): Likewise.
* class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
(check_bases_and_members): Set them here instead.
(create_vtable_ptr): New function, split out from ...
(finish_struct_1): ... here. Use it. Tidy. Use
CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
* search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
the first field in the class.
* tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES. Handle
seeing TYPE_VFIELD as the first field in the class.
* cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
(TYPE_POLYMORPHIC_P): ... this.
(TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
(TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
(TREE_CALLS_NEW): Remove.
(TREE_MANGLED): Likewise.
* call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
and TYPE_POLYMORPHIC_P.
* class.c (check_bases): Likewise.
(finish_base_struct): Likewise.
(finish_struct_bits): Likewise.
(check_for_override): Likewise.
(finish_struct_1): Likewise.
(get_vfield_name): Likewise.
* decl.c (xref_basetypes): Likewise.
* decl2.c (import_export_class): Likewise.
(import_export_decl): Likewise.
* error.c (dump_function_decl): Likewise.
* pt.c (instantiate_class_template): Likewise.
* repo.c (repo_inline_used): Likewise.
* rtti.c (build_headof): Likewise.
(get_tinfo_fn_dynamic): Likewise.
(build_x_typeid): Likewise.
(get_tinfo_var): Likewise.
(build_dynamic_cast_1): Likewise.
(synthesize_tinfo_fn): Likewise.
* search.c (lookup_field_1): Likewise.
(dfs_debug_mark): Likewise.
(maybe_suppress_debug_info): Likewise.
* typeck.c (build_component_ref): Likewise.
(build_component_addr): Likewise.
* typeck2.c (process_init_constructor): Likewise.
1999-12-20 Nathan Sidwell <nathan@acm.org>
* typeck.c (strip_all_pointer_quals): New static function.
(build_static_cast): Use it. Don't use at_least_as_qualified_p.
1999-12-16 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
(dso_handle_node): New macro.
(flag_use_cxa_atexit): New variable.
(declare_global_var): New function.
(start_anon_func): Remove declaration.
(end_anon_func): Likewise.
* decl.c (get_atexit_node): New function, split out from
destroy_local_static. Handle flag_use_cxa_atexit.
(get_dso_handle_node): Likewise.
(start_cleanup_fn): Renamed from start_anon_func. Moved here from
except.c. Handle flag_use_cxa_atexit.
(end_cleanup_fn): Renamed from end_anon_func. Moved here from
except.c.
(declare_global_var): New variable.
(destroy_local_static): Handle flag_use_cxa_atexit.
* decl2.c (flag_use_cxa_atexit): New variable.
(lang_f_options): Likewise.
* except.c (start_anon_func): Remove.
(end_anon_func): Liekwise.
* lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
* rtti.c (get_tinfo_var): Use declare_global_var.
1999-12-16 Mark Mitchell <mark@codesourcery.com>
* class.c (check_field_decls): Don't return a value.
(avoid_overlap): Moved here from tree.c.
(build_base_fields): Likewise.
(check_bases): New function, split out from finish_base_struct.
(check_bases_and_members): New function, split out from
finish_struct_1.
(struct base_info): Remove cant_have_default_ctor,
cant_have_const_ctor, cant_have_asn_ref.
(finish_base_struct): Split semantic analysis into check_bases.
(finish_struct_methods): Fix bogus assertion.
(check_field_decls): Call finish_struct_anon here.
(build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
(finish_struct_1): Use check_bases_and_members. Reorganize.
* cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
(build_base_fields): Don't declare.
* tree.c (avoid_overlap): Remove.
(build_base_fields): Likewise.
* optimize.c (struct inline_data): Remove scope_stmt.
(remap_block): Don't use insert_block_after_note. Don't update
scope_stmt.
(expand_call_inline): Don't update scope_stmt.
(optimize_function): Don't initialize scope_stmt.
* semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
1999-12-15 Mark Mitchell <mark@codesourcery.com>
* class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
out of the class, rather than taking them as parameters.
(build_vbase_pointer_fields): Move here from tree.c.
(build_vtbl_or_vbase_field): New function.
(check_methods): Likewise.
(remove_zero_width_bitfields): Likewise.
(add_virtual_function): Use tree_cons instead of temp_tree_cons.
(delete_duplicate_fields_1): Tidy. Don't delete duplicate
USING_DECLs here.
(finish_struct_methods): Handle the case where there are no
methods here.
(get_basefndecls): Use tree_cons instead of temp_tree_cons.
(check_field_decls): Call delete_duplicate_fields here.
(finish_struct_1): Tidy. Use check_methods and
remove_zero_width_bitfields.
* cp-tree.h (build_vbase_pointer_fields): Remove.
* decl.c (grokdeclarator): Use tree_cons instead of
temp_tree_cons.
* decl2.c (qualified_lookup_using_namespace): Use tree_cons
instead of temp_tree_cons.
* lex.c (cons_up_default_function): Remove dead code.
* method.c (fixup_pending_inline): New function, split out from ...
(do_inline_function_hair): ... here.
* tree.c (build_vbase_pointer_fields): Remove.
1999-12-15 Jason Merrill <jason@casey.cygnus.com>
* tree.c (walk_tree): Walk operand subtrees in forward order.
* optimize.c (expand_call_inline): Likewise.
(optimize_function): Initialize id->scope_stmt to something useful.
(remap_block): Assume id->scope_stmt has a useful value.
1999-12-15 Nathan Sidwell <nathan@acm.org>
* typeck.c (build_c_cast): Expand warning message. Move pointer
alignment warning to after the cast. Don't warn about pointer
alignment when given a pointer to incomplete.
1999-12-15 Richard Henderson <rth@cygnus.com>
* cp-tree.h (make_aggr_type): Declare.
* lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
(make_aggr_type): New.
* decl.c (build_typename_type, init_decl_processing): Use it.
(build_ptrmemfunc_type, xref_tag): Likewise.
* except.c (call_eh_info): Likewise.
* init.c (init_init_processing): Likewise.
* pt.c (process_template_parm, lookup_template_class): Likewise.
* rtti.c (expand_class_desc): Likewise.
* semantics.c (begin_class_definition, finish_typeof): Likewise.
* tree.c (copy_template_template_parm): Likewise.
1999-12-15 Jason Merrill <jason@yorick.cygnus.com>
* cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
sizeof (struct tree_common).
1999-12-14 Jason Merrill <jason@casey.cygnus.com>
* optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
outermost block to point to the inlined function decl.
* error.c (dump_decl): operator==, not operator ==.
(op_to_string): Likewise.
* decl.c (compute_array_index_type): Handle null name.
* decl2.c (ambiguous_decl): Fix to match comment.
(lookup_using_namespace): Adjust.
* decl2.c (import_export_class): Don't ignore dllimport.
1999-12-14 Mark Mitchell <mark@codesourcery.com>
* class.c (check_field_decls): Split out from ...
(finish_struct_1): ... here. Use it. Tidy.
* cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
* optimize.c (copy_body_r): Pass it.
* tree.c (remap_save_expr): Clear walk_subtrees for an
already-handled SAVE_EXPR.
(cp_unsave_r): Pass walk_subtrees to remap_save_expr.
* dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
* ir.texi (DECL_NAMESPACE_ALIAS): Document it.
* error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
1999-12-14 Mumit Khan <khan@xraylith.wisc.edu>
* class.c (finish_base_struct): Allow multiple COM base classes
as well as non-COM bases as long as it's not the leftmost.
1999-12-13 Mumit Khan <khan@xraylith.wisc.edu>
* lex.c (saving_parse_to_obstack): New global.
(reinit_parse_for_block): Use.
(reinit_parse_for_expr): Use.
(check_newline): Use.
1999-12-13 Mark Mitchell <mark@codesourcery.com>
* optimize.c (initialize_inlined_parameters): Take FN to which the
parameters belong as an argument.
(expand_call_inline): Expand calls into the parameter
initializations before pushing the function onto the list of
functions we are presently expanding.
1999-12-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* class.c (get_vtable_name): Use a literal format string and
VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
(prepare_fresh_vtable): Likewise.
* cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
VTABLE_NAME_FORMAT.
* decl.c (make_rtl_for_local_static): Remove unused variable `type'.
* init.c (build_vec_init): Initialize variable `try_body'.
* lex.c (yyerror): Don't call a variadic function with a
non-literal format string.
* optimize.c (optimize_function): Call memset, not bzero.
* pt.c (for_each_template_parm_r): Add static prototype.
1999-12-09 Andreas Jaeger <aj@suse.de>
* except.c (expand_throw): Add static attribute to match
prototype.
* Makefile.in (semantics.o): Add dependency on output.h.
* semantics.c: Include output.h for declaration of
make_function_rtl.
1999-12-09 Mark Mitchell <mark@codesourcery.com>
* decl.c (init_decl_processing): Reenable inlining on trees.
(finish_function): Likewise.
* expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
* semantics.c (simplify_aggr_init_exprs): New function.
(expand_body): Use it.
* tree.c (walk_tree): Special-case TARGET_EXPRs since they
sometimes present the same sub-tree twice.
* dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
`csl'.
* semantics.c (finish_switch_cond): Do conversions here, not ...
* typeck.c (c_expand_start_case): Here.
* semantics.c (do_poplevel): Remove unused variable.
1999-12-06 Mark Mitchell <mark@codesourcery.com>
* tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
unless we're declaring the variable in question.
1999-12-06 Mark Mitchell <mark@codesourcery.com>
* decl.c (init_decl_processing): #if 0 last patch.
(finish_function): Likewise.
1999-12-05 Mark Mitchell <mark@codesourcery.com>
* decl.c (init_decl_processing): Set flag_inline_trees if
!flag_no_inline.
* cp-tree.h (calls_setjmp_p): Declare.
* decl.c (finish_function): Mark functions that call setjmp as
uninlinable.
* optimize.c (calls_setjmp_r): New function.
(calls_setjmp_p): Likewise.
1999-12-04 Mark Mitchell <mark@codesourcery.com>
* optimize.c (expand_call_inline): Wrap the expanded call in an
EXPR_WITH_FILE_LOCATION node to get correct line numbers for
inlined functions.
* optimize.c (inline_data): Remove fns_top. Add scope_stmt. Add
in_target_cleanup_p.
(remap_decl): New function.
(remap_block): Likewise.
(copy_scope_stmt): Likewise.
(copy_body_r): Use remap_decl and copy_scope_stmt.
(copy_body): Use VARRAY_TOP_TREE.
(initialize_inlined_parameters): Likewise.
(declare_return_variable): Likewise.
(inlinable_function_p): Check flag_inline_trees.
(expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
specially. Use VARRAY_PUSH_TREE. Create a BLOCK for the
parameters of the inlined function.
(optimize_function): Prevent recursion into partially complete
functions.
* cp-tree.def (SCOPE_STMT): Take one operand.
* cp-tree.h (SCOPE_STMT_BLOCK): New macro.
(SCOPE_NULLIFIED_P): Redefine.
(SCOPE_NO_CLEANUPS_P): New macro.
(add_scope_stmt): Change prototype.
* decl.c (poplevel): Tidy. Warn about unused variables here.
Record SCOPE_STMT_BLOCKs.
(finish_function): Keep DECL_INITIAL for functions that might be
inlined.
* ir.texi: Document SCOPE_NO_CLEANUPS_P.
* semantics.c: Include rtl.h.
(add_scope_stmt): Return the new scope statement and, for an
end-of-scope statement, its matching begin statement. Don't set
SCOPE_NULLIFIED_P.
(do_pushlevel): Simplify, now that we are always
function-at-a-time.
(do_poplevel): Likewise. Record SCOPE_STMT_BLOCKs.
(expand_stmt): Don't call expand_start_bindings or
expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
* tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
SCOPE_NULLIFIED_P.
* Makefile.in (semantics.o): Depend on RTL_H.
* decl2.c (pending_statics_used): Make it a macro.
(saved_inlines_used): Likewise.
(finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
(mark_inline_for_output): Likewise.
(ssdf_decls_used): Remove.
(start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
(generate_ctor_or_dtor_function): Adjust accordingly.
1999-11-24 Geoffrey Keating <geoffk@cygnus.com>
Greg McGary <gkm@gnu.org>
* decl.c (duplicate_decls): Merge
DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
1999-12-02 Mike Stump <mrs@wrs.com>
* init.c (perform_member_init): Handle parse errors better.
1999-12-01 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (min_tree_cons): Remove.
(scratch_ovl_cons): Likewise.
* decl.c (saveable_obstack): Don't declare.
(duplicate_decls): Tweak error-message.
(initialize_local_var): Explicitly mark the definition as static.
(finish_function): Call permanent_allocation, just so
that the middle-end sees the obstacks it expects.
(mark_cp_function_context): Likewise.
* init.c (build_new): Don't use min_tree_cons.
* lex.c (permanent_obstack): Don't declare.
(current_obstack, saveable_obstack): Likewise.
* spew.c (current_obstack, saveable_obstack): Likewise.
* tree.c (current_obstack, saveable_obstack): Likewise.
(scratch_ovl_cons): Remove.
(build_min_nt): Don't mess with obstacks.
(build_min): Likewise.
(min_tree_cons): Remove
* typeck.c (build_component_ref): Don't use scratch_ovl_cons.
(build_x_function_call): Likewise.
(build_c_cast): Don't use min_tree_cons.
1999-11-29 Mark Mitchell <mark@codesourcery.com>
* pt.c (tsubst_decl): Robustify.
1999-11-27 Mark Mitchell <mark@codesourcery.com>
* decl2.c (finish_file): Call expand_body for inline functions
that will be written out but that do not yet have RTL.
* semantics.c (expand_body): Do not generate RTL For inline
functions that do not yet need to be written out.
1999-11-25 Mark Mitchell <mark@codesourcery.com>
* Make-lang.in (CXX_SRCS): Add optimize.c.
* Makefile.in (CXX_OBJS): Add optimize.o.
(CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
(spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
(class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
(search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
(xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
(dump.o): Likewise.
(optimize.o): New target.
* class.c: Don't include splay-tree.h.
* cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.
* cp-tree.h: Include splay-tree.h.
(DECL_UNINLINABLE): New macro.
(CTOR_BEGIN_P, CTOR_END_P): New macros.
(flag_inline_trees): New variable.
(local_variable_p): New function.
(nonstatic_local_decl_p): Likewise.
(optimize_function): Likewise.
(cplus_unsave_expr_now): Remove.
(copy_tree_r): Declare.
(remap_save_expr): Likewise.
* decl.c (local_variable_p): Don't
make it static.
(local_variable_p_walkfn): New function.
(make_rtl_for_local_static): Remove code to try to avoid writing
out static constants.
(emit_local_var): Fix indentation.
(nonstatic_local_decl_p): New function.
(check_default_argument): Use local_variable_p_walkfn, not
local_variable_p, when walking the tree.
(start_function): Set the DECL_CONTEXT for automatically generated
labels.
(finish_constructor_body): Use CTOR_STMT to mark the end of a
constructor.
* decl2.c: Don't include splay-tree.h.
(flag_inline_trees): Define.
* dump.c: Don't include
splay-tree.h.
* except.c (expand_end_catch_block): Fix comment formatting.
(expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
(expand_throw): Tidy comment.
* init.c (build_vec_delete_1): Use create_temporary_var.
* lex.c (cplus_tree_code_type): Make it static.
(cplus_tree_code_length): Likewise.
(cplus_tree_code_name): Likewise.
* optimize.c: New file.
* semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
with computed gotos.
(setup_vtbl_ptr): Mark the beginnings of constructors with
CTOR_STMT.
(expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
(expand_body): Call optimize_function. Save bodies if we're doing
inlining on trees.
* tree.c: Don't include splay-tree.h. Include insn-config.h and
integrate.h.
(copy_tree_r): Make it public.
(statement_code_p): New function.
(mark_local_for_remap_r): Likewise.
(cp_usave_r): Likewise.
(cp_unsave): Likewise.
(build_cplus_new): Set DECL_CONTEXT for temporary variables.
(walk_tree): Walk into `s' class nodes. Walk statement chains.
(copy_tree_r): Handle 's' class nodes. Restore chains for
statements. Nullify scopes. Don't copy types.
(init_tree): Set lang_unsave to cp_unsave.
(remap_save_expr): Define.
* ir.texi: Document CTOR_STMT.
1999-11-24 Jason Merrill <jason@casey.cygnus.com>
* search.c (note_debug_info_needed): Do perform this optimization
for dwarf2.
(maybe_suppress_debug_info): Likewise. Start by clearing
TYPE_DECL_SUPPRESS_DEBUG.
1999-11-24 Mark Mitchell <mark@codesourcery.com>
* pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
* decl2.c (finish_vtable_vardecl): Don't prune vtables here.
1999-11-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* decl.c (pushdecl, grokdeclarator): Don't call a variadic
function with a non-literal format string.
* lex.c (do_identifier): Likewise.
* typeck.c (build_unary_op): Likewise.
1999-11-23 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
1999-11-22 Mark Mitchell <mark@codesourcery.com>
* cp-tree.def (CTOR_COMPLETE): New tree node.
* decl.c (finish_constructor_body): Add it, to mark the end of the
constructor.
(finish_function): Don't call end_protect_partials here.
* ir.texi (CTOR_COMPLETE): Document it.
* semantics.c (expand_stmt): Handle it.
* cp-tree.def (FUNCTION_NAME): New tree node.
* cp-tree.h (current_function_name_declared): Tweak documentation.
(lang_decl_flags): Add pretty_function_p, adjust dummy.
(DECL_PRETTY_FUNCTION_P): New macro.
* decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
etc., in a template function. Use at_function_scope_p instead of
expanding it inline.
* pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
specially.
(tsubst): Handle FUNCTION_NAME.
(tsubst_copy): Likewise.
(instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
etc. in instantiation.
* semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
even in template functions.
(setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
conditional scope at the top of a destructor.
* error.c (dump_function_decl): Use `[ with ... ]' syntax for
specializations too.
1999-11-22 Nathan Sidwell <nathan@acm.org>
* semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
when actually negative.
* typeck.c (convert_for_assignment): Expand comment about
strange NULL check, moved from ...
(convert_for_initialization): ... here. Remove unneeded
code.
1999-11-21 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
* cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
* init.c (build_vec_delete, build_vec_delete_1): Likewise.
Always destruct virtual bases of array components, but never
delete them.
(build_vec_init): Adjust invocations.
(build_delete): Likewise.
* decl2.c (delete_sanity): Likewise.
1999-11-19 Nathan Sidwell <nathan@acm.org>
* cp-tree.h (grok_method_quals): Return this pointer qualifiers.
* decl.c (grokdeclarator): Adjust calls to grok_method_quals.
* decl2.c (grok_method_quals): Accept `restrict' as applying to
the object pointer. Return such qualifiers.
(grokclassfn): Apply this pointer qualifiers. Cleanup unused
variables.
1999-11-18 Mark Mitchell <mark@codesourcery.com>
* except.c (expand_end_catch_block): Fix typo.
(expand_exception_blocks): Simplify. Don't call
expand_leftover_cleanups.
1999-11-15 Jason Merrill <jason@casey.cygnus.com>
* cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
* pt.c (tsubst, case INTEGER_TYPE): Call it.
Check uses_template_parms.
* class.c (finish_struct): If we're a local class in a template
function, add a TAG_DEFN.
* pt.c (lookup_template_class): If this is a local class in a
template function, call pushtag.
(tsubst_expr, case TAG_DEFN): Handle classes, too.
Emit debug info with the vtable.
* search.c (maybe_suppress_debug_info): New function...
* class.c (finish_struct_1): ...split out from here.
* cp-tree.h: Declare it.
* decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
if we're writing out the vtable.
* decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p,
note_debug_info_needed): #if 0 out.
1999-11-14 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
* call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
TREE_PERMANENT.
* decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
* decl2.c (lookup_arg_dependent): Use it.
* cp-tree.h (cp_finish_decl): Change prototype.
(finish_static_data_member_decl): Likewise.
(push_permanent_obstack): Remove declaration.
(push_expression_obstack): Likewise.
(push_scratch_obstack): Likewise.
(DECL_TEMPLATE_PARM_P): Robustify.
(SET_DECL_TEMPLATE_PARM_P): New macro.
* class.c (add_method): Don't manipulate obstacks.
(finish_vtbls): Likewise.
* cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
* decl.c (binding_for_name): Don't manipulate obstacks.
(maybe_push_to_top_level): Likewise.
(pop_from_top_level): Likewise.
(duplicate_decls): Likewise.
(pushdecl): Likewise.
(implicitly_declare): Likewise.
(build_typename_type): Likewise.
(start_decl): Likewise.
(cp_finish_decl): Likewise.
(finish_decl): Likewise.
(destroy_local_static): Likewise.
(expand_static_init): Likewise.
(complete_array_type): Likewise.
(grokvardecl): Likewise.
(build_ptrmemfnc_type): Likewise.
(grokdeclarator): Likewise.
(xref_tag): Likewise.
(xref_basetypes): Likewise.
(start_enum): Likewise.
(finish_enum): Likewise.
(start_function): Likewise.
(finish_function): Likewise.
(start_method): Adjust call to cp_finish_decl.
* decl2.c (finish_static_data_member_decl): Don't manipulate
obstacks.
(grokfield): Likewise.
(grokbitfield): Likewise.
(get_temp_name): Likewise.
(get_sentry): Likewise.
(fnish_file): Likewise.
(lookup_arg_dependent): Likewise.
* except.c (call_eh_info): Likewise.
(push_eh_info): Likewise.
(do_pop_exception): Likewise.
(initialize_handler_parm): Likewise.
(expand_end_eh_spec): Likewise.
(alloc_eh_object): Likewise.
(expand_throw): Likewise.
* expr.c (extract_scalar_init): Likewise.
* init.c (build_java_class_ref): Likewise.
* lex.c (get_time_identifier): Likewise.
(snarf_defarg): Likewise.
(add_defarg_fn): Likewise.
(is_global): Simplify.
(do_identifier): Don't check TREE_PERMANENT.
* method.c (emit_thunk): Don't manipulate obstacks.
* parse.y (condition): Adjust call to cp_finish_decl.
(primary): Likewise.
(initdcl): Likewise.
(initdcl0_innards): Likewise.
(nomods_initdcl0): Likewise.
* pt.c (push_inline_template_parms_recursive): Use
SET_DECL_TEMPLATE_PARM_P.
(process_template_parm): Likewise.
(lookup_template_class): Don't manipulate obstacks.
(instantiate_class_template): Adjust call to
finish_static_data_member_decl.
(tsubst_decl): Don't manipulate obstacks.
(tsubst_expr): Likewise.
(instantiate_template): Likewise.
(instantiate_decl): Adjust calls to cp_finish_decl.
* rtti.c (call_void_fn): Don't manipulate obstacks.
(get_tinfo_var): Likewise.
(get_tinfo_fn_unused): Likewise.
(build_dynamic_cast_1): Likewise.
(expand_si_desc): Likewise.
(expand_class_desc): Likewise.
(expand_ptr_desc): Likewise.
(expand_attr_desc): Likewise.
(expand_generic_desc): Likewise.
(synthesize_tinfo_fn): Likewise.
* search.c (expand_upcast_fixups): Likewise.
* semantics.c (finish_asm_stmt): Likewise.
(finish_named_return_value): Likewise.
(begin_class_definition): Likewise.
(finish_class_definition): Likewise.
(finish_typeof): Likewise.
* tree.c (build_cplus_method_type): Likewise.
(reverse_path): Likewise.
(copy_template_template_parm): Likewise.
(build_expr_ptr_wrapper): Likewise.
(push_expression_obstack): Remove.
(push_permanent_obstack): Likewise.
* typeck.c (mark_addressable): Likewise.
1999-11-13 Mark Mitchell <mark@codesourcery.com>
* call.c (build_conditional_expr): Use build_target_expr_with_type.
(convert_like): Likewise.
(build_over_call): Likewise.
* cp-tree.h (build_target_expr): Remove.
(build_target_expr_with_type): New function.
* cvt.c (build_up_reference): Use get_target_expr.
* decl.c (build_target_expr): Move to ...
* tree.c (build_target_expr): Here. Make it static.
(build_target_expr_with_type): New function. Set DECL_CONTEXT on
the temporary VAR_DECLs.
(get_target_expr): Use it.
1999-11-13 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
* decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
* rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
* class.c (set_rtti_entry): Use it.
1999-11-12 Mark Mitchell <mark@codesourcery.com>
* decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
here.
* semantics.c (finish_expr_stmt): Call it here instead. Move
default_conversion logic to semantic-analysis time.
1999-11-12 Jason Merrill <jason@yorick.cygnus.com>
* rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
Fri Nov 12 12:56:32 MST 1999 Diego Novillo <dnovillo@cygnus.com>
* init.c (init_init_processing): Re-instated Nov 11 patch after
approval.
Fri Nov 12 10:42:02 MST 1999 Diego Novillo <dnovillo@cygnus.com>
* init.c (init_init_processing): Undo patch from Nov 11, 1999.
Patch had not been approved yet.
1999-11-12 Mark Mitchell <mark@codesourcery.com>
* decl.c (compute_array_index_type): New function, split out from
grokdeclarator.
(create_array_type_for_decl): Likewise.
(grokdeclarator): Use them.
* semantics.c (expand_stmt): Don't suspend_momentary or
resume_momentary.
Thu Nov 11 12:42:11 MST 1999 Diego Novillo <dnovillo@cygnus.com>
* init.c (init_init_processing): Header information for
arrays allocated via `new' should have the same alignment used by
malloc.
1999-11-10 Mark Mitchell <mark@codesourcery.com>
* error.c (dump_function_name): Don't crash if given a friend
pseudo-instantiation.
* cp-tree.h (build_enumerator): Change prototype.
* decl.c (enum_next_value): Remove.
(enum_overflow): Likewise.
(init_decl_processing): Don't register enum_next_value as a root.
(start_enum): Clear TYPE_VALUES for a redefined enum.
(finish_enum): Reset the type of enumeration constants.
(build_enumerator): Fix indentation. Don't copy CONST_DECLs when
we don't need to. Maintain the TYPE_VALUES list and look there
for the previously defined enumeration constant. Let enumeration
constants have the type of their values until the enumeration type
is complete.
* parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
(structsp): Adjust.
* parse.c: Regenerated.
* pt.c (tsubst_enum): Adjust according to build_enumerator changes.
Wed Nov 10 12:43:21 1999 Philippe De Muyter <phdm@macqel.be>
Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
1999-11-09 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (language_function): Remove x_last_dtor_insn and
x_last_parm_cleanup_insn.
* decl.c (last_dtor_insn): Remove.
(last_parm_cleanup_insn): Likewise.
(expand_start_early_try_stmts): Don't set them.
(store_parm_decls): Likewise.
(save_function_data): Or save them.
(mark_lang_function): Or mark them.
1999-11-08 Mark Mitchell <mark@codesourcery.com>
* decl.c (store_parm_decls): Generate cleanup code at
semantic-analysis time. Destroy objects in the correct order.
1999-11-07 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (begin_new_placement): Remove.
(finish_new_placement): Likewise.
* class.c (finish_struct_1): Don't suspend_momentary or
resume_momentary.
* decl.c (grokdeclarator): Likewise.
(maybe_build_cleanup_1): Likewise.
* except.c (push_eh_cleanup): Likewise.
(build_terminate_handler): Likewise.
* init.c (build_new_1): Likewise.
* parse.y (parse_decl): Change prototype.
(initdecls, notype_initdecls, initdcl): Don't return int.
(initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
(.begin_new_placement): Remove.
(.finish_new_placement): Likewise.
(nonmomentary_expr): Likewise.
(suspend_mom): Likewise.
(condition): Don't suspend_momentary, resume_momentary, or keep
track of need to resume.
(unary_expr): Likewise.
(new_placement): Likewise.
(decl): Likewise.
(structsp): Likewise.
(new_type_id): Likewise.
(maybe_parmlist): Likewise.
(direct_after_type_declaration): Likewise.
(direct_new_declarator): Likewise.
(direct_abstract_declaration): Likewise.
* parse.c: Regenerated.
* pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
* semantics.c (begin_new_placement): Remove.
(finish_new_placement): Likewise.
1999-11-05 Martin v. Löwis <loewis@informatik.hu-berlin.de>
* cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
(DECL_TEMPLATE_INFO): Use it.
* decl.c (warn_extern_redeclared_static): Do nothing for
TEMPLATE_DECLs.
* decl2.c (mark_used): Explicitly check for function or variable.
* semantics.c (finish_unary_op_expr): Check whether result is also
an INTEGER_CST.
1999-11-05 Mark Mitchell <mark@codesourcery.com>
* Makefile.in (typeck2.o): Depend on output.h.
* typeck2.c: Include output.h.
* decl.c (flag_ansi): Remove declaration.
* pt.c (tinst_level_tick): Make it static.
(last_template_error_tick): Likewise.
* cp-tree.h (mapcar): Remove declaration.
(search_tree): Likewise.
(walk_tree_fn): New typedef.
(walk_tree): New function.
* tree.c (bot_manip): Change prototype. Adjust to be called via
walk_tree.
(bot_replace): Likewise.
(no_linkage_helper): Likewise.
(copy_tree_r): New function.
(search_tree): Rename, and adjust, to become ...
(walk_tree): New function.
(mapcar): Remove.
(target_remap): Remove.
(target_remap_count): Likewise.
(break_out_target_exprs): Use walk_tree.
* decl.c (local_variable_p): Change prototype.
(check_default_argument): Use walk_tree.
* pt.c (for_each_template_parm_r): New function, split out from ...
(for_each_template_parm): Here. Use it, via walk_tree.
1999-11-03 Mark Mitchell <mark@codesourcery.com>
* class.c (check_bitfield_decl): New function, split out from
finish_stuct_1.
(check_field_decl): Likewise. Recursively examine members of
anonymous structs.
(finish_struct_1): Use them.
* cp-tree.h (ANON_UNION_TYPE_P): New macro.
1999-11-02 Mark Mitchell <mark@codesourcery.com>
* decl.c (grokfndecl): Remove dead code.
* dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
1999-11-02 Scott Snyder <snyder@fnal.gov>
* decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
IMAGPART_EXPR.
* pt.c (tsubst_copy): Likewise.
1999-11-01 Jason Merrill <jason@yorick.cygnus.com>
* decl2.c (maybe_make_one_only): Always make things comdat on
ELF targets, too.
1999-10-31 Mark Mitchell <mark@codesourcery.com>
* decl.c (finish_function): Call free_after_parsing for functions
we are not immediately turning into RTL.
1999-10-31 Brendan Kehoe <brendan@cygnus.com>
* cp-tree.h (flag_dump_translation_unit): Add decl.
Sat Oct 30 22:42:50 1999 Stephen L Moshier <moshier@mediaone.net>
* lex.c (yylex): Accept 'f' in mantissa of hex float constant.
1999-10-30 Mark Mitchell <mark@codesourcery.com>
* decl.c (pop_cp_function_context): Don't call free on a NULL
pointer.
* semantics.c: Include ggc.h.
(expand_body): Do garbage-collection after processing a template
function. Clear DECL_SAVED_TREE after generating RTL for a
function.
* Makefile.in (semantics.o): Depend on ggc.h.
1999-10-29 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (make_typename_type): Change prototype.
* decl.c (make_typename_type): Only complain if so requested.
* parse.y (nested_name_specifier): Adjust calls.
(typename_sub0): Likewise.
(typename_sub1): Likewise.
* parse.c: Regenerated.
* pt.c (convert_template_argument): Pass complain to
make_typename_type.
(tsubst): Likewise.
1999-10-28 Mark Mitchell <mark@codesourcery.com>
* semantics.c (finish_handler): End the scope of the handler
before attaching it to the statement-tree.
1999-10-28 Ian Lance Taylor <ian@zembu.com>
* rtti.c (build_dynamic_cast_1): Give a better error message for
an attempt to dynamic_cast from a non-polymorphic type.
1999-10-27 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (make_temp_vec): Remove.
(make_scratch_vec): Likewise.
* call.c (add_function_candidate): Use make_tree_vec.
(add_conv_candidate): Likewise.
(build_builtin_candidate): Likewise.
(add_template_candidate_real): Likewise.
* class.c (resolve_address_of_overloaded_function): Likewise.
* decl.c (start_function): Don't fool with the momentary obstack.
(finish_function): Likewise.
* init.c (expand_direct_vtbls_init): Likewise.
(begin_init_stmts): Likewise.
(finish_init_stmts): Likewise.
* pt.c (add_to_template_args): Use make_tree_vec.
(check_explicit_specialization): Likewise.
(coerce_template_parms): Likewise.
(lookup_template_class): Don't fool with the momentary obstack.
(instantiate_class_template): Likewise.
(tsubst_template_arg_vector): Use make_tree_vec.
(tsubst_aggr_type): Don't fool with the momentary obstack.
(tsubst_decl): Likewise. Use make_tree_vec.
(try_one_overload): Likewise.
(try_class_unification): Don't fool with the momentary obstack.
(get_bindings_real): Use make_tree_vec.
(set_mangled_name_for_template_decl): Likewise.
* rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
* semantics.c (finish_expr_stmt): Likewise.
(finish_do_stmt): Likewise.
(finish_for_expr): Likewise.
(finish_switch_cond): Likewise.
(do_pushlevel): Likewise.
(do_poplevel): Likewise.
* tree.c (make_temp_vec): Remove.
* dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs. Dump
CLEANUP_P for a TRY_BLOCK.
* ir.texi: Document SAVE_EXPR.
Tue Oct 26 23:29:56 1999 Jeffrey A Law (law@cygnus.com)
* call.c (build_over_call): Check that the built-in function is
of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
* typeck.c (build_function_call_real): Similarly.
1999-10-26 Mark Mitchell <mark@codesourcery.com>
* decl.c (poplevel): Don't set BLOCK_TYPE_TAGS. Don't call
remember_end_note.
1999-10-24 Mark Mitchell <mark@codesourcery.com>
* decl.c (push_overloaded_decl_1): Use pushdecl.
* decl.c (auto_function): Replace #ifdef'd __inline with just
plain inline.
* lex.c (my_get_run_time): Likeise.
(yyprint): Likewise.
(identifier_type): Likewise.
* method.c (start_squangling): Likewise.
(end_squangling): Likewise.
(icat): Likewise.
(old_backref_index): Likewise.
(flush_repeats): Likewise.
(issue_ktype): Likewise.
* parse.y (empty_parms): Likewise.
* parse.c: Regenerated.
1999-10-21 Mark Mitchell <mark@codesourcery.com>
* dump.c (dequeue_and_dump): Replace several uses of
queue_and_dump_index with dump_child.
1999-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* expr.c: Include tm_p.h.
1999-10-21 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (SCOPE_PARTIAL_P): New macro.
(pushlevel_temporary): Remove.
(add_scope_stmt): New function.
* decl.c (pushlevel_temporary): Remove.
(poplevel): Use add_scope_stmt.
(start_decl_1): Likewise.
* semantics.c (add_scope_stmt): New function.
(do_pushlevel): Use it.
(do_poplevel): Use it.
(expand_stmt): Check SCOPE_PARTIAL_P.
* cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
* call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
* expr.c (cplus_expand_expr): Expand it.
* ir.texi: Document EMPTY_CLASS_EXPR.
1999-10-20 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
parameters as having namespace scope.
1999-10-19 Mark Mitchell <mark@codesourcery.com>
* method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
(mangling_flags): New type.
(build_overload_int): Change prototype.
(build_overload_value): Likewise.
(numeric_output_need_bar): Improve comment.
(mangle_expression): New function, broken out from ...
(build_overload_int): Here.
(build_overload_value): Adjust for use of mangling flags. Don't
warn about real-valued template parameters here. Do handle
complex expressions involving real-valued template parameters.
(build_template_parm_names): Encase non-type template parameters
in underscores, if necessary.
(process_overload_item): Remove conditional on
PARM_CAN_BE_ARRAY_TYPE.
1999-10-17 Mark Mitchell <mark@codesourcery.com>
* dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
* ir.texi: Clean up documentation of RETURN_INIT.
1999-10-15 Greg McGary <gkm@gnu.org>
* lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
(lang_init): Set default for flag_bounds_check if still "unspecified".
1999-10-13 Andrew Haley <aph@cygnus.com>
* class.c (finish_struct_1): Force alignment of non-bitfields to
BITS_PER_UNIT.
Wed Oct 13 22:01:35 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
* typeck2.c (process_init_constructor): Handle empty constructors.
1999-10-13 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
* pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
array error.
1999-10-13 Mark Mitchell <mark@codesourcery.com>
* decl.c (make_rtl_for_local_static): Don't create register RTL
for addressable constants.
1999-10-13 Nathan Sidwell <nathan@acm.org>
* cp-tree.h (build_x_va_arg): Prototype new function.
* call.c (build_x_va_arg): Define it.
* parse.y (unary_expr): Call build_x_va_arg.
* cp-tree.h (convert_type_from_ellipsis): Prototype new function.
* call.c (convert_type_from_ellipsis): Define it.
* decl.c (init_decl_processing): Set lang_type_promotes_to.
* tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
1999-10-11 Jason Merrill <jason@yorick.cygnus.com>
* class.c (fixed_type_or_null): Always set *nonnull.
1999-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
__GNUC__ and __GNUC_MINOR__.
1999-10-09 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (make_rtl_for_local_static): New function.
* decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
local statics ...
(make_rtl_for_local_static): Here.
* semantics.c (expand_stmt): Use make_rtl_for_local_static.
1999-10-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* method.c: Include tm_p.h.
1999-10-7 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
* cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
* lex.c (cp_make_lake_type): Likewise.
* tree.c (init_tree): Init make_lang_type_fn.
1999-10-07 Mark Mitchell <mark@codesourcery.com>
* pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
parameter.
* semantics.c (expand_stmt): Don't pretend to have asmspecs for
local statics if we don't really have them.
* ir.texi: Improve documentation for STMT_EXPR. Describe
CLEANUP_POINT_EXPR.
1999-10-07 Jason Merrill <jason@yorick.cygnus.com>
* class.c (build_vtable_entry_ref): Use finish_asm_stmt.
1999-10-07 Greg McGary <gkm@gnu.org>
* class.c (finish_struct_1): Use simpler method of
removing elements of a singly-linked list which doesn't
lose for classes without data members.
1999-10-07 Mark Mitchell <mark@codesourcery.com>
* friend.c (make_friend_class): Robustify.
* semantics.c (finish_object_call_expr): Reject calls to template
types.
1999-10-06 Mark Mitchell <mark@codesourcery.com>
* dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
* cp-tree.h (CLASSTYPE_VFIELD): Remove.
* call.c (build_vfield_ref): Use TYPE_VFIELD, not
CLASSTYPE_VFIELD.
* class.c (get_vfield_offset): Likewise.
(finish_base_struct): Likewise.
(modify_one_vtable): Likewise.
(fixup_vtable_deltas): Likewise.
(finish_struct_1): Likewise.
* init.c (expand_virtual_init): Likewise.
* search.c (lookup_field_1): Likewise.
(expand_upcast_fixups): Likewise.
* typeck.c (build_component_ref): Likewise.
(build_binary_op_nodefault): Likewise.
* dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
* ir.texi: Document TYPE_VFIELD.
1999-10-06 Brendan Kehoe <brendan@cygnus.com>
* decl.c (grokdeclarator): Only warn about nonzero arrays if
!in_system_header (linux socketbits.h can give this for
__cmsg_data, which is using a GNU extension).
1999-10-05 Mark Mitchell <mark@codesourcery.com>
* decl2.c (start_static_storage_duration_function): Push the
function declaration so it ends up in namespace scope.
* dump.c (DUMP_CHILDREN): Remove.
(DUMP_BINFO): Adjust.
(struct dump_node_info): Remove dump_children_p.
(queue_and_dump_type): Remove dump_children_p parameter.
(queue): Don't set dump_children_p.
(dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
queue_and_dump_index.
(dequeue_and_dump): Unconditionally print children. Adjust calls
to functions mentioned above.
(dump_node): Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
* ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
* dump.c (dequeue_and_dump): Dump them.
* method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
* decl.c (start_function): Set current_in_charge_parm for
constructors, too, where appropriate.
* search.c (fixup_all_virtual_upcast_offsets): New function.
(expand_indirect_vtbls_init): Use it.
1999-10-04 Nathan Sidwell <nathan@acm.org>
* decl2.c (grok_alignof): Don't decay lvalues.
* init.c (build_new): Remove unused variable.
1999-10-04 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (struct language_function): Remove static_labelno.
(static_labelno): Remove macro.
* method.c (build_overload_nested_name): Make static_labelno
static here.
* pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
to decide whether or not a function is defined.
* call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
situations where make_node will do it automatically.
* decl.c (grok_reference_init): Likewise.
(expand_static_init): Likewise.
(do_static_initialization): Likewise.
* init.c (perform_member_init): Likewise.
(expand_aggr_init_1): Likewise.
(build_new_1): Likewise.
* method.c (do_build_copy_constructor): Likewise.
(do_build_assign_ref): Likewise.
* search.c (expand_upcast_fixups): Likewise.
* semantics.c (finish_stmt_expr): Likewise.
* typeck.c (build_unary_op): Likewise.
(check_return_expr): Likewise.
1999-10-04 Jason Merrill <jason@yorick.cygnus.com>
* init.c (build_vec_delete_1): Fold COND_EXPRs.
1999-10-03 Mark Mitchell <mark@codesourcery.com>
* cp-tree.def (VEC_INIT_EXPR): Remove.
* cp-tree.h (struct stmt_tree): New type.
(struct saved_scope): Remove firstobj. Add x_saved_tree,
x_stmt_tree.
(class_cache_firstobj): Remove.
(struct language_function): Remove stmts_are_full_exprs_p,
x_last_tree, and x_last_expr_type. Add x_stmt_tree.
(current_stmt_tree): New macro.
(last_tree): Adjust.
(last_expr_type): Likewise.
(doing_semantic_analysis_p): Simplify.
(stmts_are_full_exprs_p): Adjust.
(begin_tree): Remove prototype.
(end_tree): Likewise.
(begin_stmt_tree): Change prototype.
(finish_stmt_tree): Likewise.
(building_stmt_tree): Simplify.
* decl.c (mark_stmt_tree): New function.
(mark_saved_scope): Use it.
(start_function): Rearrange slightly to call begin_stmt_tree
earlier.
(save_function_data): Tweak.
(finish_function): Adjust call to finish_stmt_tree.
(mark_lang_function): Use mark_stmt_tree.
* expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
* init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
(build_vec_init): Remove creation of stand-in initializer.
* pt.c (begin_tree): Remove.
(end_tree): Likewise.
* semantics.c (SET_LAST_STMT): New macro. Use it throughout.
(begin_compound_stmt): Handle a compound-statement outside of a
function.
(begin_stmt_expr): Handle a statement-expression outsidef of a
function.
(finish_stmt_expr): Likewise.
(begin_class_definition): Don't call begin_tree.
(finish_inline_definitions): Don't call end_tree.
(begin_stmt_tree): Take a pointer to tree, not a function as input.
(finish_stmt_tree): Likewise.
* tree.c (search_tree): Don't handle VEC_INIT_EXPR.
(mapcar): Likewise.
* parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
* parse.c: Regenerated.
* dump.c (dqueue_and_dump): Dump bitfieldness.
* tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
bitfields, rather than DECL_BIT_FIELD.
* ir.texi: Document how to tell whether or not a field is a
bitfield.
* lex.c (make_lang_type): Fix typo in comment.
1999-10-01 Jason Merrill <jason@yorick.cygnus.com>
* typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
1999-10-01 Mark Mitchell <mark@codesourcery.com>
* pt.c (tsubst_decl): If the type of a template instantiation is
bogus, so is the whole instantiation.
1999-09-30 Mark Mitchell <mark@codesourcery.com>
* decl.c (initialize_local_var): Handle static variables here.
(cp_finish_decl): Tweak handling of function-scope static
variables.
* semantics.c (expand_stmt): Handle DECL_STMTs for static
variables.
* method.c (emit_thunk): Don't crash when -fsyntax-only.
* cp-tree.h (lang_decl_flags): Add global_ctor_p and
global_dtor_p. Add init_priority.
(DECL_ACCESS): Adjust accordingly.
(DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
(GLOBAL_INIT_PRIORITY): Likewise.
* decl.c (lang_mark_tree): Adjust accordingly.
(start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P,
and GLOBAL_INIT_PRIORITY.
* dump.c (dequeue_and_dump): Print them.
* ir.texi: Document them.
* decl2.c (struct priority_info_s): Remove initialization_sequence
and destruction_sequence.
(start_static_storage_duration_function): Return the body of the
function. Convert for function-at-a-time mode.
(generate_inits_for_priority): Remove.
(finish_static_storage_duration_function): Change prototype.
Adjust for function-at-a-time mode.
(do_static_initialization): Likewise.
(do_static_destruction): Likewise.
(do_static_initialization_and_destruction): Remove.
(start_static_initialization_or_destruction): New function.
(finish_static_initialization_or_destruction): Likewise.
(get_priority_info): Don't manipulation initialization_sequence or
destruction_sequence.
(prune_vars_needing_no_initialization): New function.
(write_out_vars): Likewise.
(finish_file): Use the various new functions instead of the old.
Thu Sep 30 00:13:27 1999 Dirk Zoller <duz@rtsffm.com>
* cp-tree.h (warn_float_equal): Declare.
* decl2.c (warn_float_equal): Define.
(lang_decode_option): Recognize -W[no-]float-equal.
* typeck.c (build_binary_op_nodefault): Conditionally warn
about equality tests of floating point types.
1999-09-29 Jason Merrill <jason@yorick.cygnus.com>
Support normal type_info-based EH mechanisms with -fno-rtti.
* except.c (build_eh_type_type): Remove special -fno-rtti handling.
(build_eh_type_type_ref): Likewise.
(build_eh_type): Remove.
(expand_throw): Call build_eh_type_type, not build_eh_type.
* decl2.c (import_export_decl): Don't associate the tinfo fn with
the vtable if -fno-rtti.
* decl.c (init_decl_processing): Always init_rtti_processing.
* rtti.c (get_typeid): Don't complain about -fno-rtti.
* class.c (class_cache_obstack, class_obstack): Remove.
(init_class_processing): Don't initialize class_obstack.
(push_cache_obstack): Remove.
(pushclass): Don't call it.
* cp-tree.h: Remove prototype for push_cache_obstack.
* decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
(pushlevel_class): Don't push_decl_level.
(poplevel_class): Don't pop_stack_level.
(push_class_level_binding): Don't push_cache_obstack.
(init_decl_processing): Don't initialize decl_obstack.
* search.c (push_class_decls): Don't push_cache_obstack.
* tree.c (list_hash_add): Put hash node on permanent_obstack.
(hash_tree_cons): Don't mess with obstacks.
(print_lang_statistics): Don't print stats for class_obstack and
decl_obstack.
1999-09-29 Mark Mitchell <mark@codesourcery.com>
* dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
* ir.texi: Document DECL_EXTERNAL.
* dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
* ir.texi: Document THUNK_DECLs.
* cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
(TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
(TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
* error.c (dump_template_bindings): Remove unused parameter.
Handle multiple levels of template parameters.
(dump_template_decl): Use `parms', not `args', for template
parameters. Fix thinko.
(dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION. Don't pass
flags to dump_template_bindings.
* pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
(TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
(TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
(tsubst_copy): Clarify variable name.
(most_general_template): Robustify.
1999-09-29 Nathan Sidwell <nathan@acm.org>
* error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
to change primary template rendering.
1999-09-29 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (UPT_TEMPLATE): Remove.
(UPT_PARMS): Likewise.
(DECL_NEEDED_P): New macro.
* decl2.c (finish_vtable_vardecl): Use it.
(finish_objects): Don't crash with -fsyntax-only.
(finish_file): Use DECL_NEEDED_P. Don't prune vtables when
-fsyntax-only.
* pt.c (tsubst_friend_function): Remove FIXME that talks about
obstacks.
(tsubst_expr): Correct handling of function try-blocks.
* semantics.c: Include flags.h.
(expand_body): Don't do RTL generation if -fsyntax-only.
* Makefile.in (semantics.o): Depends on flags.h.
1999-09-28 Gabriel Dos Reis <gdr@codesourcery.com>
* pt.c (most_general_template): Adjust declaration.
* cp-tree.h: (most_general_template): Declare.
* error.c (dump_template_value): Rename to ...
(dump_template_argument): This.
(dump_template_argument_list): New function.
(dump_type): Use it.
(dump_template_parameter): New function.
(dump_template_decl): Use it.
(dump_template_bindings): New function.
(dump_function_decl): Use it. Pretty print function template
instantiations.
1999-09-28 Nathan Sidwell <nathan@acm.org>
* decl.c (grokdeclarator): Distinguish parameter context for
diagnostics. Tidy up missing type diagnostic.
Diagnose `explicit' in one place. Diagnose `mutable' in one place.
1999-09-28 Mark Mitchell <mark@codesourcery.com>
* ir.texi: Improve documentation for TARGET_EXPR.
1999-09-27 Nathan Sidwell <nathan@acm.org>
Augment stringification of trees.
* cp-tree.h (tree_string_flags): New error stringifying enumeration.
(fndecl_as_string, type_as_string_real, args_as_string,
code_as_string, language_as_string, parm_as_string,
op_as_string, assop_as_string, cv_as_string): Remove.
(type_as_string, decl_as_string, expr_as_string): Adjust prototype.
(context_as_string): Declare new function.
* error.c (cp_printers): Move definition.
(OB_UNPUT): Remove.
(OB_END_TEMPLATE_ID): Adjust.
(interesting_scope_p): Remove.
(dump_scope): New static function.
(dump_qualifiers): Adjust prototype, reimplement.
(dump_template_value): Use tree_string_flags.
(dump_type_real): Move back to dump_type.
(dump_type): Adjust prototype. Use tree_string_flags.
(dump_aggr_type): Likewise. Use dump_template_parms.
(dump_type_prefix): Adjust prototype. Use tree_string_flags.
Return pad flag.
(dump_type_suffix): Adjust prototype. Use tree_string_flags.
(dump_simple_decl): Likewise.
(dump_decl): Likewise. Use dump_template_decl.
(dump_template_decl): New static function broken out of dump_decl.
(dump_function_decl): Adjust prototype. Use tree_string_flags.
(dump_parameters): Likewise. Prefix space.
(dump_exception_spec): Adjust prototype. Use tree_string_flags.
(dump_function_name): Likewise. Use dump_template_parms.
(dump_template_parms): New static function broken out of
dump_function_name.
(dump_expr_list): Adjust prototype. Use tree_string_flags.
(dump_expr): Likewise.
(fndecl_as_string): Removed
(type_as_string_real): Removed
(dump_binary_op): Adjust prototype. Use tree_string_flags.
(dump_unary_op): Likewise.
(type_as_string): Likewise.
(expr_as_string): Likewise.
(decl_as_string): Likewise.
(context_as_string): New function.
(lang_decl_name): Adjust.
(decl_to_string): New static print callback.
(expr_to_string): Likewise.
(fndecl_to_string): Likewise.
(code_as_string): Renamed to ...
(code_to_string): ... here. Adjust.
(language_as_string): Renamed to ...
(language_to_string): ... here. Adjust.
(parm_as_string): Renamed to ...
(parm_to_string): ... here.
(op_as_string): Renamed to ...
(op_to_string): ... here.
(assop_as_string): Renamed to ...
(assop_to_string): ... here.
(type_to_string): New static print callback.
(args_as_string): Renamed to ...
(args_to_string): ... here. Adjust.
(cv_as_string): Renamed to ...
(cv_to_string): ... here. Adjust.
* pt.c (mangle_class_name_for_template): Use tree_string_flags.
(print_template_context): Likewise.
1999-09-26 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (expand_throw): Remove prototype.
* except.c (expand_throw): Make it static. Use tree-generation
functions, rather than RTL-generation functions.
(build_throw): Use it.
* expr.c: Include except.h.
(cplus_expand_expr): Don't call expand_throw here.
* Makefile.in (expr.o): Depend on except.h.
* ir.texi: Update documentation for THROW_EXPR.
* decl.c (start_function): Set x_dont_save_pending_sizes rather
than calling get_pending_sizes.
* init.c (build_new): Don't save and restore
immediate_size_expand; instead, assert that it has the expected
value already.
1999-09-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* lex.c (compiler_error): Add missing call to va_end().
1999-09-25 Mark Mitchell <mark@codesourcery.com>
* dump.c (dequeue_and_dump): Handle RESULT_DECL.
* ir.texi: Document RESULT_DECL and DECL_RESULT.
* cp-tree.h (check_return_expr): New function.
* decl.c (finish_constructor_body): New function.
(pushdecl): Put global friend functions in namespace binding
level, not the class binding level.
(finish_destructor_body): Make sure the dtor_label is always
defined. Fix typo in comment.
(finish_function): Move generation of constructor-termination code
to semantic-analysis time. Move generation of implicit `main'
return value to semantic-analysis time.
* semantics.c (finish_return_stmt): Generate goto's to
ctor_label/dtor_label here. Use check_return_expr to do semantic
analysis on the returned expression.
* typeck.c (maybe_warn_about_returning_address_of_local): New
function split out from c_expand_return.
(check_return_expr): Likewise.
(c_expand_return): Just generate the RTL for the return.
1999-09-24 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
(cleanup_type): Likewise.
(search_tree): Change prototype.
* decl.c (local_variable_p): Adjust for new interface to
search_tree.
(check_default_argument): Likewise.
* error.c (dump_expr): Handle INIT_EXPR.
* except.c (expand_throw): Don't make cleanup_type a local static.
* expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
* init.c (build_new): Call build_new_1 directly, rather than
building a NEW_EXPR.
(build_new_1): Tidy. Don't build a VEC_INIT_EXPR except when
processing file-scope initializers.
* lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
* tree.c: Include splay-tree.h
(no_linkage_helper): Adjust for new interface to search_tree.
(search_tree): Pass around pointers to tree nodes, rather than the
nodes themselves. Handle VEC_INIT_EXPR.
(no_linkage_check): Adjust for new interface to search_tree.
(mapcar): Handle VEC_INIT_EXPR.
(target_remap): New variable.
(bot_manip): Use it.
(bot_replace): New function.
(break_out_target_exprs): Use it to remap all variables used in a
default argument expression.
* typeck.c (build_modify_expr): Don't crash when outside a
function and presented with an INIT_EXPR assignment
* Makefile.in (tree.o): Depend on splay-tree.h.
Fri Sep 24 10:48:10 1999 Bernd Schmidt <bernds@cygnus.co.uk>
* decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
DECL_BUILT_IN.
(builtin_function): New arg CLASS. Arg CODE now of type int. All
callers changed.
Set the builtin's DECL_BUILT_IN_CLASS.
1999-09-24 Mark Mitchell <mark@codesourcery.com>
* decl.c (pushdecl): Don't make local declarations of extern
variables give the variable a DECL_CONTEXT for the function.
(make_rtl_for_nonlocal_decl): Don't fuss with obstacks. Simplify.
Don't accidentally make RTL for local declarations.
(emit_local_var): Handle declarations with asm-specifiers here.
1999-09-23 Mark Mitchell <mark@codesourcery.com>
* ir.texi: Improve documentation for TARGET_EXPRs. Discuss
STMT_IS_FULL_EXPR_P.
* cp-tree.h (language_function): Add cannot_inline.
* decl.c (start_function): Restore current_function_cannot_inline
from the saved value.
(save_function_data): Save current_function_cannot_inline.
* decl2.c (start_objects): Change prototype. Build the function
in function-at-a-time mode.
(finish_objects): Likewise.
(generate_ctor_or_dtor_function): Adjust accordingly.
* cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
* decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
Don't call expand_anon_union_decl here
* semantics.c (exapnd_stmt): Call it here, instead.
* typeck.c (mark_addressable): Addressed variables are implicitly
used.
1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
* cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
(RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
(DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
* cp-tree.h: Add tree checking macros to various tree access
macros.
* ptree.c (print_lang_decl): Test for function or variable
before accessing template info.
1999-09-23 Jason Merrill <jason@yorick.cygnus.com>
* lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
* lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
* decl2.c (lang_f_options): Add -fshort-wchar.
* cp-tree.h: Declare flag_short_wchar.
* decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned
int' for wchar_t.
1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
* ir.texi: Fix formatting errors and typos.
1999-09-22 Mark Mitchell <mark@codesourcery.com>
* ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
* decl.c (pushdecl): Do create a binding for extern "C" functions,
but not for their DECL_ASSEMBLER_NAMEs.
(lookup_name_current_level): Fix formatting.
(xref_tag): Likewise.
* decl2.c (start_objects): Mark static constructors and
destructors as used.
1999-09-22 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (define_case_label): Don't crash if we're not in a switch.
* decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
* lang-options.h: Restore -fthis-is-variable. Remove help strings
for unsupported flags.
1999-09-21 Jason Merrill <jason@yorick.cygnus.com>
* decl2.c (lang_decode_option): Accept and ignore -finit-priority.
Accept and warn about -fthis-is-variable.
1999-09-21 Mark Mitchell <mark@codesourcery.com>
* dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
CLEANUP_STMT, and SCOPE_STMT.
* decl2.c (lang_decode_option): Adjust, in the wake of recent
changes to option processing.
1999-09-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
* typeck.c (get_member_function_from_ptrfunc): Allow extraction of
function pointer from pmfs with no object given.
(convert_for_assignment): Do not return error when converting
pmfs.
1999-09-21 Alex Samuel <samuel@codesourcery.com>
* lex.c (internal_filename): New variable.
(INTERNAL_FILENAME): New macro.
(init_parse): Allocate internal_filename and mark as root. Use it
instead of a string constant.
1999-09-21 Nathan Sidwell <nathan@acm.org>
Reimplement dynamic cast and catch matching.
* cp-tree.h (get_dynamic_cast_base_type): Prototype new function
* search.c (dynamic_cast_base_recurse): New function.
(get_dynamic_cast_base_type): New function for dynamic cast.
* rtti.c (build_dynamic_cast_1): Determine source and target
class relationship. Call __dynamic_cast_2.
* tinfo.h (__user_type_info::upcast): New catch dispatcher.
(__user_type_info::dyncast): New dynamic cast dispatcher.
(__user_type_info::sub_kind): New nested enumeration.
(__user_type_info::contained_p): sub_kind predicate.
(__user_type_info::contained_public_p): Likewise.
(__user_type_info::contained_nonpublic_p): Likewise.
(__user_type_info::contained_nonvirtual_p: Likewise.
(__user_type_info::upcast_result): New nested struct.
(__user_type_info::dyncast_result): New nested struct.
(*::do_upcast): New catch function.
(*::do_dyncast): New dynamic cast function.
(__user_type_info::find_public_subobj): New dynamic cast
helper dispatcher.
(*::do_find_public_subobj): New dynamic cast helper function.
* tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
(__user_type_info::dyncast): Define dynamic cast dispatcher.
(*::do_upcast): Define catch function.
(*::do_dyncast): Define dynamic cast function.
(*::do_find_public_subobj): Define dynamic cast helper function.
* tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
(__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
(__dynamic_cast_2): New dynamic cast runtime.
1999-09-20 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (finish_stmt_expr): Change prototype.
* expr.c (cplus_expand_expr): Adjust call accordingly.
* init.c (finish_init_stmts): Likewise.
* parse.y (primary): Likewise.
* pt.c (tsubst_copy): Likewise.
* semantics.c (finish_stmt_expr): Don't take two parameters.
Don't remove generated BLOCKs from the block-tree.
Remove support for assigning to `this'.
* NEWS: Note that fact.
* class.c (build_vbase_path): Don't check flag_this_is_variable.
* cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
(language_function): Remove assigns_this, just_assigned_this, and
x_base_init_expr. Add x_vcalls_possible_p. Add vtbls_set_up_p.
(base_init_expr): Remove.
(current_vcalls_possible_p): New macro.
(vtbls_set_up_p): Likewise.
(emit_base_init): Change prototype.
* decl.c (finish_destructor_body): New function, split out from
finish_function.
(current_function_assigns_this): Remove.
(current_function_just_assigned_this): Likewise.
(start_function): Don't set them.
(finish_function): Don't check them. Don't emit
base-initialization code here. Generate code for destructors when
doing semantic analysis.
(finish_stmt): Don't check current_function_just_assigned_this.
* decl2.c (lang_f_options): Remove this-is-variable.
(lang_decode_option): Likewise.
(grokclassfn): Don't check flag_this_is_variable.
* init.c (emit_base_init): Return the expression generated.
(construct_virtual_bases): Don't push/pop obstacks. Fix
typo.
(build_new_1): Don't check flag_this_is_variable.
(get_temp_regvar): Don't set DECL_REGISTER.
(build_vec_init): Don't call use_variable.
* lang-options.h: Remove "-fthis-is-variable" and
"-fno-this-is-variable".
* pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
* search.c (expand_upcast_fixups): Use finish_expr_stmt, not
expand_expr_stmt.
* semantics.c (finish_expr_stmt_real): Rename to ...
(finish_expr_stmt): This. Remove assigned_this parameter.
(begin_if_stmt): Call do_pushlevel before starting the statement.
(begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
blocks.
(setup_vtbl_ptr): Emit initialization code for bases and members
at semantic-analysis time. Emit code to initialize vtables in
destructors here.
(expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
Don't handle CTOR_INITIALIZER any more.
* typeck.c (build_modify_expr): Don't check for assignments to
this.
(c_expand_return): Don't suggest assigning to `this'.
* Makefile.in (decl.o): Depend on RTL_H.
(decl2.o): Likewise.
(class.o): Likewise.
(call.o): Likewise.
(method.o): Likewise.
(search.o): Likewise.
(tree.o): Likewise.
(pt.o): Likewise.
* decl.c (duplicate_decls): When a builtin function is redeclared
as static, make sure it is mangled correctly.
* ir.texi (CTOR_INITIALIZER): Remove mention. Fix typo. Add
detail about the statement-tree.
1999-09-20 Nathan Sidwell <nathan@acm.org>
* parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
1999-09-20 Nick Clifton <nickc@cygnus.com>
* decl2.c (lang_decode_option): Extend comment.
Mon Sep 20 10:49:05 1999 Bernd Schmidt <bernds@cygnus.co.uk>
* typeck.c: Include "tm_p.h".
1999-09-19 Mark Mitchell <mark@codesourcery.com>
* ir.texi: New file.
1999-09-19 Paul Burchard <burchard@pobox.com>
* semantics.c (expand_stmt): Initialize return value.
1999-09-18 Paul Burchard <burchard@pobox.com>
* gxxint.texi: G++ now implements namespaces.
1999-09-18 Mark Mitchell <mark@codesourcery.com>
* decl.c (pop_label): Don't warn about unused labels more than
once.
* semantics.c (finish_goto_stmt): Always marked used labels as
used.
* decl.c (layout_var_decl): Change prototype. Call layout_decl
even when the declaration is external.
(cp_finish_decl): Adjust call to layout_var_decl.
* pt.c (tsubst_expr): Make sure to initialize stmt before using it.
1999-09-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
* typeck.c (get_member_function_from_ptrfunc): Always consider
virtuality inside member pointer.
1999-09-17 Mark Mitchell <mark@codesourcery.com>
Turn on function-at-a-time processing.
* cp-tree.h (doing_semantic_analysis_p): New macro.
(SF_DEFAULT): Define to zero, not SF_EXPAND.
(start_handler_parms): Change prototype.
(expand_start_catch_block): Likewise.
(expand_end_catch_block): Likewise.
(expand_start_eh_spec): Likewise.
(expand_end_eh_spec): Declare.
(finish_handler_parms): Change prototype.
(begin_catch_block): Declare.
(finish_handler): Change prototype.
(do_pushlevel): Declare.
(do_poplevel): Likewise.
* decl.c (pushlevel): Don't create
binding levels when not doing semantic analysis.
(poplevel): Don't pop them.
(pushdecl): Assert that we are never called when not doing
semantic analysis.
(pushdecl_top_level): Use push_to_top_level.
(make_label_decl): Don't fiddle with obstacks. Make RTL For the
label when expanding.
(cp_finish_decl): Only inject for-scope variables when doing
semantic analysis. Add comments.
(start_handler_parms): Return the handler parm.
(start_function): Reorganize. Don't clear DECL_INITIAL if it is
already set. Reinitialize from saved function data if available.
Don't pushlevel when not doing semantic analysis.
(store_parm_decls): Only generate RTL when expanding. Only
pushdecl when doing semantic analysis. Set
current_eh_spec_try_block if appropriate.
(finish_function): Simplify. Use do_pushlevel and do_poplevel.
Combine common code. Don't poplevel when not doing semantic
analysis.
(push_cp_function_context): Don't expand functions without an
explicit call to expand_body.
(mark_lang_function): Make eh_spec_try_block and
x_scope_stmt_stack.
* except.c (expand_end_eh_spec): Don't
declare.
(process_start_catch_block): Likewise.
(push_eh_cleanup): Use finish_decl_cleanup.
(initialize_handler_parm): New function.
(expand_start_catch_block): Use it.
(expand_end_catch_block): Use tree-generation functions, not
RTL-generation functions.
(expand_start_eh_spec): Likewise.
(expand_end_eh_spec): Likewise.
(expand_exception_blocks): Simplify.
(start_anon_func): Use do_pushlevel.
(end_anon_func): Use do_poplvel. Call expand_body for the
function.
* expr.c (do_case): Don't call define_case_label.
* init.c (create_temporary_var): Set DECL_CONTEXT for local
variables.
* method.c (emit_thunk): Call expand_body for the
thunk.
(sythesize_method): Likewise.
* parse.y (handler_args): Give it ttype.
(eat_saved_input): Call expand_body.
(base_init): Use do_pushlevel.
(pending_inline): Call expand_body.
(handler): Adjust calls to finish_handler_parms and
finish_handler.
(handler_args): Don't call expand_start_catch_block. Return the
catch parameter. * pt.c (tsubst_expr): Adjust HANDLER handling.
* parse.c: Regenerated.
* rtti.c (synthesize_tinfo_fn): Call finish_function.
* semantics.c (do_pushlevel): Give it external linkage. Build
SCOPE_STMTs.
(do_poplevel): Likewise.
(finish_case_label): Call define_case_label when doing semantic
analysis.
(finish_goto_stmt): Create RTL for labels.
(finish_function_try_block): Set in_function_try_handler
unconditionally.
(finish_function_handler_sequence): Unset it.
(finish_handler_parms): Use expand_start_catch_block even when
building a statement-tree.
(begin_catch_block): New function.
(finish_handler): Move a little RTL-generation logic here.
(finish_decl_cleanup): Allow cleanups for empty declarations.
(finish_named_return_value): Don't pushdecl when not doing
semantic analysis.
(expand_stmt): Don't do semantic analysis for variable
declarations. Handle START_CATCH_STMT. Call expand_label
directly for a LABEL_STMT. Tweak handling of GOTO_STMT. Adjust
HANDLERs. Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
(expand_body): Let expand_stmt handle CTOR_INITIALIZER,
RETURN_INIT and function try blocks.
* cp-tree.h (language_function): Add x_eh_spec_try_block. Add
x_scope_stmt_stack. Add x_in_charge_parm.
(current_eh_spec_try_block): New macro.
(current_scope_stmt_stack): Likewise.
(current_in_charge_parm): Likewise.
* decl.c (start_function): Initialize current_in_charge_parm.
(finish_function): Use current_in_charge_parm rather than looking
up __in_chrg.
* search.c (expand_indirect_vtbls_init): Likewise.
* cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
(TRY_BLOCK): Likewise.
(HANDLER): Likewise.
(START_CATCH_STMT): New tree node.
(SCOPE_STMT): Likewise.
* cp-tree.h (SCOPE_BEGIN_P): New macro.
(SCOPE_NULLIFIED_P): Likewise.
(struct lang_decl_flags): Add pending_inline_p. Adjust dummy.
(struct lang_decl): Add saved_language_function.
(DECL_PENDING_INLINE_INFO): Adjust documentation.
(DECL_PENDING_INLINE_P): New macro.
(TYPE_TI_ARGS): Fix typo in comment.
(DECL_SAVED_TREE): Add to documentation.
(DECL_SAVED_FUNCTION_DATA): New macro.
(START_CATCH_TYPE): Likewise.
(SCOPE_END_P): New macro.
(declare_parm_level): Don't declare.
* decl.c (mark_lang_function): New function, split out from
mark_cp_function_context.
(save_function_data): New function.
(declare_parm_level): Remove.
(finish_function): Use save_function_data to squirrel away
important stuff for later use.
(mark_cp_function_context): Use mark_function_data.
(lang_mark_tree): Likewise.
* lex.c (begin_definition_of_inclass_inline): Set
DECL_PENDING_INLINE_P.
(store_pending_inline): Clear it.
* pt.c (tsubst_decl): Likewise.
1999-09-17 Nathan Sidwell <nathan@acm.org>
* call.c (perform_implicit_conversion): Deal with error_mark_node.
1999-09-17 Mark Mitchell <mark@codesourcery.com>
* decl.c (warn_extern_redeclared_static): Don't get confused by
static member functions.
(duplicate_decls): Merge DECL_THIS_STATIC.
* decl.c (expand_static_init): Make sure assignments to local
statics actually occur.
1999-09-17 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (poplevel_class): Declare.
* class.c (popclass): Use poplevel_class, not poplevel.
* decl.c (poplevel_class): Don't make it static. Don't return a
value.
(poplevel): Don't call poplevel_class; abort in a class
binding level is seen.
* semantics.c (finish_translation_unit): Use pop_everything.
* parse.y (member_init): Allow errors.
(pending_inline): Call finish_function.
* parse.c: Regenerated.
* Makefile.in (CONFLICTS): Adjust.
1999-09-17 Gabriel Dos Reis <gdr@codesourcery.com>
* error.c: Reduce code duplication.
(dump_template_value): New function.
(dump_type_real): Use it.
(dump_decl): Likewise.
(dump_function_name): Likewise.
(dump_function_decl): Don't be too talkative about function return
type variety.
1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
* xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
1999-09-16 Jason Merrill <jason@yorick.cygnus.com>
* decl2.c (finish_file): Also call check_global_declarations for
the pending_statics list.
1999-09-15 Jason Merrill <jason@yorick.cygnus.com>
* lex.c (cp_pragma_implementation): Allow #pragma implementation
in header files.
1999-09-15 Richard Henderson <rth@cygnus.com>
* lex.c (mark_impl_file_chain): Follow the next chain.
1999-09-15 Mark Mitchell <mark@codesourcery.com>
* decl.c (warn_extern_redeclared_static): Simplify. Catch
problems with extern "C" functions redeclared as static.
(duplicate_decls): When a builtin is redeclared static, make the
new function have internal linkage.
1999-09-15 Mark Mitchell <mark@codesourcery.com>
* decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
* pt.c (tsubst_copy): Likewise.
* tree.c (search_tree): Likewise.
(mapcar): Likewise.
1999-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* typeck2.c (ack): Don't declare progname.
1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
* lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
filenames with ggc_alloc_string.
1999-09-14 Mark Mitchell <mark@codesourcery.com>
* decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the
TARGET_EXPR.
* call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
the TARGET_EXPR.
* cvt.c (build_up_reference): Likewise.
* tree.c (build_cplus_new): Likewise.
(get_target_expr): Likewise.
Tue Sep 14 01:45:10 1999 Marc Espie <espie@cvs.openbsd.org>
* Makefile.in: Prepend $(SHELL) to move-if-change calls.
1999-09-13 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (build_target_expr): New function.
* call.c (build_conditional_expr): Use build_target_expr.
(convert_like): Likewise.
(build_over_call): Likewise.
* cvt.c (build_up_reference): Likewise.
* decl.c (build_cleanup_on_safe_obstack): Fold into ...
(destroy_local_var): Here.
(build_target_expr): New function.
* tree.c (build_cplus_new): Use it.
(get_target_expr): Likewise.
1999-09-13 Nathan Sidwell <nathan@acm.org>
* typeck.c (expr_sizeof): Don't decay arrays and functions.
Remove misleading comment.
(build_compound_expr): Don't decay arrays.
1999-09-13 Jason Merrill <jason@yorick.cygnus.com>
* call.c (build_conditional_expr): Always use a TARGET_EXPR for
class rvalues again.
Sun Sep 12 23:29:07 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
* g++spec.c: Include gcc.h.
(lang_specific_driver): Constify a char*. Call xcalloc, not
xmalloc/bzero. All calls to the function pointer parameter now
explicitly call `fatal'.
1999-09-12 Mark Mitchell <mark@codesourcery.com>
* call.c (implicit_conversion): Robustify. Handle OFFSET_REFs.
* cvt.c (ocp_convert): Complete the from and destination types.
Adjust warning about functions always being `true' in conditionals.
* decl.c (duplicate_decls): Don't play funny games with abort.
* error.c (dump_expr): Handle OVERLOADs.
* spew.c (probe_obstack): Remove.
* typeck.c (condition_conversion): Use perform_implicit_conversion.
1999-09-12 Bernd Schmidt <bernds@cygnus.co.uk>
* cp-tree.h (auto_function, define_function): Adjust prototypes.
* decl.c (define_function): Lose FUNCTION_CODE arg. All callers
changed.
(auto_function): Likewise, for CODE arg.
Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
(builtin_function): ... here.
1999-09-11 Mark Mitchell <mark@codesourcery.com>
* decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
(init_decl_processing): Don't set TREE_PERMANENT for the
error_mark_node.
(start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
(grokdeclarator): Likewise.
(grokparms): Don't check TREE_PERMANENT when building up lists.
* decl2.c (grokfield): Don't assert TREE_PERMANENT.
(mark_inline_for_output): Likewise.
* expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
* init.c (build_offset_ref): Don't check TREE_PERMANENT.
* lex.c (check_newline): Don't check ggc_p; it is always one.
* pt.c (process_template_parm): Don't check TREE_PERMANENT.
* spew.c (yylex): Don't copy_node or probe_obstacks for
non-permanent CONSTANTs and STRINGs.
* tree.c (build_cplus_array_type_1): Don't fuss with
TREE_PERMANENT on ARRAY_TYPEs.
* cp-tree.def (CLEANUP_STMT): New node.
* cp-tree.h (language_function): Add name_declared.
(current_function_name_declared): New macro.
(CLEANUP_DECL): New macro.
(CLEANUP_EXPR): Likewise.
(emit_local_var): Likewise.
(finish_decl_cleanup): New function.
* cvt.c (build_up_reference): Simplify.
(ocp_convert): Remove dead code.
* decl.c (start_decl): Remove call to add_decl_stmt.
(grok_reference_init): Adjust, to handle bindings temporaries to
references. Remove dead code.
(initialize_local_var): Don't generate RTL for
declarations here, or build cleanups here. Don't fuss with
obstacks. Replace expand_start_target_temps calls with explicit
setting of stms_are_full_exprs_p.
(destroy_local_var): New function.
(emit_local_var): Likewise.
(cp_finish_decl): Use them, as appropriate.
(start_function): Announce template functions.
(store_parm_decls): Don't call declare_function_name here.
(finish_stmt): Don't start emit base-initialization code when just
building the statement-tree.
* init.c (create_temporary_var): Move add_decl_stmt call ...
(get_temp_regvar): Here.
* pt.c (tsubst_expr): Make DECL_INITIAL look like what
cp_finish_decl would expect. Don't call add_decl_stmt.
* semantics.c (begin_compound_stmt): Call declare_function_name,
if appropriate.
(finish_decl_cleanup): New function.
(expand_stmt): Use emit_local_var to output variables.
(expand_body): Set current_function_name_declared.
1999-09-10 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (finish_cleanup_try_block): New function.
* semantics.c (finish_cleanup_try_block): Add comment.
Fri Sep 10 10:32:32 1999 Bernd Schmidt <bernds@cygnus.co.uk>
* cp-tree.h: Delete declarations for all tree nodes now moved to
global_trees.
* decl.c: Delete their definitions.
(SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
provide defaults.
(init_decl_processing): Call build_common_tree_nodes and
build_common_tree_nodes_2 instead of building their nodes here.
Don't add gc roots for them.
1999-09-10 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (language_function): Rename expanding_p to
x_expanding_p. Rename named_label_uses to x_named_label_uses.
(expanding_p): Adjust accordingly.
(TREE_VIA_PRIVATE): Fix typo in comment.
(DECL_REFERENCE_SLOT): Remove.
(SET_DECL_REFERENCE_SLOT): Likewise.
* decl.c (named_label_uses): Adjust. Remove chicken comment.
(push_overloaded_decl): Don't truncate the chain of bindings when
adding an overloaded function.
(grok_reference_init): Don't use DECL_REFERENCE_SLOT.
(initialize_local_var): Fix typo in comment.
(store_parm_decls): Don't set DECL_REFERENCE_SLOT. Tidy up.
* decl2.c (start_objects): Make the fact that we are expanding
the generated function right away explicit.
(start_static_storage_duration_function): Likewise.
(finish_file): Fix typo in comment.
* init.c (build_vec_init): Correct bugs in handling cleanups.
* semantics.c (maybe_convert_cond): New function.
(FINISH_COND): Always store the condition, even if there's
a declaration.
(finish_if_stmt_cond): Use maybe_convert_cond.
(finish_while_stmt_cond): Likewise.
(finish_do_stmt): Likewise.
(finish_for_cond): Likewise.
(expand_cond): Adjust.
* cp-tree.h (FN_TRY_BLOCK_P): New macro.
* init.c (perform_member_init): Remove obstack machinations.
(expand_cleanup_for_base): Likewise.
(finish_init_stmts): Mark the statement-expression as used.
* method.c (emit_thunk): Use tree-generating functions, not
RTL.
(do_build_copy_constructor): Likewise.
(do_build_assign_ref): Likewise.
(synthesize_method): Likewise. Keep track of line numbers.
* pt.c (tsubst_expr): Handle various kinds of try blocks.
* semantics.c (expand_stmts): Remove.
(begin_function_try_block): Set FN_TRY_BLOCK_P.
(finish_function_try_block): Be careful rechaining
function try blocks.
(expand_stmt): Loop through all the statements at a given level.
(exapnd_body): Be careful with line-numbers here too. Prepare for
being called directly from the parser.
* cp-tree.h (finish_function): Adjust prototype.
* decl.c (finish_function): Return the function compiled.
* pt.c (instantiate_decl): Don't play games with obstacks.
* tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
(search_tree): Likewise.
* typeck.c: Fix typo in comment.
* typeck2.c (store_init_value): Add comment.
* cp-tree.h (CPTI_ATEXIT): New macro.
(atexit_node): Likewise.
* decl.c (destroy_local_static): New function, broken out from ...
(expand_static_init): Here.
* rtti.c (get_tinfo_var): These should always be global
(expand_si_desc): Use tree, not RTL, functions to generate code.
(expand_class_desc): Likewise.
(expand_ptr_desc): Likewise.
(expand_attr_desc): Likewise.
(expand_generic_desc): Likewise.
(synthesize_tinfo_fn): Likewise.
1999-09-09 Mark Mitchell <mark@codesourcery.com>
* semantics.c (RECHAIN_STMTS): Remove `last' parameter.
(RECHAIN_STMTS_FROM_LAST): Remove. Replace all uses with
RECHAIN_STMTS.
(RECHAIN_STMST_FROM_CHAIN): Likewise.
* parse.y (simple_stmt): Fix typo in last change.
* cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
(STMT_IS_FULL_EXPR_P): Likewise.
(STMT_LINENO_FOR_FN_P): Likewise.
(prep_stmt): New function.
(building_stmt_tree): Tweak for safety.
* pt.c (tsubst_expr): Use prep_stmt throughout.
(add_tree): Move it to semantics.c
* semantics.c (add_tree): Move it here.
(finish_expr_stmt_real): New function.
(finish_expr_stmt): Use it.
(finish_if_stmt_cond): Use FINISH_COND.
(finish_while_stmt_cond): Likewise.
(finish_for_cond): Likewise.
(finish_stmt_tree): Tweak line-number handling.
(prep_stmt): New function.
(expand_stmt): Use it.
* cp-tree.h (begin_switch_stmt): Adjust prototype.
(finish_switch_cond): Likewise.
* parse.y (simple_stmt): Adjust accordingly.
* parse.c: Regenerated.
* pt.c (tsubst_expr): Adjust accordingly.
* semantics.c (expand_cond): New function.
(FINISH_COND): New macro.
(begin_switch_stmt): Build the SWITCH_STMT here.
(finish_switch_stmt_cond): Not here.
(expand_stmt): Adjust calls to begin_switch_stmt and
finish_switch_cond. Use expand_cond throughout.
* dump.c (dequeue_and_dump): Dump types for constants.
Describe DECL_ARG_TYPE more intuitively.
Handle ARRAY_REF.
* decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
(lang_cleanup_tree): Remove.
* lex.c (make_lang_type): Use ggc_alloc to allocate
TYPE_LANG_SPECIFIC.
Reorganize per-function data.
* cp-tree.h (saved_scope): Add function_decl, bindings.
(language_function): Rename binding_level to bindings.
(cp_function_chain): Use the current_function, not the
outer_function_chain.
(current_class_ptr): Make it work, even when there's no
current function.
(current_class_ref): Likewise.
(SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New
macros.
(clear_temp_name): Remove.
* decl.c (check_function_type): New function, broken out from
start_function.
(current_binding_level): Adjust definition.
(pushlevel): Simplify.
(poplevel): Don't use named_label_uses when we're outside
a function scope.
(mark_saved_scope): Mark function_decl and bindings.
(maybe_push_to_top_level): Don't unconditionally push a new
function context. Save bindings and the current_function_decl.
Don't clear named_labels.
(pop_from_top_level): Pop function context if appropriate.
(init_decl_processing): Set init_lang_status and free_lang_status,
rather than save_lang_status and restore_lang_status.
(start_function): Take SF_* flags. Don't clear per-function data.
Reorder and simplify to use new per-function data code. Add
asserts.
(store_parm_decls): Don't call init_function_start here.
(finish_function): Adjust for new handling of per-function data.
(push_cp_function_context): Simplify.
(mark_cp_function_context): Change binding_level to bindings.
* decl2.c (clear_temp_name): Remove.
(start_objects): Use SF flags to start_function.
(start_static_storage_duration_function): Likewise.
* except.c (start_anon_func): Remove redundant calls to
push_function_context_to. Use SF flags to start function.
(end_anon_func): Remove redundant call to pop_function_context
from.
* lex.c (reinit_parse_for_function): Don't initialize per-function
data.
* method.c (emit_thunk): Clear current_function after calling
assemble_end_function. Use SF flags for start_function.
(synthesize_method): Use SF flags for start_function.
* parse.c: Regenerated.
* parse.y (fn.defpen): Likewise.
(pending_inline): Clear current_function, even if something goes
wrong.
* pt.c (instantiate_decl): Use SF flags to start_function.
Don't save and restore expanding_p.
(add_tree): Handle the case where we are outside any function.
(end_tree): Likewise.
* rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
* semantics.c (begin_function_definition): Likewise.
(expand_body): Likewise.
1999-09-09 Nathan Sidwell <nathan@acm.org>
* cp-tree.h (convert_to_void): Prototype new function.
(require_complete_type_in_void): Remove prototype.
* cvt.c (convert_to_void): New function.
(ocp_convert): Use convert_to_void.
* decl.c (cplus_expand_expr_stmt): Likewise, for complete
expressions.
* typeck.c (require_complete_type_in_void): Remove function.
(build_compound_expr): Use convert_to_void.
(build_static_cast): Likewise.
(build_c_cast): Likewise.
* semantics.c (finish_expr_stmt): Do not decay full expressions.
* typeck.c (build_x_compound_expr): Add FIXME.
1999-09-08 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (scratch_tree_cons): Remove.
* call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
and perm_tree_cons with plain tree_cons.
* class.c: Likewise.
* decl.c: Likewise.
* decl2.c: Likewise.
* except.c: Likewise.
* expr.c: Likewise.
* init.c: Likewise.
* lex.c: Likewise.
* method.c: Likewise.
* parse.y: Likewise.
* pt.c: Likewise.
* repo.c: Likewise.
* rtti.c: Likewise.
* search.c: Likewise.
* typeck.c: Likewise.
* parse.c: Regenerated.
* tree.c (build_srcloc): Simplify.
1999-09-08 Bruce Korb autogen@linuxbox.com
* Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
1999-09-08 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (lang_decl_flags): Remove permanent_attr.
Remove next.
(LANG_DECL_PERMANENT): Remove.
* decl.c (duplicate_decls): Don't mess about with obstacks trying
to free memory.
(lang_mark_tree): Mark DECL_LANG_SPECIFIC.
* lex.c (free_lang_decl_chain): Remove.
(build_lang_decl): Don't use obstacks.
(retrofit_lang_decl): Likewise.
(copy_lang_decl): Likewise.
* cp-tree.h (saved_scope): Remove old_binding_level and
function_decl. Tidy up.
* decl.c (mark_saved_scope): Don't set them.
(maybe_push_to_top_level): Clear memory.
* decl.c (layout_var_decl): Change prototype. Don't complete
types for external objects.
(check_initializer): Likewise. Tidy.
(initialize_local_var): Complete types here.
(cp_finish_decl): Not here. Reorganize a little.
(grokvardecl): Don't complete types here.
* decl.c (start_function): Clear last_dtor_insn and
last_parm_cleanup_insn.
(push_cp_function_context): Just copy over a little of
the old context, not all of it.
* cp-tree.h (copy_to_permanent): Remove.
(permanent_p): Likewise.
* decl.c (building_typename_type): Don't use copy_to_permanent.
(start_decl): Likewise.
(grok_reference_init): Likewise.
(cp_finish_decl): Likewise.
* init.c (build_new_1): Don't use mapcar.
(build_vec_delete_1): Don't use copy_to_permanent.
(build_vec_init): Likewise.
* parse.y (primary): Likewise.
* parse.c: Regenerated.
* pt.c (push_template_decl_real): Don't use copy_to_permanent.
(lookup_template_class): Likewise.
(tsubst_friend_function): Likewise.
(instantiate_class_template): Likewise.
(tsubst_decl): Likewise.
(tsubst): Likewise.
(instantiate_template): Likewise.
(unify): Likewise.
* rtti.c (get_tinfo_fn): Likewise.
(build_dynamic_cast): Likewise.
* semantics.c (finish_if_stmt_cond): Likewise.
(finish_while_stmt_cond): Likewise.
(finish_do_stmt): Likewise.
(finish_for_cond): Likewise.
(finish_for_expr): Likewise.
(finish_cleanup): Likewise.
(add_decl_stmt): Likewise.
(finish_named_return_value): Likewise.
(finish_qualified_call_expr): Likewise.
* tree.c (perm_manip): Remove.
(build_exception_variant): Don't use copy_to_permanent.
(permanent_p): Remove.
(copy_to_permament): Remove.
(build_min_nt): Don't use copy_to_permanent.
(build_min): Likewise.
(min_tree_cons): Likewise.
* typeckc.c (build_static_cast): Likewise.
(build_reinterpret_cast): Likewise.
(build_const_cast): Likewise.
1999-09-07 Mark Mitchell <mark@codesourcery.com>
* decl.c (ggc_p): Set it to 1.
(mark_saved_scope): Add prototype.
1999-09-07 Richard Henderson <rth@cygnus.com>
* cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
* typeck.c (self_promoting_args_p): Delete.
1999-09-07 Jason Merrill <jason@yorick.cygnus.com>
* search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
(dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
1999-09-07 Mark Mitchell <mark@codesourcery.com>
* Makefile.in (tree.o): Depend on ggc.h.
* class.c (make_method_vec): Remove.
(free_method_vec): Likewise.
(free_method_vecs): Remove.
(add_method): Don't use them.
* cp-tree.def (PTRMEM_CST): Make it longer.
(TEMPLATE_PARM_INDEX): Make it shorter.
* cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
(template_parm_index): Remove RTL field.
(ptrmem_cst): Add RTL field.
(finish_function): Removed parameter.
(process_next_inline): Change prototype.
(init_cplus_unsave): Rename to init_tree.
(binding_init): Remove.
* decl.c (free_binding_nodes): Remove.
(push_binding): Don't use them. Set BINDING_HAS_LEVEL_P.
(pop_binding): Don't use free_binding_nodes.
(free_binding_vecs): Remove.
(store_bindings): Don't use them.
(pop_from_top_level): Likewise.
(lookup_namespace_name): Simplify.
(build_typename_type): Don't use obstack_free.
(unqualified_namespace_lookup): Simplify.
(lookup_name_real): Simplify.
(start_function): Remove comment about leaks.
(finish_function): Removed nested parameter. Call
expand_end_bindings even when building_stmt_tree.
Call ggc_push_context and ggc_pop_context around
rest_of_compilation, if necessary.
(mark_cp_function_context): Handle a NULL language-context.
(lang_mark_false_label_stack): Fix typo.
(lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on
pointer to method types.
(lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
* decl2.c (finish_objects): Adjust call to finish_function.
(finish_static_store_duration_function): Likewise.
(do_nonmember_using_decl): Remove call to binding_init.
* except.c (end_anon_func): Adjust call to finish_function.
* lex.c (mark_impl_file_chain): New function.
(init_parse): Call init_tree, not init_cplus_unsave.
Add GC roots.
(cp_pramga_interface): Use xmalloc, not permalloc.
(cp_pragma_implementation): Likewise.
(begin_definition_of_inclass_inline): Simplify.
(process_next_inline): Adjust prototype.
(do_scoped_id): Don't call binding_init.
(make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
* method.c (emit_thunk): Adjust call to finish_function.
(synthesize_method): Likewise.
* parse.y (%union): Add a new `pi' variant.
(PRE_PARSED_FUNCTION_DECL): Use it.
(fn.defpen): Likewise.
(fndef): Adjust call to finish_function.
* pt.c (instantiate_decl): Likewise.
* rtti.c (syntheisze_tinfo_fn): Likewise.
* semantics.c (expand_body): Likewise.
* tree.c: Include ggc.h.
(mark_list_hash): New function.
(binding_init): Remove.
(init_cplus_unsave): Rename to ...
(init_tree): This. Add GC roots.
1999-09-05 Mark Mitchell <mark@codesourcery.com>
Get ready for garbage collection.
* Makefile.in (CXX_TREE_H): Add varray.h
(lex.o): Depend on ggc.h.
(decl.o): Likewise.
(decl2.o): Likewise.
(method.o): Likewise.
(search.o): Likewise.
(pt.o): Likewise.
(repo.o): Likewise.
* class.c: Include ggc.h.
(current_class_name): Remove.
(current_class_type): Likewise.
(current_access_specifier): Likewise.
(previous_class_type): Likewise.
(previous_class_values): Likewise.
(class_cache_firstobj): Likewise.
(current_lang_base): Likewise.
(current_lang_stack): Likewise.
(current_lang_stacksize): Likewise.
(lang_name_c): Likewise.
(lang_name_cplusplus): Likewise.
(lang_name_java): Likewise.
(current_lang_name): Likewise.
(base_layout_decl): Likewise.
(access_default_node): Likewise.
(access_public_node): Likewise.
(access_protected_node): Likewise.
(access_private_node): Likewise.
(access_default_virtual_node): Likewise.
(access_public_virtual_node): Likewise.
(access_protected_virtual_node): Likewise.
(access_private_virtual_node): Likewise.
(signed_zero_node): Likewise.
(init_class_processing): Don't build base_layout_decl.
(push_lang_context): Adjust now that current_lang_base is a varray.
(pop_lang_context): Likewise.
* cp-tree.h: Include varray.h.
(cp_global_trees): Add access_default, access_public,
access_protected, access_private, access_default_virtual,
access_public_virtual, access_protected_virtual,
access_private_virtual, ctor_identifier, delta2_identifier,
delta_identifier, dtor_identifier, in_charge_identifier,
index_identifier, nelts_identifier, this_identifier,
pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
lang_name_c, lang_name_cplusplus, lang_name_java,
empty_except_spec, null, jclass, minus_one, terminate.
(saved_scope): Move here from decl.c. Define globals in terms of
saved_scope: current_namespace, current_class_name,
current_class_type, current_access_specifier, current_lang_stack,
current_lang_base, current_lang_name, current_function_parms,
current_template_parms, processing_template_decl,
processing_specialization, processing_explicit_instantiation,
previous_class_type, previous_class_values, class_cache_firstobj.
(scope_chain): New variable.
(init_pt): New function.
* decl.c (current_namespace): Remove.
(this_identifier, in_charge_identifier, ctor_identifier): Likewise.
(dtor_identifier, pfn_identifier, index_identifier): Likewise.
(delta_identifier, delta2_identifier): Likewise.
(pfn_or_delta2_identifier, tag_identifier): Likewise
(vt_off_identifier, empty_except_spec, null_node): Likewise.
(current_function_parms, current_lang_base): Remove.
(current_lang_stack, previous_class_values): Remove.
(class_binding_level): Macroize.
(saved_scope): Remove.
(current_saved_scope): Rename to scope_chain.
(mark_saved_scope): Adjust for new scope structure.
(maybe_push_to_top_level): Likewise.
(pop_from_top_level): Likewise.
(duplicate_decls): Adjust now that current_lang_base is a varray.
(build_typename_type): Call ggc_add_tree_hash_table_root.
(init_decl_processing): Call init_pt. Call push_to_top_level to
set up globals. Add GC roots.
(xref_basetypes): Adjust now that current_lang_base is a varray.
* decl.h (this_identifier): Remove.
(in_charge_identifier): Likewise.
* decl2.c: Don't include varray.h.
(current_namespace): Remove.
(init_decl2): Add GC roots.
* except.c (Terminate): Remove.
(init_exception_processing): Use terminate_node instead.
(build_terminate_handler): Likewise.
* init.c (nc_nelts_field_id): Remove.
(minus_one): Likewise.
(init_init_processing): Use minus_one_node and nelts_identifier
instead. Add GC roots.
(jclass_node): Remove.
(build_new_1): Use nelts_identifier.
(build_vec_init): Likewise.
(build_vec_delete): Likewise.
* lex.c: Include ggc.h.
(defarg_fn): Move declaration early.
(defarg_parms): Likewise.
(init_parse): Add GC roots.
(handle_cp_pragma): Remove redundant declaration of
pending_vtables.
* method.c: Include ggc.h.
(btypelist): Make it a varray. All uses changed.
(ktypelist): Likewise.
(init_method): Add GC roots.
* pt.c: Don't include varray.h. Include ggc.h.
(current_template_parms): Remove.
(processing_template_decl): Likewise.
(processing_specialization): Likewise.
(processing_explicit_instantiation): Likewise.
(init_pt): New function.
* repo.c: Include ggc.h.
(init_repo): Add GC roots.
* search.c: Don't include varray.h.
(_vptr_name): Remove.
(lookup_field_1): Use vtpr_identifier instead.
(expand_indirect_vtbls_init): Remove redundant declaration of
in_charge_identifier.
(init_search_processing): Use vptr_identifier.
1999-09-05 Richard Henderson <rth@cygnus.com>
Bernd Schmidt <bernds@cygnus.co.uk>
Mark Mitchell <mark@codesourcery.com>
* Makefile.in (parse.o): Depend on ggc.h.
(decl2.o): Depend on ggc.h.
(init.o): Depend on ggc.h.
* cp-tree.h (init_decl2): Declare.
(cp_parse_init): Likewise.
* decl.c (ggc_p): Define to zero.
(mark_saved_scope): New function.
(init_decl_processing): Call cp_parse_init, and cp_decl2.
Register GC roots.
(expand_static_init): Add GC roots.
* decl2.c: Include ggc.h.
(init_decl2): New function.
* init.c: Include ggc.h.
(init_init_processing): Add GC roots.
* parse.y: Include ggc.h.
(cp_parse_init): New function.
1999-09-04 Mark Mitchell <mark@codesourcery.com>
* decl.c (init_decl_processing): Set mark_lang_status.
(lang_mark_false_label_stack): Adjust prototype.
* decl2.c (grok_function_init): Remove extraneous declaration of
abort_fndecl.
* Make-lang.in (cc1plus): Remove dependency on GGC.
* Makefile.in (OBJS): Don't mention ggc-simple.o.
(OBJDEPS): Don't mention ggc-simple.o.
* Make-lang.in (cc1plus): Depend on $(GGC).
* Makefile.in (OBJS): Add ggc-simple.o.
(OBJDEPS): Likewise.
* cp-tree.h (language_function): Rename members to `x_' versions;
we now have x_named_labels, x_ctor_label, x_dtor_label,
x_base_init_list, x_member_init_list, x_base_init_expr,
x_current_class_ptr, x_current_class_ref, x_last_tree,
x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
x_result_rtx.
(dtor_label, ctor_label, current_base_init_list,
current_member_init_list, base_init_expr, current_class_ptr,
current_class_ref, last_tree, last_expr_type): Adjust accordingly.
* decl.c: Include ggc.h.
(last_dtor_insn): Adjust to use x_ names.
(last_parm_cleanup_insn): Likewise.
(original_result_rtx): Likewise.
(named_labels): Likewise.
(mark_binding_level): New function.
(mark_cp_function_context): Likewise.
(mark_false_label_stack): Likewise.
(lang_mark_tree): Likewise.
(lang_cleanup_tree): Likewise.
1999-09-03 Mark Mitchell <mark@codesourcery.com>
* Makefile.in (CXX_TREE_H): Include function.h.
(decl.o): Don't depend on function.h.
(decl2.o): Likewise.
(typeck.o): Likewise.
(init.o): Likewise.
(method.o): Likewise.
* cp-tree.h: Include function.h.
(cp_function): Rename to language_function. Remove next.
(cp_function_chain): Make it a macro, not a variable.
(push_cp_function_context): Don't declare.
(pop_cp_function_context): Likewise.
* decl.c: Don't include function.h.
(push_cp_function_context): Make it static. Make it suitable for
a save_lang_status callback.
(pop_cp_function_context): Likewise.
(maybe_push_to_top_level): Call push_function_context_to, not
push_cp_function_context.
(pop_from_top_level): Call pop_function_context_from, not
pop_cp_function_context.
(init_decl_processing): Set save_lang_status and
restore_lang_status. Call push_function_context_to, not
push_cp_function_context.
(cp_function_chain): Remove.
* decl2.c: Don't include function.h.
* except.c: Don't include function.h.
(start_anon_func): Call push_function_context_to, not
push_cp_function_context.
(end_anon_func): Call pop_function_context_from, not
pop_cp_function_context.
* init.c: Don't include function.h.
* lex.c (begin_definition_of_inclass_inline): Call
push_function_context_to, not push_cp_function_context.
(process_next_inline): Call pop_function_context_from, not
pop_cp_function_context.
* method.c: Don't include function.h.
(synthesize_method): Call push_function_context_to, not
push_cp_function_context. Call pop_function_context_from, not
pop_cp_function_context.
* typeck.c: Don't include function.h.
* decl.c (expand_static_init): Tweak handling of static
initializations for objects without constructors.
1999-09-03 Nathan Sidwell <nathan@acm.org>
* typeck.c (build_indirect_ref): Reject dereference of pointer to
void.
1999-09-02 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (cp_function): Move here, from decl.c.
(cp_function_chain): Declare.
(dtor_label): New macro, instead of variable.
(ctor_label): Likewise.
(current_base_init_list): Likewise.
(current_member_init_list): Likewise.
(base_init_expr): Likewise.
(current_class_ptr): Likewise.
(current_class_ref): Likewise.
(last_tree): Likewise.
(last_expr_type): Likewise.
(current_function_returns_value): Likewise.
(current_function_returns_null): Likewise.
(current_function_just_assigned_this): Likewise.
(current_function_parms_stored): Likewise.
(temp_name_counter): Likewise.
(static_labelno): Likewise.
(expanding_p): Likewise.
(stmts_are_full_exprs_p): Likewise.
(in_function_try_handler): Likewise.
(lang_type): Remove nested type_flags. All uses changed.
* call.c (ctor_label): Remove.
(dtor_label): Likewise.
* class.c (current_class_ptr): Remove.
(current_class_ref): Likewise.
* decl.c (static_labelno): Remove.
(dtor_label): Likewise.
(last_dtor_insn): New macro, instead of variable.
(last_parm_cleanup_insn): Likewise.
(original_result_rtx): Likewise.
(in_function_try_handler): Remove.
(named_label_uses): New macro, instead of variable.
(named_labels): Likewise.
(current_function_returns_value): Remove.
(current_function_returns_null): Likewise.
(current_function_assigns_this): New macro, instead of variable.
(current_function_just_assigned_this): Likewise.
(current_binding_level): Likewise.
(init_decl_processing): Call push_cp_function_context.
(cp_function): Move to cp-tree.h
(cp_function_chain): Make it global.
(temp_name_counter): Remove.
(push_cp_function_context): Simplify.
(pop_cp_function_context): Likewise.
* decl2.c (temp_name_counter): Remove.
* init_c (current_base_init_list): Likewise.
(current_member_init_list): Likewise.
(base_init_expr): Likewise.
* method.c (static_labelno): Likewise.
* pt.c (last_tree): Likewise.
* semantics.c (expanding_p): Likewise.
(stmts_are_full_exprs_p): Likewise.
(last_expr_type): Likewise.
* typeck.c (dtor_label): Likewise.
(ctor_label): Likewise.
1999-09-01 Alex Samuel <samuel@codesourcery.com>
* decl2.c (arg_assoc_template_arg): New prototype. New function.
(arg_assoc_class): Use arg_assoc_template_arg for template
arguments.
(arg_assoc): Likewise.
* pt.c (mangle_class_name_for_template): Allow member template
template arguments.
1999-09-02 Nathan Sidwell <nathan@acm.org>
* call.c (build_conditional_expr): Warn on enum mismatches.
(convert_arg_to_ellipsis): Move non-pod check to after
conversion.
1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gxx.gperf (hash, is_reserved_word): Add prototypes.
* init.c (build_vec_init): Initialize variable `try_block'.
* lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
Likewise for bzero/memset.
(token_getch, token_put_back): Add static prototypes. Remove
`inline' from the definitions.
(retrofit_lang_decl): Call memset, not bzero, to avoid casts.
1999-09-01 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (lang_type): Move align into type_flags.
(CLASSTYPE_ALIGN): Adjust accordingly.
* call.c (direct_reference_binding): Remove misleading comment.
1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* parse.y (language_string): Constify.
1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* repo.c (getpwd): Don't prototype.
* xref.c (getpwd): Likewise
1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
Remove hacks for stuff which now comes from libiberty.
1999-08-30 Jason Merrill <jason@yorick.cygnus.com>
* cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
1999-08-30 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (begin_init_stmts): Declare.
(finish_init_stmts): Likewise.
* cvt.c (build_up_reference): Wrap the declaration of a temporary
in a statement-expression so that we will see it when expanding
tree structure later.
* init.c (begin_init_stmts): Don't make it static.
(finish_init_stmts): Likewise.
* cp-tree.h (start_handler_parms): New function.
(expand_start_catch_block): Take only one parameter.
(start_handler_parms): New function.
* decl.c (start_handler_parms): Define it.
* except.c (process_start_catch_block): Take only one parameter.
Don't call grokdeclarator here.
(expand_start_catch_block): Don't call grokdeclarator here,
either.
* parse.y (handler_args): Adjust call to
expand_start_catch_block. Use start_handler_parms.
* pt.c (push_template_decl_real): Make permanent lists have
permanent elements.
(tsubst_expr): Adjust calls to expand_start_catch_block
appropriately.
* semantics.c (expand_stmt): Likewise.
1999-08-29 Alex Samuel <samuel@codesourcery.com>
* pt.c (push_template_decl_real): Use template declaration from
class type if it exists.
1999-08-29 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
(maybe_inject_for_scope_var): Declare it.
(initialize_local_var): Likewise.
* decl.c (maybe_inject_for_scope_var): Make it global.
(initialize_local_var): Likewise. Move cleanup handling here,
from cp_finish_decl.
(make_rtl_for_nonlocal_decl): Use
push_obstacks_nochange/pop_obstacks, rather than
end_temporary_allocation/resume_temporary_allocation.
(cp_finish_decl): Try to complete the type of a variable when it
is declared. Move cleanup-handling to initialize_local_var.
(expand_static_init): Use tree-building code, rather than
RTL-building code.
* decl2.c (get_temp_name): Assert non-initializedness of
temporaries.
* init.c (create_temporary_var): Move RTL-assigning code to ...
(get_temp_regvar): Here.
* pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here.
* semantics.c (expand_stmt): Don't call cp_finish_decl here. Just
call initialize_local_var to generate initialization code.
1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* cp-tree.h (fndecl_as_string, type_as_string,
type_as_string_real, args_as_string, decl_as_string,
expr_as_string, code_as_string, language_as_string,
parm_as_string, op_as_string, assop_as_string, cv_as_string,
lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
* errfn.c (cp_printer): Likewise.
* error.c (cp_printer, fndecl_as_string, type_as_string_real,
type_as_string, expr_as_string, decl_as_string, lang_decl_name,
cp_file_of, code_as_string, language_as_string, parm_as_string,
op_as_string, assop_as_string, args_as_string, cv_as_string):
Likewise.
* tree.c (lang_printable_name): Likewise.
1999-08-28 Richard Henderson <rth@cygnus.com>
* decl2.c (arg_assoc_class): Bail if the class is a builtin type.
1999-08-28 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (strip_array_types): New function.
* decl.c (maybe_deduce_size_from_array_init): New function, split
out from cp_finish_decl.
(layout_var_decl): Likewise.
(maybe_commonize_var): Likewise.
(maybe_inject_for_scope_var): Likewise.
(initialize_local_var): Likewise.
(build_cleanup_on_safe_obstack): Likewise.
(check_initializer): Likewise.
(make_rtl_for_nonlocal_decl): Likewise.
(cp_finish_decl): Use them.
* typeck.c (strip_array_types): New function.
* cp-tree.def (LABEL_STMT): New tree node.
* cp-tree.h (LABEL_STMT_LABEL): New macro.
(shadow_label): Remove.
(declare_local_label): New function.
(finish_label_decl): Likewise.
* decl.c (make_label_decl): New function, split out from
lookup_label.
(shadowed_labels): Remove.
(binding_level): Add shadowed_labels.
(clear_binding_level): Remove.
(push_binding_level): Just bzero the new binding level.
(pushlevel): Fix indentation.
(pop_label): New function.
(pop_labels): Likewise, split out from poplevel.
(poplevel): Pop local labels. Use pop_labels.
(maybe_push_to_top_level): Don't clear shadowed_labels.
(lookup_label): Use make_label_decl.
(shadow_label): Remove.
(declare_local_label): New function.
(define_label): Simplify.
(start_function): Don't clear shadowed_labels.
(cp_function): Remove shadowed_labels.
(push_cp_function_context): Don't save shadowed_labels.
(pop_cp_function_context): Don't restore it.
* dump.c (dequeue_and_dump): Handle LABEL_STMT.
* parse.y (label_decl): Use finish_label_decl.
* pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
declarations.
* semantics.c (finish_label_stmt): Add a LABEL_STMT when
building_stmt_tree.
(finish_label_decl): New function.
(expand_stmt): Handle LABEL_STMTs and local label declarations.
1999-08-26 Mark Mitchell <mark@codesourcery.com>
* decl.c (lookup_label): Build labels on the permanent obstack
when building statement trees. Don't build RTL for labels when
building statement trees.
* semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
building statement trees.
(finish_label_stmt): Likewise.
(expand_stmt): Adjust accordingly.
* pt.c (tsubst_expr); Likewise.
(do_decl_instantiation): Robustify.
* cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
* tree.c (build_cplus_new): Set it.
* expr.c (cplus_expand_expr): Use it.
* dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
* decl.c (store_parm_decls): Reset immediate_size_expand.
(finish_function): Likewise.
* tree.c (cplus_unsave_expr_now): Don't return a value.
* semantics.c (do_poplevel): Always initialize the return value.
1999-08-26 Gavin Romig-Koch <gavin@cygnus.com>
* cp-tree.h (cplus_unsave_expr_now) : Correct return type.
* tree.h (cplus_unsave_expr_now) : Same.
1999-08-25 Mark Mitchell <mark@codesourcery.com>
* decl.c (grokdeclarator): Amend comment.
* except.c (expand_start_catch_block): Call push_template_decl for
catch-block parameters.
* method.c (synthesize_method): Build an empty compound statement
for the body of a constructor.
1999-08-25 Jason Merrill <jason@yorick.cygnus.com>
* tree.c (cp_build_qualified_type_real): If we're asking for the
same quals we already have, just return.
1999-08-25 Mark Mitchell <mark@codesourcery.com>
* cp-tree.def (SUBOBJECT): New tree node.
* cp-tree.h (CLEANUP_P): New macro.
(SUBOBJECT_CLEANUP): Likewise.
(keep_next_level): Add parameter.
(get_temp_regvar): Don't declare.
(emit_base_init): Remove parameter.
(expand_aggr_init): Rename to build_aggr_init.
(expand_vec_init): Rename to build_vec_init.
(do_pushlevel): Remove.
(do_poplevel): Likewise.
(finish_cleanup): New function.
(finish_subobject): Likewise.
(stmts_are_full_exprs_p): New variable.
* decl.c (keep_next_level): Add parameter.
(cp_finish_decl): Use build_aggr_init, not
expand_aggr_init. Use finish_expr_stmt to expand the code.
(expand_static_init): Use tree-generating, not RTL-generating,
functions to handle the initialization.
(start_function): Remove dead code. Always have a momentary
obstack inside the function, even before hitting the first curly
brace.
(cplus_expand_expr_stmt): Move calls to
expand_{start,end}_target_temps into semantics.c.
(cp_function): Add stmts_are_full_exprs_p.
(push_cp_function_context): Save it.
(pop_cp_function_context): Restore it.
* decl2.c (get_temp_regvar): Move to init.c.
(do_static_initialization): Use build_{aggr,vec}_init.
(do_static_destruction): Fix typo in comment.
* dump.c (dequeue_and_dump): Handle INIT_EXPR.
* except.c (expand_throw): Use create_temporary_var.
* expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
* init.c (expand_vec_init_try_block): Remove.
(expand_vec_init_catch_clause): Likewise.
(get_temp_regvar): New function.
(begin_init_stmts): Likewise.
(finish_init_stmts): Likewise.
(perform_member_init): Use build_{aggr,vec}_init. Build up tree
structure here.
(emit_base_init): Likewise. Remove unused parameter.
(expand_virtual_init): Likewise.
(expand_cleanup_for_base): Use finish_subobject.
(expand_aggr_vbase_init_1): Simplify.
(construct_virtual_bases): Use tree-generating functions to build
up initialization.
(expand_aggr_init): Likewise. Rename to build_aggr_init.
(expand_default_init): Likewise.
(expand_aggr_init_1): Likewise.
(expand_vec_init): Rename to build_vec_init.
* method.c (do_build_copy_constructor): Use tree-generating
functions. Don't call clear_last_expr.
(do_build_assign_ref): Likewise.
(synthesize_method): Call clear_last_expr here.
* parse.y (base_init): Don't call clear_last_expr here.
(nodecls): Likewise.
* pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
* semantics.c (do_pushlevel): Move to here.
(do_poplevel): Likewise.
(stmts_are_full_exprs_p): New variable.
(finish_expr_stmt): Handle logic for temoprary cleanup here.
(finish_for_stmt): Use finish_expr_stmt.
(finish_cleanup): New function.
(finish_function_try_block): Fix indentation.
(finish_subobject): New function.
(setup_vtbl_ptr): Call keep_next_level here.
(finish_stmt_expr): Handle a block with no scope inside the
statement-expression.
(expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle
SUBOBJECT.
* tree.c (search_tree): Handle INIT_EXPR.
(mapcar): Likewise.
* typeck.c (build_modify_expr): Don't build an RTL_EXPR.
* typeck2.c (store_init_value): Change expand_aggr_init to
build_aggr_init in comment.
1999-08-25 Mark Mitchell <mark@codesourcery.com>
* dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
1999-08-25 Nathan Sidwell <nathan@acm.org>
* decl2.c (handle_class_head): Be graceful about additional
scope qualifiers. Adjust comments to reflect reality.
1999-08-24 Jason Merrill <jason@yorick.cygnus.com>
* call.c (build_conditional_expr): Fix typo.
* typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
lvalue before trying to mess with the sides.
* error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu>
* g++spec.c (lang_specific_driver): Add room for NULL in arglist.
1999-08-23 Jason Merrill <jason@yorick.cygnus.com>
* exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
Return arbitrary pointer or NULL.
(check_eh_spec): Call __throw_type_match_rtti_2.
* tinfo.h (*::dcast): Return int. Add valp parm.
* tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers.
* tinfo2.cc (__throw_type_match_rtti_2): Likewise.
(__throw_type_match_rtti): Now just a wrapper.
* except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
(init_exception_processing): Don't initialize them.
1999-08-23 Paul Burchard <burchard@pobox.com>
* decl.c (check_default_argument): Fix typo.
1999-08-22 Mark Mitchell <mark@codesourcery.com>
* cp-tree.def (STMT_EXPR): Fix typo in node name.
* dump.c (dump_next_stmt): New function.
(dequeue_and_dump): Use it.
* pt.c (tsubst_copy): Make sure to initialize return value for a
STMT_EXPR, even when processing_template_decl.
* semantics.c (finish_stmt_expr): A statement-expression whose
last statement is not an expression-statement has type `void'.
1999-08-20 Mark Mitchell <mark@codesourcery.com>
* semantics.c (finish_stmt_expr): Fix typo in comment.
* tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
(mapcar): Likewise.
* init.c (build_vec_delete_1): Make the children of a permanent
BIND_EXPR permanent.
* pt.c (register_specialization): Don't register a specialization
more than once.
1999-08-18 Andrew Haley <aph@cygnus.com>
* method.c (process_overload_item): Call build_mangled_C9x_name ()
for all integer parameter types larger than long long.
1999-08-19 Mark Mitchell <mark@codesourcery.com>
* pt.c (redeclare_class_template): Merge default template
arguments in both directions.
* typeck.c (common_type): Undo 1999-08-18 change. Remove
compiler_error message.
1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
* cp-tree.h: Declare flag_use_repository.
* pt.c (do_decl_instantiation): Don't complain about duplicate
instantiation with -frepo.
(do_type_instantiation): Likewise.
* pt.c (push_template_decl_real): Complain about everything
that isn't a valid template.
* decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
affect inlines.
1999-08-19 Mark Mitchell <mark@codesourcery.com>
* cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
* decl2.c (build_expr_from_tree): Handle it.
* error.c (dump_expr): Likewise.
* pt.c (for_each_template_parm): Likewise.
(tsubst_copy): Likewise.
* tree.c (search_tree): Likewise.
* semantics.c (finish_pseudo_destructor_call): Create it.
1999-08-18 Mark Mitchell <mark@codesourcery.com>
* search.c (setup_class_bindings): Robustify.
* typeck.c (common_type): Use same_type_p, not pointer equality,
to compare types.
* cp-tree.h (build_lang_field_decl): Remove.
* class.c (build_vtable): Replace calls to build_lang_field_decl
with build_lang_decl.
(prepare_fresh_vtable): Likewise.
(finish_struct_1): Likewise.
(init_class_processing): Likewise.
* decl.c (push_using_decl): Likewise.
(init_decl_processing): Likewise.
(grokvardecl): Likewise.
(build_ptrmemfunc_type): Likewise.
(grokdeclarator): Likewise.
(build_enumerator): Likewise.
* decl2.c (grok_x_components): Likewise.
(do_class_using_decl): Likewise.
* except.c (call_eh_info): Likewise.
* init.c (init_init_processing): Likewise.
* rtti.c (expand_class_decl): Likewise.
* tree.c (build_base_fields): Likewise.
(build_vbase_pointer_fields): Likewise.
* lex.c (build_lang_decl): Build declarations on the permanent
obstack if we're building statmeent trees.
(retrofit_lang_decl): Handle both the full lang_decl and also the
smaller lang_decl_flags here.
(build_lang_field_decl): Remove.
* pt.c (push_template_decl_real): Issue errors for variable
declarations that are not static members.
1999-08-18 Richard Henderson <rth@cygnus.com>
* tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
(mapcar): Likewise.
1999-08-17 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (back_end_hook): New variable.
* decl2.c (back_end_hook): Define it.
(finish_file): If it's non-NULL, call it.
* decl.c (add_decl_to_level): New function.
(push_local_binding): Use it.
(find_binding): Fix typo in comment.
(pushdecl): Use add_decl_to_level. Put templates on the
corresponding namespace-scope binding levels.
* dump.c (dequeue_and_dump): Print the specializations of a
template.
* pt.c (push_template_decl_real): Don't push a template multiple
times.
1999-08-17 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
(CALL_DECLARATOR_QUALS): Likewise.
(CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
* decl.c (grokdeclarator): Adjust to use them.
* decl2.c (grokfield): Likewise.
(reparse_absdcl_as_casts): Likewise.
* lex.c (make_call_declarator): Likewise.
(set_quals_and_spec): Likewise.
* pt.c (tsubst): Likewise.
* tree.c (mapcar): Remove special hack to handle third operand of
a CALL_EXPR.
1999-08-16 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
* class.c (build_vtable): Use build_lang_field_decl to build the
VAR_DECLs for vtables.
(prepare_fresh_vtable): Likewise.
* decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
CAN_HAVE_FULL_LANG_DECL_P.
(push_using_decl): Use build_lang_decl to build USING_DECLs.
(grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
* lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
(build_lang_field_decl): Likewise.
(copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
to copy.
* cp-tree.def (STMT_EXPR): New tree node.
* cp-tree.h (STMT_EXPR_STMT): New macro.
(store_return_init): Change prototype.
(finish_named_return_value): New function.
(expand_stmt): Likewise.
(expand_body): Likewise.
(begin_stmt_tree): Likewise.
(finish_stmt_tree): Likewise.
(expanding_p): New variable.
(last_expr_type): Likewise.
(building_stmt_tree): New macro.
* decl.c (start_function): Use building_stmt_tree, not
processing_template_decl, where appropriate.
(store_parm_decls): Likewise.
(store_return_init): Move most of the body to semantics.c.
(finish_function): Use building_stmt_tree.
(finish_stmt): Clear last_expr_type here.
(cp_function): Add expanding_p, last_tree, last_expr_type.
(push_cp_function_context): Save them.
(pop_cp_function_context): Restore them.
* decl2.c (setup_vtbl_ptr): Move to semantics.c.
* error.c (dump_expr): Handle STMT_EXPR.
* except.c (expand_start_catch_block): Use building_stmt_tree.
Use add_decl_stmt.
* expr.c (cplus_expand_expr): Handle STMT_EXPR.
(do_case): Move add_tree call to semantics.c.
* parse.y (return_init): Use finish_named_return_value.
(for.init.statement): Use finish_expr_stmt.
* parse.c: Regenerated.
* pt.c (do_pushlevel): Move to semantics.c.
(do_poplevel): Likewise.
(tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
(tsubst_expr): Don't expand all the way to RTL here. Handle
RETURN_INIT and CTOR_INITIALIZER.
(instantiate_decl): Call expand_body after tsubst'ing into
DECL_SAVED_TREE.
* semantics.c (expand_stmts): New function.
(expanding_p): New variable.
(last_expr_type): Likewise.
(finish_expr_stmt): Use building_stmt_tree.
(begin_if_stmt): Likewise.
(finish_if_stmt_cond): Likewise.
(finish_then_clause): Likewise.
(begin_else_clause): Likewise.
(finish_else_clause): Likewise.
(begin_while_stmt): Likewise.
(finish_while_stmt_cond): Likewise.
(finish_while_stmt): Likewise.
(finish_do_body): Likewise.
(finish_do_stmt): Likewise.
(finish_return_stmt): Likewise.
(begin_for_stmt): Likewise.
(fnish_for_init_stmt): Likewise.
(finish_for_cond): Likewise.
(finish_for_expr): Likewise.
(finish_for_stmt): Likewise.
(finish_break_stmt): Likewise.
(finish_continue_stmt): Likewise.
(finish_switch_cond): Likewise.
(finish_switch_stmt): Likewise.
(finish_case_label): Call add_tree here if necessary.
(finish_goto_statement): Use building_stmt_tree.
(begin_try_block): Likewise.
(begin_function_try_block): Likewise.
(finish_try_block): Likewise.
(finish_function_try_block): Likewise.
(finish_handler_sequence): Likewise.
(finish_function_handler_sequence): Likewise.
(begin_handler): Likewise.
(finish_handler_parms): Likewise.
(finish_handler): Likewise.
(begin_compound_stmt): Likewise.
(finish_compound_stmt): Likewise.
(finish_asm_stmt): Likewise.
(finish_label_stmt): Likewise.
(finish_named_return_value): New function.
(setup_vtbl_ptr): Moved here from decl2.c.
(do_pushlevel): Moved here from pt.c.
(do_poplevel): Likewise.
(begin_stmt_expr): Use building_stmt_tree.
(finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR,
when building_stmt_tree.
(begin_stmt_tree): New function.
(finish_stmt_tree): Likewise.
(expand_stmt): Likewise.
(expand_body): Likewise.
* tree.c (build_cplus_method_type): Make sure the argument types
end up on the same obstack as the METHOD_TYPE.
(search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
THROW_EXPR, STMT_EXPR.
(mapcar): Break out common cases. Handle COMPOUND_EXPR,
MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than
sorry, if an unsupported node is encountered.
* typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
(c_expand_return): Don't call add_tree here.
1999-08-15 Mark Mitchell <mark@codesourcery.com>
* pt.c (check_default_tmpl_args): Don't check in local scopes.
(tsubst_decl): Make sure the declaration is on a saveable
obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
variable.
(tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
1999-08-14 Jason Merrill <jason@yorick.cygnus.com>
Speed up Koenig lookup.
* decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm
to return namespaces we've looked at.
* decl2.c (lookup_using_namespace): Likewise.
(add_function): Don't call ovl_member.
(lookup_arg_dependent): Initialize k.namespaces to the list of
namespaces seen in unqualified lookup.
* call.c (equal_functions): Move here from tree.c.
(joust): Use it to handle duplicate candidates.
* tree.c (ovl_member): Use ==.
1999-08-13 Mark Mitchell <mark@codesourcery.com>
* cp-tree.def (DECL_STMT): Make it smaller.
* cp-tree.h (lang_decl_flags): Move saved_tree to ...
(lang_decl): ... here. Add next.
(DECL_SAVED_TREE): Adjust accordingly.
(DECL_IMPLICIT_TYPEDEF_P): New macro.
(SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
(DECL_STMT_DECL): Likewise.
(create_implicit_typedef): New function.
(maybe_push_decl): Likewise.
(tsubst_default_argument): New function.
(at_function_scope_p): Likewise.
(add_decl_stmt): Likewise.
(push_permanent_obstack): Likewise.
* call.c (convert_default_arg): Use tsubst_default_argument.
* class.c (add_method): Use push_permanent_obstack.
(build_self_reference): Create a TEMPLATE_DECL for the
self-reference, if necessary.
* decl.c (pseudo_global_level_p): Only look at the current binding
level.
(push_binding): Use push_permanent_obstack.
(create_implicit_typedef): New function.
(pushtag): Use it.
(duplicate_decls): Use push_permanent_obstack.
(maybe_push_decl): New function.
(start_decl): Use it. Remove dead code. Use add_decl_stmt.
(start_decl_1): Remove dead code.
(cp_finish_decl): Remove DECL_STMT handling here. Don't use
pseudo_global_level_p.
(grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
template.
(grokdeclarator): Likewise, for TYPE_DECLs. Don't use
pseudo_global_level_p.
* decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
a template.
(get_sentry): Use push_permanent_obstack.
* dump.c (dequeue_and_dump): Enable DECL_STMT.
* except.c (call_eh_info): Use push_permanent_obstack.
(build_eh_type_ref): Likewise.
(do_pop_exception): Likewise.
(expand_eh_spec): Likewise.
(alloc_eh_object): Likewise.
(expand_throw): Likewise.
* init.c (build_java_class_ref): Likewise.
* lex.c (get_time_identifier): Likewise.
(free_lang_decl_chain): Correct type.
(retrofit_lang_decl): Adjust accordingly.
(build_lang_field_decl): Likewise.
* lex.h (free_lang_decl_chain): Likewise.
* parse.y (lang_extdef): Don't use pseudo_global_level_p.
* parse.c: Regenerated.
* pt.c (tsubst_default_arguments): New function.
(retrieve_local_specialization): Likewise.
(register_local_specialization): Likewise.
(push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use
pseudo_global_level_p to determine whether or not a template is
primary.
(lookup_template_class): Likewise. Use create_implicit_typedef.
(instantiate_class_template): Call tsubst_default_arguments for
member functions, if appropriate.
(tsubst_default_argument): New function.
(tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs.
* search.c (at_function_scope_p): New function.
* semantics.c (finish_asm_stmt): Use push_permanent_obstack.
(finish_label_stmt): Likewise.
(add_decl_stmt): New function.
(begin_class_definition): Likewise.
(finish_typeof): Likewise.
* tree.c (copy_template_template_parm): Likewise.
(copy_to_permanent): Likewise.
(push_permanent_obstack): Define.
(mark_addressable): Use it.
* typeck.c (mark_addressable): Likewise.
1999-08-13 Gavin Romig-Koch <gavin@cygnus.com>
* cp-tree.h (init_cplus_unsave): New.
(cplus_unsave_expr_now): New.
* lex.c (init_parse): Call init_cplus_unsave.
* tree.c (init_cplus_unsave): New.
(cplus_unsave_expr_now): New.
1999-08-13 Mark Mitchell <mark@codesourcery.com>
* pt.c (tsubst): Back out 1999-08-06 patch. Use fold and
decl_constant_value to simplify array bounds.
1999-08-11 Jason Merrill <jason@yorick.cygnus.com>
* lang-options.h: Add -fms-extensions.
* cp-tree.h: Declare flag_ms_extensions.
* decl2.c: Define it.
* class.c (instantiate_type): Don't complain about taking the address
of a bound member function if -fms-extensions.
* typeck.c (build_unary_op): Likewise.
* decl.c (grokdeclarator): Or about implicit int.
* init.c (resolve_offset_ref): Or about implicit '&'.
1999-08-11 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (minimal_parse_mode): Remove.
(finish_label_stmt): New function.
* decl.c (saved_scope): Remove minimal parse mode.
(maybe_push_to_top_level): Don't save it.
(pop_from_top_level): Don't restore it.
(define_label): Split out template-handling code to semantics.c.
(start_decl): Don't use minimal_parse_mode.
(cp_finish_decl): Likewise.
(start_function): Don't increment it.
(store_return_init): Don't use it.
(finish_function): Don't decrement it.
* parse.y (label_colon): Use finish_label_stmt throughout.
* parse.c: Regenerated.
* pt.c (minimal_parse_mode): Don't define it.
(tsubst_expr): Use finish_label_stmt.
* semantics.c (finish_label_stmt): New function.
* dump.c (queue): Be careful when computing bitmasks.
(dequeue_and_dump): Describe binfos as binfos, not as
vectors.
* parse.y (pedantic): Give it itype. Adjust usage accordingly
throughout.
* parse.c: Regenerated.
* Make-lang.in (CXX_SRCS): Remove sig.c.
* Makefile.in (CXX_OBJS): Remove sig.o.
(sig.o): Remove.
* cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
(CPTI_SIGNATURE_TYPE): Likewise.
(CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
(opaque_type_node): Likewise.
(signature_type_node): Likewise.
(sigtable_entry_type): Likewise.
(flag_handle_signatures): Likewise.
(lang_type): Remove is_signature, is_signature_pointer,
is_signature_reference, has_opaque_typedecls,
sigtables_has_been_generated. Adjust dummy. Remove signature,
signature_pointer_to, signature_reference_to.
(IS_SIGNATURE): Remove.
(SET_SIGNATURE): Remove.
(CLEAR_SIGNATURE): Remove.
(IS_SIGNATURE_POINTER): Remove.
(IS_SIGNATURE_REFERENCE): Remove.
(SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
(SIGTABLE_HAS_BEEN_GENERATED): Remove.
(CLASSTYPE_SIGNATURE): Remove.
(SIGNATURE_TYPE): Remove.
(SIGNATURE_METHOD_VEC): Remove.
(SIGNATURE_POINTER_TO): Remove.
(SIGNATURE_REFERENCE_TO): Remove.
(lang_decl_flags): Remove is_default_implementation. Rename
memfunc_pointer_to to saved_tree.
(IS_DEFAULT_IMPLEMENTATION): Remove.
(DECL_MEMFUNC_POINTER_TO): Remove.
(DECL_MEMFUNC_POINTING_TO): Remove.
(DECL_SAVED_TREE): Adjust definition.
(tag_types): Remove signature_type_node.
(SIGNATURE_FIELD_NAME): Remove.
(SIGNATURE_FIELD_NAME_FORMAT): Likewise.
(SIGNATURE_OPTR_NAME): Likewise.
(SIGNATURE_SPTR_NAME): Likewise.
(SIGNATURE_POINTER_NAME): Likewise.
(SIGNATURE_POINTER_NAME_FORMAT): Likewise.
(SIGNATURE_REFERENCE_NAME): Likewise.
(SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
(SIGTABLE_PTR_TYPE): Likewise.
(SIGTABLE_NAME_FORMAT): Likewise.
(SIGTABLE_NAME_FORMAT_LONG): Likewise.
(SIGTABLE_TAG_NAME): Likewise.
(SIGTABLE_VB_OFF_NAME): Likewise.
(SIGTABLE_VT_OFF_NAME): Likewise.
(finish_base_specifiers): Change prototype.
(build_signature_pointer_type): Remove.
(build_signature_reference_type): Remove.
(build_signature_pointer_constructor): Remove.
(build_signature_method_call): Remove.
(build_optr_ref): Likewise.
(append_signature_fields): Likewise.
(signature_error): Likewise.
* call.c (build_this): Remove signature support.
(build_over_call): Likewise.
(build_new_method_call): Likewise.
* class.c (add_implicitly_declared_members): Likewise.
(finish_struct_1): Likewise.
(finish_struct): Likewise.
* cvt.c (cp_convert_to_pointer): Likewise.
(convert_to_pointer_force): Likewise.
(ocp_convert): Likewise.
* decl.c (sigtable_decl_p): Remove.
(init_decl_processing): Remove support for signatures.
(cp_finish_decl): Likewise.
(grokdeclarator): Likewise.
(grokparms): Likewise.
(xref_tag): Likewise.
(start_function): Likewise.
(start_method): Likewise.
* decl2.c (finish_sigtable_vardecl): Remove.
(flag_handle_signatures): Remove.
(lang_f_options): Remove handle-signatures.
(grokfield): Remove support for signatures.
(grokbitfield): Likewise.
(finish_file): Likewise.
(reparse_absdcl_as_casts): Likewise.
* error.c (dump_type_real): Likewise.
(dump_function_decl): Likewise.
* friend.c (make_friend_class): Likewise.
* gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
* hash.h: Regenerated.
* init.c (build_new_1): Remove support for signatures.
* lang-options.h: Remove -fhandle-signatures,
-fno-handle-signatures.
* lex.c (init_parse): Remove support for signatures.
(yyprint): Likewise.
* lex.h (rid): Remove RID_SIGNATURE.
* method.c (build_decl_overload_real): Remove support for
signatures.
(hack_identifier): Likewise.
* parse.y (base_class): Likewise.
(base_class.1): Likewise.
(access_specifier): Likewise.
* search.c (lookup_member): Likewise.
* semantics.c (finish_qualified_object_call_expr): Likewise.
(finish_template_type_parm): Likewise.
(begin_class_definition): Likewise.
(finish_base_specifier): Likewise.
* sig.c: Remove.
* tree.c (build_cplus_method_type): Remove support for signatures.
* typeck.c (require_complete_type): Likewise.
(c_sizeof): Likewise.
(c_alignof): Likewise.
(build_object_ref): Likewise.
(build_component_ref): Likewise.
(build_indirect_ref): Likewise.
(build_c_cast): Likewise.
(build_modify_expr): Likewise.
(convert_for_initialization): Likewise.
* typeck2.c (signature_error): Remove.
(store_init_value): Remove support for signatures.
(digest_init): Likewise.
(build_x_arrow): Likewise.
(build_functional_cast): Likewise.
* xref.c (GNU_xref_decl): Likewise.
1999-08-10 Martin v. Löwis <martin@mira.isdn.cs.tu-berlin.de>
* lex.c (do_identifier): Remove unnecessary lookup of class field.
1999-08-09 Martin v. Löwis <martin@mira.isdn.cs.tu-berlin.de>
* decl2.c (set_decl_namespace): Do not complain about non-matching
decls if processing a template.
1999-08-09 Mark Mitchell <mark@codesourcery.com>
* decl.c (build_ptrmemfunc_type): Handle qualified
pointer-to-member types here.
* tree.c (cp_build_qualified_type_real): Simplify handling here.
1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* lex.c (lang_identify): Likewise.
1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
* Makefile.in: Update dependencies.
* class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
NULL_RTX.
* decl.c: Include "function.h"
(cleanup_label, return_label): Delete declarations.
(store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX.
(finish_function): Rename last_parm_insn variable to
fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX.
* decl2.c: Include "function.h".
(rtl_expr_chain): Delete declaration.
* method.c: Include "function.h"
* tree.c (build_vbase_pointer_fields): Don't initialize
DECL_SAVED_INSNS with NULL_RTX.
* typeck.c: Include "function.h"
1999-08-09 Jason Merrill <jason@yorick.cygnus.com>
* semantics.c (begin_function_try_block, finish_function_try_block,
finish_function_handler_sequence): New fns.
* parse.y (function_try_block): Use them.
* pt.c (instantiate_decl): Likewise.
* cp-tree.h: Declare in_function_try_handler.
* decl.c: Define it.
(start_function): Clear it.
(struct cp_function, push_cp_function_context): Save it.
(pop_cp_function_context): Restore it.
* parse.y (function_try_block): Set and clear it.
* except.c (expand_end_catch_block): Rethrow if we reach the end
of a function-try-block handler in a ctor or dtor.
* typeck.c (c_expand_return): Complain about returning from a
function-try-block handler of a ctor.
* parse.y (function_try_block): Call end_protect_partials
before expand_start_all_catch.
1999-08-08 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (struct binding_level): Add eh_region field.
(push_binding_level): Set it.
(define_label): Complain about jumping into an EH block.
* ptree.c (print_lang_type): Print the real type of a PMF.
Print what exceptions a fn type throws.
1999-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* class.c (count_fields, add_fields_to_vec): Add static prototype.
* cp-tree.h (opname_tab, assignop_tab, operator_name_string,
get_id_2, composite_pointer_type, dump_node_to_file): Constify a
char*.
* decl.c (named_label_list, cp_finish_decl, grokdeclarator):
Constify a char*.
* decl2.c (finish_static_data_member_decl, grokfield): Constify a
char*.
* dump.c (queue_and_dump_index, dump_int, dump_string,
dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
a char*.
(dump_stmt): Add static prototype.
* errfn.c (cp_thing): Constify a char*.
* error.c (dump_unary_op, dump_binary_op, aggr_variety,
dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
dump_expr): Constify a char*.
* lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
read_line_number): Add static prototype.
(opname_tab, assignop_tab, operator_name_string): Constify a char*.
(real_yylex): Move label `letter' into the scope where it is used.
* method.c (build_mangled_template_parm_index, build_overload_int,
build_decl_overload_real, get_id_2): Constify a char*.
* search.c (check_final_overrider): Make static.
* typeck.c (composite_pointer_type): Constify a char*.
1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
* pt.c (maybe_get_template_decl_from_type_decl): Make sure that
we're looking at a class.
* decl.c (lookup_name_real): Set the complain flag if we're
looking for a namespace member.
* lex.c (real_yylex): We can have a number with no digits.
* cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
* search.c (binfo_from_vbase): New fn.
* cp-tree.h: Declare it.
* cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
from pointer to member of virtual base.
* typeck.c (get_delta_difference): Likewise.
1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br>
* pt.c (tsubst): Use build_index_type to build in-template array
index type. Fixes g++.oliva/dwarf1.C.
* decl.c (grokdeclarator): Likewise, just for consistency, as it
doesn't seem to trigger the bug without it.
1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
* typeck2.c (add_exception_specifier): Use complete_type.
1999-08-06 Mark Mitchell <mark@codesourcery.com>
* error.c (dump_expr): Handle EXACT_DIV_EXPR.
(dump_binary_op): Bulletproof.
* lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
* tree.c (search_tree): Don't enumerate all the nodes of classes
`1', `2', and `<'; handle them generically. Don't be sorry about
"unrecognized tree codes"; just abort.
(no_linkage_check): Don't do linkage checks for templates.
* tree.c (cp_build_qualified_type_real): Handle
pointer-to-member-function types correctly.
1999-08-05 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (pushdecl): Only give an error for shadowing a parm
from *this* function.
Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
* typeck2.c: Update URLs and mail addresses.
1999-08-04 Nathan Sidwell <nathan@acm.org>
* cp-tree.h (empty_except_spec): New global var.
(compexcepttypes): Remove prototype.
(comp_except_specs): Prototype new global function.
(add_exception_specifier): Prototype new global function.
* decl.c (empty_except_spec): Define new global var.
(duplicate_decls): Use comp_except_specs, reword error message.
(init_decl_processing): Initialize empty_except_spec.
Adjust build_exception_variant calls.
* parse.y (exception_specification_opt): Use empty_except_spec.
(ansi_raise_identifier): Call check_for_new_type.
(ansi_raise_identifiers): Use add_exception_specifier.
* pt.c (tsubst): Use add_exception_specifier to build exception
specifier.
* search.c (check_final_overrider): New static function, broken
out of get_matching_virtual. Check throw specifiers, reword
diagnostics.
(get_matching_virtual): Use check_final_overrider.
* tree.c (build_exception_variant): Use comp_except_specs.
* typeck.c (compexcepttypes): Remove.
(comp_except_types): New static function, helper for
comp_except_specs. Compare two types as exception specifiers.
(comp_except_specs): New global function, compare two exception
specifiers.
(comptypes): Adjust for comp_except_specs.
* typeck2.c (add_exception_specifier): New global function.
* class.c (check_for_override): Reword error message.
1999-08-03 Nathan Sidwell <nathan@acm.org>
* call.c (convert_arg_to_ellipsis): Use pod_type_p.
* cp-tree.h (struct lang_type): Added non_pod_class flag.
(CLASSTYPE_NON_POD_P): New macro to access it.
* class.c (finish_struct_1): Determine non-PODness.
Check for arrays of pointers (-Weffc++).
Remove array inspection duplicated code.
* tree.c (pod_type_p): Detect non-pod non-aggregate types.
Use CLASSTYPE_NON_POD_P.
1999-08-03 Nathan Sidwell <nathan@acm.org>
* class.c (duplicate_tag_error): Preserve template information.
1999-08-03 Nathan Sidwell <nathan@acm.org>
* decl.c (start_enum): Show location of previous definition.
* parse.y (enumlist_opt): New reduction.
(structsp): Simplify enum rules to use enumlist_opt.
1999-08-03 Jason Merrill <jason@yorick.cygnus.com>
* lex.c (yyprint): Handle PFUNCNAME.
* decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
1999-08-03 Mumit Khan <khan@xraylith.wisc.edu>
* decl.c (start_decl): Set attributes before duplicate_decls call.
1999-08-02 Mark Mitchell <mark@codesourcery.com>
* Make-lang.in (CXX_SRCS): Add dump.c.
* Makefile.in (CXX_OBJS): Add dump.o.
(dump.o): New target.
* cp-tree.h (DECL_CONV_FN_P): Document.
(DECL_OVERLOADED_OPERATOR_P): New function.
(TYPE_PTRMEM_CLASS_TYPE): New macro.
(TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
(PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
(ASM_VOLATILE_P): New macro.
(STMT_LINENO): Likewise.
(cp_namespace_decls): New function.
(dump_node_to_file): New function.
* decl.c (cp_namespace_decls): New function.
(walk_namespaces_r): Use it.
(wrapup_globals_for_namespace): Likewise.
* decl2.c (flag_dump_translation_unit): New variable.
(lang_decode_option): Handle -fdump-translation-unit.
(finish_file): If flag_dump_translation_unit is set, dump the
translation unit.
* dump.c: New file.
* lang-options.h: Add -fdump-translation-unit.
* pt.c (tsubst_template_parms): Robustify.
(tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
(tsubst_expr): Use STMT_LINENO.
* semantics.c (finish_asm_stmt): Eliminate duplicate code. Check
for invalid cv-qualifiers even while building templates.
1999-08-02 Richard Henderson <rth@cygnus.com>
* call.c: Include defaults.h instead of expr.h.
* decl.c: Likewise.
* pt.c: Likewise.
* typeck.c: Include defaults.h.
1999-08-02 Mark Mitchell <mark@codesourcery.com>
* lex.c (errorcount, sorrycount): Don't declare.
* repo.c (errorcount, sorrycount): Likewise.
* typeck2.c (errorcount, sorrycount): Likewise.
1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
* call.c (convert_default_arg, build_over_call): Change all uses of
PROMOTE_PROTOTYPES, so that it tests it as a C expression.
Ensure expr.h is included.
* decl.c (grokparams): Ditto.
* pt.c (tsubst_decl): Ditto.
* typeck.c (convert_arguments): Ditto.
1999-08-02 Jason Merrill <jason@yorick.cygnus.com>
* class.c (mark_overriders): Fix order of args to overrides.
(warn_hidden): Likewise. Fix for having virtual and non-virtual
functions with the same name.
1999-08-02 Richard Henderson <rth@cygnus.com>
* cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
1999-08-01 Mark Mitchell <mark@codesourcery.com>
* call.c (build_conditional_expr): Fix typo in comment.
1999-08-01 Bernd Schmidt <bernds@cygnus.co.uk>
* decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
case_stack; use in_control_zone_p.
* typeck.c (c_expand_return): Likewise.
1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
* except.c (catch_clauses): Delete declaration.
1999-07-30 Mark Mitchell <mark@codesourcery.com>
* call.c (build_conditional_expr): Call convert_from_reference to
avoid reference/non-reference type confusion. Fix typo.
1999-07-30 Richard Henderson <rth@cygnus.com>
* typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
* cp-tree.h (initializer_constant_valid_p): Remove.
1999-07-28 Mark Mitchell <mark@codesourcery.com>
* call.c (conditional_conversion): Don't build BASE_CONVs for
conversions between things that have the same type.
(build_conditional_expr): Tweak.
(convert_like): Some BASE_CONVs really do require the generation
of code.
* init.c (perform_member_init): Don't go through build_modify_expr
for simple initializations.
1999-07-27 Jason Merrill <jason@yorick.cygnus.com>
* cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
* typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
virtual functions and MI. Simplify.
* method.c: Remove prototype for largest_union_member.
* pt.c (determine_specialization): Fix uninitialized warning.
* lex.c (real_yylex): Likewise.
1999-07-27 Mark Mitchell <mark@codesourcery.com>
* class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
here too.
* cp-tree.h (BINFO_VIRTUALS): Document new format.
* class.c (modify_one_vtable): Change prototype accordingly.
(modify_all_vtables): Likewise.
(modify_all_direct_vtables): Likewise.
(modify_all_indirect_vtables): Likewise.
(build_vtable_entry_for_fn): New function.
(set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
(modify_vtable_entry): Likewise.
(add_virtual_function): Likewise.
(build_vtbl_initializer): New function.
(finish_vtbls): Simplify for new BINFO_VIRTUALS format.
(fixup_vtable_deltas1): Likewise.
(fixup_vtable_deltas): Likewise.
(override_one_vtable): Likewise.
(finish_struct_1): Likewise.
* error.c (dump_expr): Likewise.
* search.c (get_abstract_virtuals_1): Likewise.
(get_abstract_virtuals): Likewise.
(expand_upcast_fixups): Likewise.
* tree.c (debug_binfo): Likewise.
* decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
__pure_virtual here.
1999-07-26 Mark Mitchell <mark@codesourcery.com>
* tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
as per 1999-07-26 change.
* typeck.c (c_sizeof): Don't allow non-static data members.
(expr_sizeof): Likewise.
1999-07-26 Jason Merrill <jason@yorick.cygnus.com>
* input.c (feed_input): Only touch lineno and input_filename
if !USE_CPPLIB. Save the old values before setting the new ones.
* input.c (feed_input): Add file, line parms.
* lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
(real_yylex): Check linemode before input_redirected().
* typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
from op new to warning.
1999-07-26 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
* call.c: All uses changed.
* typeck.c: Likewise.
1999-07-26 Nathan Sidwell <nathan@acm.org>
* exception.cc (__cplus_type_matcher): Match __eh_matcher
prototype.
1999-07-26 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
(ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
(strip_top_quals): Declare.
(ncp_convert): Likewise.
(type_after_usual_arithmetic_conversions): Likewise.
(composite_pointer_type): Likewise.
* call.c (strip_top_quals): Don't make it static.
(promoted_arithmetic_type_p): New function.
(conditional_conversion): Likewise.
(null_ptr_cst_p): Allow `false' as a NULL pointer constant.
(standard_conversion): Use same_type_p. Don't build BASE_CONVs
for converting a type to itself.
(reference_binding): Honor LOOKUP_NO_TEMP_BIND.
(implicit_conversion): Make sure the from and to types are
complete.
(add_builtin_candidate): Correct handling of ?: operator.
(add_builtin_candidates): Improve documentation.
(build_conditional_expr): New function.
(can_convert): Implement in terms of can_convert_arg.
(ncp_convert): New function.
* typeck.c (type_after_usual_arithmetic_conversions): New
function, split out from common_type.
(composite_pointer_type): New function, split out from
build_conditional_expr.
(common_type): Use type_after_usual_arithmetic_conversions.
Remove redundant attribute merging.
(comptypes): Tidy. Handle COMPLEX_TYPE.
(build_binary_op_nodefault): Use null_ptr_cst_p.
(build_conditional_expr): Remove.
(convert_for_assignment): Use new conversion functions.
* cp-tree.h (abstract_virtuals_error): Change declaration.
* typeck2.c (abstract_virtuals_error): Check to see if an error
occurred, and return a boolean value accordingly.
(build_functional_cast): Adjust accordingly.
* class.c (finish_struct_1): Likewise.
* cvt.c (ocp_convert): Likewise.
* decl.c (cp_finish_decl): Likewise.
(grokparams): Likewise.
(grok_op_properties): Likewise.
(start_function): Likewise.
* init.c (build_new_1): Likewise.
* pt.c (unify): Don't get confused by pointers-to-member functions.
* search.c (build_cplus_new): Robustify.
1999-07-24 Richard Henderson <rth@cygnus.com>
* gxx.gperf (__builtin_va_arg): New.
* parse.y (VA_ARG): New token.
(unary_expr): Recognize it.
Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com)
* g++FAQ.texi: Deleted per Joe Buck's request.
* Makefile.in: Corresponding changes.
1999-07-23 Jason Merrill <jason@yorick.cygnus.com>
* lex.c: Sync with C frontend.
(whitespace_cr): New fn.
(skip_white_space): Use it.
(init_parse): Reorder.
(yyprint): Support CONSTANT.
(pragma_getc, pragma_ungetc): Bring back.
(read_line_number): Change in_system_header directly.
(handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
(parse_float): Update to C version.
(yylex): Handle '$' under the letter case.
Remove looking_for_typename handling.
Support hex floating point constants.
Follow C's lead for choosing type of integer constants.
Rearrange stuff to match C frontend.
(yyungetc, reinit_parse_for_block, yylex): Support indent_level.
* spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
1999-07-23 Mark Mitchell <mark@codesourcery.com>
* call.c (reference_binding): Tweak.
(mayble_handle_implicit_object): Use direct_reference_binding to
create the right implicit conversion sequence.
1999-07-22 Mark Mitchell <mark@codesourcery.com>
* pt.c (convert_nontype_argument): Don't call decl_constant_value
if we're converting to a reference type.
* call.c (NEED_TEMPORARY_P): New macro.
(standard_conversion): Set it, for derived-to-base conversions.
(reference_related_p): New function.
(reference_compatible_p): Likewise.
(convert_class_to_reference): Likewise.
(direct_reference_binding): Likewise.
(reference_binding): Rework for standards-compliance.
(convert_like): Adjust accordingly.
(maybe_handle_ref_bind): Simplify; the right conversion sequences
are now built up in reference_binding.
(initialize_reference): New function.
* cp-tree.h (ICS_USER_FLAG): Document.
(ICS_THIS_FLAG): Likewise.
(ICS_BAD_FLAG): Likewise.
(NEED_TEMPORARY_P): Likewise.
(cp_lvalue_kind): New type.
(real_lvalue_p): Return it.
* error.c (dump_expr): Provide more accurate representation for
AGGR_INIT_EXPRs.
* init.c (expand_default_init): Do not try to perform implicit
conversions for a brace-enclosed initializer.
* search.c (lookup_conversions): Document.
* tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate
appropriately.
(real_lvalue_p): Adjust accordingly.
(lvalue_p): Likewise.
(build_cplus_new): Don't allow the creation of an abstract class.
* typeck.c (convert_for_initialization): Use initialize_reference.
1999-07-21 Gavin Romig-Koch <gavin@cygnus.com>
* lex.c (real_yylex) : Correct the test for overflow when lexing
integer literals.
1999-07-20 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
not DECL_BUILT_IN, to determine if a function is internally declared.
(duplicate_decls): Likewise. Improve handling of builtins.
(push_overloaded_decl): Remove special handling of builtins.
* cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
* decl.c (grokdeclarator): Pull out decl_constant_value in
templates, too.
* class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
* cp-tree.h, pt.c, semantics.c: Adjust.
* method.c (largest_union_member): Remove.
* lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
* lex.c (token_getch, token_put_back): New fns.
(real_yylex): Use them.
* lex.c (lang_init): Generalize.
(lang_init_options): Tell cpplib this is C++.
(nextchar): Remove. Replace uses with put_back.
(skip_white_space): Handle linemode here. Optimize for cpplib.
(extend_token_buffer_to): New fn.
(extend_token_buffer): Use it.
(read_line_number, check_newline): Just deal with tokens.
(real_yylex): More cpplib optimizations. Simplify. Don't produce
EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
* spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
* parse.y (PAREN_STAR_PAREN): Remove.
* input.c: Don't use the putback machinery with cpplib.
(sub_getch): Fold back into getch.
(getch): Don't handle linemode here.
(feed_input): Unget any text in the token buffer.
* lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
nextyychar, nextyylval): Remove.
1999-07-20 Michael Tiemann <tiemann@holodeck.cygnus.com>
Jason Merrill <jason@yorick.cygnus.com>
* lex.c (indent_level): New variable.
(init_parse): Set cpp_token to CPP_DIRECTIVE.
(consume_string): Make this smart about USE_CPPLIB.
(yyungetc): Use put_back function.
(pragma_getc, pragma_ungetc): Functions deleted.
(check_newline): Rewrite to be intelligent about USE_CPPLIB.
Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
pragma_ungetc.
(real_yylex): Rewrite to be intelligent about USE_CPPLIB.
Also, clean up cases where we redundantly set token_buffer[0].
(read_line_number): New fn.
* input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
(end_input): Call cpp_pop_buffer if USE_CPPLIB.
(sub_getch): Conditionalize out code that's not appropriate if
USE_CPPLIB.
(put_back): Rewrite in case USE_CPPLIB is defined.
(input_redirected): Ditto.
Tue Jul 20 11:24:19 1999 Bernd Schmidt <bernds@cygnus.co.uk>
* cp-tree.h: Delete lots of declarations of tree nodes; replaced by
c_global_trees and accessor macros defined in c-common.h.
(cp_tree_index): New enumeration.
(cp_global_trees): Declare new array. Add accessor macros for it, and
delete declarations of tree nodes replaced by it.
(builtin_function): Delete macro, add declaration for new function.
Include c-common.h.
* decl.c: Delete definitions for tree nodes that were replaced by
cp_global_trees and c_global_trees.
(init_decl_processing): Call c_common_nodes_and_builtins; delete code
to generate the common builtins here.
(builtin_function): New function.
* decl2.c (abort_fndecl): Delete declaration.
* except.c (expand_builtin_return_address): Delete declaration.
(builtin_return_address_fndecl): Delete variable.
(const_ptr_type_node): Delete declaration.
* lex.c (cons_up_default_function): Delete declaration of
void_list_node.
* parse.y (void_list_node): Delete declaration.
* rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
Delete variables.
(const_string_type_node): Delete declaration.
* search.c (abort_fndecl): Delete declaration.
* Makefile.in: Update dependencies.
1999-07-19 Mark Mitchell <mark@codesourcery.com>
* pt.c (check_default_tmpl_args): Move test for missing default
arguments here, from ...
(end_template_parm_list): Here.
1999-07-18 Mark Mitchell <mark@codesourcery.com>
* decl.c (lookup_nested_type): Remove.
(pushtag): Don't call it.
Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com)
* Makefile.in (INTERFACE): Bump to 2.
1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
* typeck2.c (my_friendly_abort): Updated URL with bug reporting
instructions to gcc.gnu.org. Removed e-mail address.
1999-07-17 Mark Mitchell <mark@codesourcery.com>
* pt.c (determine_specialization): Tighten error-checking.
(end_template_parm_list): Likewise.
1999-07-14 Mark Mitchell <mark@codesourcery.com>
* pt.c (check_default_tmpl_args): Handle friends defined in the
class just like member functions defined in the class.
1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
Jason Merrill <jason@yorick.cygnus.com>
* cp-tree.h (struct lang_decl): Added field for storing sorted
FIELD_DECLs (used in TYPE_DECLs).
(DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
(DECL_SORTED_FIELDS): New macro.
* class.c (method_name_cmp): New function.
(finish_struct_methods): Modified to support sorting and searching
methods.
(finish_struct_anon): Changed code in inner loop to use ELT rather
than UELT (which required an extra indirection for every reference).
(field_decl_cmp): New function to support sorting FIELD_DECLs.
(finish_struct_1): Sort fields.
* search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
(lookup_fnfields_1): Search sorted methods in METHOD_VEC.
Also, switch to using array indexing rather than a changing pointer.
* ptree.c (print_lang_decl): Handle TYPE_DECLs that have
DECL_SORTED_FIELDS.
1999-07-09 Jason Merrill <jason@yorick.cygnus.com>
* decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
casts in system headers or extern "C" blocks.
* pt.c (do_decl_instantiation): Downgrade duplicate instantiation
errors to pedwarn.
1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
* decl2.c (write_virtuals): Deleted declaration.
* cp-tree.h (write_virtuals): Deleted extern declaration.
* class.c (finish_struct_1): Removed #if 0'd code that mentions
write_virtuals.
* semantics.c (begin_class_definition): Rewrite code to not depend
on write_virtuals.
* lex.c (cp_pragma_interface): New function.
(cp_pragma_implementation): Likewise.
(handle_cp_pragma): Call them.
* typeck.c (comptypes): Simplify C code in look_hard.
* xref.c (PALLOC): Use xcalloc, not calloc.
(SALLOC): Use xmalloc, not malloc.
* rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
* search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
is NO_DEBUG.
* decl.c (duplicate_decls): If a redeclaration doesn't match the
initial declaration, then don't save the inline info and by all
means don't mark the function as a builtin function.
* decl.c (lookup_name_real): Set NONCLASS to 1 if
CURRENT_CLASS_TYPE is 0.
* class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
NULL_TREE.
* ptree.c (print_lang_type): Added vtable-needs-writing.
Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
* decl2.c (mark_vtable_entries): Fix check for rtti offset.
1999-07-06 Gavin Romig-Koch <gavin@cygnus.com>
* typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
Merged into c-common.
1999-07-05 Dave Brolley <brolley@cygnus.com>
* lex.c (errorcount): Declare it.
(finish_parse): Update errorcount for when using CPPLIB.
1999-07-05 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
parameters.
(IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
* decl.c (push_class_binding): Use it.
(lookup_name_real): Likewise.
1999-07-02 Gavin Romig-Koch <gavin@cygnus.com>
* cp-tree.h (widest_integer_literal_type_node,
widest_unsigned_literal_type) : New.
* decl.c (widest_integer_literal_type_node,
widest_unsigned_literal_type) : New.
(init_decl_processing): Handle/use the two new types.
* lex.c (real_yylex): Same.
* typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
Same.
1999-07-01 Mark Mitchell <mark@codesourcery.com>
* decl.c (grokdeclarator): Don't give names "for linkage purposes"
to anonymous cv-qualified types.
1999-07-01 Gavin Romig-Koch <gavin@cygnus.com>
* lex.c (real_yylex) : Change integer literal overflow handling to
be like c-lex.c.
* lex.c (real_yylex): Improve 'integer constant out of range' messages.
1999-06-28 Richard Henderson <rth@cygnus.com>
* decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
1999-06-28 Jason Merrill <jason@yorick.cygnus.com>
* error.c (dump_type_real): Handle TREE_LIST again.
* typeck.c (comp_target_parms): Don't complain about
converting from () to (...) if !flag_strict_prototype.
* decl.c (grokdeclarator): Update the names of all variants when
de-anonymizing.
1999-06-21 Mark Mitchell <mark@codesourcery.com>
* init.c (expand_aggr_vbase_init): Rename to
construct_virtual_bases. Conditionalize construction here,
rather than ...
(emit_base_init): Here.
1999-06-19 Mark Mitchell <mark@codesourcery.com>
* semantics.c (finish_asm_stmt): Apply decay conversions to
input operands.
* decl.c (expand_static_init): When building an anonymous function
for use with atexit, compute its body before and after entering
the function.
* error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
EXIT_EXPR.
1999-06-18 Mark Mitchell <mark@codesourcery.com>
* init.c (expand_aggr_vbase_init): Add flag parameter.
(build_partial_cleanup_for): Remove, inlining into ..
(expand_cleanup_for_base): ... here. Take flag parameter.
(emit_base_init): Pass the in_chrg parameter to
emit_aggr_vbase_init.
(emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
1999-06-16 Mark Mitchell <mark@codesourcery.com>
* decl2.c (import_export_decl): Use same_type_p, rather than
relying on pointer-equality for types.
* method.c (do_build_copy_constructor): Simplify.
* call.c (build_method_call): Remove bogus code for two-argument
delete.
* init.c (build_new_1): Expand on comment, and remove dead code.
* init.c (expand_cleanup_for_base): New function, split out
from ...
(emit_base_init): Here.
(expand_aggr_vbase_init): Use it.
1999-06-15 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (class_cache_firstobj): Declare.
(maybe_push_cache_obstack): Rename to push_cache_obstack.
* class.c (permanent_obstack): Remove declaration.
(class_cache_firstobj): Make it global.
(add_method): Don't use permanent_obstack directly.
(pushclass): Only free the class_cache_obstack if we know how far
back to free it.
(maybe_push_cache_obstack): Rename to push_cache_obstack.
* decl.c: Remove dead comment.
(saved_scope): Add class_cache_firstobj.
(push_to_top_level): Save it.
(pop_from_top_level): Restore it.
(push_class_level_binding): Use push_cache_obstack, not
maybe_push_cache_obstack.
* search.c (push_class_decls): Likewise.
1999-06-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
* pt.c (tsubst_friend_function): Push into namespace of friend
function before pushdecl'ing it.
1999-06-14 Nathan Sidwell <nathan@acm.org>
* call.c (build_new_op): Remove REF_BIND from all operands.
1999-06-13 Alexandre Oliva <oliva@dcc.unicamp.br>
* init.c (build_new_1): Look up operator delete even if there was
no explicit new placement.
1999-06-08 Nathan Sidwell <nathan@acm.org>
* except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
of ...
(build_throw): ... here. Call it.
(process_start_catch_block): Call it.
1999-06-07 Mark Mitchell <mark@codesourcery.com>
* search.c (convert_pointer_to_single_level): Reimplement without
using get_binfo.
1999-06-06 Mark Mitchell <mark@codesourcery.com>
* method.c (is_back_referenceable_type): Back-reference bools when
not squangling.
1999-06-07 Dave Brolley <brolley@cygnus.com>
* lex.c (real_yylex): Replace unused bytes from bad multibyte char.
* input.c (putback_buffer): New structure type.
(putback): Replaces putback_char member.
(putback): Replaces putback_char static variable.
(feed_input): Use putback.
(end_input): Use putback.
(sub_getch): Use putback.
(put_back): Use putback.
1999-06-05 Mark Mitchell <mark@codesourcery.com>
* decl.c (grokdeclarator): Fix typo in last change.
1999-06-04 Jason Merrill <jason@yorick.cygnus.com>
* semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
(finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
1999-06-04 Nathan Sidwell <nathan@acm.org>
* except.c (build_throw): Check throw expression validity.
1999-06-03 Mark Mitchell <mark@codesourcery.com>
* decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
just because flag_signed_bitfields is false.
1999-06-03 Nathan Sidwell <nathan@acm.org>
* semantics.c (begin_class_definition): Update the struct's
location here ...
* class.c (finish_struct): ... rather than here.
* decl.c (make_typename_type): Don't rely on uninitialized
variable.
1999-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
1999-05-31 Mark Mitchell <mark@codesourcery.com>
* tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
and friends rather than messing with current_obstack directly.
(cp_build_qualified_type_real): Rework ARRAY_TYPE
allocation to match practice throughout the rest of the
compiler.
1999-05-30 Mark Mitchell <mark@codesourcery.com>
* lex.c (make_lang_type): Create TYPE_BINFO for
TEMPLATE_TYPE_PARMs just like for non-template types.
* decl.c (start_decl): Move checks on initialization to ...
(cp_finish_decl): Here. Tidy formatting slightly.
1999-05-28 Mark Mitchell <mark@codesourcery.com>
* decl.c (add_binding): Don't complain about a redeclaration of a
semantically identical typedef in a local scope.
1999-05-28 Nathan Sidwell <nathan@acm.org>
* decl.c (complete_array_type): Allocate off same obstack. Fix
DO_DEFAULT comment to match reality.
* friend.c (make_friend_class): Fix diagnostic typo.
1999-05-28 Mark Mitchell <mark@codesourcery.com>
* decl.c (lookup_namespace_name): Handle getting a
TEMPLATE_ID_EXPR.
(expand_static_init): Don't call pushdecl for implicitly declared
`atexit' used to register destructors.
1999-05-25 Mark Mitchell <mark@codesourcery.com>
* class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
initialize a vtable.
* cp-tree.h (NAMESPACE_LEVEL): Reformat.
(lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes
by combining TEMPLATE_INFO and LEVEL into a single union.
(DECL_TEMPLATE_INFO): Reformat.
(DECL_SAVED_TREE): Document.
(DECL_TEMPLATE_INJECT): Remove.
* class.c (finish_struct): Remove code to deal with
DECL_TEMPLATE_INJECT.
* decl.c (maybe_process_template_type_declaration): Handle all new
types in templates uniformly.
* method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
DECL_CONTEXT.
* pt.c (lookup_template_class): Inject template instantiations of
forward-declarations.
(instantiate_class_template): Remove code processing
DECL_TEMPLATE_INJECT.
* pt.c (lookup_template_class): Tweak lookup to find member
templates.
* pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
ASM_CV_QUAL.
* semantics.c (finish_asm_stmt): Make strings permanent if they're
used in a template.
1999-05-25 Jason Merrill <jason@yorick.cygnus.com>
* typeck.c (casts_away_constness, casts_away_constness_r): Strip both
parts of pointer to data member types.
1999-05-24 Mark Mitchell <mark@codesourcery.com>
* decl2.c (mark_vtable_entries): Don't make a copy of a function,
and then make it look like `abort'. Just use `abort' instead.
* typeck.c (build_static_cast): Don't allow static_casts that cast
away constness.
(casts_away_constness_r): New function.
(casts_away_constness): Likewise.
* decl.c (lookup_tag): Remove code no longer needed after
name-lookup improvements.
* decl2.c (handle_class_head): Make error-recovery more robust.
* friend.c (make_friend_class): Reject templated typename types.
* lex.c (is_global): A template parameter isn't global.
* parse.y (class_head): Robustify.
* parse.c: Regenerated.
1999-05-22 Mark Mitchell <mark@codesourcery.com>
* pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs.
* cp-tree.h (push_nested_namespace): Declare.
(pop_nested_namespace): Likewise.
* decl.c (push_nested_namespace): New function.
(pop_nested_namespace): Likewise.
* pt.c (instantiate_class_template): Use them.
* tree.c (mapcar): Handle NON_LVALUE_EXPR.
* cp-tree.h (cplus_expand_constant): Declare.
* cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
converted from one pointer-to-object type to another.
* expr.c (cplus_expand_constant): Don't make it static.
* typeck.c (build_component_ref): Don't crash when presented with
a component which is a TEMPLATE_DECL.
(build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a
cast from a pointer-to-member constant to its own type does not
result in a valid non-type template argument.
1999-05-21 Mark Mitchell <mark@codesourcery.com>
Nathan Sidwell <nathan@acm.org>
* Make-lang.in (cc1plus): Make it depend on gxx.gperf.
* cp-tree.h: Fix typo in documentation on pointers-to-members.
(cp_build_qualified_type): Make it a macro.
(cp_build_qualified_type_real): Declare.
* decl.c (grokdeclarator): Remove misleading comment. Avoid
problem with template parameters and restrict-qualification.
* gxx.gperf: Replace NORID with RID_UNUSED throughout.
* hash.h: Regenerated.
* lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
the enumeration.
(NORID): Remove definition.
* pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
(tsubst): Likewise. Remove special handling for FUNCTION_TYPEs.
(fn_type_unification): Check that the function type resulting from
the deduction is legal.
(check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
(unify): Use cp_build_qualified_type_real.
* tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
(cp_build_qualified_type): Rename to ...
(cp_build_qualified_type_real): Add additional COMPLAIN parameter
and modify appropriately.
* typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
reveal optimization opportunities.
* pt.c (tsubst): Don't issue error messages when we're not
complaining, even if we see a qualified function type.
(check_cv_quals_for_unify): Don't allow a qualified function
type.
1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
* class.c (instantiate_type): Downgrade errors for object-dependent
memfn refs to pedwarn.
1999-05-20 Mark Mitchell <mark@codesourcery.com>
* decl.c (grokdeclarator): Don't treat [] as indicating a
zero-sized array in a typedef.
* call.c (build_object_call): Don't look at DECL_NAME for a type.
(pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
(typeck.c): Or TYPE_MAIN_VARIANT for a type.
* pt.c (for_each_template_parm): Rework to match documentation.
Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
* class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
* class.c (finish_base_struct): Allow non-COM bases for COM classes
except at the leftmost position.
(modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
Pass the binfo's class, not the most derived, to skip_rtti_stuff.
* search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
* tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
(build_cplus_new): Make sure that what we return is of the right type.
1999-05-20 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (make_ptrmem_cst): New function.
* expr.c (cplus_expand_constant): Split out from ...
(cplus_expand_expr): Here. Use cplus_expand_constant.
(init_cplus_expand): Set lang_expand_constant.
* pt.c (convert_nontype_argument): Use make_ptrmem_cst.
* tree.c (make_ptrmem_cst): Define.
* typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
* typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
1999-05-19 Mark Mitchell <mark@codesourcery.com>
* pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
* decl2.c (start_static_storage_duration_function): Fix comment.
(finish_file): Create static storage duration functions lazily.
1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
Implement anonymous structs.
* cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
* class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
* class.c (finish_struct_1): Remove redundant check for anon struct.
* decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
(check_tag_decl): Check for anonymous struct here.
* decl2.c (build_anon_union_vars): Catch anon struct at file scope.
* init.c (sort_member_init, emit_base_init): Handle getting fields
as well as names in current_member_init_list.
(perform_member_init): Handle getting an anon aggr.
* method.c (do_build_assign_ref): Don't descend into anon aggrs.
(do_build_copy_constructor): Likewise.
1999-05-19 Mark Mitchell <mark@codesourcery.com>
* tree.c (cp_build_qualified_type): Don't allow qualified function
types.
Wed May 19 02:50:53 1999 Arvind Sankar <arvinds@mit.edu>
* gxxint.texi: Fix typo.
1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
* call.c (find_scoped_type, resolve_scope_to_name): Lose.
* class.c (finish_struct_1): Use CLASS_TYPE_P.
* ptree.c (print_lang_type): Likewise.
* typeck.c (build_modify_expr, c_expand_asm_operands): Use
IS_AGGR_TYPE_CODE.
* typeck2.c (digest_init): Likewise.
1999-05-18 Jason Merrill <jason@yorick.cygnus.com>
* call.c (joust): Compare the types of the conv ops, not the
target types of the conversions.
Tue May 18 00:21:34 1999 Zack Weinberg <zack@rabi.phys.columbia.edu>
* lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
was not given.
1999-05-17 Mark Mitchell <mark@codesourcery.com>
* cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
* decl.c (grokfndecl): Don't allow inline declarations of friend
template specializations, or friend template specializations with
default arguments.
* pt.c (tsubst): Handle substitution into array types that does
not yield a fixed upper bound, even when not processing a
template.
(tsubst_copy): Deal with the fact that the second operand to a
TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
* search.c (marked_pushdecls_p): Don't descend into
TEMPLATE_TYPE_PARMs and the like.
(unmarked_pushdecls_p): Likewise.
* call.c (build_over_call): Don't throw away
initializations/copies of empty classes; use MODIFY_EXPR and
INIT_EXPR as for non-empty classes.
* class.c (finish_struct_1): Put the padding byte for an empty
class on the TYPE_NONCOPIED_PARTS list for the class.
1999-05-16 Mark Mitchell <mark@codesourcery.com>
* decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
indicate a reference to a field that is a qualified name.
1999-05-16 Jason Merrill <jason@yorick.cygnus.com>
* decl2.c (finish_objects): Don't use .?tors.* if we don't have
ASM_OUTPUT_CONSTRUCTOR.
* friend.c (do_friend): Add attrlist arg. Remove support for
getting a non-decl as 'decl'.
* decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or
rtl.
(grokdeclarator): Adjust.
* cp-tree.h: Adjust.
1999-05-16 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (permanent_p): New function.
* init.c (build_new_1): Use mapcar, not copy_node, to copy a
possibly complex tree node.
* tree.c (mapcar): Adjust comments, and follow coding standards in
conditional.
(permanent_p): New function.
1999-05-13 Per Bothner <bothner@cygnus.com>
* class.c (push_lang_context): Turn off DECL_IGNORED_P for
primitive Java types, if we actually see `extern "Java"'.
1999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
* lang-specs.h: Pass -$ to the preprocessor.
1999-05-10 Jason Merrill <jason@yorick.cygnus.com>
* init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
(resolve_offset_ref): Don't handle a raw baselink.
* cvt.c (build_expr_type_conversion): Likewise.
* typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
convert_for_initialization): Likewise.
* class.c (instantiate_type): Handle seeing a baselink under an
OFFSET_REF.
* error.c (dump_expr): Likewise.
* pt.c (for_each_template_parm): Likewise.
(resolve_overloaded_unification): Likewise.
* tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
* typeck.c (expr_sizeof): Also complain about other permutations
of overloaded functions.
1999-05-07 Jason Merrill <jason@yorick.cygnus.com>
* init.c (resolve_offset_ref): Don't return a raw method.
Use BASELINK_P.
* typeck.c (decay_conversion): Don't handle a raw method.
Resolve all OFFSET_REFs.
(get_member_function_from_ptrfunc): 0 is a valid vtable index.
(build_binary_op_nodefault): Handle resolving overloaded fns. Use
same_type_p for pmf bits. Don't use build_binary_op to compare
raw pointers to methods.
(convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
to decide when to call resolve_offset_ref.
(build_c_cast, convert_for_initialization): Likewise.
* cvt.c (build_expr_type_conversion): Likewise.
1999-05-06 Nathan Sidwell <nathan@acm.org>
* call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
1999-05-05 Mark Mitchell <mark@codesourcery.com>
* decl2.c (start_objects): Don't let static constructors and
destructors get inlined.
* parse.y (nested_name_specifier): Make sure ordinary types are
complete, just like template types.
* parse.c: Regenerated.
* pt.c (check_explicit_specialization): Improve error messages.
1999-05-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
* typeck.c (string_conv_p): Use same_type_p to check whether we
try to convert between char and wchar_t.
1999-05-03 Mark Mitchell <mark@codesourcery.com>
* search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
lookup to error_mark_node here.
(lookup_member): Revise documentation. Add comments. Don't set
the TREE_TYPE to error_mark_node here, and don't build up an extra
TREE_LIST for ambiguous lookups.
(setup_class_bindings): Adjust accordingly.
(push_class_decls): Revise out-of-date comments.
* typeck.c (build_const_cast): Tighten checks for legality.
1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
* init.c (build_member_call): Lookup names coming from
namespace-scoped LOOKUP_EXPR.
1999-05-03 Jim Blandy <jimb@zwingli.cygnus.com>
* gxxint.texi: Add documentation for 'I'.
1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
* tinfo.cc (operator==): Qualify type_info with std::.
1999-05-02 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy.
(DECL_COMDAT): Remove definition.
1999-05-01 Mark Mitchell <mark@codesourcery.com>
* decl.c (wrapup_globals_for_namespace): Fix thinko in previous
change.
1999-04-30 Mark Mitchell <mark@codesourcery.com>
* class.c (build_vtable): Use build_lang_decl when building
vtables, not just build_decl.
(prepare_fresh_vtable): Likewise.
* decl.c (wrapup_globals_for_namespace): Mark vtables as
DECL_EXTERNAL when calling wrapup_global_declarations.
* decl2.c (priority_info_s): Add initializations_p and
destructions_p members.
(finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
when deciding what vtables to write out.
(ssdf_decls): New variable.
(ssdf_decls_used): Likewise.
(start_static_storage_duration_function): Deal with being called
multiple times. Avoid inlining this function.
(generate_inits_for_priority): Deal with reuse of priority map.
(get_priority_info): Clear initializations_p and destructions_p.
(do_static_initialization): Tweak comment.
(do_static_destruction): Likewise. Fix condition on sentries for
destruction.
(generate_ctor_or_dtor_function): Call all of the static storage
duration functions.
(generate_ctor_or_dtor_function_for_priority): Check
initializations_p and destructions_p to see what priorities need
initialization functions.
(finish_file): Rework to generate multiple static storage duration
functions, rather than just one.
* typeck.c (build_const_cast): Tweak last change to handle
templates correctly.
* typeck.c (build_const_cast): Disallow use of const_cast to
anything but a pointer or reference type.
1999-04-30 Nathan Sidwell <nathan@acm.org>
* decl.c (cp_finish_decl): Don't permit arrays of abstract or
signature type.
1999-04-29 Mark Mitchell <mark@codesourcery.com>
* decl2.c (do_static_destruction): Remove obsolete FIXME comment.
(finish_file): Indent comments properly.
1999-04-29 Richard Henderson <rth@cygnus.com>
* decl2.c (do_static_initialization): Call do_pending_stack_adjust.
(do_static_destruction): Likewise.
1999-04-29 Nathan Sidwell <nathan@acm.org>
* cp-tree.h (TYPE_NOTHROW_P): New macro.
* decl2.c (delete_sanity): Warn on deleting void *.
* init.c (build_new_1): Use TYPE_NOTHROW_P.
* typeck.c (c_expand_return): cp_pedwarn on returning NULL from
throwing operator new.
1999-04-28 Nathan Sidwell <nathan@acm.org>
* cp-tree.h (build_component_addr): Remove prototype.
* typeck.c (build_component_addr): Make static. Remove MSG
argument.
(build_component_addr): Remove MSG parameter, clean up
comment.
(build_x_function_call): Use cp_error.
(build_unary_op): Adjust call of build_component_addr.
1999-04-28 Mark Mitchell <mark@codesourcery.com>
* pt.c (tsubst_friend_class): Check for NULL.
Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
* search.c (binfo_for_vtable): Initialize bfvi.var.
1999-04-27 Nathan Sidwell <nathan@acm.org>
* rtti.c (build_x_typeid): Check rtti is enabled.
1999-04-26 Mark Mitchell <mark@codesourcery.com>
* search.c (is_subobject_of_p): Make sure we're looking at the
right baseclasses.
1999-04-26 Marc Espie <espie@cvs.openbsd.org>
* Make-lang.in (cplib2.ready): Don't depend on phony targets.
1999-04-23 Mark Mitchell <mark@codesourcery.com>
* decl2.c (finish_file): Tweak handling of extern inlines so that
they are not unnecessarily put out.
* search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
such as base classes.
1999-04-22 Brendan Kehoe <brendan@cygnus.com>
* tree.c (build_exception_variant): Fix typo: use the chain of U,
not trying V, while cycling through U.
1999-04-22 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (lang_decl_flags): Remove returns_first_arg and
preserves_first_arg. Enlarge dummy accordingly.
(DECL_TINFO_FN_P): New macro.
(SET_DECL_TINFO_FN_P): Likeiwse.
(DECL_RETURNS_FIRST_ARG): Remove.
(DECL_PRESERVES_THIS): Likewise.
(DECL_INIT_PRIORITY): New macro.
(finish_struct_1): Change prototype.
(cat_namespace_levels): Remove prototype.
(vtable_decl_p): New prototype.
(vtype_decl_p): Likewise.
(sigtable_decl_p): Likewise.
(walk_globals_pred): New typedef.
(walk_globals_fn): Likewise.
(walk_globals): New prototype.
(walk_namespaces_fn): New typedef.
(walk_namespaces): New prototype.
(wrapup_globals_for_namespace): Likewise.
(walk_vtables): Remove prototype.
(walk_sigtables): Likewise.
(instantiate_pending_templates): New prototype.
* class.c (finish_struct_1): Don't return a value.
* decl.h (pending_statics): Remove declaration.
* decl.c (walk_namespaces_r): New function.
(walk_globals_r): Likewise.
(vtable_decl_p): Likewise.
(vtype_decl_p): Likewise.
(sigtable_decl_p): Likewise.
(walk_namespaces): Likewise.
(walk_globals_data): New type.
(walk_globals): New function.
(wrapup_globals_for_namespace): Likewise.
(expand_static_init): Remove assertion. Remove redundancy in
conditional. Don't put static data members in static_aggregates
Tidy.
(finish_function): Remove redundancy in conditional. Don't set
DECL_RETURNS_FIRST_ARG.
(cat_namespace_levels): Remove.
* decl2.c: Include splay-tree.h and varray.h.
(priority_info_s): New structure.
(finish_vtable_vardecl): Change prototype. Adjust for new calling
conventions.
(prune_vtable_vardecl): Likewise.
(finish_sigtable_vardecl): Likewise.
(setup_initp): Remove.
(do_dtors): Remove.
(do_ctors): Remove.
(start_static_storage_duration_function): New function.
(generate_inits_for_priority): Likewise.
(finish_static_storage_duration_function): Likewise.
(get_priority_info): Likewise.
(do_static_initialization): Likewise.
(do_static_destruction): Likewise.
(do_static_initialization_and_destruction): Likewise.
(generate_ctor_or_dtor_function): Likewise.
(generate_ctor_and_dtor_functions_for_priority): Likewise.
(pending_statics): Make it a varray.
(pending_statics_used): New variable.
(saved_inlines): Make it a varray.
(saved_inlines_used): New variable.
(finish_static_data_member): Change method of updating
pending_statics.
(mark_inline_for_output): Remove #if 0'd code. Change method of
updating saved_inlines.
(walk_vtables): Remove.
(walk_sigtables): Likewise.
(import_export_decl): Use DECL_TINFO_FN_P.
(pending_templates): Remove declaration.
(maybe_templates): Likewise.
(static_aggregates_initp): Likewise.
(setup_initp): Likewise.
(finish_objects): Simplify.
(INITIALIZE_P_IDENTIFIER): New macro.
(PRIORITY_IDENTIFIER): New macro.
(SSDF_IDENTIFIER): New macro.
(initialize_p_decl): New variable.
(priority_decl): Likewise.
(ssdf_decl): Likewise.
(priority_info_map): Likewise.
(finish_file): Recode output of static intializers and other
file-scope finalization tasks.
* error.c (OB_END_TEMPLATE_ID): New macro.
(dump_type_real): Use it.
(dump_decl): Likewise.
(dump_function_name): Likewise.
* lex.c (set_typedecl_interface_info): Adjust for new walk_globals
interface.
(check_newline): Use walk_globals, not walk_vtables.
* pt.c (pending_tempalte_expansions): Remove.
(set_vardecl_interface_info): Likewise.
(pending_templates): Make static.
(maybe_templates): Likewise.
(instantiate_class_template): Adjust call to finish_struct_1.
(instantiate_pending_templates): New function.
* rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
* tree.c (static_aggregates_initp): Remove.
(cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
instead.
* Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
* gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
with the RTL code RETURN.
* hash.h: Regenerated.
* lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
* parse.y: Replace RETURN with RETURN_KEYWORD throughout.
* parse.c: Regenerated.
* pt.c: Include varray.h. Include rtl.h since varray.h requires
it.
(inline_parm_levels): New variable.
(inline_parm_levels_used): Likewise.
(maybe_begin_member_template_processing): Update them.
(maybe_end_member_template_processing): Use them, rather than
guessing how many levels to pop.
* decl.c (make_typename_type): Tighten error-checking.
1999-04-20 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (build_binary_op): Remove unneeded parameter.
* class.c (build_vrable_entry_ref): Adjust call to
build_binary_op.
* decl.c (expand_static_init): Likewise.
(grokdeclarator): Likewise.
(finish_function): Likewise.
* decl2.c (delete_sanity): Likewise.
(do_dtors): Likewise.
(do_ctors): Likewise.
* error.c (dump_type_suffix): Likewise.
* expr.c (cplus_expand_expr): Likewise.
* init.c (resolve_offset_ref): Likewise.
(build_new): Likewise.
(build_new_1): Likewise.
(build_vec_delete_1): Likewise.
(expand_vec_init_catch_clause): Likewise.
(build_delete): Likewise.
* pt.c (tsubst): Likewise.
* rtti.c (synthesize_tinfo_fn): Likewise.
* search.c (expand_upcast_fixups): Likewise.
(expand_direct_vtbls_init): Likewise.
* typeck.c (get_member_function_from_ptrfunc): Likewise.
(build_binary_op_nodefault): Likewise.
(point_int_sum): Likewise.
(pointer_diff): Likewise.
(build_unary_op): Likewise.
(build_modify_expr): Likewise.
(get_delta_difference): Likewise.
(build_ptrmemfunc): Likewise.
(expand_ptrmemfunc_cst): Likewise.
1999-04-20 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (grokfndecl): Always call cplus_decl_attributes.
* decl2.c (grokfield): Pass attrlist to grokdeclarator.
1999-04-19 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (finish_static_data_member_decl): New function.
* decl2.c (finish_static_data_member_decl): Split out from ...
(grokfield): Here.
* pt.c (instantiate_class_template): Use it here instead of
trying to fake it.
(tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
finish_static_data_member_decl will do that. Explicit set
DECL_EXTERNAL to match non-template processing.
1999-04-18 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (finish_class_definition): Add parameter.
* parse.y (structsp): Use it. Don't call pop_scope here.
* parse.c: Regenerated.
* semantics.c (finish_class_definition): Pop it here.
1999-04-17 Mark Mitchell <mark@codesourcery.com>
* decl.c (xref_tag): Revise handling of nested template
declarations.
* pt.c (check_explicit_specialization): Tweak handling of friend
templates in template classes.
(tsubst_friend_class): Handle friend declarations for nested
member template classes.
1999-04-16 Mark Mitchell <mark@codesourcery.com>
* class.c (finish_struct): Remove unused variable.
(pushclass): Likewise.
(invalidate_class_lookup_cache): Likewise.
* cp-tree.def (TYPENAME_TYPE): Improve documentation.
* decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
doesn't get obliterated.
(make_typename_type): Handle template classes correctly.
* cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
(storetags): Declare.
* class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
(pushclass): Likewise. Use storetags to install tag declarations,
not pushtag.
(invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
* decl.c (storetags): Make it global.
(push_class_binding): Set INHERITED_VALUE_BINDING_P for an
implicit typename declaration.
(pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG.
* method.c (hack_identifier): Likewise.
* search.c (lookup_member): Likewise.
* decl.c (warn_about_implicit_typename_lookup): New function.
(lookup_name_real): Use it. Rework handling of implicit typename
extension.
1999-04-15 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (lookup_nested_field): Remove.
* class.c (push_nested_class): Handle UNION_TYPEs.
(pop_nested_class): Likewise.
* decl.c (lookup_name_real): Don't call lookup_nested_field.
(start_decl): Use push_nested_class, not just pushclass.
(cp_finish_decl): Use pop_nested_class, not just popclass.
* search.c (lookup_nested_field): Remove.
* cp-tree.h (lang_type): Add documentation.
* decl2.c (handle_class_head): Create template declarations here,
as appropriate.
* parse.y (class_head): Return whether or not we entered a new
scope, as well as the type named.
(named_class_head): Likewise.
(named_complex_class_head_sans_basetype): Likewise.
(structsp): Adjust accordingly. Pop scope when required.
* parse.c: Regenerated.
* pt.c (check_default_tmpl_args): Robustify.
(redeclare_class_template): Likewise.
(instantiate_class_template): An instantiation of an
anonymous union is itself an anonymous union.
* semantics.c (begin_class_definition): Don't create template
declarations here.
1999-04-15 Jason Merrill <jason@yorick.cygnus.com>
* parse.y (after_type_declarator_intern): New nonterminal.
(after_type_declarator): Use it.
(direct_after_type_declarator): Likewise. Move above
nonnested_type to fix reduce/reduce conflict resolution.
(declmods): Reducing from just 'attributes' has EMPTY precedence.
* Makefile.in (CONFLICTS): Update.
* decl.c (define_label): Downgrade error for jumping over a
non-POD decl to pedwarn.
1999-04-14 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (popclass): Change declaration.
(pop_nested_class): Likewise.
(poplevel_class): Remove declaration.
* call.c (convert_default_argument): Pass no arguments to
popclass.
* class.c (finish_struct_1): Likewise.
(finish_struct): Likewise.
(popclass): Remove argument. Simplify code accordingly.
(pop_nested_class): Likewise.
* decl.c (poplevel_class): Declare it here, and make it static.
(poplevel): Handle class scopes.
(poplevel_class): Don't take an rgument. Simplify.
(pop_everything): Pass no arguments to pop_nested_class.
(cp_finish_decl): Pass no arguments to popclass.
(grokdeclarator): Pass no arguments to pop_nested_class.
(finish_function): Likewise.
* decl2.c (grokfield): Likewise.
(pop_scope): Pass no arguments to popclass.
* lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
* pt.c (instantiate_class_template): Move call to pushclass, and
document. Pass no arguments to popclass.
(regenerate_decl_from_template): Likewise.
1999-04-14 Jason Merrill <jason@yorick.cygnus.com>
* typeck.c (build_unary_op): Handle taking the address of a unique
bound non-static member function.
1999-04-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
* lang-options.h (-Wdeprecated): New flag.
* decl2.c (warn_deprecated): New flag.
(lang_decode_option): Deprecated this-is-variable,
external-templates, alt-external-templates.
Support -Wdeprecated.
* errfn.c (cp_deprecated): New function.
1999-04-13 Jason Merrill <jason@yorick.cygnus.com>
* decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
of the decls themselves.
* pt.c (tsubst_function_type): Copy attributes over.
* tree.c (cp_valid_lang_attribute): New fn. Handle init_priority
and com_interface.
* cp-tree.h: Add prototype.
* decl.c (init_decl_processing): Set valid_lang_attribute.
1999-04-13 Mark Mitchell <mark@codesourcery.com>
* class.c (finish_struct_1): Look at the const-ness of the field's
type, not the TREE_READONLY-ness of the declaration.
* method.c (synthesize_method): Likewise.
* pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
creating new declarations.
1999-04-13 Mike Stump <mrs@wrs.com>
* decl2.c (import_export_decl): Because vtables always reference
virtual functions, even if they are inlined, don't allow
-fno-implement-inlines to not emit them, instead, emit them with
the vtable.
* decl.c (start_function): Likewise.
1999-04-12 Jason Merrill <jason@yorick.cygnus.com>
* cp-tree.h (struct lang_type): Add com_interface.
(CLASSTYPE_COM_INTERFACE): New macro.
* class.c (set_rtti_entry): COM interface classes have no RTTI
entries in their vtables; adjust.
(add_virtual_function, finish_base_struct, skip_rtti_stuff,
modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
finish_struct_1): Likewise.
* decl2.c (mark_vtable_entries): Likewise.
* rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
* search.c (get_abstract_virtuals_1, get_abstract_virtuals,
expand_upcast_fixups): Likewise.
* tree.c (debug_binfo): Likewise.
* cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
* typeck.c (comptypes): If we get it, ignore attributes.
* class.c (instantiate_type): Use BASELINK_P. Change complain
parameter to flags; 2 means ignore attributes.
* call.c (build_op_delete_call): Pass it.
* decl.c (xref_tag): Only complain once about using a typedef-name
with 'struct'. Downgrade to pedwarn.
* decl.c (grokdeclarator): Allow [] syntax for zero-length array.
* parse.y (absdcl_intern): New nonterminal.
(absdcl, direct_abstract_declarator): Use it.
* pt.c (lookup_template_class): Look through implict typename.
1999-04-11 Mark Mitchell <mark@codesourcery.com>
* friend.c (add_friend): Deal gracefully with error_mark_node.
* method.c (build_overload_value): Handle pointers-to-members as
template parameters.
* decl.c (push_binding): Fix typo in comment.
1999-04-10 Mark Mitchell <mark@codesourcery.com>
* error.c (dump_type_real): If a typename is a template-id, put
out the template arguments.
(dump_expr): Handle TEMPLATE_ID_EXPR.
* pt.c (lookup_template_class): Now that full arguments are
available everywhere, remove code that tried to guess them.
1999-04-09 Mark Mitchell <mark@codesourcery.com>
* decl.c (make_typename_type): Complain if we don't find a type
when trying to make a typename type for a non-template type.
1999-04-09 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (start_decl): Pass attributes to grokdeclarator.
(grokdeclarator): Handle attributes on constructor-syntax
initializers.
1999-04-08 Mark Mitchell <mark@codesourcery.com>
* error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
don't have types.
* search.c (template_self_reference_p): Tweak.
1999-04-07 Mark Mitchell <mark@codesourcery.com>
* init.c (build_offset_ref): Don't build yet another weird data
structure to describe overloaded functions.
1999-04-06 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (BASELINK_P): New macro.
(SET_BASELINK_P): Likewise.
* init.c (build_member_call): Remove needless assignment in if
statement.
* search.c (lookup_field_r): Fix handling when we are looking
specifically for a type; these are not hidden by functions and
variables.
(lookup_member): Use SET_BASELINK_P.
* tree.c (is_overloaded_fn): Use BASELINK_P.
(really_overloaed_fn): Likewise.
(get_first_fn): Likewise.
1999-04-05 Mark Mitchell <mark@codesourcery.com>
* decl.c (lookup_name_current_level): Tweak, and improve
documentation.
* class.c (maybe_fixup_vptrs): Remove declaration.
(build_class_init_list): Likewise.
* decl.c (pushdecl_class_level): Call check_template_shadow here
...
(push_class_level_binding): ... not here.
* search.c (dfs_push_type_decls): Only avoid
template-self-reference TYPE_DECLs if they are from base classes.
1999-04-04 Mark Mitchell <mark@codesourcery.com>
* pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
nodes. Tidy.
1999-04-03 Jason Merrill <jason@yorick.cygnus.com>
* class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
(finish_struct_1): Don't call build_class_init_list.
1999-04-02 Mark Mitchell <mark@codesourcery.com>
* tinfo.h (__class_type_info): Fix illegal declaration.
* cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
* cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
(IDENTIFIER_CLASS_VALUE): Improve documentation.
(is_properly_derived_from): Declare.
(invalidate_class_lookup_cache): Likewise.
(maybe_maybe_note_name_used_in_class): Likewise.
(note_name_declared_in_class): Likewise.
(push_using_decl): Remove duplicate declaration.
(id_in_current_class): Remove declaration.
(push_class_binding): Change prototype.
(clear_identitifer_class_values): Declare.
* call.c (is_properly_derived_from): Make it global.
(build_new_function_call): Be careful about updating candidates.
(build_new_method_call): Handle COMPONENT_REFs. Don't crash when
asked to make illegal calls.
* class.c: Include splay-tree.h.
(class_stack_node): Add names_used slot.
(check_member_decl_is_same_in_complete_scope): Remove.
(add_method): Fix comment. Push the declaration into class
scope.
(finish_struct_1): When popping the class, pop the bindings too.
Remove check for data member/function member conflict.
(finish_struct): Remove calls to
check_member_decl_is_same_in_complete_scope. Change calls to
popclass.
(pushclass): Clear names_used in the class stack entry.
Use invalidate_class_lookup_cache to remove cached entries, rather
than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE
before entering a new class. Remove dead code. Don't mess with
current_function_decl when pushing declarations.
(invalidate_class_lookup_cache): New function, split out from ...
(popclass): Here. Clean up names_used on our way out.
(instantiate_type): Adjust.
(build_self_reference): Don't push the declaration here.
(maybe_note_name_used_in_class): New function.
(note_name_declared_in_class): Likewise.
* decl.c (add_binding): Change prototype.
(find_class_binding_level): New function.
(innermost_nonclass_level): Likewise.
(current_binding_level): Update documentation.
(inner_binding_level): Remove. Replace with current_binding_level
throughout.
(push_binding_level): Remove special handling of
class_binding_level.
(pop_binding_level): Likewise. Use find_class_binding_level.
(suspend_binding_level): Likewise.
(global_bindings_p): Use innermost_nonclass_level.
(toplevel_bindings_p): Likewise.
(namespace_bindings_p): Likewise.
(pseudo_global_level_p): Likewise.
(push_binding): Clear INHERITED_VALUE_BINDING_P.
(add_binding): Check for illegal multiple declarations. Return a
value indicating whether or not the new binding was legal.
(push_local_binding): Skip over class binding levels. Check
return value from add_binding.
(push_class_binding): Set INHERITED_VALUE_BINDING_P. Call
note_name_declared_in_class.
(pushlevel_class): Remove "fake out the rest of the compiler"
code.
(poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
(clear_identifier_class_values): New function.
(pop_from_top_level): Use it.
(pop_everything): Tweak.
(maybe_process_template_type_declaration): Don't push the
declaration for the template here.
(pushtag): Don't push tag declarations into class scope here.
(pushdecl): Apply DeMorgan's law for readability.
(pushdecl_class_level): Remove special-case code for
TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions.
(push_class_level_bindng): Deal with inherited bindings.
(lookup_name_real): Remove special-case code for
TYPE_BEING_DEFINED, and some implicit typename magic.
(grokdeclarator): Handle COMPONENT_REF for a template function.
(build_enumerator): Don't call pushdecl_class_level here.
(id_in_current_class): Remove.
* decl2.c (grokfield): Don't call pushdecl_class_level or
check_template_shadow.
* errfn.c (cp_file_of): Don't declare.
(cp_line_of): Likewise.
* error.c (dump_decl): Handle an OVERLOAD.
(cp_file_of): Likewise.
(cp_line_of): Likewise.
* init.c (build_member_call): Handle a COMPONENT_REF.
* lex.c (do_identifier): Call maybe_note_name_used_in_class, not
pushdecl_class_level.
* method.c (hack_identifier): Build COMPONENT_REFs for references
to member templates as well as member functions. Remove dead
code.
* parse.y (left_curly): Remove.
(nonnested_type): Call maybe_note_name_used_in_class, not
pushdecl_class_level.
* parse.c: Regenerated.
(nested_name_specifier_1): Likewise.
* pt.c (check_explicit_specialization): Adjust, for robustness.
(check_template_shadow): Handle OVERLOADs.
(build_template_decl): Set DECL_CONSTRUCTOR_P on the
TEMPLATE_DECL, if appropriate.
* search.c (envelope_add_decl): Remove.
(dfs_pushdecls): Likewise.
(dfs_compress_decls): Likewise.
(dfs_push_decls): New function.
(dfs_push_type_decls): Likewise.
(setup_class_bindings): Likewise.
(template_self_reference_p): Likewise.
(lookup_field_r): Use it.
(looup_member): Remove old comment. Deal with ambiguity.
(push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
and remove envelope processing.
* semantics.c (begin_class_definition): Let pushclass push
declarations for base classes.
(finish_member_declaration): Push declarations into class scope.
* typeck.c (build_component_ref): Just put an OVERLOAD into the
COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
(build_x_function_call): Deal with OVERLOAD. Handle template-ids.
* Makefile.in (class.o): Depend on splay-tree.h.
Wed Mar 31 11:30:43 1999 Nathan Sidwell <nathan@acm.org>
* cvt.c (convert_pointer_to_real): Use same_type_p.
* typeck.c (comp_target_types): Use same_type_p.
1999-03-31 Jason Merrill <jason@yorick.cygnus.com>
* semantics.c (begin_inline_definitions,
finish_inline_definitions): Rename from finish_default_args and
begin_inline_definitions, respectively, to something that isn't a
total lie. :)
* parse.y (structsp): Adjust.
* tree.c (hash_tree_cons): Remove obsolete via_* parms.
(list_hash_lookup): Likewise.
(hash_tree_chain): Adjust.
* pt.c (tsubst): Adjust.
(tsubst_arg_types): Use plain hash_tree_cons.
* cp-tree.h (hash_tree_cons_simple): Lose.
* parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (hash.h): Generate using gperf language 'C', not
'KR-C', so gperf uses the `const' keyword on strings.
* gxx.gperf (resword): Const-ify a char*.
1999-03-30 Jason Merrill <jason@yorick.cygnus.com>
* cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
CLASSTYPE_BINFO_AS_LIST): Remove cruft.
* class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
tree.c: Adjust.
1999-03-29 Jason Merrill <jason@yorick.cygnus.com>
* decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
1999-03-28 Jason Merrill <jason@yorick.cygnus.com>
* pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
1999-03-27 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (add_friend): Declare.
(add_friends): Likewise.
* friend.c (add_friend): Make it global. Don't add to
DECL_BEFRIENDING_CLASSES if the befriending class is a template.
(add_friends): Make it global.
(make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
befriending class is a template.
* parse.y (component_decl_1): Fix typo in comment.
* parse.c: Regenerated.
* pt.c (instantiate_class_template): Use add_friend and
add_friends rather that duplicating some of their functionality
here.
1999-03-27 Jason Merrill <jason@yorick.cygnus.com>
* call.c (build_field_call): Unify 'this' and non-'this' cases.
* typeck.c (build_indirect_ref): Check for 'this' sooner.
Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* call.c (op_error): Const-ify a char*.
(add_candidate, source_type, add_warning): Add static prototype.
(print_z_candidates): Const-ify a char*.
* class.c (resolve_address_of_overloaded_function,
fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
(get_vtable_name, finish_struct_1): Const-ify a char*.
* cvt.c (convert_to_reference): Likewise.
* decl.c (redeclaration_error_message, record_builtin_type,
record_unknown_type, member_function_or_else, bad_specifiers):
Likewise.
(find_binding, select_decl, unqualified_namespace_lookup,
lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
Add static prototype.
(warn_extern_redeclared_static, duplicate_decls, pushdecl,
implicitly_declare, record_builtin_java_type, define_function,
grok_op_properties, tag_name): Const-ify a char*.
* cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
(define_function, finish_builtin_type): Const-ify a char*.
(cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
(file_name_nondirectory): Const-ify a char*.
(init_filename_times): Don't prototype.
(compiler_error): Prototype.
(yyerror, init_repo): Const-ify a char*.
(build_srcloc): Don't prototype.
(build_x_indirect_ref, build_indirect_ref, build_component_addr):
Const-ify a char*.
(warn_for_assignment): Don't prototype.
(convert_for_initialization, readonly_error, check_for_new_type,
GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
Const-ify a char*.
* decl2.c (acceptable_java_type, output_vtable_inherit,
setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
merge_functions, decl_namespace, validate_nonmember_using_decl,
do_nonmember_using_decl): Add static prototype.
(lang_f_options): Const-ify a char*.
(finish_builtin_type): Likewise.
(add_function, arg_assoc_namespace, arg_assoc_class): Add static
prototype.
* errfn.c: Include cp-tree.h.
(cp_thing): Add static prototype.
(compiler_error): Don't protoptype.
(cp_compiler_error): Cast `compiler_error' to `errorfn' before
passing it to `cp_thing'.
* error.c (interesting_scope_p): Add static prototype.
* except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
a char*.
* init.c (compiler_error): Don't prototype.
(member_init_ok_or_else): Const-ify a char*.
(build_java_class_ref): Add static prototype.
* lex.c (compiler_error): Don't prototype.
(get_time_identifier, interface_strcmp, extend_token_buffer,
handle_cp_pragma): Const-ify a char*.
(is_global, init_filename_times): Add static prototype.
(file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
(compiler_error): Change from fixed args to variable args.
(yyerror): Const-ify a char*.
* parse.y (cond_stmt_keyword): Const-ify a char*.
(parse_decl): Add static prototype.
* pt.c (template_args_equal, print_template_context): Likewise.
(print_candidates, check_default_tmpl_args): Const-ify a char*.
(instantiate_class_template): Likewise.
* repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
* rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
* search.c (lookup_field_info, lookup_member): Likewise.
(lookup_member): Cast the first argument of `bzero' to a PTR.
* sig.c (compiler_error): Don't prototype.
(build_signature_pointer_or_reference_nam): Const-ify a char*.
(get_sigtable_name, build_member_function_pointer): Likewise.
* tree.c (compiler_error): Don't prototype.
(no_linkage_helper, build_srcloc): Add static prototype.
(build_vbase_pointer_fields): Const-ify a char*.
(__eprintf): Don't unnecessarily handle `const' when !__STDC__.
* typeck.c (compiler_error): Don't prototype.
(convert_for_assignment): Const-ify a char*.
(comp_cv_target_types): Add static prototype.
(build_x_indirect_ref, build_indirect_ref, convert_arguments,
build_component_addr, build_unary_op, convert_for_initialization):
Const-ify a char*.
* typeck2.c (ack): Add static prototype and change from fixed args
to variable args.
(readonly_error, check_for_new_type): Const-ify a char*.
* xref.c (_XREF_FILE, find_file, filename, fctname, declname,
fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
(GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'.
(GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
gen_assign, GNU_xref_member): Const-ify a char*.
1999-03-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
* gxxint.texi: Remove old discussion on copying virtual bases.
1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
* Make-lang.in: Remove all references to g++.o/g++.c.
Link g++ from gcc.o.
1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
* decl2.c (comdat_linkage): Treat vtables like functions.
1999-03-25 Mark Mitchell <mark@codesourcery.com>
* pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
1999-03-25 Nathan Sidwell <nathan@acm.org>
* decl.c (init_decl_processing): Add `signed' type as a synonym
for `int'.
1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
* typeck.c (common_type): Handle cv-qual unification for pointers
to members.
* decl.c (unqualified_namespace_lookup): Return error_mark_node
on error.
(lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
* lex.c (do_identifier): If we got error_mark_node, call
lookup_name again.
1999-03-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
* class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
classes.
1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (lookup_name_real): Do nested field lookup regardless of
TYPE_BEING_DEFINED.
1999-03-24 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (lang_type): Remove has_assignment and
has_real_assignment. Add befriending_classes.
(TYPE_HAS_ASSIGNMENT): Remove.
(TYPE_HAS_REAL_ASSIGNMENT): Likewise.
(CLASSTYPE_BEFRIENDING_CLASSES): New macro.
(lang_decl): Document.
(DECL_BEFRIENDING_CLASSES): New macro.
(FRIEND_NAME): Move declaration to more obvious location.
(FRIEND_DECLS): Likewise.
* class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
* decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
(fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
(grok_op_properties): Likewise.
* friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
(add_friend): Likewise. Don't do weird things with assignment
operators. Update DECL_BEFRIENDING_CLASSES.
(add_friends): Don't do weird things with assignment operators.
(make_friend_class): Likewise. Update
CLASSTYPE_BEFRIENDING_CLASSES.
* pt.c (instantiate_class_template): Don't set
TYPE_HAS_ASSIGNMENT.
(tsubst_copy): Substitute the TREE_TYPE for more unary
expressions.
* ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
* search.c (protected_accessible_p): New function.
(friend_accessible_p): Likewise.
(accessible_p): Use them.
1999-03-23 Mark Mitchell <mark@codesourcery.com>
* pt.c (convert_nontype_argument): Don't create things that aren't
PTRMEM_CSTs when applying a qualification conversion to a
PTRMEM_CST.
1999-03-23 Mark Mitchell <mark@codesourcery.com>
* Makefile.in (OBJS): Don't mention hash.o.
(OBJDEPS): Likewise.
1999-03-23 Jason Merrill <jason@yorick.cygnus.com>
* decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
* decl.c (expand_static_init): Make sure we don't add any after
then.
* decl.c (cp_finish_decl): Move intelligence about handling
DECL_COMDAT for variables from here...
* decl2.c (comdat_linkage): ...to here.
(maybe_make_one_only): Tweak.
(import_export_decl): Call comdat_linkage for variables, too.
(finish_file): Handle template statics properly.
1999-03-22 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
Document internals of pointer-to-member-functions.
(DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
(PFN_FROM_PTRMEMFUNC): Likewise.
(build_type_conversion): Remove unused parameter.
(build_ptrmemfunc1): Declare.
(expand_ptrmemfunc_cst): New function.
(delta2_from_ptrmemfunc): Likewise.
(pfn_from_ptrmemfunc): Likewise.
* cvt.c (cp_convert_to_pointer): Remove unused parameter to
build_type_conversion. Use TYPE_PTRMEM_P for readability.
(convert_to_reference): Remove unused parameter to
build_type_conversion.
(ocp_convert): Likewise.
(build_user_type_conversion): Likewise.
* error.c (dump_expr): Handle NULL pointer-to-member functions.
* expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
* method.c (build_overload_value): Don't go splitting CONSTRUCTORs
open when handling pointer-to-member functions.
* pt.c (convert_nontype_argument): Clean up error messages. Be
more stringent with pointers-to-members.
* typeck.c (build_ptrmemfunc1): Don't declare. Make it global.
(build_unary_op): Tidy ever-so-slightly.
(build_conditional_expr): Remove extra parameter to
build_type_conversion.
(build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
we're using.
(expand_ptrmemfunc_cst): Define.
(delta2_from_ptrmemfunc): Likewise.
(pfn_from_ptrmemfunc): Likewise.
1999-03-19 Mark Mitchell <mark@codesourcery.com>
* init.c (build_member_call): Handle template-id expressions
correctly.
* typeck.c (build_x_function_call): Likewise.
1999-03-19 Chip Salzenberg <chip@perlsupport.com>
* friend.c (make_friend_class): Avoid core dump when
not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (start_function): Suppress normal linkage heuristics
for #pragma interface under MULTIPLE_SYMBOL_SPACES.
1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
* Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
1999-03-17 Martin von Löwis <loewis@informatik.hu-berlin.de>
* parse.y (named_complex_class_head_sans_basetype):
Do not push a scope for error_mark_node.
(maybe_base_class_list): Likewise.
* decl.c (start_decl): Check for error_mark_node as a type.
Detected by g++.brendan/array-refs.C.
(start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
(maybe_build_cleanup_1): Likewise. Detected by
g++.jason/incomplete1.C.
* tree.c (build_dummy_object): Use void_zero_node instead of the
error_mark_node.
(is_dummy_object): Check for such a node.
Detected by g++.bob/inherit1.C
1999-03-16 Jason Merrill <jason@yorick.cygnus.com>
* method.c (old_backref_index): Split out...
(flush_repeats): From here. Rename back from try_old_backref.
(build_mangled_name): Put back some old-style repeat handling.
Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* lex.c: Don't include setjmp.h.
(parse_float): New static function.
(pf_args): New struct.
(real_yylex): Use them in call to `do_float_handler'.
1999-03-15 Mark Mitchell <mark@markmitchell.com>
* decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
* tree.c (layout_basetypes): Not here.
* search.c (dfs_search): Remove; no longer used.
1999-03-12 Mark Mitchell <mark@markmitchell.com>
* decl2.c (validate_nonmember_using_decl): Issue sensible
error-messages on bogus qualifiers.
1999-03-14 Jason Merrill <jason@yorick.cygnus.com>
* call.c (add_function_candidate): Fix uninitialized variable.
* Makefile.in (search.o): Add dependency on varray.h.
1999-03-13 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (duplicate_decls): Use same_type_p.
* method.c (try_old_backref): Renamed from flush_repeats. Use
same_type_p. Don't try to handle repeats. Return success.
(is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
calls from old-style code, too.
(check_ktype): Use same_type_p.
(check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
(build_qualified_name): Simplify logic.
(process_overload_item): Strip typedefs and quals at the top.
(build_mangled_name_for_type_with_Gcode): Remove call to
type_canonical_variant.
(build_mangled_name): Likewise. Remove support for old-style
repeats, which have been disabled since 2.7.2. Don't mess with
TREE_USED.
(build_decl_overload_real): Don't mess with TREE_USED.
1999-03-13 Nathan Sidwell <nathan@acm.org>
* error.c (cp_printers): Add 'F' escape character.
(dump_type_real): Remove TREE_LIST (fnargs) printing.
Functionality moved to dump_parameters.
(dump_type_suffix): Use dump_parameters and dump_exception_spec.
(dump_function_decl): Extend meaning of V parameter. Use
dump_parameters and dump_exception_spec.
(dump_parameters): New static function.
(dump_exception_spec): New static function.
(fndecl_as_string): Change argument semantics. Use
dump_function_decl directly.
* sig.c (build_signature_table_constructor): Use cp_error.
1999-03-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
* semantics.c (finish_switch_cond): Handle error cases gracefully.
Detected by g++.law/enum5.C.
* typeck.c (build_modify_expr): Check for errors after resolving
offsets. Detected by g++.brendan/static1.C.
* decl.c (complete_array_type): Ignore initial_value if it is an
error. Detected by g++.benjamin/17930.C.
* typeck2.c (process_init_constructor): Return error if one argument
is in error. Detected by g++.benjamin/13478.C.
1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
* decl.c (select_decl): Allow class templates when we need types.
* decl2.c (ambiguous_decl): Likewise.
1999-03-12 Mark Mitchell <mark@markmitchell.com>
* lex.c (do_identifier): Correct call to enforce_access.
* search.c (accessible_p): Tweak comment.
1999-03-10 Mark Mitchell <mark@markmitchell.com>
* semantics.c (begin_class_definition): Call build_self_reference.
(finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
* search.c (assert_canonical_unmarked): Fix typo in prototype.
* search.c (dfs_canonical_queue): New function.
(dfs_assert_unmarked_p): Likewise.
(assert_canonical_unmarked): Likewise.
(access_in_type): Use it.
(accessible_p): Likewise. Walk the whole tree when umarking.
* sig.c (build_signature_table_constructor): Use accessible_p
instead of compute_access.
1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
* call.c (add_builtin_candidates): Handle overloaded conversion ops.
1999-03-09 Mark Mitchell <mark@markmitchell.com>
* cp-tree.h (flag_access_control): Declare.
(TREE_VIA_PPUBLIC): Document.
(DECL_NONSTATIC_MEMBER_P): New macro.
(enforce_access): Return an indication of whether or not access
was permitted.
(build_self_reference): Change prototype.
(compute_access): Replace with ...
(accessible_p): New function.
(dfs_walk): Change prototype.
(dfs_unmark): Likewise.
(markedp): Likewise.
* call.c (enforce_access): Use accessible_p.
* class.c (build_self_reference): Insert the declaration into the
list of members for this type, and make it public.
* decl.c (xref_basetypes): Avoid ill-timed recursion.
* init.c (build_offset_ref): Use lookup_member, not three separate
name-lookups. Call enforce_access rather than checking for
illegal accesses here.
(resolve_offset_ref): Likewise.
* lex.c (do_identifier): Likewise.
* method.c (hack_identifier): Likewise.
* parse.y (self_reference): Remove.
(opt_component_decl_list): Don't use it.
* parse.c: Regenerated.
* pt.c (print_candidates): Generalize to handle lists of
overloaded functions.
(instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
not set.
(get_template_base): Use new calling convention for dfs_walk.
* search.c: Include varray.h. Add prototypes.
(dfs_walk): Accept a data pointer to pass to the work functions.
All callers changed. All work functions changed.
(breadth_first_search): Rename to bfs_walk, and make consistent
with dfs_walk.
(dfs_walk_real): New function.
(canonical_binfo): New function.
(context_for_name_lookup): Likewise.
(shared_marked_p): Likewise.
(shared_unmarked_p): Likewise.
(lokup_field_queue_p): Likewise.
(lookup_field_r): Generalize to handle both functions and fields.
(lookup_field): Just call lookup_member.
(lookup_fnfields): Likewise.
(lookup_member): Move body of lookup_field here and generalize.
(dfs_accessible_queue_p): Likewise.
(dfs_accessible_p): Likewise.
(dfs_access_in_type): Likewise.
(access_in_type): Likewise.
(compute_access): Remove, and replace with ...
(accessible_p): New function.
(vbase_types): Remove.
(vbase_decl_ptr_intermediate): Likewise.
(vbase_decl_ptr): Likewise.
(vbase_init_result): Likewise.
(closed_envelopes): Likewise.
(bvtable): Likewise.
1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
* call.c (add_function_candidate): Check for proper number of args
before checking the validity of those args.
1999-03-06 Jason Merrill <jason@yorick.cygnus.com>
* cp-tree.h (struct lang_type): Add anon_union field.
(ANON_UNION_TYPE_P): Use it instead of examining type.
(SET_ANON_UNION_TYPE_P): New macro.
* decl.c (check_tag_decl): Use it.
* search.c (compute_access): Handle non-type contexts earlier, and
handle NULL_TREE.
* tree.c (build_exception_variant): Use copy_to_permanent.
* decl2.c (setup_initp): Give statics with no priority the default
priority here.
(do_dtors, do_ctors, finish_file): Remove special handling of
non-prioritized statics.
1999-03-05 Mark Mitchell <mark@markmitchell.com>
* cp-tree.h (ANON_UNION_TYPE_P): Robustify.
* decl.c (make_typename_type): Don't issue an error if an
immediate lookup fails; it migt be resolved later.
* friend.c (is_friend): Add comment.
* search.c (breadth_first_search): Add POSTFN and DATA
parameters. Tidy. All callers changed.
(lookup_field_queue_p): New function.
(lookup_field_r): Likewise.
(lookup_field_post): Likewise.
(lookup_field): Use them, via breadth_first_search, instead of
duplicating logic.
(compute_access): Robustify.
(lookup_fnfield_info): New structure.
1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
* pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
* class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
cc happy.
* decl2.c (import_export_class): Also return if
CLASSTYPE_INTERFACE_ONLY is set.
1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
* decl.c (push_overloaded_decl): Only overwrite the old binding if
there was one.
* decl2.c (do_local_using_decl): Fix loop termination.
1999-03-02 Mark Mitchell <mark@markmitchell.com>
* cp-tree.h (determine_specialization): Don't declare.
* pt.c (determine_specialization): Make it static. Eliminate
complain parameter. Note that decl is always non-NULL now, and
simplify accordingly.
* decl.c (maybe_push_to_top_level): Always call
push_cp_function_context.
(pop_from_top_level): Always call pop_cp_function_context.
1999-02-26 Nathan Sidwell <nathan@acm.org>
* typeck.c (complete_type_or_else): Add VALUE arg, for helpful
diagnostics.
* cp-tree.h (complete_type_or_else): Added VALUE parameter.
* init.c (build_new_1): Extra arg to complete_type_or_else.
(build_delete): Likewise.
* typeck.c (require_complete_type): Likewise.
(pointer_int_sum): Likewise.
(pointer_diff): Likewise.
(build_component_ref): Likewise.
* typeck2.c (incomplete_type_error): Always use cp_error.
Show declaration of undefined type, if appropriate.
Deal with UNKNOWN_TYPE nodes.
* typeck.c (require_complete_type): Use TYPE_SIZE as
size_zero_node to mean incomplete type.
(require_complete_type_in_void): New function.
(build_compound_expr): Call complete_type_in_void for LHS.
(build_c_cast): Call complete_type_in_void for void cast.
* cvt.c (ocp_convert): Call complete_type_in_void for void cast.
* decl.c (cplus_expand_expr_stmt): Void expression checks moved to
require_complete_type_in_void. Call it.
* cp-tree.h (require_complete_type_in_void): Prototype new function.
* typeck.c (convert_arguments): Use alternative format for
function decls. Don't require_complete_type here. Simplify
diagnostic printing.
(convert_for_initialization): Don't require_complete_type on RHS yet.
* call.c (convert_arg_to_ellipsis): Call require_complete_type.
* call.c (build_over_call): Cope with qualified void return type.
* semantics.c (finish_call_expr): Likewise.
* typeck.c (build_function_call_real): Likewise.
(c_expand_return): Likewise.
* decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
* call.c (print_z_candidates): Use alternate print format, to be
consistent with (pt.c) print_candidates.
* method.c (hack_identifier): List candidate members.
* search.c (lookup_field): Build ambiguous list, and show it, if
ambiguous.
1999-02-26 Mark Mitchell <mark@markmitchell.com>
* typeck.c (decay_conversion): Don't confuse constant array
variables with their initializers.
* decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
merging decls.
* pt.c (regenerate_decl_from_template): Tweak for clarity.
(instantiate_decl): Mark a decl instantiated before regenerating
it to avoid recursion.
* tree.c (mapcar): Don't call decl_constant_value unless we know
something is TREE_READONLY_DECL_P.
* class.c (check_for_override): Don't stop checking when we find
the first overridden function. Delete #if 0'd code.
* search.c (get_matching_virtual): Likewise.
1999-02-25 Richard Henderson <rth@cygnus.com>
* lang-specs.h: Define __FAST_MATH__ when appropriate.
1999-02-24 Mike Stump <mrs@wrs.com>
* typeck.c (convert_for_assignment): Allow boolean integral constant
expressions to convert to null pointer.
1999-02-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
* decl.c (lookup_namespace_name): Resolve namespace aliases.
* class.c (push_nested_class): Allow namespaces.
* decl2.c (set_decl_namespace): Add friendp parameter.
* decl.c (grokfndecl): Pass it.
(grokvardecl): Likewise.
* cp-tree.h: Change declaration.
1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
* pt.c (tsubst): Allow an array of explicit size zero.
1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
* errfn.c: Change varargs code to look like toplev.c.
* method.c (process_modifiers): Don't prepend 'U' for char or
wchar_t.
1999-02-20 Craig Burley <craig@jcb-sc.com>
* Make-lang.in (cplib2.ready): Don't consider updating
cplib2 stuff if the current directory isn't writable, as
it won't work (such as during a `make install').
Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
* decl2.c (start_objects): Make file scope constructors and
destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
ASM_OUTPUT_DESTRUCTOR are defined.
1999-02-19 Mark Mitchell <mark@markmitchell.com>
* cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
(fn_type_unification): Adjust prototype.
(lookup_fnfields_1): Declare.
* call.c (add_template_candidate_real): Adjust call to
fn_type_unification.
* class.c (add_method): Don't allow duplicate declarations of
constructors or destructors.
(resolve_address_of_overloaded_function): Remove unused variable.
Adjust call to fn_type_unification.
* decl.c (grokfndecl): Be more robust in the face of illegal
specializations.
* decl2.c (check_classfn): Remove hokey handling of member
templates.
* pt.c (determine_specialization): Improve comments. Adjust to
handle template argument deduction as per the standard.
(check_explicit_specialization): Fix comment spacing. Handle
type-conversion operators correctly. Improve error-recovery.
(fn_type_unification): Remove EXTRA_FN_ARG parameter.
(get_bindings_real): Simplify handling of static members.
* search.c (lookup_fnfields_1): Make it have external linkage.
* typeck.c (compparms): Fix comment.
(build_unary_op): Don't try to figure out which template
specialization is being referred to when when the address-of
operator is used with a template function.
Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
keyword to match an analogous change at the top level.
* tree.c (lvalue_or_else): Likewise.
1999-02-17 Mark Mitchell <mark@markmitchell.com>
* decl.c (xref_basetypes): Comment.
* pt.c (instantiate_class_template): Use xref_basetypes.
1999-02-16 Mark Mitchell <mark@markmitchell.com>
* cp-tree.h (tsubst): Change prototype.
(tsubst_expr): Likewise.
(tsubst_copy): Likewise.
(type_unification): Remove prototype.
* call.c (convert_default_arg): Adjust call to tsubst_expr.
* class.c (resolve_address_of_overloaded_function): Just use
fn_type_unification.
* decl.c (grokdeclarator): Adjust call to tsubst.
* method.c (build_template_parm_names): Likewise.
* pt.c (GTB_VIA_VIRTUAL): New macro.
(GTB_IGNORE_TYPE): Likewise.
(resolve_overloaded_unification): Add `complain' parameter.
(try_one_overload): Likewise.
(tsubst_template_arg_vector): Likewise.
(tsubst_template_parms): Likewise.
(tsubst_aggr_type): Likewise.
(tsubst_arg_types): Likewise.
(tsubst_call_declarator_parms): Likewise.
(unify): Remove explicit_mask.
(type_unification_real): Likewise.
(get_template_base_recursive): Likewise.
(coerce_template_template_parms): Provide prototype.
(tsubst_function_type): Likewise.
(try_class_unification): New function.
All callers changed to use new complain parameter.
(get_template_base): Use try_class_unification.
(unify): Adjust handling of classes derived from template types.
(fn_type_unification): Substitute explicit arguments before
unification.
1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
* decl.c (pushdecl): Remove dead code.
1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
* decl2.c (finish_objects): Fix code I missed in previous change.
1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
(grokdeclarator): Don't expect error_mark_node from grokfndecl.
* pt.c (maybe_process_partial_specialization): Complain about
'template <>' on non-specialization.
1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (grokdeclarator): Catch weird declarators.
* decl2.c (finish_file): Don't abort because of namespace parsing
failure.
(check_decl_namespace): Remove.
1999-02-09 Mark Mitchell <mark@markmitchell.com>
* cp-tree.h (get_template_base): Don't declare.
(dfs_walk): Declare.
(dfs_unmark): Likewise.
(markedp): Likewise.
* pt.c (unify): Remove duplicate declaration. Pass tparms and
targs to get_template_base.
(get_template_base_recursive): Move here from search.c. Check to
see that the base found can be instantiated to form the desired
type.
(get_template_base): Likewise.
(get_class_bindings): Simplify.
* search.c (get_template_base_recursive): Move to pt.c.
(get_template_base): Likewise.
(markedp): Make it global.
(dfs_walk): Likewise.
(dfs_unmark): Likewise.
1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
* pt.c (maybe_process_partial_specialization): Complain about
specialization in wrong namespace.
* tree.c (decl_namespace_context): New fn.
1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
* decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
* pt.c (coerce_template_template_parms): Handle nested
template template parameters.
Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
* typeck2.c: Update email addresses.
1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
* pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
turned off.
1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
* lex.c (retrofit_lang_decl): Split out...
(build_lang_decl): From here.
* decl.c (pushdecl): Call it for functions generated by the middle
end that don't have DECL_LANG_SPECIFIC.
* cp-tree.h: Declare it.
* decl2.c: Remove flag_init_priority. Always enable initp stuff.
(start_objects, finish_objects): Only use special
init_priority code if the user specified a priority.
(do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
objects.
Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
* Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
mkstemp.o. Get them from libiberty now.
(DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
* decl2.c (lang_decode_option): Use read_integral_parameter.
1999-02-01 Mark Mitchell <mark@markmitchell.com>
* pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
before calling complete_type_or_else.
Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* input.c (inline): Don't define, its handled by system.h.
Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
* decl2.c: Don't define flag_no_ident here. Don't process
-f(no-)ident here.
* cp-tree.h: Don't declare flag_no_ident here.
* lang-specs.h: Map -Qn to -fno-ident.
1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
* cp-tree.h (struct tree_binding): Replace scope field with a union.
(BINDING_SCOPE): Adjust.
* decl.c (BINDING_LEVEL): Adjust.
1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
* pt.c (instantiate_class_template): Set up the DECL_INITIAL of
member constants.
* init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
a ctor initializer.
* tree.c (equal_functions): Fix name in prototype.
* decl.c (push_local_binding): Add FLAGS argument.
(pushdecl, push_overloaded_decl): Pass it.
* decl2.c (do_local_using_decl): Likewise.
* cp-tree.h: Adjust prototype.
* decl.c (poplevel): Fix logic.
* decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
(poplevel): Handle that. Fix logic for removing TREE_LISTs.
(cat_namespace_levels): Don't loop forever.
1999-01-25 Richard Henderson <rth@cygnus.com>
* typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
* class.c (resolve_address_of_overloaded_function): Mark the
chosen function used.
* call.c (build_call): Make sure that a function coming in has
been marked used already.
* decl.c (expand_static_init): Call mark_used instead of
assemble_external.
* except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
alloc_eh_object, expand_throw): Likewise.
* init.c (build_builtin_delete_call): Likewise.
* rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
expand_generic_desc): Likewise.
1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
* tree.c (equal_functions): New function.
(ovl_member): Call it.
1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
* cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
* decl.c (decls_match): Return 1 if old and new are identical.
(push_overloaded_decl): Set OVL_USED when PUSH_USING.
1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (start_function): Make member functions one_only on windows.
* decl2.c (import_export_decl): Likewise.
* decl.c (grokdeclarator): Don't complain about implicit int in
a system header. Change same-name field check to not complain in
a system header instead of within extern "C".
1999-01-21 Mark Mitchell <mark@markmitchell.com>
* cp-tree.h (PUSH_GLOBAL): New macro.
(PUSH_LOCAL): Likewise.
(PUSH_USING): Likewise.
(namespace_bindings_p): Declare.
(push_overloaded_decl): Likewise.
* decl.c (push_overloaded_decl): Don't make it static. Check for
illegal declarations after using declarations here.
(namespace_bindings_p): Likewise.
(duplicate_decls): Don't consider declarations from different
namespaces to be the same.
(pushdecl): Use symbolic PUSH_ constants in calls to
push_overloaded_decl.
(push_overloaded_decl_1): Likewise.
* decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
(do_nonmember_using_decl): Check for illegal using declarations
after ordinary declarations here.
(do_local_using_decl): Call pushdecl to insert declarations.
1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
1999-01-21 Mark Mitchell <mark@markmitchell.com>
* tree.c (build_cplus_array_type_1): Don't call build_array_type
for types involving template parameters.
* cp-tree.h (PARM_DECL_EXPR): Delete.
(convert_default_arg): Change prototype.
(check_default_argument): Declare.
(search_tree): Likewise.
* call.c (convert_default_arg): Take the function to which the
default argument belongs as a parameter, and do any necessary
instantiation here, instead of ...
(build_over_call): Here.
* decl.c (local_variable_p): New function.
(check_default_argument): Likewise, split out and tidied from ...
(grokparms): Here.
* error.c (dump_expr): Don't set PARM_DECL_EXPR.
* pt.c (tsubst_call_declarator_parms): New function.
(for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
with CALL_EXPRs, rather than trying to be clever.
(tsubst): Use tsubst_call_declarator_parms.
* tree.c (search_tree): Don't make it static.
* typeck.c (convert_arguments): Use new interface to
convert_default_arg.
1999-01-20 Mark Mitchell <mark@markmitchell.com>
* error.c (dump_function_decl): Don't print the argument types for
a function when the verbosity level is negative.
* call.c (build_over_call): Check format attributes at call-time.
* pt.c (tsubst_copy): Fix comment.
(unify): Don't allow unification with variable-sized arrays.
* semantics.c (finish_stmt_expr): When processing a template make
the BIND_EXPR long-lived.
1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
* decl2.c (finish_vtable_vardecl): Make vtables comdat here.
(import_export_vtable): Not here.
1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
* typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
non-static member function.
1999-01-18 Nathan Sidwell <nathan@acm.org>
* class.c (instantiate_type): Only diagnose illegal address of member
function if complaining.
* decl.c (lookup_name_real): Remove duplicate code.
1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
* tree.c (copy_template_template_parm): Use permanent_obstack.
1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
* pt.c (unify): Remove restrictions on deduction of argument
of template template parameters.
1999-01-18 Nathan Sidwell <nathan@acm.org>
* rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
* class.c (resolve_address_of_overloaded_function): Show list of
all candidates, when none of them match.
1999-01-18 Chip Salzenberg <chip@perlsupport.com>
* typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
definition of 'casting away const' in reinterpret_cast<>.
1999-01-18 Graham <grahams@rcp.co.uk>
* cvt.c: Add include for decl.h, remove extern for
static_aggregates which is now provided by decl.h.
* Makefile.in (cvt.o): Add dependency for decl.h and missing
dependencies for convert.h and flags.h.
1999-01-18 Nathan Sidwell <nathan@acm.org>
* decl2.c (do_dtors): Set current location to that of the
decl, for sensible diagnostics and debugging.
(check_classfn): Issue `incomplete type' error, if
class is not defined.
1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
* cp-tree.h: Add prototype for bound_pmf_p.
1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
Manfred Hollstein <manfred@s-direktnet.de>
* decl.c (grokdeclarator): Don't make 'main(){}' an error with only
-Wreturn-type.
1999-01-16 Nathan Sidwell <nathan@acm.org>
* cp-tree.h (struct lang_type): Added has_mutable flag.
(CLASSTYPE_HAS_MUTABLE): New macro to access it.
(TYPE_HAS_MUTABLE_P): New macro to read it.
(cp_has_mutable_p): Prototype for new function.
* class.c (finish_struct_1): Set has_mutable from members.
* decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
it contains a mutable.
* typeck.c (cp_has_mutable_p): New function.
1999-01-15 Mark Mitchell <mark@markmitchell.com>
* pt.c (process_template_parm): Ignore top-level qualifiers on
non-type parameters.
* decl.c (start_function): Use current_function_parms in the call
to require_complete_type_for_parms, not the probably empty
DECL_ARGUMENTS.
1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
* semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
* decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
that we don't suppress the other copies.
* lex.c (handle_cp_pragma): Likewise.
1999-01-13 Mark Mitchell <mark@markmitchell.com>
* decl.c (grokdeclarator): Undo 1998-12-14 change.
* tree.c (build_cplus_array_type_1): Likewise.
* pt.c (instantiate_class_template): Remove misleading comment.
(tsubst_aggr_type): Substitute if there are template parameters,
regardless of whether or not they use template arguments.
(unify): Likewise, but for unification.
1999-01-12 Richard Henderson <rth@cygnus.com>
* cp-tree.h (flag_permissive): Declare extern.
1999-01-06 Mark Mitchell <mark@markmitchell.com>
* cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
here.
(lang_type): Add is_partial_instantiation. Decrease width of
dummy.
(PARTIAL_INSTANTIATION_P): New macro.
(OPERATOR_TYPENAME_P): Remove.
* decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
OPERATOR_TYPENAME_P.
(grok_op_properties): Likewise.
* friend.c (do_friend): Handle friends that are member functions
correctly.
* lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
* pt.c (instantiate_class_template): Rework for clarity. Avoid
leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
any more partial instantiation than is absolutely necessary for
implicit typename. Set PARTIAL_INSTANTIATION_P.
(tsubst_decl): Use IDENTIFIER_TYPENAME_P.
* semantics.c (begin_class_definition): Handle partial
specializations of a type that was previously partially
instantiated.
Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
* g++spec.c (LIBSTDCXX): Provide default definition.
(lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Make-lang.in (g++.o): Depend on prefix.h.
1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
* tree.c (bound_pmf_p): New fn.
* typeck.c (build_c_cast): Use it.
* decl.c (grok_op_properties): Use same_type_p.
Copyright (C) 1999 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
|