1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
|
2003-12-30 Nathan Sidwell <nathan@codesourcery.com>
PR c++/13507
* decl.c (duplicate_decls): Use build_type_attribute_variant to
merge attributes.
PR c++/13494
* tree.c (build_cplus_array_type_1): Only build a minimal array
type for dependent types or domains.
2003-12-29 Nathan Sidwell <nathan@codesourcery.com>
PR c++/12774
* typeck.c (comp_array_types): Fold non-dependent domains for
ABI-1.
2003-12-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/13289
* semantics.c (finish_id_expression): Only check if the type of
a template argument is integral or enumeration when it is not
dependent.
2003-12-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/12403
* parser.c (cp_parser_template_declaration_after_export): Set up
template specialization scope in case of explicit specialization.
2003-12-28 Mark Mitchell <mark@codesourcery.com>
PR c++/13081
* decl.c (duplicate_decls): Preserve inline-ness when redeclaring
a function template.
PR c++/12613
* decl.c (reshape_init): Reject GNU colon-style designated
initializers in arrays.
PR c++/13009
* call.c (build_special_member_call): Do not assume that we have a
pointer to the complete object in an assignment operator.
2003-12-28 Roger Sayle <roger@eyesopen.com>
PR c++/13070
* decl.c (duplicate_decls): When setting the type of an anticipated
declaration, merge the existing type attributes.
2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/13268, c++/13339
* class.c (add_method): Return early when method is error_mark_node.
* pt.c (tsubst_friend_function): Return early when new_friend is
error_mark_node.
2003-12-23 Mark Mitchell <mark@codesourcery.com>
* cp-lang.c (cp_expr_size): Return zero for empty classes.
* cp-tree.h (warn_if_uknown_interface): Remove unused function.
* decl2.c (warn_if_unknown_interface): Likewise.
2003-12-23 Nathan Sidwell <nathan@codesourcery.com>
PR c++/13387
* cp-lang.c (cxx_get_alias_set): Correct logic for a base type.
2003-12-22 Mark Mitchell <mark@codesourcery.com>
* decl.c (start_function): Do not check
flag_alt_external_templates or flag_external_templates.
* decl2.c (warn_if_unknown_interface): Likewise.
* lex.c (extract_interface_info): Likewise.
* pt.c (lookup_template_class): Likewise.
PR c++/12862
* name-lookup.c (pushdecl): Look up all namespace-scope entities
in their corresponding namespace.
PR c++/12397
* typeck.c (finish_class_member_access_expr): Don't tree
IDENTIFIER_NODEs as non-dependent expressions.
2003-12-22 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/5050
* tree.c (cp_start_inlining): Remove.
(cp_end_inlining): Remove.
* cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Do not define.
(LANG_HOOKS_TREE_INLINING_END_INLINING): Do not define.
* cp-tree.h (cp_start_inlining): Do not declare.
(cp_end_inlining): Do not declare.
2003-12-22 Mark Mitchell <mark@codesourcery.com>
PR c++/12479
* parser.c (cp_parser_declaration_seq_opt): Only issue "extra ;"
pedwarn when not in a system header.
2003-12-21 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (cp_tree_index): Remove CPTI_RECORD_TYPE,
CPTI_UNION_TYPE, CPTI_ENUM_TYPE.
(record_type_node): Remove.
(union_type_node): Likewise.
(enum_type_node): Likewise.
* decl.c: Remove mention of above tree nodes in comment.
* lex.c (cxx_init): Do not assign to record_type_node,
union_type_node, or enum_type_node. Simplify handling of
class_type_node.
PR c++/11554
* init.c (sort_mem_initializers): Add warning.
2003-12-21 Kazu Hirata <kazu@cs.umass.edu>
* call.c: Fix comment formatting.
* class.c: Likewise.
* cp-tree.h: Likewise.
* cvt.c: Likewise.
* cxx-pretty-print.c: Likewise.
* decl.c: Likewise.
* decl2.c: Likewise.
* error.c: Likewise.
* except.c: Likewise.
* init.c: Likewise.
* name-lookup.c: Likewise.
* parser.c: Likewise.
* pt.c: Likewise.
* rtti.c: Likewise.
* semantics.c: Likewise.
* typeck.c: Likewise.
* typeck2.c: Likewise.
2003-12-19 Kazu Hirata <kazu@cs.umass.edu>
* cvt.c: Remove uses of "register" specifier in
declarations of arguments and local variables.
* decl.c: Likewise.
* decl2.c: Likewise.
* expr.c: Likewise.
* friend.c: Likewise.
* lex.c: Likewise.
* name-lookup.c: Likewise.
* repo.c: Likewise.
* search.c: Likewise.
* tree.c: Likewise.
* typeck.c: Likewise.
* typeck2.c: Likewise.
2003-12-19 Mark Mitchell <mark@codesourcery.com>
PR c++/12795
* name-lookup.c (pushdecl): Do not treated any functions as being
"nested" in C++.
2003-12-19 Jason Merrill <jason@redhat.com>
PR c++/13371
* typeck.c (build_modify_expr): Stabilize lhs if we're narrowing.
* cvt.c (convert_to_void): Don't warn about the RHS of a comma
being useless if TREE_NO_UNUSED_WARNING is set.
2003-12-18 Richard Henderson <rth@redhat.com>
* cp-tree.h (struct lang_type_header): Remove __extension__.
2003-12-18 Jason Merrill <jason@redhat.com>
PR c++/12253
* init.c (build_vec_init): Initialization of an element from
an initializer list is also a full-expression.
* parser.c, pt.c, semantics.c: Rename constant_expression_p
to integral_constant_expression_p.
2003-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/13262
* pt.c (instantiate_decl): Wrap push_nested_class and
pop_nested_class around cp_finish_decl call for static member
variable.
2003-12-18 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/9154
* parser.c (cp_parser_template_argument): A type-id followed by '>>'
is just an user typo, and should be accepted as last resort if any
other parsing fails.
(cp_parser_enclosed_template_argument_list): If the argument list is
parsed correctly, but the next token is '>>', emit a diagnostic.
(cp_parser_next_token_ends_template_argument): Accept '>>' as
delimiter of template argument, it will be later detected as a typo.
2003-12-17 Kelley Cook <kcook@gcc.gnu.org>
* Make-lang.in: Replace cp/g++.1 with $(docobjdir)/g++.1.
2003-12-17 Mark Mitchell <mark@codesourcery.com>
PR c++/10603
PR c++/12827
* parser.c (cp_parser_error): Help c_parse_error print good
messages if the next token is a keyword.
(cp_parser_parameter_declaration_list): When resynchronizing after
a bad parameter declaration, stop if a comma is found.
(cp_parser_parameter_declaration): Avoid backtracking.
2003-12-16 Mark Mitchell <mark@codesourcery.com>
PR c++/12696
* decl.c (reshape_init): Recover quickly from errors.
2003-12-16 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9043
C++ ABI change: Mangling array indices in templates.
* decl.c (compute_array_index_type): Reorganize for earlier
template errors. Use value_dependent_expression_p for abi-2.
* mangle.c (write_array_type): Check broken mangling for
expression indices on abi-1
2003-12-16 Mark Mitchell <mark@codesourcery.com>
PR c++/12696
* decl.c (reshape_init): Recover quickly from errors.
PR c++/13275
* lex.c (reswords): Add "__offsetof" and "__offsetof__".
* parser.c (cp_parser): Add in_offsetof_p.
(cp_parser_new): Initialize it.
(cp_parser_primary_expression): Handle __offsetof__ (...).
(cp_parser_postfix_expression): Allow casts to pointer type and
uses of "->" in a constant expression if implementing offsetof.
(cp_parser_unary_expression): Allow the use of "&" in a constant
expression if implementing offsetof.
2003-12-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/2294
* name-lookup.c (push_overloaded_decl): always construct an OVERLOAD
if the declaration comes from an using declaration.
2003-12-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
* semantics.c (finish_id_expression): Refactor the code to handle
template parameters, and emit a more informative error message
when they are used within an integral constant expression.
2003-12-16 Nathan Sidwell <nathan@codesourcery.com>
PR c++/13387
* class.c (finish_struct_1): Compute mode and alias set for
CLASSTYPE_AS_BASE.
* call.c (build_over_call): Use CLASSTYPE_AS_BASE for trivial
assignment of a class, as necessary.
* cp-lang.c (cxx_get_alias_set): The alias set as a base is the
same as for the complete type.
PR c++/13242
C++ ABI change. Mangling template parameters of reference type
* mangle.c (write_template_args): Remove unreachable code.
(write_template_arg): Look through an argument of reference type.
2003-12-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/2294
* name-lookup.c (push_overloaded_decl): always construct an OVERLOAD
if the declaration comes from an using declaration.
2003-12-15 Mark Mitchell <mark@codesourcery.com>
PR c++/10926
* decl2.c (grokfield): Robustify.
PR c++/11116
* parser.c (cp_parser_throw_expression): Determine whether or not
an assignment-expression is present by doing one-token lookahead.
PR c++/13269
* parser.c (cp_parser_function_definition_after_declarator): Stop
scanning tokens when reaching EOF.
PR c++/12989
* typeck.c (cxx_sizeof_or_alignof_expr): Robustify.
PR c++/13310
* pt.c (dependent_template_p): Handle OVERLOADs.
2003-12-15 Mark Mitchell <mark@codesourcery.com>
PR c++/13243
PR c++/12573
* parser.c (cp_parser_postfix_expression): Tighten handling of
integral constant expressions.
(cp_parser_unary_expression): Likewise.
* pt.c (value_dependent_expression_p): Remove handling for
COMPONENT_REFs.
2003-12-15 Nathan Sidwell <nathan@codesourcery.com>
* class.c (add_method): Disallow destructor for java classes.
* decl.c (xref_basetypes): Check java class inheritance.
* decl2.c (check_java_method): Skip artificial params.
PR c++/13241
C++ ABI change. Mangling of symbols in expressions.
* mangle.c (write_mangled_name): Add top_level flag. Rework for
nested and unnested mangling. Deal with abi version 1 and version
2 differences.
(write_expression): Adjust write_mangled_name call.
(mangle_decl_string): Use write_mangled_name for all non-type decls.
2003-12-14 Mark Mitchell <mark@codesourcery.com>
PR c++/10779
PR c++/12160
* parser.c (struct cp_parser): Add in_template_argument_list_p.
(cp_parser_error): Use c_parse_error.
(cp_parser_name_lookup_error): New function.
(cp_parser_new): Initialize it.
(cp_parser_declarator): Add parenthesized_p parameter.
(cp_parser_nested_name_specifier_opt): Use
cp_parser_name_lookup_error.
(cp_parser_parenthesized_expression_list): Improve comments.
(cp_parser_condition): Adjust call to cp_parser_declarator.
(cp_parser_template_parameter): Adjust call to
cp_parser_parameter_declaration.
(cp_parser_template_argument_list): Set
in_template_argument_list_p.
(cp_parser_explicit_instantiation): Adjust call to
cp_parser_declarator.
(cp_parser_simple_type_specifier): Remove unncessary code.
(cp_parser_using_declaration): Use cp_parser_name_lookup_error.
(cp_parser_init_declarator): Handle member function definitions.
(cp_parser_direct_declarator): Adjust call to
cp_parser_declarator.
(cp_parser_type_id): Adjust call to cp_parser_declarator.
(cp_parser_parameter_declaration_list): Avoid backtracking where
possible.
(cp_parser_parameter_declaration): Add parenthesized_p parameter.
(cp_parser_function_definition): Remove.
(cp_parser_member_declaration): Do not backtrack to look for
function definitions.
(cp_parser_exception_declaration): Adjust call to
cp_parser_declarator.
(cp_parser_single_declaration): Handle function definitions via
cp_parser_init_declarator.
(cp_parser_save_member_function_body): New function.
2003-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/13106
* decl.c (finish_function): Check if return type is dependent before
issuing no return statement warning.
2003-12-12 Nathan Sidwell <nathan@codesourcery.com>
PR c++/13118
* cp-tree.h (lang_decl_u): Add thunk_alias member.
(THUNK_VIRTUAL_OFFSET): Must be a FUNCTION_DECL.
(THUNK_ALIAS_P): Remove.
(THUNK_ALIAS): Adjust.
* class.c (update_vtable_entry_for_fn): Get the vbase within the
overriding function's return type.
(dump_thunk): Adjust THUNK_ALIAS printing.
(build_vtbl_initializer): Adjust THUNK_ALIAS use.
* method.c (make_thunk): Revert 12881 test change. Clear
THUNK_ALIAS.
(finish_thunk): Adjust THUNK_ALIAS setting.
(use_thunk): Adjust THUNK_ALIAS use.
* semantics.c (emit_associated_thunks): Likewise.
PR c++/13114, c++/13115
* class.c (layout_empty_base): Propagate the move of an empty base
to offset zero.
PR c++/12881
* method.c (make_thunk): Deal with thunk aliases when searching
for a thunk. Robustify assertion.
2003-12-11 Nathan Sidwell <nathan@codesourcery.com>
* mangle.c (conv_type_names): Holds IDENTIFIER_NODEs only.
(hash_type): Use TYPE_UID of the identifier's type.
(compare_type): Adjust.
(mangle_conv_op_name_for_type): Store identifier nodes only, use
TYPE_UID has hash value.
2003-12-10 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (DECL_CONV_FN_P): Check that DECL_NAME is non-NULL.
2003-12-08 Matt Austern <austern@apple.com>
PR c/13134
* decl.c (duplicate_decls): Copy visibility flag when appropriate.
2003-12-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
* init.c (build_new_1): Deal with an OVERLOAD set when
looking up for _Jv_AllocObject.
* except.c (build_throw): Likewise for _Jv_Throw.
2003-12-08 Jason Merrill <jason@redhat.com>
PR c++/11971
* tree.c (build_local_temp): Split out from build_cplus_new.
(force_target_expr): New fn.
* call.c (call_builtin_trap): Call it. Take a type parm.
(convert_arg_to_ellipsis): Pass it.
(build_x_va_arg): Use call_builtin_trap.
PR c++/11929
* call.c (magic_varargs_p): New fn.
(build_over_call): Do no ellipsis conversions for arguments to
functions with magic varargs.
* name-lookup.c, init.c, except.c: Revert Giovanni's patch from
yesterday.
Give the anonymous namespace a null DECL_NAME.
* cp-tree.h: Don't declare anonymous_namespace_name.
* decl.c: Don't define it.
* dump.c (cp_dump_tree): Don't check for it.
* cxx-pretty-print.c (pp_cxx_original_namespace_definition): Likewise.
* error.c (dump_decl): Likewise.
* name-lookup.c: Define it here.
(push_namespace): Put it in DECL_ASSEMBLER_NAME instead.
* mangle.c (write_unqualified_name): Adjust.
2003-12-07 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/2294
* name-lookup.c (push_overloaded_decl): Always construct an
OVERLOAD unless the declaration is a built-in.
(set_namespace_binding): While binding OVERLOADs with only one
declaration, we still need to call supplement_binding.
* init.c (build_new_1): Deal with an OVERLOAD set when
looking up for _Jv_AllocObject.
* except.c (build_throw): Likewise for _Jv_Throw.
2003-12-06 Mark Mitchell <mark@codesourcery.com>
PR c++/13323
* class.c (same_signature_p): Handle conversion operators
correctly.
(check_for_override): Likewise.
2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
* Make-lang.in (GXX_CROSS_NAME, CXX_CROSS_NAME): Delete.
(c++.install_common, cp/g++.1, c++.install-man): Adjust for above.
(c++.uninstall): Likewise.
2003-12-05 Danny Smith <dannysmith@gcc.gnu.org>
Mark Mitchell <mark@codesourcery.com>
PR c++/13305
* parser.c (cp_parser_elaborated_type_specifier): Accept
attributes.
2003-12-05 Mark Mitchell <mark@codesourcery.com>
PR c++/13314
* parser.c (cp_parser_class_specifier): Match push_scope/pop_scope
calls.
(cp_parser_class_head): Likewise.
2003-12-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/13166
* parser.c (cp_parser_late_parsing_default_args): Make sure the
context is a class before calling push_nested_class and
pop_nested_class.
2003-12-03 James E Wilson <wilson@specifixinc.com>
* g++spec.c (lang_specific_driver): Delete USE_LIBUNWIND_EXCEPTIONS
support.
2003-12-03 Mark Mitchell <mark@codesourcery.com>
PR c++/9127
* cp-tree.h (at_namespace_scope_p): New function.
* parser.c (cp_parser_class_head): Handle invalid explicit
specializations.
* search.c (at_namespace_scope_p): New function.
PR c++/13179
* semantics.c (finish_handler_parms): Do not call eh_type_info for
types used in templates.
PR c++/10771
* parser.c (cp_parser_check_for_invalid_template_id): New
function.
(cp_parser_simple_type_specifier): Use it.
(cp_parser_elaborated_type_specifier): Likewise.
(cp_parser_class_head): Likewise.
2003-12-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/10126
* pt.c (convert_nontype_argument): Handle default conversions
while converting a pointer to member function.
2003-12-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/12573
* pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
looking into them recursively.
2003-12-02 Richard Henderson <rth@redhat.com>
* name-lookup.h (struct cp_binding_level): Use ENUM_BITFIELD.
* parser.c (struct cp_token): Likewise.
(struct cp_parser_token_tree_map_node): Likewise.
* lex.c (struct resword): Move const after ENUM_BITFIELD.
2003-11-30 Mark Mitchell <mark@codesourcery.com>
PR c++/9849
* parser.c (cp_lexer_prev_token): New function.
(cp_parser_skip_to_closing_parenthesis): Add consume_paren
parameter.
(cp_parser_nested_name_specifier_opt): Add is_declaration
parameter.
(cp_parser_nested_name_specifier): Likewise.
(cp_parser_class_or_namespace_name): Likewise.
(cp_parser_class_name): Likewise.
(cp_parser_template_id): Likewise.
(cp_parser_template_name): Likewise.
(cp_parser_id_expression): Adjust calls to
cp_parser_nested_name_specifier_op, cp_parser_template_id,
cp_parser_class_name.
(cp_parser_unqualified_id): Likewise.
(cp_parser_postfix_expression): Likewise.
(cp_parser_pseudo_destructor_name): Likewise.
(cp_parser_cast_expression): Likewise.
(cp_parser_mem_initializer_id): Likewise.
(cp_parser_simple_type_specifier): Likewise.
(cp_parser_type_name): Likewise.
(cp_parser_elaborated_type_specifier): Likewise.
(cp_parser_qualified_namespace_specifier): Likewise.
(cp_parser_using_declaration): Likewise.
(cp_parser_using_directive): Likewise.
(cp_parser_ptr_operator): Likewise.
(cp_parser_declarator_id): Likewise.
(cp_parser_class_head): Likewise.
(cp_parser_base_specifier): Likewise.
(cp_parser_constructor_declarator_p): Likewise.
(cp_parser_direct_declarator): Fix typo in comment.
(cp_parser_parenthesized_expression_list): Adjust call to
cp_parser_skip_to_closing_parenthesis.
(cp_parser_selection_statement): Likewise.
2003-11-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/12924
* typeck.c (finish_class_member_access_expr): Handle TEMPLATE_ID_EXPR
with OVERLOAD and DECL nodes as the first operand.
2003-11-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* pt.c (tsubst) <ARRAY_REF>: Remove erroneous argument to build_nt.
2003-11-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/5369
* friend.c (is_friend): Handle member function of a class
template as template friend.
(do_friend): Likewise.
* decl2.c (check_classfn): Add template_header_p parameter.
* decl.c (start_decl): Adjust check_classfn call.
(grokfndecl): Likewise.
* pt.c (is_specialization_of_friend): New function.
(uses_template_parms_level): Likewise.
(push_template_decl_real): Use uses_template_parms_level.
(tsubst_friend_function): Adjust check_classfn call.
* cp-tree.h (check_classfn): Adjust declaration.
(uses_template_parms_level): Add declaration.
(is_specialization_of_friend): Likewise.
2003-11-21 Mark Mitchell <mark@codesourcery.com>
PR c++/12515
* pt.c (build_non_dependent_expr): Handle GNU extension to ?:
operator.
2003-11-21 Jan Hubicka <jh@suse.cz>
* parser.c (cp_parser_postfix_expression): Initialize 's' to
NULL_TREE.
2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
* Make-lang.in (c++.extraclean): Delete.
2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
* Make-lang.in (check-g++, lang_checks): Add.
2003-11-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/12932
* class.c (currently_open_derived_class): Check if
current_class_type is NULL_TREE.
* semantics.c (finish_call_expr): Check if
currently_open_derived_class returns NULL_TREE.
* cp-tree.h (DERIVED_FROM_P): Add parenthesis around PARENT
parameter.
2003-11-17 Jason Merrill <jason@redhat.com>
* init.c (build_new_1): Preevaluate placement args.
* call.c (build_op_delete_call): Don't expose placement args to
overload resolution.
2003-11-16 Jason Merrill <jason@redhat.com>
* Make-lang.in (c++.tags): Create TAGS.sub files in each directory
and TAGS files that include them for each front end.
2003-11-15 Bernardo Innocenti <bernie@develer.com>
PR c++/2294
* name-lookup.c: Revert previous patch for PR c++/2294 to prevent
build failure on libjava.
2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
PR c++/2294
* name-lookup.c (push_overloaded_decl): Always construct an OVERLOAD
unless the declaration is a built-in.
(set_namespace_binding): While binding OVERLOADs with only one
declaration, we still need to call supplement_binding.
2003-11-14 Mark Mitchell <mark@codesourcery.com>
PR c++/12762
* parser.c (cp_parser_enclosed_template_argument_list): New
function.
(cp_parser_template_id): Use it.
(cp_parser_simple_type_specifier): Recognize invalid template
syntax.
2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
PR c++/2094
* pt.c (unify): Add support for PTRMEM_CST and
FIELD_DECL unification.
2003-11-13 Richard Earnshaw <rearnsha@arm.com>
* decl.c (grokfndecl): Change OK to type tree.
2003-11-12 Mark Mitchell <mark@codesourcery.com>
* tree.c (build_target_expr_with_type): Treate VA_ARG_EXPR like
CONSTRUCTOR.
* decl.c (cp_make_fname_decl): When creating a top-level
__FUNCTION__-like symbol, do register it with pushdecl.
* decl.c (finish_case_label): Do not check that we are within a
switch statement here.
* parser.c (struct cp_parser): Add in_iteration_statement_p and
in_switch_statement_p.
(cp_parser_new): Initialize them.
(cp_parser_labeled_statement): Check validity of case labels
here.
(cp_parser_selection_statement): Set in_switch_statement_p.
(cp_parser_iteration_statement): Set in_iteration_statement_p.
(cp_parser_jump_statement): Check validity of break/continue
statements here.
PR c++/12735
* cp-tree.h (duplicate_decls): Return a tree.
* decl.c (duplicate_decls): Clarify documentation. Return
error_mark_node to indicate a failed redeclaration.
* friend.c (do_friend): Handle that case.
* name-lookup.c (pushdecl): Likewise.
2003-11-11 Jason Merrill <jason@redhat.com>
* cp-tree.h (DECL_NAMESPACE_ASSOCIATIONS): New macro.
* name-lookup.c (parse_using_directive): New fn.
(is_associated_namespace): New fn.
(arg_assoc_namespace): Also check associated namespaces.
* name-lookup.h: Declare new fns.
* pt.c (maybe_process_partial_specialization): Allow
specialization in associated namespace.
* parser.c (cp_parser_using_directive): Accept attributes. Use
parse_using_directive.
2003-11-10 Richard Henderson <rth@redhat.com>
* cvt.c (convert_to_void): Use void_zero_node after overload failure.
2003-11-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/12832
* name-lookup.c (supplement_binding): Gracefully handle names
used at non-class scope prior declaration.
2003-11-06 Matt Austern <austern@apple.com>
* decl.c (duplicate_decls): copy DECL_VISIBILITY field.
* method.c (use_thunk): give thunk same visibility as function.
* optimize.c (maybe_clone_body): copy DECL_VISIBILITY field.
2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/11616
* pt.c (instantiate_pending_templates): Save and restore
input_location.
2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/2019
* friend.c (add_friend): Don't display previous declaration in
case of duplicate friend warning.
2003-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9810
* call.c (build_over_call): Check access using primary template
if FN is a member function template.
2003-11-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/12796
* class.c (handle_using_decl): Set input_location before calling
error_not_base_type.
2003-10-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10371
* semantics.c (finish_non_static_data_member): Handle when
both processing_template_decl and qualifying_scope are true.
2003-10-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/11076
* class.c (handle_using_decl): Swap arguments of error_not_base_type.
* parser.c (cp_parser_direct_declarator): Only resolve typename for
namespace scope declarations.
2003-10-24 Nathan Sidwell <nathan@codesourcery.com>
PR c++/12698, c++/12699, c++/12700, c++/12566
* cp-tree.h (THUNK_ALIAS_P, THUNK_ALIAS): New.
(debug_class, debug_thunks): New.
* class.c (dump_class_hierarchy_1): New break out from ...
(dump_class_hierarchy): ... here.
(dump_thunk, debug_thunks, debug_class): New.
(update_vtable_entry_for_fn): Add ssizetype casts. Correct
continued search for primary binfo via virtual.
(build_vtbl_initializer): Follow covariant thunk alias.
* method.c (make_thunk): Clear DECL_THUNKS of the thunk.
(finish_thunk): Look for an alias of the covariant thunk and point
to it.
(use_thunk): We should never use an alias.
* semantics.c (emit_associated_thunks): Do not emit aliases.
PR c++/12566
* cp-tree.h (cp_fname_init): Add TYPE pointer param.
* decl.c (cp_fname_init): Add TYPE pointer param. Set it. Don't
create an ad-hoc ERROR_MARK.
(cp_make_fname_decl): Adjust.
* pt.c (tsubst_expr): Adjust.
2003-10-23 Jason Merrill <jason@redhat.com>
PR c++/12726
* tree.c (build_target_expr_with_type): Don't call force_rvalue
for CONSTRUCTORs.
2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
* call.c: Fix comment formatting.
* class.c: Likewise.
* cxx-pretty-print.c: Likewise.
* init.c: Likewise.
* parser.c: Likewise.
* pt.c: Likewise.
* semantics.c: Likewise.
* tree.c: Likewise.
* typeck.c: Likewise.
* typeck2.c: Likewise.
2003-10-21 Mark Mitchell <mark@codesourcery.com>
PR c++/11962
* typeck.c (build_x_conditional_expr): Handle missing middle
operands in templates.
* mangle.c (write_expression): Issue errors about attempts to
mangle a non-existant middle operator to the ?: operator.
2003-10-21 Robert Bowdidge <bowdidge@apple.com>
* decl.c (cp_finish_decl): Remove clause intended for asm directives
in struct or class fields: this code is never executed.
2003-10-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* decl.c (start_decl): Exit if push_template_decl returns
error_mark_node.
2003-10-20 Kazu Hirata <kazu@cs.umass.edu>
* ChangeLog: Fix typos.
* call.c: Fix comment typos.
* class.c: Likewise.
* cp-tree.h: Likewise.
* cvt.c: Likewise.
* cxx-pretty-print.c: Likewise.
* decl.c: Likewise.
* decl2.c: Likewise.
* init.c: Likewise.
* mangle.c: Likewise.
* name-lookup.c: Likewise.
* parser.c: Likewise.
* search.c: Likewise.
* semantics.c: Likewise.
* tree.c: Likewise.
* typeck.c: Likewise.
2003-10-20 Jan Hubicka <jh@suse.cz>
* decl.c (start_cleanup_fn): Set DECL_DECLARED_INLINE_P to deffer
the expansion.
2003-10-20 Mark Mitchell <mark@codesourcery.com>
* Make-lang.in (c++.install-info): Remove.
2003-10-20 Jason Merrill <jason@redhat.com>
* class.c (layout_class_type): Set DECL_ARTIFICIAL on padding
field.
2003-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9781, c++/10583, c++/11862
* decl.c (cp_finish_decl): Exit immediately if decl is an
error_mark_node.
* pt.c (push_template_decl_real): Return error_mark_node for
invalid template declaration of variable.
2003-10-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/12495
* pt.c (lookup_template_class): Handle when current_class_type
is a local class.
2003-10-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/2513
* decl.c (make_typename_type): Use dependent_type_p.
(make_unbound_class_template): Likewise.
* pt.c (instantiate_class_template): Increment
processing_template_decl during substitution of template friend
function. Preincrement processing_template_decl rather than
postincrement.
(get_mostly_instantiated_function_type): Increment
processing_template_decl during partial substitution of function
type.
2003-10-15 Jan Hubicka <jh@suse.cz>
PR c++/12574
* decl2.c (cxx_callgraph_analyze_expr): Deal with baselink.
2003-10-14 Jason Merrill <jason@redhat.com>
PR c++/11878
* tree.c (build_target_expr_with_type): Call force_rvalue for
classes with non-trivial copy ctors.
PR c++/11063
* typeck.c (build_modify_expr): Call convert rather than abort.
2003-10-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
Breack out decl.c (3/n)
* name-lookup.c: Include flags.h
(lookup_name_current_level): Make static.
(add_decl_to_level): Likewise.
(push_local_binding): Likewise.
(push_overloaded_decl): Likewise.
(lookup_using_namespace): Likewise.
(qualified_lookup_using_namespace): Likewise.
(lookup_type_current_level): Likewise.
(unqualified_namespace_lookup): Likewise.
(namespace_ancestor): Likewise.
(push_using_directive): Likewise.
* decl.c (pushdecl): Move to name-lookup.c.
(pushdecl_top_level_1): Likewise.
(pushdecl_top_level): Likewise.
(pushdecl_top_level_and_finish): Likewise.
(maybe_push_decl): Likewise.
(push_using_decl): Likewise.
(push_overloaded_decl): Likewise.
(make_anon_name): Likewise.
(anon_cnt): Likewise.
(clear_anon_tags): Likewise.
(maybe_inject_for_scope_var): Likewise.
(check_for_out_of_scope_variable): Likewise.
* Make-lang.in (cp/name-lookup.o): Depend on flags.h.
* decl.c (warn_extern_redeclared_static): Export.
* cp-tree.h (warn_extern_redeclared_static): Declare.
2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
* Make-lang.in: Replace uses of $(target_alias) with
$(target_noncanonical).
2003-10-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* ChangeLog: Add PR number to patch for PR c++/12370.
2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
* name-lookup.h (cxx_scope_find_binding_for_name): Don't export.
(binding_for_name): Likewise.
(cxx_binding_clear): Move to name-lookup.c.
* name-lookup.c (cxx_scope_find_binding_for_name): Now static.
(binding_for_name): Likewise.
* decl2.c (is_ancestor): Move to name-lookup.c
(namespace_ancestor): Likewise.
(add_using_namespace): Likewise.
(ambiguous_decl): Likewise.
(lookup_using_namespace): Likewise.
(qualified_lookup_using_namespace): Likewise.
(set_decl_namespace): Likewise.
(decl_namespace): Likewise.
(current_decl_namespace): Likewise.
(push_decl_namespace): Likewise.
(pop_decl_namespace): Likewise.
(push_scope): Likewise.
(pop_scope): Likewise.
(struct arg_lookup): Likewise.
(arg_assoc): Likewise.
(arg_assoc_args): Likewise.
(arg_assoc_type): Likewise.
(add_function): Likewise.
(arg_assoc_namespace): Likewise.
(arg_assoc_class): Likewise.
(arg_assoc_template_arg): Likewise.
(do_namespace_alias): Likewise.
(validate_nonmember_using_decl): Likewise.
(do_nonmember_using_decl): Likewise.
(do_toplevel_using_decl): Likewise.
(do_local_using_decl): Likewise.
(do_class_using_decl): Likewise.
(do_using_directive): Likewise.
(constructor_name_full): Likewise.
(constructor_name): Likewise.
(constructor_name_p): Likewise.
2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
Break out decl.c (2/n)
* name-lookup.c: Include diagnostic.h
(cxx_binding_free): Make static.
(cxx_binding_make): Likewise.
(binding_table_new): Likewise
(binding_table_free): Likewise.
(binding_table_insert): Likewise.
(binding_table_find_anon_type): Likewise.
(binding_table_reverse_maybe_remap): Likewise.
(supplement_binding): Likewise.
* name-lookup.h (global_scope_name): Declare extern.
(global_type_node): Likewise.
(cxx_binding_free): Don't export.
(cxx_binding_make): Likewise.
(binding_table_new): Likewise.
(binding_table_free): Likewise.
(binding_table_insert): Likewise.
(binding_table_find_anon_type): Likewise.
(binding_table_reverse_maybe_remap): Likewise.
* Make-lang.in (cp/name-lookup.o): Depend on $(DIAGNOSTIC_H)
* decl.c (lookup_namespace_name): Move to name-lookup.c
(select_decl): Likewise.
(unqualified_namespace_lookup): Likewise.
(lookup_qualified_name): Likewise.
(lookup_name_real): Likewise.
(lookup_name_nonclass): Likewise.
(lookup_function_nonclass): Likewise.
(lookup_name): Likewise.
(lookup_name_current_level): Likewise.
(lookup_type_current_level): Likewise.
(lookup_flags): Likewise.
(qualify_lookup): Likewise.
(lookup_tag): Likewise.
(lookup_tag_reverse): Likewise.
(getdecls): Likewise.
(storedecls): Remove.
(cxx_remember_type_decls): Move to name-lookup.c.
(global_bindings_p): Likewise.
(innermost_nonclass_level): Likewise.
(toplevel_bindings_p): Likewise.
(namespace_bindings_p): Likewise.
(kept_level_p): Likewise.
(innermost_scope_kind): Likewise.
(template_parm_scope_p): Likewise.
(push_binding): Likewise.
(push_local_binding): Likewise.
(add_decl_to_level): Likewise. Make extern.
(push_class_binding): Move to name-lookup.c.
(resume_level): Likewise. Rename to resume_scope.
(begin_scope): Move to name-lookup.c.
(indent): Likewise.
(binding_depth): Likewise.
(is_class_level): Likewise.
(cxx_scope_descriptor): Likewise.
(cxx_scope_debug): Likewise.
(namespace_scope_ht_size): Likewise.
(leave_scope): Likewise.
(pushlevel_class): Likewise.
(poplevel_class): Likewise.
(clear_identifier_class_values): Likewise.
(pushdecl_with_scope): Likewise.
(pushdecl_namespace_level): Likewise.
(pushdecl_class_level): Likewise.
(push_class_level_binding): Likewise.
(push_using_directive): Likewise.
(identifier_global_value): Likewise.
(keep_next_level_flag): Likewise.
(keep_next_level): Likewise.
(free_binding_level): Likewise.
(set_class_shadows): Likewise.
(maybe_push_cleanup_level): Likewise.
(cp_namespace_decls): Likewise.
(bt_print_entry): Likewise.
(print_binding_level): Likewise.
(print_other_binding_stack): Likewise.
(print_binding_stack): Likewise.
(push_namespace): Likewise.
(pop_namespace): Likewise.
(push_nested_namespace): Likewise.
(pop_nested_namespace): Likewise.
(cxx_saved_binding_make): Likewise.
(struct cxx_saved_binding_make): Likewise.
(store_bindings): Likewise.
(maybe_push_to_top_level): Likewise.
(push_to_top_level): Likewise.
(pop_from_top_level): Likewise.
(identifier_type_value): Likewise.
(set_identifier_type_value): Likewise.
(set_identifier_type_value_with_scope): Likewise.
(pop_everything): Likewise.
(pushtag): Likewise.
(follow_tag_typedef): Likewise.
(maybe_process_template_type_declaration): Likewise.
(pop_binding): Likewise.
* cp-tree.h: Move corresponding declarations to name-lookup.h
2003-10-12 Steven Bosscher <steven@gcc.gnu.org>
* cvt.c (ocp_convert): Move warning to C common code.
2003-10-09 Jason Merrill <jason@redhat.com>
PR c++/6392
* tree.c (build_cplus_array_type): Handle all quals the same.
(cp_build_qualified_type_real): Look through arrays first.
* tree.c (build_cplus_new): Use build_decl to create a VAR_DECL.
(build_target_expr_with_type): Likewise.
* pt.c (instantiate_class_template): Sanity check that our
enclosing class has been instantiated.
2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
* cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS.
* error.c (dump_function_decl): Use it to skip the dump of the
arguments.
(dump_expr): When dumping a declaration found within an
expression, always set TFF_NO_FUNCTION_ARGUMENTS
in the flags.
2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
PR c++/11097
* pt.c (tsubst_decl): Substitute also the DECL_NAME node of
USING_DECL.
2003-10-06 Mark Mitchell <mark@codesourcery.com>
PR c++/10147
* call.c (initialize_reference): Tweak error message.
* cxx-pretty-print.h (cxx_pretty_printer_flags): Remove
pp_cxx_flag_qualified_id and pp_cxx_flag_global_scope.
* cxx-pretty-print.c (pp_cxx_id_expression): Always display
qualified entities using qualified names.
PR c++/12337
* init.c (build_new_1): Make sure that the expression returned is
not an lvalue.
PR c++/12344, c++/12236, c++/8656
* decl.c (start_function): Do not ignore attributes embedded in a
function declarator.
2003-10-06 Mark Mitchell <mark@codesourcery.com>
* Make-lang.in (c++.info): Remove.
(c++.dvi): Remove.
(c++.generated-manpages): Replace with ...
(generated-manpages): ... this.
2003-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
* decl.c (struct cp_binding_level): Move to name-lookup.h
(current_binding_level): Likewise.
(class_binding_level): Likewise.
* cp-tree.h (enum scope_kind): Likewise.
2003-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
* name-lookup.c (binding_entry_free): Nullify name and type
fields.
2003-10-02 Mark Mitchell <mark@codesourcery.com>
PR c++/12486
* typeck.c (finish_class_member_access_expr): Issue diagnostic
on erroneous use of qualified name.
2003-09-30 Richard Henderson <rth@redhat.com>
PR c++/12370
* decl.c (duplicate_decls): Copy DECL_SAVED_INSNS too.
2003-09-30 Kelley Cook <kelleycoook@wideopenwest.com>
* g++spec.c: Convert to ISO C90 prototypes.
* parser.c: Likewise.
2003-09-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
* decl.c (pop_binding): Don't mess with nullifying binding->scope
here.
* name-lookup.c: Re-format.
(cxx_binding_free): Nullify binding->scope.
2003-09-29 Jan Hubicka <jh@suse.cz>
PR C++/12047
* except.c (build_eh_type_type): Call mark_used on the type.
2003-09-28 Richard Henderson <rth@redhat.com>
* typeck.c (c_expand_asm_operands): Take location_t, instead of
individual file and line.
2003-09-28 Andreas Jaeger <aj@suse.de>
* decl.c (cxx_builtin_type_decls): Convert to ISO C90 function
definition.
* init.c (push_base_cleanups): Likewise.
* decl2.c (finish_file): Likewise.
* mangle.c (init_mangle): Likewise.
(dump_substitution_candidates): Likewise.
* search.c: Likewise.
2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
* name-lookup.h (get_global_value_if_present): New function.
(is_typename_at_global_scope): Likewise.
* except.c (do_begin_catch): Use get_global_value_if_present.
(do_end_catch): Likewise.
(do_allocate_exception): Likewise.
(do_free_exception): Likewise.
(build_throw): Likewise.
* parser.c (cp_parser_member_declaration): Likewise.
* rtti.c (throw_bad_cast): Likewise.
(throw_bad_typeid): Likewise.
* decl.c (check_tag_decl): Use is_typename_at_global_scope.
(grokdeclarator): Likewise.
* cp-tree.h (global_namespace): Move to name-lookup.h
* call.c (call_builtin_trap): Tidy.
2003-09-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/11415
* parser.c (cp_parser_nested_name_specifier_opt): Issue correct
error message when parser->scope is global_namespace.
2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cp-tree.h, name-lookup.h, decl.c, decl2.c: Remove reference to
macros BINDING_SCOPE, BINDING_VALUE and BINDING_TYPE.
2003-09-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
* decl.c (pop_binding_level, suspend_binding_level,
find_class_binding_level): Merge into leave_scope. Remove.
(leave_scope): New function.
(poplevel): Update.
(poplevel_class): Likewise.
(pop_namespace): Likewise.
2003-09-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/5655
* parser.c (cp_parser_check_access_in_redeclaration): New function.
(cp_parser_member_declaration): Use it.
(cp_parser_template_declaration_after_export): Likewise.
2003-09-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cp-tree.h (scope_kind): Add new enumerator.
(keep_next_level): Change parameter type to bool.
(begin_scope): Change prototype.
(pushlevel): Remove declaration.
* decl.c (push_binding_level): Fold in begin_scope. Remove.
(struct cp_binding_level): Remove tag_tranparent field. Make keep
of bitsize one.
(keep_next_level_flag): Make a bool.
(cxx_scope_descriptor): Update scope names table
(make_cxx_scope): Fold in begin_scope. Remove..
(namespace_scope_ht_size): New function.
(begin_scope): Change prototype. Return a scope. Tidy.
(kept_level_p): Update.
(pushlevel): Remove.
(maybe_push_cleanup_level): Simplify.
(poplevel): Update for sk_cleanup and keep change.
(print_binding_level): Likewise.
(initial_push_namespace_scope): Fold in begin_scope. Remove.
(push_namespace): Update.
(pushtag): Likewise.
(lookup_tag): Likewise.
(lookup_name_current_level): Likewise.
(lookup_type_current_level): Likewise.
(cxx_init_decl_processing): Likewise.
(start_function): Likewise.
(begin_function_body): Likewise.
(start_method): Likewise.
* pt.c (push_inline_template_parms_recursive): Likewise.
(begin_template_parm_list): Likewise.
(begin_specialization): Likewise.
* semantics.c (do_pushlevel): Likewise.
(begin_compound_stmt): Likewise.
(begin_stmt_expr): Likewise.
2003-09-21 Richard Henderson <rth@redhat.com>
* class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
method.c, optimize.c, pt.c, semantics.c, tree.c: Revert.
2003-09-21 Richard Henderson <rth@redhat.com>
* class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
method.c, optimize.c, pt.c, semantics.c, tree.c: Update for
DECL_SOURCE_LOCATION rename and change to const.
2003-09-20 Richard Henderson <rth@redhat.com>
* decl.c, decl2.c, pt.c: Use %J in diagnostics.
2003-09-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/157
* parser.c (cp_parser_direct_declarator): Clear
parser->num_template_parameter_lists when parsing function
parameters.
(cp_parser_constructor_declarator_p): Likewise.
2003-09-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/495
* pt.c (tsubst_friend_class): Only use innermost template
arguments for the injected friend class template.
2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
PR c++/12332
* pt.c (instantiate_class_template): Increment
processing_template_decl around the tsubst of a template member
function.
2003-09-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
* decl.c (cxx_scope_descriptor): Fix thinko.
(struct cp_binding_level): Adjust type of binding_depth field.
2003-09-18 Danny Smith <dannysmith@users.sourceforge.net>
PR c++/12320
* call.c (type_passed_as): Check for incomplete type.
(convert_for_arg_passing): Likewise.
2003-09-18 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9848
* optimize.c (maybe_clone_body): Don't set MARK_USED on parameters
here.
* semantics.c (expand_body): Set it here on the remaining clones.
2003-09-18 Roger Sayle <roger@eyesopen.com>
* lex.c (init_operators): Remove operator_name_info for FFS_EXPR.
* class.c (instantiate_type): Remove FFS_EXPR case.
2003-09-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* ChangeLog: Fix recent commit.
2003-09-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* ChangeLog: Add PR number to patch for PR c++/12316.
2003-09-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
* error.c (dump_type): Simplify. Use pp_type_specifier_seq for
"C" types.
* cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko.
2003-09-17 Richard Henderson <rth@redhat.com>
* semantics.c (expand_body): Don't save/restore input_location.
2003-09-17 Mark Mitchell <mark@codesourcery.com>
PR c++/12266
* cp-tree.h (tsubst_flags_t): Add tf_conv.
* class.c (standard_conversion): Pass tf_conv to
instantiate_type.
(resolve_address_of_overloaded_function): Do not call mark_used
when just checking conversions.
PR debug/12066
* cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define.
* cp-tree.h (cxx_builtin_type_decls): Declare.
* decl.c (builtin_type_decls): New variables.
(cxx_builtin_type_decls): New function.
(record_builtin_type): Add to builtin_type_decls.
2003-09-17 Richard Henderson <rth@redhat.com>
PR c++/12316
* semantics.c (expand_or_defer_fn): Inc/dec function_depth.
2003-09-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/7939
* typeck.c (comptypes): Don't ICE when its first argument is
error_mark_node.
(compparms): Reverse the arguments of same_type_p.
2003-09-15 Nathan Sidwell <nathan@codesourcery.com>
PR c++/12184
* typeck.c (convert_arguments): Return error_mark_node for an
incomplete parameter. Make error message more informative.
2003-09-12 Mark Mitchell <mark@codesourcery.com>
PR c++/3907
* class.c (maybe_note_name_used_in_class): Refine test for whether
or not we are in a class scope.
* cp-tree.h (language_function): Remove x_expanding_p.
(expanding_p): Remove.
(doing_semantic_analysis_p): Remove.
(scope_kind): Add sk_function_parms, sk_class,
sk_namespace.
(innermost_scope_kind): New method.
* call.c (cxx_type_promotes_to): Use type_decays_to.
* cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine.
(LANG_HOOKS_POPLEVEL): Likewise.
* decl.c (cp_binding_level): Remove parm_flag, template_parms_p,
template_spec_p, namespace_p, is_for_scope, is_try_scope, and
is_catch_scope. Add kind and explicit_spec_p.
(cxx_scope_descriptor): Use a lookup table.
(find_class_binding_level): Use "kind" field in binding_level, not
the various flags.
(pop_binding_level): Likewise.
(innermost_nonclass_level): Likewise.
(toplevel_bindings_p): Likewise.
(namespace_bindings_p): Likewise.
(template_parm_scope_p): Likewise.
(innermost_scope_kind): New method.
(current_tmpl_spec_kind): Use "kind" field in binding_level, not
the various flags.
(pushlevel): Remove check for doing_semantic_analysis_p.
(begin_scope): Simplify.
(add_decl_to_level): Use "kind" field in binding_level, not
the various flags.
(push_local_binding): Likewise.
(pop_label): Remove check for doing_semantic_analysis_p.
(poplevel): Use "kind" field in binding_level, not
the various flags.
(set_block): Remove check for doing_semantic_analysis_p.
(pushlevel_class): Use "kind" field in binding_level, not
the various flags.
(poplevel_class): Likewise.
(initial_push_namespace_scope): Likewise.
(maybe_push_to_top_level): Likewise.
(set_identifier_type_value_with_scope): Likewise.
(pop_everything): Likewise.
(maybe_process_template_type_declaration): Likewise.
(pushtag): Likewise.
(pushdecl): Likewise.
(pushdecl_with_scope): Likewise.
(check_previous_goto_1): Likewise.
(define_label): Likewise.
(finish_case_label): Likewise.
(lookup_tag): Likewise.
(unqualified_namespace_lookup): Likewise.
(lookup_name_real): Likewise.
(lookup_name_current_level): Likewise.
(lookup_type_current_level): Likewise.
(record_builtin_type): Likewise.
(cp_make_fname_decl): Likewise.
(maybe_inject_for_scope_var): Likewise.
(cp_finish_decl): Remove check for doing_semantic_analysis_p.
(start_function): Use begin_scope, not pushlevel.
(finish_function): Use "kind" field in binding_level, not
the various flags.
(start_method): Use begin_scope, not pushlevel.
(make_label_decl): Do not check expanding_p.
(save_function-data): Do not set expanding_p.
(cxx_push_function_context): Do not clear expanding_p.
* semantics.c (cxx_expand_function_start): Do not set expanding_p.
2003-09-14 Mark Mitchell <mark@codesourcery.com>
* class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for
an bit-field whose width exceeds that of its type.
2003-09-14 Geoffrey Keating <geoffk@apple.com>
* rtti.c (get_tinfo_decl): Set TREE_PUBLIC for typeinfo decls.
2003-09-14 Kazu Hirata <kazu@cs.umass.edu>
* ChangeLog: Follow spelling conventions.
* parser.c: Likewise.
2003-09-13 Richard Henderson <rth@redhat.com>
* decl2.c (finish_file): Check cgraph_assemble_pending_functions
during relaxation loop.
2003-09-11 David Edelsohn <edelsohn@gnu.org>
* decl2.c (var_finalized_p): Swap arms of conditional.
2003-09-10 Nathan Sidwell <nathan@codesourcery.com>
PR c++/11788
* typeck.c (build_address): If it is a function, mark it used.
(build_unary_op): Do not lose object's side-effects when taking
address of static member function.
* class.c (resolve_address_of_overloaded_function): Use
tsubst_flags_t parameter. Only expect overload sets. Adjust.
(instantiate_type): Adjust flags passing. Do not lose object's
side-effects when taking address of static member function.
2003-09-11 Richard Henderson <rth@redhat.com>
* semantics.c (expand_or_defer_fn): Update for new
cgraph_finalize_function argument.
2003-09-10 Richard Henderson <rth@redhat.com>
* decl2.c (cxx_callgraph_analyze_expr): Mark argument unused.
2003-09-10 Jan Hubicka <jh@suse.cz>
* decl2.c (var_finalized_p): New.
(maybe_emit_vtables, write_out_vars, finish_file): Use it.
2003-09-10 Richard Henderson <rth@redhat.com>
* decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
mark_member_pointers.
(lower_function): Remove.
* cp-tree.h: Update to match.
* cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New.
(LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove.
2003-09-09 Richard Henderson <rth@redhat.com>
* semantics.c (expand_or_defer_fn): Update call to
cgraph_finalize_function.
* semantics.c (expand_or_defer_fn): Use cgraph_finalize_function
always.
* decl2.c (finish_file): Avoid out-of-bounds array reference
during memmove.
2003-09-09 Richard Henderson <rth@redhat.com>
* decl2.c (mark_member_pointers): Rename from
mark_member_pointers_and_eh_handlers and don't check eh handlers.
2003-09-09 Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
PR bootstrap/12168
* method.c (use_thunk): Clear DECL_RTL of copied nodes.
2003-09-08 Mark Mitchell <mark@codesourcery.com>
* cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to
c_register_builtin_type.
PR c++/11786
* decl2.c (add_function): Do not complain about seeing the same
non-function twice.
* semantics.c (perform_koenig_lookup): Improve documentation.
PR c++/5296
* pt.c (try_one_overload): Add addr_p parameter.
(resolve_overloaded_unification): Pass it.
2003-09-08 Richard Henderson <rth@redhat.com>
* optimize.c (maybe_clone_body): Inc/dec function_depth.
2003-09-08 Richard Henderson <rth@redhat.com>
* decl.c (finish_function): Clear current_function_decl.
* decl2.c (mark_used): Don't push/pop gc context.
* optimize.c (optimize_function): Likewise.
* tree.c (cp_cannot_inline_tree_fn): Likewise.
* pt.c (instantiate_decl): Inc/dec function_depth instead.
* semantics.c (expand_body): Update for tree_rest_of_compilation
nested argument.
2003-09-07 Gabriel Dos Reis <gcc@integrable-solutions.net>
PR c++/11762
* error.c (dump_decl): Handle namespace-alias-definition.
* decl.c (warn_extern_redeclared_static): There is no point in
checking changes in storage class specifier for a namespace
declaration.
(duplicate_decls): Tidy diagnostic message.
* cxx-pretty-print.c (pp_cxx_left_brace): New macro.
(pp_cxx_right_brace): Likewise.
(pp_cxx_original_namespace_definition): New function.
(pp_cxx_namespace_alias_definition): Likewise.
(pp_cxx_declaration): Use them. Handle NAMESPACE_DECLs.
2003-09-07 Jan Hubicka <jh@suse.cz>
* decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
Avoid re-emitting variables in unit-at-a-time mode.
2003-09-06 Mark Mitchell <mark@codesourcery.com>
PR c++/11867
* call.c (standard_conversion): Improve comments.
(perform_direct_initialization): Make sure we return an expression
of the correct type.
* typeck.c (build_static_cast): Check for ambiguity and
accessibility when performing conversions.
2003-09-06 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cp-tree.h (add_binding): Remove declaration.
* name-lookup.h (supplement_binding): Declare.
* decl.c (add_binding): Move to name-lookup.c.
(push_local_binding): Adjust.
(push_class_binding): Likewise.
(set_identifier_type_value_with_scope): Likewise.
* name-lookup.c (supplement_binding): Rename from add_binding.
Return a bool. Improve documentation.
(set_namespace_binding): Adjust.
* Make-lang.in (cp/name-lookup.o): Depend on toplev.h
2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
PR c++/11794
* class.c (pushclass): Push dependent using decls for nested
classes of templates too.
2003-09-06 Roger Sayle <roger@eyesopen.com>
PR c++/11409
* class.c (resolve_address_of_overloaded_function): When building
list of matching non-template function decls, ignore anticipated
declarations of undeclared or shadowed GCC builtins.
2003-09-06 Steven Bosscher <steven@gcc.gnu.org>
PR c++/11595
* decl.c (define_label): Remove unreachable timevar pop.
Always return the decl, even if the definition is invalid.
2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
PR c++/12167
* parser.c (cp_parser_late_parsing_default_args): Push & pop the
unparsed functions queue.
2003-09-05 Mark Mitchell <mark@codesourcery.com>
PR c++/12163
* call.c (perform_direct_initialization): Correct logic for
direct-initialization of a class type.
PR c++/12146
* pt.c (lookup_template_function): Robustify.
2003-09-05 Nathan Sidwell <nathan@codesourcery.com>
PR c++/11922
* pt.c (tsubst_qualified_id): Make sure we get a non-type.
(tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
is_type_p to lookup_qualified_name.
* semantics.c (finish_call_expr): Refactor some code.
PR c++/12037
* cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
(build_min_non_dep): Declare.
* tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
(build_min_non_dep): New.
* cvt.c (convert_to_void): Don't explicitly copy
TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
* call.c (build_new_method_call): Use build_min_non_dep.
* decl2.c (grok_array_decl): Likewise.
(build_offset_ref_call_from_tree): Likewise.
* typeck.c (finish_class_member_access_expr,
build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
build_x_conditional_expr, build_x_compound_expr): Likewise.
(build_static_cast, build_reinterpret_cast,
build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
* typeck2.c (build_x_arrow): Use build_min_non_dep.
(build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
template.
* rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
(build_dynamic_cast): Set TREE_SIDE_EFFECTS.
* pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
2003-09-04 Richard Henderson <rth@redhat.com>
* decl2.c (mark_member_pointers_and_eh_handlers): Update for
change in cgraph_mark_needed_node arguments.
2003-09-02 Geoffrey Keating <geoffk@apple.com>
PR 12161
* decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
* tree.c (cp_cannot_inline_tree_fn): Likewise.
2003-09-04 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (finish_sizeof, finish_alignof): Remove.
(expr_sizeof): Replace with ...
(cxx_sizeof_or_alignof_expr): ... here.
(cxx_sizeof_or_alignof_type): Make complain parameter a bool.
* parser.c (cp_parser_unary_expression): Commonize alignof and
sizeof handling.
* pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
substitution.
* semantics.c (finish_sizeof, finish_alignof): Remove.
* typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
becomes bool. Set TREE_READONLY.
(expr_sizeof): Replace with ...
(cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
2003-09-04 Mark Mitchell <mark@codesourcery.com>
Remove cast-as-lvalue extension.
* call.c (build_conditional_expr): Correct formatting.
(convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
(initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
* cp-tree.h (non_cast_lvalue_p): Remove.
(real_non_cast_lvalue_p): Remove.
(non_cast_lvalue_or_else): Remove.
* tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
(real_lvalue_p): Adjust call to lvalue_p_1.
(non_cast_lvalue_p): Remove.
(non_cast_lvalue_or_else): Remove.
(lvalue_p): Adjust call to lvalue_p_1.
(lvalue_or_else): Simplify.
* typeck.c (build_unary_op): Use lvalue_or_else, not
non_cast_lvalue_or_else.
(build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
2003-09-03 DJ Delorie <dj@redhat.com>
* decl.c (finish_function): Pass fndecl to aggregate_value_p.
2003-09-03 Mark Mitchell <mark@codesourcery.com>
PR c++/12053
* class.c (include_empty_classes): Correct logic for ABI version 1.
2003-09-03 Richard Henderson <rth@redhat.com>
* optimize.c (optimize_function): Push/pop ggc context around
the call to optimize_inline_calls.
2003-09-02 Scott Brumbaugh <scottb.lists@verizon.net>
PR c++/11553
* parser.c (cp_parser_decl_specifier_seq): Add check for a
duplicate friend decl-specifier.
2003-09-02 Mark Mitchell <mark@codesourcery.com>
PR c++/11847
* pt.c (convert_nontype_argument): Correct representation of
REFERENCE_TYPE expressions.
PR c++/11808
* cp-tree.h (KOENIG_LOOKUP_P): New macro.
(finish_call_expr): Change prototype.
* parser.c (cp_parser_postfix_expression): Adjust call to
finish_call_expr.
* pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
* semantics.c (finish_call_expr): Add koenig_p parameter.
2003-09-01 Mark Mitchell <mark@codesourcery.com>
PR c++/12114
* cp-tree.h (initialize_reference): Change prototype.
* call.c (initialize_reference): Add cleanup parameter.
* decl.c (grok_reference_init): Likewise.
(check_initializer): Likewise.
(cp_finish_decl): Insert a CLEANUP_STMT if necessary.
(duplicate_decls): When replacing an anticipated builtin, do not
honor TREE_NOTHROW.
* typeck.c (convert_for_initialization): Correct call to
initialize_reference.
PR c++/11972
* pt.c (dependent_type_p_r): Pass only the innermost template
arguments to any_dependent_template_arguments_p.
2003-09-01 Josef Zlomek <zlomekj@suse.cz>
* error.c (dump_expr): Kill BIT_ANDTC_EXPR.
* lex.c (init_operators): Kill BIT_ANDTC_EXPR.
* pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
* typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
(tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
2003-08-29 Mark Mitchell <mark@codesourcery.com>
PR c++/12093
* pt.c (build_non_dependent_expr): Do not build a
NON_DEPENDENT_EXPR for a STRING_CST.
PR c++/11928
* search.c (add_conversions): Avoid adding two conversion
operators for the same type.
2003-08-29 Mark Mitchell <mark@codesourcery.com>
PR c++/6196
* pt.c (tsubst_copy_and_build): Correct handling of
address-of-label extension.
* semantics.c (finish_goto_stmt): The address of a label must go
through the lvalue-to-rvalue conversion.
2003-08-29 Richard Henderson <rth@redhat.com>
Jason Merrill <jason@redhat.com>
* cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
(LANG_HOOKS_RTL_EXPAND_STMT): New.
* cp-tree.h (cxx_expand_function_start): Declare.
* decl.c (start_function): Use allocate_struct_function.
Move stmts_are_full_exprs_p assertion from expand_body.
Do not free_after_parsing or free_after_compilation.
(cxx_push_function_context): Move code to set struct function
data from genrtl_start_function.
* optimize.c (optimize_function): Don't inc/dec function_depth.
* semantics.c (expand_body): Use tree_rest_of_compilation.
(cxx_expand_function_start): Rename from genrtl_start_function,
omit bits done by tree_rest_of_compilation.
(genrtl_finish_function): Remove.
(clear_decl_rtl): Move to ../tree-optimize.c.
2003-08-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/11811
* cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
function.
* cxx-pretty-print.h: Declare.
* error.c (dump_template_parameter): Use it.
(dump_type): Likewise.
2003-08-28 Mark Mitchell <mark@codesourcery.com>
* init.c (decl_constant_value): Deal with COND_EXPR specially.
* call.c (build_conditional_expr): Revert previous patch.
PR optimization/5079
* call.c (build_conditional_expr): Use decl_constant_value to
simplify the arguments.
2003-08-26 Dan Nicolaescu <dann@ics.uci.edu>
* parser.c (struct cp_token): Use enum bitfields.
(CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
512B allocation unit.
(cp_parser_token_tree_map_node): Use enum bitfields.
2003-08-26 Nathan Sidwell <nathan@codesourcery.com>
PR c++/11871
* decl.c (push_class_level_binding): Correct old_decl value from
my 2003-07-29 reorganization.
* call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
(build_new_method_call): Add goto finish.
* semantics.c (simplify_aggr_init_exprs_r): Don't set
TREE_SIDE_EFFECTS on a call.
2003-08-25 Richard Henderson <rth@redhat.com>
* cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
2003-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
(cxx_pretty_printer): Adjust base type.
(pp_cxx_function_specifier): Declare.
* cxx-pretty-print.c (pp_cxx_whitespace): New macro.
(pp_cxx_left_paren): Likewise.
(pp_cxx_right_paren): Likewise.
(pp_cxx_dot): Likewise.
(pp_cxx_arrow): Likewise.
(pp_cxx_semicolon): Likewise.
(pp_cxx_identifier): Likewise.
(pp_cxx_cv_qualifier_seq): Likewise.
(pp_cxx_storage_class_specifier): Likewise.
(pp_cxx_expression_list): Likewise.
(pp_cxx_space_for_pointer_operator): Likewise.
(pp_cxx_init_declarator): Likewise.
(pp_cxx_call_argument_list): Likewise.
(pp_cxx_nonconsecutive_character): Tidy.
(pp_cxx_conversion_function_id): New function.
(pp_cxx_template_id): Likewise.
(pp_cxx_template_keyword_if_needed): Likewise.
(pp_cxx_nested_name_specifier): Likewise.
(pp_cxx_unqualified_id): Tidy
(pp_cxx_qualified_id): Handle more nodes.
(pp_cxx_primary_expression): Tidy.
(pp_cxx_postfix_expression): Likewise.
(pp_cxx_new_expression): Tidy.
(pp_cxx_delete_expression): Likewise.
(pp_cxx_cast_expression): New function.
(pp_cxx_pm_expression): Tidy.
(pp_cxx_conditional_expression): Likewise.
(pp_cxx_assignment_operator): New function.
(pp_cxx_assignment_expression): Tidy.
(pp_cxx_expression): New function.
(pp_cxx_function_specifier): Likewise.
(pp_cxx_decl_specifier_seq): Likewise.
(pp_cxx_simple_type_specifier): Tidy.
(pp_cxx_type_specifier_seq): Likewise.
(pp_cxx_ptr_operator): New function.
(pp_cxx_implicit_parameter_type): Likewise.
(pp_cxx_parameter_declaration): Tidy.
(pp_cxx_parameter_declaration_clause): New function.
(pp_cxx_exception_specification): Likewise.
(pp_cxx_direct_declarator): Tidy.
(pp_cxx_declarator): Likewise.
(pp_cxx_ctor_initializer): New function.
(pp_cxx_function_definition): Likewise.
(pp_cxx_abstract_declarator): Tidy.
(pp_cxx_direct_abstract_declarator): Likewise.
(pp_cxx_type_id): Likewise.
(pp_cxx_exception_declaration): New function.
(pp_cxx_statement): Likewise.
(pp_cxx_simple_declaration): Likewise.
(pp_cxx_template_parameter_list): Likewise.
(pp_cxx_template_parameter): Likewise.
(pp_cxx_template_declaration): Likewise.
(pp_cxx_explicit_specialization): Likewise.
(pp_cxx_explicit_instantiation): Likewise.
(pp_cxx_declaration): Tidy.
(pp_cxx_pretty_printer_init): Initialize more fields.
2003-08-25 Mark Mitchell <mark@codesourcery.com>
PR c++/8795
* cp-tree.h (build_cplus_method_type): Remove.
* call.c (standard_conversion): Use build_method_type_directly
instead of build_cplus_method_type.
* class.c (build_clone): Likewise.
(adjust_clone_args): Likewise.
* decl.c (build_ptrmem_type): Likewise.
(grokdeclarator): Likewise.
(check_function_type): Likewise.
* decl2.c (grok_method_quals): Likewise.
(maybe_retrofit_in_chrg): Likewise.
* pt.c (copy_default_args_to_explicit_spec): Likewise.
(tsubst_function_type): Likewise.
(tsubst): Likewise.
* tree.c (build_cplus_method_type): Remove.
* typeck.c (merge_types): Use build_method_type_directly.
2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/3765
* search.c (dfs_access_in_type): Fix typo in comment.
(dfs_accessible_queue_p): Likewise.
(dfs_accessible_p): Only terminate when a friend is found.
(accessible_p): Return immediately if access_in_type allows
access.
2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/641, c++/11876
* friend.c (add_friend): Add complain parameter.
(make_friend_class): Likewise.
(do_friend): Adjust add_friend call.
* decl.c (grokdeclarator): Adjust make_friend_class call.
* parser.c (cp_parser_member_declaration): Likewise.
(cp_parser_template_declaration_after_export): Likewise.
* pt.c (instantiate_class_template): Adjust make_friend_class
and add_friend call.
* cp-tree.h (make_friend_class): Adjust declaration.
(add_friend): Likewise.
2003-08-21 Jason Merrill <jason@redhat.com>
PR c++/11283
* call.c (build_conditional_expr): Ignore cv-qual differences for
non-class types.
2003-08-21 Mark Mitchell <mark@codesourcery.com>
PR c++/11551
* parser.c (cp_parser_id_expression): Add declarator_p parameter.
(cp_parser_primary_expression): Adjust call to
cp_parser_id_expression.
(cp_parser_unqualified_id): Complain about the use of
typedef-names in a destructor declarator.
(cp_parser_postfix_expression): Adjust call to
cp_parser_id_expression.
(cp_parser_type_parameter): Likewise.
(cp_parser_template_argument): Likewise.
(cp_parser_declarator_id): Likewise.
PR c++/11919
* call.c (standard_conversion): Use same_type_p, not pointer
equality, to compare types.
PR c++/10762
* parser.c (cp_parser_using_declaration): Check for invalid uses
of template-ids here...
* decl2.c (do_class_using_decl): ... rather than here.
2003-08-20 Mark Mitchell <mark@codesourcery.com>
PR c++/11834
* pt.c (more_specialized): Bump processing_template_decl.
2003-08-21 Jason Merrill <jason@redhat.com>
PR c++/11614
* decl.c (grokdeclarator): Recognize a flexible array based on the
type, not the form of the declarator.
2003-08-20 Jason Merrill <jason@redhat.com>
* semantics.c (simplify_aggr_init_expr): Split out from
simplify_aggr_init_exprs_r. Convert slot address to match
the return type.
* cp-tree.h: Declare it.
* tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
DECL_NAME of a user variable.
2003-08-20 Nathan Sidwell <nathan@codesourcery.com>
PR c++/11945
* pt.c (build_non_dependent_expr): Look inside COND_EXPR and
COMPOUND_EXPR.
* semantics.c (finish_expr_stmt): Always convert to void.
* typeck.c (build_x_compound_exp): Always convert to void.
2003-08-19 Mark Mitchell <mark@codesourcery.com>
PR c++/11684
* cp-tree.h (grok_op_properties): Change prototype.
* decl.c (grok_op_properties): Add complain parameter.
(grokfndecl): Pass it.
* pt.c (tsubst_decl): Adjust accordingly.
PR c++/10926
* decl.c (start_method): Return immediately if push_template_decl
does not like the declaration.
* pt.c (push_template_decl_real): Disallow member template
destructors.
PR c++/11036
* cp-tree.h (add_binding): Add prototype.
* class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
(maybe_warn_about_overly_private_class): Use
CLASSTYPE_DESTRUCTORS.
(pushclass): Adjust call to set_identifier_type_value.
* decl.c (add_binding): Give it external linkage.
(push_local_binding): Adjust call to add_binding.
(push_class_binding): Likewise.
(set_identifier_type_value_with_scope): Change prototype. Use
add_binding for global bindings.
(set_identifier_type_value): Adjust accordingly.
(pushtag): Likewise.
(pushdecl): Use set_identifier_type_value, not
set_identifier_type_value_with_scope.
(pushdecl_namespace_level): Adjust calls to
SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
(pushdecl_class_level): Likewise.
(lookup_tag): Use select_decl.
(select_decl): Improve comment.
(record_builtin_type): Do not call pushdecl.
(cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
(cp_finish_decl): Adjust call to set_identifier_type_value.
(check_elaborated_type_specifier): Improve checks for invalid uses
of typedefs.
(xref_tag): Adjust call to check_elaborated_type_specifier.
* decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
* name-lookup.c (set_namespace_binding): Use add_binding.
* parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
rather than an IDENTIFIER_NODE, to represent built-in types, if
requested by the caller.
(cp_parser_postfix_expression): Adjust call.
(cp_parser_type_specifier): Likewise.
(cp_parser_elaborated_type_specifier): Adjust call to
check_elaborated_type_specifier.
* typeck2.c (build_functional_cast): Do not perform name lookups.
PR c++/10717
* decl.c (expand_static_init): Remove unnecessary code.
2003-08-19 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/10538, PR c/5582
* cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
2003-08-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/11174
* init.c (build_offset_ref): Perform access checking for
pointer to member correctly.
2003-08-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
2003-08-18 Nathan Sidwell <nathan@codesourcery.com>
PR c++/11957
* cp-tree.h (finish_stmt_expr): Add bool parameter.
* init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
adjust the stmt_expr here.
(build_vec_init): Use finish_stmt_expr_expr, convert result to
array type.
* parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
call.
* pt.c (tsubst_copy): Likewise.
* semantics.c (finish_stmt_expr): Add parameter.
* pt.c (instantiate_class_template): Push to class's scope before
tsubsting base.
2003-08-17 Jan Hubicka <jh@suse.cz>
PR C++/11702
* semantics.c (finish_id_expression): Mark all functions as used.
2003-08-16 Nathan Sidwell <nathan@codesourcery.com>
PR c++/11512
* cvt.c (convert_to_void): Indicate which side of conditional has
no effects, and rhs of comma operator. Test for no sideeffect
expressions here and always build a convert expr.
* init.c (expand_default_init): Convert the init to void.
* typeck.c (build_x_compound_expr): Do not check for side effects
here.
(build_compound_expr): Do not convert lhs when building a
template.
2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
* decl2.c (build_offset_ref_call_from_tree): Use
build_non_dependent_expr.
* error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
* pt.c (build_non_dependent_expr): Set operand.
2003-08-14 Jan Hubicka <jh@suse.cz>
* decl2.c (mark_member_pointers): Rename to...
(mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
(lower_function): Update call.
* except.c (eh_type_info): Break out from ...
(build_eh_type): ... here; tinfo is already used.
(finish_eh_spec_block): Mark tinfos as used.
* semantics.c (finish_handler_params): Mark tinfo as used.
* cp-tree.h (eh_type_info): Declare.
2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (instantiate_class_template): Set location before
substuting bases.
* decl.c (make_typename_type): Use my_friendly_assert.
* pt.c (tsubst_aggr_type): Rearrange context substitution.
2003-08-14 Jan Hubicka <jh@suse.cz>
* method.c (use_thunk): Expand body directly.
2003-08-12 Mark Mitchell <mark@codesourcery.com>
PR c++/11703
* call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
determine whether or not to promote types.
(convert_for_arg_passing): Likewise.
* decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
templates.
* pt.c (tsubst_decl): Do not expect it to be set.
PR c++/9512
PR c++/10923
* cp-tree.h (check_elaborated_type_specifier): Declare.
(handle_class_head): Remove.
(note_got_semicolon): Likewise.
(note_list_got_semicolon): Likewise.
(finish_class_definition): Likewise.
* decl.c (check_elaborated_type_specifier): Make it public.
Robustify.
(handle_class_head): Remove.
* parser.c (cp_parser_elaborated_type_specifier): Use
check_elaborated_type_specifier.
(cp_parser_class_specifier): Do not call finish_class_definition.
(cp_parser_class_head): Or handle_class_head. Check for
over-qualified names.
* semantics.c (finish_class_definition): Remove.
* parser.c (cp_parser_check_for_definition_in_return_type): New
function.
(cp_parser_simple_declaration): Adjust call to
cp_parser_init_declarator.
(cp_parser_decl_specifier_seq): Change type of
declares_class_or_enum parameter.
(cp_parser_explicit_instantiation): Adjust accordingly.
(cp_parser_type_specifier): Change type of
declares_class_or_enum parameter.
(cp_parser_init_declarator): Add declares_class_or_enum
parameter.
(cp_parser_parameter_declaration): Adjust call to
cp_parser_decl_specifier_seq.
(cp_parser_function_definition): Likewise.
(cp_parser_member_declaration): Likewise.
(cp_parser_single_declaration): Likewise.
* cp-tree.h (lang_type_class): Remove has_call_overloaded,
has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
(TYPE_OVERLOADS_CALL_EXPR): Remove.
(TYPE_OVERLOADS_ARRAY_REF): Likewise.
(TYPE_OVERLOADS_ARROW): Likewise.
(CLASSTYPE_GOT_SEMICOLON): Likewise.
* class.c (check_bases): Do not set them.
(finish_struct_1): Likewise.
* decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
(build_ptrmemfunc_type): Likewise.
(grok_op_properties): Do not set TYPE_OVERLOADS_*.
(start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
* decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
* lex.c (note_got_semicolon): Remove.
(note_list_got_semicolon): Likewise.
* parser.c (cp_parser_simple_declaration): Do not call
note_list_got_semicolon.
* pt.c (list_eq): Remove.
(lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
(instantiate_class_template): Do not set TYPE_OVERLOADS*.
(instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
* ptree.c (cxx_print_type): Do not print them.
* semantics.c (finish_member_class_template): Do not call
note_list_got_semicolon.
2003-08-11 Aldy Hernandez <aldyh@redhat.com>
* call.c (standard_conversion): Opaque pointers interconvert.
* testsuite/g++.dg/other/opaque-3.C: New.
2003-08-11 Mark Mitchell <mark@codesourcery.com>
* typeck.c (merge_types): Handle cv-qualified pointer-to-member
types correctly.
2003-08-10 Mark Mitchell <mark@codesourcery.com>
PR c++/11789
* cp-tree.h (get_vbase): Remove.
(get_vbase_types): Remove.
* init.c (expand_member_init): Correct logic for looking up base
classes.
2003-08-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
* error.c (dump_expr): Tidy.
* cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
(pp_cxx_begin_template_argument_list): Likewise.
(pp_cxx_end_template_argument_list): Likewise.
(is_destructor_name): Likewise.
(pp_cxx_unqualified_id): Likewise.
(pp_cxx_qualified_id): Likewise.
(pp_cxx_id_expression): Likewise.
(pp_cxx_new_expression): Likewise.
(pp_cxx_delete_expression): Likewise.
(pp_cxx_pm_expression): Likewise.
(pp_cxx_type_specifier): Rework.
(pp_cxx_type_id): Likewise.
(pp_cxx_primary_expression): Likewise.
(pp_cxx_postfix_expression): Likewise.
(pp_cxx_unary_expression): Likewise.
(pp_cxx_multiplicative_expression): Likewise.
(pp_cxx_conditional_expression): Likewise.
(pp_cxx_assignment_expression): Likewise.
(pp_cxx_pretty_printer_init): Tidy.
2003-08-10 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
NODE is always a TREE_VEC of nonzero size.
(NUM_TMPL_ARGS): NODE is always a TREE_VEC.
* decl2.c (arg_assoc): Template args will be a vec.
* error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
dump_template_argument_list.
(dump_template_parms): Args will be a vec.
* parser.c (cp_parser_template_argument_list): Produce a
vector, not a list.
* pt.c (coerce_template_parms): Args are always vectors.
(mangle_class_name_for_template): Likewise.
(lookup_template_function): Likewise.
(lookup_template_class): Likewise.
(tsubst_template_args): Likewise.
(tsubst_baselink): Use tsubst_template_args.
(tsubst_qualified_id): Likewise.
(tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
(tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
(any_dependent_template_args_p): Args are always vectors.
* tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
PR c++/11670
* call.c (convert_like_real): Add rvalue binding error message.
* error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
really a cast.
PR c++/10530
* pt.c (dependent_type_p_r): A dependent template-id is a class
type with dependent template arguments, or a bound template
template parameter.
(type_dependent_expression_p): A template function decl cannot
have a dependent context.
2003-08-07 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/5767
* parser.c (cp_parser_class_name): Return immediately when scope
is error_mark_node.
2003-08-07 Aldy Hernandez <aldyh@redhat.com>
* cp/Make-lang.in (cp/call.o): Add dependency for target.h.
* cp/call.c (standard_conversion): Support opaque types.
Include target.h.
(strip_top_quals): Use cp_build_qualified_type instead of
TYPE_MAIN_VARIANT.
* cp/typeck.c (convert_for_assignment): Support opaque types.
* testsuite/g++.dg/other/opaque-1.C: New.
* testsuite/g++.dg/other/opaque-2.C: New.
2003-08-06 Aldy Hernandez <aldyh@redhat.com>
* decl.c (grokparms): Use cp_build_qualified_type instead
TYPE_MAIN_VARIANT.
2003-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cxx-pretty-print.h: New file.
* cxx-pretty-print.c: Likewise.
* error.c (scratch_pretty_printer): Change type.
(init_error): Tidy.
(dump_aggr_type): Likewise.
(dump_global_iord): Likewise.
(dump_expr): Likewise.
(dump_char): Remove.
* cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
(cxx_initialize_diagnostics): New function.
* Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
(CXX_PRETTY_PRINT_H): New variable.
(cp/cxx-pretty-print.o): New rule.
(cp/cp-lang.o): Update dependence.
(cp/error.o): Likewise.
2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
* cp-tree.h (struct lang_decl): Don't include c_lang_decl.
(DECL_DECLARED_INLINE_P): Remove.
* decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
if decl is a FUNCTION_DECL. This never made sense, but now it is
required to avoid a tree check failure.
* decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
* optimize.c (maybe_clone_body): Likewise.
2003-08-04 Roger Sayle <roger@eyesopen.com>
* decl.c (cxx_insert_default_attributes): Delete.
* cp-tree.h (cxx_insert_default_attributes): Don't prototype.
* cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
2003-08-03 Nathan Sidwell <nathan@codesourcery.com>
PR c++/11704
* pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
unknown type.
PR c++/11766
* typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
member functions.
2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9447
* cp-tree.def (USING_DECL): Document its type.
* class.c (pushclass): If we're entering a template, push any
dependent using decls it has.
* decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
a dependent scope.
* pt.c (tsubst_decl) <USING_DECL case>: Set type.
(tsubst): Remove USING_DECL checks.
(type_dependent_expression_p): Remove USING_DECL case.
* semantics.c (finish_member_declaration): A USING_DECL's type
indicates whether it is dependent.
2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (pushclass): Remove unneeded parameter.
* class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
(push_nested_class): Adjust pushclass call.
* pt.c (instantiate_class_template): Likewise.
* semantics.c (begin_class_definition): Likewise.
2003-08-01 Nathanael Nerode <neroden@gcc.gnu.org>
* typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
2003-08-01 Mark Mitchell <mark@codesourcery.com>
PR c++/11697
* decl.c (decls_match): Don't ignore the types of template
classes.
PR c++/11744
* pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
2003-08-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/8442, c++/8806
* decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
preferred.
(check_elaborated_type_specifier): Add allow_template_p
parameter. Check tag mismatch and class template.
(xref_tag): Add template_header_p parameter. Add assertion
that name is an IDENTIFIER_NODE. Remove implicit typename
warning. Simplify lookup process if globalize is true.
(cxx_init_decl_processing): Adjust call to xref_tag.
(xref_tag_from_type): Likewise.
* decl2.c (handle_class_head): Likewise.
* parser.c (cp_parser_elaborated_type_specifier,
cp_parser_class_head): Likewise.
* rtti.c (init_rtti_processing, build_dynamic_cast1,
tinfo_base_init, emit_support_tinfos): Likewise.
* class.c (is_base_of_enclosing_class): Remove.
* pt.c (convert_template_argument): Don't accept RECORD_TYPE as
template template argument.
* cp-tree.h (xref_tag): Adjust declaration.
(is_base_of_enclosing_class): Remove.
* NEWS: Document template template argument change.
2003-08-01 Nathan Sidwell <nathan@codesourcery.com>
* parser.c (cp_parser_init_declarator,
cp_paser_member_declaration): Reformat.
* pt.c (lookup_template_class, type_unification_real, unify,
type_dependent_expression_p): Reformat.
PR c++/11295
* cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
tf_stmt_expr_body.
(finish_stmt_expr_expr): Declare.
* parser.c (cp_parser_primary_expression): Tell
cp_parser_compount_statement that it is a statement expression.
(cp_parser_statement, cp_parser_labeled_statement,
cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
in_statement_expr_p parameter.
(cp_parser_expression_statement): Likewise. Call
finish_stmt_expr_expr for final expression of a statement
expression.
(cp_parser_for_init_statement,
cp_parser_implicitly_scoped_statement,
cp_parser_already_scoped_statement, cp_parser_function_definition,
cp_parser_try_block, cp_parser_handled): Adjust.
* pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
(tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
(tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
* semantics.c (finish_expr_stmt): Do not deal with statement
expressions.
(begin_stmt_expr): Clear last_expr_type.
(finish_stmt_expr_expr): New.
(finish_stmt_expr): Process the value expression.
* typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
compound expr inside the target's initializer.
PR c++/11525
* parser.c (cp_parser_primary_expression): Do not set
non-constant-p merely because it is a dependent scope.
PR c++/9447
* decl2.c (do_class_using_decl): Set type to NULL_TREE.
* semantics.c (finish_expr_stmt): Do not convert to void in a
template.
2003-07-31 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (coerce_template_parms): Refactor.
(fn_type_unification): Increment processing_template_decl when
tsubsting an incomplete set of explicit args.
PR c++/11347
* pt.c (instantiate_class_template): Increment
processing_template_decl around the tsubst of a template member
class.
(tsubst_qualified_id): Assert we do not have a dependent scope.
* pt.c (coerce_template_template_parms, lookup_template_class,
can_complete_type_without_circularity, instantiate_class_template,
tsubst_decl, unify): Reformat.
2003-07-31 Jan Hubicka <jh@suse.cz>
* decl2.c (maybe_make_one_only): Use mark_referenced.
* method.c (use_thunk): Likewsie.
2003-07-30 Jan Hubicka <jh@suse.cz>
* class.c (build_vtable_entry_ref): Kill.
(build_vtbl_ref_1): Do not call build_vtable_entry_ref.
(build_vfn_ref): Do not call build_vtable_entry_ref.
* cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
* cp-tree.h (prepare_assemble_variable): Kill.
* cp-decl.c (prepare_assemble_variable): Kill.
2003-07-29 Geoffrey Keating <geoffk@apple.com>
* parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
of setting valid_pch by hand.
2003-07-29 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* decl.c (finish_enum): Initialize underlying_type.
2003-07-29 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9447
* decl.c (add_binding): Add bval local variable.
(push_class_level_binding): Likewise. Allow a USING_DECL to be
pushed.
* decl2.c (do_class_using_decl): The type of a using decl is
unknown.
* parser.c (cp_parser_postfix_expression): Refactor unqualified-id
function call lookup code.
* pt.c (tsubst): A USING_DECL will have unknown type.
(tsubst_copy_and_build): Allow a using decl.
(type_dependent_expression_p): A USING_DECL will make it
dependent.
* semantics.c (finish_member_declaration): Push a dependent using
declaration.
2003-07-28 Mark Mitchell <mark@codesourcery.com>
PR c++/11530
* parser.c (cp_parser_postfix_expression): Do not call mark_used.
* semantics.c (finish_id_expression): Call mark_used for all
declarations.
2003-07-28 Mark Mitchell <mark@codesourcery.com>
PR c++/11667
* call.c (standard_conversion): Allow all integral->enumeral
conversions, after marking them as bad.
* decl.c (finish_enum): Make sure that all enumerators are
properly converted to the underlying type.
(build_enumerator): Set DECL_CONTEXT for namespace-scope
enumeration types.
* pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
(tsubst_enum): Tidy.
* Make-lang.in (typeck.o): Depend on convert.h.
(class.o): Likewise.
(rtti.o): Likewise.
* call.c: Include convert.h.
(convert_arg_to_ellipsis): Use convert_to_real.
* class.c: Include convert.h.
(build_base_path): Use convert_to_integer.
* rtti.c: Include convert.h.
(build_headof): Use convert_to_integer.
* typeck.c: Include convert.h.
(decay_conversion): Use convert_to_integer.
(build_unary_op): Use build_nop.
(get_delta_difference): Use convert_to_integer.
(build_ptrmemfunc): Avoid unnecessary conversions.
2003-07-28 Jan Hubicka <jh@suse.cz>
* decl2.c (mark_member_pointers): Verify that member pointer points to
the function.
2003-07-28 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (begin_compound_stmt): No scope arg is a bool.
(finish_compound_stmt): Remove no scope arg.
* decl.c (register_dtor_fn): Adjust begin_compound_stmt and
end_compound_stmt calls.
(expand_static_init, begin_destructor_body, begin_function_body,
finish_function_body): Likewise.
* decl2.c (start_objects, finish_objects,
start_static_storage_duration_function,
finish_static_storage_duration_function): Likewise.
* init.c (begin_init_stmts, finish_init_stmts,
construct_virtual_base, build_vec_init): Likewise.
* method.c (do_build_assign_ref, synthesize_method): Likewise.
* parser.c (cp_parser_compound_statement,
cp_parser_implicitly_scoped_statement,
cp_parser_already_scoped_statement): Likewise.
* pt.c (tsubst_expr): Likewise.
* semantics.c (begin_compound_stmt): No scope arg is a bool.
(finish_compound_stmt): Remove no scope arg.
* error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
always dyadic.
2003-07-27 Mark Mitchell <mark@codesourcery.com>
* call.c (standard_conversion): Tweak handling of
pointer-to-member types.
* pt.c (tsubst): Correctly qualify pointers-to-data member types.
* typeck.c (comp_ptr_ttypes_real): Check qualifiers on
pointer-to-data member types.
2003-07-27 Nathan Sidwell <nathan@codesourcery.com>
* parser.c (cp_parser_type_parameter): Reformat.
(cp_parser_parameter_declaration): Deprecate default args where
not allowed.
2003-07-26 Nathan Sidwell <nathan@codesourcery.com>
* cfns.h: Rebuilt.
* cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
(begin_global_stmt_expr, finish_global_stmt_expr): Remove.
* init.c (begin_init_stmts): Make static. Return is_global
value. Always call begin_stmt_expr.
(finish_init_stmts): Make static. Add is_global parm. Always
building a stmt tree.
(build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
(build_vec_init): Likewise. Always building a stmt tree.
(expand_default_init): Always building a stmt tree.
(get_temp_regvar): Likewise.
* semantics.c (begin_global_stmt_expr,
finish_global_stmt_expr): Remove.
2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (build_compound_expr): Take LHS & RHS args.
(build_x_compound_expr_from_list): Declare.
* typeck.c (build_x_compound_expr_from_list): New.
(build_x_compound_expr): Adjust.
(build_compound_expr): Remove unreachable code. Take two
parameters, adjust.
* decl.c (grok_reference_init): Use
build_x_compound_expr_from_list.
(expand_static_init): Adjust build_compound_expr call.
(cxx_maybe_build_cleanup): Likewise.
* init.c (perform_member_init): Use
build_x_compound_expr_from_list.
(build_new_1): Likewise.
(build_vec_delete): Adjust build_compound_expr calls.
(build_vbase_delete): Likewise.
* typeck2.c (store_init_value): Use
build_x_compound_expr_from_list.
(build_functional_cast): Likewise.
2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (enum tsubst_flags_t): Add tf_user.
* decl.c (make_typename_type): Pass it.
* pt.c (lookup_template_class): Use it.
(resolve_typename_type): Pass it.
* semantics.c (finish_template_type): Pass it.
2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
PR c++/11617
* cp-tree.h (qualified_name_lookup_error): Declare.
* pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
errors.
(tsubst_expr) <DECL_STMT case>: Likewise.
(tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
* semantics.c (qualified_name_lookup_error): New, broken out of ...
(finish_id_expression): ... here. Use it.
2003-07-25 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
* cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
PR c++/11596
* pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
(tsubst_template_arg): New.
(tsubst_template_arg_vector): Rename to ...
(tsubst_template_args): ... this. Accept a TREE_LIST form. Use
tsubst_template_arg.
(coerce_template_parms): Use tsubst_template_arg for default
value.
(tsubst_template_parms): Likewise.
(tsubst_aggr_type): Adjust.
(tsubst_decl): Likewise.
(tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
(tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
* Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
* error.c: Use the new pretty-printer framework.
2003-07-24 Per Bothner <pbothner@apple.com>
* decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
which causes errors messages to incorrectly mention included files.
2003-07-24 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (convert_to_base_statically): Declare.
* call.c (build_special_member_call): Convert INSTANCE to the base
type.
* class.c (convert_to_base_statically): New method.
* init.c (construct_virtual_base): Use it.
* method.c (do_build_assign_ref): Fix typo in comment.
2003-07-24 Jason Merrill <jason@redhat.com>
* decl.c: Just set truthvalue_* to boolean_*.
2003-07-24 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (reshape_init): Remove unreachable code.
2003-07-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/11513
* cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
2003-07-23 Mark Mitchell <mark@codesourcery.com>
PR c++/11645
* cp-tree.h (accessible_base_p): Declare.
* call.c (build_over_call): Use it.
* search.c (accessible_base_p): New function, split out from ...
(lookup_base): ... here.
PR c++/11517
* call.c (build_conditional_expr): Use perform_implicit_conversion
and error_operand_p. Robustify.
* typeck.c (build_unary_op): Use perform_implicit_conversion.
2003-07-23 Nathan Sidwell <nathan@codesourcery.com>
PR c++/10953
* parser.c (cp_parser_nested_name_specifier): Reset scope on
failure.
(cp_parser_elaborated_type_specifier): Likewise.
2003-07-22 Mark Mitchell <mark@codesourcery.com>
Eliminate use of POINTER_TYPE for pointers-to-members.
* call.c (standard_conversion): Rework pointer-to-member handling.
Add comments.
(add_builtin_candidate): Likewise.
(resolve_scoped_fn_name): Remove.
(build_conditional_expr): Rework pointer-to-member handling.
(compare_ics): Likewise.
* class.c (check_field_decls): Use TYPE_PTR_P.
* cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
handling.
* cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
(TYPE_PTRMEM_P): Add comment.
(TYPE_PTR_P): Simplify.
(TYPE_PTROB_P): Correct definition.
(TYPE_PTR_TO_MEMBER_P): New macro.
(TYPE_PTRMEM_CLASS_TYPE): Adjust.
(TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
(resolved_scoped_fn_name): Remove declaration.
(build_offset_ref): Change prototype.
(resolve_offset_ref): Remove.
(comp_target_types): Remove.
* cvt.c (cp_convert_to_pointer): Rework pointer-to-member
handling.
(convert_to_reference): Use can_convert.
(ocp_convert): Improve error handling. Rework pointer-to-member
handling.
(perform_qualification_conversions): Rework pointer-to-member
handling.
* decl.c (build_ptrmem_type): Handle functions too.
(create_array_type_for_decl): Remove OFFSET_TYPE error message.
(grokdeclarator): Use OFFSET_TYPE for pointers to data members.
(grokparms): Remove OFFSET_TYPE error message.
* dump.c (cp_dump_tree): Rework pointer-to-member handling.
* error.c (dump_type_prefix): Likewise.
* expr.c (cplus_expand_constant): Use build_nop.
* init.c (build_offset_ref): Add address_p parameter. Fold in
necessary bits from resolve_offset_ref.
(resolve_offset_ref): Remove.
* parser.c (cp_parser_postfix_expression): Remove special case
code for OFFSET_TYPE.
* pt.c (convert_nontype_argument): Rework pointer-to-member
handling.
(convert_template_argument): Likewise.
(unify): Likewise.
(invalid_nontype_parm_type_p): Likewise.
(dependent_type_p_r): Likewise.
* rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
(target_incomplete_p_): Rework pointer-to-member
handling.
(get_pseudo_ti_init): Likewise.
(get_pseudo_ti_desc): Likewise.
* semantics.c (finish_qualified_id_expr): Adjust call to
build_offset_ref. Remove use of resolve_offset_ref.
* tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
* typeck.c (target_type): Use TYPE_PTRMEM_P.
(type_unknown_p): Remove obsolete code about the time before
non-dependent expressions were handled correctly.
(qualify_type_recursive): Remove.
(composite_pointer_type_r): New function.
(composite_pointer_type): Use it.
(merge_types): Remove dead comments.
(comp_cv_target_types): Remove.
(comp_target_types): Likewise.
(comp_target_parms): Likewise.
(cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
(build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
(build_binary_op): Do not use of comp_target_types.
(pointer_diff): Remove OFFSET_TYPE case.
(build_unary_op): Adjust pointer-to-member handling.
(unary_complex_lvalue): Likewise.
(check_for_casting_away_constness): Add description parameter.
(build_static_cast): Pass it.
(build_reinterpret_cast): Use check_for_casting_away_constness.
(build_const_cast): Adjust pointer-to-member handling.
(build_c_cast): Likewise.
(convert_for_assignment): Remove OFFSET_TYPE error message.
(comp_ptr_ttypes_real): Adjust pointer-to-member handling.
(comp_ptr_ttypes_reinterpret): Remove.
(casts_away_constness_r): Adjust pointer-to-member handling.
(casts_away_constness): Liekwise.
(strip_all_pointer_quals): Remove.
* typeck2.c (digest_init): Adjust pointer-to-member handling.
(build_m_component_ref): Likewise.
2003-07-22 Wolfgang Bangerth <bangerth@dealii.org>
* lex.c (unqualified_fn_lookup_error): Mention that the error
message needs to be kept in synch with the manual.
2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
PR c++/11614
* decl.c (grokdeclarator): An array member is only a flexible
array member if the field itself is the array.
2003-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10793
* decl.c (xref_basetypes): Handle error_mark_node.
2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
* tree.c (lvalue_p_1): Set it.
* class.c (check_field): Don't allow non-packed non-POD fields to
be packed.
* call.c (reference_binding): Need a temporary for all bitfield
and packed fields.
(convert_like_real): Check it is ok to make a temporary here.
2003-07-21 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (hack_identifier): Remove.
* method.c (hack_identifier): Remove.
* semantics.c (finish_id_expression): Expand hack_identifier
here. Simplify.
2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
semantics.c typeck.c: Remove unnecessary casts.
2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (hack_identifier): Remove.
* method.c (hack_identifier): Remove.
* semantics.c (finish_id_expression): Expand hack_identifier
here. Simplify.
2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (finish_non_static_data_member): Add object param.
* method.c (hack_identifier): Adjust.
* pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
again for a FIELD_DECL.
* semantics.c (finish_non_static_data_member): Add object
parameter. Always save the DECL in the COMPONENT_REF.
* call.c (resolve_scoped_fn_name): Adjust.
2003-07-17 Zack Weinberg <zack@codesourcery.com>
* pt.c (get_bindings): Make definition consistent with
forward declaration.
2003-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/7809
* friend.c (add_friend): Check access for member functions
and templates.
2003-07-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/10668
* typeck.c (build_class_member_access_expr): Improve diagnostic.
2003-07-16 Mark Mitchell <mark@codesourcery.com>
PR c++/11547
* cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
macro.
(DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
* decl.c (duplicate_decls): Merge
DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
* parser.c (cp_parser_postfix_expression): Adjust call to
cp_parser_initializer_list and
cp_parser_parenthesized_expression_list.
(cp_parser_parenthesized_expression_list): Add non_constant_p.
(cp_parser_new_placement): Adjust call to
cp_parser_parenthesized_expression_list.
(cp_parser_direct_new_declarator): Likewise.
(cp_parser_conditional_expression): Remove.
(cp_parser_constant_expression): Parse an assignment-expression,
not a conditional-expression.
(cp_parser_simple_declaration): Resolve expression/declaration
ambiguity more quickly.
(cp_parser_mem_initializer): Adjust call to
cp_parser_parenthesized_expression_list.
(cp_parser_init_declarator): Keep track of whether or not the
initializer is a constant-expression.
(cp_parser_initializer): Add non_constant_p parameter.
(cp_parser_initializer_clause): Likewise.
(cp_parser_initializer_list): Likewise.
(cp_parser_attribute_list): Adjust call to
cp_parser_parenthesized_expression_list.
(cp_parser_functional_cast): Likewise.
* pt.c (tsubst_decl): Copy
DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
(tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
* semantics.c (finish_id_expression): Use
DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2003-07-16 Neil Booth <neil@daikokuya.co.uk>
* lang-options.h: Remove.
2003-07-16 Andrew Pinski <pinskia@physics.uc.edu>
PR c/10962
* class.c (field_decl_cmp): Remove.
(resort_field_decl_cmp): Remove.
(resort_sorted_fields): Remove.
(add_fields_to_vec): Rename to ...
(add_fields_to_record_type): this.
(finish_struct_1): Change to be using
sorted_fields_type's fields.
* cp-tree.h (lang_decl): In lang_decl_u3
change sorted_fields to be a pointer to
sorted_fields_type.
(resort_sorted_fields): Remove prototype.
* search.c (lookup_field_1): Change to be using
sorted_fields_type's fields.
2003-07-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/5421
* decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
is a member of other class.
* friend.c (do_friend): Don't build TEMPLATE_DECL if friend
is a specialization of function template.
2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/10903
* pt.c (convert_nontype_argument): Fix thinko in diagnostic.
Improve.
2003-07-15 Mark Mitchell <mark@codesourcery.com>
* cp-tree.def (LOOKUP_EXPR): Remove.
* cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
(LOOKUP_EXPR_GLOBAL): Remove.
(get_bindings): Remove.
(is_aggr_type_2): Remove.
* call.c (resolved_scoped_fn_name): Remove support for
LOOKUP_EXPR.
* decl.c (grokfndecl): Likewise.
(grokdeclarator): Likewise.
* error.c (dump_decl): Likewise.
(dump_expr): Likewise.
* friend.c (do_friend): Likewise.
* init.c (build_offset_ref): Likewise.
* lex.c (unqualified_fn_lookup_error): Use pedwarn. Do not create
LOOKUP_EXPRs
* mangle.c (write_expression): Remove support for LOOKUP_EXPR.
* parser.c (cp_parser_postfix_expression): Modify Koenig lookup
test.
* pt.c (get_bindings): Give it internal linkage.
(check_explicit_specialization): Remove support for LOOKUP_EXPR.
(lookup_template_function): Likewise.
(for_each_tempalte_parm_r): Likewise.
(tsubst_decl): Likewise.
(tsubst_qualified_id): Handle template template parameters.
(tsubst_copy): Remove support for LOOKUP_EXPR.
(tsubst_copy_and_build): Likewise.
(most_general_template): Likewise.
(value_dependent_expression_p): Likewise.
(type_dependent_expression_p): Note that IDENTIFIER_NODEs are
always dependent.
* semantics.c (perform_koenig_lookup): Do not create
IDENTIFIER_NODEs.
(finish_fname): Likewise.
(finish_id_expression): Likewise.
* tree.c (is_aggr_type_2): Remove.
2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/11531
* typeck.c (check_return_expr): Fix thinko in diagnostic.
2003-07-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10108
* pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
error_mark_node.
2003-07-14 Mark Mitchell <mark@codesourcery.com>
PR c++/11509
* pt.c (dependent_scope_ref_p): New function.
(value_dependent_expression_p): Use it.
(type_dependent_expression_p): Likewise.
* pt.c (tsubst_friend_function): Use reregister_specialization.
PR c++/7019
* cp-tree.h (lookup_qualified_name): Adjust prototype.
* decl.c (lookup_qualified_name): Add complain parameter. Adjust
call to is_aggr_type.
* parser.c (cp_parser_lookup_name): Adjust call to
lookup_qualified_name.
* pt.c (tsubst_qualified_id): Likewise.
(tsubst_copy_and_build): Likewise.
* semantics.c (finish_qualified_id_expr): Deal with erroneous
expressions.
2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/11510
* call.c (op_error): Properly format REALPART_EXPR and
IMAGPART_EXPR.
* error.c (dump_expr): Likewise.
2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
* error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/5293
* call.c (initialize_reference): Improve diagnostic.
2003-07-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/11154
* pt.c (more_specialized_class): Add full_args parameter.
(most_specialized_class): Adjust calls to more_specialized_class.
* cp-tree.h (more_specialized_class): Adjust declaration.
2003-07-14 Dan Nicolaescu <dann@ics.uci.edu>
* lex.c (enum tree_node_kind): Delete.
2003-07-13 Mark Mitchell <mark@codesourcery.com>
PR c++/11503
* cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
(SET_DECL_SELF_REFERENCE_P): Likewise.
* class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
* pt.c (tsubst_decl): Copy it.
* search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
* pt.c (reregister_specialization): Fix thinko in previous change.
* cp-tree.h (cp_id_kind): New type.
(unqualified_name_lookup_error): Change prototype.
(unqualified_fn_lookup_error): New function.
(do_identifier): Remove.
(do_scoped_id): Likewise.
(tsubst_copy_and_build): Change prototype.
(reregister_specialization): New function.
(perform_koenig_lookup): Likewise.
(finish_id_expression): Likewise.
* call.c (build_method_call): Adjust call to
unqualified_name_lookup_error.
* decl.c (duplicate_decls): Use reregister_specialization.
* lex.c (is_global): Remove.
(unqualified_name_lookup_error): Return a value.
(do_identifier): Remove.
(do_scoped_id): Likewise.
(identifier_typedecl_value): Remove.
(unqualified_fn_lookup_error): New function.
* parser.c (cp_parser_id_kind): Remove.
(cp_parser_non_constant_id_expression): Remove.
(cp_parser_primary_expression): Use finish_id_expression.
(cp_parser_class_or_namespace_name): Use cp_id_kind, not
cp_parser_id_kind.
(cp_parser_postfix_expression): Use perform_koenig_lookup.
(cp_parser_template_argument): Use cp_id_kind.
(cp_parser_fold_non_dependent_expr): Adjust call to
tsubst_copy_and_build.
* pt.c (unregister_specialization): Rename to ...
(reregister_specialization): This.
(tsubst_friend_function): Use it.
(maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
(tsubst_qualified_id): Likewise.
(tsubst_expr): Likewise.
(tsubst_copy_and_build): Add function_p parameter. Use
finish_id_expression. Introduce RECUR macro.
(tsubst_non_call_postfix_expression): New function.
(regenerate_decl_from_template): Use reregister_specialization.
* semantics.c (perform_koenig_lookup): New function.
(finish_id_expression): Likewise.
2003-07-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* pt.c (push_access_scope_real): Remove.
(push_access_scope): Move code from push_access_scope_real.
(pop_access_scope): Don't check for TEMPLATE_DECL.
(instantiate_template): Defer access checking during template
substitution.
(regenerate_decl_from_template): Tidy.
2003-07-11 Nathanael Nerode <neroden@gcc.gnu.org>
PR c++/11437
* operators.def: Add definitions for __imag__, __real__.
2003-07-11 Nathan Sidwell <nathan@codesourcery.com>
PR c++/11050
* parser.c (cp_parser_expression_list): Rename to ...
(cp_parser_parenthesized_expression_list): ... here. Add attribute
parameter, parse the surounding parentheses.
(cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
parameters. Return int.
(cp_parser_skip_to_closing_parenthesis or comma): Remove.
(cp_parser_postfix_expression): Adjust function call parsing.
(cp_parser_new_placement): Adjust.
(cp_parser_new_initializer): Likewise.
(cp_parser_cast_expression): Likewise.
(cp_parser_selection_statement): Likewise.
(cp_parser_mem_initializer): Likewise.
(cp_parser_asm_definition): Likewise.
(cp_parser_init_declarator): Likewise.
(cp_parser_declarator): Make
cdtor_or_conv_p an int ptr.
(cp_parser_direct_declarator): Likewise. Check for a parameter
list on cdtors & conv functions.
(cp_parser_initializer): Adjust.
(cp_parser_member_declaration): Adjust.
(cp_parser_attribute_list): Move code into
cp_parser_parens_expression_list.
(cp_parser_functional_cast): Adjust.
* pt.c (type_dependent_expression_p): Erroneous expressions are
non-dependent.
2003-07-11 Geoffrey Keating <geoffk@apple.com>
* decl.c (cp_finish_decl): Handle 'used' attribute.
* cp-lang.c (c_reset_state): New dummy routine.
* cp-tree.h (finish_file): Move prototype to c-common.h.
* parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
2003-07-11 Mark Mitchell <mark@codesourcery.com>
PR c++/8327
* pt.c (tsubst_qualified_id): Implement suggested resolution for
Core Issue 2.
(type_dependent_expression_p): Likewise.
2003-07-10 Mark Mitchell <mark@codesourcery.com>
* typeck.c (build_binary_op): Do not warn about signed
vs. unsigned comparisons in the bodies of templates.
PR c++/9411
* parser.c (cp_parser_postfix_expression): Check dependency of
functions.
2003-07-09 Mark Mitchell <mark@codesourcery.com>
PR c++/10032
* decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
still errors.
PR c++/10527
* error.c (decl_to_string): Do not print default argument
expressions.
* cp-tree.h (break_out_calls): Remove declaration.
* tree.c (break_out_calls): Remove.
* typeck.c (build_modify_expr): Avoid invalid sharing of trees.
2003-07-09 Nathan Sidwell <nathan@codesourcery.com>
PR c++ 9483
* class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
* decl2.c (constructor_name_p): Avoid repeated constructor_name
calls.
* decl.c (grokdeclarator): Refactor ctor/dtor detection.
2003-07-09 Mark Mitchell <mark@codesourcery.com>
* typeck.c (build_x_unary_op): Take note of the fact that
PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
trees.
* parser.c (cp_parser_primary_expression): Preserve the form of
qualified expressions in templates, even if they are not
dependent.
* pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
(tsubst_qualified_id): Likewise.
* search.c (accessible_p): Treat everything in the body of a
template as accessible.
2003-07-08 Mark Mitchell <mark@codesourcery.com>
* cp-tree.def (NON_DEPENDENT_EXPR): New node.
* cp-tree.h (build_call_from_tree): Remove.
(build_member_call): Likewise.
(dependent_template_arg_p): Remove.
(any_dependent_template_arguments_p): New function.
(dependent_template_id_p): Likewise.
(any_type_dependent_arguments_p): Likewise.
(build_non_dependent_expr): Likewise.
(build_non_dependent_args): Likewise.
(build_x_compound_expr): Adjust prototype.
* call.c (build_new_method_call): Handle non-dependent expressions
correctly.
* decl2.c (grok_array_decl): Likewise.
(build_offset_ref_call_from_tree): Likewise.
(build_call_from_tree): Remove.
* error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
(dump_expr): Likewise.
* init.c (build_member_call): Remove.
* mangle.c (write_expression): Update handling for template-ids.
* parser.c (cp_parser_primary_expression): Use
any_dependent_template_arguments_p. Update constant-expression
handling.
(cp_parser_postfix_expression): Use
any_type_dependent_arguments_p. Simplify call processing.
(cp_parser_unary_expression): Simplify.
(cp_parser_expression): Adjust for changes to
build_x_compound_expr.
(cp_parser_template_argument): Implement standard-conforming
parsing of non-type template arguments.
(cp_parser_direct_declarator): Use
cp_parser_fold_non_dependent_expr.
(cp_parser_fold_non_dependent_expr): New function.
(cp_parser_next_token_ends_template_argument_p): Likewise.
* pt.c (convert_template_argument): Do not call
maybe_fold_nontype_arg.
(tsubst_baselink): Likewise.
(tsubst_copy_and_build): Share common code. Make sizeof/alignof
processing work correctly for non-dependent expressions. Adjust
handling of COMPOUND_EXPR. Simplify call processing.
(value_dependent_expression_p): Deal with functional casts and
sizeof/alignof correctly.
(type_dependent_expression_p): Handle overloaded functions.
(any_type_dependent_arguments_p): New function.
(any_dependent_template_arguments_p): Likewise.
(dependent_template_p): Treat SCOPE_REFs as dependent.
(dependent_template_id_p): Simplify.
(build_non_dependent_expr): New function.
(build_non_dependent_args): Likewise.
* semantics.c (finish_stmt_expr): Don't make dependent
statement-expresions have void type.
(finish_call_expr): Handle non-dependent expressions
correctly.
* tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
* typeck.c (cxx_sizeof_or_alignof_type): Give the expression
type size_t, even in templates.
(expr_sizeof): Likewise.
(finish_class_member_access_expr): Handle non-dependent expressions
correctly.
(build_x_indirect_ref): Likewise.
(build_x_binary_op): Likewise.
(build_x_unary_op): Likewise.
(build_x_conditional_expr): Likewise.
(build_x_compound_expr): Likewise.
* typeck2.c (build_x_arrow): Likewise.
2003-07-09 Jan Hubicka <jh@suse.cz>
* cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
* decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
(start_function): Use DECL_ESTIMATED_INSNS.
* optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
* decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
unit-at-a-time
2003-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/11030
* pt.c (instantiate_class_template): Don't call xref_tag to
inject name when the friend class is a specialization.
2003-07-07 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (build_scoped_method_call): Remove.
(lookup_qualified_name): Remove parameter.
(tsubst_copy_and_build): Declare.
(finish_qualified_object_call_expr): Remove.
(check_accessibility_of_qualified_id): New function.
(finish_qualified_id_expr): Likewise.
(non_reference): Likewise.
(build_expr_from-tree): Remove.
* call.c (non_reference): Remove.
(build_scoped_method_call): Likewise.
(build_method_call): Use error_operand_p. Assert that we are not
processing a template.
(standard_conversion): Use non_reference.
* class.c (build_vtbl_entry_ref): Likewise.
(build_vtbl_ref_1): Likewise.
* cvt.c (build_expr_type_conversion): Use non_reference.
* decl.c (lookup_qualified_name): Remove flags parameter.
(grok_op_properties): Use non_reference.
* decl2.c (grok_array_decl): Likewise.
(build_expr_from_tree): Remove.
(build_offset_ref_call_from_tree): Update comment.
* error.c (parm_to_string): Call reinit_global_formatting_buffer.
* except.c (prepare_eh_types): Use non_reference.
(can_convert_eh): Likewise.
* init.c (build_dtor_call): Avoid using build_method_call.
* mangle.c (write_template_param): Remove misleading comment.
* method.c (locate_copy): Use non_reference.
* parser.c (cp_parser_scope_through_which_access_occurs): Remove.
(cp_parser_primary_expression): Do not create SCOPE_REFs is
non-dependent contexts.
(cp_parser_postfix_expression): Use finish_qualified_id_expr.
(cp_parser_direct_declarator): Use tsubst_copy_and_build, not
build_expr_from_tree.
(cp_parser_lookup_name): Adjust call to lookup_qualified_name.
Use check_accessibility_of_qualified_id.
* pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
build_expr_from_tree.
(tsubst_baselink): New function.
(tsubst_qualified_id): Likewise.
(tsubst_copy): Use them. Remove support for METHOD_CALL_EXPR.
(tsubst_expr): Adjust call to lookup_qualified_name.
(tsubst_copy_and_build): Handle SCOPE_REFs specially. Adjust
handling of CALL_EXPRs.
(value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
* rtti.c (get_tinfo_decl_dynamic): Use non_reference.
* search.c (check_final_overrider): Likewise.
* semantics.c (check_accessibility_of_qualified_id): New function.
(finish_qualified_object_call_expr): Remove.
* typeck.c (target_type): Use non_reference.
(cxx_sizeof_or_alignof_type): Likewise.
(dubious_conversion_warnings): Likewise.
(convert_for_initialization): Likewise.
(non_reference): New function.
2003-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* decl.c (print_binding_level, print_other_binding_stack,
print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
stdio calls.
* ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
2003-07-07 Andreas Jaeger <aj@suse.de>
* friend.c: Convert to ISO C90 prototypes.
* Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
language.
* cfns.h: Regenerate.
* typeck.c: Convert remaining prototypes to ISO C90.
* search.c: Likewise.
* decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
* semantics.c (expand_or_defer_fn): Likewise
* mangle.c (discriminator_for_string_literal): Likewise.
* g++spec.c (lang_specific_driver): Likewise.
* search.c (lookup_base_r): Remove unused variable.
2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
* semantics.c: (genrtl_try_block) Adjust emit_line_note
calls.
2003-07-07 Andreas Jaeger <aj@suse.de>
* search.c (lookup_base_r): Remove unused variable.
2003-07-06 Michael Chastain <mec@shout.net>
PR debug/10055
* lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
assigning to input_filename directly.
2003-07-06 Kazu Hirata <kazu@cs.umass.edu>
* call.c: Fix comment formatting.
* class.c: Likewise.
* cp-tree.h: Likewise.
* decl.c: Likewise.
* decl2.c: Likewise.
* error.c: Likewise.
* method.c: Likewise.
* name-lookup.c: Likewise.
* parser.c: Likewise.
* pt.c: Likewise.
* rtti.c: Likewise.
* search.c: Likewise.
* typeck.c: Likewise.
2003-07-06 Mark Mitchell <mark@codesourcery.com>
PR c++/11345
* search.c (lookup_base_r): Remove is_non_public and
within_current_scope parameters. Remove other dead code.
(lookup_base): Adjust call to lookup_base_r.
(adjust_result_of_qualified_name_lookup): Improve comment.
* semantics.c (finish_call_expr): Use maybe_dummy_object.
2003-07-06 Neil Booth <neil@daikokuya.co.uk>
* cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
LANG_HOOKS_MISSING_ARGUMENT): Override.
2003-07-05 Mark Mitchell <mark@codesourcery.com>
PR c++/11431
* typeck.c (build_static_cast): Check for reference conversions
earlier.
2003-07-04 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (perform_integral_promotions): Declare.
* call.c (build_addr_func): Use decay_conversion.
(convert_arg_to_ellipsis): Likewise. Remove misleading comment.
(convert_for_arg_passing): Use perform_integral_promotions.
* cvt.c (build_expr_type_conversion): Use decay_conversion.
(type_promotes_to): Do not return a cv-qualified type.
* decl.c (grok_reference_init): Fix formatting.
(get_atexit_node): Use decay_conversion.
(build_enumerator): Use perform_integral_promotions.
* init.c (build_vec_init): Use decay_conversion.
* semantics.c (finish_expr_stmt): Likewise.
(finish_switch_cond): Use perform_integral_promotions.
* typeck.c (default_conversion): Likewise.
(perform_integral_promotions): New function.
(build_indirect_ref): Use decay_conversion.
(build_array_ref): Use perform_integral_promotions.
(convert_arguments): Use decay_conversion.
(build_unary_op): Use perform_integral_promotions.
(build_c_cast): Use decay_conversion.
(build_modify_expr): Likewise.
(convert_for_initialization): Likewise.
* typeck2.c (build_x_arrow): Likewise.
2003-07-04 Kazu Hirata <kazu@cs.umass.edu>
* call.c: Fix comment typos.
* class.c: Likewise.
* cp-tree.h: Likewise.
* cvt.c: Likewise.
* decl2.c: Likewise.
* decl.c: Likewise.
* init.c: Likewise.
* mangle.c: Likewise.
* parser.c: Likewise.
* pt.c: Likewise.
* search.c: Likewise.
* semantics.c: Likewise.
* tree.c: Likewise.
* typeck.c: Likewise.
2003-07-04 Zack Weinberg <zack@codesourcery.com>
* parser.c (cp_lexer_read_token): No need to handle string
constant concatenation.
2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
(cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
ATTRIBUTE_GCC_CXXDIAG.
2003-07-03 Mark Mitchell <mark@codesourcery.com>
* call.c (build_addr_func): Handle bound pointers-to-members.
(build_method_call): Do not call resolve_offset_ref.
(implicit_conversion): Likewise.
(resolve_scoped_fn_name): Use finish_non_static_data_member, not
resolve_offset_ref.
(resolve_args): Do not call resolve_offset_ref.
(build_conditional_expr): Likewise.
(build_new_method_call): Likewise.
* cp-tree.def (OFFSET_REF): Update documentation.
* cvt.c (cp_convert_to_pointer): Update handling of conversions from
pointers to members to pointers.
(ocp_convert): Do not call resolve_offset_ref.
(convert_to_void): Likewise.
(build_expr_type_conversion): Likewise.
* decl2.c (delete_sanity): Likewise.
* init.c (resolve_offset_ref): Simplify greatly.
(build_vec_delete): Do not call resolve_offset_ref.
* parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
if appropriate.
(cp_parser_unary_expression): Use
cp_parser_simple_cast_expression.
(cp_parser_delete_expression): Likewise.
(cp_parser_cast_expression): Likewise.
(cp_parser_pm_expression): Use cp_parser_binary_op.
(cp_parser_simple_cast_expression): New function.
* rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
* semantics.c (finish_increment_expr): Likewise.
(finish_typeof): Likewise.
* tree.c (lvalue_p_1): Do not handle OFFSET_REF.
* typeck.c (require_complete_type): Do not handle OFFSET_REFs.
(decay_conversion): Do not call resolve_offset_ref.
(finish_class_member_access_expr): Likewise.
(convert_arguments): Likewise.
(build_x_binary_op): Handle DOTSTAR_EXPR.
(condition_conversion): Do not call resolve_offset_ref.
(unary_complex_lvalue): Likewise.
(build_static_cast): Likewise.
(build_reinterpret_cast): Likewise.
(build_const_cast): Likewise.
(build_c_cast): Likewise.
(build_modify_expr): Likewise.
(convert_for_assignment): Likewise.
(convert_for_initialization): Likewise.
* typeck2.c (build_x_arrow): Likewise.
(build_m_component_ref): Simplify.
* call.c (build_scoped_method_call): Use convert_to_void.
(build_method_call): Likewise.
* class.c (check_field_decls): Remove dead code.
* cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
* decl2.c (grok_array_decl): Remove dead code.
(arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
as pointer-to-member representation.
* init.c (build_offset_ref): Tidy.
(build_vec_delete_1): Use convert_to_void.
* mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
as pointer-to-member representation.
2003-07-03 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9162
* decl.c (grokdeclarator): Return friend decls, not
void_type_node.
* decl2.c (grokfield): Alter friend decl check.
* parser.c (struct cp_parser): Document default_arg chain on
unparsed_functions_queue.
(cp_parser_save_default_args): New.
(cp_parser_init_declarator, cp_parser_function_definition,
cp_parser_member_declaration): Call it.
(cp_parser_class_specifier): Remove unused variable. Alter
processing of unparsed_functions_queue.
2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* class.c (add_method, check_field_decl): Fix format specifier.
* decl.c (duplicate_decls, pushdecl, check_goto,
fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
start_enum): Likewise.
* decl2.c (ambiguous_decl): Likewise.
* pt.c (redeclare_class_template): Likewise.
2003-07-02 Nathan Sidwell <nathan@codesourcery.com>
PR c++/10219
* pt.c (type_unification_real): Don't unify exprs of error type.
* tree.c (error_type): Don't die on error_type.
PR c++/9779
* decl2.c (arg_assoc_class): Don't die on NULL type.
* typeck.c (type_unknown_p): Don't die on untyped expressions.
2003-07-01 Mark Mitchell <mark@codesourcery.com>
PR c++/6949
* decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
classes.
2003-07-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* error.c (locate_error): %P takes an `int', not a `tree'.
2003-07-02 Jan Hubicka <jh@suse.cz>
* decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
(finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
clear DECL_DEFER_OUTPUT once function is processed; avoid flags
massaging.
* cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
(expand_or_defer_fn): Declare.
(lower_function): Declare.
* decl.c (start_cleanup_fn): Use expand_or_defer_fn.
* decl2.c: Include cgraph.h and varpool.h
(maybe_emit_vtables): Make explicit instantations as needed.
(mark_member_pointers, lower_function): New functions.
(finish_file): Do unit-at-a-time.
* method.c (synthesize_method): Use expand_or_defer_fn.
* optimize.c (maybe_clone_body): Use expand_or_defer_fn.
* parser.c (cp_parser_function_definition_after_decl): Use
expand_or_defer_fn.
* pt.c (instantiate_decl): Likewise.
* semantics.c: Include cgraph.h
(expand_or_defer_fn): Break out from ...
(expand_body): ... here; deal with unit-at-a-time.
* cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
2003-07-01 Mark Mitchell <mark@codesourcery.com>
* call.c (resolve_scoped_fn_name): Return error_mark_node for
erroneous cases.
2003-07-01 Mark Mitchell <mark@codesourcery.com>
PR c++/11149
* call.c (resolve_scoped_fn_name): Check that the qualifying scope
is a class type.
2003-07-01 Giovanni Bajo <giovannibajo@libero.it>
PR c++/8046
* error.c (dump_decl): Handle BIT_NOT_EXPR as
pseudo destructor calls.
2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (define_label): Replace filename and lineno
arguments with a location_t.
* decl.c (pop_label): Adjust define_label call.
(define_label): Replace filename and lineno arguments with a
location_t.
* semantics.c (finish_label): Adjust define_label call.
2003-07-01 Mark Mitchell <mark@codesourcery.com>
PR c++/9559
* decl2.c (grokfield): Do not build NOP_EXPRs around the
error_mark_node.
2003-06-30 Neil Booth <neil@daikokuya.co.uk>
* Make-lang.in: Update.
* cp-lang.c (c_language): Define.
(LANG_HOOKS_INIT_OPTIONS): Use common hook.
* cp-tree.h (cxx_init_options): Remove.
* lex.c: Don't include diagnostic.h.
(cxx_init_options): Remove.
2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
PR c++/4933
* error.c (dump_expr): Support correctly the COMPOUND_EXPR
tree generated within a template. Use dump_expr to dump an
expression sizeof.
2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
* mangle.c (write_expression): Exit gracefully when trying to
mangle a CALL_EXPR.
2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
PR c++/10750
* parser.c (cp_parser_primary_expression): A VAR_DECL with a
(value- or type-) dependent expression as DECL_INITIAL is a
valid constant-expression (at parser time).
2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
PR c++/11106
* error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
USING_DECL, instead of print_tree_identifier.
2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cp-tree.h (language_to_string): Adjust declaration.
* dump.c (cp_dump_tree): Adjust usage.
* error.c (dump_char): Use output_formatted_scalar. Tidy.
(parm_to_string): Lose unused parameter. Tidy.
(expr_to_string): Likewise.
(code_to_string): Likewise.
(language_to_string): Likewise.
(op_to_string): Likewise.
(assop_to_string): Likewise.
(digit_buffer): Remove.
(dump_type): Format builtin vector type as __vector__.
2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
* error.c (print_integer): Remove.
(dump_type_suffix): Adjust.
(dump_expr): Likewise.
2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
* error.c (print_instantiation_partial_context): Take a
location_t.
(print_instantiation_full_context): Adjust.
(print_instantiation_context): Adjust.
* cp-tree.h (cp_line_of, cp_file_of): Remove.
* error.c (cp_line_of, cp_file_of): Merge into ...
(location_of): ... here. Make static, return a location_t.
(cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
PR c++/10784
* call.c (joust): Move warn_conversion check outwards.
2003-06-27 Zack Weinberg <zack@codesourcery.com>
* decl.c (build_typename_type)
* mangle.c (write_template_template_arg)
* parser.c (cp_parser_scope_through_which_access_occurs)
* pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
* repo.c (get_base_filename)
* semantics.c (maybe_convert_cond):
Mark the definition static, matching the forward declaration.
2003-06-27 Mark Mitchell <mark@codesourcery.com>
PR c++/10468
* pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
2003-06-27 Mark Mitchell <mark@codesourcery.com>
PR c++/10796
* decl.c (finish_enum): Implement DR377.
* decl.c (cp_finish_decl): Don't make variables with reference
type readonly while they are being initialized.
2003-06-26 Mark Mitchell <mark@codesourcery.com>
PR c++/11332
* typeck.c (build_static_cast): Avoid returning expressions with
reference type.
2003-06-26 Nathan Sidwell <nathan@codesourcery.com>
* call.c (build_op_delete_call): Use strip_array_call. Correct
error message to say 'delete' or 'delete[]'.
2003-06-26 Giovanni Bajo <giovannibajo@libero.it>
PR c++/8266
* pt.c (check_explicit_specialization): When looking up a
template function from an identifier outside class-scope, bind
it to CP_DECL_CONTEXT.
2003-06-25 Mark Mitchell <mark@codesourcery.com>
PR c++/10990
* search.c (lookup_base_r): Rely on accessible_p, rather than
trying to emulate that logic here.
PR c++/10931
* call.c (convert_like): Pass issue_conversion_warnings.
(convert_like_with_context): Likewise.
(convert_like_real): Add issue_conversion_warnings parameter.
(perform_direct_initialization_if_possible): New function.
* cp-tree.h (perform_direct_initialization_if_possible): Declare it.
* typeck.c (check_for_casting_away_constness): New function.
(build_static_cast): Rewrite.
2003-06-24 Nathan Sidwell <nathan@codesourcery.com>
* call.c (enforce_access): Assert we get a binfo.
(build_op_delete_call): Pass a binfo to
perform_or_defer_access_check.
* class.c (alter_access): Likewise.
* decl.c (make_typename_type): Likewise.
(make_unbound_class_template): Likewise.
* lex.c (do_identifier): Likewise.
* method.c (hack_identifier): Likewise.
* parser.c (cp_parser_lookup_name): Likewise.
* search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
test.
* semantics.c (finish_non_static_data_member): Likewise.
(perform_or_defer_access_check): Expect a binfo.
* typeck.c (comptypes): Expect types.
* mangle.c (find_substitution): Don't pass a non-type to same_type_p
* friend.c (make_friend_class): Likewise.
* pt.c (check_default_tmpl_args): Likewise.
(lookup_template_class): Likewise.
2003-06-24 Jan Hubicka <jh@suse.cz>
* method.c (thunk_labelno): Move outside ifdef block to make garbage
collector happy.
2003-06-24 Jan Hubicka <jh@suse.cz>
* class.c (build_vtable): Make vtables.
* cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
* decl2.c (output_vtable_inherit): Rename to ...
(prepare_assemble_variable): ... this one; change interface.
(maybe_emit_vtables): Do not call output_vtable_inherit.
* cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
* cp-tree.h (prepare_assemble_variable): New.
2003-06-23 Andrew Pinski <pinskia@physics.uc.edu>
* method.c: add prototype for make_alias_for_thunk.
(thunk_labelno, make_alias_for_thunk): only define
if ASM_OUTPUT_DEF is defined.
2003-06-23 Jakub Jelinek <jakub@redhat.com>
* method.c (thunk_labelno): New variable.
(make_alias_for_thunk): New function.
(use_thunk): Use it if defined ASM_OUTPUT_DEF. Put the thunk
into the same section as the function it is calling.
Include gt-cp-method.h.
* Make-lang.in (gt-cp-method.h): Depend on s-gtype.
(cp/method.o): Depend on gt-cp-method.h.
* config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
2003-06-23 Jan Hubicka <jh@suse.cz>
* decl.c (register_dtor_fn): Mark cleanup as used.
* decl2.c (mark_vtable_entries): Skip nops.
* rtti.c (get_tinfo_ptr): Mark tinfo as used.
(build_dynamic_cast_1): Likewise.
(tinfo_base_init): Likewise.
(emit_tinfo_decl): Likewise.
2003-06-23 Jakub Jelinek <jakub@redhat.com>
* mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
to it.
2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/10784
* call.c (joust): Warn about choosing conversion sequence only if
-Wconversion.
2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/10864
* call.c (op_error): Tidy.
* error.c (dump_expr): Properly format 'T()' when T is an
aggregate type.
2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/10915
* decl.c (grok_op_properties): Warn possible confusing conversion
only if -Wconversion.
2003-06-20 Mark Mitchell <mark@codesourcery.com>
PR c++/10749
* parser.c (cp_parser_class_head): See through dependent names
when parsing a class-head.
PR c++/10845
* pt.c (try_class_unification): Correct handling of member class
templates.
2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
* semantics.c (genrtl_finish_function): Adjust
expand_function_end call.
2003-06-19 Mark Mitchell <mark@codesourcery.com>
PR c++/10939
* pt.c (tsubst_decl): Do not try to substitute into non-dependent
functions.
(value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
PR c++/9649
* cp-tree.h (pushdecl_class_level): Change prototype.
(push_class_level_binding): Likewise.
* decl.c (add_binding): Reject duplicate static data members.
(pushdecl_class_level): Return a value indicating whether or not
the binding was valid.
(push_class_level_binding): Likewise.
* semantics.c (finish_member_declaration): Don't keep invalid
declarations.
PR c++/11041
* call.c (initialize_reference): Do not use cp_finish_decl to emit
temporary variables.
* cp-tree.h (static_aggregates): Declare.
(pushdecl_top_level_and_finish): Likewise.
* decl.c (pushdecl_top_level_1): New function.
(pushdecl_top_level): Use it.
(pushdecl_top_level_and_finish): New function.
(initialize_local_var): Remove redundant code.
(cp_finish_decl): Remove support for RESULT_DECLs. Don't check
building_stmt_tree.
* decl.h (static_aggregates): Remove.
* decl2.c (get_guard): Use pushdecl_top_level_and_finish.
* rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
(tinfo_base_init): Likewise.
2003-06-19 Matt Austern <austern@apple.com>
PR c++/11228
* init.c (build_zero_init): Assert that number of array elements
is an integer constant.
(build_default_init) Don't use build_zero_init for arrays with
variable number of elements.
2003-06-19 Andreas Jaeger <aj@suse.de>
* cp-tree.h: Remove duplicated declarations.
2003-06-18 Nathanael Nerode <neroden@gcc.gnu.org>
* pt.c: Convert to ISO C.
* semantics.c: Convert to ISO C.
2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
at_least_as_qualified_p, more_qualified_p): Return bool.
* typeck.c: ANSIFY function definitions.
(comp_array_types): Take redeclaration bool parameter.
(comptypes): Rearrange STRICT handling.
(at_least_as_qualified_p, more_qualified_p,
comp_cv_qualification): Cache cv quals.
(compparms): Rearrange loop.
2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (COMPARE_RELAXED): Rename to ...
(COMPARE_DERIVED): ... here. Adjust comment.
(resolve_typename_type_in_current_instantiation): Remove.
(cp_tree_equal, comptypes): Return a bool.
* cvt.c (convert_to_reference): Adjust comptypes call.
* pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
(resolve_typename_type_in_current_instantiation): Remove.
* tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
calls. Refactor code.
* typeck.c (comp_array_types): Return bool. Lose callback.
parameter. Adjust cp_tree_equal calls.
(comptypes): Return bool. Adjust strict handling. Remove relaxed
enumeration and java type handling. Deal with typename types here.
Adjust recursive and cp_tree_equals calls. Adjust base and derived
checking.
(comp_target_types): Remove unreachable code. Adjust
same_or_base_type_p calls.
(ptr_reasonably_similar): Adjust base and derived check.
* typeck.c (maybe_warn_about_returning_address_of_local): Remove
unused calculation.
(check_return_expr): Adjust error messages.
* cp-tree.def (SCOPE_REF): Correct comment.
2003-06-17 Mark Mitchell <mark@codesourcery.com>
* mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
string again.
2003-06-17 Robert Abeles <rabeles@archaelogic.com>
* optimize.c (dump_function): Form complete flag name by
prefixing 'fdump-' to string returned by dump_flag_name().
2003-06-17 Mark Mitchell <mark@codesourcery.com>
* mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
string.
2003-06-17 Jason Merrill <jason@redhat.com>
PR c++/10929
* decl.c (grokfndecl): Don't mark a function inline for
-finline-functions if it isn't defined.
2003-06-17 Mark Mitchell <mark@codesourcery.com>
PR c++/10712
* class.c (handle_using_decl): Robustify.
PR c++/11105
* cp-tree.h (DECL_CONV_FN_TYPE): New method.
* mangle.c (struct globals): Remove internal_mangling_p.
(write_unqualified_name): Use DECL_CONV_FN_TYPE.
(write_template_parm): Don't write out the level number.
(conv_type_names): New variable.
(hash_type): New function.
(compare_type): Likewise.
(mangle_conv_op_name_for_type): Don't try to mangle conversion
operator names.
* search.c (lookup_conversion_operator): New function.
(lookup_fnfields_1): Use it.
2003-06-17 Andreas Jaeger <aj@suse.de>
* except.c: Remove duplicate declaration of push_eh_cleanup.
* call.c: Remove extra declaration of inhibit_warnings.
2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
2003-06-16 Jens-Michael Hoffmann <jensmh@gmx.de>
* mangle.c: Convert to ISO C.
2003-06-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
macro.
2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
* tree.c: Convert to ISO C.
2003-06-16 Kazu Hirata <kazu@cs.umass.edu>
* cp-tree.h: Follow spelling conventions.
* mangle.c: Likewise.
* method.c: Likewise.
* parser.c: Likewise.
2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (start_function): Adjust init_function_start call.
* method.c (use_thunk): Likewise.
* semantics.c (genrtl_start_function): Likewise.
2003-06-14 Neil Booth <neil@daikokuya.co.uk>
* Make-lang.in: Remove c-options.o.
2003-06-13 Nathanael Nerode <neroden@gcc.gnu.org>
* lex.c: Convert to ISO C.
2003-05-19 Jens-Michael Hoffmann <jensmh@gmx.de>
* init.c: removes use of PARAMS macro. Use ISO style function
declarations. (Not copyright-significant change.)
* rtti.c: Remove PARAMS.
* typeck2.c: Convert to ISO C.
2003-06-12 Mark Mitchell <mark@codesourcery.com>
PR c++/10635
* typeck.c (build_c_cast): Check that the destination type is
complete.
2003-06-11 Mark Mitchell <mark@codesourcery.com>
PR c++/10432
* cp-tree.h (finish_declarator): Remove.
* decl.c (cp_finish_decl): Make sure to pop_nested_class even for
erroneous declarations.
* semantics.c (finish_declarator): Remove.
2003-06-11 Roger Sayle <roger@eyesopen.com>
* decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
global static constructor/destructor if it will be empty, i.e.
either doesn't call any ctors/dtors or only calls pure or const
ctors/dtors.
2003-06-11 Mark Mitchell <mark@codesourcery.com>
* mangle.c (tm_p.h): Include it.
* Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
PR c++/11131
* tree.c (cp_cannot_inline_fn): Check for "inline" before
instantiation.
2003-06-10 Jason Merrill <jason@redhat.com>
PR c++/10968
* pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
2003-06-10 Andrew Pinski <pinskia@physics.uc.edu>
* decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
(start_cleanup_cnt): New.
2003-06-10 Mark Mitchell <mark@codesourcery.com>
PR c++/11131
* cp-tree.h (template_for_substitution): Declare.
* decl2.c (mark_used): Use it when figuring out whether or not a
function is inline.
* pt.c (template_for_substitution): Give it external linkage.
* tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
possible.
2003-06-09 Zack Weinberg <zack@codesourcery.com>
PR 8861
* mangle.c (write_real_cst): New function. Implement
ABI-compliant mangling of floating-point literals when
-fabi-version>=2; provide backward compatibility with 3.3 when
-fabi-version=1 (with warning). Clarify commentary.
(write_template_arg_literal): Use write_real_cst.
2003-06-07 Andreas Jaeger <aj@suse.de>
* cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
2003-06-07 Neil Booth <neil@daikokuya.co.uk>
* cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
(LANG_HOOKS_HANDLE_OPTION): Override.
* cp-tree.h (cxx_init_options): Update.
* lex.c (cxx_init_options): Update.
2003-06-05 Jan Hubicka <jh@suse.cz>
* Make-lang.in: Add support for stageprofile and stagefeedback
2003-06-04 J"orn Rennecke <joern.rennecke@superh.com>
* decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
2003-06-04 Andreas Jaeger <aj@suse.de>
* g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
2003-06-03 Jason Merrill <jason@redhat.com>
* cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
* cp/decl.c (reshape_init): Handle vectors.
* testsuite/g++.dg/init/array10.C: New.
2003-06-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10940
* pt.c (check_explicit_specialization): Check for 'static'
earlier.
2003-05-31 Diego Novillo <dnovillo@redhat.com>
* class.c (dump_array): Call CONSTRUCTOR_ELTS to access
the operand of a CONSTRUCTOR node.
2003-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
* decl.c (cp_binding_level::this_entity): Rename from this_class.
(cxx_scope_descriptor): New function.
(cxx_scope_debug): Likewise.
(push_binding_level): Use it.
(pop_binding_level): Likewise.
(suspend_binding_level): Likewise.
(resume_binding_level): Likewise.
(pushlevel_class): Adjust use of this_class.
(pushtag): Likewise.
(lookup_name_real): Likewise.
(global_scope_name): New variable.
(initialize_predefined_identifiers): Initialize it.
(push_namespace): Use it.
(make_cxx_scope): New function.
(pushlevel): Use it.
(pushlevel_class): Likewise.
(push_binding_level): Simplify. Loose the last two arguments.
(make_binding_level): Remove.
(initial_push__namespace_scope): New function.
(push_namespace): Use it. Simplify.
(cxx_init_decl_processing): Likewise.
(declare_namespace_level): Remove.
2003-05-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10956
* pt.c (instantiate_decl): Don't use full template arguments if
we are dealing with specializations.
2003-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
* decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
(binding_depth): Unconditionally define.
(is_class_level): Likewise.
(indent): Likewise. Take an indenting parameter.
(push_binding_level): Remove conditional definittion.
(pop_binding_level): Likewise.
(suspend_binding_level): Likewise.
(resume_binding_level): Likewise.
(pushlevel): Likewise.
(pushlevel_class): Likewise.
(poplevel_class): Likewise.
(pop_everything): Likewise.
2003-05-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
* name-lookup.h (global_scope_p): New macro.
* decl.c (pop_binding_level): Use it. Don't refer directly to
global_binding_level.
(suspend_binding_level): Likewise.
(global_bindings_p): Likewise.
(print_other_binding_stack): Likewise.
(print_binding_stack): Likewise.
(maybe_push_to_top_level): Likewise.
(pushdecl_namespace_level): Likewise.
(cxx_init_decl_processing): Likewise.
(start_decl): Likewise.
(cp_finish_decl): Likewise.
(start_function): Likewise.
(global_binding_level): Remove.
2003-05-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* parser.c (cp_parser_explicit_instantiation): Restore old
access before template instantiation.
2003-05-23 Geoffrey Keating <geoffk@apple.com>
* lang-specs.h: Use -o to specify preprocessor's output file.
Make -no-integrated-cpp work when building PCH files.
2003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10682
* pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
check for implicitly created typedef to an enum.
2003-05-21 Jason Merrill <jason@redhat.com>
* init.c (build_vec_delete): Copy the address into a temporary
variable before calling build_vec_delete_1.
* decl2.c (delete_sanity): Don't call stabilize_reference.
2003-05-21 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (register_specialization): Update the decl's location,
if necessary.
(check_explicit_specialization): Likewise.
2003-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
2003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
PR c++/9738
* decl.c (duplicate_decls): Re-invoke make_decl_rtl
if the old decl had instantiated DECL_RTL.
(Base on Richard Henderson 2003-05-13 patch to c-decl.c).
2003-05-19 Matt Austern <austern@apple.com>
* lang-options.h: Document -Wno-invalid-offsetof
* typeck.c (build_class_member_access_expr): Don't complain about
(Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
* name-lookup.c (free_binding_entry): fix where the GTY markers are.
(binding_entry_make): Make entry->chain NULL after getting an entry.
fix the spelling of chain in a comment.
(binding_table_free): speed up by having temporary variable.
(binding_table_new): set table->chain to be NULL after allocating
a table.
(cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
binding->previous to NULL after getting an binding for speed.
2003-05-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cp-tree.h (struct lang_type_class): Replace data member tags
with hash-table nested_udts.
(CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
* class.c (unreverse_member_declarations): Don't touch
CLASSTYPE_TAGS.
(pushclass): Use cxx_remember_type_decls.
* decl.c (struct cp_binding_level): Replace data member tags with
hash-table type_decls.
(pop_binding_level): Handle level->type_decls.
(kept_level_p): Adjust.
(poplevel): Remove unused local variable.
(bt_print_entry): New function.
(print_binding_level): Use it.
(push_namespace): Build current_binding_level->type_decls.
(maybe_process_template_type_declaration): Adjust.
(pushtag): Likewise.
(clear_anon_tags): Use binding_table_remove_anonymous_types.
(gettags): Remove.
(cxx_remember_type_decls): Rename from storetags. Adjust.
(lookup_tag): Use binding_table_find_anon_type. Tidy.
(lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
(cxx_init_decl_processing): Build global_binding_level->type_decls.
(store_parm_decls): Remove pointless code.
* name-lookup.c (free_binding_entry): New variable.
(ENTRY_INDEX): New macro.
(struct binding_table_s): New datatype.
(binding_entry_make): New function.
(binding_entry_free): Likewise.
(binding_table_construct): Likewise.
(binding_table_free): Likewise.
(binding_table_new): Likewise.
(binding_table_expand): Likewise.
(binding_table_insert): Likewise.
(binding_table_find): Likewise.
(binding_table_find_anon_type): Likewise.
(binding_table_reverse_maybe_remap): Likewise.
(binding_table_remove_anonymous_types): Likewise.
(binding_table_foreach): Likewise.
* name-lookup.h (binding_table): New type.
(binding_entry): Likewise.
(bt_foreach_proc): Likewise.
(struct binding_entry_s): New datatype.
(SCOPE_DEFAULT_HT_SIZE): New macro.
(CLASS_SCOPE_HT_SIZE): Likewise.
(NAMESPACE_ORDINARY_HT_SIZE): Likewise.
(NAMESPACE_STD_HT_SIZE): Likewise.
(GLOBAL_SCOPE_HT_SIZE): Likewise.
(binding_table_new): Declare.
(binding_table_free): Likewise.
(binding_table_insert): Likewise.
(binding_table_find_anon_type): Likewise.
(binding_table_reverse_maybe_remap): Likewise.
(binding_table_remove_anonymous_types): Likewise.
(binding_table_foreach): Likewise.
(binding_table_find): Likewise.
(cxx_remember_type_decls): Likewise.
* pt.c (bt_instantiate_type_proc): New function.
(do_type_instantiation): Use it.
* search.c (lookup_field_r): Use binding_table_find.
2003-05-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* semantics.c (perform_deferred_access_checks): Don't discard
checked access.
2003-05-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
libiberty VA_ macros, always use stdarg.
* rtti.c (create_pseudo_type_info): Likewise.
* tree.c (build_min_nt, build_min): Likewise.
2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* ptree.c (cxx_print_type, cxx_print_xnode): Use string
concatentation on HOST_WIDE_INT_PRINT_* format specifier to
collapse multiple function calls into one.
* tree.c (debug_binfo): Likewise.
2003-05-15 Jason Merrill <jason@redhat.com>
PR c++/5388
* call.c (conditional_conversion): Don't consider implicit
conversions if T2 is a base of T1.
* cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
(ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
* parser.c (cp_parser_primary_expression): Convert a static data
member from reference.
2003-05-15 Mark Mitchell <mark@codesourcery.com>
* call.c (build_op_delete_call): Avoid creating unnecessary types.
* class.c (instantiate_type): Remove tests for tf_no_attributes.
* cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
(COMPARE_NO_ATTRIBUTES): Remove.
* typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
PR c++/8385
* semantics.c (finish_typeof): Refine type-dependency check.
2003-05-13 Jason Merrill <jason@redhat.com>
* typeck.c (build_modify_expr): Don't always stabilize the lhs and
rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* method.c (synthesize_method): Call push/pop_deferring_access_checks.
2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10230, c++/10481
* semantics.c (finish_non_static_data_member): Handle when the
non-static member is not from a base of the current class type.
2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10552
* pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
template and has dependent context.
2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9252
* cp-tree.h (saved_scope): Remove check_access field.
(tsubst_flags_t): Remove tf_parsing.
* decl.c (maybe_push_to_top_level): Don't initialize
scope_chain->check_access.
(make_typename_type, make_unbound_class_template): Don't use
tf_parsing.
(register_dtor_fn): Use push/pop_deferring_access_checks
instead of scope_chain->check_access.
* method.c (use_thunk): Likewise.
* parser.c (cp_parser_explicit_instantiation
(cp_parser_constructor_declarator_p): Don't call
push/pop_deferring_access_checks here.
(cp_parser_template_argument, cp_parser_class_name): Don't use
tf_parsing.
(yyparse): Check flag_access_control.
* pt.c (instantiate_class_template): Call
push/pop_deferring_access_checks.
* semantics.c (push_deferring_access_checks): Propagate
dk_no_check.
(perform_or_defer_access_check): Make sure basetype_path is
a type before comparison.
* call.c (build_op_delete_call, build_over_call): Use
perform_or_defer_access_check.
* class.c (alter_access): Likewise.
* init.c (build_offset_ref): Likewise.
* lex.c (do_identifier): Likewise.
* method.c (hack_identifier): Likewise.
* search.c (lookup_member): Likewise.
* semantics.c (finish_non_static_data_member): Likewise.
(simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
instead of flag_access_control.
2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9554
* parser.c (cp_parser_class_name): Remove check_access parameter.
All caller adjusted. Update declaration.
(cp_parser_lookup_name): Likewise.
* semantics.c (push_deferring_access_checks): Change parameter type
to enum deferring_kind. All caller adjusted.
(resume_deferring_access_checks): Adjust to use new enum.
(stop_deferring_access_checks): Likewise.
(perform_or_defer_access_check): Likewise.
* cp-tree.h (deferring_kind): New enum.
(deferred_access): Adjust field type.
(push_deferring_access_checks): Update declaration.
2003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10555, c++/10576
* pt.c (lookup_template_class): Handle class template with
multiple levels of parameters when one of the levels contain
errors.
2003-05-08 Jason Merrill <jason@redhat.com>
* init.c (build_new_1): Don't reuse a TARGET_EXPR in an
expression. Undo some of the recent reorg.
2003-05-07 Richard Henderson <rth@redhat.com>
PR c++/10570
* cfns.gperf: Comment out POSIX thread cancellation points,
plus abort and raise.
* cfns.h: Regenerate.
2003-05-07 Jason Merrill <jason@redhat.com>
* call.c (build_conditional_expr): Don't assume that the folded
expression has result_type.
2003-05-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* typeck.c (build_unary_op): Deal with const qualifier in
invalid pointer-to-member earlier.
2003-05-05 Jason Merrill <jason@redhat.com>
PR c++/9537
* call.c (conditional_conversion): Build an RVALUE_CONV if
we're just changing the cv-quals.
(build_conditional_expr): Don't call convert to change
cv-quals.
2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10496
* typeck.c (build_unary_op): Don't output const qualifier when
output invalid pointer-to-member diagnostics.
2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* decl.c: Fix typos.
2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/4494
* decl.c (start_function): Use same_type_p to check return type
of main.
2003-05-03 Zack Weinberg <zack@codesourcery.com>
PR c/10604
* cp/typeck.c (build_x_compound_expr): No need to check
extra_warnings as well as warn_unused_value.
2003-05-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9364, c++/10553, c++/10586
* decl.c (make_typename_type): Don't crash on illegal code.
2003-05-03 Nathan Sidwell <nathan@codesourcery.com>
* class.c (finish_struct): Use location_t and input_location
directly.
* decl.c (make_label_decl): Likewise.
(use_label): Likewise.
* decl2.c (warn_if_unknown_interface): Likewise.
(start_static_initialization_or_destruction): Likewise.
(generate_ctor_or_dtor_function): Likewise.
(finish_file): Likewise.
* error.c (print_instantiation_full_context): Likewise.
* init.c (create_temporary_var): Likewise.
* method.c (synthesize_method): Likewise.
* parser.c (cp_token): Likewise.
(cp_lexer_set_source_position_from_token): Likewise.
(cp_lexer_get_preprocessor_token): Likewise.
(cp_parser_statement): Likewise.
* pt.c (tsubst_friend_function): Likewise.
(instantiate_class_template): Likewise.
(tsubst_decl): Likewise.
(tsubst): Likewise.
(instantiate_decl): Likewise.
* semantics.c (begin_class_definition): Likewise.
(expand_body): Likewise.
2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
* class.c (finish_struct): Rename lineno to input_line.
* decl.c (push_binding_level, pop_binding_level,
suspend_binding_level, resume_binding_level, make_label_decl,
use_label, start_function): Likewise.
* decl2.c (warn_if_unknown_interface,
start_static_initialization_or_destruction,
generate_ctor_or_dtor_function, finish_file): Likewise.
* error.c (cp_line_of, print_instantiation_full_context,
print_instantiation_context): Likewise.
* except.c (check_handlers_1, check_handlers): Likewise.
* init.c (create_temporary_var): Likewise.
* method.c (use_thunk, synthesize_method): Likewise.
* parser.c (cp_lexer_set_source_position_from_token,
cp_lexer_get_preprocessor_token): Likewise.
* pt.c (push_tinst_level, pop_tinst_level,
tsubst_friend_function, instantiate_class_template, tsubst_decl,
tsubst, tsubst_expr, instantiate_decl): Likewise.
* semantics.c (genrtl_try_block, finish_label_stmt,
begin_class_definition, expand_body,
genrtl_finish_function): Likewise.
* tree.c (build_min_nt, build_min): Likewise.
2003-05-01 Mark Mitchell <mark@codesourcery.com>
* decl2.c (comdat_linkage): Don't externalize explicit
instantiations.
2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10554
* decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
is not NULL.
2003-05-01 Steven Bosscher <steven@gcc.gnu.org>
* cp-tree.h (struct lang_id2): Remove. Move fields from here...
(struct lang_identifier): ... to here.
(LANG_ID_FIELD): Remove.
(SET_LANG_ID): Remove.
(IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
(SET_IDENTIFIER_LABEL_VALUE): Likewise.
(IDENTIFIER_IMPLICIT_DECL): Likewise.
(SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
(IDENTIFIER_ERROR_LOCUS): Likewise.
(SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/8772
* pt.c (convert_template_argument): Correct diagnostic.
2003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9432, c++/9528
* decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
2003-04-30 Garbiel Dos Reis <gcc@integrable-solutions.net>
* decl.c (check_previous_goto_1): Adjust prototype.
(check_previous_goto): Adjust use.
(check_switch_goto): Likewise.
(use_label): Adjust.
(check_previous_goto_1): Don't use pedwarn_with_file_and_line.
(struct named_label_use_list): Use location_t datatype.
2003-04-29 Mark Mitchell <mark@codesourcery.com>
PR c++/10551
* pt.c (mark_decl_instantiated): Defer all explicit instantiations
that have not yet been written out.
2003-04-29 Mark Mitchell <mark@codesourcery.com>
PR c++/10549
* class.c (layout_class_type): Mark overlong bitfields as having
the maximum size permitted by their type, after layout.
PR c++/10527
* error.c (dump_expr): Correctly handling of NEW_EXPR.4
2003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* call.c (build_operator_new_call): Fix typo.
* lang-options.h: Likewise.
2003-04-29 Mark Mitchell <mark@codesourcery.com>
PR c++/10515
* cp-tree.h (lookup_field_1): Declare it.
* search.c (lookup_field_1): Make it public.
* decl.c (reshape_init): Handle designated initializers.
* decl.c (maybe_commonize_var): Further tweak support for systems
without weak symbols.
2003-04-27 Mark Mitchell <mark@codesourcery.com>
* decl.c (maybe_commonize_var): Fix thinko in last patch.
2003-04-27 Mark Mitchell <mark@codesourcery.com>
PR c++/10506
* method.c (use_thunk): Decrement immediate_size_expand.
PR c++/10503
* cp-tree.h (DECL_VAR_MARKED_P): New macro.
(DECL_MAYBE_TEMPLATE): Remove.
* class.c (fixed_type_or_null): Avoid infinite recursion.
* decl.c (maybe_commonize_var): Make the code match the comments.
* pt.c (instantiate_decl): Move call to import_export_decl.
2003-04-26 Mark Mitchell <mark@codesourcery.com>
* decl2.c (finish_file): Fix merge botch.
2003-04-25 Mark Mitchell <mark@codesourcery.com>
* decl2.c (finish_file): Don't call import_export_decl for
functions that are not defined.
(handle_class_head): Robustify.
* pt.c (instantiate_decl): Do not call cp_finish_decl for
variables that are not defined.
2003-04-24 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
* call.c (print_z_candidates): Fix off by one error.
2003-04-24 Nathan Sidwell <nathan@codesourcery.com>
PR c++/10337
* call.c (joust): Don't warn about conversion ops that are exact
or cv-conversions. Rearrange to avoid multiple type comparisons.
2003-04-23 Mark Mitchell <mark@codesourcery.com>
PR c++/10471
* call.c (build_cxx_call): Robustify.
2003-04-23 Neil Booth <neil@daikokuya.co.uk>
* Make-lang.in (lex.o): Remove mbchar.h.
* lex.c (MULTIBYTE_CHARS): Lose.
* parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
in c-lex.c.
2003-04-23 Mark Mitchell <mark@codesourcery.com>
PR c++/9847
* cp-tree.h (duplicate_tag_error): Remove.
* class.c (duplicate_tag_error): Remove.
* semantics.c (begin_class_definition): Return immediately for a
duplicate class definition.
PR c++/10451
* decl.c (grokdeclarator): Correct logic for "mutable" errors.
2003-04-22 Mark Mitchell <mark@codesourcery.com>
PR c++/10446
* search.c (lookup_fnfields_1): Handle empty slots in the method
vector.
PR c++/10428
* decl.c (check_elaborated_type_specifier): New function, split
out from ...
(xref_tag): ... here. Use the new function in more places.
* rtti.c (throw_bad_typeid): Use build_cxx_call.
2003-04-21 Mark Mitchell <mark@codesourcery.com>
* call.c (build_over_call): Use build_cxx_call.
(build_cxx_call): New method, split out of build_over_call.
* cp-tree.h (language_function): Add can_throw.
(build_cxx_call): Declare it.
* decl.c (finish_function): If a function does not contain any
calls to functions that can throw an exception, indicate that
fact.
* decl2.c (mark_used): Do not defer the instantiation of
functions, if the current function does not throw.
* optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
* pt.c (instantiate_decl): Make sure import_export_decl is called
before emitting things.
* rtti.c (throw_bad_cast): Use build_cxx_call.
(build_dynamic_cast_1): Likewise.
* typeck.c (build_function_call): Likewise.
2003-04-21 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9881
* typeck.c (build_unary_op): Fold all COMPONENT_REF addr
expressions. Reverts my 2002-08-08 patch.
* typeck.c (comp_ptr_ttypes_real): Swap final && operands for
cheaper early exit.
2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
* cp/decl2.c (start_static_storage_duration_function): Take count
arg, don't check if it wraps round.
(generate_ctor_or_dtor_function): Add locus arg, use it.
(generate_ctor_and_dtor_functions_for_priority): Data arg is a
locus.
(finish_file): Set line numbers to past EOF for synthesized
functions.
2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
PR c++/10405
* search.c (lookup_field_1): Final scan goes backwards for
types, forwards for non-types.
2003-04-17 Roger Sayle <roger@eyesopen.com>
PR c/10375
* decl.c (duplicate_decls): Preserve "const", "noreturn" and
"nothrow" function attributes.
2003-04-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10347
* pt.c (type_dependent_expression_p): Handle array new.
2003-04-15 Mark Mitchell <mark@codesourcery.com>
PR c++/10381
* parser.c (cp_parser_primary_expression): Reorganize logic for
dealing with name lookup failures.
2003-04-15 Jason Merrill <jason@redhat.com>
* decl2.c (mark_used): Don't instantiate anything if
skip_evaluation.
2003-04-14 Ziemowit Laski <zlaski@apple.com>
* tree.c (build_cplus_array_type_1): Do not call
uses_template_parms() on a NULL index_type.
2003-04-13 Roger Sayle <roger@eyesopen.com>
* decl.c (duplicate_decls): Preserve pure and malloc attributes.
2003-04-12 Mark Mitchell <mark@codesourcery.com>
PR c++/10300
* init.c (build_new_1): Reorganize.
2003-04-12 Zack Weinberg <zack@codesourcery.com>
* class.c (initialize_array)
* decl.c (reshape_init)
* decl2.c (build_expr_from_tree)
* init.c (build_zero_init)
* pt.c (tsubst_copy, tsubst_copy_and_build)
* rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
(ptm_initializer, class_initializer, get_pseudo_ti_init)
* semantics.c (finish_compound_literal)
* typeck.c (build_ptrmemfunc1)
* typeck2.c (store_init_value, process_init_constructor)
(build_functional_cast): Use build_constructor.
2003-04-12 Zack Weinberg <zack@codesourcery.com>
* call.c (print_z_candidates): Use gcc_gettext_width, not
strlen, to determine how much padding to use.
2003-04-10 Zack Weinberg <zack@codesourcery.com>
* decl.c: Update all calls to shadow_warning.
2003-04-10 Mark Mitchell <mark@codesourcery.com>
* class.c (layout_class_type): Correct handling for overlong
bit-fields whose width is the same as an integer type.
2003-04-06 Zack Weinberg <zack@codesourcery.com>
* cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
* cp-lang.c (cp_tree_size): New function.
(LANG_HOOKS_TREE_SIZE): Override.
* cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
(union lang_tree_node): Remove common and srcloc members.
(build_srcloc_here): Don't prototype.
* decl.c (cp_tree_node_structure): Kill SRCLOC case.
* pt.c (pending_templates): Correct comment.
* tree.c (build_srcloc, build_srcloc_here): Kill.
2003-04-06 Zack Weinberg <zack@codesourcery.com>
* call.c: Include intl.h.
(print_z_candidate): Always use inform; get rid of errfn
argument. Reorganize so that all the strings get picked up
by xgettext. Note obligation of caller to pass first argument
through gettext.
(print_z_candidates): Update to match. Indent second and
successive candidates by strlen() of translated message.
(joust): Restructure ambiguous-conversion pedwarn so that
translators see a complete sentence. Update calls to
print_z_candidate.
* Make-lang.in (cp/call.o): Update dependencies.
2003-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* decl.c (set_current_binding_level): Delete, revert last change.
(current_binding_level): Modify to allow it as as lvalue.
2003-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* name-lookup.c (find_binding): Pass appropriate pointer type to
POP_TIMEVAR_AND_RETURN.
2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Make-lang.in (cp-warn): Add $(STRICT_WARN).
* cp-tree.h: Don't insist on having GNUC.
2003-04-03 Jason Merrill <jason@redhat.com>
* cvt.c (ocp_convert): Only abort if we try to convert an object
of TREE_ADDRESSABLE type.
* class.c (build_vtable): Set DECL_ALIGN here.
(get_vtable_decl): Not here.
(layout_vtable_decl): Or here.
(create_vtable_ptr): Or here.
(layout_class_type): Or here.
(check_bitfield_decl): Don't mess with field alignment.
2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
DEF_ASSN_OPERATOR): Delete spurious semi-colon.
* rtti.c (dfs_class_hint_mark): Likewise.
* decl.c (push_local_name, push_class_level_binding,
maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
functions returning void.
* decl2.c (add_using_namespace): Likewise.
* decl.c (print_binding_level, print_other_binding_stack,
print_binding_stack): Cast argument of %p specifier to void*.
* ptree.c (cxx_print_decl): Likewise.
* cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
VAR_FUNCTION_OR_PARM_DECL_CHECK,
VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
* decl.c (set_current_binding_level): New macro. Use throughout
when setting the current binding level.
* cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
in enum.
* method.c (mangling_flags): Likewise.
* cp-tree.h (lang_type_header): Add __extension__ and use
CHAR_BITFIELD for members.
2003-04-02 Geoffrey Keating <geoffk@apple.com>
PR other/9274
* mangle.c: Include gt-cp-mangle.h.
(subst_identifiers): Mark with GTY.
* config-lang.in (gtfiles): Add cp/mangle.c.
* Make-lang.in: (gt-cp-mangle.h): New rule.
(cp/mangle.o): Depends on gt-cp-mangle.h.
2003-04-01 Andrew Pinski <pinskia@physics.uc.edu>
* config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
after \$(srcdir)/cp/name-lookup.h.
* name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file.
* Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
(cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
2003-03-31 Jason Merrill <jason@redhat.com>
PR java/10145
* class.c (check_field_decl): Don't set DECL_ALIGN.
2003-03-30 Mark Mitchell <mark@codesourcery.com>
PR c++/7647
* decl.c (grokdeclarator): Tidy, slightly.
* search.c (lookup_field_1): Add want_type parameter.
(lookup_field_r): Adjust call to lookup_field_1.
2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
* Make-lang.in (cp/name-lookup.o): Add more dependencies.
2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cp-tree.h (binding_for_name: Move to name-lookup.h Adjust
prototype.
(cxx_scope_find_binding_for_name): Likewise.
* decl.c (find_binding: Move to name-lookup.c.
(binding_for_name): Likewise.
(cxx_scope_find_binding_for_name): Likewise.
(BINDING_LEVEL): Remove.
(push_binding): Tidy.
(push_class_binding): Likewise.
(pop_binding): Likewise.
(poplevel): Likewise.
(poplevel_class): Likewise.
(set_identifier_type_value_with_scope): Likewise.
(push_overloaded_decl): Likewise.
(lookup_tag): Likewise.
(unqualified_namespace_lookup): Likewise.
(lookup_name_current_level): Likewise.
(maybe_inject_for_scope_var): Likewise.
(namespace_binding): Move to name-lookup.c.
(set_namespace_binding): Likewise.
* decl2.c (lookup_using_namespace): Tidy.
(qualified_lookup_using_namespace): Likewise.
(do_toplevel_using_decl): Likewise.
* name-lookup.c: Include "timevar.h"
* name-lookup.h (cxx_scope): Declare.
(struct cxx_binding): Lose member "has_level". Adjust "scope"
member declaration.
(BINDING_SCOPE): Adjust definition.
(BINDING_HAS_LEVEL_P): Remove.
2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
* name-lookup.c: New file.
* name-lookup.h: Likewise..
* decl.c (push_binding): Adjust use cxx_binding_make.
(free_bindings): Move to name-lookup.c
(pop_binding): Use cxx_binding_free.
(binding_for_name): Tidy.
* cp-tree.h: Include "name-lookup.h"
(cxx_binding_make): Move to name-lookup.h
(cxx_binding_clear): Likewise.
(struct cxx_binding): Likewise.
(LOCAL_BINDING_P): Likewise.
(INHERITED_VALUE_BINDING_P): Likewise.
(BINDING_SCOPE): Likewise.
(BINDING_HAS_LEVEL_P): Likewise.
(BINDING_VALUE): Likewise.
(BINDING_TYPE): Likewise.
* config-lang.in (gtfiles): Add cp/name-lookup.h
* Make-lang.in (cp/name-lookup.o): New rule.
(CXX_OBJS): Add cp/name-lookup.o
(CXX_TREE_H): Add cp/name-lookup.h
2003-03-28 Jason Merrill <jason@redhat.com>
PR c++/10245
* cvt.c (force_rvalue): New fn.
* call.c (build_conditional_expr): Use it.
* cp-tree.h: Declare it.
2003-03-28 Mike Stump <mrs@apple.com>
* error.c (dump_expr): Add 0x to printed hex numbers to make
output match source code better.
2003-03-28 Mark Mitchell <mark@codesourcery.com>
PR c++/10218
* decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
definitions.
* decl2.c (generate_ctor_or_dtor_function): Tolerate a
non-existant ssdf_decls array.
(finish_file): Call generator_ctor_or_dtor_function when there are
static constructors or destructors and no other static
initializations.
2003-03-28 Nathan Sidwell <nathan@codesourcery.com>
PR c++/10047
* decl2.c (finish_file): Don't warn about explicitly instantiated
inline decls.
2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
PR c++/10224
* pt.c (lookup_template_class): Only check instantiated args if
they do not contain template parameters.
2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
PR c++/10158
* parser.c (cp_parser_function_definition): Set
DECL_INITIALIZED_IN_CLASS for members.
* pt.c (instantiate_decl): Only reduce the template args for
friends that are not defined in class.
2003-03-25 Jason Merrill <jason@redhat.com>
* call.c (print_z_candidate): Change name of first arg to msgid.
(joust): Add comment for translators.
2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9898, PR c++/383, DR 322
* pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
through reference types on both PARM and ARG.
2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
PR c++/10119
* error.c (dump_expr) <BASELINK>: Use dump_expr.
* pt.c (maybe_fold_nontype_args): New function.
(tsubst_copy) <SCOPE_REF>: Subst any template_id args.
<TEMPLATE_ID_EXPR>: Break out folding code, call it.
(tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
maybe_fold_nontype_args.
2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
PR c++/10026
* decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
2003-03-23 Mark Mitchell <mark@codesourcery.com>
PR c++/7086
* typeck.c (cxx_mark_addressable): Adjust call to
gen_mem_addressof or put_var_into_stack.
2003-03-22 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9978, c++/9708
* cp-tree.h (instantiate_template): Add tsubst_flags parameter.
* call.c (add_template_candidate_real): Adjust
instantiate_template call.
* class.c (resolve_address_of_overloaded_function): Likewise.
* decl.c (build_enumerator): Set TREE_CONSTANT.
* pt.c (check_instantiated_args): New.
(push_inline_template_parms_recursive): Set TREE_CONSTANT,
TREE_READONLY.
(build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
(reduce_template_parm_level): Likewise.
(process_template_parm): Likewise.
(check_explicit_specialization): Adjust instantiate_template call.
(convert_template_argument): Don't check non-type argument here.
(lookup_template_class): Check them here.
(tsubst_friend_function): Adjust instantiate_template call.
(instantiate_template): Add tsubst_flags parameter, use it. Check
instantiated args.
2003-03-21 Zack Weinberg <zack@codesourcery.com>
* decl.c: Update calls to shadow_warning.
2003-03-21 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9898
* error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
(dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
2003-03-20 Mark Mitchell <mark@codesourcery.com>
* cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
friends.
* cp/pt.c (instantiate_class_template): Fix formatting.
2003-03-14 Matt Austern <austern@apple.com>
* cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
(unemitted_tinfo_decl_p): Remove.
(emit_tinfo_decl): Change declaration to remove unused parameter.
* decl2.c (finish_file): Change tinfo emission to loop through
unemitted_tinfo_decls array instead of looping through all decls.
* rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
unused second parameter.
(init_rtti_processing): initialize unemitted_tinfo_decls varray.
(get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
(emit_tinfo_decl): remove unused second parameter, add assertion
that decl hasn't already been emitted.
2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
* dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
type from 'int' to 'bool'. Replace 0 and 1 with true and false in
return statements.
2003-03-19 Jason Merrill <jason@redhat.com>
PR c++/8316, c++/9315, c++/10136
* call.c (print_z_candidate): Split out from...
(print_z_candidiates): ...here.
(joust): Use it.
2003-03-17 Roger Sayle <roger@eyesopen.com>
PR c++/10031
* decl.c (duplicate_decls): Use the new type when prototyping
anticipated decls, even when the types match. This defines the
exception list for the built-in function.
2003-03-17 Jason Merrill <jason@redhat.com>
PR c++/10091
* typeck.c (build_class_member_access_expr): Compare
TYPE_MAIN_VARIANTs.
2003-03-17 Mark Mitchell <mark@codesourcery.com>
PR c++/9639
* parser.c (cp_parser_declarator_id): Clear parser->scope.
2003-03-16 Jason Merrill <jason@redhat.com>
PR c++/9993
* decl.c (finish_function): Only allow the NRVO to use variables
declared at function scope.
2003-03-17 Andreas Jaeger <aj@suse.de>
* Make-lang.in (cp/TAGS): Remove.
2003-03-16 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9629
* cp-tree.h (struct language_function): Add in_base_initializer.
(in_base_initializer): define it.
(expand_member_init): Remove INIT param.
* init.c (expand_member_init): Remove INIT param, return the member.
(emit_mem_initializers): Set in_base_initializer.
* class.c (build_base_path): Check in_base_initializer.
* parser.c (cp_parser_mem_initializer): Set in_base_initializer.
* pt.c (tsubst_initializer_list): Likewise.
2003-03-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
* decl.c (binding_for_name): Fix initialization thinko.
2003-03-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
Compile-time improvement: 2/n.
* cp-tree.h (struct cxx_binding): New datatype;
(struct lang_identifier): Use it.
(LOCAL_BINDING_P): Adjust definition.
(INHERITED_VALUE_BINDING_P): Likewise.
(BINDING_SCOPE): Likewise.
(BINDING_HAS_LEVEL_P): Likewise.
(BINDING_VALUE): Likewise.
(BINDING_TYPE): Likewise.
(IDENTIFIER_VALUE): Likewise.
(struct tree_binding): Remove.
(TS_CP_BINDING): Likewise.
((union lang_tree_node): Remove field "binding".
(cxx_binding_clear): New macro.
(binding_for_name): Adjust return type.
(qualified_lookup_using_namespace): Adjust prototype.
(lookup_using_namespace): Adjust prototype.
(cxx_scope_find_binding_for_name): Declare.
* cp-tree.def: Remove CPLUS_BINDING definition.
* decl.c (push_binding): Adjust local variable type.
(add_binding): Likewise.
(push_class_binding): Likewise.
(pop_binding): Likewise.
(poplevel): Likewise.
(poplevel_class): Likewise.
(free_bindings): Adjust type.
(find_binding): Adjust return type, add a third parameter. Remove
non-useful assertion now that we use static typing.
(cxx_scope_find_binding_for_name): New function.
(binding_for_name): Use it. Adjust local variable type. Simplify.
(namespace_binding): Simplify.
(set_namespace_binding): Likewise.
(set_identifier_type_value_with_scope): Adjust local variable type.
(lookup_tag): Don't type-abuse of local variable 'old'.
(lookup_namespace_name): Likewise. Allocate binding on stack.
(select_decl): Adjust prototype.
(unqualified_namespace_lookup): Allocate binding on stack.
Don't type-abuse of local variable 'val'.
(lookup_name_real): Likewise.
(maybe_inject_for_scope_var): Adjust local variable type.
(cp_tree_node_structure): Remove CPLUS_BINDING case label.
(namespace_binding): Adjust logic, simplify.
(BINDING_LEVEL): Adjust definition.
(push_class_level_binding): Adjust local variable type.
(struct cxx_saved_binding): Adjust field 'binding' type.
* decl2.c (ambiguous_decl): Adjust prototype.
(lookup_using_namespace): Adjust local variable type.
(qualified_lookup_using_namespace): Catch type error and correct
ensueing logic error.
(do_nonmember_using_decl): Adjust local variable type. Allocate
temporary cxx_binding on stack.
(do_toplevel_using_decl): Adjust local variable type.
* ptree.c (cxx_print_cxx_binding): New function.
(cxx_print_identifier): Use it.
(cxx_print_xnode): Delete CPLUS_BINDING case label.
2003-03-15 Roger Sayle <roger@eyesopen.com>
* tree.c (count_functions): Fix whitespace.
2003-03-15 Neil Booth <neil@daikokuya.co.uk>
* Make-lang.in: Update.
2003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/6440
* pt.c (maybe_process_partial_specialization): Handle
member class template when enclosing class template is
explicit specialized.
(most_general_template): Stop looking when DECL is already
specialized.
2003-03-13 Jason Merrill <jason@redhat.com>
PR c++/9420
* search.c (lookup_conversions): Call complete_type here.
* call.c (implicit_conversion): Not here.
2003-03-13 Mark Mitchell <mark@codesourcery.com>
* decl2.c (do_nonmember_using_decl): Correct handling of
simultaneous type/non-type bindings.
* call.c (initialize_reference): Remove bogus assertion.
* decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
2003-03-12 Andrew Lewycky <andrew@mxc.ca>
PR c++/7050
* expr.c (cxx_expand_expr): Return const0_rtx for throw
expressions.
2003-03-11 Mark Mitchell <mark@codesourcery.com>
PR c++/9474
* decl2.c (do_nonmember_using_decl): Do not call duplicate decls
to merge old and new declarations.
2003-03-12 Alexandre Oliva <aoliva@redhat.com>
* g++.1: Remove.
* Make-lang.in (c++.generated-manpages): Build cp/g++.1.
(cp/g++.1): Build it from scratch in the build tree.
(c++.install-man): Depend on it. Install it from the build tree.
(c++.mostlyclean): Clean it.
2003-03-11 Mark Mitchell <mark@codesourcery.com>
PR c++/9474
* decl2.c (do_nonmember_using_decl): Do not call duplicate decls
to merge old and new declarations.
PR c++/9924
* decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
2003-03-11 Jason Merrill <jason@redhat.com>
PR c++/9820
* search.c (lookup_member): Fix handling of functions in a class
being defined.
2003-03-11 Mark Mitchell <mark@codesourcery.com>
PR c++/8700
* call.c (convert_class_to_reference): Adjust usage of
splice_viable.
(any_viable): Remove.
(splice_viable): Combine with any_viable.
(print_z_candidates): Avoid printing duplicates.
(build_user_type_conversion_1): Adjust usage of splice_viable.
(build_new_function_call): Likewise.
(build_operator_new_call): Likewise.
(build_object_call): Likewise.
(build_conditional_expr): Likewise.
(build_new_op): Likewise.
(build_new_method_call): Likewise.
(joust): Remove spurious comment.
* cp-tree.h (DECL_FRIENDLIST): Correct documentation.
* decl2.c (arg_assoc_class): Simplify.
* friend.c (add_friend): Likewise.
2003-03-11 Jason Merrill <jason@redhat.com>
PR c++/8660
* decl2.c (check_classfn): A member template only matches a
member template.
2003-03-11 Neil Booth <neil@daikokuya.co.uk>
* Make-lang.in (CXX_C_OBJS): Update.
* lang-specs.h: Don't define __GNUG__ here.
2003-03-10 Mark Mitchell <mark@codesourcery.com>
* call.c (perform_overload_resolution): New function.
(build_new_function_call): Use it.
(build_operator_new_call): Likewise.
(add_candidates): Add explicit_targs and template_only parameters.
(build_new_op): Adjust accordingly.
* cp-tree.h (build_operator_new_call): New function.
(build_function_call_real): Remove.
(build_function_call_maybe): Likewise.
* init.c (build_new_1): Use build_operator_new_call.
* typeck.c (build_function_call_real): Rename to ...
(build_function_call): ... this.
2003-03-10 Devang Patel <dpatel@apple.com>
PR c++/9394
* g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
2003-03-10 Jason Merrill <jason@redhat.com>
PR c++/9798
* decl.c (push_using_directive): Push before recursing.
PR c++/9868, c++/9524
* call.c (resolve_scoped_fn_name): Handle the case of a function
pointer member.
* decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
argument in the pointer-to-member case.
2003-03-09 Mark Mitchell <mark@codesourcery.com>
PR c++/9373
* cp-lang.c (cxx_get_alias_set): Use alias set zero for
pointers to member functions.
PR c++/8534
* decl.c (build_ptrmemfunc_type): Do not allow default arguments
in pointer-to-member-function types.
2003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
* expr.c (cplus_expand_constant): Use C90 prototype style.
(cxx_expand_expr): Likewise.
2003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9970
* decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
functions.
2003-03-08 Geoffrey Keating <geoffk@apple.com>
* lang-specs.h (c++-header): Change .pch to .gch.
2003-03-08 Neil Booth <neil@daikokuya.co.uk>
* cp-tree.h (cxx_init): Update prototype.
* lex.c (cxx_init): Similarly.
2003-03-08 Mark Mitchell <mark@codesourcery.com>
PR c++/9823
* cp-tree.h (begin_mem_initializers): Remove.
* parser.c (cp_parser_mem_initializer_list): Inline it here.
Do not call finish_mem_initializers if not in a constructor.
(cp_parser_class_head): Fix typo in error message.
* semantics.c (begin_mem_initializers): Remove.
* testsuite/g++.dg/parser/constructor1.C: New test.
PR c++/9809
* call.c (add_function_candidate): Skip builtin fuctions that have
not yet been declared.
PR c++/9982
* init.c (build_new_1): Correct logic for determining whether or
not to use an array cookie.
PR c++/9524
* parser.c (cp_parser_postfix_expression): Call
finish_non_static_data_member, even when processing_template_decl.
PR c++/9912
* cp-tree.h (is_ancestor): New function.
(handle_class_head): Change prototype.
* decl2.c (is_namespace_ancestor): Rename to ...
(namespace_anecestor): ... this.
(set_decl_namespace): Adjust accordingly.
(handle_class_head): Remove unnecessary parameters.
* parser.c (cp_parser_class_head): Check that
nested-name-specifiers are used appropriately.
2003-03-07 Mark Mitchell <mark@codesourcery.com>
* call.c (reference_binding): Remove REF_IS_VAR parameter.
(implicit_conversion): Adjust call to reference_binding.
(make_temporary_var_for_ref_to_type): Add TYPE parameter.
(initialize_reference): Adjust handling for references bound to
rvalues.
* cp-tree.h (make_temporary_var_for_ref_to_temp): Change
prototype.
(real_non_cast_lvalue_p): New method.
* cvt.c (build_up_reference): Adjust use of
make_temporary_var_for_ref_to_temp.
* tree.c (real_non_cast_lvalue_p): New method.
2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
* except.c (init_exception_processing): Use C90 prototype style.
(cp_protect_cleanup_actions): Likewise.
(prepare_eh_type): Likewise.
(build_eh_type_type): Likewise.
(build_exc_ptr): Likewise.
(do_begin_catch): Likewise.
(dtor_nothrow): Likewise.
(do_end_catch): Likewise.
(push_eh_cleanup): Likewise.
(decl_is_java_type): Likewise.
(choose_personality_routine): Likewise.
(initialize_handler_parm): Likewise.
(expand_start_catch_block): Likewise.
(expand_end_catch_block): Likewise.
(begin_eh_spec_block): Likewise.
(finish_eh_spec_block): Likewise.
(do_allocate_exception): Likewise.
(do_free_exception): Likewise.
(wrap_cleanups_r): Likewise.
(stabilize_throw_expr): Likewise.
(build_throw): Likewise.
(complete_ptr_ref_or_void_ptr_p): Likewise.
(is_admissible_throw_operand): Likewise.
(nothrow_libfn_p): Likewise.
(can_convert_eh): Likewise.
(check_handlers_1): Likewise.
(check_handlers): Likewise.
2003-03-06 Mark Mitchell <mark@codesourcery.com>
* call.c (merge_conversion_sequences): New function.
(build_conv): Set ICS_USER_FLAG for USER_CONVs.
(convert_class_to_reference): Correct handling of second
standard conversion sequence in a user-defined conversion
sequence.
(build_user_type_conversion_1): Use merge_conversion_sequences.
* cp-tree.def: Add comments for CONV nodes.
* rtti.c (get_tinfo_decl): Use build_address/build_nop.
2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
* error.c (init_error): Use C90 prototype style.
(dump_scope): Likewise.
(dump_qualifiers): Likewise.
(dump_template_argument): Likewise.
(dump_template_argument_list): Likewise.
(dump_template_parameter): Likewise.
(dump_template_bindings): Likewise.
(dump_type): Likewise.
(dump_typename): Likewise.
(class_key_or_enum): Likewise.
(dump_aggr_type): Likewise.
(dump_type_prefix): Likewise.
(dump_type_suffix): Likewise.
(dump_global_iord): Likewise.
(dump_simple_decl): Likewise.
(dump_decl): Likewise.
(dump_template_decl): Likewise.
(dump_function_decl): Likewise.
(dump_parameters): Likewise.
(dump_exception_spec): Likewise.
(dump_function_name): Likewise.
(dump_template_parms): Likewise.
(dump_char): Likewise.
(dump_expr_list): Likewise.
(dump_expr): Likewise.
(dump_binary_op): Likewise.
(dump_unary_op): Likewise.
(type_as_string): Likewise.
(expr_as_string): Likewise.
(decl_as_string): Likewise.
(context_as_string): Likewise.
(lang_decl_name): Likewise.
(cp_file_of): Likewise.
(cp_line_of): Likewise.
(decl_to_string): Likewise.
(expr_to_string): Likewise.
(fndecl_to_string): Likewise.
(code_to_string): Likewise.
(language_to_string): Likewise.
(parm_to_string): Likewise.
(op_to_string): Likewise.
(type_to_string): Likewise.
(assop_to_string): Likewise.
(args_to_string): Likewise.
(cv_to_string): Likewise.
(cxx_print_error_function): Likewise.
(cp_diagnostic_starter): Likewise.
(cp_diagnostic_finalizer): Likewise.
(cp_print_error_function): Likewise.
(function_category): Likewise.
(print_instantiation_full_context): Likewise.
(print_instantiation_partial_context): Likewise.
(maybe_print_instantiation_context): Likewise.
(print_instantiation_context): Likewise.
(cp_printer): Likewise.
(print_integer): Likewise.
(print_non_consecutive_character): Likewise.
(locate_error): Likewise.
2003-03-06 Mark Mitchell <mark@codesourcery.com>
PR c++/9965
* call.c (reference_binding): Add ref_is_var parameter.
(implicit_conversion): Adjust call to reference_binding.
(initialize_reference): Likewise.
PR c++/9400
* decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
PARM_DECLs.
PR c++/9791
* class.c (get_basefndecls): Use lookup_fnfields_1.
2003-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9188
* parser.c (cp_parser_type_parameter): Remove redundant `expect'
in error message.
(cp_parser_single_declaration): Likewise.
2003-03-05 Jason Merrill <jason@redhat.com>
PR c++/9440
* call.c (build_conditional_expr): Use convert rather than an
explicit NOP_EXPR.
2003-03-02 Matt Austern <austern@apple.com>
* decl.c (cp_binding_level): Add static_decls varray member.
(add_decl_to_level): Add static/inline namespace scope
declarations to static_decls array.
(wrapup_global_for_namespace): Pass static_decls only, instead of
all decls, to wrapup_global_declarations/check_global_declarations.
(push_namespace): Initialize static_decls for ordinary namespaces.
(cxx_init_decl_processing): Initialize static_decls for global
namespace.
2003-03-05 Mark Mitchell <mark@codesourcery.com>
* class.c (end_of_class): Correct thinko.
2003-03-04 Nathanael Nerode <neroden@gcc.gnu.org>
* config-lang.in: Replace ${libstdcxx_version} by its value.
2003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cp-tree.h (cxx_saved_binding): Declare.
(struct saved_scope): Adjust type of field 'old_binding'.
* decl.c (cxx_saved_binding_make): New macro.
(struct cxx_saved_binding): Define.
(store_bindings): Adjust prototype. Use cxx_saved_binding to save
C++ bindings.
(maybe_push_to_top_level): Adjust local variable type.
(pop_from_top_level): Likewise.
2003-03-04 Tom Tromey <tromey@redhat.com>
* Make-lang.in (c++.tags): New target.
2003-03-04 Neil Booth <neil@daikokuya.co.uk>
* Make-lang.in: Update.
2003-03-03 Jason Merrill <jason@redhat.com>
* decl.c (finish_enum): Do set the type in a template. Simplify.
* pt.c (tsubst_enum, tsubst_copy): Revert last patch.
2003-03-03 Mark Mitchell <mark@codesourcery.com>
PR c++/9878
* call.c (convert_class_to_reference): Correct conversion
sequences.
(reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
(implicit_conversion): Adjust call to reference_binding.
(add_candidate): Change type of candidates parameter.
(add_function_candidate): Likewise.
(add_conv_candidate): Likewise.
(build_builtin_candidate): Likewise.
(add_builtin_candidate): Likewise.
(add_builtin_candidates): Likewise.
(add_template_candidate_real): Likewise.
(add_template_candidate): Likewise.
(add_template_conv_candidate): Likewise.
(build_user_type_conversion_1): Adjust accordingly.
(build_object_call): Likewise.
(build_conditional_expr): Likewise.
(add_candidates): Likewise.
(build_new_op): Likewise.
(convert_like_real): Use USER_CONV_CAND. Use build_nop.
(build_new_method_call): Adjust calls to add_function_candidate.
(make_temporary_var_for_ref_to_temp): New function.
(initialize_reference): Add decl parameter.
* class.c (build_rtti_vtbl_entries): Use build_address and
build_nop.
* cp-tree.h (initialize_reference): Change prototype.
(make_temporary_var_for_ref_to_temp): New function.
(build_type_conversion): Change prototype.
(build_address): New function.
(build_nop): Likewise.
* cvt.c (cp_convert_to_pointer): Adjust call to
build_type_conversion. Avoid indicating redundant NOP_EXPRs.
Use build_nop.
(convert_to_pointer_force): Use build_nop.
(build_up_reference): Use make_temporary_var_for_ref_to_temp.
(convert_to_reference): Adjust call to build_type_conversion.
(ocp_convert): Likewise.
(build_type_conversion): Remove for_sure parameter.
* decl.c (grok_reference_init): Use initialize_reference.
* typeck.c (build_address): New function.
(build_nop): Likewise.
(build_unary_op): Use them.
(build_ptrmemfunc): Tidy slightly.
(convert_for_initialization): Adjust call to
initialize_reference.
* typeck2.c (store_init_value): Remove #if 0'd code.
2003-03-03 Jason Merrill <jason@redhat.com>
* decl.c (start_function): Clear DECL_NUM_STMTS.
* class.c (get_vtable_decl): Use vtbl_type_node.
(build_primary_vtable): Check for it.
2003-03-02 Aldy Hernandez <aldyh@redhat.com>
* decl.c (check_initializer): Check for vector_opaque_p.
2003-03-02 Ashif Harji <asharji@uwaterloo.ca>
* lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
invoke an external cpp during compilation.
2003-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
* decl.c (duplicate_decls): Convert use of warning_with_decl() to
that of warning().
(start_decl): Likewise.
(start_function): Likewise.
2003-03-01 Neil Booth <neil@daikokuya.co.uk>
* Make-lang.in (CXX_C_OBJS): Update.
2003-02-28 Mark Mitchell <mark@codesourcery.com>
PR c++/9892
* pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
instantiating it.
2003-02-28 Aldy Hernandez <aldyh@redhat.com>
* parser.c (cp_parser_init_declarator): Revert opaque
vector_opaque_p change.
Do not include target.h.
2003-02-28 Mark Mitchell <mark@codesourcery.com>
PR c++/9879
* cp-tree.h (build_zero_init): Add parameter.
* decl.c (cp_finish_decl): Adjust call.
* init.c (build_zero_init): Add nelts parameter. Adjust recursive
calls.
(build_default_init): Add nelts parameter. Adjust calls to
build_zero_init.
(build_new_1): Adjust call to build_default_init.
* typeck2.c (process_init_constructor): Adjust call to build_zero_init.
2003-02-26 Devang Patel <dpatel@apple.com>
* decl.c (finish_enum): Merge two 'for' loops. Copy value node if
required. Postpone enum setting for template decls.
(build_enumerator): Delay copying value node until finish_enum
(). Remove #if 0'ed code.
* pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
(tsubst_copy): Add check for enum type.
2003-02-25 Mark Mitchell <mark@codesourcery.com>
PR c++/9683
* decl2.c (prune_vars_needing_no_initialization): Do not throw
away initializations for DECL_EXTERNAL VAR_DECLs.
(finish_file): Adjust accordingly.
* pt.c (instantiate_decl): Do not defer VAR_DECLs.
2003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
* decl.c (add_binding): Time TV_NAME_LOOKUP.
(push_class_binding): Likewise.
(set_namespace_binding): Likewise.
2003-02-24 Mark Mitchell <mark@codesourcery.com>
PR c++/9836
* cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
specializations back to the main template.
* parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
* pt.c (resolve_typename_type): Likewise.
2003-02-24 Jeffrey D. Oldham <oldham@codesourcery.com>
PR c++/9778
* pt.c (tsubst_copy_and_build): For a templated function inside a
scope, process template arguments.
2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9602
* typeck2.c (abstract_virtuals_error): Don't check when
TYPE is still template parameter dependent.
2003-02-23 Mark Mitchell <mark@codesourcery.com>
PR c++/5333
* cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
* parser.c (cp_parser_diagnose_invalid_type_name): Use it.
* pt.c (instantiate_class_template): Don't try to instantiate
dependent types.
(resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
2003-02-21 Mark Mitchell <mark@codesourcery.com>
PR c++/9749
* decl.c (grokdeclarator): Do not allow parameters with variably
modified types.
2003-02-21 Nathan Sidwell <nathan@codesourcery.com>
* search.c (grow_bfs_bases): Remove. Fold into ...
(bfs_walk): ... here, fix fencepost error. Fix merge lossage
in previous patch.
2003-02-20 Mark Mitchell <mark@codesourcery.com>
PR c++/9729
* mangle.c (mangle_conv_op_name_for_type): Issue an error message
when the G++ 3.2 ABI prevents correct compilation.
2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
Change base class access representation. Share virtual base
binfos.
* cp/call.c (build_special_member_call): Remove binfo_for_vbase
call.
* cp/class.c (build_base_path): Likewise.
(build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
(build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
(make_new_vtable): Adjust.
(force_canonical_binfo_r): Delete.
(force_canonical_binfo): Delete.
(mark_primary_virtual_base): Delete.
(dfs_unshared_virtual_bases): Delete.
(mark_primary_bases): Adjust.
(maybe_warn_about_overly_private_class): Adjust.
(dfs_base_derived_from): Delete.
(base_derived_from): Follow the inheritance chain.
(struct find_final_overrider_data): Add vpath member.
(dfs_find_final_overrider): Adjust.
(dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
(find_final_overrider): Adjust.
(update_vtable_entry_for_fn): Adjust.
(modify_all_vtables): Adjust.
(walk_subobject_offsets): Adjust.
(layout_nonempty_base_or_field): Adjust.
(layout_empty_base): Remove last parameter. Adjust.
(build_base_field): Adjust.
(build_base_fields): Adjust.
(propagate_binfo_offsets): Remove last parameter. Adjust.
(dfs_set_offset_for_unshared_vbases): Delete.
(layout_virtual_bases): Adjust.
(finish_struct_1): Adjust.
(init_class_processing): Don't init access nodes.
(dfs_get_primary_binfo): Delete.
(get_primary_binfo): Adjust.
(dump_class_hierarchy_r): Remove most derived arg, add IGO
parameter. Adjust.
(dump_class_hierarchy): Adjust.
(finish_vtbls): Adjust.
(get_original_base): Delete.
(build_vtt_inits): Adjust.
(dfs_build_secondary_vptr_vtt_inits): Adjust.
(dfs_ctor_vtable_bases_queue_p): Adjust.
(build_ctor_vtbl_group): Adjust.
(dfs_accumulate_vtbl_inits): Adjust.
(build_vtbl_initializer): Adjust.
(build_vbase_offset_vtbl_entries): Adjust.
(add_vcall_offset_vtbl_entries_1): Adjust.
* cp/cp-tree.h (CPTI_ACCESS_*): Remove.
(access_*_node): Remove.
(CANONICAL_BINFO): Delete.
(BINFO_UNSHARED_MARKED): Remove.
(BINFO_MARKED): Set LANG_FLAG_0 directly.
(SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
(BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
(SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
Delete.
(BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
(SET_BINFO_NEW_VTABLE_MARKED): Adjust.
(SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
Delete.
(BINFO_DEPENDENT_BASE_P): New.
(dfs_walk, dfs_walk_real): Queue function takes derived binfo and
index.
(markedp, unmarkedp): Adjust.
(dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
find_vbase_instance, binfo_for_vbase): Delete.
(copied_binfo, original_binfo): Declare.
(finish_base_specifier): Add virtual_p arg.
(unshare_base_binfos): Delete.
(copy_base_binfos): Declare.
(reverse_path): Delete.
* cp/decl.c (xref_basetypes): Access and virtuality passed
differently. Don't copy direct base binfos here. Call
copy_base_binfos.
* cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
(initialize_vtbl_ptrs): Adjust.
(expand_member_init): Adjust.
* cp/parser.c (cp_parser_base_specifier): Adjust.
* cp/pt.c (instantiate_class_template): Adjust.
(get_template_base_recursive): Adjust.
* cp/rtti.c (get_pseudo_ti_init): Adjust.
(get_pseudo_ti_desc): Adjust.
* cp/tree.c (unshare_base_binfos): Rename to ...
(copy_base_binfos): ... here, reimplement.
(make_binfo): Set BINFO_DEPENDENT_BASE_P.
(reverse_path): Remove.
* cp/typeck.c (get_delta_difference): Adjust error messages.
* cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
* cp/search.c (lookup_base_r): Adjust.
(dynamic_cast_base_recurse): Adjust.
(canonical_binfo): Remove.
(dfs_canonical_queue): Remove.
(dfs_assert_unmarked_p): Remove.
(assert_canonical_unmarked): Remove.
(shared_marked_p, shared_unmarked_p): Remove.
(BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
(dfs_access_in_type): Adjust.
(access_in_type): Adjust.
(dfs_accessible_queue_p): Adjust.
(dfs_accessible_p): Adjust.
(is_subobject_of_p_1, is_subobject_of_p): Remove.
(struct lookup_field_info): Remove from_dep_base_p field.
(lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
(lookup_field_r): Remove dependent base code.
(lookup_member): Likewise.
(dfs_walk, dfs_walk_real): Add access arg to queue fn.
(dfs_unmarked_real_bases_queue_p): Remove.
(dfs_marked_real_bases_queue_p): Remove.
(dfs_skip_vbases): Remove.
(dfs_get_pure_virtuals): Adjust.
(markedp, unmarkedp): Adjust.
(marked_vtable_pathp, unmarked_vtable_pathp): Remove.
(marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
(dfs_unmark): Adjust.
(dfs_get_vbase_types):Remove.
(dfs_build_inheritance_graph_order): Remove.
(get_vbase_types): Remove
(dfs_find_vbase_instance): Remove.
(find_vbase_instance): Remove.
(dfs_debug_unmarkedp): Adjust.
(dependent_base_p): Remove.
(dfs_push_type_decls): Adjust.
(dfs_push_decls): Adjust.
(dfs_no_overlap_yet): Adjust.
(copied_binfo): New function.
(original_binfo): New function.
(binfo_for_vbase): Remove.
2003-02-18 Zack Weinberg <zack@codesourcery.com>
* cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
(bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
vectors, for speed.
2003-02-18 Mark Mitchell <mark@codesourcery.com>
PR c++/9704
* class.c (layout_class_type): In the 3.2 ABI, take into account
trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
2003-02-18 Matt Austern <austern@apple.com>
* cp/cp-lang.c: Change lang hooks so that final_write_globals does
nothing for C++.
* cp/decl.c (wrapup_globals_for_namespace): Remove special
handling of global namespace.
2003-02-18 Geoffrey Keating <geoffk@apple.com>
* cp-tree.h (rid_to_yy): Delete.
(C_RID_YYCODE): Delete.
(finish_file): Delete redundant declaration.
2003-02-18 Jason Merrill <jason@redhat.com>
PR c++/9623
* decl.c (reshape_init): Don't mess with initializer labels.
PR c++/9485
* parser.c (cp_parser_postfix_expression): Set idk properly for
object->scope::member.
2003-02-18 Ben Elliston <bje@redhat.com>
PR other/7350
* decl.c (duplicate_decls): Fix typo in comment.
2003-02-17 Michael Elizabeth Chastain <mec@shout.net>
PR debug/9717
* class.c (build_base_field): Mark fields for base classes with
DECL_IGNORED_P.
2003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9457
* pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
CONSTRUCTOR_ELTS only once.
2003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9459
* error.c (dump_type_prefix): Handle TYPEOF_TYPE.
(dump_type_suffix): Likewise.
2003-02-14 Nathan Sidwell <nathan@codesourcery.com>
* search.c: ANSIfy function declarations and definitions.
* cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
* call.c (build_method_call, resolve_scoped_fn_name,
build_java_interface_fn_ref): Adjust lookup_field, lookup_member
calls.
* class.c (handle_using_decl): Likewise.
* decl.c (make_typename_type, make_unmound_class_template,
start_decl, compute_array_index_type): Likewise.
* decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
* init.c (expand_member_init, build_member_call): Likewise.
* pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
resolve_typename_type): Likewise.
* typeck.c (lookup_destructor, finish_class_member_access_exprm
build_prememfunc_access_expr): Likewise.
2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
* decl2.c: Include "timevar.h".
(namespace_ancestor): Time name lookup.
(add_using_namespace): Likewise.
(lookup_using_namespace): Likewise.
(qualified_lookup_using_namespace): Likewise.
(decl_namespace): Likewise.
(lookup_arg_dependent): Likewise.
* lex.c (do_identifier): Likewise.
(do_scoped_id): Likewise.
* pt.c (lookup_template_class): Likewise.
2003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
* decl.c: (define_label): Fix warning for return 0 instead of NULL.
2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
* decl.c: Include "timevar.h".
(poplevel): Time name lookup.
(find_binding): Likewise.
(push_namespace): Likewise.
(pop_nested_namespace): Likewise.
(store_bindings): Likewise.
(maybe_push_to_top_level): Likewise.
(pop_from_top_level): Likewise.
(push_local_name): Likewise.
(pushtag): Likewise.
(pushdecl): Likewise.
(pushdecl_with_scope): Likewise.
(pushdecl_namespace_level): Likewise.
(pushdecl_top_level): Likewise.
(pushdecl_class_level): Likewise.
(push_class_level_binding): Likewise.
(push_using_decl): Likewise.
(push_using_directive): Likewise.
(push_overloaded_decl): Likewise.
(lookup_label): Likewise.
(define_label): Likewise.
(lookup_tag): Likewise.
(lookup_tag_reverse): Likewise.
(lookup_namespace_name): Likewise.
(select_decl): Likewise.
(unqualified_namespace_lookup): Likewise.
(lookup_name_real): Likewise.
(lookup_name_current_level): Likewise.
(lookup_type_current_level): Likewise.
(maybe_inject_for_scope_var): Likewise.
(xref_tag): Likewise.
* Make-lang.in (cp/decl.o): Add dependency on timevar.h
2003-02-12 Phil Edwards <pme@gcc.gnu.org>
* decl.c (build_enumerator): Remove unneeded test.
2003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
* cp-tree.h (struct lang_type_header): Make all fields unsigned
char.
2003-02-03 Mark Mitchell <mark@codesourcery.com>
PR c++/7129
* call.c (z_candidate): Add args.
(convert_class_to_reference): Set it.
(implicit_conversion): Tidy.
(add_candidate): Add args parameter.
(add_function_candidate): Adjust call to add_candidate.
(add_conv_candidate): Likewise.
(build_builtin_candidate): Likewise.
(build_user_type_conversion_1): Eliminate wasteful tree_cons
usage.
(build_new_function_call): Likewise.
(build_object_call): Likewise.
(add_candidates): New function.
(build_new_op): Use it.
(covert_like_real): Adjust call to build_over_call.
(build_over_call): Remove args parameter.
* operators.def: Add <?= and >?=.
2003-02-01 Richard Sandiford <rsandifo@redhat.com>
* typeck.c (build_indirect_ref): Don't check flag_volatile.
2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/8849
* pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
(BINFO_LANG_ELTS): New #define.
* tree.c (make_binfo): Use BINFO_LANG_ELTS.
2003-01-30 Geoffrey Keating <geoffk@apple.com>
* cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
2003-01-30 Mark Mitchell <mark@codesourcery.com>
* class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
for class types.
* cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
rather than TYPE_LANG_FLAG_0.
(TYPE_BUILT_IN): Remove.
(TYPE_DEPENDENT_P): New macro.
(TYPE_DEPENDENT_P_VALID): Likewise.
(lang_type_class): Add fields_readonly.
* decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
* pt.c (dependent_type_p_r): New function, split out from ...
(dependent_type_p): ... here. Memoize results.
* search.c (dependent_base_p): Use dependent_type_p, not
uses_template_parms.
* typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
for class types.
2003-01-29 Mark Mitchell <mark@codesourcery.com>
* call.c (build_field_call): Use build_new_op, not build_opfncall.
(prep_operand): New function.
(build_new_op): Use it. Remove dead code.
* class.c (pushclass): Change "modify" parameter type from int to
bool.
(currently_open_class): Use same_type_p, not pointer equality.
(push_nested_class): Adjust calls to pushclass, remove modify
parameter.
* cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
(pushclass): Change prototype.
(push_nested_class): Likewise.
(grokoptypename): Remove.
(build_opfncall): Remove.
(value_dependent_expression_p): Declare.
(resolve_typename_type): Likewise.
(resolve_typename_type_in_current_instantiation): Likewise.
(enter_scope_of): Remove.
(tsubst): Remove.
(tsubst_expr): Likewise.
(tsubst_copy): Likewise.
(tsubst_copy_and_build): Likewise.
* decl.c (warn_about_implicit_typename_lookup): Remove.
(finish_case_label): Return error_mark_node for erroneous labels.
(start_decl): Adjust calls to push_nested_class.
(grokfndecl): Call push_scope/pop_scope around call to
duplicate_decls.
(grokdeclarator): Do not call tsubst.
(start_function): Adjust calls to push_nested_class.
* decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
(check_classfn): Use push_scope/pop_scope around type comparisions.
(grokoptypename): Remove.
(push_sscope): Adjust call to push_nested_class.
* error.c (dump_type): Show cv-qualification of typename types.
* init.c (build_member_call): Use build_new_op, not
build_opfncall.
* method.c (build_opfncall): Remove.
* parser.c (cp_parser): Add allow_non_constant_expression_p and
non_constant_expression_p.
(cp_parser_constant_expression): Adjust prototype.
(cp_parser_resolve_typename_type): Remove.
(cp_parser_non_constant_expression): New function.
(cp_parser_non_constant_id_expression): Likewise.
(cp_parser_new): Set allow_non_constant_expression_p and
non_constant_expression_p.
(cp_parser_primary_expression): Reject `this' and `va_arg' in
constant-expressions. Note that dependent names aren't really
constant.
(cp_parser_postfix_expression): Reject conversions to non-integral
types in constant-expressions. Neither are increments or
decrements.
(cp_parser_unary_expression): Reject increments and decrements in
constant-expressions.
(cp_parser_direct_new_declarator): Adjust call to
cp_parser_constant_expression.
(cp_parser_cast_expression): Reject conversions to non-integral
types in constant-expressions.
(cp_parser_assignment_expression): Rejects assignments in
constant-expressions.
(cp_parser_expression): Reject commas in constant-expressions.
(cp_parser_labeled_statement): Adjust call to
cp_parser_constant_expression.
(cp_parser_direct_declarator): Simplify array bounds, even in
templates, when they are non-dependent. Use
resolve_typename_type, not cp_parser_resolve_typename_type.
(cp_parser_class_head): Use resolve_typename_type, not
cp_parser_resolve_typename_type.
(cp_parser_member_declaration): Adjust call to
cp_parser_constant_expression.
(cp_parser_constant_initializer): Likewise.
(cp_parser_constructor_declarator): Use resolve_typename_type, not
cp_parser_resolve_typename_type.
(cp_parser_late_parsing_default_args): Adjust call to
push_nested_class.
* pt.c (tsubst): Give it internal linkage.
(tsubst_expr): Likewise.
(tsubst_copy): Likewise.
(tsubst_copy_and_build): Likewise.
(push_access_scope_real): Likewise.
(tsubst_friend_class): Likewise.
(instantiate_class_template): Adjust call to pushclass.
(value_dependent_expression_p): Give it external linkage.
Robustify.
(resolve_typename_type): New function.
* semantics.c (finish_call_expr): Use build_new_op, not
build_opfncall.
(begin_constructor_declarator): Remove.
(begin_class_definition): Adjust call to pushclass.
(enter_scope_of): Remove.
* typeck.c (comptypes): Resolve typename types as appropriate.
(build_x_indirect_ref): Use build_new_op, not build_opfncall.
(build_x_compound_expr): Likewise.
(build_modify_expr): Likewise.
(build_x_modify_expr): Likewise.
* typeck2.c (build_x_arrow): Likewise.
2003-01-29 Fariborz Jahanian <fjahanian@apple.com>
* pt.c (last_pending_template) Declare GTY().
2003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/8591
* parser.c (cp_parser_elaborated_type_specifier): Convert
TEMPLATE_DECL to TYPE_DECL only when processing template friends.
(cp_parser_maybe_treat_template_as_class): Remove redundant tests.
2003-01-28 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9437
* pt.c (unify): Don't unify '*T' with 'U C::*'.
PR c++/3902
* parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
inside a declarator.
2003-01-27 Nathan Sidwell <nathan@codesourcery.com>
* class.c (update_vtable_entry_for_fn): Add index parameter.
Generate vcall thunk for covariant overriding from a virtual
primary base.
(dfs_modify_vtables): Adjust.
2003-01-25 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9403
* parser.c (cp_parser_class_or_namespace_name): Reject duplicate
template keyword.
(cp_parser_base_specifier): Look for and consume a
TEMPLATE keyword. Replace switch with array index.
PR c++/795
* semantics.c (finish_non_static_data_member): Remember the
field's type even in a template.
PR c++/9415
* pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
already scoped.
PR c++/8545
* parser.c (cp_parser_cast_expression): Be more tentative.
2003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* cp-tree.h (flagged_type_tree_s): Remove.
(check_for_new_type): Likewise.
* typeck2.c (check_for_new_type): Likewise.
2003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
* dump.c: ANSIfy function declarations and definitions.
* cp-tree.h, decl.h: Get rid of PARAMS. Again.
2003-01-22 Mark Mitchell <mark@codesourcery.com>
PR c++/9354
* init.c (build_new): Set the type of the new-expression, even
when processing_templte_decl.
PR c++/9216
* parser.c (cp_parser_primary_expression): Improve error message
for templates used in an expression context.
PR c++/8696
* parser.c (cp_parser_decl_specifier_seq): Commit to tentative
parse when encountering "typedef".
2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
* class.c, parser.c: ANSIfy function definitions and declarations.
2003-01-22 Mark Mitchell <mark@codesourcery.com>
PR c++/9328
* error.c (dump_decl): For an OVERLOAD, just print the name of the
function; it doesn't make sense to try to print its type.
* semantics.c (finish_typeof): Issue errors about invalid uses.
PR c++/9298
* parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
function.
(cp_parser_expression_statement): Use it.
(cp_parser_explicit_instantiation): Likewise.
* pt.c (do_decl_instantiation): Improve error handling logic.
2003-01-22 Mark Mitchell <mark@codesourcery.com>
PR c++/9384
* parser.c (cp_parser_using_declaration): Issue error messages
about name resolution failures here.
PR c++/9388
* class.c (currently_open_derived_class): Use dependent_type_p.
* cp-tree.h (dependent_type_p): New function.
(dependent_template_arg_p): Likewise.
(dependent_template_p): Likewise.
(type_dependent_expression_p): Likewise.
* parser.c (cp_parser_dependent_type_p): Remove.
(cp_parser_value_dependent_type_p): Likewise.
(cp_parser_type_dependent_expression_p): Likewise.
(cp_parser_dependent_template_arg_p): Likewise.
(cp_parser_dependent_template_id_p): Likewise.
(cp_parser_dependent_template_p): Likewise.
(cp_parser_diagnose_invalid_type_name): Replace
cp_parser_dependent_type_p with dependent_type_p, etc.
(cp_parser_primary_expresion): Likewise.
(cp_parser_nested_name_specifier_opt): Likewise.
(cp_parser_postfix_expression): Likewise.
(cp_parser_unary_expression): Likewise.
(cp_parser_template_name): Likewise.
(cp_parser_class_name): Likewise.
(cp_parser_lookup_name): Likewise.
* pt.c (dependent_type_p): New function.
(value_dependent_expression_p): Likewise.
(type_dependent_expression_p): Likewise.
(dependent_template_arg_p): Likewise.
(dependent_template_id_p): Likewise.
(dependent_template_p): Likewise.
PR c++/9285
PR c++/9294
* parser.c (cp_parser_simple_declaration): Return quickly when
encountering errors.
2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
Make-lang.in (cp/decl.o-warn): Add -Wno-error.
2003-01-17 Jason Merrill <jason@redhat.com>
PR c++/9167, c++/9358
* decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
2003-01-17 Jason Merrill <jason@redhat.com>
PR c++/9342
* call.c (build_conditional_expr): Always do lvalue-rvalue
conversion.
2003-01-17 Mark Mitchell <mark@codesourcery.com>
PR c++/9294
* cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
* cp-tree.h (BASELINK_BINFO): Adjust.
(BASELINK_FUNCTIONS): Likewise.
(BASELINK_ACCESS_BINFO): Likewise.
(tree_baselink): New structure.
(cp_tree_node_structure_enum): Add TS_CP_BASELINK.
(lang_tree_node): Add baselink.
* decl.c (cp_tree_node_structure): Add BASELINK case.
* search.c (build_baselink): Adjust.
* tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
test from TREE_LIST case.
PR c++/9272
* parser.c (cp_parser_constructor_declarator_p): Do not assume
that a constructor cannot be declared outside of its own class.
* parser.c (cp_parser_resolve_typename_type): If the scope cannot
be resolved, neither can the qualified name.
* rtti.c (get_pseudo_ti_desc): Fix thinko.
2003-01-16 Jason Merrill <jason@redhat.com>
PR c++/8564
* init.c (build_vec_init): Re-add maxindex parm.
(perform_member_init, build_aggr_init): Pass it.
(build_new_1): Pass it. Use an incomplete array type for full_type.
* typeck.c (build_modify_expr): Pass it.
* cp-tree.h: Adjust.
2003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
* cp-tree.h (tsubst_copy_and_build): New declaration.
* pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
(tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
(tsubst_copy_and_build): New function.
2003-01-16 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (lang_type_class): Remove is_partial_instantiation.
(PARTIAL_INSTANTIATION_P): Remove.
(IMPLICIT_TYPENAME_P): Likewise.
(IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
(build_typename_type): Remove declaration.
(parmlist_is_exprlist): Likewise.
* decl.c (build_typename_type): Make it static, remove third
parameter.
(push_class_binding): Don't do implicit typename stuff.
(make_typename_type): Likewise.
(lookup_name_real): Likewise.
(grokdeclarator): Don't try to convert declarations into
initializations. Don't do implicit typename stuff.
(parmlist_is_exprlist): Remove.
(xref_basetypes): Simplify.
* decl2.c (grokfield): Don't try to convert declarations into
initializations.
(build_anon_union_vars): Do this while processing templates, too.
(finish_anon_union): Likewise.
* error.c (dump_type): Remove implicit typename handling.
* parser.c (cp_parser_diagnose_invalid_type_name): New method.
(cp_parser_primary_expression): Correct handling of names not
found by unqualified name lookup in templates.
(cp_parser_nested_name_specifier_opt): Avoid checking dependency
of types when possible.
(cp_parser_simple_declaration): Complain intelligently about some
invalid declarations.
(cp_parser_member_declaration): Likewise.
(cp_parser_constructor_declarator_p): Don't check when we're in a
function scope.
* pt.c (instantiate_class_template): Remove
PARTIAL_INSTANTIATION_P gunk.
* search.c (lookup_field_r): Don't build implicit typenames.
(marked_pushdecls_p): Don't enter dependent base types.
(unmarked_pushdecls_p): Likewise.
* semantics.c (begin_class_definition): Remove implicit typename
stuff.
2003-01-16 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9212
* parser.c (cp_parser_direct_declarator): If accepting either
abstract or named, the name must be an unqualified-id.
2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* class.c (layout_virtual_bases): Avoid signed/unsigned warning.
2003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* decl2.c (check_classfn): Fix uninitialized warning.
(build_anon_union_vars): Likewise.
* pt.c (tsubst_copy): Likewise.
2003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
Further conform g++'s __vmi_class_type_info to the C++ ABI
specification.
* rtti.c (dfs_class_hint_mark): Do not set hints not specified by
the specification.
(class_hint_flags): Likewise.
2003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* config-lang.in: Add semantics.c to gtfiles.
* cp-tree.h (flagged_type_tree_s): Remove lookups field.
(saved_scope): Likewise.
(type_lookups): Remove.
(deferred_access): New structure.
(type_access_control): Remove.
(save_type_access_control): Likewise.
(reset_type_access_control): Likewise.
(decl_type_access_control): Likewise.
(push_deferring_access_checks): Declare.
(resume_deferring_access_checks): Likewise.
(stop_deferring_access_checks): Likewise.
(pop_deferring_access_checks): Likewise.
(get_deferred_access_checks): Likewise.
(pop_to_parent_deferring_access_checks): Likewise.
(perform_deferred_access_checks): Likewise.
(perform_or_defer_access_check): Likewise.
* decl.c (make_typename_type): Use perform_or_defer_access_check.
(make_unbound_class_template): Likewise.
(grokdeclarator): Don't call decl_type_access_control.
* parser.c (cp_parser_context): Remove deferred_access_checks
and deferring_access_checks_p fields.
(cp_parser_context_new): Adjust.
(cp_parser): Remove access_checks_lists.
(cp_parser_defer_access_check): Remove.
(cp_parser_start_deferring_access_checks): Remove.
(cp_parser_stop_deferring_access_checks): Remove.
(cp_parser_perform_deferred_access_checks): Remove.
(cp_parser_nested_name_specifier_opt): Use new deferred access
functions.
(cp_parser_simple_declaration): Likewise.
(cp_parser_template_id): Likewise.
(cp_parser_function_definition): Likewise.
(cp_parser_class_specifier): Likewise.
(cp_parser_lookup_name): Likewise.
(cp_parser_single_declaration): Likewise.
(cp_parser_pre_parsed_nested_name_specifier): Likewise.
(cp_parser_parse_tentatively): Likewise.
(cp_parser_parse_definitely): Likewise.
(yyparse): Likewise.
(cp_parser_init_declarator): Remove access_checks parameter.
Use new deferred access functions.
(cp_parser_function_definition_from_specifiers_and_declarator):
Likewise.
(cp_parser_class_head): Remove deferring_access_checks_p and
saved_access_checks parameters. Use new deferred access functions.
(cp_parser_member_specification_opt): Don't call
reset_type_access_control.
* search.c (type_access_control): Remove.
* semantics.c: Include "gt-cp-semantics.h".
(deferred_type_access_control): Remove.
(deferred_access_stack): New variable.
(deferred_access_free_list): Likewise.
(push_deferring_access_checks): New function.
(resume_deferring_access_checks): Likewise.
(stop_deferring_access_checks): Likewise.
(pop_deferring_access_checks): Likewise.
(get_deferred_access_checks): Likewise.
(pop_to_parent_deferring_access_checks): Likewise.
(perform_deferred_access_checks): New function, adapted from
cp_parser_perform_deferred_access_checks.
(perform_or_defer_access_check): New function, adapted from
cp_parser_defer_access_check.
(current_type_lookups): Remove.
(deferred_type_access_control): Likewise.
(decl_type_access_control): Likewise.
(save_type_access_control): Likewise.
(reset_type_access_control): Likewise.
(begin_function_definition): Adjust.
(begin_class_definiton): Likewise.
2003-01-13 Jason Merrill <jason@redhat.com>
PR c++/8748
* class.c (build_base_path): Take the address before calling save_expr.
* call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
all the ambiguous conversions are bad.
* class.c (maybe_warn_about_overly_private_class): Don't stop
searching when we find a nonprivate method.
* typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
2003-01-12 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (get_arglist_len_in_bytes): Remove.
PR c++/9264
* parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
typeame types more robustly.
2003-01-11 Phil Edwards <pme@gcc.gnu.org>
* parser.c: Fix comment typos.
2003-01-10 Mark Mitchell <mark@codesourcery.com>
PR c++/9099
* parser.c (cp_parser_scope_through_which_access_occurs): Handle
an object_type which is not a class type.
2003-01-10 Geoffrey Keating <geoffk@apple.com>
* parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
(cp_parser_late_parsing_default_args): Likewise.
2003-01-10 Nathanael Nerode <neroden@gcc.gnu.org>
* cfns.gperf: ANSIfy function declarations.
* cfns.h: Regenerate.
* cp-tree.h: ANSIfy function declarations.
2003-01-10 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (reparse_absdcl_as_expr): Remove.
(reparse_absdcl_as_casts): Likewise.
(reparse_decl_as_expr): Likewise.
(finish_decl_parsing): Likewise.
* decl2.c (reparse_absdcl_as_expr): Remove.
(reparse_absdcl_as_casts): Likewise.
(repase_decl_as_expr): Likewise.
(finish_decl_parsing): Likewise.
PR c++/9128
PR c++/9153
PR c++/9171
* parser.c (cp_parser_pre_parsed_nested_name_specifier): New
function.
(cp_parser_nested_name_specifier_opt): Correct the
check_dependency_p false.
(cp_parser_postfix_expression): Fix formatting.
(cp_parser_decl_specifier_seq): Avoid looking for constructor
declarators when possible.
(cp_parser_template_id): Avoid performing name-lookup when
possible.
(cp_parser_class_head): Do not count specializations when counting
levels of templates.
(cp_parser_constructor_declarator_p): Return immediately if
there's no chance that the tokens form a constructor declarator.
* rtti.c (throw_bad_typeid): Add comment. Do not return an
expression with reference type.
(get_tinfo_decl_dynamic): Do not return an expression with
reference type.
(build_typeid): Add comment. Do not return an expression with
reference type.
* typeck.c (build_class_member_access_expr): Improve handling of
conditionals and comma-expressions as objects.
2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
* cfns.gperf: ANSIfy function declarations.
* cfns.h: Regenerate.
* cp-tree.h: ANSIfy function declarations.
* parser.c: ANSIfy function declarations & definitions.
* decl.c (bad_specifiers): Fix parameter order error I introduced.
2003-01-09 Geoffrey Keating <geoffk@apple.com>
Merge from pch-branch:
2003-01-09 Geoffrey Keating <geoffk@apple.com>
Merge to tag pch-merge-20030102:
* semantics.c (finish_translation_unit): Don't call finish_file.
* parser.c: Don't include ggc.h.
(cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
read first token here. Don't allow PCH files after the first
token is read.
(cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
(cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
(cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
(cp_parser_late_parsing_for_member): Don't duplicate call to
cp_lexer_set_source_position_from_token.
(cp_parser_late_parsing_default_args): Likewise.
(yyparse): Call finish_file after clearing the_parser.
2002-12-11 Geoffrey Keating <geoffk@apple.com>
* Make-lang.in: Remove $(GGC_H) from all dependencies.
(CXX_TREE_H): Add $(GGC_H).
* class.c: Don't include ggc.h.
(field_decl_cmp): Make parameters be 'const void *' to match qsort.
(method_name_cmp): Likewise.
(resort_data): New variable.
(resort_field_decl_cmp): New.
(resort_method_name_cmp): New.
(resort_sorted_fields): New.
(resort_type_method_vec): New.
(finish_struct_methods): Delete cast.
(finish_struct_1): Delete cast.
* cp-tree.h: Include ggc.h.
(struct lang_type_class): Add reorder attribute to field `methods'.
(union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
(resort_sorted_fields): New prototype.
(resort_type_method_vec): New prototype.
* call.c: Don't include ggc.h.
* decl.c: Likewise.
* decl2.c: Likewise.
* init.c: Likewise.
* lex.c: Likewise.
* method.c: Likewise.
* optimize.c: Likewise.
* parse.y: Likewise.
* pt.c: Likewise.
* repo.c: Likewise.
* search.c: Likewise.
* semantics.c: Likewise.
* spew.c: Likewise.
* tree.c: Likewise.
* lang-specs.h: Remove comment.
2002-12-03 Geoffrey Keating <geoffk@apple.com>
* cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
(operator_name_info): Mark to be saved for PCH, specify size.
(assignment_operator_name_info): Likewise.
2002-11-19 Geoffrey Keating <geoffk@apple.com>
* decl.c (anon_cnt): Mark to be saved for PCH.
2002-10-25 Geoffrey Keating <geoffk@apple.com>
* lex.c (init_reswords): Delete now-untrue comment.
Allocate ridpointers using GGC.
2002-10-04 Geoffrey Keating <geoffk@apple.com>
* cp-tree.h (union lang_decl_u2): Add tags to all fields.
* g++spec.c (lang_specific_driver): Don't include standard
libraries in `added'.
2002-08-27 Geoffrey Keating <geoffk@redhat.com>
* decl2.c (finish_file): Call c_common_write_pch.
* Make-lang.in (CXX_C_OBJS): Add c-pch.o.
2002-08-17 Geoffrey Keating <geoffk@redhat.com>
* g++spec.c (lang_specific_driver): Treat .h files as C++ header
files when using g++.
* lang-specs.h: Handle compiling C++ header files.
2003-01-09 Jakub Jelinek <jakub@redhat.com>
* decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
2003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* pt.c (push_access_scope_real): Call push_to_top_level for
function in namespace scope.
(pop_access_scope): Call pop_from_top_level for function in
namespace scope.
2003-01-09 Jakub Jelinek <jakub@redhat.com>
* decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
* Make-lang.in (c++.install-common, c++.install-man,
c++.uninstall): Prepend $(DESTDIR) to destination paths in
all (un)installation commands.
(c++.install-common): Rewrite $(LN) commands to support
DESTDIR with "ln" as well as with "ln -s".
2003-01-08 Jason Merrill <jason@redhat.com>
* parser.c (cp_parser_primary_expression): See through explicitly
scoped ALIAS_DECLs, too.
2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
* decl.c: Remove some #if 0 code.
* decl.c: ANSIfy function declarations.
2003-01-07 Mark Mitchell <mark@codesourcery.com>
* parser.c (cp_parser_asm_definition): Correct handling of omitted
operands.
2003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9030
* decl.c (make_typename_type): Check access only when tf_error.
(make_unbound_class_template): Likewise.
* pt.c (saved_access_scope): New variable.
(push_access_scope_real): New function.
(push_access_scope): Likewise.
(pop_access_scope): Likewise.
(tsubst_default_argument): Use them.
(instantiate_template): Likewise.
(regenerate_decl_from_template): Likewise.
(instantiate_decl): Likewise.
(get_mostly_instantiated_function_type): Likewise.
2003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
* tree.c: Delete bogus #if 0 code.
2003-01-07 Andreas Schwab <schwab@suse.de>
* class.c (layout_class_type): Don't use
PCC_BITFIELD_TYPE_MATTERS if not defined.
2003-01-06 Mark Mitchell <mark@codesourcery.com>
PR c++/9165
* decl2.c (build_cleanup): Mark the object as used.
* pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
(hash_local_specialization): New function.
(register_local_specialization): Revert 2003-01-05 change.
(instantiate_decl): Use hash_local_specialization when creating
the local_specializations table.
* decl2.c (mark_used): Do not synthesize thunks.
* class.c (layout_class_type): Correct handling of unnamed
bitfields wider than their types.
PR c++/9189
* parser.c (cp_parser): Remove default_arg_types. Update
documentation for unparsed_functions_queues.
(cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
parameter.
(cp_parser_new): Don't set parser->default_arg_types.
(cp_parser_function_definition): Adjust usage of
unparsed_funtions_queues.
(cp_parser_class_specifier): Don't mess with
parser->default_arg_types. Handle default argument processing in
a separate phase from function body processing.
(cp_parser_template_declaration_after_export): Adjust usage of
unparsed_functions_queues.
(cp_parser_late_parsing_for_member): Do not handle default
arguments.
2003-01-06 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9109
* parser.c (cp_parser_declarator_kind): New enum.
(cp_parser_declarator): Adjust.
(cp_parser_direct_declarator): Adjust. Allow for either named or
abstract declarator. Prefer abstract, if possible. Allow
parenthesized function name.
(cp_parser_condition): Adjust cp_parser_declarator call.
(cp_parser_explicit_instantiation): Likewise.
(cp_parser_init_declarator): Likewise.
(cp_parser_type_id): Likewise.
(cp_parser_function_definition): Likewise.
(cp_parser_member_declaration): Likewise.
(cp_parser_parameter_declaration): Use cp_parser_declarator to do
the tentative parsing.
(cp_parser_exception_declaration): Likewise.
2003-01-05 Mark Mitchell <mark@codesourcery.com>
* parser.c (cp_parser_template_parameter): Adjust call to
cp_parser_parameter_declaration.
(cp_parser_parameter_declaration_list): Likewise.
(cp_parser_parameter_declaration): Replace
greater_than_is_operator_p with template_parm_p parameter. Do not
cache tokens for template default arguments.
* pt.c (retrieve_local_specialization): Use htab_find, not
htab_find_with_hash.
(register_local_specialization): Use htab_find_slot, not
htab_find_slot_with_hash.
(instantiate_decl): Pass a hash function to htab_create.
2003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* parser.c (cp_parser_binary_expression,
cp_parser_multiplicative_expression,
cp_parser_additive_expression, cp_parser_shift_expression,
cp_parser_relational_expression, cp_parser_equality_expression,
cp_parser_and_expression, cp_parser_exclusive_or_expression,
cp_parser_inclusive_or_expression,
cp_parser_logical_and_expression, cp_parser_logical_or_expression,
cp_parser_binary_expression): Const-ify.
2003-01-04 Mark Mitchell <mark@codesourcery.com>
* method.c (use_thunk): Disable access control while building the
body of the thunk.
2003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
* cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
front end.
2003-01-03 Matt Austern <austern@apple.com>
* cp-tree.h (struct lang_type_class): add field for key method
(cp_global_trees): rename dynamic_classes to keyed_classes
(key_method): add definition
* class.c (finish_struct_1): compute class's key method, and add
the class to keyed_classes list if there is no key method.
* decl.c (finish_function): add class to keyed_classes list if we
see a definition of the class's key method.
* pt.c (instantiate_class_template): add template specialization
of a dynamic class to keyed_classes list.
* decl2.c (key_method): remove
(finish_file): iterate only through keyed_classes list when
deciding whether to emit vtables, remove class from its list after
we do the emission.
2003-01-02 Jason Merrill <jason@redhat.com>
* call.c (build_conditional_expr): Stabilize lvalues properly.
* cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
* tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
Don't allow CALL_EXPR or VA_ARG_EXPR, either.
* call.c (convert_like_real): Call decl_constant_value for an
IDENTITY_CONV even if there are no more conversions.
* cvt.c (build_up_reference): Don't push unnamed temps.
* decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
* dump.c (cp_dump_tree): Don't try to dump class-specific fields
for a backend struct.
* except.c (wrap_cleanups_r, build_throw): Make
MUST_NOT_THROW_EXPRs void.
* init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
* init.c (build_vec_delete_1): Pre-evaluate the base address.
* init.c (get_temp_regvar): Simplify logic.
* tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
our replacement is a decl.
* decl.c (cp_make_fname_decl): Push the decls inside the
outermost scope.
2003-01-03 Nathan Sidwell <nathan@codesourcery.com>
PR c++/45, c++/3784
* tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
the same too.
2003-01-03 Graham Stott <graham.stott@btinternet.com>
* parser.c (struct cp_parser): Add access_checks_lists field
(cp_parser_simple_declaration): Use.
(cp_parser_init_declarator): Likewise.
2003-01-02 Mark Mitchell <mark@codesourcery.com>
* parser.c (cp_parser_declaration): Accept the __extension__
keyword before the declaration.
PR c++/2843
* parser.c (cp_parser_parameter_declaration): Allow attributes to
appear after the declarator.
* call.c (build_new_method_call): Fix typo in message format
string.
2003-01-02 Mark Mitchell <mark@codesourcery.com>
* parser.c (cp_lexer_next_token_is): Declare it inline.
(cp_lexer_set_source_position_from_token): Likewise.
(cp_lexer_debugging_p): Likewise.
(cp_parser_parsing_tentatively): Likewise.
(cp_parser_nested_name_specifier_opt): Reduce the number of calls
to the cp_lexer_peek_token.
* parser.c (cp_parser_sizeof_operand): Do not evaluate the
expression.
2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
* cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
cp/repo.c: Fix copyright years.
2003-01-01 Neil Booth <neil@daikokuya.co.uk>
* lex.c: Remove superfluous include of cpplib.h.
(CONSTRAINT): Define without conditions.
(init_cp_pragma): Use c_register_pragma.
|