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
|
2016-09-01 Marek Polacek <polacek@redhat.com>
PR c/7652
* c-typeck.c (composite_type): Add FALLTHRU comment.
2016-08-31 David Malcolm <dmalcolm@redhat.com>
* c-parser.c (c_parser_declaration_or_fndef): Add trailing space
to the insertion fixits for "struct", "union", and "enum".
2016-08-30 David Malcolm <dmalcolm@redhat.com>
* c-decl.c (implicit_decl_warning): Use add_fixit_replace
rather than add_fixit_misspelled_id.
(undeclared_variable): Likewise.
* c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
now-redundant "here" params from add_fixit_insert method calls.
(c_parser_parameter_declaration): Likewise.
* c-typeck.c (build_component_ref): Remove now-redundant range
param from add_fixit_replace method calls.
2016-08-25 Marek Polacek <polacek@redhat.com>
* c-typeck.c (parser_build_binary_op): Pass LHS to
warn_logical_not_parentheses.
2016-08-25 Marek Polacek <polacek@redhat.com>
PR c/77323
* c-decl.c (declspecs_add_type): Set typespec_word even when __intN
or _FloatN or _FloatNx is not supported.
(finish_declspecs): Set type to integer_type_node when _FloatN or
_FloatNx is not supported.
2016-08-19 Joseph Myers <joseph@codesourcery.com>
PR c/32187
* c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
(struct c_declspecs): Add field floatn_nx_idx.
* c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
and _FloatNx type specifiers.
* c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
(c_parser_declspecs, c_parser_attribute_any_word)
(c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
* c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
(convert_arguments): Avoid promoting _FloatN and _FloatNx types
narrower than double.
2016-08-12 Jakub Jelinek <jakub@redhat.com>
Martin Liska <mliska@suse.cz>
PR c/67410
* c-typeck.c (set_nonincremental_init_from_string): Use / instead of
% to determine val element to change. Assert that
wchar_bytes * charwidth fits into val array.
2016-08-12 Marek Polacek <polacek@redhat.com>
PR c/7652
* c-parser.c (c_parser_external_declaration): Add FALLTHRU.
(c_parser_postfix_expression): Likewise.
* c-typeck.c (build_unary_op): Adjust fall through comment.
(c_mark_addressable): Likewise.
2016-08-11 Jakub Jelinek <jakub@redhat.com>
PR c/72816
* c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
array member through typedef, for orig_qual_indirect == 0 clear
orig_qual_type.
2016-08-08 David Malcolm <dmalcolm@redhat.com>
PR c/64955
* c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
this up to selftest::run_c_tests.
(selftest::run_c_tests): New function.
2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
* c-parser.c (struct oacc_routine_data): Add error_seen and
fndecl_seen members.
(c_finish_oacc_routine): Use these.
(c_parser_declaration_or_fndef): Adjust.
(c_parser_oacc_routine): Likewise. Support more C language
constructs, and improve diagnostics. Move pragma context
checking...
(c_parser_pragma): ... here.
* c-parser.c (struct oacc_routine_data): New.
(c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
Simplify code.
(c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
declare target" attribute.
2016-08-01 Jan Beulich <jbeulich@suse.com>
* c-fold.c (c_fully_fold_internal): Also emit shift count
warnings for vector types.
* c-typeck.c (build_binary_op): Likewise.
2016-07-29 Marek Polacek <polacek@redhat.com>
PR c/71742
* c-decl.c (finish_struct): Rephrase an error message.
PR c/71853
* c-parser.c (c_parser_switch_statement): Initialize ce.original_type
to error node for invalid code.
PR c/71573
* c-decl.c (implicitly_declare): Return decl early not only for
error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2016-07-29 Jakub Jelinek <jakub@redhat.com>
PR c/71969
* c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
on GNU extern inline functions.
2016-07-29 Marek Polacek <polacek@redhat.com>
PR c/71583
* c-parser.c (c_parser_postfix_expression_after_paren_type): Also
check expr.value.
2016-07-22 Uros Bizjak <ubizjak@gmail.com>
* c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2016-07-20 David Malcolm <dmalcolm@redhat.com>
* c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
spellcheck-tree.h
(best_macro_match): Likewise, converting from a typedef to a
subclass.
(find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
(lookup_name_fuzzy): Update for change of best_macro_match to a
subclass with a ctor that calls cpp_forall_identifiers.
2016-07-20 David Malcolm <dmalcolm@redhat.com>
* c-decl.c (implicit_decl_warning): Update for conversion of
return type of lookup_name_fuzzy to const char *.
(undeclared_variable): Likewise.
(lookup_name_fuzzy): Convert return type from tree to
const char *.
* c-parser.c (c_parser_declaration_or_fndef): Update for
conversion of return type of lookup_name_fuzzy to const char *.
(c_parser_parameter_declaration): Likewise.
2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
* c-parser.c (c_parser_oacc_declare): Don't scan for
GOMP_MAP_POINTER.
* c-typeck.c (handle_omp_array_sections): Mark data clauses with
GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
zero-length subarrays.
2016-07-15 Jakub Jelinek <jakub@redhat.com>
PR c/71858
* c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
instead of FUZZY_LOOKUP_NAME.
(lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2016-07-14 Jakub Jelinek <jakub@redhat.com>
PR c/71858
* c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* c-parser.c (c_parser_generic_selection): Make type of variable
auto_vec.
(c_parser_omp_declare_simd): Likewise.
2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* c-decl.c (struct c_struct_parse_info): Change member types
from vec to auto_vec.
(start_struct): Adjust.
(finish_struct): Likewise.
2016-07-02 Jakub Jelinek <jakub@redhat.com>
PR c/71719
* c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
* c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
Move pragma context checking into...
(c_parser_omp_cancellation_point): ... here, and improve
diagnostic messages.
* c-typeck.c (c_finish_omp_cancel)
(c_finish_omp_cancellation_point): Improve diagnostic messages.
2016-06-29 Jakub Jelinek <jakub@redhat.com>
PR c/71685
* c-typeck.c (c_build_qualified_type): Don't clear
C_TYPE_INCOMPLETE_VARS for the main variant.
2016-06-28 Martin Sebor <msebor@redhat.com>
PR c/71552
* c-typeck.c (output_init_element): Diagnose incompatible types
before non-constant initializers.
2016-06-28 Jakub Jelinek <jakub@redhat.com>
* Make-lang.in: Don't cat ../stage_current if it does not exist.
2016-06-23 Andi Kleen <ak@linux.intel.com>
* Make-lang.in: Add support for autofdo.
2016-06-22 David Malcolm <dmalcolm@redhat.com>
PR c/70339
* c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
(implicit_decl_warning): When issuing warnings for implicit
declarations, attempt to provide a suggestion via
lookup_name_fuzzy.
(undeclared_variable): Likewise when issuing errors.
(lookup_name_in_scope): Likewise.
(struct edit_distance_traits<cpp_hashnode *>): New struct.
(best_macro_match): New typedef.
(find_closest_macro_cpp_cb): New function.
(lookup_name_fuzzy): New function.
* c-parser.c: Include gcc-rich-location.h.
(c_token_starts_typename): Split out case CPP_KEYWORD into...
(c_keyword_starts_typename): ...this new function.
(c_parser_declaration_or_fndef): When issuing errors about
missing "struct" etc, add a fixit. For other kinds of errors,
attempt to provide a suggestion via lookup_name_fuzzy.
(c_parser_parms_declarator): When looking ahead to detect typos in
type names, also reject CPP_KEYWORD.
(c_parser_parameter_declaration): When issuing errors about
unknown type names, attempt to provide a suggestion via
lookup_name_fuzzy.
* c-tree.h (c_keyword_starts_typename): New prototype.
2016-06-20 Joseph Myers <joseph@codesourcery.com>
PR c/71601
* c-typeck.c (build_conditional_expr): Return error_mark_node if
c_common_type returns error_mark_node.
2016-06-19 Martin Sebor <msebor@redhat.com>
PR c/69507
* c-parser.c (c_parser_alignof_expression): Avoid diagnosing
__alignof__ (expression).
2016-06-14 David Malcolm <dmalcolm@redhat.com>
* c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2016-06-14 David Malcolm <dmalcolm@redhat.com>
* c-typeck.c (build_component_ref): Simplify fixit code by
using gcc_rich_location::add_fixit_misspelled_id.
(set_init_label): Likewise.
2016-06-13 David Malcolm <dmalcolm@redhat.com>
* c-parser.c (c_parser_initelt): Provide location of name for new
location_t param of set_init_label.
* c-tree.h (set_init_label): Add location_t param.
* c-typeck.c (set_init_index): Add "fieldname_loc" location_t
param and use it when issuing error messages about unrecognized
field names. Attempt to provide a fixit hint if appropriate,
otherwise update the error message to provide the type name.
2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
PR c/71381
* c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
Loosen checking.
2016-06-08 Martin Sebor <msebor@redhat.com>
Jakub Jelinek <jakub@redhat.com>
PR c++/70507
PR c/68120
* c-typeck.c (convert_arguments): Don't promote last argument
of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2016-06-08 Marek Polacek <polacek@redhat.com>
PR c/71418
* c-decl.c (grokdeclarator): Check TYPE_P.
PR c/71426
* c-decl.c (get_parm_info): Don't crash on an assert on invalid
code.
2016-06-07 David Malcolm <dmalcolm@redhat.com>
* c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
and structure element reference, capture the location of the
element name token and pass it to build_component_ref.
(c_parser_postfix_expression_after_primary): Likewise for
structure element dereference.
(c_parser_omp_variable_list): Likewise for
OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
* c-tree.h (build_component_ref): Add location_t param.
* c-typeck.c (build_component_ref): Add location_t param
COMPONENT_LOC. Use it, if available, when issuing hints about
mispelled member names to provide a fixit replacement hint.
2016-06-06 Marek Polacek <polacek@redhat.com>
PR c/71362
* c-parser.c (c_parser_direct_declarator): Set location.
2016-06-06 Marek Polacek <polacek@redhat.com>
* c-typeck.c (comptypes_internal): Handle comparisons of
INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
TYPE_REF_CAN_ALIAS_ALL.
2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
* c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
arguments as addressable when async clause exists.
2016-05-30 Jakub Jelinek <jakub@redhat.com>
PR c++/71349
* c-parser.c (c_parser_omp_for): Don't disallow nowait clause
when combined with target construct.
2016-05-26 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_omp_clause_schedule): Warn if
OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2016-05-25 Marek Polacek <polacek@redhat.com>
PR c/71265
* c-decl.c (c_make_fname_decl): Don't check seen_error.
PR c/71266
* c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
* c-parser.c (c_parser_oacc_declare): Add support for
GOMP_MAP_FIRSTPRIVATE_POINTER.
* c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
argument with enum c_omp_region_type ort.
(handle_omp_array_sections): Likewise. Update call to
handle_omp_array_sections_1.
(c_finish_omp_clauses): Add specific errors and warning messages for
OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
call to handle_omp_array_sections.
2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
* c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2016-05-24 Richard Biener <rguenther@suse.de>
PR middle-end/70434
PR c/69504
* c-typeck.c (build_array_ref): Do not complain about indexing
non-lvalue vectors. Adjust for function name change.
2016-05-20 Martin Sebor <msebor@redhat.com>
PR c/71115
* c-typeck.c (error_init): Use
expansion_point_location_if_in_system_header.
(warning_init): Same.
2016-05-19 David Malcolm <dmalcolm@redhat.com>
PR c/71171
* c-parser.c (c_parser_generic_selection): Use c_expr::set_error
in error-handling.
(c_parser_postfix_expression): Likewise.
* c-tree.h (c_expr::set_error): New method.
* c-typeck.c (parser_build_binary_op): In error-handling, ensure
that result's range is initialized.
2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
* c-typeck.c (parser_build_unary_op): Fix formatting.
2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
* c-decl.c (grokdeclarator): Remove errmsg and use of
targetm.invalid_return_type.
(grokparms): Remove errmsg and use of
targetm.invalid_parameter_type.
2016-05-13 Joseph Myers <joseph@codesourcery.com>
* c-decl.c (grokdeclarator): For C11, discard qualifiers on
function return type.
2016-05-12 Marek Polacek <polacek@redhat.com>
PR c/70756
* c-decl.c (build_compound_literal): Pass LOC down to
c_incomplete_type_error.
* c-tree.h (require_complete_type): Adjust declaration.
(c_incomplete_type_error): Likewise.
* c-typeck.c (require_complete_type): Add location parameter, pass it
down to c_incomplete_type_error.
(c_incomplete_type_error): Add location parameter, pass it down to
error_at.
(build_component_ref): Pass location down to c_incomplete_type_error.
(default_conversion): Pass location down to require_complete_type.
(build_array_ref): Likewise.
(build_function_call_vec): Likewise.
(convert_arguments): Likewise.
(build_unary_op): Likewise.
(build_c_cast): Likewise.
(build_modify_expr): Likewise.
(convert_for_assignment): Likewise.
(c_finish_omp_clauses): Likewise.
2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
PR c/43651
* c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
is enabled.
* c-errors.c (pedwarn_c90): Return true if warned.
* c-tree.h (pedwarn_c90): Change return type to bool.
(enum c_declspec_word): Add new enumerator cdw_atomic.
2016-05-11 Marek Polacek <polacek@redhat.com>
PR c++/71024
* c-decl.c (diagnose_mismatched_decls): Factor out code to
diagnose_mismatched_attributes and call it.
2016-05-10 Marek Polacek <polacek@redhat.com>
PR c/70255
* c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
on a declaration following the definition.
2016-05-05 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_switch_statement): Add IF_P argument,
parse it through to c_parser_c99_block_statement.
(c_parser_statement_after_labels): Adjust c_parser_switch_statement
caller.
2016-05-04 Marek Polacek <polacek@redhat.com>
* c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
OPT_Wdangling_else.
2016-05-04 Marek Polacek <polacek@redhat.com>
PR c/48778
* c-typeck.c (build_binary_op): Don't issue -Waddress warnings
for macro expansions.
2016-05-03 Marek Polacek <polacek@redhat.com>
PR c/70859
* c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
check_builtin_function_arguments.
2016-05-03 Richard Biener <rguenther@suse.de>
* Make-lang.in (cc1-checksum.c): For stage-final re-use
the checksum from the previous stage.
2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
* c-parser.c (c_parser_oacc_all_clauses): Update call to
c_finish_omp_clauses.
(c_parser_omp_all_clauses): Likewise.
(c_parser_oacc_cache): Likewise.
(c_parser_oacc_loop): Likewise.
(omp_split_clauses): Likewise.
(c_parser_omp_declare_target): Likewise.
(c_parser_cilk_all_clauses): Likewise.
(c_parser_cilk_for): Likewise.
* c-typeck.c (c_finish_omp_clauses): Replace bool arguments
is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2016-05-02 Marek Polacek <polacek@redhat.com>
PR c/70851
* c-decl.c (grokdeclarator): Diagnose when array's size has an
incomplete type.
2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
PR middle-end/70626
* c-parser.c (c_parser_oacc_loop): Don't augment mask with
OACC_LOOP_CLAUSE_MASK.
(c_parser_oacc_kernels_parallel): Update call to
c_oacc_split_loop_clauses.
2016-04-28 Andrew MacLeod <amacleod@redhat.com>
* c-array-notation.c (fix_builtin_array_notation_fn): Fix final
argument to build_modify_expr in two cases.
2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
* c-parser.c (c_parser_postfix_expression_after_primary): Call
warn_for_memset instead of warning directly here.
2016-04-26 Marek Polacek <polacek@redhat.com>
PR c/67784
* c-parser.c (c_parser_maybe_reclassify_token): New function factored
out of ...
(c_parser_for_statement): ... here.
(c_parser_if_statement): Use it.
(c_parser_switch_statement): Use it.
(c_parser_while_statement): Use it.
PR c/70791
* c-decl.c (pushdecl): Pass LOCUS down to warning.
2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
PR c++/69363
* c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
instead of c_finish_cilk_clauses.
* c-tree.h (c_finish_omp_clauses): Add new default argument.
* c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
floating-point variables in the linear clause for Cilk Plus.
2016-04-18 Michael Matz <matz@suse.de>
* c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
(grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2016-04-15 Marek Polacek <polacek@redhat.com>
PR c/70671
* c-typeck.c (build_unary_op): Pass location down to error and
warning call.
2016-04-15 Jakub Jelinek <jakub@redhat.com>
PR c/70436
* c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
where needed.
(c_parser_external_declaration, c_parser_struct_or_union_specifier,
c_parser_parameter_declaration, c_parser_compound_statement_nostart,
c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
Adjust c_parser_pragma callers.
(c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
caller.
(c_parser_omp_structured_block): Add IF_P argument, pass it down to
c_parser_statement.
(c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
c_parser_oacc_kernels_parallel, c_parser_omp_critical,
c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
down where needed.
(c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
(c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
calls.
2016-04-13 Marek Polacek <polacek@redhat.com>
PR c/70436
* c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
adjust callers.
(c_parser_statement): Likewise.
(c_parser_c99_block_statement): Likewise.
(c_parser_while_statement): Likewise.
(c_parser_for_statement): Likewise.
(c_parser_if_body): Don't set IF_P here.
(c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
about dangling else here.
* c-tree.h (c_finish_if_stmt): Adjust declaration.
* c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
warn about dangling else here.
2016-04-04 Marek Polacek <polacek@redhat.com>
PR c/70307
* c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2016-03-31 Marek Polacek <polacek@redhat.com>
PR c/70297
* c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2016-03-18 David Malcolm <dmalcolm@redhat.com>
PR c/70281
* c-parser.c (c_parser_postfix_expression): Set the source range
for uses of "__builtin_types_compatible_p".
2016-03-17 Jakub Jelinek <jakub@redhat.com>
PR c/70280
* c-typeck.c (composite_type): Don't count void_list_node
into len, if the list is terminated by void_list_node, start
with void_list_node instead of NULL for newargs. Stop
at void_list_node.
2016-03-16 Marek Polacek <polacek@redhat.com>
PR c/70093
* c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
nested functions returning VM types.
2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
* c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
when calling c_finish_omp_clauses.
2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
PR c/69824
* c-decl.c (get_parm_info): Don't queue implicit function declarations
for later.
2016-03-04 Marek Polacek <polacek@redhat.com>
PR c/69798
* c-parser.c (c_parser_postfix_expression): Call
c_parser_cast_expression rather than c_parser_postfix_expression.
2016-03-01 Jakub Jelinek <jakub@redhat.com>
PR c/69796
PR c/69974
* c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
of incomplete decls to error_mark_node.
2016-02-24 Marek Polacek <polacek@redhat.com>
PR c/69819
* c-decl.c (finish_decl): Don't update the copy of the type of a
different decl type.
2016-02-23 Jakub Jelinek <jakub@redhat.com>
PR objc/69844
* c-parser.c (c_parser_for_statement): Properly handle ObjC classes
in id_kind reclassification.
2016-02-16 Jakub Jelinek <jakub@redhat.com>
PR c/69835
* c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2016-02-16 James Norris <jnorris@codesourcery.com>
PR c/64748
* c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
* c-decl.c (build_null_declspecs): Zero the entire struct.
PR c/69522
* c-parser.c (c_parser_braced_init): New arg outer_obstack. All
callers changed. If nested_p is true, use it to call
finish_implicit_inits.
* c-tree.h (finish_implicit_inits): Declare.
* c-typeck.c (finish_implicit_inits): New function. Move code
from ...
(push_init_level): ... here.
(set_designator, process_init_element): Call finish_implicit_inits.
2016-02-11 Jakub Jelinek <jakub@redhat.com>
PR c/69768
* c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
arguments for -Waddress warning.
2016-02-04 Jakub Jelinek <jakub@redhat.com>
PR c/69669
* c-decl.c (finish_enum): When honoring mode attribute,
make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2016-01-29 Jakub Jelinek <jakub@redhat.com>
PR debug/69518
* c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
all type variants, not just TYPE_MAIN_VARIANT.
2016-01-27 Jakub Jelinek <jakub@redhat.com>
PR debug/66869
* c-decl.c (c_write_global_declarations_1): Warn with
warn_unused_function if static prototype without definition
is not C_DECL_USED.
2016-01-27 Marek Polacek <polacek@redhat.com>
PR c/68062
* c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
to unsigned, if needed. Add -Wsign-compare warning.
2016-01-26 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/69483
* c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
PR c/24293
* c-tree.h (incomplete_record_decls): Declare.
* c-parser.c (incomplete_record_decls): Define.
(c_parser_translation_unit): Iterate through incomplete_record_decls and
report error if any decl has zero size.
* c-decl.c (finish_decl): Append static decl with incomplete struct/union
or enum type to incomplete_record_decls.
2016-01-14 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/68773
* c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
set force_output.
2016-01-14 Marek Polacek <polacek@redhat.com>
PR c/69262
* c-decl.c (grokdeclarator): Provide more information for invalid
array declarations.
2016-01-06 David Malcolm <dmalcolm@redhat.com>
* c-parser.c (c_parser_unary_expression): For dereferences, build
a combined location before calling build_indirect_ref, so that
error reports cover the full range, manually updating the c_expr
src_range.
2016-01-06 Marek Polacek <polacek@redhat.com>
PR sanitizer/69099
* c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
NULL.
2016-01-04 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
2016-01-04 Marek Polacek <polacek@redhat.com>
PR c/68908
* c-typeck.c (build_atomic_assign): Improve commentary. Add
optimization to use __atomic_fetch_* built-in if possible.
2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
* c-parser.c (c_parser_oacc_clause_use_device): Merge function
into...
(c_parser_omp_clause_use_device_ptr): ... this function. Adjust
all users.
2015-12-22 Marek Polacek <polacek@redhat.com>
PR c/69002
* c-typeck.c (build_component_ref): Warn when acessing elements of
atomic structures or unions.
2015-12-21 David Malcolm <dmalcolm@redhat.com>
* c-typeck.c: Include "gcc-rich-location.h".
(build_binary_op): In the two places that call binary_op_error,
create a gcc_rich_location and populate it with the location of
the binary op and its two operands.
2015-12-16 David Malcolm <dmalcolm@redhat.com>
* c-parser.c (c_parser_statement_after_labels): When calling
c_finish_return, Use the return expression's location if it has
one, falling back to the location of the first token within it.
* c-typeck.c (c_finish_return): When issuing warnings about
the incorrect presence/absence of a return value, issue a note
showing the declaration of the function.
2015-12-16 David Malcolm <dmalcolm@redhat.com>
* c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
to 4.
(c_parser_peek_nth_token): New function.
(c_parser_peek_conflict_marker): New function.
(c_parser_error): Detect conflict markers and report them as such.
2015-12-16 David Malcolm <dmalcolm@redhat.com>
* c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
to preserve range information for the primary expression
in the call to c_parser_postfix_expression_after_primary.
2015-12-16 David Malcolm <dmalcolm@redhat.com>
* c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
expression location, falling back on the first token location,
rather than always using the latter.
2015-12-16 Marek Polacek <polacek@redhat.com>
PR c/64637
* c-typeck.c (c_process_expr_stmt): Use location of the expression if
available.
2015-12-15 Marek Polacek <polacek@redhat.com>
PR c/68907
* c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
artificial decl.
2015-12-08 David Malcolm <dmalcolm@redhat.com>
* c-parser.c (c_parser_alignof_expression): Capture location of
closing parenthesis (if any), or of end of unary expression, and
use it to build a src_range for the expression.
2015-12-08 David Malcolm <dmalcolm@redhat.com>
PR c/68757
* c-parser.c (c_parser_get_builtin_args): Add
"out_close_paren_loc" param, and write back to it.
(c_parser_postfix_expression): Capture the closing
parenthesis location for RID_CHOOSE_EXPR,
RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
RID_BUILTIN_SHUFFLE and use it to set the source range
for such expressions; within RID_BUILTIN_COMPLEX set
the underlying location.
2015-12-07 Marek Polacek <polacek@redhat.com>
PR c/68668
* c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
* c-tree.h (c_build_va_arg): Adjust prototype.
* c-parser.c (c_parser_postfix_expression): Adjust call to above.
* c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
parameter, adjust throughout and issue an error if EXPR is a component
with reverse storage order.
2015-12-02 Jason Merrill <jason@redhat.com>
* c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
(c_fully_fold_internal, decl_constant_value_for_optimization):
Move from c-common.c.
* c-tree.h: Declare decl_constant_value_for_optimization.
* Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2015-12-02 Joseph Myers <joseph@codesourcery.com>
PR c/68162
* c-decl.c (grokdeclarator): Set first_non_attr_kind before
following link from declarator to next declarator. Track original
qualified type and pass it to c_build_qualified_type.
* c-typeck.c (c_build_qualified_type): Add arguments
orig_qual_type and orig_qual_indirect.
2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
* c-parser.c (c_parser_omp_clause_name)
(c_parser_oacc_all_clauses): Alphabetical sorting.
2015-12-02 Jakub Jelinek <jakub@redhat.com>
PR c/68533
* c-decl.c (get_parm_info): Use b->locus instead of input_location
for diagnostics.
2015-12-01 Julian Brown <julian@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
James Norris <James_Norris@mentor.com>
* c-parser.c (c_parser_omp_clause_name): Add use_device support.
(c_parser_oacc_clause_use_device): New function.
(c_parser_oacc_all_clauses): Add use_device support.
(OACC_HOST_DATA_CLAUSE_MASK): New macro.
(c_parser_oacc_host_data): New function.
(c_parser_omp_construct): Add host_data support.
* c-tree.h (c_finish_oacc_host_data): Add prototype.
* c-typeck.c (c_finish_oacc_host_data): New function.
(c_finish_omp_clauses): Add use_device support.
2015-11-29 Jan Hubicka <hubicka@ucw.cz>
PR c/67106
* c-decl.c: Set TYPE_PACKED in variants.
2015-11-27 Martin Liska <mliska@suse.cz>
PR c++/68312
* c-array-notation.c (fix_builtin_array_notation_fn):
Use release_vec_vec instead of vec::release.
(build_array_notation_expr): Likewise.
(fix_conditional_array_notations_1): Likewise.
(fix_array_notation_expr): Likewise.
(fix_array_notation_call_expr): Likewise.
2015-11-27 Jakub Jelinek <jakub@redhat.com>
PR c/63326
* c-parser.c (c_parser_compound_statement_nostart): If
last_label is true, use pragma_stmt instead of pragma_compound
as second c_parser_pragma argument.
(c_parser_omp_ordered, c_parser_omp_target_update,
c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
false as second argument to c_parser_skip_to_pragma_eol after
diagnosing standalone directives used in pragma_stmt context.
2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
* c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
with "if (ENABLE_OFFLOADING)".
2015-11-23 David Malcolm <dmalcolm@redhat.com>
PR objc/68438
* c-parser.c (c_parser_postfix_expression): Set up source ranges
for various Objective-C constructs: Class.name syntax,
@selector(), @protocol(), @encode(), and [] message syntax.
2015-11-20 David Malcolm <dmalcolm@redhat.com>
PR 62314
* c-typeck.c (should_suggest_deref_p): New function.
(build_component_ref): Special-case POINTER_TYPE when
generating a "not a structure of union" error message, and
suggest a "->" rather than a ".", providing a fix-it hint.
2015-11-19 David Malcolm <dmalcolm@redhat.com>
* c-typeck.c (lookup_field_fuzzy): Move determination of closest
candidate into a new function, find_closest_identifier.
2015-11-19 Marek Polacek <polacek@redhat.com>
PR c/68412
* c-typeck.c (parser_build_binary_op): Properly handle
C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2015-11-17 David Malcolm <dmalcolm@redhat.com>
* c-parser.c (set_c_expr_source_range): Bulletproof both
overloaded implementations against NULL expr->value.
(c_parser_braced_init): Set src_range for "ret" to a sane pair of
values.
(c_parser_unary_expression): Likewise when handling addresses of
labels.
(c_parser_postfix_expression): Likewise for statement expressions,
for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
__builtin_va_arg, and for __builtin_offset_of.
(c_parser_postfix_expression_after_paren_type): Initialize expr's
src_range using the range of the braced initializer.
(c_parser_transaction_expression): Set src_range for "ret" to a
sane pair of values.
2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
* c-parser.c (c_finish_omp_declare_simd): Look for
"simd" attribute as well. Update error message.
2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* c-parser.c (c_parser_omp_declare_target): Adjust.
2015-11-14 Jakub Jelinek <jakub@redhat.com>
* c-typeck.c (c_finish_omp_clauses): Don't mark
GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2015-11-14 Marek Polacek <polacek@redhat.com>
* c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
* c-typeck.c: Likewise.
2015-11-13 David Malcolm <dmalcolm@redhat.com>
* c-decl.c (warn_defaults_to): Pass line_table to
rich_location ctor.
* c-errors.c (pedwarn_c99): Likewise.
(pedwarn_c90): Likewise.
* c-parser.c (set_c_expr_source_range): New functions.
(c_token::get_range): New method.
(c_token::get_finish): New method.
(c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
based on the range from the start of the LHS to the end of the
RHS.
(c_parser_conditional_expression): Likewise, based on the range
from the start of the cond.value to the end of exp2.value.
(c_parser_binary_expression): Call set_c_expr_source_range on
the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
(c_parser_cast_expression): Call set_c_expr_source_range on ret
based on the cast_loc through to the end of the expr.
(c_parser_unary_expression): Likewise, based on the
op_loc through to the end of op.
(c_parser_sizeof_expression) Likewise, based on the start of the
sizeof token through to either the closing paren or the end of
expr.
(c_parser_postfix_expression): Likewise, using the token range,
or from the open paren through to the close paren for
parenthesized expressions.
(c_parser_postfix_expression_after_primary): Likewise, for
various kinds of expression.
* c-tree.h (struct c_expr): Add field "src_range".
(c_expr::get_start): New method.
(c_expr::get_finish): New method.
(set_c_expr_source_range): New decls.
* c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
on ret for prefix unary ops.
(parser_build_binary_op): Likewise, running from the start of
arg1.value through to the end of arg2.value.
2015-11-13 Marek Polacek <polacek@redhat.com>
PR c/68320
* c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2015-11-13 David Malcolm <dmalcolm@redhat.com>
* c-typeck.c: Include spellcheck.h.
(lookup_field_fuzzy_find_candidates): New function.
(lookup_field_fuzzy): New function.
(build_component_ref): If the field was not found, try using
lookup_field_fuzzy and potentially offer a suggestion.
2015-11-12 James Norris <jnorris@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
* c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
(c_parser_omp_clause_name): Handle 'device_resident' clause.
(c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
and PRAGMA_OMP_CLAUSE_LINK.
(c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
and PRAGMA_OACC_CLAUSE_LINK.
(OACC_DECLARE_CLAUSE_MASK): New definition.
(c_parser_oacc_declare): New function.
2015-11-12 Marek Polacek <polacek@redhat.com>
PR c/67784
* c-parser.c (c_parser_for_statement): Reclassify the token in
a correct scope.
2015-11-11 Marek Polacek <polacek@redhat.com>
PR c/68107
PR c++/68266
* c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
checking the size of an array.
2015-11-11 Andrew MacLeod <amacleod@redhat.com>
* c-array-notation.c: Remove unused header files.
* c-aux-info.c: Likewise.
* c-convert.c: Likewise.
* c-decl.c: Likewise.
* c-errors.c: Likewise.
* c-lang.c: Likewise.
* c-objc-common.c: Likewise.
* c-parser.c: Likewise.
* c-typeck.c: Likewise.
* gccspec.c: Likewise.
2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
James Norris <jnorris@codesourcery.com>
Julian Brown <julian@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com>
c/
* c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
routine arg.
(c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
(c_parser_pragma): Parse 'acc routine'.
(OACC_ROUTINE_CLAUSE_MARK): Define.
(c_parser_oacc_routine, (c_finish_oacc_routine): New.
2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
PR debug/67192
* c-typeck.c (c_finish_loop): For unconditional loops, set the
location of the backward-goto to the start of the loop body.
2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
PR debug/67192
* c-parser.c (c_parser_while_statement): Finish the loop before
parsing ahead for misleading indentation.
(c_parser_for_statement): Likewise.
2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
* c-decl.c (finish_struct): If the structure has reverse storage
order, rewrite the type of array fields with scalar component. Call
maybe_apply_pragma_scalar_storage_order on entry.
* c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
errors on bit-fields and reverse SSO here and not...
(c_mark_addressable): ...here.
(output_init_element): Adjust call to initializer_constant_valid_p.
(c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2015-11-06 David Malcolm <dmalcolm@redhat.com>
* c-decl.c (warn_defaults_to): Update for change in signature
of diagnostic_set_info.
* c-errors.c (pedwarn_c99): Likewise.
(pedwarn_c90): Likewise.
* c-objc-common.c (c_tree_printer): Update for new "caret_p" param
for textinfo::set_location.
2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
Thomas Schwinge <thomas@codesourcery.com>
James Norris <jnorris@codesourcery.com>
* c-parser.c (c_parser_omp_clause_name): Add support for
PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
(c_parser_omp_clause_default): Add is_oacc argument. Handle
default(none) in OpenACC.
(c_parser_oacc_shape_clause): Allow pointer variables as gang static
arguments.
(c_parser_oacc_clause_tile): New function.
(c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
(OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
TILE}.
(OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
(OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
FIRSTPRIVATE}.
(c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
(c_parser_oacc_update): Update the error message for missing clauses.
* c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
and OMP_CLAUSE_INDEPENDENT.
2015-11-05 Marek Polacek <polacek@redhat.com>
PR c/68090
* c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
deal with pre-evaluation on invalid types.
2015-11-05 Jakub Jelinek <jakub@redhat.com>
Ilya Verbin <ilya.verbin@intel.com>
* c-parser.c: Include context.h and gimple-expr.h.
(c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
monotonic together with nonmonotonic.
(c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
(OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
(c_parser_omp_target_data, c_parser_omp_target_enter_data,
c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
(c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
expressions on combined target teams before the target.
(c_parser_omp_declare_target): If decl has "omp declare target" or
"omp declare target link" attribute, and cgraph or varpool node already
exists, then set corresponding flags. Call c_finish_omp_clauses
in the parenthesized extended-list syntax case.
* c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
declare target.
* c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
on OMP_CLAUSE_REDUCTION array sections.
(handle_omp_array_sections): Encode low-bound into the MEM_REF, either
into the constant offset, or for variable low-bound using
POINTER_PLUS_EXPR. For structure element based array sections use
GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
(c_finish_omp_clauses): Drop generic_field_head, structure
elements are now always mapped even as array section bases,
diagnose same var in data sharing and mapping clauses. Diagnose if
linear step on declare simd is neither a constant nor a uniform
parameter. Look through POINTER_PLUS_EXPR for array section
reductions. Diagnose the same var or function appearing multiple
times on the same directive. Fix up wording for the to clause if t
is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
modifier on kinds other than dynamic or guided or nonmonotonic
modifier together with ordered clause.
2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
Chung-Lin Tang <cltang@codesourcery.com>
* c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2015-10-29 Andrew MacLeod <amacleod@redhat.com>
* c-array-notation.c: Reorder #include's and remove duplicates.
* c-aux-info.c: Likewise.
* c-convert.c: Likewise.
* c-decl.c: Likewise.
* c-errors.c: Likewise.
* c-lang.c: Likewise.
* c-objc-common.c: Likewise.
* c-parser.c: Likewise.
* c-typeck.c: Likewise.
2015-10-26 Jim Wilson <jim.wilson@linaro.org>
PR debug/66068
* c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
after calling build_qualified_type.
2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
Thomas Schwinge <thomas@codesourcery.com>
James Norris <jnorris@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
Julian Brown <julian@codesourcery.com>
Bernd Schmidt <bschmidt@redhat.com>
* c-parser.c (c_parser_oacc_shape_clause): New.
(c_parser_oacc_simple_clause): New.
(c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
(OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
James Norris <jnorris@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
PR c/64765
PR c/64880
* c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
parameters, and handle these. Adjust all users.
(c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
into...
(c_parser_oacc_kernels_parallel): ... this new function. Adjust
all users.
* c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
declare functions.
(c_finish_omp_construct): Declare function.
* c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
Merge functions into...
(c_finish_omp_construct): ... this new function.
2015-10-22 Richard Biener <rguenther@suse.de>
* c-typeck.c (c_finish_omp_clauses): Properly convert operands
before folding a MINUS_EXPR.
2015-10-21 Marek Polacek <polacek@redhat.com>
PR c/68024
* c-decl.c (start_function): Warn about vararg functions without
a prototype.
2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
* c-typeck.c (build_conditional_expr): Use boolean vector
type for vector comparison.
(build_vec_cmp): New.
(build_binary_op): Use build_vec_cmp for comparison.
2015-10-20 Marek Polacek <polacek@redhat.com>
* c-parser.c (is_cilkplus_vector_p): Don't define here.
2015-10-20 Marek Polacek <polacek@redhat.com>
PR c/67964
* c-parser.c (c_parser_attributes): Break out of the loop if the
token after an attribute isn't a comma.
2015-10-13 Jakub Jelinek <jakub@redhat.com>
Aldy Hernandez <aldyh@redhat.com>
* c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
(c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
(c_parser_omp_variable_list): Handle structure elements for
map, to and from clauses. Handle array sections in reduction
clause. Formatting fixes.
(c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
if clause modifiers.
(c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
c_parser_omp_clause_priority, c_parser_omp_clause_hint,
c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
c_parser_omp_clause_is_device_ptr): New functions.
(c_parser_omp_clause_ordered): Parse optional parameter.
(c_parser_omp_clause_reduction): Handle array reductions.
(c_parser_omp_clause_schedule): Parse optional simd modifier.
(c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
functions.
(c_parser_omp_clause_linear): Parse linear clause modifiers.
(c_parser_omp_clause_depend_sink): New function.
(c_parser_omp_clause_depend): Parse source/sink depend kinds.
(c_parser_omp_clause_map): Parse release/delete map kinds and
optional always modifier.
(c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
and c_finish_omp_clauses callers.
(c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
(c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
(OMP_CRITICAL_CLAUSE_MASK): Define.
(c_parser_omp_critical): Parse critical clauses.
(c_parser_omp_for_loop): Handle doacross loops, adjust
c_finish_omp_for and c_finish_omp_clauses callers.
(OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
(c_parser_omp_simd): Allow ordered clause if it has no parameter.
(OMP_FOR_CLAUSE_MASK): Add linear clause.
(c_parser_omp_for): Disallow ordered clause when combined with
distribute. Disallow linear clause when combined with distribute
and not combined with simd.
(OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
(c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
parse clauses and if depend clause is found, don't parse a body.
(c_parser_omp_parallel): Disallow copyin clause on target parallel.
Allow target parallel without for after it.
(OMP_TASK_CLAUSE_MASK): Add priority clause.
(OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
(c_parser_omp_target_data): Diagnose no map clauses or clauses with
invalid kinds.
(OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
(OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
(c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
functions.
(OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
defaultmap and is_device_ptr clauses.
(c_parser_omp_target): Parse target parallel and target simd. Set
OMP_TARGET_COMBINED on combined constructs. Parse target enter data
and target exit data. Diagnose invalid map kinds.
(OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
(c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
construct.
(c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
&omp_priv.
(OMP_TASKLOOP_CLAUSE_MASK): Define.
(c_parser_omp_taskloop): New function.
(c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
handle PRAGMA_OMP_TASKLOOP.
(c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
* c-tree.h (c_finish_omp_clauses): Add two new arguments.
* c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
Add IS_OMP argument, handle structure element bases, diagnose
bitfields, pass IS_OMP recursively, diagnose known zero length
array sections in depend clauses, handle array sections in reduction
clause, diagnose negative length even for pointers.
(handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
types, pass IS_OMP down to handle_omp_array_sections_1, handle
array sections in reduction clause, set
OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
(c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2015-10-06 Marek Polacek <polacek@redhat.com>
* c-parser.c (c_parser_statement_after_labels): Use
protected_set_expr_location.
(c_parser_omp_clause_num_gangs): Likewise.
(c_parser_omp_clause_num_threads): Likewise.
(c_parser_omp_clause_num_workers): Likewise.
(c_parser_omp_clause_vector_length): Likewise.
(c_parser_omp_clause_num_teams): Likewise.
(c_parser_omp_clause_thread_limit): Likewise.
* c-typeck.c (build_c_cast): Likewise.
(c_cast_expr): Likewise.
2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
* c-typeck.c (c_tree_equal): Use real_equal instead of
REAL_VALUES_EQUAL.
2015-10-04 Jason Merrill <jason@redhat.com>
* c-parser.c (c_lex_one_token): Handle @synchronized.
* c-decl.c (match_builtin_function_types): A declaration of a built-in
can change whether the function is transaction_safe.
2015-10-02 Marek Polacek <polacek@redhat.com>
PR c/67730
* c-typeck.c (convert_for_assignment): Use the expansion point
location throughout.
2015-10-02 Marek Polacek <polacek@redhat.com>
PR c/64249
* c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
and pass it down to c_parser_if_statement.
(c_parser_else_body): Add CHAIN parameter and pass it down to
c_parser_statement_after_labels.
(c_parser_if_statement): Add CHAIN parameter. Add code to warn about
duplicated if-else-if conditions.
2015-10-01 Marek Polacek <polacek@redhat.com>
* c-typeck.c (convert_for_assignment): Improve commentary.
2015-09-30 Marek Polacek <polacek@redhat.com>
PR c/67730
* c-typeck.c (c_finish_return): Use the expansion point location for
certain "return with value" warnings.
2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
* c-parser.c (pragma_lex): Add loc argument.
2015-09-15 Marek Polacek <polacek@redhat.com>
PR c/67580
* c-decl.c (tag_exists_p): New function.
* c-parser.c (c_parser_declaration_or_fndef): Give a hint when
struct/union/enum keywords are missing.
* c-tree.h (tag_exists_p): Declare.
2015-09-15 Marek Polacek <polacek@redhat.com>
* c-decl.c (lookup_label): Return NULL_TREE instead of 0.
(lookup_tag): Change the type of THISLEVEL_ONLY to bool.
Return NULL_TREE instead of 0.
(lookup_name): Return NULL_TREE instead of 0.
(lookup_name_in_scope): Likewise.
(shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
(parser_xref_tag): Use false instead of 0.
(start_struct): Use true instead of 1.
(start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2015-09-14 Marek Polacek <polacek@redhat.com>
* c-typeck.c (set_nonincremental_init_from_string): Use
HOST_WIDE_INT_M1U when shifting a negative value.
2015-09-09 Mark Wielaard <mjw@redhat.com>
* c-typeck.c (build_binary_op): Check and warn when nonnull arg
parm against NULL.
2015-09-10 Jakub Jelinek <jakub@redhat.com>
PR c/67502
* c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
into OMP_FOR_PRE_BODY rather than before the loop.
2015-09-09 Jakub Jelinek <jakub@redhat.com>
PR c/67501
* c-parser.c (c_parser_oacc_all_clauses,
c_parser_omp_all_clauses): Remove invalid clause from
list of clauses even if parser->error is set.
PR c/67500
* c-parser.c (c_parser_omp_clause_aligned,
c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
test for errors.
* c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
error_mark_node.
PR c/67495
* c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
instead of c_parser_unary_expression. If the result is !lvalue_p,
wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2015-09-04 Marek Polacek <polacek@redhat.com>
PR sanitizer/67279
* c-typeck.c (build_binary_op): Don't instrument static initializers.
2015-09-03 Martin Sebor <msebor@redhat.com>
PR c/66516
* c-typeck.c (convert_arguments, parser_build_unary_op,
build_conditional_expr, c_cast_expr, convert_for_assignment,
build_binary_op, _objc_common_truthvalue_conversion): Call
reject_gcc_builtin.
(c_decl_implicit): Define.
2015-09-02 Marek Polacek <polacek@redhat.com>
PR c/67432
* c-parser.c (c_parser_enum_specifier): Give a better error for
an empty enum.
2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
* c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2015-08-12 Marek Polacek <polacek@redhat.com>
* c-decl.c (grokdeclarator): Call error_at instead of error and pass
LOC to it.
2015-08-03 Marek Polacek <polacek@redhat.com>
PR c/67088
* c-decl.c (check_bitfield_type_and_width): Add location parameter.
Use it.
(grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
* c-parser.c (c_parser_if_body): Take token_indent_info
argument. Call warn_for_misleading_indentation even when the
body is a semicolon. Extract token_indent_infos corresponding
to the guard, body and next tokens. Adjust call to
warn_for_misleading_indentation accordingly.
(c_parser_else_body): Likewise.
(c_parser_if_statement): Likewise.
(c_parser_while_statement): Likewise.
(c_parser_for_statement): Likewise.
2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
Manuel López-Ibáñez <manu@gcc.gnu.org>
* c-decl.c (get_parm_info): Remove static var. Update warning
message.
2015-07-27 Marek Polacek <polacek@redhat.com>
PR c++/66555
PR c/54979
* c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2015-07-20 Marek Polacek <polacek@redhat.com>
PR c++/55095
* c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
(build_binary_op): Warn about left shift overflows.
2015-07-09 Andrew MacLeod <amacleod@redhat.com>
* c-array-notation.c: Adjust includes for flags.h changes.
* c-objc-common.c: Likewise.
2015-07-07 Andrew MacLeod <amacleod@redhat.com>
* c-array-notation.c: Adjust includes.
* c-aux-info.c: Likewise.
* c-convert.c: Likewise.
* c-decl.c: Likewise.
* c-errors.c: Likewise.
* c-lang.c: Likewise.
* c-objc-common.c: Likewise.
* c-parser.c: Likewise.
* c-typeck.c: Likewise.
2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/66605
* c-decl.c (finish_function): Call do_warn_unused_parameter.
2015-06-29 Marek Polacek <polacek@redhat.com>
PR c/66322
* c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
(c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
about -Wswitch-bool here.
(do_case): Update c_add_case_label call.
(c_finish_case): Update c_do_switch_warnings call.
2015-06-27 Marek Polacek <polacek@redhat.com>
* c-typeck.c: Use VECTOR_TYPE_P throughout.
2015-06-26 Marek Polacek <polacek@redhat.com>
* c-array-notation.c (fix_builtin_array_notation_fn): Use
INDIRECT_REF_P.
* c-typeck.c (array_to_pointer_conversion): Likewise.
(build_unary_op): Likewise.
(c_finish_return): Likewise.
2015-06-25 Andrew MacLeod <amacleod@redhat.com>
* c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
* c-parser.c: Likewise.
2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
* c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
instead of pointer_hash.
(detect_field_duplicates): Likewise.
2015-06-25 Marek Polacek <polacek@redhat.com>
* c-array-notation.c: Use VAR_P throughout.
* c-decl.c: Likewise.
* c-objc-common.c: Likewise.
* c-parser.c: Likewise.
* c-typeck.c: Likewise.
2015-06-25 Marek Polacek <polacek@redhat.com>
* c-decl.c: Use is_global_var throughout.
* c-parser.c: Likewise.
* c-typeck.c: Likewise.
2015-06-17 Andrew MacLeod <amacleod@redhat.com>
* c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
* c-aux-info.c: Likewise.
* c-convert.c: Likewise.
* c-decl.c: Likewise.
* c-errors.c: Likewise.
* c-lang.c: Likewise.
* c-objc-common.c: Likewise.
* c-parser.c: Likewise.
* c-typeck.c: Likewise.
2015-06-11 Jan Hubicka <hubicka@ucw.cz>
PR middle-end/66325
* c-decl.c (start_enum): Set TYPE_PACKED consistently among type
variants.
2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
* c-decl.c (pop_scope): Register the main translation unit
through the new debug hook.
2015-06-08 Andrew MacLeod <amacleod@redhat.com>
* c-array-notation.c : Adjust include files.
* c-aux-info.c : Likewise.
* c-convert.c : Likewise.
* c-decl.c : Likewise.
* c-errors.c : Likewise.
* c-lang.c : Likewise.
* c-lang.h : Likewise.
* c-objc-common.c : Likewise.
* c-parser.c : Likewise.
* c-typeck.c : Likewise.
2015-06-05 Aldy Hernandez <aldyh@redhat.com>
* c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
immediately clobber it.
(c_write_global_declarations_1): Remove call to
check_global_declaration_1.
(c_write_global_declarations_2): Remove.
(c_write_final_cleanups): Rename from c_write_global_declarations.
Remove call to finalize_compilation_unit.
Remove calls to debugging hooks.
* c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
* c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
* c-tree.h: Remove c_write_global_declarations.
2015-06-04 Andrew MacLeod <amacleod@redhat.com>
* c-array-notation.c: Adjust includes for restructured coretypes.h.
* c-aux-info.c: Likewise.
* c-convert.c: Likewise.
* c-decl.c: Likewise.
* c-errors.c: Likewise.
* c-lang.c: Likewise.
* c-objc-common.c: Likewise.
* c-parser.c: Likewise.
* c-typeck.c: Likewise.
2015-06-04 Marek Polacek <polacek@redhat.com>
PR c/66341
* c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
it is a lvalue.
2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
* c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
Warn for empty struct.
(finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
* c-decl.c (start_function): Call plugin before parsing.
(finish_function): Call plugin after parsing.
2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
PR c/49551
* c-decl.c (merge_decls): Merge DECL_COMMON.
2015-05-22 Jim Wilson <jim.wilson@linaro.org>
* Make-lang.in (check_gcc_pallelize): Define.
2015-05-22 Marek Polacek <polacek@redhat.com>
PR c/47043
* c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
attributes.
2015-05-21 Marek Polacek <polacek@redhat.com>
* c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
DECL_BUILT_IN.
2015-05-20 Marek Polacek <polacek@redhat.com>
* c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
* c-typeck.c: Likewise.
2015-05-19 Marek Polacek <polacek@redhat.com>
* c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2015-05-19 Jakub Jelinek <jakub@redhat.com>
PR middle-end/66199
* c-parser.c (c_parser_omp_for_loop): Don't add
OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
(c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
constructs.
2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
* c-typeck.c (build_array_ref): Use std::swap instead of explicit
swaps.
2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/44054
* c-objc-common.c (c_tree_printer): Replace locus pointer with
accessor function.
2015-05-14 Marek Polacek <polacek@redhat.com>
PR c/66066
PR c/66127
* c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
rather than with 0.
2015-05-12 David Malcolm <dmalcolm@redhat.com>
* c-parser.c (c_parser_if_body): Add param "if_loc", use it
to add a call to warn_for_misleading_indentation.
(c_parser_else_body): Likewise, adding param "else_loc".
(c_parser_if_statement): Check for misleading indentation.
(c_parser_while_statement): Likewise.
(c_parser_for_statement): Likewise.
2015-05-08 Marek Polacek <polacek@redhat.com>
PR c/64918
* c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
(output_init_element): Likewise.
2015-05-07 Marek Polacek <polacek@redhat.com>
PR c/65179
* c-typeck.c (build_binary_op): Warn when left shifting a negative
value.
2015-04-30 Marek Polacek <polacek@redhat.com>
* c-typeck.c (set_init_label): Call error_at instead of error and
pass LOC to it.
* c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
the type of a decl.
* c-typeck.c (c_build_va_arg): Clarify the error message.
2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
* c-parser.c (c_parser_oacc_enter_exit_data): Use
OMP_STANDALONE_CLAUSES.
2015-04-28 Marek Polacek <polacek@redhat.com>
* c-parser.c (c_parser_binary_expression): Remove duplicate line.
2015-04-28 Marek Polacek <polacek@redhat.com>
PR c/65901
* c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2015-04-25 Marek Polacek <polacek@redhat.com>
PR c/52085
* c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
attribute.
2015-04-23 Marek Polacek <polacek@redhat.com>
PR c/65345
* c-decl.c (set_labels_context_r): New function.
(store_parm_decls): Call it via walk_tree_without_duplicates.
* c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
instead of create_tmp_var. Build TARGET_EXPR instead of
COMPOUND_EXPR.
(build_atomic_assign): Use create_tmp_var_raw instead of
create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
* c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
(c_parser_omp_target_update): Add missed %> to error_at ().
2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
PR target/55143
* c-decl.c (c_default_pointer_mode): Remove definition.
* c-tree.h (c_default_pointer_mode): Remove declaration.
2015-03-27 Tobias Burnus <burnus@net-b.de>
PR c/65586
* c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
error out.
(c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2015-03-19 Jakub Jelinek <jakub@redhat.com>
* c-decl.c (c_decl_attributes): Also add "omp declare target"
attribute for DECL_EXTERNAL VAR_DECLs.
2015-03-11 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
argument.
2015-03-10 Jakub Jelinek <jakub@redhat.com>
PR c/65120
* c-typeck.c (parser_build_binary_op): Check for tcc_comparison
before preparing arguments to warn_logical_not_parentheses.
2015-03-09 Jakub Jelinek <jakub@redhat.com>
PR c/65120
* c-typeck.c (parser_build_binary_op): Don't warn for
!!x == y or !b == y where b is _Bool.
2015-03-09 Marek Polacek <polacek@redhat.com>
* c-convert.c (convert): Make use of do_ubsan_in_current_function.
* c-decl.c (grokdeclarator): Likewise.
* c-typeck.c (build_binary_op): Likewise.
2015-02-27 Marek Polacek <polacek@redhat.com>
PR c/65228
* c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2015-02-14 Marek Polacek <polacek@redhat.com>
PR c/64768
* c-decl.c (grokdeclarator): Set the range of a flexible array member
declared through a typedef name.
2015-02-13 Marek Polacek <polacek@redhat.com>
PR c/65050
* c-decl.c (grokdeclarator): Print also the type when giving
the error message about array's incomplete element type.
2015-02-11 Jakub Jelinek <jakub@redhat.com>
PR c/64824
* c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
check in the POP macro.
2015-02-09 Marek Polacek <polacek@redhat.com>
PR c/64856
* c-typeck.c (process_init_element): Don't always wrap
COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
initializing a range of elements.
2015-02-04 Jakub Jelinek <jakub@redhat.com>
PR c/64824
PR c/64868
* c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2015-02-02 Bruno Loff <bruno.loff@gmail.com>
* c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
processing enum declaration.
2015-01-29 Marek Polacek <polacek@redhat.com>
PR c/64709
* c-typeck.c (pop_init_level): If constructor_elements has
exactly one element with integer_zerop value, set constructor_zeroinit
to 1. Remove braces around warning_init call.
2015-01-27 Jakub Jelinek <jakub@redhat.com>
PR c/64766
* c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
of FUNCTION_DECLs with error_mark_node.
2015-01-26 Jakub Jelinek <jakub@redhat.com>
PR c/64778
* c-typeck.c (convert_arguments): Return -1 if there are
error_args, even if we've diagnosed too many arguments.
2015-01-21 Richard Biener <rguenther@suse.de>
PR middle-end/64313
* c-decl.c (merge_decls): Call set_builtin_decl_declared_p
for builtins the user declared correctly.
2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
Bernd Schmidt <bernds@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
James Norris <jnorris@codesourcery.com>
Jakub Jelinek <jakub@redhat.com>
Ilmir Usmanov <i.usmanov@samsung.com>
* c-parser.c: Include "gomp-constants.h".
(c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
Use OMP_CLAUSE_SET_MAP_KIND.
(c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
(c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
(c_parser_omp_clause_name): Handle "auto", "async", "copy",
"copyout", "create", "delete", "deviceptr", "gang", "host",
"num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
"present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
"present_or_create", "pcreate", "seq", "self", "vector",
"vector_length", "wait", "worker".
(OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
(OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
(OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
(OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
(c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
(c_parser_oacc_wait_list, c_parser_oacc_data_clause)
(c_parser_oacc_data_clause_deviceptr)
(c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
(c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
(c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
(c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
(c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
(c_parser_oacc_parallel, c_parser_oacc_update)
(c_parser_oacc_wait): New functions.
* c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
(c_finish_oacc_data): New prototypes.
* c-typeck.c: Include "gomp-constants.h".
(handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
OMP_CLAUSE_SET_MAP_KIND.
(c_finish_oacc_parallel, c_finish_oacc_kernels)
(c_finish_oacc_data): New functions.
(c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
GOMP_MAP_FORCE_DEVICEPTR.
2015-01-09 Michael Collison <michael.collison@linaro.org>
* c-array-notation.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
* c-aux-info.c: Ditto.
* c-convert.c: Ditto.
* c-decl.c: Ditto.
* c-errors.c: Ditto.
* c-lang.c: Dittoxs.
* c-objc-common.c: Ditto.
* c-parser.c: Ditto.
* c-typeck.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, inchash.h, real.h and
fixed-value.h due to flattening of tree.h.
2015-01-07 Marek Polacek <polacek@redhat.com>
PR c/64417
* c-typeck.c (process_init_element): Disallow initialization of
a flexible array member with a string constant if the structure
is in an array.
2015-01-05 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/64344
* c-typeck.c (convert_for_assignment, c_finish_return): For
-fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
types also set in_late_binary_op around convert call.
* c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
to integral type casts, if not in_late_binary_op, pass c_fully_fold
result on expr as last argument to ubsan_instrument_float_cast,
if in_late_binary_op, don't use c_save_expr but save_expr.
Update copyright years.
2015-01-05 Marek Polacek <polacek@redhat.com>
PR c/64423
* c-typeck.c (build_array_ref): Pass loc down to
warn_array_subscript_with_type_char.
2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
* c-typeck.c: New behavious for pointers to arrays with qualifiers
(common-pointer-type): For pointers to arrays take qualifiers from
element type.
(build_conditional_expr): Add warnings for lost qualifiers.
(comp-target-types): Allow pointers to arrays with different qualifiers.
(convert-for-assignment): Adapt warnings for discarded qualifiers. Add
WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
to PEDWARN_FOR_QUALIFIERS.
2014-12-17 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/64289
* c-convert.c: Include ubsan.h.
(convert): For real -> integral casts and
-fsanitize=float-cast-overflow don't call convert_to_integer, but
instead instrument the float cast directly.
2014-11-29 Jakub Jelinek <jakub@redhat.com>
* c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
c_finish_stmt_expr): Remove NULL last argument from
create_tmp_var_raw and create_tmp_var calls.
* c-array-notation.c (fix_builtin_array_notation_fn,
build_array_notation_expr, fix_conditional_array_notations_1,
fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2014-11-28 Marek Polacek <polacek@redhat.com>
PR c/63862
* c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
convert the right operand to integer type.
2014-11-25 Marek Polacek <polacek@redhat.com>
PR c/63877
* c-decl.c (start_function): Disable -Wmissing-declarations warning
for inline functions.
2014-11-21 Jakub Jelinek <jakub@redhat.com>
PR target/63764
* c-typeck.c (build_array_ref): Adjust
convert_vector_to_pointer_for_subscript caller. If it returns true,
call non_lvalue_loc on the result.
2014-11-11 Richard Biener <rguenther@suse.de>
* c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
to true.
2014-11-10 Andi Kleen <ak@linux.intel.com>
PR c/60804
* c-parser.c (c_parser_statement_after_labels): Call
check_no_cilk.
(c_parser_if_statement): Dito.
(c_parser_switch_statement): Dito.
(c_parser_while_statement): Dito.
(c_parser_do_statement): Dito.
(c_parser_for_statement): Dito.
* c-typeck.c (c_finish_loop): Dito.
2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
* c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
OPT_Wshift_count_overflow in the warnings.
2014-10-30 Marek Polacek <polacek@redhat.com>
* c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
print the stripped version as well, if they're not the same.
2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
* c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
machine_mode.
2014-10-28 Andrew MacLeod <amacleod@redhat.com>
* c-decl.c: Adjust include files.
* c-parser.c: Ditto.
2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
Tom Tromey <tromey@redhat.com>
* c-tree.h (enum c_oracle_request): New.
(c_binding_oracle_function): New typedef.
(c_binding_oracle, c_pushtag, c_bind): Declare.
* c-decl.c (c_binding_oracle): New global.
(I_SYMBOL_CHECKED): New macro.
(i_symbol_binding): New function.
(I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
(I_TAG_CHECKED): New macro.
(i_tag_binding): New function.
(I_TAG_BINDING, I_TAG_DECL): Redefine.
(I_LABEL_CHECKED): New macro.
(i_label_binding): New function.
(I_LABEL_BINDING, I_LABEL_DECL): Redefine.
(c_print_identifier): Save and restore c_binding_oracle.
(c_pushtag, c_bind): New functions.
2014-10-27 Andrew MacLeod <amacleod@redhat.com>
* c-typeck.c: Adjust include files.
2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/53061
* c-objc-common.c (c_objc_common_init): Do not do diagnostics
initialization here...
(c_initialize_diagnostics): ... but here. Set defaults after
building pretty-printer.
2014-10-23 Marek Polacek <polacek@redhat.com>
PR c/63626
* c-decl.c (pop_scope): Don't print warning in external_scope.
2014-10-19 Marek Polacek <polacek@redhat.com>
PR c/63567
* c-typeck.c (output_init_element): Allow initializing objects with
static storage duration with compound literals even in C99 and add
pedwarn for it.
2014-10-17 Marek Polacek <polacek@redhat.com>
PR c/63567
* c-typeck.c (digest_init): Allow initializing objects with static
storage duration with compound literals even in C99 and add pedwarn
for it.
2014-10-17 Marek Polacek <polacek@redhat.com>
PR c/63543
* c-tree.h (C_TYPE_ERROR_REPORTED): Define.
* c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
error multiple times. Print the type.
2014-10-17 Marek Polacek <polacek@redhat.com>
PR c/63549
* c-typeck.c (build_array_ref): Bail if the index in an incomplete
type.
2014-10-17 Marek Polacek <polacek@redhat.com>
* c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
(start_function): Use OPT_Wimplicit_int instead of 0.
(store_parm_decls_oldstyle): Likewise.
2014-10-17 Alan Modra <amodra@gmail.com>
PR middle-end/61848
* c-decl.c (merge_decls): Don't merge section name or tls model
to newdecl symtab node, instead merge to olddecl. Override
existing olddecl section name. Set tls_model for all thread-local
vars, not just OMP thread-private ones. Remove incorrect comment.
2014-10-16 Andrew MacLeod <amacleod@redhat.com>
* c-decl.c: Adjust include files.
2014-10-14 DJ Delorie <dj@redhat.com>
* c-parser.c (c_parse_init): Add RID entries for each __intN.
(c_token_starts_typename): Check all __intN, not just __int128.
(c_token_starts_declspecs): Likewise.
(c_parser_declspecs): Likewise.
(c_parser_attribute_any_word): Likewise.
(c_parser_objc_selector): Likewise.
* c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
(struct c_declspecs): Add int_n_idx field to record *which* __intN
is specified.
* c-decl.c (declspecs_add_type): Check for all __intN, not just
__int128.
(finish_declspecs): Likewise.
2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
* c-parser.c (c_parser_all_labels): New function to replace
the duplicate code.
(c_parser_statement): Call the new function.
2014-10-09 Marek Polacek <polacek@redhat.com>
PR c/63480
* c-typeck.c (pop_init_level): Don't warn about initializing
with { }.
2014-10-07 Marek Polacek <polacek@redhat.com>
PR c/59717
* c-decl.c (header_for_builtin_fn): New function.
(implicitly_declare): Suggest which header to include.
2014-10-07 Marek Polacek <polacek@redhat.com>
* c-convert.c (convert): Use error_operand_p.
* c-typeck.c (require_complete_type): Likewise.
(really_atomic_lvalue): Likewise.
(digest_init): Likewise.
(handle_omp_array_sections_1): Likewise.
2014-10-03 Marek Polacek <polacek@redhat.com>
PR c/63453
* c-decl.c (pop_scope): Don't warn about "inline function declared
but never defined" for functions marked with gnu_inline attribute.
2014-09-25 Jakub Jelinek <jakub@redhat.com>
PR c++/63249
* c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
on low_bound and length.
2014-09-24 Marek Polacek <polacek@redhat.com>
PR c/61405
PR c/53874
* c-parser.c: Don't define CPP_KEYWORD.
(c_parser_switch_statement): Pass original type to c_finish_case.
* c-tree.h (c_finish_case): Update declaration.
* c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
conditionally to c_do_switch_warnings.
2014-09-03 Marek Polacek <polacek@redhat.com>
PR c/62024
* c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
conversions.
2014-09-02 Jakub Jelinek <jakub@redhat.com>
Balaji V. Iyer <balaji.v.iyer@intel.com>
Igor Zamyatin <igor.zamyatin@intel.com>
* c-parser.c (c_parser_cilk_for): New function.
(c_parser_cilk_grainsize): Likewise.
(c_get_temp_regvar): Likewise.
(c_parser_statement_after_labels): Added RID_CILK_FOR case.
(c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
(c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
* c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
case.
2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
* c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
with using HOST_WIDE_INT without truncation to 'int'
2014-08-22 Marek Polacek <polacek@redhat.com>
PR c++/62199
* c-typeck.c (parser_build_binary_op): Adjust call to
warn_logical_not_parentheses.
2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
PR other/62008
* c-parser.c (c_parser_array_notation): Check for correct
type of an array added.
2014-08-19 Marek Polacek <polacek@redhat.com>
PR c++/62153
* c-typeck.c (build_binary_op): If either operand of a comparison
is a boolean expression, call maybe_warn_bool_compare.
2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
PR c/45584
* c-typeck.c (build_c_cast): Do a conversion even when the
TYPE_MAIN_VARIANTs are the same.
2014-08-19 Marek Polacek <polacek@redhat.com>
* c-decl.c (diagnose_mismatched_decls): Unconditionally call
pedwarn_c99 instead of pedwarn.
(grokfield): Likewise.
(warn_defaults_to): New function.
(grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
Unconditionally call pedwarn_c99 instead of pedwarn.
(start_function): Call warn_defaults_to instead of pedwarn_c99.
(declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
check flag_isoc11 before.
* c-errors.c (pedwarn_c99): Change the return type to bool.
Handle -Wc99-c11-compat.
* c-parser.c (disable_extension_diagnostics): Handle
warn_c99_c11_compat.
(restore_extension_diagnostics): Likewise.
(c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
instead of pedwarn, don't check flag_isoc11 before.
(c_parser_declspecs): Likewise.
(c_parser_alignas_specifier): Likewise.
(c_parser_alignof_expression): Likewise.
(c_parser_generic_selection): Likewise.
* c-tree.h (pedwarn_c99): Update declaration.
* c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
of pedwarn_c99.
2014-08-19 Marek Polacek <polacek@redhat.com>
* c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
to pedwarn_c90.
* c-errors.c: Include "opts.h".
(pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
* c-parser.c (disable_extension_diagnostics): Handle negative value
of warn_c90_c99_compat, too.
(restore_extension_diagnostics): Likewise.
(c_parser_compound_statement_nostart): Pass
OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2014-08-12 Marek Polacek <polacek@redhat.com>
* c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
Add pedwarn.
(c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
Likewise.
(c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2014-08-10 Marek Polacek <polacek@redhat.com>
PR c/51849
* c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
Call pedwarn_c90 instead of pedwarn.
(check_bitfield_type_and_width): Likewise.
(declspecs_add_qual): Likewise.
(declspecs_add_type): Likewise.
(warn_variable_length_array): Unify function for -pedantic and -Wvla.
Adjust to only call pedwarn_c90.
(grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
pedwarn_c90 instead of pedwarn.
* c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
* c-parser.c (disable_extension_diagnostics): Handle
warn_c90_c99_compat.
(restore_extension_diagnostics): Likewise.
(c_parser_enum_specifier): Remove check for !flag_isoc99. Call
pedwarn_c90 instead of pedwarn.
(c_parser_initelt): Likewise.
(c_parser_postfix_expression): Likewise.
(c_parser_postfix_expression_after_paren_type): Likewise.
(c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
* c-tree.h: Fix formatting.
* c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
pedwarn_c90 instead of pedwarn.
2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
* c-typeck.c: Remove include of pointer-set.h.
2014-08-07 Marek Polacek <polacek@redhat.com>
* c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
* c-typeck.c: Use hash_map instead of pointer_map.
2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
* c-decl.c: Use hash_set instead of pointer_set.
2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
PR middle-end/61455
* c-array-notation.c (expand_array_notations): Handling
of DECL_EXPR added.
2014-07-31 Marc Glisse <marc.glisse@inria.fr>
PR c++/60517
* c-typeck.c (c_finish_return): Return 0 instead of the address of
a local variable.
2014-07-30 Tom Tromey <tromey@redhat.com>
* c-typeck.c (struct constructor_stack) <designator_depth>: New
field.
(really_start_incremental_init, push_init_level): Initialize
designator_depth.
(pop_init_level): Set global designator_depth.
(process_init_element): Check for designated_init attribute.
2014-07-20 Marek Polacek <polacek@redhat.com>
PR c/61852
* c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
(implicitly_declare): Pass location to implicit_decl_warning.
2014-07-14 Jakub Jelinek <jakub@redhat.com>
PR middle-end/61294
* c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
If non-NULL, call c_parser_check_literal_zero.
(c_parser_check_literal_zero): New function.
(c_parser_postfix_expression_after_primary): Adjust
c_parser_expr_list caller, handle -Wmemset-transposed-args.
2014-07-06 Marek Polacek <polacek@redhat.com>
PR c/6940
* c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
* c-tree.h (C_ARRAY_PARAMETER): Define.
* c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
function parameter.
2014-07-02 Jan Hubicka <hubicka@ucw.cz>
Chen Gang <gang.chen.5i5j@gmail.com>
* c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
releasing symbol.
2014-07-01 Marek Polacek <polacek@redhat.com>
* c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
instead of 0 to WARN_FOR_ASSIGNMENT.
2014-07-01 Marek Polacek <polacek@redhat.com>
PR c/58286
* c-typeck.c (convert_for_assignment): Pass
OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2014-06-30 Marek Polacek <polacek@redhat.com>
* c-decl.c (grokdeclarator): Don't instrument VLAs if the function
has no_sanitize_undefined attribute.
2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
PR middle-end/57541
* c-array-notation.c (fix_builtin_array_notation_fn):
Check for 0 arguments in builtin call. Check that bultin argument is
correct.
* c-parser.c (c_parser_array_notation): Check for incorrect initial
index.
2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
* c-parser.c (c_parser_declaration_or_fndef): Discard all type
qualifiers in __auto_type for atomic types.
(c_parser_typeof_specifier): Discard all type qualifiers in
__typeof__ for atomic types.
2014-06-25 Marek Polacek <polacek@redhat.com>
PR c/61162
* c-parser.c (c_parser_statement_after_labels): Pass the location of
the return expression to c_finish_return.
2014-06-25 Jakub Jelinek <jakub@redhat.com>
* c-typeck.c (c_finish_omp_clauses): Make sure
OMP_CLAUSE_LINEAR_STEP has correct type.
2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
* c-decl.c: Adjust.
2014-06-24 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_omp_for_loop): For
#pragma omp parallel for simd move lastprivate clause from parallel
to for rather than simd.
2014-06-23 Marek Polacek <polacek@redhat.com>
* c-typeck.c (parser_build_binary_op): Don't call
warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2014-06-15 Jan Hubicka <hubicka@ucw.cz>
* c-parser.c (c_parser_omp_threadprivate): Likewise.
* c-decl.c (merge_decls): Likewise.
2014-06-09 Marek Polacek <polacek@redhat.com>
PR c/36446
* c-typeck.c (error_init): Call inform instead of error_at.
(pedwarn_init): Call inform instead of pedwarn.
(warning_init): Call inform instead of warning_at.
2014-06-07 Jan Hubicka <hubicka@ucw.cz>
* c-decl.c (merge_decls): Use set_decl_section_name.
(duplicate_decls): Remove node if it exists.
2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
PR c/53119
* c-typeck.c (push_init_level, process_init_element,
pop_init_level): Correct check for zero initialization, move
missing brace warning to respect zero initialization.
2014-06-05 Marek Polacek <polacek@redhat.com>
PR c/56724
* c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2014-06-05 Marek Polacek <polacek@redhat.com>
PR c/49706
* c-typeck.c (parser_build_binary_op): Warn when logical not is used
on the left hand side operand of a comparison.
2014-06-05 Marek Polacek <polacek@redhat.com>
PR c/48062
* c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
Print note only if the warning was printed.
2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
PR c/58942
* c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
with a pointer.
2014-06-03 Marek Polacek <polacek@redhat.com>
PR c/60439
* c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
c_start_case.
* c-tree.h (c_start_case): Update.
* c-typeck.c (c_start_case): Add new boolean parameter. Warn if
switch condition has boolean value.
2014-06-02 Andrew MacLeod <amacleod@redhat.com>
* c-decl.c: Include builtins.h.
* c-parser.c: Likewise.
2014-05-27 Marek Polacek <polacek@redhat.com>
PR c/56724
* c-typeck.c (convert_arguments): Get location of a parameter. Change
error and warning calls to error_at and warning_at. Pass location of
a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
(convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
PR c/61191
* c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
function parameters.
2014-05-23 Jan Hubicka <hubicka@ucw.cz>
* c-decl.c (merge_decls): Preserve symtab node pointers.
(duplicate_decls): Free new decl.
2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
* c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
initialization.
* c-parser.c (c_parser_omp_target): Return bool values.
2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
* c-parser.c (c_parser_omp_clause_thread_limit): Rename
num_teams_loc variable to num_thread_limit_loc.
2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
* c-array-notation.c (expand_array_notations): Use void_node
instead of void_zero_node.
2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
* c-decl.c (finish_struct): Adjust.
(finish_enum): Likewise.
(bind): Adjust.
(record_inline_static): Likewise.
(push_scope): Likewise.
(make_label): Likewise.
(lookup_label_for_goto): Likewise.
(finish_struct): Likewise.
(finish_enum): Likewise.
(store_parm_decls): Likewise.
(c_push_function_context): Likewise.
* c-lang.h: Remove usage of variable_size gty attribute.
* c-parser.c (c_parse_init): Adjust.
(c_parse_file): Likewise.
2014-05-13 Marek Polacek <polacek@redhat.com>
PR c/61162
* c-typeck.c (convert_for_assignment): Pass location to
WARN_FOR_ASSIGNMENT instead of input_location.
2014-05-10 Marek Polacek <polacek@redhat.com>
* c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
maybe_warn_string_init.
(c_parser_postfix_expression_after_paren_type): Pass type_loc to
maybe_warn_string_init.
* c-tree.h (maybe_warn_string_init): Update declaration.
* c-typeck.c (maybe_warn_string_init): Add location parameter.
Call pedwarn_init with loc instead of with input_location.
(digest_init): Pass init_loc to maybe_warn_string_init.
(pop_init_level): Call pedwarn_init with loc instead of with
input_location.
(set_init_index): Likewise.
(process_init_element): Likewise.
2014-05-09 Marek Polacek <polacek@redhat.com>
PR c/61096
* c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
(c_parser_initelt): Pass location to set_init_label. Pass array index
location to set_init_index.
* c-tree.h (push_init_level): Update declaration.
(pop_init_level): Likewise.
(set_init_index): Likewise.
(set_init_label): Likewise.
* c-typeck.c (error_init): Add location parameter. Call error_at
instead of error.
(digest_init): Pass init_loc to error_init.
(really_start_incremental_init):
(push_init_level): Add location parameter. Pass loc to pop_init_level
and error_init.
(pop_init_level): Likewise.
(set_designator): Add location parameter. Pass loc to pop_init_level,
push_init_level, and error_init.
(set_init_index): Add location parameter. Pass loc to error_init and
set_designator.
(set_init_label): Likewise.
(output_init_element): Pass loc to error_init.
(process_init_element): Pass loc to error_init, pop_init_level,
pedwarn_init, and push_init_level.
2014-05-09 Marek Polacek <polacek@redhat.com>
PR c/50459
* c-parser.c (c_parser_attributes): Parse the arguments as an
expression-list if the attribute takes identifier.
2014-05-08 Marek Polacek <polacek@redhat.com>
PR c/61053
* c-decl.c (grokdeclarator): Use min_align_of_type instead of
TYPE_ALIGN_UNIT.
2014-05-08 Marek Polacek <polacek@redhat.com>
PR c/61077
* c-decl.c (start_function): Warn for _Atomic-qualified return type
of main.
2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
Mike Stump <mikestump@comcast.net>
Richard Sandiford <rdsandiford@googlemail.com>
* c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
(finish_enum): Use wide-int interfaces.
* c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
* c-typeck.c (build_c_cast): Likewise.
(set_nonincremental_init_from_string): Likewise.
(c_tree_equal): Likewise.
2014-05-02 Marek Polacek <polacek@redhat.com>
PR c/25801
* c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
Return size_one_node when the type is not complete.
(pointer_diff): Remove comment.
(build_unary_op): Improve error messages.
2014-05-02 Marek Polacek <polacek@redhat.com>
* c-typeck.c (c_finish_return): Separate warning_at calls.
2014-05-02 Marek Polacek <polacek@redhat.com>
* c-tree.h (error_init): Remove declaration.
(pedwarn_init): Likewise.
* c-typeck.c (error_init): Make static and move above.
(pedwarn_init): Likewise.
(warning_init): Move above.
(maybe_warn_string_init): Likewise.
2014-05-01 Jeff Law <law@redhat.com>
Revert:
2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
* c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
avoid goto.
2014-05-02 Marek Polacek <polacek@redhat.com>
PR c/60784
* c-typeck.c (push_init_level): Set constructor_designated to
p->designated for structures.
2014-05-01 Marek Polacek <polacek@redhat.com>
PR c/60915
* c-parser.c (c_parser_declaration_or_fndef): Give better error if
function-definition has an attribute after the declarator.
2014-05-01 Marek Polacek <polacek@redhat.com>
PR c/60257
* c-typeck.c (warning_init): Add location_t parameter. Call
warning_at instead of warning.
(push_init_level): Pass input_location to warning_init.
(add_pending_init): Add location_t parameter. Pass loc to
warning_init.
(set_nonincremental_init): Pass input_location to add_pending_init.
(set_nonincremental_init_from_string): Likewise.
(output_init_element): Pass loc to warning_init and to
add_pending_init.
2014-05-01 Marek Polacek <polacek@redhat.com>
PR c/43395
* c-typeck.c (c_finish_return): Distinguish between label and variable
when warning about returning local address.
2014-05-01 Marek Polacek <polacek@redhat.com>
PR c/29467
* c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
in C89 mode.
2014-05-01 Marek Polacek <polacek@redhat.com>
PR c/43245
* c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
instead of 0 to WARN_FOR_QUALIFIERS.
2014-05-01 Marek Polacek <polacek@redhat.com>
PR c/56989
* c-typeck.c (default_conversion): Use better location for
error call.
2014-04-30 Marek Polacek <polacek@redhat.com>
* c-typeck.c (build_binary_op): Call ubsan_instrument_division
also when SANITIZE_FLOAT_DIVIDE is on.
2014-04-30 Marek Polacek <polacek@redhat.com>
PR c/60139
* c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
and pedwarn_init. Use loc insted of input_location.
2014-04-30 Marek Polacek <polacek@redhat.com>
PR c/60351
* c-typeck.c (build_binary_op): Use location when warning about
shift count.
2014-04-25 Marek Polacek <polacek@redhat.com>
PR c/18079
* c-decl.c (diagnose_mismatched_decls): Warn for mismatched
always_inline/noinline and hot/cold attributes.
2014-04-25 Marek Polacek <polacek@redhat.com>
PR c/60114
* c-parser.c (c_parser_initelt): Pass input_location to
process_init_element.
(c_parser_initval): Pass loc to process_init_element.
* c-tree.h (process_init_element): Adjust declaration.
* c-typeck.c (push_init_level): Pass input_location to
process_init_element.
(pop_init_level): Likewise.
(set_designator): Likewise.
(output_init_element): Add location_t parameter. Pass loc to
digest_init.
(output_pending_init_elements): Pass input_location to
output_init_element.
(process_init_element): Add location_t parameter. Pass loc to
output_init_element.
2014-04-24 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_omp_atomic): Allow seq_cst before
atomic-clause, allow comma in between atomic-clause and
seq_cst.
2014-04-22 Jakub Jelinek <jakub@redhat.com>
PR c/59073
* c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
fails, don't set OM_PARALLEL_COMBINED and return NULL.
2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
PR middle-end/60469
* c-array-notation.c (fix_builtin_array_notation_fn): Use
create_tmp_var instead build_decl for creating temps.
(build_array_notation_expr): Likewise.
(fix_conditional_array_notations_1): Likewise.
(fix_array_notation_expr): Likewise.
(fix_array_notation_call_expr): Likewise.
2014-03-28 Jakub Jelinek <jakub@redhat.com>
PR c++/60689
* c-tree.h (c_build_function_call_vec): New prototype.
* c-typeck.c (build_function_call_vec): Don't call
resolve_overloaded_builtin here.
(c_build_function_call_vec): New wrapper function around
build_function_call_vec. Call resolve_overloaded_builtin here.
(convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
Call c_build_function_call_vec instead of build_function_call_vec.
* c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
* c-decl.c (finish_decl): Likewise.
2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/55383
* c-typeck.c: Use correct format string in cast-qual warning
2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
* c-decl.c (c_decl_attributes): Use
lang_hooks.types.omp_mappable_type.
* c-typeck.c (c_finish_omp_clauses): Likewise.
2014-03-06 Marek Polacek <polacek@redhat.com>
PR c/60197
* c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
of checking tree code.
2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
* c-parser.c (c_parser_declspecs): Replace call to error by error_at.
(c_parser_parameter_declaration): Likewise.
2014-02-19 Marek Polacek <polacek@redhat.com>
PR c/60195
* c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
Call mark_exp_read on exp.value.
(build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
TREE_ADDRESSABLE on old instead of val.
(emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
* c-parser.c (c_parser_get_builtin_args): Replace calls to
C_EXPR_APPEND by vec_safe_push.
* c-tree.h (C_EXPR_APPEND): Remove.
2014-01-31 Marek Polacek <polacek@redhat.com>
PR c/59963
* c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
build_function_call_vec.
(build_function_call): Likewise.
(build_atomic_assign): Likewise.
(build_function_call_vec): Add arg_loc parameter. Use it.
(convert_arguments): Likewise.
(convert_for_assignment): Rename rhs_loc to expr_loc.
* c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
(c_parser_objc_keywordexpr): Likewise.
(c_parser_postfix_expression_after_primary): Call
build_function_call_vec with expr_loc rather than op_loc.
Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
build_function_call_vec.
(c_parser_expr_list): Add locations parameter. Fill it with locations
of function arguments.
* c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2014-01-30 Marek Polacek <polacek@redhat.com>
PR c/59940
* c-typeck.c (build_function_call_vec): Use loc parameter.
(convert_arguments): Add location parameter. Use it.
(ep_convert_and_check): Likewise.
(build_atomic_assign): Adjust convert_for_assignment call.
(build_modify_expr): Likewise.
(digest_init): Likewise.
(c_finish_return): Likewise.
(build_conditional_expr): Adjust ep_convert_and_check calls.
(convert_for_assignment): Add rhs_loc parameter. Use it.
(build_binary_op): Adjust convert_and_check and ep_convert_and_check
calls.
2014-01-30 Richard Biener <rguenther@suse.de>
PR c/59905
* c-typeck.c (build_function_call_vec): Do not replace calls
to a function via an incompatible type with a runtime abort.
2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-parser.c (c_parser_declaration_or_fndef): Replaced
flag_enable_cilkplus with flag_cilkplus.
(c_parser_direct_declarator_inner): Likewise.
(c_parser_attribute_any_word): Likewise.
(c_parser_attributes): Likewise.
(c_parser_compound_statement): Likewise.
(c_parser_statement_after_labels): Likewise.
(c_parser_if_statement): Likewise.
(c_parser_switch_statement): Likewise.
(c_parser_do_statement): Likewise.
(c_parser_for_statement): Likewise.
(c_parser_unary_expression): Likewise.
(c_parser_postfix_expression): Likewise.
(c_parser_postfix_expression_after_primary): Likewise.
(c_parser_postfix_expression_after_primary): Likewise.
(c_parser_omp_clause_name): Likewise.
(c_finish_omp_declare_simd): Likewise.
(c_parser_cilk_verify_simd): Likewise.
* c-typeck.c (build_array_ref): Likewise.
(build_function_call_vec): Likewise.
(convert_arguments): Likewise.
(build_compound_expr): Likewise.
(c_finish_return): Likewise.
(c_finish_if_stmt): Likewise.
(c_finish_loop): Likewise.
(build_binary_op): Likewise.
2014-01-23 Marek Polacek <polacek@redhat.com>
PR c/59846
* c-typeck.c (parser_build_binary_op): Use location instead of
input_location.
(build_binary_op): Pass location to shorten_compare.
2014-01-23 Marek Polacek <polacek@redhat.com>
PR c/58346
* c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
an empty aggregate.
2014-01-23 Marek Polacek <polacek@redhat.com>
PR c/59871
* c-typeck.c (build_compound_expr): Warn even for right-hand operand
of a comma expression.
(emit_side_effect_warnings): Likewise.
2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
PR c/59825
* c-array-notation.c (expand_array_notation_exprs): Rewrote this
function to use walk_tree and moved a lot of its functionality to
expand_array_notations.
(expand_array_notations): New function.
2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
attribute an attribute without value.
2014-01-23 Jakub Jelinek <jakub@redhat.com>
PR middle-end/58809
* c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2014-01-22 Marek Polacek <polacek@redhat.com>
PR c/59891
* c-typeck.c (build_conditional_expr): Call c_fully_fold instead
of remove_c_maybe_const_expr on op1 and op2.
2014-01-15 Jakub Jelinek <jakub@redhat.com>
PR c/58943
* c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
effects, preevaluate rhs using SAVE_EXPR first.
2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
PR c++/59631
* c-parser.c (c_parser_postfix_expression): Replaced consecutive if
statements with if-elseif statements.
2014-01-06 Marek Polacek <polacek@redhat.com>
PR c/57773
* c-decl.c (check_bitfield_type_and_width): Warn for implementation
defined bit-field types only in ISO C.
2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
Update copyright years
2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
* c-array-notation.c: Use the standard form for the copyright notice.
2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
(c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
field in parser is not empty. If not-empty, call the function
c_parser_finish_omp_declare_simd.
(c_parser_cilk_clause_vectorlength): Modified function to be shared
between SIMD-enabled functions and #pragma simd. Added new parameter.
(c_parser_cilk_all_clauses): Modified the usage of the function
c_parser_cilk_clause_vectorlength as mentioned above.
(c_parser_cilk_simd_fn_vector_attrs): New function.
(c_finish_cilk_simd_fn_tokens): Likewise.
(is_cilkplus_vector_p): Likewise.
(c_parser_omp_clause_name): Added checking for "vectorlength,"
"nomask," and "mask" strings in clause name.
(c_parser_omp_all_clauses): Added 3 new case statements:
PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
PRAGMA_CILK_CLAUSE_NOMASK.
(c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
check for vector attribute and if so call the function
c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
called the function c_finish_cilk_simd_fn_tokens.
(c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
parser field is non-empty. If so, parse them as you would parse
the omp declare simd pragma.
(c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
Added a check when step is a parameter and flag it as error.
(CILK_SIMD_FN_CLAUSE_MASK): New #define.
(c_parser_cilk_clause_name): Changed pragma_cilk_clause to
pragma_omp_clause.
2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
* c-parser.c (c_parser_omp_parallel): Fix description.
2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
(LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
(LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
* c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
2013-12-04 Joseph Myers <joseph@codesourcery.com>
PR c/52023
* c-parser.c (c_parser_alignas_specifier): Use
c_sizeof_or_alignof_type instead of c_alignof.
(c_parser_alignof_expression): Likewise, with min_alignof
parameter depending on alignof spelling used.
2013-12-04 Marek Polacek <polacek@redhat.com>
PR c/54113
* c-decl.c (start_function): Don't warn for missing prototype for
inline functions.
2013-12-03 Marek Polacek <polacek@redhat.com>
PR c/59351
* c-decl.c (build_compound_literal): Allow compound literals with
empty initial value.
2013-12-02 Joseph Myers <joseph@codesourcery.com>
PR c/58235
* c-typeck.c (build_modify_expr): Diagnose assignment to
expression with array type.
2013-11-29 Joseph Myers <joseph@codesourcery.com>
PR c/42262
* c-typeck.c (process_init_element): Do not treat a string as
initializing a whole array when used with a designator for an
individual element.
2013-11-29 Joseph Myers <joseph@codesourcery.com>
PR c/57574
* c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
an inline function following a static declaration.
2013-11-28 Jakub Jelinek <jakub@redhat.com>
PR c/59310
* c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
to p_name before calling c_parser_omp_teams instead of after.
(c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
argument. Remove unused p_name variable.
2013-11-27 Aldy Hernandez <aldyh@redhat.com>
Jakub Jelinek <jakub@redhat.com>
* c-decl.c (c_builtin_function_ext_scope): Avoid binding if
external_scope is NULL.
2013-11-27 Tom de Vries <tom@codesourcery.com>
Marc Glisse <marc.glisse@inria.fr>
PR c++/59032
* c-typeck.c (build_unary_op): Allow vector increment and decrement.
2013-11-22 Andrew MacLeod <amacleod@redhat.com>
* c-typeck.c: Add required include files from gimple.h.
2013-11-22 David Malcolm <dmalcolm@redhat.com>
* c-decl.c (define_label, shadow_tag_warned)
(check_bitfield_type_and_width, grokdeclarator, grokparms,
store_parm_decls_newstyle, store_parm_decls_oldstyle)
(declspecs_add_type): Remove use of in_system_header macro.
* c-parser.c (c_parser_unary_expression): Likewise.
* c-typeck.c (store_init_value, process_init_element)
(c_start_case): Likewise.
* c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
macro.
* c-parser.c (c_parser_set_source_position_from_token): Remove
reference to in_system_header from comment.
2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
* c-decl.c (grokdeclarator): Update comment to refer to
tree_to_[su]hwi rather than tree_low_cst.
2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
* c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
tree_to_uhwi throughout.
2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
* c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
throughout.
2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
* c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
throughout.
2013-11-15 Aldy Hernandez <aldyh@redhat.com>
* c-parser.c (c_parser_cilk_simd): New.
(c_parser_cilk_verify_simd): New.
(c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
(c_parser_omp_for_loop): Add case for NE_EXPR.
Set c_break_label for CILK_SIMD.
(c_parser_cilk_clause_vectorlength): New.
(c_parser_cilk_clause_linear): New.
(c_parser_cilk_clause_name): New.
(c_parser_cilk_all_clauses): New.
* c-typeck.c (build_unary_op): Pass location argument to
readonly_error.
(build_modify_expr): Same.
(build_asm_expr): Same.
(c_finish_bc_stmt): Error on break/continue in loops.
2013-11-14 Andrew MacLeod <amacleod@redhat.com>
* c-typeck.c: Include only gimplify.h and gimple.h as needed.
2013-11-14 Diego Novillo <dnovillo@google.com>
* c-decl.c: Include print-tree.h.
Include stor-layout.h.
Include varasm.h.
Include attribs.h.
Include stringpool.h.
* c-lang.c: Include fold-const.h.
* c-parser.c: Include stringpool.h.
Include attribs.h.
Include stor-layout.h.
Include varasm.h.
Include trans-mem.h.
* c-typeck.c: Include stor-layout.h.
Include trans-mem.h.
Include varasm.h.
Include stmt.h.
2013-11-13 Joseph Myers <joseph@codesourcery.com>
* c-tree.h (c_typespec_keyword): Add cts_auto_type.
* c-decl.c (declspecs_add_type, finish_declspecs): Handle
__auto_type.
* c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
(c_parser_attribute_any_word, c_parser_objc_selector): Handle
RID_AUTO_TYPE.
(c_parser_declspecs): Take argument AUTO_TYPE_OK.
(c_parser_declaration_or_fndef, c_parser_struct_declaration)
(c_parser_declarator, c_parser_direct_declarator_inner)
(c_parser_parameter_declaration, c_parser_type_name): All callers
changed.
(c_parser_declaration_or_fndef): Handle declarations with type
determined from the initializer.
2013-11-12 Andrew MacLeod <amacleod@redhat.com>
* c-typeck.c: Include gimplify.h.
2013-11-12 Joseph Myers <joseph@codesourcery.com>
* c-tree.h (struct c_declspecs): Add thread_gnu_p field.
* c-parser.c (c_parser_declspecs): Mention _Thread_local in
comment.
* c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
or _Thread_local as appropriate in diagnostics.
(build_null_declspecs): Initialize ret->thread_gnu_p.
(declspecs_add_scspec): Handle either __thread or _Thread_local
for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
pedantic. Do not disallow _Thread_local extern and _Thread_local
static.
2013-11-07 Joseph Myers <joseph@codesourcery.com>
Andrew MacLeod <amacleod@redhat.com>
* c-aux-info.c (gen_type): Handle atomic qualifier.
* c-decl.c (validate_proto_after_old_defn): Do not remove atomic
qualifiers when compating types.
(shadow_tag_warned): Handle atomic_p in declspecs.
(quals_from_declspecs): Likewise.
(start_decl): Use c_type_promotes_to when promoting argument
types.
(grokdeclarator): Handle _Atomic.
(get_parm_info): Diagnose any qualifier on "void" as only
parameter.
(store_parm_decls_oldstyle): Do not remove atomic qualifiers when
comparing types. Use c_type_promotes_to when promoting argument
types.
(finish_function): Use c_type_promotes_to when promoting argument
types.
(build_null_declspecs): Handle atomic_p in declspecs.
(declspecs_add_qual): Handle RID_ATOMIC.
* c-parser.c (c_token_starts_typename, c_token_is_qualifier)
(c_token_starts_declspecs): Handle RID_ATOMIC.
(c_parser_declspecs): Handle atomic type specifiers and
qualifiers.
(c_parser_typeof_specifier): Remove const and _Atomic qualifiers
from types of expressions with atomic type.
(c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
(c_parser_attribute_any_word): Handle RID_ATOMIC.
(c_parser_initializer, c_parser_initelt, c_parser_initval)
(c_parser_statement_after_labels, c_parser_switch_statement)
(c_parser_for_statement, c_parser_expr_no_commas)
(c_parser_conditional_expression, c_parser_binary_expression)
(c_parser_cast_expression, c_parser_unary_expression)
(c_parser_postfix_expression)
(c_parser_postfix_expression_after_primary, c_parser_expression):
Use convert_lvalue_to_rvalue.
(c_parser_expression_conv, c_parser_expr_list): Document
conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
(c_parser_objc_synchronized_statement): Use
convert_lvalue_to_rvalue.
(c_parser_objc_selector): Handle RID_ATOMIC.
(c_parser_objc_receiver, c_parser_array_notation): Use
convert_lvalue_to_rvalue.
* c-tree.h (ctsk_typeof): Adjust comment to mention use for
_Atomic (type-name).
(struct c_declspecs): Add atomic_p field.
(convert_lvalue_to_rvalue): Declare.
* c-typeck.c (c_type_promotes_to): Promote atomic types to
corresponding atomic types.
(qualify_type): Don't add _Atomic qualifiers from second argument.
(comp_target_types): Do not allow _Atomic mismatches.
(type_lists_compatible_p): Do not remove atomic qualifiers when
comparing types.
(really_atomic_lvalue, convert_lvalue_to_rvalue)
(build_atomic_assign): New functions.
(build_unary_op): Use build_atomic_assign for atomic increment and
decrement.
(build_conditional_expr): Do not treat _Atomic void as a qualified
version of void.
(build_modify_expr): Use build_atomic_assign for atomic LHS.
(find_anonymous_field_with_type, convert_to_anonymous_field)
(convert_for_assignment): Do not remove atomic qualifiers when
comparing types.
(digest_init): Do not accept initialization of arrays of atomic
elements by string constants.
(build_asm_expr): Use convert_lvalue_to_rvalue.
(build_binary_op): Do not treat _Atomic void as a qualified
version of void.
2013-11-06 DJ Delorie <dj@redhat.com>
* c-decl.c (locate_old_decl): If a previous conflicting decl is
both explicit and builtin, print the location of the explicit one.
2013-11-05 Tobias Burnus <burnus@net-b.de>
* c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
c_parser_omp_distribute, c_parser_omp_teams,
c_parser_omp_target, c_parser_omp_declare): Handle
-fopenmp-simd.
2013-11-03 Marek Polacek <polacek@redhat.com>
* c-decl.c (grokdeclarator): Add VLA instrumentation.
2013-11-01 Jakub Jelinek <jakub@redhat.com>
* c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
check_dup_generic at the end, unless remove is true.
(c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
remove = true;.
(c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
2013-10-31 Jakub Jelinek <jakub@redhat.com>
* c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
with decl that is not pointer nor array.
2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-decl.c (finish_function): Added a call for insert_cilk_frame when
a spawning function is found.
* c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
(LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
(LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
* c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
case.
(c_parser_postfix_expression): Added RID_CILK_SPAWN case.
* c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
expr.
(c_finish_return): Added a check to reject _Cilk_spawn in return
expression.
(build_cilk_spawn): New function.
(build_cilk_sync): Likewise.
* Makefile.in (c-decl.o): Added cilk.h in dependency list.
2013-10-27 Tobias Burnus <burnus@net-b.de>
PR other/33426
* c-parser.c (c_parser_while_statement, c_parser_while_statement,
c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
(c_parser_statement_after_labels): Update calls.
2013-10-24 Tobias Burnus <burnus@net-b.de>
PR other/33426
* c-parser.c (c_parser_pragma, c_parser_for_statement):
Handle PRAGMA_IVDEP.
(c_parser_statement_after_labels): Update call.
2013-10-24 Marek Polacek <polacek@redhat.com>
* c-parser.c (c_parser_struct_declaration): Add a comment.
(c_parser_declarator): Don't allow _Alignas here.
2013-10-17 Andrew MacLeod <amacleod@redhat.com>
* c-parser.c: Include omp-low.h.
* c-typeck.c: Likewise.
2013-10-17 Marek Polacek <polacek@redhat.com>
PR c/58267
* c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
Document syntax of the array-declarator.
(c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
are not permitted.
(c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
(c_parser_struct_declaration): Likewise.
(c_parser_declarator): Likewise.
(c_parser_direct_declarator_inner): Likewise.
(c_parser_parameter_declaration): Likewise.
(c_parser_type_name): Likewise.
2013-10-11 Jakub Jelinek <jakub@redhat.com>
* c-lang.h (current_omp_declare_target_attribute): New extern
decl.
* c-parser.c: Include c-lang.h.
(struct c_parser): Change tokens to c_token *.
Add tokens_buf field. Change tokens_avail type to unsigned int.
(c_parser_consume_token): If parser->tokens isn't
&parser->tokens_buf[0], increment parser->tokens.
(c_parser_consume_pragma): Likewise.
(enum pragma_context): Add pragma_struct and pragma_param.
(c_parser_external_declaration): Adjust
c_parser_declaration_or_fndef caller.
(c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
Adjust recursive call.
(c_parser_struct_or_union_specifier): Use pragma_struct instead
of pragma_external.
(c_parser_parameter_declaration): Use pragma_param instead of
pragma_external.
(c_parser_compound_statement_nostart, c_parser_label,
c_parser_for_statement): Adjust
c_parser_declaration_or_fndef callers.
(c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
it through to c_parser_conditional_expression.
(c_parser_conditional_expression): Add omp_atomic_lhs argument,
pass it through to c_parser_binary_expression. Adjust recursive
call.
(c_parser_binary_expression): Remove prec argument, add
omp_atomic_lhs argument instead. Always start from PREC_NONE, if
omp_atomic_lhs is non-NULL and one of the arguments of toplevel
binop matches it, use build2 instead of parser_build_binary_op.
(c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
Handle pragma_struct and pragma_param the same as pragma_external.
(c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
(c_parser_omp_variable_list): Parse array sections for
OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
(c_parser_omp_clause_collapse): Fully fold collapse expression.
(c_parser_omp_clause_reduction): Handle user defined reductions.
(c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
c_parser_omp_clause_depend, c_parser_omp_clause_map,
c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
(c_parser_omp_all_clauses): Add finish_p argument. Don't call
c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
(c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
(c_parser_omp_for_loop): Add CODE argument, pass it through
to c_finish_omp_for. Change last argument to cclauses,
and adjust uses to grab parallel clauses from the array of all
the split clauses. Adjust c_parser_binary_expression,
c_parser_declaration_or_fndef and c_finish_omp_for callers.
(omp_split_clauses): New function.
(c_parser_omp_simd): New function.
(c_parser_omp_for): Add p_name, mask and cclauses arguments.
Allow the function to be called also when parsing combined constructs,
and call c_parser_omp_simd when parsing for simd.
(c_parser_omp_sections_scope): If section-sequence doesn't start with
#pragma omp section, require exactly one structured-block instead of
sequence of statements.
(c_parser_omp_sections): Add p_name, mask and cclauses arguments.
Allow the function to be called also when parsing combined constructs.
(c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
Allow the function to be called also when parsing combined
constructs.
(c_parser_omp_taskgroup, c_parser_omp_cancel,
c_parser_omp_cancellation_point, c_parser_omp_distribute,
c_parser_omp_teams, c_parser_omp_target_data,
c_parser_omp_target_update, c_parser_omp_target,
c_parser_omp_declare_simd, c_finish_omp_declare_simd,
c_parser_omp_declare_target, c_parser_omp_end_declare_target,
c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
(c_parser_omp_construct): Add p_name and mask vars. Handle
PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
and c_parser_omp_sections callers.
(c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
(OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
(OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
(OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
OMP_CLAUSE_DEPEND.
(OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
* c-typeck.c: Include tree-inline.h.
(c_finish_omp_cancel, c_finish_omp_cancellation_point,
handle_omp_array_sections_1, handle_omp_array_sections,
c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
(c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
user defined reductions.
(c_tree_equal): New function.
* c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
c_check_omp_declare_reduction_r): New prototypes.
* c-decl.c (current_omp_declare_target_attribute): New variable.
(c_decl_attributes): New function.
(start_decl, start_function): Use it instead of decl_attributes.
(temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
c_omp_reduction_decl, c_omp_reduction_lookup,
c_check_omp_declare_reduction_r): New functions.
2013-09-25 Tom Tromey <tromey@redhat.com>
* Make-lang.in (c/gccspec.o): Remove.
(CFLAGS-c/gccspec.o): New variable.
(cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
(c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
(c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
2013-09-25 Tom Tromey <tromey@redhat.com>
* Make-lang.in (c/gccspec.o): Don't use subshell.
2013-09-18 Marek Polacek <polacek@redhat.com>
PR sanitize/58443
* c-typeck.c (build_binary_op): Properly honor -fsanitize options.
Remove unnecessary check.
2013-09-18 Marek Polacek <polacek@redhat.com>
PR sanitizer/58411
* c-typeck.c (build_binary_op): Don't sanitize function if it has the
no_sanitize_undefined attribute.
2013-09-13 Kai Tietz <ktietz@redhat.com>
PR target/57848
* c-decl.c (c_builtin_function_ext_scope): Remove
wrong assumption that it is never called on prexisting
symbol.
2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
* c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
* c-objc-common.c (c_tree_printer): Tidy.
2013-08-30 Marek Polacek <polacek@redhat.com>
* c-typeck.c (build_binary_op): Add division by zero and shift
instrumentation.
2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
Joseph Myers <joseph@codesourcery.com>
PR c/35649
* c-typeck.c (c_common_type): Prefer double_type_node over
other REAL_TYPE types with the same precision.
(convert_arguments): Likewise.
2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
* c-objc-common.c (c_tree_printer): Document the nature of the cast.
(c_initialize_diagnostics): Call a destructor for the early printer.
2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
* c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
printer initialization.
2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
PR c/57490
* c-array-notation.c (fix_conditional_array_notations_1): Added a
check for truth values.
(expand_array_notation_exprs): Added truth values case. Removed an
unwanted else. Added for-loop to walk through subtrees in default
case.
2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
* c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
2013-07-23 Joseph Myers <joseph@codesourcery.com>
* c-parser.c (struct c_generic_association): Fix typo.
2013-07-23 Tom Tromey <tromey@redhat.com>
Joseph Myers <joseph@codesourcery.com>
* c-parser.c (struct c_generic_association): New.
(c_generic_association_d): New typedef.
(c_parser_generic_selection): New function.
(c_parser_postfix_expression): Handle RID_GENERIC.
2013-07-13 Jason Merrill <jason@redhat.com>
PR c++/57793
* c-decl.c (finish_struct): Check for too-large class.
2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
PR c/57821
* c-typeck.c (set_init_index): When folding, check for index overflow.
2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-parser.c (c_parser_array_notation): Removed rejection of array
notations in an array of function pointers.
2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-array-notation.c (make_triplet_val_inv): New function.
(create_cmp_incr): Likewise.
(create_array_refs): Likewise.
(fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
Also modularized common parts between functions and called the function.
(build_array_notation_expr): Likewise.
(fix_conditional_array_notations_1): Likewise.
(fix_array_notation_expr): Likewise.
(fix_array_notation_call_expr): Likewise.
2013-06-18 Marek Polacek <polacek@redhat.com>
PR c/57630
* c-decl.c (check_for_loop_decls): Improve diagnostics messages.
2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-array-notation.c (build_array_notation_expr): Reject array notation
mismatch between LHS and RHS even inside a call_expr. Also, removed
a couple while statements that were dead code.
2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
excessive precision expressions in function parameters. Also removed
couple unwanted while statements.
2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-array-notation.c (expand_array_notation_exprs): Added
ARRAY_NOTATION_REF case.
2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-array-notation.c (length_mismatch_in_expr_p): Moved this
function to c-family/array-notation-common.c.
(is_cilkplus_reduce_builtin): Likewise.
(find_rank): Likewise.
(extract_array_notation_exprs): Likewise.
(replace_array_notations): Likewise.
(find_inv_trees): Likewise.
(replace_inv_trees): Likewise.
(contains_array_notation_expr): Likewise.
(find_correct_array_notation_type): Likewise.
(replace_invariant_exprs): Initialized additional_tcodes to NULL.
(struct inv_list): Moved this to c-family/array-notation-common.c.
* c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
reduction functions outside the for-loop. Added a check if the fundecl
is non-NULL. Finally, removed an unwanted if-statement, and made the
body unconditional.
2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
condition of the if-statement matches the rank of else-block and then-
block when array notations are used.
* c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
expression after the entire function body is parsed.
(c_parser_expr_no_commas): Delayed creating array notation expressions
to the end of function parsing.
* c-array-notation.c (fix_conditional_array_notations_1): Expanded the
whole if-statement instead of just the condition.
(expand_array_notation_exprs): Added MODIFY_EXPR case.
2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
PR c/57474
* c-array-notation.c (build_array_notation_expr): Initialized rhs_length
array to NULL_TREE if they are unused. Also added a check for the
field to be NULL before its fields are used in future.
2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR bootstrap/57450
* c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
(build_array_notation_expr): Likewise.
2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-typeck.c (build_array_ref): Added a check to see if array's
index is greater than one. If true, then emit an error.
(build_function_call_vec): Exclude error reporting and checking
for builtin array-notation functions.
(convert_arguments): Likewise.
(c_finish_return): Added a check for array notations as a return
expression. If true, then emit an error.
(c_finish_loop): Added a check for array notations in a loop
condition. If true then emit an error.
(lvalue_p): Added a ARRAY_NOTATION_REF case.
(build_binary_op): Added a check for array notation expr inside
op1 and op0. If present, we call another function to find correct
type.
* Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
* c-parser.c (c_parser_compound_statement): Check if array
notation code is used in tree, if so, then transform them into
appropriate C code.
(c_parser_expr_no_commas): Check if array notation is used in LHS
or RHS, if so, then build array notation expression instead of
regular modify.
(c_parser_postfix_expression_after_primary): Added a check for
colon(s) after square braces, if so then handle it like an array
notation. Also, break up array notations in unary op if found.
(c_parser_direct_declarator_inner): Added a check for array
notation.
(c_parser_compound_statement): Added a check for array notation in
a stmt. If one is present, then expand array notation expr.
(c_parser_if_statement): Likewise.
(c_parser_switch_statement): Added a check for array notations in
a switch statement's condition. If true, then output an error.
(c_parser_while_statement): Similarly, but for a while.
(c_parser_do_statement): Similarly, but for a do-while.
(c_parser_for_statement): Similarly, but for a for-loop.
(c_parser_unary_expression): Check if array notation is used in a
pre-increment or pre-decrement expression. If true, then expand
them.
(c_parser_array_notation): New function.
* c-array-notation.c: New file.
* c-tree.h (is_cilkplus_reduce_builtin): Protoize.
2013-05-23 Mike Stump <mikestump@comcast.net>
* c-typeck.c (convert_for_assignment): Handle references to memory
spaces better.
2013-05-16 Jason Merrill <jason@redhat.com>
* Make-lang.in (cc1$(exeext)): Use link mutex.
2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
* c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
to simply use OPT_Wpointer_arith.
(build_unary_op): Likewise.
2013-04-03 Jakub Jelinek <jakub@redhat.com>
PR c/19449
* c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
argument. If set, or it temporarily for parsing of the first
argument into force_folding_builtin_constant_p.
(c_parser_postfix_expression): Adjust callers.
2013-03-21 Richard Biener <rguenther@suse.de>
* c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2013-02-12 Marek Polacek <polacek@redhat.com>
PR c/44938
* c-parser.c (c_parser_postfix_expression_after_primary): Initialize
origtypes to NULL.
2013-01-24 Jakub Jelinek <jakub@redhat.com>
PR c/56078
* c-typeck.c (set_nonincremental_init_from_string): If
constructor_max_index is NULL, treat it as if tree_int_cst_lt
returned false.
(process_init_element): Likewise.
2012-12-20 Jakub Jelinek <jakub@redhat.com>
PR c++/55619
* c-parser.c (c_parser_asm_operands): Remove CONVERT_P
argument, don't call default_function_array_conversion
nor c_fully_fold here.
(c_parser_asm_statement): Adjust callers.
* c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
and outputs here, and call default_function_array_conversion
on inputs that don't need to be addressable.
2012-12-18 Jakub Jelinek <jakub@redhat.com>
PR c/39464
* c-typeck.c (convert_for_assignment): For -Wpointer-sign
warning require that both c_common_unsigned_type as well as
c_common_signed_type is the same for both mvl and mvr types.
2012-11-16 Diego Novillo <dnovillo@google.com>
Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
* c-common.c: Use new vec API in vec.h.
* c-common.h: Likewise.
* c-gimplify.c: Likewise.
* c-pragma.c: Likewise.
* c-pretty-print.c: Likewise.
* c-pretty-print.h: Likewise.
* c-semantics.c: Likewise.
* c-decl.c: Likewise.
* c-parser.c: Likewise.
* c-tree.h: Likewise.
* c-typeck.c: Likewise.
2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
PR c++/54930
* c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/53066
* c-decl.c (warn_if_shadowing): Do not warn if a variable
shadows a function, unless the variable is a function or a
pointer-to-function.
2012-10-12 Jakub Jelinek <jakub@redhat.com>
PR c/54381
* c-parser.c (struct c_tree_loc_pair): Removed.
(c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
add location_t * and tree * arguments, fill in array of 3
sizeof_arg trees and corresponding locs.
(c_parser_attributes, c_parser_objc_keywordexpr): Adjust
c_parser_expr_list callers.
(c_parser_postfix_expression_after_primary): Likewise. Pass
array of 3 sizeof_arg trees and locs (corresponding to first
3 arguments) to sizeof_pointer_memaccess_warning.
2012-10-09 Lawrence Crowl <crowl@google.com>
* Make-lang.in (c-decl.o): Add dependence on hash-table.h.
* c-decl.c (detect_field_duplicates_hash): Change to new type-safe
hash table.
2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/54194
* c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
call.
2012-10-09 Marc Glisse <marc.glisse@inria.fr>
PR c++/54427
* c-typeck.c: Include c-common.h.
(enum stv_conv): Moved to c-common.h.
(scalar_to_vector): Moved to c-common.c.
(build_binary_op): Adapt to scalar_to_vector's new prototype.
* Make-lang.in: c-typeck.c depends on c-common.h.
2012-10-04 Arnaud Charlet <charlet@adacore.com>
* c-decl.c (c_write_global_declarations): Fix handling of
-fdump-ada-spec*.
2012-09-30 Sharad Singhai <singhai@google.com>
* c-decl.c (c_write_global_declarations): Use a different method
to determine if the dump has ben initialized.
2012-09-14 Joseph Myers <joseph@codesourcery.com>
PR c/54552
* c-typeck.c (c_cast_expr): When casting to a type requiring
C_MAYBE_CONST_EXPR to be created, pass the inner expression to
c_fully_fold first.
2012-09-14 Joseph Myers <joseph@codesourcery.com>
PR c/54103
* c-typeck.c (build_unary_op): Pass original argument of
TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
any C_MAYBE_CONST_EXPR, if it has integer operands.
(build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
to c_objc_common_truthvalue_conversion, then remove any
C_MAYBE_CONST_EXPR, if they have integer operands. Use
c_objc_common_truthvalue_conversion not
c_common_truthvalue_conversion.
(c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
call note_integer_operands for arguments with integer operands
that are not integer constants.
2012-09-13 Jakub Jelinek <jakub@redhat.com>
PR c/54559
* c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2012-08-31 Jakub Jelinek <jakub@redhat.com>
PR c/54428
* c-convert.c (convert): Don't call fold_convert_loc if
TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2012-08-24 Jakub Jelinek <jakub@redhat.com>
PR c/54355
* c-decl.c (c_parser_label): Pass true as nested and fix up comments
for nested and empty_ok arguments in the call to
c_parser_declaration_or_fndef.
2012-08-17 Jakub Jelinek <jakub@redhat.com>
* c-tree.h (c_last_sizeof_arg): Declare.
* c-parser.c (struct c_tree_loc_pair): New type.
(c_parser_expr_list): Add sizeof_arg argument. Fill it in if
non-NULL.
(c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
(c_parser_postfix_expression_after_primary): Likewise. Call
sizeof_pointer_memaccess_warning if needed.
(sizeof_ptr_memacc_comptypes): New function.
* c-typeck.c (c_last_sizeof_arg): New global variable.
(c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2012-07-24 Uros Bizjak <ubizjak@gmail.com>
* c-lang.h (lang_decl): Add variable_size GTY option.
2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
* c-decl.c: Include dumpfile.h instead of tree-dump.h.
* Make-lang.in: Fix dependencies.
2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
* Make-lang.in: New file, rules migrated from gcc/Makefile.in
and add language Makefile hooks.
* config-lang.in: New file.
* c-config-lang.in: Moved from gcc/config-lang.in to here, and
add the required "normal" config-lang.in rules.
* c-lang.h: Moved from gcc/ to here.
* c-tree.h: Likewise.
* c-objc-common.c: Likewise.
* c-objc-common.h: Likewise.
* c-typeck.c: Likewise.
* c-convert.c: Likewise.
* c-lang.c: Likewise.
* c-aux-info.c: Likewise.
* c-errors.c: Likewise.
* gccspec.c: Likewise.
* c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
* c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
Copyright (C) 2012-2016 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
|