1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524 8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 8652 8653 8654 8655 8656 8657 8658 8659 8660 8661 8662 8663 8664 8665 8666 8667 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481 9482 9483 9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 9600 9601 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 9761 9762 9763 9764 9765 9766 9767 9768 9769 9770 9771 9772 9773 9774 9775 9776 9777 9778 9779 9780 9781 9782 9783 9784 9785 9786 9787 9788 9789 9790 9791 9792 9793 9794 9795 9796 9797 9798 9799 9800 9801 9802 9803 9804 9805 9806 9807 9808 9809 9810 9811 9812 9813 9814 9815 9816 9817 9818 9819 9820 9821 9822 9823 9824 9825 9826 9827 9828 9829 9830 9831 9832 9833 9834 9835 9836 9837 9838 9839 9840 9841 9842 9843 9844 9845 9846 9847 9848 9849 9850 9851 9852 9853 9854 9855 9856 9857 9858 9859 9860 9861 9862 9863 9864 9865 9866 9867 9868 9869 9870 9871
|
2023-07-26 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (search_set_keys): improving SEARCH ALL syntax checks
2023-07-25 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_entry_function): if COBOL CALL convention is
used, then only use local pointers for specifying not-passed
arguments, improving support for omission of trailing (optional)
parameters in CALL
* config.def, codegen.c, typeck.c: added using-optional dialect option;
if set to "ok" the check for not-passed arguments will only be done
on program entry for all parameters not explicit specified as OPTIONAL
* parser.y (_procedure_optional): added checks for cb_using_optional,
if OPTIONAL used and set to "warning", then reset it to "ok" after first
warning
* codegen.c (output_entry_function): generate checks for
EC-PROGRAM-ARG-MISMATCH validating that non-optional arguments are
passed and if passed then checks its minimal size
2023-07-24 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (entry_statement): don't check parameter address
directly on ENTRY, because it just assigns it
* codegen.c (output_internal_function, output_entry_function): moved
setting of non-passed parameters to NULL to entry function as we only
have ordinal CALL numbers available there; set BY VALUE parameters to
zero instead of NULL
* codegen.c (output_field_no_target): extracted to reduce code duplication
* typeck.c (cb_emit_call): fixed skipping memory-fence generation for
EXTERNAL/BASED sub-fields
2023-07-22 Simon Sobisch <simonsobisch@gnu.org>
* field.c (compute_size): inspect field storage to check for
the appropriate field size limit
* tree.h (cb_field): new flag_above_unbounded
* tree.c (cb_field_has_unbounded), tree.h: removed; use
flag_above_unbounded in callers (typeck.c, cobc.c) instead
* parser.y (occurs_clause): set flag_above_unbounded in parents
2023-07-21 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (refmod_checks): fixed ec-bound-refmod checks for UNBOUNDED
* field.c (compute_size): take fields before the UNBOUNDED field into
account when calculating its maximum elements;
fix compiler crash if DEPENDING field does not exist
* parser.y (validated_field_reference): extracted from (identifier_field)
and used in all places with the exact same code
2023-07-20 Simon Sobisch <simonsobisch@gnu.org>
* field.c (copy_validation): new function
* field.c (copy_validation, copy_into_field): handling validation
* cobc.c (print_fields): leave a hint to field being TYPEDEF
* cobc.c (xref_fields): dont output references for TYPEDEF sub items
2023-07-19 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (refmod_checks): extracted from (cb_build_identifier)
* typeck.c (refmod_checks): prevent condition-names to be reference-modified
* parser.y (class_value): improved error messages
* tree.c (cb_build_cast): set numeric category for all integer casts
2023-07-15 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_build_identifier): allow ref-mod up to identifier length
* typeck.c (cb_build_identifier): new warning for suspicious reference-
modification with start or length set to maximum and the other to var
* typeck.c (cb_build_move_literal): optimize to cb_build_move_num_zero in
more cases
2023-07-13 Simon Sobisch <simonsobisch@gnu.org>
* pplex.l (cb_ppecho_direct, output_pending_newlines): output only up
to 9 empty lines, for more empty lines in the preparsed output file
generate a matching #line directive, this saves both space and serves
as a workaround for an unclear scanner bug that may happen with huge
amounts of empty lines
* pplex.l (switch_to_buffer): don't re-strdup the filename
* parser.y (emit_statement): changed from define to inline function
* codegen.c: complete output of program's end source location if requested
* scanner.l: handle line directive in any state
* warning.def, typeck.c (validate_move), cobc.c (process_command_line):
* use existing -Wstrict-typing only for "strict" type mismatches, including
"same size, different type" and move it to -Wextra; the other mismatches
are still raised with -Wall but under the new -Wtyping
2023-07-11 Fabrice Le Fessant <fabrice.le_fessant@ocamlpro.com>
* parser.y: fix code generation for OPEN/CLOSE with multiple
filenames, where DECLARATIVES for all arguments were called when
only one argument failed
2023-07-10 Simon Sobisch <simonsobisch@gnu.org>
check for internal memory bounds with new flag "memory-check"
* flag.def, cobc.c (cobc_deciph_memory_check), tree.h: new compile
flag -fmemory-check, implied with --debug
* typeck.c (cb_emit_call), tree.h (cb_field): new field attribute
flag_used_in_call
* codegen.c (output_local_base_cache, output_nonlocal_base_cache):
generate fencing data fields for fields with flag_used_in_call
* codegen.c (output_call_cache): generate fencing data fields for
cob_call_union fields (call pointers)
* codegen.c (output_memory_check_call): new function to output
generate fencing data fields for flag_used_in_call
* codeoptim.def, codeoptim.c, codegen.c: new entry
COB_CHK_MEMORYFENCE
additional
* codegen.c: only increment/decrement output_indent_level by
indent_adjust_level
2023-07-07 Simon Sobisch <simonsobisch@gnu.org>
common preparser cleanup
* ppparse.y: error recovery for COPY and REPLACE (consume until DOT
instead of until EOF)
* ppparse.y: renamed "TOKEN" from "Identifier" to "Word", adjust
some terminals prefixing it with leading underscore as optional
Bug #890 wrong reference in COPY diagnostic
* ppparse.y: switch to new buffer after parsing DOT, not before
Bug #23 several replacement values create parser errors
* pplex.l: split REPLACE_STATE and REPLACING_STATE from COPY_STATE
to limit their reserved word list to the applicable ones and to
improve error handling
* ppparse.y: explicit parse IN and OF as single replacement words
2023-07-06 Fabrice Le Fessant <fabrice.le_fessant@ocamlpro.com>
* replace.c: rewrite the code for preprocessing with a two-phase
algorithm. The first phase performs COPY REPLACING on the stream
of tokens, while the second phase perform REPLACE on the resulting
stream of tokens. This rewriting is closer to the COBOL standard
and fixes bug #831 partially.
* cobc.c: flag -P now accepts - as argument to mean stdout
2023-07-05 Fabrice Le Fessant <fabrice.le_fessant@ocamlpro.com>
* flag.def/cobc.c: new flags -fno-ttimestamp to suppress timestamp
in listing headers, and -fttitle=<TITLE>, so that listings can be
compared accross different versions and dates. This patch partially
implements feature-request #294.
Replace numeric constants in flags and switch by a constant macro
CB_FLAG_GETOPT_. Remove unused 'case 6:' for -fdefaultbyte that is
now handled in config.c
2023-07-02 Fabrice Le Fessant <fabrice.le_fessant@ocamlpro.com>
* pplex.l (ppecho, ppecho_direct): replace alt_space by passing a
second equivalent token
* pplex.l, replace.c: move the preprocessing code performing
COPY REPLACING and REPLACE from pplex.l to replace.c
2023-07-04 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_char): extracted usage of disabled code for
char generation as char into this new inline function
* codegen.c (output_char): fixed previously disabled code and enable it
by default, old code may still be used with defining GEN_CHAR_AS_UINT
* codegen.c (output_initialize_to_value): handle zero-length VALUE
* codegen.c (output_initialize_to_value): fix cb_initial_justify
* codegen.c (output_initialize_to_value): disable setting from a
possibly huge internal buffer with a single generated memcpy from
a generated string, instead use a local buffer of max. 128 bytes
and set padding spaces with memset for bigger fields, old code may
still be used with defining GEN_SINGLE_MEMCPY
2023-07-03 Simon Sobisch <simonsobisch@gnu.org>
* pplex.l (check_listing): rewrite of change 2022-07-04:
do not output sequence number of short lines,
but keep its line break and the general output
* pplex.l: drop unused "requires_new_line" (added without use in OC2.0)
2023-07-01 Simon Sobisch <simonsobisch@gnu.org>
* scanner.l: add check for reserved word FUNCTION, add missing
word value for not reserved SUPPRESS and SEND
* parser.y (at_line_column): fixed bad cast when conflicting clauses
were used, fixing bug #601
2023-06-30 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_function_prototypes): generate plain "extern"
instead of "COB_EXT_IMPORT" again, as the second only works with
libraries, not with object files / sources
2023-06-25 Chuck Haatvedt <chuck.haatvedt+cobol@gmail.com>
FR #439: dialect option to support justify for IBM compatibility
* config.def: new dialect configuration option init-justify
* codegen.c (output_initialize_to_value): added support for right
justification when cb_initial_justify is on
2023-06-23 Fabrice Le Fessant <fabrice.le_fessant@ocamlpro.com>
* pplex.l (get_word): fix an overflow with words exceeding the
maximal size COB_MAX_WORDLEN
* pplex.l (is_condition_directive_clause,
next_word_is_comment_paragraph_name): decrease stack storage
and optimize string comparisons
2023-06-22 Nicolas Berthier <nicolas.berthier@ocamlpro.com>
* parser.y (setup_program, setup_default_collation)
(program_init_without_program_id): properly record default collating
sequence if required via -fdefault-colseq
* tree.c (cb_build_binary_op), typeck.c (cb_build_cond_default): inhibit
-ffast-compare and -fconstant-folding for programs with a non-native
collating sequence
2023-06-20 Nicolas Berthier <nicolas.berthier@ocamlpro.com>
FR #437: dialect option to limit bound checks for ODO to maximum
* config.def, config.c (cb_config_entry), cobc.h (cb_sub_check),
typeck.c (cb_build_identifier): new dialect configuration option
subscript-check to limit bound checks for ODO items
2023-06-20 Fabrice Le Fessant <fabrice.le_fessant@ocamlpro.com>
* typeck.c (cb_build_expr): remove cb_ prefix from static functions
and comment algorithm
Bugs #875 V IS ZERO AND, #880 error compiling abbreviated conditions
and #887 error compiling parenthesized relation
* typeck.c (cb_build_expr): additional generate 'invalid conditional
expression' error", translate NOT comparison to inversed comparison
* typeck.c (cb_build_expr), tree.c (cb_build_binary_op): give more
details on invalid expressions
2023-06-13 Fabrice Le Fessant <fabrice.le_fessant@ocamlpro.com>
* codegen.c (codegen): correctly set and unset `has_global_file`
when entering/leaving nested sub-programs
2023-06-09 Simon Sobisch <simonsobisch@gnu.org>
* error.c (print_error, diagnostics_show_caret): fix for C89 compat
* error.c (diagnostics_show_caret): trim trailing whitespace,
remove printing empty lines before/after, print EOF, changed format
2023-06-02 Simon Sobisch <simonsobisch@gnu.org>
* tree.h (cb_file), parser.y: organization and access_mode as enums
* typeck.c (cb_emit_sort_init, cb_emit_sort_using, cb_emit_sort_giving),
parser.y: extended syntax checks, distinguish MERGE and SORT within
diagnostics
* parser.y, typeck.c (cb_emit_sort_init): move all syntax checks from
code-emitter to parser
* tree.h (cb_statement), parser.y, typeck.c: drop flag_merge,
instead check by "statement == STMT_MERGE"
* parser.y (_close_option): parse UNIT/REEL WITH NO REWIND,
currently handled as if only UNIT/REEL would have been specified
2023-06-01 Fabrice Le Fessant <fabrice.le_fessant@ocamlpro.com>
* flag.def (cb_diagnostics_show_line_numbers), error.c
(diagnostics_show_caret): new flag -fno-diagnostics-show-line-numbers
to disable printing of line numbers in carets
* cobc.c: new option -fdiagnostics-plain-output to make
output as plain as possible (disabling carets for example)
2023-06-01 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_emit_sort_init): generate call to cob_file_sort_options
* typeck.c (cb_emit_sort_using, cb_emit_sort_giving): check if GIVING/USING
files have an active EXTFH handler and generate calls to sort functions
cob_file_sort_using_extfh / cob_file_sort_giving_extfh for those
2023-05-31 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_init_comment_and_source_ref) [NO_INIT_SOURCE_LOC]:
option to skip generating the source location in DATA DIVISION
* parser.y (alphabet_name): add NATIVE (CB_COLSEQ_NATIVE),
change STANDARD_1 from CB_COLSEQ_NATIVE to CB_COLSEQ_ASCII
2023-05-30 Simon Sobisch <simonsobisch@gnu.org>
* typeck.y (is_subordinate_to): start with parent, not field
* field.c (copy_into_field_recursive, copy_into_field): handling more
field attributes, don't re-build picture
2023-05-28 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: allow expressions for screen related clauses
COL, LINE, LINES, SIZE, COLOR, implementing FR #414
2023-05-26 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, reserved.c: added RIGHTLINE - GC extension matching LEFLINE
* parser.y: drop PENDING from OVERLINE and LEFTLINE
* tree.c (cb_build_intrinsic): refactored to get the name in a single place
* field.c (create_implicit_picture): don't imply a size if the source for
VALUE is an intrinsic function or compile-time constant
* field.c (create_implicit_picture): don't stop on errors but still create
an implied PIC to allow more checks later
2023-05-24 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: disable unreached code removement with -O0, but keep it
unchanged for -g
* field.c (validate_field_1): moved check for duplicate report LINE and
"OCCURS with multi COLUMNs" here, originally found in (compute_size)
* field.c (get_max_int_val): new function to get the highest algebraic
integer value
* field.c (compute_size): limit internal computed maximum for UNBOUNDED
item to the maximum value that can be stored in its DEPENDING on item
* field.c (compute_size): set items that are too big to a fixed value
to return eraly on follow-up checks
* field.c (compute_size): disabled check for missing PIC for NATIONAL
and BCD USAGE
* tree.c (cb_field_variable_address), tree.h: disabled unused function
* tree.c (cb_field_has_unbounded), tree.h: new function checking both
field and any of the child elements to be UNBOUNDED
* typeck.c (cb_validate_program_data): validate DEPENDING ON to be numeric
* typeck.c (cb_build_identifier): skip compile-time checks for ref-mod
on UNBOUNDED items as size is not known; for runtime calculate the max.
length for ref-mod using the ODO
* parser.y (occurs_clause): don't set flag_unbounded in parent
* cobc.c (print_fields): don't output (wrong) size for group items with
OCCURS UNBOUNDED sub-fields
2023-05-23 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (control_source): allow both an alphanumeric identifier or
literal for use with CONTROL phrase
* parser.y: adjust a bunch of terminals to match the internal name with
leading underscore as optional
* cobc.c: check for duplicate source file and skip with warning
* pplex.l: check for recursive file by resolved file name
2023-05-19 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (usage), field.c (validate_field_1): postpone setting of
field attribute flag_is_pointer from parsing the USAGE clause to final
field validation, fixing group and "child" USAGE, as well as
TYPEDEF + SAME AS with pointer types
2023-05-15 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (set_category, set_category_from_usage): changed argument types
from int to their matching enum
* tree.c (cb_build_prototype), parser.y (setup_prototype),
tree.h (struct cb_prototype): use matching enum
* tree.c (cb_field), parser.y, reserved.c: added parsing of GROUP-USAGE
* field.c (validate_field_1): handle new attribute group_usage
2023-05-11 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (cobc_check_valid_name): allow leading underscore,
prevent leading hyphen
* scanner.l (error_literal): change parameter literal_error to unsigned
and raise only a warning for negative values, adjust callers
* scanner.l (scan_x): internally handle odd numbers of x'' literals,
raise only a warning if the size is 1 and relaxed-syntax is active
* parser.y (data_description): improve error handling in DATA DIVISION
to raise less errors and create "validated invalid" fields
2023-05-10 Simon Sobisch <simonsobisch@gnu.org>
* field.c (cb_build_field_tree), parser.y: copy SCREEN SECTION
attributes from parent - instead of doing it in the parser
* parser.y (validate_screen_attributes): extracted duplicate code
* typeck.c (emit_field_accept_display): new function extracted
from (cb_emit_accept), handling both DISPLAY and ACCEPT
* typeck.c (cob_field_display): dropped, replaced in the callers
by call to (emit_field_accept_display) for not generating a call to
fixed-attribute "cob_field_display" but to the varargs
function "cob_display_field"
* codegen.c (output_screen_init), codeoptim.c (COB_SET_SCREEN):
generate screen init not as separate function "cob_set_screen" but
as macro "COB_SET_SCREEN" (there's no need or use to put all
attributes on the stack)
2023-05-09 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_funcall): backup and restore adjusted static fields,
minor refactoring
* codegen.c (output_funcall_item): extracted from (output_funcall)
* typeck.c (cb_emit_accept): dropped cb_gen_field_accept and don't generate
call to fixed-attribute "cob_field_accept", instead generate a call to
the varargs function "cob_accept_field" with passing only the attributes
that are set (including the new CONTROL, COLOR and CURSOR)
2023-05-08 Simon Sobisch <simonsobisch@gnu.org>
* tree.c (cb_build_funcall), tree.h (struct cb_funcall): defined
max. parameters for internal function calls as CB_BUILD_FUNCALL_MAX
and increased it to 14
FR #189 + FR #355 - runtime-adjustable attributes for extended screenio
* tree.h (cb_field): new attributes screen_control and screen_color
* tree.h (cb_attr_struct): new attributes control, color and cursor
* parser.y, typeck.c (validate_attrs, cb_emit_accept, cb_emit_display,
emit_field_display_for_last): add complete parsing for CONTROL,
COLOR and CURSOR and set/read new attributes as appropriate
* parser.y: pass COB_SCREEN_CONV to runtime (currently not handled)
2023-05-05 Simon Sobisch <simonsobisch@gnu.org>
* field.c (cb_resolve_redefines): fix #881 wrong REDEFINES error on
fields with redefinition
2023-05-04 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_build_move_literal): restore writing of negative zero
(DISPLAY overpunched), that was removed undocumented with 2.0
* typeck.c (cb_build_move_literal): optimized output for literals to
fields with BLANK WHEN ZERO and SIGN LEADING
2023-05-02 Simon Sobisch <simonsobisch@gnu.org>
* field.c: inclusion of condition-names (level 88) into field that use a
TYPEDEF defintion
2023-04-25 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_so_load_version_check): new function to generate
libcob version check in shared object constructor / DllMain, allowing
better error messages if the generated COBOL functions cannot be loaded
into memory because of newer ABI
2023-04-18 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_build_move_field): emit call to cob_move_bcd for two
BCD fields without negative scale
2023-04-17 Simon Sobisch <simonsobisch@gnu.org>
* scanner.l: dropped last_token_is_dot and integer_is_label by checking
last_token instead
* scanner.l, parser.y, reserved.c, tree.h: dropped cobc_force_literal by
introducing second_last_token and checking the tokens instead
* scanner.l: early consume spaces after comma and semicolon
* scanner.l: simplify check for redundant periods by splitting its rule
* cobc.c (file_basename): directly use filename,
only handle backslash on win32
* codegen.c: minor refactoring to drop global string_buffer
* codegen.c: generate COB_EXT_IMPORT and COB_EXT_EXPORT instead of extern
* codegen.c (codegen): minor refactoring
* parser.y (setup_registers): extracted
* parser.y: minor refactoring
2023-04-14 Simon Sobisch <simonsobisch@gnu.org>
* pplex.l (ppopen_get_file): extracted from ppopen and minor refactor
* pplex.l (ppecho): disabled performance-dropping fflush until found
necessary
2023-04-11 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_build_cond, cb_emit_divide, cb_build_move_literal):
minor refactoring
2023-04-04 Simon Sobisch <simonsobisch@gnu.org>
* tree.c (cb_build_picture): don't include leading Ps in digit count
* typeck.c (validate_move): adjust checks for move from literal, fixing
PPP edge cases; rewrote calculation for most and least significant places
2023-03-29 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (count_pic_edited): renamed from count_pic_alphanumeric_edited
and adjusted for general use
* typeck.c (validate_move): handle national target and source, including
national literals
* typeck.c (validate_move): don't permit alphanumeric literals in VALUE
clause for numeric items
* field.c (cleanup_field_value): cleanup for national space
* scanner.l (scan_x): build "implied for empty" N / NX literal with
correct size
* scanner.l, tree.c (cb_concat_literals): output explanations of literal
errors as "note" instead of "error"
* tree.c: minor refactoring
2023-03-28 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_search_all): dropped unnecessary check
* codegen.c (output_search): add missing ODO runtime check
* codegen.c (output_search_whens): generate access to ODO value only once,
instead of on every internal SEARCH VARYING
* codegen.c (output_param): reduce scope of variables
2023-03-24 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: minor speedup in freeing memory
* reserved.c (get_user_specified_reserved_word): minor refactoring
2023-03-23 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_build_move_field): generate optimized code for
reference-modification with same ref-mod length
* parser.y: fix several possible bad uses of "ALLOCATE identifier",
including "no identifier at all" and use of subscripting / ref-mod
which previously were all silently ignored
2023-03-08 Emilien Lemaire <emilien.lemaire@ocamlpro.com>
* reserved.c (get_user_specified_reserved_word): add check for
context sensitivity in aliases
* parser.y (begin_statement_internal): extracted from begin_statement and
begin_statement_from_backup_pos
* parser.y: explicit creation of "comment note" tokens to store the start
position for tokens used later, either direct for diagnostics or by
assigning it with the new function copy_pos instead of using a global
"backup position" or using the current position
* parser.y: explicit check for missing imperative statements in several
places that need one to generate a clean error
* parser.y (emit_entry): removed unused parameter override_source_line
* typeck.c (cb_emit_call), tree.h, parser.y: remove passing the CALL's
original line number as extra parameter, instead use the statement's
(now correct) position
2023-03-03 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_build_cond_fields): optimize comparison between field and
ZEROES up to COB_ZEROES_ALPHABETIC_BYTE_LENGTH
* pplex.l (ppopen): fixes for auto-detection of reference-format FR #45
handling tabs, dos eol and empty lines correctly
* parser.y (check_non_area_a_of): new function used to do the area check
for all terminators and during error recovery
* parser.y: check area A for END FUNCTION
2023-02-28 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_emit_set_to): generate runtime check for SET source
at most one time
* cobc.c (process_filename) [_WIN32 __GNUC__]: pass .dll input files
to linker (GCC MinGW extension to drop need of link libraries)
* cobc.c (xref_files_and_their_records, xref_labels): minor refactoring
2023-02-24 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_initial_values): drop wrong init comment
* field.c (copy_into_field): set EXTERNAL name if missing
* pplex.l, scanner.l: dropped extra line breaks before area_a token
* pplex.l (ppinput): insert "preparse area_a token" in column 1 instead
of column 2 to fix terminal-format support and insert it before
newlines are added to the beginning of the buffer
2023-02-21 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c, flag.def [COBC_HAS_CUTOFF_FLAG]: fix compile errors,
output -fif-cutoff to help when available
2023-02-20 Nicolas Berthier <nicolas.berthier@ocamlpro.com>
* scanner.l, config.def: Add support for EBCDIC symbolic characters in
alphanumeric literals, which is a GCOS-specific extension; add new
configuration option ebcdic-symbolic-characters
* scanner.l, pplex.l: detect and issue a warning when EBCDIC
symbolic character strings include extraneous separators
2023-02-20 Fabrice Le Fessant <fabrice.le_fessant@ocamlpro.com>
* scanner.l (read_literal): refactor to use enum cb_literal_type
instead of a char* for the type of literal
* pplex.l: allow REPLACE between Gcos CONTROL DIVISION and
the IDENTIFICATION DIVISION
2023-02-16 Fabrice Le Fessant <fabrice.le_fessant@ocamlpro.com>
* flag.def (cb_diagnostics_show_caret), error.c
(diagnostics_show_caret): new -fdiagnostics-show-caret (enabled by
default) to display source context of the error/warning, 2 lines
before and after the location
* error.c (cb_error_kind): replace all occurrences of a
error/warning/note string by a symbolic enum
* flag.def (cb_diagnostics_show_option), error.c: renamed from
cb_diagnostic_show_option to match the argument name
2023-02-10 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (clean_up_intermediates): fix missing move of temporary files
when --save-temps=dir is used in combination with -g
* field.c (cb_build_field_tree), tree.h, parser.y: pass level number as
integer, not as cb_tree
2023-02-09 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (validate_alphabet): slightly rewritten to fix compiler warnings
* config.c, pparse.y (ppp_replace_list_add), reserved.c (is_invalid_word),
tree.c, tree.h, typeck.c: minor adjustments to fix compiler warnings
* field.c (validate_multi_value, validate_elem_value),
parser.y (setup_external_definition): fixed analyzer warnings by switching
"for" (hint at "possibly NULL" at start) to "while"
2023-02-08 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (rep_name_list): elide PICTURE string in symbol listing
when too long (also fixing a possible SIGSEGV on WIN32)
* cobc.h: fixed prototype for cobc_set_listing_header_code,
cobc_get_margin_a, cobc_get_margin_b
* cobc.c: remove trailing slash from -I and -L as those break some
tab-completed command lines and -MD generation
* cobc.c [_WIN32, DOS]: replace forward slash to backslash for -I
fixing -MD generation on mingws/msys environments
* pplex.l (ppcopy_find_file, ppcopy): replace slash to match system and
always place name in buffer to allow this
2023-02-07 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_build_optim_cond): generate cob_bcd_cmp call for COMP-3/COMP-6
* typeck.c (cb_build_optim_cond). codeoptim.def, codeoptim.c, codegen.c:
disabled "local" functions for COB_CMP_PACKED_INT, COB_GET_PACKED_INT,
COB_GET_PACKED_INT64 as the updated libcob variants are not slower, so
generate calls to these instead
2023-02-03 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_build_optim_add), codeoptim.def, codeoptim.c, codegen.c:
added COB_GET_PACKED_INT64, COB_ADD_PACKED_INT64 for fast-resolving/
adding PACKED-DECIMAL fields with 9-18 digits
* typeck.c (cb_build_optim_sub), codegen.c, tree.h
(CB_CAST_NEGATIVE_INTEGER, CB_CAST_NEGATIVE_LONG_INT): wrap subtractions
on PACKED-DECIMAL fields in a negative value used with optimized
packed_add
* typeck.c (cb_check_num_cond, cb_build_optim_cond): generate memcmp for
COMP-6 fields with same scale
2023-02-01 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (rep_name_list): fixed error handling loop
2023-01-30 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, reserved.c: add DISPLAY-1 as PENDING,
actually pass NATIONAL usage if specified
* field.c (compute_size), tree.c (cb_tree_type): handle CB_USAGE_NATIONAL
* parser.y, reserved.c: add DATA-POINTER and FUNCTION-POINTER as PENDING
* cobc.c (set_picture): output pointer-type in listing if specified
* parser.y (usage_clause_screen_report), typeck.c (validate_usage): have
REPORT and SCREEN section only expecting the possibly USAGEs instead all
removing the need to check for bad USAGE later
* parser.y (display_erase, display_pos_specifier): pass display attributes
to codegen, fixing bug #737
2023-01-28 Simon Sobisch <simonsobisch@gnu.org>
* codeoptim.c: adjusted inline functions (cob_cmp_packed_int,
cob_get_packed_int) to use register types and less intermediate values
2023-01-28 Fabrice Le Fessant <fabrice.le_fessant@ocamlpro.com>
FR #45: auto-detection of reference-format
* cobc.c (main): initialize cb_config_text_column to 72 to avoid a
race condition in config files.
* pplex.l (ppopen): try to autodetect the format of a file after
checking the BOM of a file
* pplex.l (cobc_set_source_format): add new format name "AUTO" to
activate auto-detection of file format
2023-01-26 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c: generate field offsets and indexes as long long to
fix overflow in (actually unsupported) access to huge tables
* cobc.c (process_env_copy_path): changed to do getenv itself and
to output ignored entries when running verbose
* cobc.c (process_command_line): output ignored -I and -L options
when running verbose
2023-01-23 David Declerck <david.declerck@ocamlpro.com>
FR #429: option to specify conversion table via translation table file
* cobc.c, flag.def, cobc.h: handle external table for "ebcdic-table"
* codegen.c: generate code using the external table
2023-01-20 Ron Norman <rjn@inglenet.com>
* codeoptim.c: fix cob_check_subscript_inline for min subscript value
2023-01-20 Simon Sobisch <simonsobisch@gnu.org>
fixed bug #704: ANY LENGTH cannot have ref-mod, POS not context-sensitive
* typeck.c (cb_build_identifier): skip compile-time check for length
on ANY LENGTH items
* reserved.c (POS): now C/S to DISPLAY + ACCEPT with default wordlist
2023-01-19 Simon Sobisch <simonsobisch@gnu.org>
* help.c (cobc_print_usage): fixed msgid to match bin/cobcrun.c
* flag.def: use correct option names in help output
* config.def: fixed typos and spacing in msgids
* flag.def: removed duplicated msgid - those are printed in help.c only
* typeck.c (cb_emit_goto_entry), tree.h, parser.y: dropped duplicated
function and msgid, using cb_emit_goto instead
* parser.y (_goto_depending), typeck.c (cb_emit_goto): check via use of
numeric_identifier in the parser instead of postponed checking
* parser.y (assign_clause), typeck.c (cb_check_numeric_value,
cb_validate_collating, validate_assign_name,
cb_check_integer_value, error_if_not_int_field_or_has_pic_p):
dropped very similar msgids using standard ones for the checks
* tree.c (get_category_from_arguments, get_number_in_parentheses): msgid
related changes
2023-01-18 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (cb_default_colseq, build_default_colseq, setup_default_colseq):
adjusted for general use, fixing Bug #861
* parser.y (alphabet_name): added code-set names, building a collation
* reserved.c (SEQUENCE): setting CB_CS_ALPHABET to allow code-name parsing
* parser.y, reserved.c: changed reference from 202x to 2023
2023-01-16 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (occurs_index): only set VALUE 1 for defaultbyte == INIT
* tree.h (CB_DEFAULT_BYTE_INIT, CB_DEFAULT_BYTE_NONE), config.c, field.c,
codegen.c: explicit defines instead of "only magic numbers"
* tree.c (cb_build_initialize), tree.h (struct cb_initialize), codegen.c
(output_initialize_to_value): replaced flag_init_statement with statement
* parser.y (setup_occurs_min_max): validate occurs_max limit
* codegen.c (output_initialize_uniform): pass code-field instead of
re-evaluating it
* codegen.c (output_initialize_multi_values): removed variable
"total_occurs" fixing Wunused-but-set-variable
* codegen.c (output_stmt): dropped unused msgid
* typeck.c (cb_build_index): add internal index variables in LINKAGE to
internal WORKING-STORAGE or internal LOCAL-STORAGE items depending on
program->flag_recursive
* codegen.c (output_init_comment_and_source_ref): new function, called
by one-time init code to add source reference to initial setup, bringing
in missing copybook references into GDB source list
2023-01-05 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c, flag.def, help.c: added option --coverage internally setting
-fgen-c-line-directive, ensuring to write object file with original name,
passing appropriate flags to C compiler (GCC, LLVM, MSVC, Sun Solaris)
* codegen.c (output_initialize_uniform): siwtched to take an unsigned char
* tree.c: minor refactoring
2023-01-02 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c, field.c, parser.y, reserved.c: adjustment for FLOAT-EXTENDED /
CB_USAGE_LONG_DOUBLE, basic use now works as expected,
enabled as UNFINISHED
* cobc.c (cobc_print_version): welcome 2023
* reserved.c: integrated changes originally done 2020-06-20 (!)
2022-12-31 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (short_options): removed -R which was only dropped from evaluation
in 2016-09-24; fixing bug #758
2022-12-30 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c, cobc.h, pplex.l (ppopen), help.c: restored -MT and -MF options
as they were available in GnuCOBOL 1.1 (adjusted to current code)
* cobc.c (process_command_line): handle multiple -MT options like GCC
* ChangeLog: integrated cobpp ChangeLog entries and added some
historic changes from VCS log/diff
fixing bug #794:
* typeck (cb_build_index): attach the index to storage of qualifier,
if specified
* parser.y (_local_storage_section _linkage_section _screen_section): add
fields to appropriate instead of setting it, to not overwrite internal
additions as in cb_build_index
* parser.y (occurs_index): use CB_INT_INDEX for LOCAL-STORAGE indexes
2022-12-29 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_standard_includes): don't include stdio.h in
generated programs
2022-12-24 Simon Sobisch <simonsobisch@gnu.org>
* tree.c (compare_field_literal): suppress some optimizations if constant
folding is disabled
* tree.h (cb_binary_op_op): added all binary operators
* typeck.c (explain_operator), tree.c (cb_build_binary_op), tree.h:
switched argument to cb_binary_op_op
* typeck.c (expr_reduce): refactored, also moved token swapping from
cb_expr_shift here
* typeck.c (swap_condition_operands): toogle BOP_OPERANDS_SWAPPED flag
* tree.c (compare_field_literal): don't warn if the >= / <= is the result
of an internal swap
* tree.c, tree.h, typeck.c (cb_build_cond, expr_reduce): set and handle
cb_binary_op_flag to pass this without changing hundreds of code lines
* parser.y: preparation of internal WINAPI call-convention name
2022-12-18 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_validate_labels): don't warn on GO TO own SECTION
2022-12-17 Simon Sobisch <simonsobisch@gnu.org>
* tree.c: initial support for PIC U, for now handled as alphanumeric with
size * 4
* scanner.l: minimal parsing for utf-8 literals
* reserved.c, cobc.h (CB_CS_USAGE), parser.y: parsing for USAGE UTF-8
and the related BYTE-LENGTH clause
* field.c, tree.c, typeck.c: minimal adjustments for PIC U
2022-12-16 Simon Sobisch <simonsobisch@gnu.org>
* tree.h (cb_binary_op, cb_binary_op_flag, cb_binary_op_op): changed struct
cb_binary_op to use new enums for the operation and for "special flags"
* tree.h (BOP_OPERANDS_SWAPPED), codegen.c (output_cond), typeck.c
(cb_build_cond, swap_condition_operands): store flag when swap operation
is done and swap the result for return values as used in SEARCH ALL later
* codegen.c (output_long_integer): reduce scope of variables as done
in (output_integer)
* codegen.c (output_assign, output_if, output_debug_item): extracted
from output_stmt
* typeck.c (cb_emit, cb_emit_list): changed from defines to inline
functions, now returning the tree that was emitted
2022-12-15 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_initialize_to_value): fix bad generation for VALUE size
greater than field size, see bug #777
* flag.def, typeck.c: new option "fast-compare" (cb_flag_fast_compare,
defaulting to on) to disable old and new optimizations
* cobc.c: disable cb_flag_fast_compare for -fsyntax-only and on compiler
errors to improve parsing time
* tree.c (cb_fits_int, cb_fits_long_long): constant ZERO fits both
integer types
* tree.c (cb_field_size): return FIELD_SIZE_UNKNOWN for constants and
fields with ANY LENGTH
* typeck.c (cb_build_cond_default, cb_build_cond_fields): extracted
from cb_build_cond
* typeck.c (swap_condition_operands): added and executed in cb_build_cond
if left side is constant or literal
* typeck.c (cb_build_cond_fields): optimize comparison between field and
SPACES up to COB_SPACES_ALPHABETIC_BYTE_LENGTH
* codegen.c (output_label, output_label_c): extracted from output_stmt
* codegen.c (output_label_c): added output of C labels for paragraphs
using prefix PARAGRAPH and, to make them distinct, its label id as suffix
* codegen.c (output_search_all, output_search_whens): if no AT END position
token is available, use the start token instead
* typeck.c (cb_emit_search, cb_emit_search_all), tree.h: return created
search tree
* parser.y (_end_search): if search has no AT END create an implicit one
at END-SEARCH for better trace and debugging
2022-12-14 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (validate_move): fix bug #643 add check for SET literal TO val
2022-12-13 David Declerck <david.declerck@ocamlpro.com>
* cconv.c, cconv.h: files moved from cobc to libcob
* codegen.c: use the new libcob API for collating sequences
* flag.def: change "ebcdic-table" to a flag with associated variable
2022-12-13 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (cb_warn_opt_val, get_warn_opt_value, set_warn_opt_value), cobc.h:
renamed cb_warn_opt_val to warn_opt_val and keep local, provide typed
functions to get/set the internal option with the "real" type for
improved type checks and internal cobc debugging
* cobc.c, error.c, field.c, parser.y, pplex.l, tree.c, typeck.c: adjusted
to use new get_warn_opt_value / set_warn_opt_value functions
* codegen.c (output_index): fix bug #832 binary-char unsigned not usable
as subscript
2022-12-12 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_initialize): added missing generation of runtime checks
for INITIALIZE (again?)
* typeck.c (cb_build_move): optimized (=identical) generation for MOVE no
matter if runtime checks are enabled or not (speed + identical behavior)
* codegen.c (output_initial_values): don't do any init for TYPEDEFs,
as these are only prototypes and otherwise lead to actual storage
(and useless init)
* codegen.c (output_display_fields): don't dump TYPEDEFs
2022-12-09 Nicolas Berthier <nicolas.berthier@ocamlpro.com>
FR 426 Default collation option
* flag.def, cobc.c (process_command_line): add new default-colseq flag
* tree.h, parser.y (cb_deciph_default_colseq_name): new helper function
* parser.y (build_default_colseq, setup_default_colseq, setup_program):
initialize default collating sequence for programs when the
default-colseq flag is not NATIVE
2022-12-08 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (items_have_same_data_clauses): fix handling for ANY LENGTH
parameters, fixing bug #851
* parser.y: fixes for prototype checking
* typeck.c: work on warning messages for prototype checking
* typeck.c (error_if_signatures_differ): add check for ENTRY-CONVENTION
* typeck.c (cb_validate_program_environment): fixed bad test of warning
option for CLASS check
* typeck.c (cb_emit_sort_init): minor refactoring
* typeck.c (cb_build_ppointer), tree.c (cb_name_1): added missing
handling for prototype
* codegen.c (output_param): added handling for prototype name,
returning its name as literal
2022-12-06 Nicolas Berthier <nicolas.berthier@ocamlpro.com>
* cobc.h (struct cb_replace_src, struct cb_replace_list, struct
cb_turn_list, cb_turn_list, struct list_error, struct list_replace)
(struct list_skip, struct list_files), tree.h (enum cb_replace): move
internal struct and symbol declarations to tree.h, and adapt some
structures for strict partial text replacement
* cobc.c (print_replace_text, print_replace_main), pplex.l
(set_print_replace_list, ppecho), ppparse.y (ppp_replace_src,
ppp_replace_list_add): handle strict partial text replacement, enabled
unless dialect option partial-replace-when-literal-src
(formerly partial-replacing-with-literal) is "skip"
2022-12-06 Simon Sobisch <simonsobisch@gnu.org>
* field.c (validate_redefines): check for target not to have ANY LENGTH
2022-12-05 Nicolas Berthier <nicolas.berthier@ocamlpro.com>
* cobc.c: replace some incorrect '%d' format indicators with '%lu'
2022-12-03 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: check SOURCE_DATE_EPOCH once, if set parse via libcob
to use as compile timestamp
* cobc.c (set_compile_date_tm): extracted from set_listing_date
* cobc.c (set_compile_date): execute set_compile_date_tm on each setting
* codegen.c (output_gnucobol_defines): use pre-set compile timestamp
instead if re-setting them
2022-12-02 Simon Sobisch <simonsobisch@gnu.org>
* cobc.h: allow to override COB_DASH_NAME and COB_DASH_OUT
2022-12-01 Simon Sobisch <simonsobisch@gnu.org>
* scanner.l: fixed double and missing free for internal constants
* parser.y (_erase): fixed missing return, breaking (exhibit_body)
* tree.c (cb_concat_literals, cb_name_1), scanner.l (error_literal),
reserved.c (get_system_name_translated): fixed missing initialization
* parser.y: marked missing translatable string
2022-11-19 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (value_clause): handle simple VALUES without any optional
phrases and with only a single value explicit not as table-format but
as if VALUE was specified (raising a warning/error depending on
relax-syntax-checks), as at least MicroFocus has this non-standard
(and undocumented) extension
* field.c (validate_elem_value): explicit check that non-occurs item has
only a single value
* parser.y (value_clause): improved parsing for table-format
2022-11-18 Simon Sobisch <simonsobisch@gnu.org>
* tree.h, typeck.c, parser.y, codegen.c: module-locale registers
referenced as cb_field
* codegen.c: pass XML mode to module
2022-11-18 Nicolas Berthier <nicolas.berthier@ocamlpro.com>
* cobc.c (print_line): fully honor -fmfcomment by suppressing lines
that start with an asterisk from listings
2022-11-15 Nicolas Berthier <nicolas.berthier@ocamlpro.com>
* pplex.l: allow spaces or tab characters after the `$` in MF-style
directives
* pplex.l (cobc_parse_source_format): select X/Open free-form under MF
* pplex.l (cobc_set_source_format): X/Open free-form format allows lines
of up to 255 bytes, and may not be subject to Area A enforcement
* cobc.c (process_command_line): handling of `-free` is subject to
`-std`: it is an alias of `-fformat=free` with the MF-specific
semantics of "free" when `-std=mf`
2022-11-08 Nicolas Berthier <nicolas.berthier@ocamlpro.com>
* typeck.c (cb_validate_program_data): DEPENDING var
for PIC L data-items can come after parent groups
2022-10-21 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c: rewritten codegen for INITIALIZE of table fields,
effectively using the 3.1.2 codegen for that with "check only"
for table-format VALUE, then after everything was initialized
post-setting of the table-format VALUES with
output_initialize_multi_values, a simplified version of the
previously often called output_initialize_occurs (now renamed),
added originally for FR #234: multiple VALUEs for OCCURS
* tree.h (cb_field): drop flag_occurs_values
* codegen.c (output_initialize_to_value, output_initialize_to_default):
extracted from output_initialize_one (split only)
* codegen.c: draft for codegen of better readable init code as
done in other places (not active, inspect and decide later)
* codegen.c (output_figurative): fix bug #724 lvl01 OCCURS items to
also correctly INITIALIZE TO VALUE with figurative constants
* field.c (cleanup_field_value): new function called from field
value validation code; replaces values that match default by
cb_zero/cb_space for better codegen
* tree.c (cb_build_binary_op): don't raise an error in the condition
code when we raised an error - for example on a bad reference - before
* field.c (cb_build_field_tree): generate dummy filler for level
mismatch also for non-relaxed parsing to prevent follow-on errors
2022-10-20 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, tree.c (cb_build_vary), tree.h: cleanup to not use
static variables in the parser for creation of the rw vary items
* parser.y, reserved.c: full parsing for COBOL2002 and BS2000
multi VALUE entries via VALUES [ARE]
* parser.y, field.c, tree.h, codegen.c, tree.c, scanner.l: new struct
cb_table_values to store the complex parsing result, only embed the VALUE
in a list when actually necessary, and use these adjustments in syntax
and codegen
* field.c: check all multi-values for correct type and length;
verify that only up to max amount entries are specified;
TODO: complete handling of FROM/TO/REPEATED clause
2022-10-19 Simon Sobisch <simonsobisch@gnu.org>
* tree.h (struct cb_if): changed "is_if" integer flag to "enum
cob_statement statement" providing a clear context
* tree.c (cb_build_if), tree.h, typeck.c, codegen.c (output_stmt):
pass and check matching statement entry instead of magic number
* typeck.c (cb_emit_report_moves): refactored to combine conditions
and separate report_footing_flag
* codegen.c (output_stmt): refactored to combine same code for
PRESENT WHEN field/line
* codegen.c: set COBOL source and statement reference correctly for
SEARCH ... VARYING and WHEN - as the overhead from tracing code
preventing this before no longer exists
* codegen.c: improved output of source position
* typeck.c (cb_emit_evaluate): analysis and spec for necessary changes
2022-10-18 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (clear_local_codegen_vars): unset additional
"current" references, preventing use-after-free
* codegen.c (output_stmt): set current_statement on start of
any statement generation allowing it to be used for context-checks
* tree.h, parser.y: removed never-used cobc_printer_node
* codegen.c (output_perform_call): use statement reference to generate
separate comment for PERFORM procedure or USE procedure
* flag.def, codegen.c: new -fsection-exit-check
(cb_flag_section_exit_check) and -fimplicit-goback-check
(cb_flag_implicit_goback_check)
* tree.h (cb_progam), parser.y (perform_procedure): add and set
perform_thru_list for internal checks
* typeck.c (cb_validate_perform_thru_ranges),
warning.def (cb_warn_suspicious_perform_thru): warning option to check
for PERFORM THRU referencing multiple sections and for its
references to be in non-chronological order
2022-10-17 Simon Sobisch <simonsobisch@gnu.org>
* tree.h (cb_reference), tree.c (cb_build_reference): added statement
allowing every reference to be checked for its context
* tree.h (cb_reference), parser.y (perform_procedure): dropped flag_decl_ok
* typeck.c (cb_validate_labels): use ref->statement instead of flag_decl_ok
* warning.def, typeck.c (cb_validate_labels): new warnings -Wgoto-section
(enabled by default) and -Wgoto-different-section (enabled by -Wall)
* reserved.c: renamed cb_toupper to res_toupper
* reserved.c (cb_toupper, cb_tolower), cobc.h: new exported functions
* scanner.l, config.c, cobc.c: prefer cb_toupper and cb_tolower over
locale aware toupper/tolower
* ppparse.y: directly call toupper/tolower without previous islower/isupper
2022-10-15 Simon Sobisch <simonsobisch@gnu.org>
* cobc.h: new CB_UNSUPPORTED for features not planned to be supported
at all (but parsed to not stumble over those)
* cobc.h [!HAVE_UNISTD_H]: include stdio.h
2022-10-14 Simon Sobisch <simonsobisch@gnu.org>
* tree.c, tree.h, cobc.h, parser.y, typeck.c, codegen.c: direct setting
and compare of new enum cob_statement instead of passing string constants
around (and partially checking those with strcmp later)
* tree.h (cb_statement_name), codegen.c (cb_statement_enum_name), cobc.h,
tree.c: pre-initialized tables to translate new enums to string
representation and enum name for use in codegen instead of integer/string
constants
2022-10-12 Simon Sobisch <simonsobisch@gnu.org>
* codeoptim.c: further optimizations for COB_GET_NUMDISP*
2022-10-12 Ron Norman <rjn@inglenet.com>
* typeck.c: If STRING item is NOT DISPLAY/NATIONAL then its an error
2022-10-10 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (main): fixed memory handling for "-j"
* cobc.c (cobc_abort_terminate): run into libcob provided abort handling
with a default of SIGABRT and a configurable coredump via
COBC_CORE_ON_ERROR overriding COB_CORE_ON_ERROR (currently fixed "2")
* codegen.c (output_call) [COB_NON_ALIGNED]: fix CALL RETURNING
2022-10-08 Simon Sobisch <simonsobisch@gnu.org>
* pplex.l (plex_call_destroy): fixed minor memory leak
* cobc.c (compile_level): using enum values instead of numeric constants
* parser.y (examine_format_variant): internally use "MOVE ZERO TO TALLY"
instead of "INITIALIZE TALLY"
* cobc.c: minor reformatting
* flag.def: fixed minor doc issues
2022-10-06 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (symbolic_characters_clause, class_name_clause): improved
parsing, adding _alphnat_target and first checks for it
* parser.y (_is_locale_name, _in_alphabet, _alphnat_target): fixed
missing return value for "empty" matching
* parser.y (figurative_constant): moved out of existing rules
2022-10-05 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_check_field_debug): fixed bug introduced with last change
and don't create unnecessary long DEBUG-NAME strings
* config.c (cb_load_conf_file): check snprintf size fixing compile warning
* typeck.c (validate_occurs): change level 01/77 check back to plain
dialect verification fixing #854
2022-10-04 Nicolas Berthier <nicolas.berthier@ocamlpro.com>
* pplex.l, parser.y: fix AREACHECK in DEFAULT SECTION of CONTROL DIVISON
2022-10-04 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (process_command_line): full parse of options on error to provide
all information to the user
* codegen.c (output_internal_function): only close files on CANCEL-callback
when they aren't closed already, preventing a file exception on CANCEL
* codegen.c (cb_open_mode_to_string), tree.h: new function
* codegen.c (output_param): generation for CB_DIRECT (string passed as tree)
* codegen.c (output_error_handler), typeck.c (cb_emit_open): use of
cb_open_mode_to_string for improved codegen (using enum values instead
of numeric constants)
* tree.c (cb_name_1): replaced strncpy calls by checked snprintf, calculate
length from known positions instead of strlen; limit scope of some
variables, allowing them to be defined as const
* cobc.c (print_88_values, print_fields, xref_88_values, xref_fields):
drop copy of field name to temporary lcl_name as a field name has
a maximum length of COB_MAX_WORDLEN (63) and therefore is always smaller
than the previously compared 80-1 byte
* cobc.c (cobc_elided_strcpy), cobc.h: new function to copy a string only
up to max positions and use an eliding "..." at front/end if src was cut
* cobc.c, config.c, scanner.l, tree.c, reserved.c: favor strcpy, memcpy,
cobc_elided_strcpy over strncpy
* typeck.c (cb_build_debug_item): refactored to remove number of casts
* field.c (copy_duplicated_field_into_field): extracted
from copy_children, copy_into_field_recursive
* tree.c (build_sum_counter): fix reference to sum counter
2022-10-01 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (function): attach ref-mod to all kind of functions to consume
them here and to pass invalid ref-mod for all numeric intrinsics to
cb_build_intrinsic enable us to create a nice diagnostic
* cobc.c, flag.def: do not imply -fsource-location with -g any more (but
still with --debug and -ftrace-all); imply -fsource-location with -fdump
* codegen.c: don't output source location for -fdump -fno-source-location
2022-09-30 Nicolas Berthier <nicolas.berthier@ocamlpro.com>
* codegen.c, cconv.h, cconv.c: extract EBCDIC & ASCII conversion tables
to a dedicated module
* codegen.c: factorize functions for outputting conversion tables
* flag.def, help.c: add -febcdic-table flag to customize EBCDIC
translation
2022-09-30 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_build_identifier): fix codegen for odo-check
on level 01 OCCURS items, bug introduced with 2022-07-12
* pplex.l: dropped check for "spurious '$'", fixing bug #839
and acucomment not handling $ correct
* flag.def (cb_flag_stack_extended), cobc.c: new option "stack-extended"
* codegen.c: handle generation for new cb_flag_stack_extended with
cob_frame_ext (attached origin source location, section and paragraph
name) and its addition to the cob_module
* codegen.c (output_section_info, output_trace_info): minor refactoring
2022-09-29 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (code_set_clause): set CODE-SET as UNFINISHED and PENDING
with custom code set (which other compilers don't support here)
* codegen.c (output_file_initialization): codegen for CODE-SET conversion
* codegen.c (output_param): set BASED + EXTERNAL flags from field founder
to field for all fields referenced (this allows an easy check later on,
already done and so far broken in output_local_field_cache)
* codegen.c (output_display_fields): fixed a bug introduced on 2021-10-19
which disables requested dump output if COBC_GEN_DUMP_COMMENTS is set
* codegen.c (output_dump_code): ensure a bug like the one above does
raise an abort, if it ever occurs again
2022-09-28 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_stmt): refactored codegen for setting DEBUG-ITEM,
fixing SIGSEGV on USE FOR DEBUGGING with invalid BASED / LINKAGE items
* codegen.c (output_debug_stmts): added to not write to the DEBUG-ITEM
when code was generated for USE ON DEBUGGING, but the runtime does
not have it enabled
* codegen.c (output_perform_call): allow label end to be NULL if
there is no PERFORM THRU, adjusted callers to not pass duplicate labels
* codegen.c (output_stmt): limit scope of some variables, allowing
them to be defined as const
* parser.y (allocate_body): set target attribute for target identifier
* parser.y (target_identifier): refactored to drop duplicate code
* typeck.c (cb_build_move): don't set target attribute (duty of caller)
* typeck.c (cb_emit_allocate_identifier): allow nonstandard
ALLOCATE linkage-item depending on cb_relaxed_syntax_checks
2022-09-29 Nicolas Berthier <nicolas.berthier@ocamlpro.com>
* parser.y: handle many more missing periods before PROCEDURE DIVISION
2022-09-26 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (cobc_abort_msg): use negative cb_source_line to reference
last known position during codegen
* codegen.c (output_stmt): store source reference if generated
statement has one attached
* codegen.c (output_standard_includes): fix bug #708 missing math
header inclusion if first program has no decimal
* codegen.c (output_data, output_call): fix bug #855 CALL generation
when using figurative constants
* codegen.c: correct use of CB_PREFIX_DECIMAL -> generated code now has
"d_" prefix instead of "d" in all places
* cobc.h, tree.h: moved some function declarations
* tree.c, tree.h (cb_literal_value), codegen.c, parser.y: moved double
and identical defined function literal_value to a single place
* codegen.c, tree.h, cobc.c: renamed cb_init_codegen
to clear_local_codegen_vars
* cobc.c: ask user for reporting reallocation memory issues
2022-09-26 Nicolas Berthier <nicolas.berthier@ocamlpro.com>
* error.c (cb_syntax_check, cb_syntax_check_x): add variants of
cb_{error,warning}[_x] functions with explicit va_list, and new helper
functions to dispach to errors or warnings w.r.t
cb_relaxed_syntax_checks
* scanner.l, parser.l: make Area A enforcement raise errors instead of
warnings on strict dialects
* parser.y: add missing Area A check on SELECT and CD
* parser.y, typeck.c: simplify some uses of cb_relaxed_syntax_checks
* pplex.l: drop `>>(NO)AREACHECK` directives
* config.def: improve documentation for areacheck option
2022-09-20 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (examine_format_variant): fix compiler warning
2022-09-15 Nicolas Berthier <nicolas.berthier@ocamlpro.com>
FR #360 AREACHECK
FR #309 raise warnings/errors when some periods are missing
* config.def: add dialect options areacheck and missing-period
* pplex.l, scanner.l, parser.y: check for empty Area A, and use a set of
dedicated *_IN_AREA_A tokens to detect missing periods and incorrect
use of Area A
* pplex.l, scanner.l, parser.y: support AREACHECK and NOAREACHECK
directives
* pplex.l (cobc_has_areacheck_directive): new helper function
* pplex.l (count_newlines): new helper function
* parser.y (check_area_a, check_non_area_a): new functions for Area A
checks
* parser.y (begin_statement): check statement does not start in Area A
* parser.y: support some missing periods
2022-09-01 Nicolas Berthier <nicolas.berthier@ocamlpro.com>
FR #18 support EXAMINE statement
* parser.y: add missing options for EXAMINE statement
2022-08-26 Simon Sobisch <simonsobisch@gnu.org>
* scanner.l (copy_literal): inlined into literal handling and added
missing check for actual literal, fixing bug #773
* tree.c, tree.h, cobc.c: moved cobc_enum_explain from cobc.c to
tree.c as cb_enum_explain
* tree.h (CB_TREE_TAG_UNEXPECTED_ABORT), field.c, tree.c, typeck.c,
codegen.c: added new macro and using it
* field.c (cb_validate_88_item): check against numeric for all type of
values, not only the figurative constants
* cobc.c, error.c: adjusted message handling to use local buffers
* field.c (has_std_needed_screen_clause), typeck.c (validate_alphabet),
codegen.c (output_initialize_one): minor refactorings
2022-08-20 Simon Sobisch <simonsobisch@gnu.org>
* pplex.l: match and ignore editor folding $REGION statement
* pplex.l: output actual directive for @OPTIONS and PROCESS
* pplex.l: *CONTROL from col7+
* pparse.y: don't warn on *CONTROL as this adjust listing only
and does not apply directly (possibly real handling later)
2022-08-19 Simon Sobisch <simonsobisch@gnu.org>
* field.c (validate_any_length_item): don't enforce codegen for
unused ANY LENGTH items
* parser.y, cobc.c (cobc_xref_set_receiving): set XML and JSON
registers to be receiving items in XML and JSON statements
and to increment their used counter
* cobc.c, codegen.c (has_field_to_dump): only output symbol and
xref headers as well as dump comments if there are actual
generated fields
2022-08-17 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (create_field): extracted from (output_param)
* parser.y, codegen.c ,tree.c, tree.h: added codegen for XML PARSE
* reserved.c, config.h, parser.y, tree.h, cobc.c: added parsing
for XML-SCHEMA clause in SPECIAL NAMES
* typeck.c: adjust for generation of ANY LENGTH registers (only to be
set in the runtime)
* reserved.c, typeck.c: added all XML and JSON registers
* config.def, parser.y, codegen.c: added cb_xml_parse_xmlss, passed
to runtime as module->xml_mode
2022-08-03 Fabrice Le Fessant <fabrice.le_fessant@ocamlpro.com>
* parser.y, reserved.c: add support for EXAMINE statement (TALLYING
LEADING only)
2022-07-29 Nicolas Berthier <nicolas.berthier@ocamlpro.com>
* flag.def, config.def: make format a dialect option instead of a flag
* help.c: mention alias for options --free and --fixed
* cobc.h: extend cb_format_enum with COBOL85 (fixed format with
pending Area A enforcement); define CB_SF_FIXED and CB_SF_FREE
* cobc.c: use new source format macros
* parser.y, pplex.l: annotate every token that is not used in the
grammar
2022-07-27 Nicolas Berthier <nicolas.berthier@ocamlpro.com>
* typeck.c (cb_emit_sort_init): avoid SIGSEGV on SORT of toplevel field
2022-07-25 Simon Sobisch <simonsobisch@gnu.org>
* tree.c (finalize_file), codegen.c (output_file_initialization):
moved -Wunsupported check for ORGANIZATION INDEXED from codegen
to parsing
* tree.c, typeck.c: msgid change for -Wunsupported
* reserved.c (add_reserved_word): fixed theoretical additions of
reserved=alias longer than 32 characters
* typeck.c (cb_build_const_next): minor refactoring to get field founder
2022-07-24 Simon Sobisch <simonsobisch@gnu.org>
* field.c (create_implicit_picture): explicit disallow generating picture
from FUNCTION which size is commonly unknown (and use of intrinsic
functions outside of PROCEDURE DIVISION is an extension already)
* field.c (validate_elem_screen_clauses_std): require PIC in more cases
2022-07-19 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, typeck.c: temporary adjust source reference when building
registers to not point to an innocent source code
* tree.c (cb_build_picture, char_to_precedence_idx): cater for possible
call without a current program
* tree.c (cb_build_picture), tree.h: return cb_picture instead of cb_tree,
as all but one caller directly use it that way
* field.c (cb_resolve_redefines): fixed reasonable compiler warning
* typeck.c (cb_build_generic_register): finished VALUE definition and
checks, now handling numeric and alphanumeric literals (others prepared)
* typeck.c, parser.y, cobc.h: moved external_defined_fields_global and
external_defined_fields_ws to the sole use: typeck.c
* typeck.c: first time support for creating registers unknown to cobc
with configuration entry or -fregister, to allow this store the original
pre-validated definition in the new struct external_defined_register
and build the field when parsing for the program starts
* help.c (cobc_print_usage_dialect): extended -fregister help
2022-07-18 Simon Sobisch <simonsobisch@gnu.org>
* config.c (cb_config_entry): fixed defaultbyte convenience option
* field.c (cb_build_full_field_reference): fix bug #699 infinite loop when
processing keyed tables defined as filler
* reserved.c (add_register): enabled generic register generation
* tree.c (cb_build_intrinsic): minimal verification for FUNCTION SUBSTITUTE
* typeck.c: add field level 77 to any generated register (previously was 0),
those now show up in the symbol and xref list and dump output if they are
used (including GDB debugging extensions)
* typeck.c (cb_build_generic_register): now handles VALUE definition and
checks for "able to parse complete definition"
* cobc.c: skip unreferenced special register in listing/xref
2022-07-14 Matthew Remacle <mattata@users.sf.net>
* tree.c (literal_for_diagnostic): fixed #844 stack-based buffer overflow
2022-07-14 Simon Sobisch <simonsobisch@gnu.org>
* config.def, config.c: changed defaultbyte option from "INT" to ANY"
with explicit check for "init" (GnuCOBOL default behavior, now also
allowing to set it after it was set different) and "none" (in
preparation of missing feature, for now => implicit 0)
2022-07-12 Simon Sobisch <simonsobisch@gnu.org>
* scanner.l (read_literal): do the necessary conversion for national
literals (simple approach, only working with source in iso-8859-15
or plain ascii)
* typeck.c (get_value): return correct numeric value for national
(utf16) literals
* tree.c (cb_build_intrinsic): fixed optimized length generation for
national fields and literals
* typeck.c (cb_validate_program_environment): refactored,
reducing variable scope and extracted (validate_alphabet) and
(check_class_duplicates); call the later depending on
cb_warn_additional, no need to test if the final result is ignored
* typeck.c (validate_alphabet): adjustments for national literals,
now partially supported
* scanner.l: moved static literal_error to local variable,
passing it (to error_literal); return a valid literal in case of
literal errors (intead of cb_error_node) to prevent spurious
follow-up errors on their use
2022-07-12 Nicolas Berthier <nicolas.berthier@ocamlpro.com>
* parser.y: add DEPENDING ON for picture strings with an `L`
character
* config.def: new option picture-l
* tree.h (struct cb_picture, struct cb_field), tree.c
(cb_field_variable_size, cb_field_variable_address), typeck.c
(cb_build_identifier, cb_validate_program_data, cb_emit_initialize)
(cb_emit_move_corresponding, emit_move_corresponding), codegen.c
(chk_field_variable_size, chk_field_variable_address)
(out_odoslide_fld_offset): add support for `L` characters in picture
strings, variable-length alphanumeric fields (GCOS extension)
* field.c (validate_field_value): PIC L fields may not have VALUE clause
* field.c (validate_occurs): allow PIC L fields in OCCURS groups
* field.c (validate_redefines): allow more liberal REDEFINES of
fields with PIC L
* field.c (validate_group): A PIC L data-item cannot be JUSTIFIED
or BLANK WHEN ZERO
* typeck.c (emit_move_corresponding): simplified code
* codegen.c (output_base, output_initialize_uniform): small code
refactorings
2022-07-08 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (cancel_body): preparation for CANCEL ALL
2022-06-17 Nicolas Berthier <nicolas.berthier@ocamlpro.com>
* config.def, typeck.c (cb_emit_accept_name, cb_build_display_name):
rely on new option device-mnemonics (boolean) instead of
standard-define to accept device name mnemonics for DISPLAY and ACCEPT
2022-07-06 Nicolas Berthier <nicolas.berthier@ocamlpro.com>
* cobc.h: define function purity attribute COB_A_PURE
* cobc.h, cobc.c, pplex.l (cobc_get_indicator_column,
cobc_get_text_column, cobc_get_indicator, cobc_get_margin_a,
cobc_get_margin_b): encapsulate source format-related variables with
pure functions
* cobc.c: drop source format-related macros
* cobc.c (cobc_print_info): silence a warning with string indexing
2022-07-05 Nicolas Berthier <nicolas.berthier@ocamlpro.com>
* pplex.l, parser.y: parse DISPLAY and ACCEPT statements in DEFAULT
SECTION (GCOS 7 extension)
2022-07-04 Nicolas Berthier <nicolas.berthier@ocamlpro.com>
FR #29 support for ACUCOBOL-GT Terminal format
FR #230 support for X/Open Free-form format
* cobc.h, cobc.c: extend cb_format enum with VARIABLE, TERMINAL, XOPEN,
XCARD, CRT, and COBOLX source formats
* ppparse.y: extend SOURCEFORMAT directive
* cobc.c: drop IS_DEBUG_LINE macro to improve support for new source
formats
* cobc.c, flag.def: add new flag -fformat and remove flag
indicator-column
* cobc.h, pplex.l (cobc_deciph_source_format, cobc_set_source_format,
cobc_get_source_format): encapsulate source format configuration into
preprocessor lexer
* pplex.l (ppinput): add support for ACU terminal and X/Open indicators,
as well as floating margin B
* pplex.l (check_listing): do not output sequence number of short lines
2022-07-01 Simon Sobisch <simonsobisch@gnu.org>
* field.c (validate_blank_when_zero): iterate over pic->str
depending on pic->lenstr (= won't iterate when zero)
* codegen.c: minimal refactoring
* tree.c (compare_field_literal): ensure field is verified,
otherwise pic and size related checks will fail
* parser.y, reserved.c, cobc.h: added most missing COBOL2002 data clauses
as PENDING and reserved words as necessary
* scanner.l: distinguish between INVALID KEY and INVALID
* parser.y, reserved.c: distinguish between VALUES and VALUE,
fixing falsely parsed VALUE ARE and VALUES IS
* parser.y: split level 88 VALUE clause to value_clause_condition,
added content_validation format to it (already usable as condition,
preparation for later content validation by VALUE statement)
2022-06-28 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c, help.c: added -dumpversion
2022-06-27 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (numeric_children_screen_pos_type): ignore redefined
fields
* field.c (cb_resolve_redefines): always search candidate with (small)
word list first, instead of checking the complete parent for a same
name with case-insensitive name comparison
2022-06-24 Nicolas Berthier <nicolas.berthier@ocamlpro.com>
* cobc.c, config.def, flag.def, ppparse.y: requalify indicator-column as
a flag instead of a dialect option
2022-06-17 Nicolas Berthier <nicolas.berthier@ocamlpro.com>
* config.def, typeck.c (cb_emit_accept_name, cb_build_display_name):
rely on new option device-mnemonics (boolean) instead of
standard-define to accept device name mnemonics for DISPLAY and ACCEPT
2022-06-10 Ron Norman <rjn@inglenet.com>
* flag.def,config.def : Moved defaultbyte from flag to config
* cobc.h,help.c,codegen.c : Add define CB_CONFIG_SINT as signed 'int'
* config.c (cb_config_entry): for CB_INT check for a single character
Also check for word 'ignore' and make no changes
* codegen.c : Improvement of code emitted for INITIALIZE of tables
Initial table values, then clear next,
then propagate through remainder of the table
2022-05-31 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (cobc_check_string): replaced single string cache by an array
of caches using the string length as index; allowing much faster lookups
* codegen.c (chk_field_variable_address): [not working -> disabled] draft
for speedup by not checking the same field multiple time
2022-05-30 Nicolas Berthier <nicolas.berthier@ocamlpro.com>
* help.c (cobc_print_usage_common_options): document new -std
dialect options gcos and gcos-strict
* reserved.c (default_reserved_words): define words COMP-9,
COMP-10, and COMP-15, that are used by the GCOS dialect for
floating-point usages
2022-05-15 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (transform_body): add full features of INSPECT CONVERTING
to TRANSFORM statement, adding optional CHARACTERS
2022-05-11 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_emit_inspect): emit reduced cob_inspect_init_converting
without cob_inspect_finish for INSPECT CONVERTING / TRANSFORM
* parser.y: inspect_list renamed to inspect_format_variant
2022-04-08 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (process_translate): add length note also for value clauses
which may span multiple lines
2022-04-01 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (process_translate) [HAVE_8DOT3_FILENAMES]: fixed
missing variable definition
2022-03-27 Simon Sobisch <simonsobisch@gnu.org>
* error.c (cb_verify): use a valid position tree instead of cb_error_node
as this is only valid during parsing + codegen state, fixing #821
* cobc.h: define CB_PENDING and CB_UNFINISHED without cb_error_node
as this is only valid during parsing + codegen state
* tree.c (cb_init_parse_constants), tree.h, cobc.c: renamed
from cb_init_constants
2022-03-29 Nicolas Berthier <nicolas.berther@ocamlpro.com>
* ppparse.y (literal_token): support SPACE or SPACES figurative
constant as second operand of partial replacing phrases
2022-03-11 Fabrice Le Fessant <fabrice.le_fessant@ocamlpro.com>
* config.def, parser.y: add support for the STOP ERROR statement
2022-03-10 Simon Sobisch <simonsobisch@gnu.org>
* pplex.l (next_word_is_comment_paragraph_name): extracted from (ppinput)
* pplex.l (get_word): new function to extract word and use in
(is_condition_directive_clause, next_word_is_comment_paragraph_name)
* reserved.c, scanner.l, tree.h: renamed cb_strncpy_upper to
cb_memcpy_upper, as it does not follow strncpy rules
* reserved.c (cb_strcasecmp) streamlined from glibc implementation
* reserved.c, cobc.h: exported cb_strcasecmp
* cobc.c, parser.y, ppparse.y, typeck.c: replaced locale-aware
strcasecmp with cb_strcasecmp where possible
* cobc.c, codegen.c, field.c, help.c, parser.y, pplex.l, ppparse.y,
scanner.l, tree.c, cobc.h: cleanup of header inclusion (stdio.h,
string.h, strings.h)
2022-03-03 Simon Sobisch <simonsobisch@gnu.org>
* ppparse.y (ppp_set_value): parse MicroFocus style $SET (numlit);
minor refactoring to remove local variables and not allocate
memory for invalid literals
* ppparse.y (set_choice): output parsed literal instead of token
* cobc.h, tree.h: moved flex directive actions and value types along
with cb_define_struct to tree.h as enum cb_directive_action and
enum cb_definition_type
2022-02-13 Ron Norman <rjn@inglenet.com>
* codegen.c: Fix for setting initial values for WORKING-STORAGE
with multiple OCCURS and VALUES
2022-02-10 Samuel Belondrade <samuel.belondrade@atos.net>
* pplex.l (ppecho, ppecho_replace): add a loop to check all data queue
after a partial match bug #778
2022-02-07 David Declerck <david.declerck@ocamlpro.com>
* config.def, parser.y: allow DEPENDING clause in RECORD CONTAINS
2022-02-04 David Declerck <david.declerck@ocamlpro.com>
* parser.y, reserved.c, scanner.l, typeck.c: Add GCOS-specific mnemonics
ALTERNATE-CONSOLE, ALTERNATE CONSOLE and TERMINAL
2022-01-28 Fabrice Le Fessant <fabrice.le_fessant@ocamlpro.com>
* warning.def, pplex.l: split warning for missing newlines, it now
can be disabled by -Wno-missing-newline instead of -Wno-others
2022-01-28 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_build_cond): attach source reference for all possible
kind of conditions
2022-02-06 Ron Norman <rjn@inglenet.com>
* codegen.c: if verb changes then emit trace/debug code, too
2022-02-04 David Declerck <david.declerck@ocamlpro.com>
* parser.y: allow the WITH CONVERSION clause right after DISPLAY (ignored)
2022-01-27 Nicolas Berthier <nicolas.berthier@ocamlpro.com>
* pplex.l, ppparse.y: add support for CONTROL DIVISION (GCOS 7
extension); only SUBSTITUTION SECTION is handled yet
* config.def: new control-division option
2022-02-04 David Declerck <david.declerck@ocamlpro.com>
* cobc.c, cobc.h, config.def, pplex.l, ppparse.y: make the
indicator column configurable
2022-01-25 Nicolas Berthier <nicolas.berther@ocamlpro.com>
FR #137: relax syntax for partial replace
* pplex.l, ppparse.y, config.h: support COPY and REPLACE
statements with partial REPLACING operands specified using
literals
* config.def: new option partial-replacing-with-literal
* cobc.h, pplex.l (ppparse_verify): feature verification while in
ppparse.y
* pplex.l (ppparse_error): shift newline counter by one when
reporting an error when in ppparse.y
* ppparse.y (unquote, fix_filename): factorize code for
unquotation of alphanumeric literals
2022-01-17 Ron Norman <rjn@inglenet.com>
* parser.y: VARYING var FROM exp BY exp partly added
* tree.h: Add CB_VARY and updated cb_field accodingly
* codegen.c: Updated to use new CB_VARY
2021-12-30 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (table_name): check for KEY phrase in SEARCH ALL
* parser.y (end_perform_or_dot): fix terminator cleanup, previously freed the
wrong cb_tree
* parser.y, scanner.l: distinguish between tokens END / AT_END,
ESCAPE / ON_ESCAPE, EXCEPTION / ON_EXCEPTION and
renamed tokens NOT_END -> NOT_AT_END, NOT_ON_EXCEPTION -> NOT_EXCEPTION,
NOT_OVERFLOW -> NOT_ON_OVERFLOW, NOT_ESCAPE -> NOT_ON_ESCAPE
* codegen.c (output_search_all): add WHEN tracing, to keep performance only
done after the actual execution
* codegen.c (output_search_whens): add SEARCH VARYING tracing
* tree.h (struct cb_search), tree.c (cb_build_search), parser.y,
typeck.c (cb_emit_search, cb_emit_search_all),
codegen.c (output_search_whens, output_search_all): renamed end_stmt in
cb_search to at_end, storing pair of AT END (position) and statements
* codegen.c (output_search_whens, output_search_all): adjust output of
source references for better debugging experience and add AT END tracing
* typeck.c: Remove ERROR for REWRITE an INPUT-OUTPUT of LINE SEQUENTIAL
This has been supported for a while in rw/trunk
2021-12-25 Ron Norman <rjn@inglenet.com>
* parser.y: fix to check for missing REPORT data clauses
* codegen.c: handle report field with SOURCE "literal"
* field.c: compute report field size for SOURCE "literal"
* tree.c: fix bug #772 check for report field missing PIC
when using SUM clause
2021-12-21 Samuel Belondrade <samuel.belondrade@atos.net>
* codegen.c (output_base): fix undeclared variable with REDEFINE GLOBAL
[bugs:#777]
2021-12-14 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (print_fields), codegen.c (output_field_display): only check for
EXTERNAL/BASED GLOBAL on level 01/77
* codegen.c (output_param): don't set external attribute for sub-fields
2021-11-26 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (cobc_print_info): output COB_STRIP_CMD when verbose
* cobc.c: ensure correct buffer size for handling COB_STRIP_CMD
* cobc.c (print_fields): minor refactoring
2021-11-22 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_emit_allocate_identifier, cb_emit_allocate_characters),
tree.h, parser.y: split and document (cb_emit_allocate)
2021-11-18 Ron Norman <rjn@inglenet.com>
* field.c: More work for OCCURS with multiple VALUES
* codegen.c: More work for initialize of OCCURS with multiple VALUES
2021-11-15 Ron Norman <rjn@inglenet.com>
FR #234: multiple VALUEs for OCCURS
* field.c (validate_elem_value): Accept multi VALUES for simple OCCURS
* tree.h: Add flag_occurs_values to cb_field
* codegen.c: Handle initialize of OCCURS with multiple VALUES
2021-11-14 Ron Norman <rjn@inglenet.com>
Implement FR 235: add bitwise operators for numeric items
* reserved.c: Add bit-wise words B-AND, B-NOT, B-OR, B-SHIFT-L, B-SHIFT-R,
B-XOR, B-SHIFT-LC, B-SHIFT-RC
* parser.y: Add grammar for handling bitwise operations
* typeck.c, tree.c: Add checks for handling the bitwise operations
* codegen.c: Add code emission for the bitwise operations
2021-11-05 Simon Sobisch <simonsobisch@gnu.org>
* field.c (compute_size): adjusted check to correctly catch items bigger
than 2 GB
* tree.c (get_pic_number_from_str) [COB_64_BIT_POINTER]: allow up to
10 significant digits
* tree.c (cb_build_picture): check for value <= INT_MAX
2021-10-30 Ron Norman <rjn@inglenet.com>
* parser.y: For ASSIGN PRINTER or PRINTER-1 set file type to LINE ADVANCING
2021-10-23 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (process_command_line) [__TINYC__, __OS400__): early exit when
assembling is requested, for the testsuite with a "skip" status
* cobc.c: removed unused aflag_set, renamed gflag_set to source_debugging
* cobc.c (process) [__OS400__]: simplified source-debugging handling
2021-10-19 Simon Sobisch <simonsobisch@gnu.org>
* config.def (larger-redefines): changed to support option from boolean
larger-redefines-ok
* warning.def (cb_warn_larger_01_redefines): new warning for possibly
problematic but allowed level 01 non-external REDEFINE
* field.c (compute_size): cater for cb_larger_redefines and
cb_warn_larger_01_redefines
* codegen.c (output_display_fields, output_field_display): add validation
(level 88) items in commented output if COBC_GEN_DUMP_COMMENTS is active
including the full list of their VALUE constants
2021-10-18 Simon Sobisch <simonsobisch@gnu.org>
* field.c (cb_build_full_field_reference): fix bug #776
infinite loop for FILLER definitions above KEY in OCCURS
* field.c (copy_into_field_recursive): explicit const specification for
key references
2021-10-04 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_integer, output_long_integer): use
integer exponentiation in libcob instead of floating point
from libmath/math.h, fixing #702
2021-10-01 Simon Sobisch <simonsobisch@gnu.org>
* ppparse.y, pplex.l, scanner.l: implementation of COBOL-WORDS directive
* reserved.c, cobc.h, tree.h: added missing COBOL 202x reserved words
and intrinsic functions to the internal lists
* parser.y: _parsing_ of INSPECT BACKWARD, SEND mcs
2021-09-30 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, field.c: partial merge of 2020-01-12 related to bug #513
* codegen.c: use of new enum cobc_init_type instead of comparing an int
to #define'd constants, reduced some variable scope
2021-09-29 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_file_initialization): don't generate attribute
setting which is done in cob_file_malloc / cob_file_external_addr
* codegen.c (output_module_init_function): set module->gc_version
2021-09-28 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (cobc_print_info): skip initial "." when printing COB_EXE_EXT
* cobc.c (process_command_line): postpone version output for --verbose
* cobc.c (set_listing_date): use formatted instead of ANSI timestamp,
allow format to be specified at cobc compile-time via with define
LISTING_TIMESTAMP_FORMAT
2021-09-27 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_build_generic_register): handle CONSTANT
* error.c (ambiguous_error): handling for internal definitions / registers
* typeck.c (cb_build_generic_register), tree.h: optionally return
cob_field for register
* cobc.c, cobc.h, reserved.c: code for ancient OSVS registers - disabled
2021-09-26 Simon Sobisch <simonsobisch@gnu.org>
* field.c (create_implicit_picture): PICTURE is mandatory
for report description entries with SOURCE or SUM clause
2021-09-23 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_build_const_length): ensure we actually have a valid
tree to build the length of, fixing #769 SIGSEGV with invalid code
2021-09-22 Simon Sobisch <simonsobisch@gnu.org>
* scanner.l, cobc.c: fix ODOSLIDE directive
2021-09-21 Simon Sobisch <simonsobisch@gnu.org>
* tree.h (cb_param_size), parser.y: new enum instead of single defines,
including new CB_SIZE_UNSET and partial addition CB_SIZE_16/CB_SIZE_32
* tree.c (set_sign_and_size_from_parameter_field): extracted from
(output_call_protocast, output_call_by_value_args)
* tree.c (get_size_parameter_type): extracted from (output_call_protocast,
output_call_by_value_args, try_get_by_value_parameter_type)
2021-09-21 Christian Lademann <christian@lademann.online>
* typeck.c: accept 3-byte CRT STATUS;
accept numerical CRT STATUS with at least 4 digits
2021-09-20 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (cobc_abort, abort_if_too_many_continuation_lines,
cobc_tree_cast_error): use common diagnostic format for internal errors
* tree.c (cb_build_call_parameter), tree.h, parser.y: extracted from
parser, internally convert BY VALUE ZERO to BY VALUE 0
* parser.y (call_param): added MicroFocus SIZE IS clause for CALL BY VALUE,
but deactivated because of reduce/reduce conflicts -> needs dialect
option and scanner adjustment or drop of OpenCOBOL SIZE IS extension
2021-09-19 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, typeck.c: let DISPLAY OMITTED be handled identical
to common display sources: as the entry of a list; removing the
need to cast and extra check during the validation
2021-09-17 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: some minor conflicts "resolved", support of old extension
SCREEN SECTION VALUE without "VALUE", fixed ACU's PROPERTY xyz ARE
* warning.def: new option cb_warn_repository_checks (defaults to on)
* typeck.c: depend repository checks on cb_warn_repository_checks
2021-09-16 Edward Hart <edward.dan.hart@gmail.com>
* reserved.c: fixed bug #764, where deleting a reserved word which
shares the same hash as another word could make the other word
inaccessible in the reserve word table.
2021-09-15 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (emit entry), typeck.c (cb_validate_parameters_and_returning),
tree.h: extracted function from parser.y
* parser.y, reserved.c, codegen.c, tree.h, error.c: work on
partial integration of patch #32 (2017-10-07) for supporting PROTOTYPE,
adjusting checks from numbered LINKAGE items to PROCEDURE DIVISION USING
2021-09-14 Simon Sobisch <simonsobisch@gnu.org>
* config.def, flag.def, cobc.c, codegen.c, field.c, typeck.c:
moved and renamed cb_flag_odoslide to dialect option cb_odoslide and
explicit check for it along complex_odo instead of setting it
* ppparse.y, pplex.l, scanner.l, cobc.c: add support for ODOSLIDE directive
2021-09-07 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: combined multiple exception_phrases nonterminals moving the
single difference to the new function get_handler_type_from_statement
which is a bit slower but reduces duplications
* reserved.c, parser.y: added parsing for RAISING clause, combining
identical code for EXIT and GOBACK to (goback_exit_body)
* reserved.c, parser.y, scanner.l, tree.h: initial parsing approach for
COBOL 202x Message Control System (MCS) statements SEND and RECEIVE
* scanner.l: return WORD token if SUPPRESS is not reserved
2021-09-05 Simon Sobisch <simonsobisch@gnu.org>
* cobc.h (cb_exception), cobc.c: add fatal attribute
* reserved.c, tree.h, cobc.c, help.c: added cb_list_exceptions /
--list-exceptions
2021-09-02 Simon Sobisch <simonsobisch@gnu.org>
* reserved.c (cb_toupper): extracted and used in different places
* reserved.c (cb_memcpy_upper), tree.h: renamed + exported function
* scanner.l (copy_word_in_quotes, copy_two_words_in_quotes): internally
upper-case when handling reserved word adjustment
* reserved.c (is_invalid_word): word checks extended, cobc does not
handle extended characters in reserved words
* reserved.c: unpacked HASHMAP_EXTRA as only used for reserved words
* reserved.c: work on removing the need to compare reserved words
case-insensitive (not finished yet)
2021-09-01 Simon Sobisch <simonsobisch@gnu.org>
* reserved.c (default_reserved_words, cb_list_reserved), parser.y:
add COMMENT paragraphs back as context-sensitive words
* reserved.c (cb_list_reserved): specify DEBUG-ITEM variables as
implemented if defined as register
2021-08-31 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_build_debug_item): only build DEBUG-ITEM if defined
as register and in this case unreserve overlapping reserved words
* tree.c (cb_build_intrinsic), tree.h, reserved.c:
implement BIT-OF and BIT-TO-CHAR functions
* parser.y, reserved.c: implemented ACCEPT FROM MICROSECOND-TIME (ACU)
* typeck.c (cb_emit_accept_time), tree.h: codegen of
cob_accept_microsecond_time upon request and for std == ACU with
big enough fields
2021-08-28 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_build_assignment_name): fix SELECT filename ASSIGN filename
to lead to "redefinition of filename" when (the default) dialect option
assign-clause=dynamic is active; identical names are now always seen
as literal (similar to assign-clause=external, but without label
handling), see bug 669
2021-08-01 Ron Norman <rjn@inglenet.com>
* tree.h: additional fields for REPORT (varying, etc)
* cobc.c (print_fields): for listing of REPORT show STEP value
* parser.y: implement parsing for VARYING and nested OCCURS
* parser.y: only skip COL + if first field on a report LINE
2021-07-29 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, config.def: changed the auto-setting of the RECURSIVE attribute
in programs that CALL their own PROGRAM-ID (possibly deep in never called
copybooks) to depend on the dialect option "self-call-recursive", with the
option to skip that or warn/error, fixing bug 686
* parser.y: fix bug 748 SIGSEGV after warning: EXTFH address is not impl.
2021-07-12 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (cobc_getenv_path): drop invalid list from path
* config.c (cb_load_std): fixed old error passing enum instead of int
* parser.y: minor adjustments to USE handling
* pplex.l: drop "spurious $" in col 7 rule, fixing bug #577
* reserved.c, tree.h: added functions BIT-OF, BIT-TO-CHAR,
as unimplemented
* tree.c (cb_build_intrinsic), tree.h, reserved.c:
implement HEX-OF and HEX-TO-CHAR functions
2021-07-07 Simon Sobisch <simonsobisch@gnu.org>
* reserved.c, scanner.l, tree.c. pplex.l: use quotes again for including bison
generated headers, fixing bug #721
* parser.y, reserved.c, scanner.l, tree.c: work around bad Windows SDK header
* pplex.l: fixed rule that could prevent PROCESS/CBL to work as intended
2021-05-27 Simon Sobisch <simonsobisch@gnu.org>
* help.c: use double-dash for long options
2021-05-14 Simon Sobisch <simonsobisch@gnu.org>
* tree.c (finalize_file): allow use of GLOBAL record-key-names
in nested programs
2021-05-12 Simon Sobisch <simonsobisch@gnu.org>
* pplex.l: fixed #716 by including necessary context for PROCESS statement
handling and added the CBL variant to not match the word everywhere
2021-05-11 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (use_reporting): check for valid identifier before use,
use common malloc for generated common
2021-05-05 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (emit_main_entry): extracted for re-use
* parser.y (emit_entry): override source location only upon
explicit request, we need entry points to be where the first
section/paragraph/statement comes to not confuse tools like GDB
with the wrong line reference (especially if we have DECLARATIVES)
2021-04-08 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (print_with_overflow): extracted from print_errors_for_line,
fixed potential overflow on HPUX and MSVC
* flag.def, cobc.c: new -ftcmd (cb_listing_cmd) to include command line in
listing summary
2021-03-23 Simon Sobisch <simonsobisch@gnu.org>
* warning.def, tree.c, cobc.c, cobc.h: split -Wconstant-numlit-expression
from -Wconstant-expression
2021-03-18 Ron Norman <rjn@inglenet.com>
* codegen.c (output_section_info, output_trace_info): current name of
section/paragraph/verb are now set via pointers in cob_module instead
of executing trace functions, which are now only generated if trace
is requested
2021-03-07 Simon Sobisch <simonsobisch@gnu.org>
* Makefile.am: honor COBC_CPPFLAGS passed to configure
2021-03-06 Simon Sobisch <simonsobisch@gnu.org>
* tree.h [COB_EXTERNAL_XREF]: fixed define of no-op cobc_xref_call
2021-02-18 Simon Sobisch <simonsobisch@gnu.org>
* error.c, tree.c: fixed bug #707 SIGSEGV in dialect related messages
2021-02-08 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_stmt): extracted output_source_reference and
also used for PERFORM UNTIL and VARYING
* tree.c (cb_build_binary_op): add source reference to non-constant
expressions
* tree.c (cb_build_perform_varying): add source reference to VARYING clause
* codeoptim.c (COB_GET_NUMDISP, copied later to COB_GET_NUMDISPS):
only use the half-byte of the char to resolve the integer value,
preventing overflows leading to huge/negative values and providing
conversion of space to zero and correct conversion of numeric values
from both ASCII and EBCDIC; also gets rid of some checks
2021-02-04 Simon Sobisch <simonsobisch@gnu.org>
* cobc.h: remove cb_listing_files ...
* codeoptim.def, codeoptim.c, typeck.c (cb_build_identifier), cobc.c:
new entries COB_CHK_LINKAGE, COB_CHK_BASED, COB_CHK_SUBSCRIPT,
COB_CHK_ODO, COB_CHK_REFMOD_MIN, COB_CHK_REFMOD for inline checks of
most-used runtime checks - now only passed to libcob in case of actual
errors; new entry COB_NOP to replace the cob_nop call (frame switch)
by a simple pointer comparision, which also ensures on all tested
compilers that the line is not optimized out, and for those that
optimize the check away the old cob_nop call is still done
2021-02-03 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_stmt): dont' emit C labels for dummy sections,
don't emit C line directives for dummy sections/paragraphs
2021-02-02 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_stmt): emit cob_nop in C labels to fix
position in the generated assembler which was previously
in the COBOL statement above the label
* codeoptim.def, codeoptim.c, typeck.c, cobc.c: optimized check for
linkage and based items (local check prevents function call),
similar optimized no-op
2021-01-25 Simon Sobisch <simonsobisch@gnu.org>
* reserved.c: fixed context attribute of acu-extension POS
* parser.y, reserved.c, tree.h, cobc.h: added acu-extension
MOVE WITH CONVERSION as PENDING
2021-01-07 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (cobc_print_version): msgid change moving URLs to parameter per
gettext-guidelines
2021-01-05 Simon Sobisch <simonsobisch@gnu.org>
* field.c (cb_build_full_field_reference): fix bug #
2021-01-02 Simon Sobisch <simonsobisch@gnu.org>
* cobc.h, cobc.c: removed unused cb_exception->explicit_enable_val
2020-12-30 Simon Sobisch <simonsobisch@gnu.org>
* flag.def, cobc.c: change cb_flag_notrunc to cb_flag_trunc to "fix"
-fno-fnotrunc with backward-compatibilty handling
2020-12-23 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_initialize_compound): special handling for OCCURS 1
* codegen.c (output_report_sum_control_field): adjusted for literal source
2020-12-21 Simon Sobisch <simonsobisch@gnu.org>
* field.c, pplex.l, tree.c, typeck.c: fixed warning option querying enum
instead of actual value via cb_warn_opt_val
2020-12-09 Ron Norman <rjn@inglenet.com>
* cobc.c: now calls cob_get_sig_name from common.c to get signal name
2020-12-18 Simon Sobisch <simonsobisch@gnu.org>
FR #397: add support for JSON GENERATE anonymous JSON objects
* parser.y: split _name_of to _xml_name_of and _json_name_of, the later
one with additional possible NAME ... IS OMITTED and
without GENERATE XML checks
* typeck.c (is_subordinate_to_fields): cob_field based
variant of is_subordinate_to
* typeck.c (syntax_check_ml_gen_name_list): additional parameter is_xml
to distinguish between XML and JSON generation (messages, possible rules)
* typeck.c (syntax_check_ml_gen_name_list): check of NAME ... IS OMITTED
2020-12-17 Simon Sobisch <simonsobisch@gnu.org>
bug #571 revised:
* typeck.c (create_implicit_assign_dynamic_var): add ASSIGN name as
implicit VALUE clause for the implicit variable providing a
reasonable (expected) default if not manually set
* warning.def (implicit-define): changed from "always on" to "only upon
request" as the unexpected "inconsistent empty filename" was fixed
2020-12-15 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c [!COB_ALLOW_UNALIGNED]: fixed unused variable warning
* parser.y (evaluate_body): don't call cb_emit_evaluate if contained
statements are skipped (not active USE FOR DEBUGGING), fixing bug #693
* parser.y: dropped "main_statement" and deactivated unnecessary calls to
begin_implicit_statement
2020-12-13 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (propagate_table): reduced codegen for INITIALIZE to a single
variant for tables with compile-time known size, removing extra logic
2020-12-11 Ron Norman <rjn@inglenet.com>
* codegen.c (output_initialize_compound, propagate_table):
fix INITIALIZE logic to correctly handle subscripts (bug #694)
* parser.y: add check for valid ->pic pointer
2020-12-07 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_display_fields): prevent bad integer promotion in
libcob (typeck within va_arg) by forcing the unsigned long type for
the varargs argument
* typeck.c (cb_build_generic_register): favor memcpy over strncpy
2020-12-06 Simon Sobisch <simonsobisch@gnu.org>
* Makefile.am (cobc_LDADD): fixed ordering, in-tree libraries
must be specified first
2020-12-05 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_display_fields): codegen to output INDEXED BY variables
2020-12-03 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (remove_trailing_slash) [_MSC_VER]: new function added to resolve
MSVC's issues with trailing slashes
2020-12-02 Simon Sobisch <simonsobisch@gnu.org>
* pplex.l (ppcopy_try_open): removed preprocessor check/define S_ISREG as
done in libcob/common.h
* codegen.c (output_display_fields): changed NULL-checked fields to
generate calls to (cob_dump_field) to keep formatting and control there
instead of preformatting with use of message-related (cob_dump_output);
fixed output for based-check'd OCCURS 01 and comment-only output
2020-12-01 Ron Norman <rjn@inglenet.com>
* codegen.c (output_dump_code): emit code to check if BASED/LINKAGE fields
have a not NULL base address before dumping them; handle depending_on
2020-11-30 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_dump_code): moved out of (output_internal_function)
* codegen.c (output_dump_code): generate "end of dump" message
* codegen.c (output_display_fields): always output group OCCURS items,
not only the first time; removed duplicated code
* codegen.c (output_field_display): adjusted variable types to unsigned
2020-11-30 Ron Norman <rjn@inglenet.com>
* pplex.l (ppcopy_try_open): when searching for COPY book, use 'stat'
to verify its a file
* codegen.c: only emit the 'i_len' variable if it is used
2020-11-29 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c, cobc.h: moved memory related struct and size from header + define
to source + constant
* error.c (cb_note_x): fixed late return that lead to listing issues and
memory leak
2020-11-28 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: fixed bad memory access for cobc -v -version
* scanner.l: fxied bad memory access for "missing terminator"
* tree.c, parser.y, field.c: last missing adjustments for cb_warn_opt_val
* codegen.c, error.c, pplex.l, typeck.c: fixed some minor coding issues
2020-11-27 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (process_command_line): early processing for -g and optimization
flags to allow their "grouped" options to be adjusted by single options
later on
* cobc.c (process_command_line), flag.def: -g now implies the recently
added flags -fgen-c-line-directives and -fgen-c-labels
* codegen.c: output "cob_nop ();" instead of ";" for not-optimized "no op"
* codegen.c (output_initialize_compound): temporary remove of reference
checks not needed any more
* codegen.c (output_param): removed extra fname
2020-11-25 Simon Sobisch <simonsobisch@gnu.org>
* error.c, cobc.h, tree.h: diagnostic functions now return cb_warn_val to
provide the caller with the information about the type of diagnostic
raised (note: can be adjusted with -W /-Wno / -Werror and by "ignored");
use of cb_error_node for position tree in some wrapper functions (has no
source reference and is therefore always resolved by current line)
* error.c, tree.h, typeck.c, parser.y: cb_note_x now implies listing
suppression, therefore made related functions static instead of exporting
* error.c, tree.h: cb_word->error now specifies if the word reference
produced a warning or error
* error.c (get_qualified_name): extracted from undefined_error and re-use
* error.c (undefined_error, ambiguous_error): only raise these errors /
warnings once per word, solving FR #313 report undefined identifiers once
2020-11-25 Ron Norman <rjn@inglenet.com>
* codegen.c: Additional work to enhance INITIALIZE
2020-11-23 Ron Norman <rjn@inglenet.com>
* codegen.c: Generated code for INITIALIZE enhanced to emit progressive
'memcpy' to speed up the process
If size is not known until run time then emit call to cob_init_table
2020-11-21 Simon Sobisch <simonsobisch@gnu.org>
* codgen.c (process_command_line): minor cleanup
2020-11-20 Simon Sobisch <simonsobisch@gnu.org>
* pplex.l (ppinput): fixed processing after "line not terminated"
2020-11-19 Simon Sobisch <simonsobisch@gnu.org>
FR #53 TURN directive and -fno-ec=NAME/-fec=NAME - finish
* cobc.c (turn_ec_for_table): correct handling for EC-ALL
* cobc.c (cobc_turn_ec): handling EC-USER as PENDING
* cobc.c (process_command_line), cobc.h: handle -debug before all the
flags and exception options it sets, allowing to remove its internal
explicit_set flag
2020-11-18 Ron Norman <rjn@inglenet.com>
* codegen.c, typeck.c: Generated code for INITIALIZE computes the actual
length for OCCURS DEPENDING on x UNBOUNDED before doing the initialize
2020-11-11 Ron Norman <rjn@inglenet.com>
* codegen.c: Emit correct code for -debug within C function calls
2020-11-08 Simon Sobisch <simonsobisch@gnu.org>
FR #390 ref-mod with zero-length
* config.def, typeck.c (cb_build_identifier): added cb_ref_mod_zero_length
to allow reference-modification at compile-time with a length of zero
* pparse.y, pplex.l, scanner.l, cobc.c: added >> REF-MOD-ZERO-LENGTH and
adjusted SSRANGE, now also supporting SSRANGE"1" and SSRANGE"3"
2020-11-04 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_initialize_compound): adjusted OCCURS initialization
to only do the initialization (and runtime checks) once and then
memcpy to all other occurences
* tree.c: preparation for all-upper-case names (post 3.1)
2020-11-03 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c, tree.h, cobc.c: added cb_wants_dump_comments variable,
set by cobc if COBC_GEN_DUMP_COMMENTS is set
* codegen.c: depending on cb_wants_dump_comments generate additional
dump code *as comment*: REDEFINES and lvl 66/78 fields, fields that
should not be dumped and information about field attributes
* codegen.c (output_display_fields): removed duplicate code,
use of output_block_open/output_block_close
2020-11-02 Simon Sobisch <simonsobisch@gnu.org>
* pplex.l (ppcopy_find_file): extracted from (ppcopy)
* pplex.l (ppcopy): reordered to remove need for goto
* pplex.l (ppcopy): for COPY copybook-name IN library-name
try to resolve library-name via environment COB_COPY_LIB_library-name
before testing as-is and additional fallback to "ignore library-name"
for compatibility to earlier GnuCOBOL and MF versions
* pplex.l: don't add extension if already part of the copybook-name,
for compatibility: can be disabled by defining COB_MULTI_EXTENSION
* cobc. (process_env_copy_path): handle empty entry as "." (MF-compat)
2020-10-31 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_initialize_compound): resolve occurs_max only once
* cobc.c, flag.def: added -fno-dump=<scope>
* flag.def, cobc.c, cobc.h, help.c: added CB_FLAG_OP for flags
with optional parameter
2020-10-26 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c, config.c: defaults.h removed
* cobc.c (cobc_getenv, cobc_getenv_path): return leading space
for later error reporting
* cobc.c: allow omitting the definition for COB_EXPORT_DYN, COB_SHARED_OPT,
COB_PIC_FLAGS via config.h (mostly for MSVC)
* cobc.c (cobc_print_info): extracted common code to cobc_var_and_envvar_print
and additionally check environment var for "empty"
* Makefile.am: pass LOCALEDIR via define
2020-10-17 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_cobol_info): fixed C89 declaration
* codegen.c: minor optimizations in generating pre-calculated offsets
and check for flag_filler instead of strcmp
2020-10-13 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_size): limit variable scope
* codegen.c (output_initialize_uniform): limit variable scope and
calculation in chk_field_variable_size to be only done if used
* tree.c (cb_name_errmsg): removed and logic merged into new literal handling
upon merge of 2020-01-03
* pplex.l (plex_call_destroy): added cleanup for internal copybook references
* help.c (cobc_print_usage_warnings): added -w option
2020-10-12 Ron Norman <rjn@inglenet.com>
* typeck.c: Flag internal variables with 'flag_real_binary'
* codegen.c: Emit USAGE INDEX and internal binary variables
as COB_TYPE_NUMERIC_COMP5
2020-10-06 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: handling new COB_DEBUG_FLAGS
2020-09-30 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_emit_json_generate, cb_emit_xml_generate): adjusted to allow
for new decimal_point param without breaking API from 2018
* Makefile.am: fixed inclusion of libsupport, now libtoolized
* cobc.h: include gettext without lib prefix
* pplex.l: extracted (ppcopy_try_open) from (ppcopy) to split file search
from actual processing and removing duplicate code
* cobc.c: adjusted handling of output file name (especially with COB_DASH),
fixing errors in MinGW + CYGWIN
* cobc.c: use EXIT_SUCCESS and EXIT_FAILURE instead of exit(0/1)
2020-09-29 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (cobc_print_info): adjusted version output for JSON and MPIR
* typeck.c: adjusted check of defines for JSON
2020-09-27 Bob Dubner <rdubner@symas.com>
* codegen.c (output_cobol_info): emit doubled backslashes for source file,
fixing bug #698 problem with #line directives
2020-09-22 James K. Lowden <jklowden@symas.com>
* flag.def (intrinsics): remove extraneous newline in output
2020-09-14 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (cobc_xref_link), tree.h: changed cb_xref_elem to a dual-linked
list allowing to insert elements and read backwards (in most cases the
reference numbers increase)
and added a counter to cb_xref
* error.c (cb_add_error_to_listing), cobc.h, cobc.c: changed list_error
to a dual-linked list (in most cases the reference numbers increase
and we can drop list_error_reverse this way)
* cobc.c, tree.h: if external reference should be used: define the funtions
to a no-op, removing some clutter in the xref functions
* cobc.c (terminate_str_at_first_trailing_space): insert one string instead
of zeroing out the complete memory
* cobc.c (get_next_listing_line): uses memset for spacing out till end of line
instead of iterating over the char array manually
* typeck.c (cb_emit_open): only add a receiving entry when not OPEN INPUT
2020-09-10 Simon Sobisch <simonsobisch@gnu.org>
update for compiler diagnostics including FR 263 (diagnostics as "note")
and FR 386 (show warning flag in use)
* cobc.c, cobc.h, error.c, tree.h, typeck.c: change internal representation
of warning options from integers to new enum cb_warn_opt which can have
a warning value of new enum cb_warn_val instead of defines
* pplex.l: extended struct copy_info to a double-linked list to preserve
correct order for "file was included here" messages
* pplex.l, error.c (cb_inclusion_note), tree.h: moved warning message output
"file was included here" to error.c as "note", with adjusted msgid
* cobc.c, error.c: moved (cobc_too_many_errors) to error.c and distinguish
between -Wfatal-errors (internally -1) and -fmax-errors
* warning.def (cb_warn_source_after_code), pplex.l (ppinput):
moved "source text after program-area" from -Wother to a separate
new warning -Wdangling-text, not enabled by default any more
* warning.def: enable cb_warn_implicit_define and cb_warn_corresponding
by default
* warning.def, errror.c: new option cb_warn_ignored_error instead of
"errror (ignored), also allowing to keep the error with
-Werror=ignored-error
* cobc.c, flag.def (cb_diagnostic_show_option), error.c:
new option -fdiagnostics-show-option, enabled by default, to print the
command line option that is responsible for the reason for the diagnostic
2020-09-08 Simon Sobisch <simonsobisch@gnu.org>
* pplex.l (ppinput): skip last line if it only contains spaces
* tree.c (literal_for_diagnostic), tree.h, scanner.l: extracted
(literal_for_diagnostic) from scanner.l (error_literal), extended and
used in tree.c to provide a single function to resolve literals
2020-09-08 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_validate_program_body): verify ANY LENGTH as formal parameter
2020-09-04 Ron Norman <rjn@inglenet.com>
* codegen.c: emit active runtime checks also in conditions
for example reference modification or subscript being out of bounds
2020-09-03 Simon Sobisch <simonsobisch@gnu.org>
* scanner.l (read_literal): catch and error missing termination of literal
* typeck.c (cb_build_identifier): allow bad subscripts with -frelax-syntax,
don't generate odo-check for UNBOUNDED items
2020-09-02 James K. Lowden <jklowden@fig.schemamania.org>
* cobc.c, error.c: prevent messages from overflowing message buffer
2020-09-01 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (codegen_init): fixed broken codegen for multi-source compiles
introduced when fixing bug #666
2020-08-28 Ron Norman <rjn@inglenet.com>
* codegen.c: Changes for UNBOUNDED OCCURS
* typeck.c (cb_emit_move): Changes for UNBOUNDED OCCURS
2020-08-24 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c: fixed dump of non-standard 01-OCCURS and LINKAGE
2020-08-17 Simon Sobisch <simonsobisch@gnu.org>
* config.def, parser.y: added cb_local_implies_recursive to cater for MF's
strange extension
2020-08-14 Simon Sobisch <simonsobisch@gnu.org>
* tree.h (struct cb_file), parser.y: added decription_entry for
reference in error messages
* tree.c (finalize_file), parser.y, error.c (cb_warning_dialect_x):
improved syntax checks, now allowing RECORD VARYING also with
fixed length FD (as all other known compilers do)
2020-07-14 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c, cobc.h, codegen.c: added dumping of LOCAL-STORAGE,
fixed dump of of SD
2020-07-30 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_call): don't setup exceptions for static CALLs
* help.c: adjusted help output;
including fix for bug #670 "multiple listing of -debug"
* flag.def: removed dummy variables cb_def_dump, cb_def_callfh
2020-07-27 Simon Sobisch <simonsobisch@gnu.org>
refactored codegen, now using a loop instead of a recursive call
fixing bug #666
* codegen.c, cobc.c, tree.h: split (codegen) into
(codegen_init, codegen_internal, codegen_finalize);
moved more initialization to codegen_init;
limit variable scope and use of static variables
2020-07-26 Edward Hart <edward.dan.hart@gmail.com>
* config.def: added possible values for assign-clause and
screen-section-rules
2020-07-21 Simon Sobisch <simonsobisch@gnu.org>
* pplex.l, ppparse.y: implemented CHECKNUM/NOCHECKNUM,
preparation for SPZERO
* ppparse.y: improved error handling for broken IF/ELIF
directives by consuming as much errors as possible and
emitting a "false"
2020-07-19 Edward Hart <edward.dan.hart@gmail.com>
* cobc.c, typeck.c: added support for JSON-C as JSON handler
2020-07-17 Edward Hart <edward.dan.hart@gmail.com>
fixed bug #663
* scanner.l: add EQUALS as alias for EQUAL in conditions
* typeck.c: fixed segfault with parens around condition word
* config.c, config.def, cobc.h, typeck.c: added dpc-in-data conf option
* pplex.l, ppparse.y: added corresponding SET DPC-IN-DATA directive
2020-07-09 Edward Hart <edward.dan.hart@gmail.com>
* reserved.c (is_reserved_word): fixed division by zero when called
before reserved words list has been initialised (bug #659). Thanks
to Paul Smith for fix.
2020-07-08 Simon Sobisch <simonsobisch@gnu.org>
* scanner.l (scan_x): fixed #658 by building a national literal for nx''
2020-07-07 Ron Norman <rjn@inglenet.com>
* codegen.c (output_local_field_cache): prevent empty declaration
and additional comment after report OCCURS fields
2020-07-07 Edward Hart <edward.dan.hart@gmail.com>
* cobc.c, scanner.l: fixed memory issues.
2020-07-07 Simon Sobisch <simonsobisch@gnu.org>
FR #53 TURN directive
* cobc.c (turn_ec_io): fixed case-sensitivity in filename comparison
2020-07-06 Simon Sobisch <simonsobisch@gnu.org>
FR #359 Realia / OSVS / MSCOBOL compatibility
* parser.y, cobc.h, reserved.c, tree.c, tree.h: added partial
support for EXHIBIT (full parsing, without CHANGED + UPON)
2020-07-05 Edward Hart <edward.dan.hart@gmail.com>
* parser.y, config.def: added vsam-status config option.
2020-07-03 Edward Hart <edward.dan.hart@gmail.com>
* parser.y (file_status_clause): only ignore VSAM status, pending proper
config option.
* typeck.c: implement syntax rules for FILE STATUS (bug #656), with
warning for PIC 99 status (FR #333).
* parser.y (file_control_entry): fixed bug #619: create dummy
current_file for invalid SELECT.
* cobc.c (compare_prepare): fixed bug #569: stop copying into cmp_line
when line length exceeds CB_LINE_LENGTH.
2020-06-30 Simon Sobisch <simonsobisch@gnu.org>
FR #53 TURN directive - finished command line variant as -fno-ec/-fec
* cobc.c, flag.def, help.c: renamed -fdisable-ec/-fenable-ec
* cobc.c: removed the need to use EC- prefix in the name for -f[no-]ec
* flag.def, help.c: fixed some help output
2020-06-30 Edward Hart <edward.dan.hart@gmail.com>
* typeck.c: strengthened syntax checks on UNSTRING ... COUNT (bug #653).
2020-06-29 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_internal_function): fix bug #641 FUNCTION RETURNING
with variable field size
* parser.y (_procedure_returning): work around for bug #650
disabled PROCEDURE DIVISION USING for normal programs as pending
* codegen.c (output_call): use a temporary integer for CALL ... RETURNING
to not pollute RETURN-CODE in this case, fixing bug #651
2020-06-28 Simon Sobisch <simonsobisch@gnu.org>
* Makefile.am: include PROGRAMS_LIBS
2020-06-26 Edward Hart <edward.dan.hart@gmail.com>
FR #53 TURN directive
* cobc.c, cobc.h, tree.c: completed >>TURN EC-I-O file.
* cobc.c: fixed line reported in >>TURN syntax errors.
* pplex.l, ppparse.y: added SET BOUND and SET SSRANGE.
2020-06-26 Simon Sobisch <simonsobisch@gnu.org>
* pplex.l: allow more characters in $DISPLAY
2020-06-24 Simon Sobisch <simonsobisch@gnu.org>
* error.c (redefinition_warning), typeck.c (warning_destination): use
appropriate warning flag to allow handling -Werror=... and -Wno-...
* warning.def (redefinition): clarified help message
2020-06-23 Edward Hart <edward.dan.hart@gmail.com>
FR #53 TURN directive
* cobc.c, cobc.h: completed initial implementation on disabling ECs
with -fdisable-ec=NAME -fenable-ec=NAME
* cobc.c, cobc.h, parser.y, ppparse.y, scanner.l: completed initial
implementation of >>TURN
2020-06-22 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c, cobc.h, flag.def, ppparse.y: draft work on >>TURN and
disabling exceptions (FR #53)
2020-06-22 Simon Sobisch <simonsobisch@gnu.org>
FR #193 work on TYPE TO / SAME AS, LIKE
* parser.y (inherit_external_definition): added missing syntax check
* parser.y (single_reference): don't add entries in typedef to
reference_list as those are not accesible outside of it
* field.c (copy_into_field, copy_into_field_recursive): completely
rewritten, now copies single attributes explicit instead of copying the
complete source and restore some items later; re-create "local" fields
like indices and keys for OCCURS in the target space
* field.c (copy_into_field): handle VALUE clause on source and target
* parser.y (occurs_keys): removed unneeded NULL check
* parser.y (occurs_key_field): only build up field reference once and
reuse it for every key definition
* field.c, tree.h, parser.y (occurs_key_field): new function in field.c:
cb_build_full_field_reference, extracted and simplified from parser.y
2020-06-20 Simon Sobisch <simonsobisch@gnu.org>
* reserved.c: moved switches A-Z from 1-26 to 11-36 to allow them to
be used together with 0-7 (mf compat)
2020-06-17 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (get_finalized_description_tree): extracted to remove
duplicate code (part of it was missing in some old places)
* typeck.c (cb_build_move): simplified special handling for
cb_numeric_pointer
* typeck.c (cb_emit_move): removed checking of rw-sum-field on nearly
every codegen of a move instruction
* field.c (setup_parameters): early setup of tree category for fields with
USAGE DISPLAY as this was broken for at least all unreferenced fields
FR #193 work on TYPE TO / SAME AS, LIKE
* tree.c (cb_ref_internal): don't consider items within a typedef as
candidate for a reference
* cobc.c (set_picture): use originating field as USAGE/PICTURE
* cobc.c (print_fields): skip details in symbol listing for fields that
only reference another field
2020-06-16 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (print_fields): minor improvement to the symbol listing:
note EXTERNAL, BASED and GLOBAL attributes
* field.c (pic_digits): changed type from int to unsigned char as it
is used for accessing arrays
FR #193 work on TYPE TO / SAME AS, LIKE
* parser.y (usage_clause): fixes for USAGE type-name
* field.c (copy_into_field): first working draft for LIKE-integer,
fixes for TYPE TO / USAGE type-name
2020-06-15 Simon Sobisch <simonsobisch@gnu.org>
FR #382 -Wextra instead of -W
* warning.def, cobc.c, error.c, field.c, tree.c, typeck.c, parser.y:
renamed cb_warn_extra to cb_warn_additional
* warning.def, help.c: define -Wextra with fallback -W
* cobc.c: implement -Wno-error[=warning]
* cobc.c (process_run): use of new COBC_NAME + COBCRUN_NAME now defined in
defaults.h, if available use the fullname of the current process instead
of fixed "cobc" to get the path for cobcrun, extract some code to
resolve_name_from_cobc
2020-06-14 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (process_run): instead of hard-wired call of
"cobcrun + COB_EXE_EXT" resolve its name by environment COBCRUN or,
in case it isn't set, by cobc's fullpath with replacing cobc->cobcrun,
fixing bug #573
* cobc.c (main, process_run): fix compile from stdin with job-run
* field.c (validate_any_length_item): allow ANY LENGTH for PIC 1
2020-06-12 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (process_command_line) [_WIN32]: simplified code;
only convert from /opt to -opt if POSIXLY_CORRECT is not set;
added conversion from /? to --help
2020-06-10 Simon Sobisch <simonsobisch@gnu.org>
Bug #635 added checks for duplicate USING BY REFERENCE items
* parser.y (emit_entry), typeck.c (cb_emit_call): collect BY REFERENCE
items and check for duplicates
FR #193 work on TYPE TO / SAME AS, LIKE
* field.c (copy_into_field), tree.h: split out to static functions;
include specified VALUE clause from definition
* parser.y, reserved.c, tree.h: added parsing for LIKE clause as pending
* cobc.c: don't do pointer arithemetic on string constant (fixing Bug #644
warning on MacOS)
2020-06-09 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (call_system, output_return): new functions extracted from
different places to have the nearly identical calls to system and the
code handling verbosity and exit codes in one place
* cobc.c (call_system): don't raise SIGINT/SIGQUIT because of sub-process
* cobc.c (get_signal_name): copied from libcob/common.c
2020-05-26 Ron Norman <rjn@inglenet.com>
* codegen.c (output_local_field_cache): use output_emit_field
for REPORT field
2020-05-15 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: TYPEDEF is allowed with level 77
* field.c: attributes of OCCURS copied in TYPE TO entries
2020-05-11 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, field.c, tree.h, config.def, reserved.c, cobc.h:
FR #193 implementation of TYPEDEF, TYPE TO and USAGE type-name,
fixed some issues with SAME AS
* tree.c (cb_ref_internal): limit scope of some variables
2020-05-10 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c, config.c, pplex.l, scanner.l: silenced char-subscript warnings
by casts to unsigned char
2020-04-28 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_file_initialization): don't output key offset
if it is part of a component; even if this has only a single part
as components are not part of the record "KEYNAM = RECORD-FIELD"
2020-04-26 Ron Norman <rjn@inglenet.com>
* codeoptim.def (COB_GET_NUMDISPS), codeoptim.c, codegen.c: new routine
to convert signed DISPLAY into binary value;
* codeoptim.def (cob_get_numdisp, cob_get_numdisps): use of register
attribute and skipping of leading zeroes
2020-04-23 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: added ACCEPT with CURSOR parsing
2020-04-03 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c, tree.h: new field attribute flag_internal_register
* config.def, field.c, typeck.c: experimental numeric-pointer option
(cb_numeric_pointer) to handle ACU's special POINTER handling
2020-04-01 Simon Sobisch <simonsobisch@gnu.org>
* warning.def, cobc.h, cobc.c, error.c, field.c, typeck.c, parser.y:
new warning option -Wextra, replacing previous warningopt, allowing to
disable them or have them as error and fixing the previous behaviour
where -W effectively set them to be handled as error
* parser.y: removed some duplicate warnings and always raise PENDING,
not only in case of -W/-Wall
* tree.h, tree.c, error.c (cb_warning_dialect_x): new function,
possibly to be replaced later
* reerved.c: added COBOL 202x FUNCTION CONCAT
* tree.c (get_category_from_arguments): new function;
added missing implementation of "type of function depends on arguments"
and "check that arguments are of a matching type"
* tree.c, parser.y: changed "FUNCTION parameter" to "FUNCTION argument"
* typeck.c: FR #222 numeric checks for CRT STATUS (may be >= 4 digits)
2020-03-31 Simon Sobisch <simonsobisch@gnu.org>
* field.c.y (cb_validate_78_item): full validation and resolving
of level 78 value, even when not supported
* typeck.c (cb_validate_program_data): skip lvl 66 entries in odo-check
* parser.y, field.c: moved function (error_if_invalid_level_for_renames)
to field.c
* field.c (cb_validate_renames_item): reordered checks
* field.c (cb_validate_renames_item), tree.h: cb_validate_program_data
* typeck.c (cb_build_length): workaround for bug #623 RENAMES with length 0
* parser.y (renames_entry): extended syntax checks for RENAMES
* parser.y (special_names_clause), config.def (cb_special_names_clause):
FR #222 implemented SPECIAL-NAMES clause (variable-local definition)
2020-03-27 Edward Hart <edward.dan.hart@gmail.com>
* parser.y (check_preceding_tallying_phrases): allow consecutives
CHARACTERS keywords (revival of bug #47).
2020-03-22 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (call_body): warn ON EXCEPTION for CALL STATIC and ignore
it instead of having them mutually exclusive
* codegen.c (increase_output_line): fixed declaration of inline
2020-03-11 Simon Sobisch <simonsobisch@gnu.org>
* Makefile.am: honor new conditional MAKE_HAS_PREREQ_ONLY
* Makefile.am: adjusted invocation of help2man, using new defines
HELPSOURCES and HELP2MAN_OPTS
2020-03-09 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c: FR #372 honor HAVE_GMP_H and HAVE_MPIR_H
2020-03-01 Brian Tiffin <btiffin@gnu.org>
* cobc.c: bug #618, fix -j mode with -o name that includes a directory
and when multiple inputs are involved in a compile pass
2020-02-10 Ron Norman <rjn@inglenet.com>
* cobc.c, cobc.h, codegen.c, help.c, warning.def:
Add new define CB_ERRWARNDEF
2020-02-05 Ron Norman <rjn@inglenet.com>
* cobc.c, codegen.c, typeck.c, sysdefines.h, warning.def: FR #117
report when the COBOL code is using a feature which GnuCOBOL was not
configured to support;
-Wunsupported is set to 'error' by default but can be downgraded
warning/error is given for unsupported use of
XML, JSON, file with ORGANIZATION INDEXED, extended screen-io
* codegen.c: Emit warning if ORANIZATION INDEXED used but not supported
* typeck.c: Emit warning if XML or JSON used but not supported
2020-02-02 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c, cobc.h: added check for COB_UNIX_LF again
2020-01-12 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, config.def: bug #513 (partial) added dialect option
cb_sync_left_right and if it isn't ignored warn again about it being
not implemented
* parser.y, tree.h: added flag_sync_left, flag_sync_right
(currently not taken care of in codegen!)
* parser.y, field.c, tree.h: removed flag_ignore_sync, instead handle
cb_binary_sync_clause == CB_IGNORE in (validate_pic)
2020-01-11 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_module_init): split module initialization into
calling of new generated function which includes every static reference
and the "local" part that references program-local variables,
fixing #611 RECURSIVE programs without correct source references
* codegen.c (output_function_prototypes, output_internal_function):
generate module initialization function and invoke it
2020-01-04 Edward Hart <edward.dan.hart@gmail.com>
* cobc.h, parser.y, tree.h, typeck.c: strengthened ASSIGN syntax checks
(bug #553).
* config.def: added new options assign-variable, assign-using-variable,
assign-ext-dyn and assign-disk-from.
* config.def: improved assign-clause help.
2020-01-03 Simon Sobisch <simonsobisch@gnu.org>
* tree.c (cb_name_errmsg), tree.h, typeck.c (cb_emit_move): new function
for better error messages
* tree.c (cb_field_size), tree.h, field.c, typeck.c: use new define
FIELD_SIZE_UNKNOWN instead of -1
* typeck.c (validate_move): skip truncation warnings if target and/or
source sizes are unknown
* codegen.c, tree.h: replacing old conflicting constant prefix s_
by new CB_PREFIX_SCR_FIELD
* codegen.c: partially limited variable scope
* tree.c (cb_tree_category), tree.h: guard cb_category by CB_CATEGORY_ERROR
* error.c (print_error): used fixed COB_SMALL_BUFF instead of
unrelated system-specific BUFSIZ
2020-01-01 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, field.c (copy_into_field), tree.h, config.def:
FR #193 implementation of SAME AS
* cobc.c: Copyright year update
2019-12-28 Edward Hart <edward.dan.hart@gmail.com>
* config.c, config.def, ppparse.y, pplex.l: added ASSIGN directive and new option
implict-assign-dynamic-var (see bug #571).
* config.c: added options external (= ibm) and dynamic (= mf) to
assign-clause.
* typeck.c (cb_build_assignment_name): refactored.
2019-12-23 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (sort_body): fixed class cast errors,
actually use the specified order if no data-name was specified
2019-12-15 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: #543 check for condition-name in ADDRESS OF
2019-12-03 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: minor refactoring - use of set_current_field to remove
duplicated code, limit scope of some variables
* parser.y: new identifier_field (checked field-identifier),
adjustment of some msgIds (obviously not part of any test before)
2019-11-18 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_key_components): extracted
from (output_file_initialization)
* codegen.c (perform_label): minor refactoring
* codgenc.c: call output_storage instead of output where the result is
fixed to be in the header
* tree.h, parser.y: added flag_entry_for_goto to cb_field
2019-11-18 Ron Norman <rjn@inglenet.com>
* tree.h, parser.y, typeck.c: Updates to support
SET ... TO ADDRESS OF FH--FCD OF file and
SET ... TO ADDRESS OF FH--KEYDEF OF file
2019-11-17 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_header): use current output target instead of
file pointer
* codegen.c (output_indent): replaced by new functions
(output_block_open, output_block_close)
* codegen.c: count lines in generated source file in output_line_number,
to do so adjust many calls to use the "correct" output function and never
include a newline within the output string
* codegen.c (codegen), tree.h, cobc.c: adjust function to get generated
sourcefile name, keep static reference to it in "output_name"
* flag.def, cobc.c: added flags for adjusted C source generation
-fgen-c-line-directives and -fgen-c-labels
* codegen.c (output_cobol_info, output_c_info): added
2019-10-27 Ron Norman <rjn@inglenet.com>
* tree.c: correct computing size of REPORT lines and fields
2019-10-25 Edward Hart <edward.dan.hart@gmail.com>
* tree.c (cb_name_1): prevent buffer overflows (bug #586)
* parser.y (end_scope_of_program_name): free correct program when a
nested program has the same name as a containing program (bug #587)
* codegen.c, parser.y: fixed minor memory leaks
2019-10-17 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (valid_screen_pos): inlining some macro-like functions back
* typeck.c (cb_validate_crt_status, valid_screen_pos): more validation
2019-09-30 Edward Hart <edward.dan.hart@gmail.com>
* parser.y, reserved.c: added more (D)OS/VS and ACUCOBOL APPLY phrases.
2019-09-29 Edward Hart <edward.dan.hart@gmail.com>
* parser.y, reserved.c: added detection of OS/VS-era I/O extensions.
* parser.y: added ASSIGN VARYING variant of ASSIGN USING.
* reserved.c (lookup_reserved_word): allow SELECT and I-O-CONTROL to
have multiple context-sensitive words occur in one sentence.
* config.def: clarified -fline-col-zero-default.
2019-09-28 Ron Norman <rjn@inglenet.com>
* typeck.c: If MOVE "literal" is all SPACES then process as
cb_space so MOVE SPACE & MOVE " " are identical
2019-09-23 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c: moved alignment defines from libcob/common.h here
* cobc.h: moved alignment exception for hpux from libcob/common.h here
* codeoptim.c, cobc.h: generate the actual requested code w/o the attribute
__unaligned instead of overriding the attribute in the header
* tree.h: removed duplicate redefinition of atol/atoll
2019-09-22 Ron Norman <rjn@inglenet.com>
* codegen.c, field.c: Corrections to handling of COLUMN (was off by +1);
With OCCURS COLUMN + num is no longer an alternative for STEP
* flag.def: increased max-errors default to 128
2019-09-15 Ron Norman <rjn@inglenet.com>
* cobc.h: For HPUX set COB_ALLOW_UNALIGNED as undefined
* typeck.c: Emit ADD/SUBTRACT shortcut for COMP-5 only
if COB_ALLOW_UNALIGNED defined
* tree.h: Revert 'lock_mode' back to an 'int'
* codegen.c: Changes for 'lock_mode' being an 'int'
* cobc.h: Add COB_MEM_SIZE as size of cob_mem_struct rounded up to
multiple of sizeof(long long)
* cobc.c: Use COB_MEM_SIZE as size of cob_mem_struct
To avoid aborts on system that requires aligned data
2019-09-12 Simon Sobisch <simonsobisch@gnu.org>
* scanner.l, parser.y: allow LENGTH *OF* to remove the ambiguity for
REPOSITORY. FUNCTION LENGTH INTRINSIC. and register LENGTH OF
2019-09-09 Ron Norman <rjn@inglenet.com>
* cobc.h: Add defines for COB_ALIGN_8 to set 8 byte boundary alignment
2019-09-04 Ron Norman <rjn@inglenet.com>
* codegen.c: set temp-field.data after all declarations to avoid problems
with C89 compilers
* typeck.c: fix for use of cob_pointer_manip
* codeoptim.c: adjust cob_pointer_manip to match usage
2019-09-03 Ron Norman <rjn@inglenet.com>
* tree.h: Add checks for C compiler presence of __FUNCTION__
* typeck.c: Fix some #if to include missing conditions
2019-08-25 Simon Sobisch <simonsobisch@gnu.org>
* common.h: allow to force aligned pointer access by external
define of COB_NON_ALIGNED
2019-08-17 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_encode_program_id), parser.y, codegen.c, cobc.c: changed
method signature to remove unnecessary check for path separators and
do case folding as requested - callers use explicit COB_FOLD_UPPER for
functions now instead of additional folding after the call, also lead
to removing (user_func_upper) from codegen.c
* typeck.c (cb_encode_program_id): check for path separators now backwards
* typeck.c: removed duplicated code for program-id encoding
using libcob's new cob_encode_program_id with explicit check
for buffer size fixing bug #584
* scanner.l (read_literal): fixed bug #583 buffer overflow
* cobc.c: PROGRAM-ID verification with explicit check for empty PROGRAM-ID
and cut of PROGRAM-IDs that are too long in the error message
* config.def (cb_lit_length): changed internal maximum length of a literal
from LONG_MAX to COB_MAX_LITERAL_LEN, a new define with currently 256k
* cobc.c (cobc_deciph_optarg): explicit check for integer overflow and
return INT_MAX in this case
2019-08-14 Simon Sobisch <simonsobisch@gnu.org>
* field.c, parser.y: verification of cb_synchronized_clause moved, only
set f->flag_synchronized if actually active
* cobc.h, config.def: moved defines all CB_CONFIG_ANY entries to to new
enums: cb_binary_size_options, cb_binary_byteorder_options,
cb_assign_clause_options; used these instead of unsigned int
* field.c (compute_binary_size): switch over cb_binary_size
* typeck.c (cb_build_assignment_name): switch over cb_assign_clause
2019-08-12 Simon Sobisch <simonsobisch@gnu.org>
* scanner.l (scan_floating_numeric): fixed stack_overflow_buffer
reported by AddressSanitizer
* reserved.c: TOP as mnemonic CB_FEATURE_FORMFEED
* parser.y: added top_clause as we won't be able to define the mnemonic
as it duplicates a reserved word (FIXME: general adjustment needed)
2019-08-11 Simon Sobisch <simonsobisch@gnu.org>
* scanner.l, config.def: added support for HP COBOL octal literals
unfinished as its type should be context-sensitive (so far chosen
by scanner.l), configured by dialect configuration hp-octal-literals
* flag.def, cobc.c, help.c: moved -f[no-]ibmcomp out of flags.def and
activated the "non-flag" as "normal option"
2019-08-01 Ron Norman <rjn@inglenet.com>
* field.c: bug #582 add bounds check on expression stack and report error
2019-07-14 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (special_name_list): better error recovery (at least as long
as one valid SPECIAL-NAMES entry was found)
2019-07-13 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (emit_entry_goto, entry_name_list, entry_name),
typeck.c (cb_emit_goto_entry), config.def, tree.h,
codegen.c (output_goto, output_goto_entry): added extension
GO TO ENTRY / ENTRY FOR GO TO, intended mainly for generated code;
guarded by compiler configuration "goto-entry", defaults to warning
2019-06-29 Simon Sobisch <simonsobisch@gnu.org>
* pplex.l (ppinput): check for conflict markers (similar to GCC)
2019-06-28 Simon Sobisch <simonsobisch@gnu.org>
* pplex.l (ppcopy): ensure to have original errno, not the one from
one of the files in search path
* pplex.l (ppcopy) [_WIN32]: fixed EINVAL for path argument access doesn't
allow mixed slashes or anything before a partition identifier
* parser.y: extracted program_init_without_program_id
* parser.y: moved _options_paragraph references into _program_body
2019-06-23 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c, codegen.c, pplex.l, ppparse.y, reserved.c, scanner.l, tree.c,
typeck.c: fixed possible arithmetic overflow
2019-06-08 Simon Sobisch <simonsobisch@gnu.org>
* config.def, parser.y: removed compiler support options cb_json_generate
and cb_xml_generate, as soon as those words are reserved we take those
statements as supported
2019-06-07 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (get_prev_ml_tree_entry): fixed null-pointer access with code
similar to use in other places
* tree.c, tree.h: added struct cb_next_elem to be used for any structure
that has a next pointer as first entry, to be used by (cb_next_length)
to get the size of the complete entry (only reasonable to call with the
"main" entry normally attached to a program)
* typeck.c (cb_validate_program_data): set alphabet->custom_list to error
node once seen as bad, partially limited variable scope
* tree.c (validate_file): explicit check for number of keys (limited
to MAX_FILE_KEYS, currently 255, per file)
2019-06-06 Simon Sobisch <simonsobisch@gnu.org>
* help.c: new file, extracted from cobc.c to limit the generation of docs
to actual changes in the help output; also separated help parts into one
function per help section
* Makefile.am, cobc.c, cobc.h: adjustments for help.c
2019-06-02 Simon Sobisch <simonsobisch@gnu.org>
* tree.c (cb_get_int): return 0 for cb_error_node not raise errors
on fields that got an error raised before
* parser.y: removed duplicate parts for integer handling,
disabled the non-standard "COL/LINE +1/-1" variant (which is not supported
by any known COBOL dialect, must be "COL/LINE + 1 / - 1")
* parser.y (set_record_size): extracted from (record_clause) variants
* config.def: added records-mismatch-record-clause
* parser.y (set_record_size), tree.c (finalize_file): handle record sizes
that don't match the record clause (auto-adjust file min/max) via
records-mismatch-record-clause as it is effectively a comment for IBM
2019-05-31 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (restore_backup_pos): extracted for common use
* parser.y (evaluate_when_list), typeck.c (build_evaluate): assign and
use position of the WHEN clause for better error handling
* flag.def: don't suppress static call flags in help
2019-05-30 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, reserved.c, tree.h, config.def: FR #311 added Fujitsu
specification of call convention by WITH ... LINKAGE,
added the two new c/s words PASCAL and C to the additional
implementor defined call-convention;
added configuration options for both extensions for specifying the
call-convention
2019-05-20 Simon Sobisch <simonsobisch@gnu.org>
* Makefile.am: setting of YFLAGS by configure instead of fixed AM_YFLAGS
2019-04-28 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (line_keyword_clause): added missing RW line syntax variants
* parser.y (_acu_size): initial parsing for size specification on pointers
2019-04-15 Simon Sobisch <simonsobisch@gnu.org>
* tree.c: removed superfluous inline prototypes for cb_ref/cb_try_ref
2019-04-07 Simon Sobisch <simonsobisch@gnu.org>
* Makefile.am (COBC): use pre-inst-env ensuring to use the built version
* parser.y, typeck.c, tree.h, config.def: FR #354 added CONTINUE AFTER
to suspend runtime execution
* parser.y (begin_statement_from_backup_pos): new function used for postponed
statement start
2019-03-26 Simon Sobisch <simonsobisch@gnu.org>
* tree.c, tree.h: added cb_int7, cb_int8, cb_int16
* parser.y: replaced cb_int(0,4,8,16) by pre-created cb_int0-cb_int16
* typeck.c (cb_emit_open): replaced comparison of cached cb_int to compare
the actual integer value
* tree.c (cb_int): minimized struct int_node and access providing minimal
speed for integer lookup and minimal less memory consumption
* tree.c (cb_int_hex): fixed to not adjust hex-attribute of cached integers
by using a different cache
* codgen.c, tree.c, tree.h: deactivated hex-attribute of CB_INTEGER for now
(marked with USE_INT_HEX) as this increases the struct and we *should*
pass the flags as constants in any case
* tree.c (cb_int, cb_int_hex): disabled caching of integer values (other
than 0-8) for now (test, reactivate by defining CACHED_INTEGERS=1) as the
necessary lookup can take much time with many different integer values
2019-03-25 Simon Sobisch <simonsobisch@gnu.org>
* field.c (cb_is_expr, cb_evaluate_expr, create_implicit_picture): fixed
check of literal type before accessing values as literals in some places
* cobc.c (cobc_print_info): output endianess and native EBCDIC
2019-03-24 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_bin_field) [__SUNPRO_C]: split generated initialization
of the field into two statements as some compilers don't allow an
assignment of a local field there - after Ron Norman 2015
2019-03-23 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (decimal_compute), tree.h: track if cob_decimal computations
will be used with new flag_decimal_comp
* codegen.c (output_standard_includes): additional include gmp.h when
cob_decimal is used in one of the generated (sub-)programs
* codegen.c (output_standard_includes): don't include currently unused
stdlib.h, stddef.h, math.h
* typeck.c (cb_resolve_debug_refs): fixed bug #570 invalid tree cast for
CD-entries with debug reference
* tree.c (cb_name_1), cobc.c (cobc_enum_explain): cater for CB_TAG_CD
2019-03-19 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: use of COB_MAX_NAMELEN
* cobc.h: comment-explanation for cb_flag_main / cobc_flag_main
2019-03-18 Simon Sobisch <simonsobisch@gnu.org>
* scanner.l, config.def: FR #352 added national-character-literals setting
and read of NC"" literals (identical to N"" literals)
2019-03-17 Simon Sobisch <simonsobisch@gnu.org>
* tree.c: improved error handling for wrong PICTURE clause,
including a new warning for uncommon parentheses and
only error once for same invalid character
* tree.c, tree.h, scanner.l, typeck.c, codegen.c, cobc.c: added compiler
part for floating-point numeric-edited item (libcob open)
* parser.y: added parsing for PICTURE clause locale-format
2019-03-16 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: added unqualified_word which consumes qualification
checking that it does not occur; used for INDEXED BY and OCCURS KEY
* parser.y, tree.h, reserved.c, typeck.c: added parsing for
LOCALE/NATIONAL ALPHABET, NATIONAL COLLATING SEQUENCE and
COLLATING SEQUENCE OF key
2019-03-15 Simon Sobisch <simonsobisch@gnu.org>
* Makefile.am: drop yacc-compatibility warnings via AM_YFLAGS -Wno-yacc
as only bison is supported in any case
2019-03-14 Simon Sobisch <simonsobisch@gnu.org>
* config.c: hand-merged change 2015-04-27 with an option to go back,
see COBC_STORES_CONFIG_VALUES
2019-03-12 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, typeck: implemented table SORT without specifying key,
see Patch #42
2019-03-11 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (cobc_print_info): changed msgid for "file handler" and
already output if RTD-version of VB-ISAM is used (even if this
wouldn't work currently), partially after Ron Norman
2019-03-10 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, reserved.c: added RAISE statement as PENDING
* parser.y: work on pending USE ON exception-name
* parser.y, reserved.c, cobc.h, tree.h, typeck.c: added APPLY COMMIT clause
from 202x draft as PENDING (making I-O-CONTROL mandatory for its clauses)
* typeck.c (cb_check_overlapping): do only the check, logic and messages
moved to (validate_move)
* parser.y: minor refactoring
2019-03-09 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c: fixed freeing LOCAL-STORAGE memory using the wrong "free"
* codegen.c (output_function_prototypes): use expected declaration
for EXTFH modules to possibly catch modules using different interface
2019-02-17 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: renamed build_nested_special -> build_words_for_nested_programs
* parser.y: fixed bug #566 nested programs do not inherit class-names
2019-02-16 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, typeck.c: fixed bug #567 missing error recovery in conditions
2019-02-09 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, tree.h, reserved.c: moved translation "word to system name" from
parser.y (mnemonic_name_clause) to reserved.c (get_system_name_translated)
* tree.c (cb_list_map), tree.h: directly check for error node,
return 1 if found
* typeck.c (cb_check_numeric_name, cb_check_numeric_edited_name): always
check for error node outside these functions, minor refactoring
2019-02-05 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, tree.h, tree.c: splitted cb_category_is_national from
cb_category_is_alphanumeric
2019-01-29 Simon Sobisch <simonsobisch@gnu.org>
* tree.h, reserved.c, typeck.c: added SYSPUNCH/SYSPCH as CB_DEVICE_SYSPCH
* reserved.c: added S01-S05, currently internally as CB_FEATURE_FORMFEED
* typeck.c (cb_build_display_name): don't warn about
ACCEPT FROM / DISPLAY UPON device-name in IBM/MVS/MF mode
2019-01-27 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c, reserved.c: fixed compiler warnings
2019-01-20 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (cobc_print_info): added note for cJSON
2019-01-05 Edward Hart <edward.dan.hart@gmail.com>
* general: added JSON GENERATE statement
* parser.y: added detection of JSON PARSE statement
2019-01-04 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (cobc_abort): increase error counter
* error.c, cobc.h (cb_add_error_to_listing): extracted from (print_error)
and extended to display source reference if error message is not cached
* cobc.c (cobc_err_msg, cobc_abort_terminate): include error message
in listing, if active
* cobc.c (print_program_trailer): prevent printing of NULL file / prefix
and respect cb_msg_style
* field.c (create_implicit_picture): fixed to not raise an abort for
FROM figurative-constant without PICTURE
2019-01-04 Edward Hart <edward.dan.hart@gmail.com>
* reserved.c (get_reserved_words_with_amendments): if a user reserves a
default reserved word, context-sensitivity is now preserved only if
they specify it
* reserved.c (default_reserved_words): fixed context-sensitive words
marked as not context-sensitive
2019-01-02 Ron Norman <rjn@inglenet.com>
* field.c: Check for duplicate LINE in REPORT and ignore it
* codegen.c: Skip initialize to SPACES for REPORT lines as
all lines are cleared to SPACES
2019-01-02 Simon Sobisch <simonsobisch@gnu.org>
* field.c (set_report_field): renamed to (set_report_field_offset)
* field.c: refactored static functions and their calls to reduce
the number of calls and limited the scope of variables
2018-12-31 Simon Sobisch <simonsobisch@gnu.org>
* tree.c, tree.h, codegen.c, cobc.h: use EXTFH call per program,
not globally
* pplex.l, ppparse.y, scanner.l, codegen.c: implement CALLFH
directive (Micro Focus)
* reserved.c: fixed redefinition warning
* scanner.l (#LINE): removed unneeded temporary string duplication
* scanner.l (scan_x): minor refactoring and fixing compiler warning
* parser.y, reserved.c: added parsing for ADDRESS OF FH--FCD /
FH--KEYDEF OF file-name (context-sensitive to SET)
2018-12-29 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (validate_inspect): moved duplicate ref-mod size calculation to
(calc_reference_size) and fixed it to never skip the specified length
2018-12-29 Edward Hart <edward.dan.hart@gmail.com>
* reserved.c: replaced the array reserved_words and the list
amendment_list with hashmaps (see FR #295).
2018-12-28 Edward Hart <edward.dan.hart@gmail.com>
* codegen.c: fixed heap overflow by using strncmp instead of memcmp
* parser.y (split_key): fixed memory leak
2018-12-28 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: fixed bug #564 by allowing INSPECT CONVERTING FROM/TO
alphabet names and removed functions from the possible list
2018-12-04 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: finishing FR #244 missing-statement by allowing
WHEN expression with missing imperative statement (= directly
followed by END-EVALUATE or a separator period)
2018-11-26 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: fix listing issues when source is suppressed like printed
headers without data and missing output of errors
* flag.def: renamed new listing options according to NEWS and docs
* parser.y: msgid change "runtime elements" instead of unclear "sources"
2018-11-25 Simon Sobisch <simonsobisch@gnu.org>
* tree.c (cb_tree_category): correct category for reference-modified
NATIONAL/NATIONAL-EDITED items
2018-11-22 Simon Sobisch <simonsobisch@gnu.org>
* pplex.l, pparse.y: FR #344 Support copybook and library names
as text-names (not literals) with periods, always upper-cased
if not requested otherwise by FOLD-CALL=LOWER
2018-10-28 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c [__ORANGEC__]: adjustments of command line options
2018-10-24 Simon Sobisch <simonsobisch@gnu.org>
* pplex.l: minor refactoring (creating ppecho_direct) and comments
2018-10-15 Simon Sobisch <simonsobisch@gnu.org>
* reserved.c (cb_list_registers): output "ADRESS OF" as "phrase"
2018-10-13 Edward Hart <edward.dan.hart@gmail.com>
* field.c (create_implicit_picture): handle case where f->screen_from or
f->screen_to are error nodes.
* parser.y (screen_description): prevent double free of level-number
field in error handling.
* parser.y (perform_body): fixed internal error with empty PERFORM.
2018-10-12 Simon Sobisch <simonsobisch@gnu.org>
* pplex.l: fixed TITLE being consumed as statement when actually starting
a user defined word
2018-10-08 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: warn about unimplemented OPEN REVERSED / WITH NO REWIND,
see FR #343
* parser.y: RM/COBOL compatibility - allow LOCK clause on
OPEN REVERSED / WITH NO REWIND
2018-10-02 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_validate_program_environment, cb_validate_program_data,
cb_validate_program_body): only use the specified parameter
cb_program prog instead of current_program
* typeck.c (cb_validate_program_body): splitted cb_validate_labels()
and cb_resolve_debug_refs() to own functions
* typeck.v (cb_resolve_debug_refs): added size handling for cd-names
* parser.y (debugging_target), typeck.c (cb_resolve_debug_refs):
added check for duplicate reference of items in DEBUGGING procedures;
allow subscripts/refmod during parse to provide a clean check later
2018-09-28 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: ACCEPT x FROM ESCAPE _key
* parser.y, reserved.c: extended parsing for ACUCOBOL-GT
DISPLAY WINDOW
2018-09-27 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, reserved.c: added ACUCOBOL-GT statements
ACCEPT FROM TERMINAL-INFO / SYSTEM-INFO as PENDING
* parser.y: added parsing for explicit "NO" BELL
2018-09-23 Simon Sobisch <simonsobisch@gnu.org>
* tree.c (validate_indexed_key_field): added missing checked for
valid keys in files with split keys
* parser.y, tree.h, typeck.c: added NATIONAL COLLATING SEQUENCE
as PENDING
* cobc.h (CB_CS_OPEN), reserved.c: new context-sensitivity for OPEN
* parser.y: added extension duplicate clause on primary key as PENDING
and extension WITH NO DUPLICATES
2018-09-22 Simon Sobisch <simonsobisch@gnu.org>
* field.c (cb_validate_field): deactivated questionable incrementing
if reference-counter for GLOBAL fields
2018-09-12 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (file_description_entry): unset current_file on error;
check for duplicate file description
* tree.c (finalize_file): check for missing file description
* tree.c (finalize_report): early set of flag_report
* typeck.c (warning_destination): added missing check for tree tag
* typeck.c (move_warning): allow literals in all contexts other
than SET to be used as source reference
* typeck.c (error_if_invalid_file_from_clause_literal):
allow [RE]WRITE FILE FROM constant / numeric literal if
cb_relaxed_syntax_checks is set as MicroFocus/ACUCOBOL allow this
non-standard option; only raise either figurative or literal error
2018-09-11 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (evaluate_other): partial implementation of FR #288
WHEN OTHER without imperative statement
* codegen.c (output_stmt): disabled lookup_source calls that seem
to be not needed
* parser.y (perform_body): partial implementation of FR #288
check inline PERFORM without imperative statement against
configuration "missing-statement"
* cobc.c (process_command_line): make sure cb_missing_statement
is not stricter than CB_WARNING when cb_relaxed_syntax_checks is active
* scanner.l (copy_literal): check that passed argument is a literal
2018-09-11 Ron Norman <rjn@inglenet.com>
* tree.c, codegen.c: added checks for cb_flag_remove_unreachable
* scanner.l: duplicate 78/CONSTANT and then assign line number
* tree.c: improved warnings to be more inclusive
2018-09-10 Ron Norman <rjn@inglenet.com>
* tree.c: removed redundant warnings about xyz 'is always' TRUE/FALSE
* flag.def: new compile option: 'remove-unreachable' defaults to on
So then -fno-remove-unreachable does not remove unreachable code
* typeck.c: checks cb_flag_remove_unreachable
* cobc.c: if -g then clear cb_flag_remove_unreachable
2018-09-06 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (validate_move): always check full length for VALUE
without trimming the literal if alphanumeric
2018-09-01 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_module_register_init): partially fix bug #548:
used previous reference creation for XML registers
2018-08-24 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_build_cond): keep source-reference for trace/position
code generation and compiler messages
* typeck.c (build_evaluate): store source-reference for WHEN OTHER
* tree.c (copy_file_line): disabled save/restore source-reference
of expressions as the current code works identical without it
* codegen.c (output_stmt): use source-reference of expression for
WHEN / WHEN OTHER, output its location to return correct position
for runtime messages and tracing
2018-08-21 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: implemented MS-COBOL position-specifier for DISPLAY/ACCEPT
and DISPLAY ERASE
* parser.y, reserved.c: added COMP-0 as PENDING
* typeck.c: set reference for CRT-STATUS field on ACCEPT/DISPLAY
for cross-reference in listing
2018-08-19 Edward Hart <edward.dan.hart@gmail.com>
* general: added XML GENERATE statement.
* parser.y: added detection of XML PARSE statement.
2018-08-17 Simon Sobisch <simonsobisch@gnu.org>
* reserved.c: added COL/LIN registers (default to disabled)
* typeck.c, parser.y, cobc.h, tree.c, tree.h, field.c: first approach
on generic register creation (currently works only for TALLY/COL/LIN)
2018-08-09 Simon Sobisch <simonsobisch@gnu.org>
FR #219 Support for COMP-N (ACU compatibility)
* parser.y, reserved.c: added COMP-N/COMPUTATIONAL-N
* tree.h (cb_usage): new CB_USAGE_COMP_N
* cobc.c, codegen.c, field.c, tree.c, typeck.c: identical handling
for CB_USAGE_COMP_N as CB_USAGE_COMP_X
* field.c (setup_parameters): always use portable big-endian format
for CB_USAGE_COMP_N
2018-08-07 Brian Tiffin <btiffin@gnu.org>
* parser.y, reserved.c, tree.c, tree.h: CONTENTS-OF renamed to
CONTENT-OF
2018-08-07 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_build_identifier): added missing validation for
depending item, fixing bug #544
* typeck.c (cb_emit_arithmetic): early check for valid field,
provides better message for condition-names FR #339 and reduces
the number of errors in numeric checks to the first invalid part
of the statement
* typeck.c (cb_validate_one), parser.y (check_not_88_level):
FR #339 msgid change for invalid references
* typeck.c (cb_emit_string): added missing validation of delimiter
and source items, fixing bug #543
* parser.y (check_not_88_level): invalidate wrong items to prevent
multiple errors for same field
2018-07-19 Simon Sobisch <simonsobisch@gnu.org>
* scanner.l: allow floating-point literals containing no digit after
decimal point in significand (explicit specified in ACUCOBOL docs)
* reserved.c, parser.y, field.c, tree.h: added parsing for VOLATILE clause
* typeck.c (cb_build_expr): use correct line number for warning
"suggest parentheses around AND within OR"
2018-07-18 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: adjusted length_of handling to distinguish constant-entry
from register
2018-07-18 Edward Hart <edward.dan.hart@gmail.com>
* typeck.c: added checks for (RE)WRITE FILE f FROM literal (bug #411)
* parser.y (file_control_entry): fixed regression caused when fixing
bug #405
2018-07-13 Simon Sobisch <simonsobisch@gnu.org>
* reserved.c, parser.y: added IBM's ALLOCATE format by including the
ignored LOC phrase
2018-07-05 Ron Norman <rjn@inglenet.com>
* parser.y, scanner.l: removed LENGTH_OF as it is no longer used
2018-07-04 Edward Hart <edward.dan.hart@gmail.com>
* tree.c (cb_build_picture): fixed calculation of number of decimal
digits in PICs with floating +/- after decimal point, e.g. --.--.
See bug #220
2018-07-04 Ron Norman <rjn@inglenet.com>
* parser.y: accept both LENGTH and LENGTH OF in all places
2018-07-03 Simon Sobisch <simonsobisch@gnu.org>
* codeoptim.c: removed inclusion of defaults.h (no definitions used)
2018-06-29 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_internal_function): fixed bug #98 "SIGSEGV
on CANCEL of RECURSIVE programs" by adjusting generation of
CANCEL callback
2018-06-28 Ron Norman <rjn@inglenet.com>
* typeck.c (cb_build_expr): fix bug #526 - Check for properly formed
'Abbreviated conditional expressions'
2018-06-26 Simon Sobisch <simonsobisch@gnu.org>
* field.c (validate_usage): fixed SIGSEGV when PICTURE is missing
* field.c: renamed (check_picture_item) to (create_implicit_picture)
and always define an implicit picture (even for fields with errors
because of their references)
* field.c: renamed (check_picture_item, is_numeric_usage): define
numeric implicit pictures for numeric USAGEs
2018-06-24 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_emit_call): use X"nn" as name for error messages
concerning system library CALLs
2018-06-21 Brian Tiffin <btiffin@gnu.org>
* parser.y, reserved.c, tree.c, tree.h: added intrinsic functions
CONTENT-LENGTH and CONTENTS-OF
2018-06-20 Ron Norman <rjn@inglenet.com>
* codgen.c: emit code for 'Default Error Handler' in nested
subroutines when the main module has GLOBAL files, fixing bug #87
2018-06-06 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, reserved.c: added POS (only reserved for acu and default)
as alternative for AT POSITION, allow both in SCREEN definitions
* parser.y: improved ACUCOBOL-GT parsing of USAGE HANDLE: allow
HANDLE [OF] control-type (support pending), better error messages
for unknown HANDLE types
* parser.y, reserved.c: added COMP-0 as PENDING
* parser.y: added Micosoft COBOL position specifier
2018-06-04 Simon Sobisch <simonsobisch@gnu.org>
* Makefile.am: remove path output when creating manpage
2018-05-16 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (compare_field_literal): compare literals also against
group items
2018-05-15 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (usage_clause): better error message if USAGE is explicit
coded and an undefined word follows; this is especially helpful
for words that are only not reserved in the current dialect
* field.c (compute_size): fix error position for SNYCH dialect messages
2018-05-14 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_check_overlapping): resolve one-level subscripts
for checking and warn if both subscripts reference the same
variable or numeric value
2018-05-10 Simon Sobisch <simonsobisch@gnu.org>
Fixed Bug #521 - issues with source cache:
* pplex.l (ppopen): deactivated changing \ to / in source names
* codegen.c (output_source_cache, output_string_cache,
output_gnucobol_defines): escape \ and " for output to C strings
2018-05-08 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: added OrangeC version info
* warning.def: fixed grammar in warning descriptions
* cobc.c, flags.def: use "* " instead of "- " to better distinguish
descriptions from options
2018-04-26 Dave Pitts <dpitts@cozx.com>
* cobc.c (reflow_replace_*_format_text): Changed to malloc token based on
newline length instead of hardcoded.
2018-04-24 Dave Pitts <dpitts@cozx.com>
* cobc.c (reflow_replace_*_format_text): BUG #515 malloc'd token to
large size.
* cobc.c (print_replace_text): BUG #515 malloc and realloc newline
based on length of tokens.
2018-04-21 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, config.def: FR #306 added Fujitsu extension
SYMBOLIC CONSTANT in SPECIAL-NAMES, effectively defining
GLOBAL constants from literals,
adjusted by compiler configuration symbolic-constant
2018-04-19 Simon Sobisch <simonsobisch@gnu.org>
* pplex.l: FR #305 for now - skip Fujitsu @OPTIONS
2018-04-15 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: prevent output file name "-" for all levels but preprocess,
allow listing to be output to stdout with listing name "-"
* cobc.c, flag.def: replaced -tsymbols by -f[no-]tsymbols,
added option to suppress specific listing parts with new options
-fno-theader, -fno-tmessages, -fno-tsource (see NEWS)
* parser.y, reserved.c, typeck.c, field.c, tree.c: FR 303
added USAGE BIT and PIC 1 as pending (at least parsing
of sources containing these should work now)
2018-04-13 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (process_command_line): minimal size for -tlines=20
to prevent endless loops on typos like -tlines=2
2018-04-12 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_internal_function): prevent SIGSEGV for
ANY LENGTH items in LINKAGE when program is first COBOL program
* tree.c (cb_build_intrinsic): leave size of national literals to
runtime (as it is done for national items), note: we currently
still generate national literals as alphanumeric literals
* parser.y, typeck.c (cb_build_const_length): allow non-numeric
literals to be used with LENGTH OF and prohibit use of numeric
literals as parameters for FUNCTION LENGTH/BYTE-LENGTH/LENGTH-AN
* parser.y, field.c (cb_validate_78_item): fix issues with invalid
VALUE clauses
2018-04-09 Simon Sobisch <simonsobisch@gnu.org>
* tree.c (cb_field_size): report ANY LENGTH items as "unknown size",
fixing Bug #511
2018-04-04 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c: cosmetic change - label exit_program/exit_function
depending on program type
* tree.h: moved definition of COB_MAX_SUBSCRIPTS to libcob/common.h
* tree.c (finalize_report): removed double check for field (which I've
added previously)
* codegen.c (output_report_def_fields), error.c (print_error),
parser.y (emit_entry), typeck.c (cb_build_move):
check pointer before dereferencing it
2018-04-03 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (process_translate): initialize cb_source_file with correct value
* parser.y (end_scope_of_program_name), tree.h (cb_program): store end
of program/function definition in last_source_line
* codegen.c (output_internal_function): output source location of program
/ function end (to be set for fall-through end of its definition)
* tree.c (cb_build_program): store start position of program definition
* parser.y, typeck.c (cb_emit_call), tree.h: pass position of CALL in the
function call instead of a global variable
* parser.y: store position of entry points with (backup_current_pos)
2018-04-02 Simon Sobisch <simonsobisch@gnu.org>
* reserved.c (cb_register_list_get_first, cb_register_list_get_next),
typeck.c (cb_build_registers), tree.h: actually create register
definition, not only the name
2018-03-31 Edward Hart <edward.dan.hart@gmail.com>
* config.def, scanner.l: added zero-length-literals config option.
* scanner.l: make zero-length Boolean/hex literals default to zero.
2018-03-30 Edward Hart <edward.dan.hart@gmail.com>
* typeck.c (validate_move): fixed segfault with zero-length hex literal.
2018-03-27 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (build_cond_88): for VALUE THRU pass generation of this
clause by temporarily changing current_statement->name, changed
generation of the two conditions to the more natural variant
"var >= a && var <= b" instead of "a <= var && var <= b"
* tree.c (compare_field_literal): added warning for numerical values
when compared against their maximum value
* codegen.c (codegen): generate some comments only when relevant
2018-03-26 Simon Sobisch <simonsobisch@gnu.org>
* field.c (validate_any_length_item): fixed missing error position
* tree.c (word_hash): renamed from hash
* tree.c: check for alphabetic after checking for more common
USAGE/categories
2018-03-25 Ron Norman <rjn@inglenet.com>
* tree.c (warn_cannot_get_utc): removed as we always have it available
2018-03-24 Edward Hart <edward.dan.hart@gmail.com>
* tree.c, tree.h: emit error if RECORD VARYING has equal implied limits.
* reserved.c: replaced most instances of cb_strcasecmp with strcmp for
efficiency.
2018-03-22 Simon Sobisch <simonsobisch@gnu.org>
* tree.c (cb_fits_int, cb_fits_long_long, cb_get_int, cb_get_long_long,
cb_get_u_long_long): adjust literal size with negative scale
2018-03-16 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_build_move): speedup, especially for programs not
defining any reports
2018-03-14 Simon Sobisch <simonsobisch@gnu.org>
* scanner.l, parser.y: new token LEVEL_NUMBER for clear separated
handling from WORD (and minimal speedup in scanning)
* field.c (cb_get_level, cb_build_field_tree): simplified level
handling as we only have valid level numbers in this tree
* parser.y (data_description): removed early free of level number
token that results in invalid calls to (cobc_parse_free)
* parser.y (_data_description_clause_sequence, add_body): simplified
* parser.y (usage_clause), field.c, tree.h: catch unknown USAGE
2018-03-13 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c [__TINYC__]: added Tiny C version info and verbose option
* cobc.c: change for command line option --version / -V:
depending on verbose option additionally call C compiler
for more version information
2018-03-12 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: unreached warning after EXIT SECTION/PARAGRAPH/PERFORM[CYCLE]
2018-03-11 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (validate_move): SET ... TO TRUE with figurative constant
* scanner.l: fix bug #499 tokenizer combining partial words
2018-03-10 Ron Norman <rjn@inglenet.com>
* codegen.c: Fix for INITIALIZE of signed numeric (2018-03-08)
2018-03-09 Simon Sobisch <simonsobisch@gnu.org>
* scanner.l (scan_floating_numeric): rewritten to merge 2018-01-12,
significant allows 36 digits now (according to COBOL 202x)
* typeck.c (validate_move): adjustments to merge 2018-01-14
* typeck.c (validate_move), config.def: check for new config option
cb_move_fig_space_to_numeric / move-figurative-space-to-numeric
2018-03-08 Ron Norman <rjn@inglenet.com>
* codegen.c (deduce_initialize_type): use 'cob_move' for signed numeric
items to fix wrong group initialization (issue mentioned in bug #61)
2018-03-08 Simon Sobisch <simonsobisch@gnu.org>
* tree.c: actually handle items of CB_CATEGORY_NATIONAL / PIC_NATIONAL
as national items, not as alphanumeric
* reserved.c (function_list): adjustments for CB_CATEGORY_NATIONAL
* field.c (validate_any_length_item): adjustments for CB_CATEGORY_NATIONAL
* typeck.c (validate_move): added missing warning for truncation of
numeric binary fields when -fbinary-truncate is active;
removed false warning for truncation of literal to alphanumeric field
when only spaces were truncated
2018-03-06 Simon Sobisch <simonsobisch@gnu.org>
* tree.c (cb_name_1): adjustments for CB_TAG_REPORT/CB_TAG_REPORT_LINE
* field.c (check_picture_item): fixed tree cast error for setting
implied size/type for VALUE SPACE
2018-03-05 Ron Norman <rjn@inglenet.com>
Changes to solve REPORT problems related to COB_TREE_DEBUG
* tree.h: added CB_REF_OR_REPORT_P and CB_REPORT_PTR
* tree.c (cb_ref): verify caller passed a CB_REFERENCE
* parser.y: remove report_name_list, use CB_REF_OR_REPORT_P
* codegen.c, typeck.c: fixed problems found by COB_TREE_DEBUG
2018-03-05 Simon Sobisch <simonsobisch@gnu.org>
* Makefile.am (clean): remove output files generated by bison
* Makefile.am (maintainer-clean): remove generated manpage and all
files created by bison/flex
* pplex.l, scanner.l: fixed quoting of ' and " in regexes to
let xgettext process these files without error (also fixes
rendering in editors/ide's), note: generated C files are binary
identical
2018-02-26 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (string_statement): fixed bug #497 STRING within
STRING did override the target list
* parser.y, reserved.c: work on FR #183 added VALIDATE statement
as PENDING
2018-02-25 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_display_fields): activated dump code for
BASED items
2018-02-23 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_module_init): cater for empty source_cache;
disabled generation of flag_debug_trace=COB_MODULE_DEBUG as
this is currently not checked anywhere
* warning.def: change cb_warn_filler to be always active
* error.c, field.c, tree.c, typeck.c: only raise some cb_warn_filler
warnings if -W/-Wall was used
2018-02-21 Simon Sobisch <simonsobisch@gnu.org>
* typeck.y (validate_move): check for ADDRESS OF var as invalid
(bug #495), fixed check for SET statement
2018-02-19 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (select_clause): minimized context-sensitive settings
* reserved.c, cobc.h, parser.y: added CB_CS_SELECT
* tree.h: added password (reference) to struct cb_file / cb_alternate_key
* parser.y, reserved.c: added PASSWORD as PENDING (currently only for
indexed files)
2018-02-17 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (report_description_option): fixed reference for CODE IS
* parser.y (page_line_column): adjusted check for duplicate LINE LIMIT
* codegen.c (output_internal_function): fixed position of
initialization for report files in INITIAL programs
* pplex.l, scanner.l: don't consume trailing whitespace/newline
if not necessary, combined some groups with optional/or modifiers
2018-02-16 Dave Pitts <dpitts@cozx.com>
* cobc.c (get_next_token): BUG #494 Fixed scanning of tokens with
embedded quotes, eg. 'yyy-'hello
2018-02-15 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (validate_move, move_warning): show literal size for
size overflow warnings (for numeric literals the actual literal)
* cobc.c (preprocess): FR #81 preprocess to stdout if no output file
is given (= revert back to behaviour of GnuCOBOL pre 2.x)
2018-02-09 Simon Sobisch <simonsobisch@gnu.org>
* reserved.c: renamed cob_strcasecmp to cb_strcasecmp
* reserved.c (default_reserved_words_list): removed EBCDIC handling
as the list is always sorted now
* reserved.c (initialize_reserved_words_if_needed): use case
sensitive comparison when sorting default_reserved_words_list
* field.c: adjustments for REPORT/SCREEN USAGE checks
* cobc.c, typeck.c, field.c, tree.h: moved (cobc_enum_explain_storage)
to typeck.c as enum_explain_storage
* typeck.c: minor refactoring of arithmetic_osvs code
2018-02-02 Simon Sobisch <simonsobisch@gnu.org>
* tree.c (cb_get_long_long, cb_get_u_long_long): fix bug #492
adjusted literal size check
* tree.c, typeck.c, codegen.c: first approach to fix tree cast
errors in REPORTWRITER code
* codegen.c: moved parts of (output_funcall) to new functions
(output_funcall_typed) and (output_funcall_typed_report)
2018-02-01 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c, tree.h [COB_TREE_DEBUG]: make sure that we don't enter
a loop of cb_tree cast errors, possible as (cb_name) is called
which may result in another call of (cobc_tree_cast_error);
removed compiler specific handling
* cobc.c (cobc_abort_terminate): add parameter indicating that
the user should report the error
2018-01-30 Ron Norman <rjn@inglenet.com>
* codegen.c: Fix generation of dump-code for fields with IS EXTERNAL
* parser.y: Have REPORT fields parse all USAGEs to provide
meaningful errors and to allow USAGE NATIONAL
* field.c: Add check for REPORT/SCREEN field not DISPLAY
'fieldname' should be USAGE DISPLAY for REPORT/SCREEN
2018-01-29 Ron Norman <rjn@inglenet.com>
* tree.c, tree.h, typeck.c: Fine tuning of arithmetic_osvs
2018-01-25 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, typeck.c: postponed check for dangling LINKAGE items
from entry point generation to program validation, allowing to
only warn items that are actually in use, checked in new
function (has_sub_reference)
* cobc.c (process_filename): set internal filename before checking
for valid name to get better error messages
2018-01-25 Edward Hart <edward.dan.hart@gmail.com>
* reserved.c (default_reserved_words_list): no longer assumed to be
sorted - this caused hard to understand errors when it
wasn't. (initialize_reserved_words_if_needed) now sorts it.
2018-01-24 Simon Sobisch <simonsobisch@gnu.org>
* reserved.c: added ACUCOBOL synonyms FLOAT -> FLOAT-SHORT,
DOUBLE -> FLOAT-LONG
2018-01-23 Ron Norman <rjn@inglenet.com>
* tree.c: fixed coding error to use CB_FIELD_PTR
* codegen.c, typeck.c: changed to use CB_FIELD_PTR as needed
2018-01-23 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: use position of last section when defining an implicit
paragraph
* typeck.c (cb_build_identifier): adjusted debug checks for
EC-PROGRAM-ARG-OMITTED and EC-DATA-PTR-NULL
* typeck.c: minor code refactoring
2018-01-22 Simon Sobisch <simonsobisch@gnu.org>
* codgen.c (output_internal_function): don't clear sticky-linkage pointers
when program has CHAINING
* parser.y: added SAME phrase for screen i/o as PENDING
* field.c (compute_size): fixed check for report line
2018-01-18 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_build_identifier): also check for ref-mod length
overflow when offset is is a variable
* typeck.c (cb_build_identifier): only build field name if actual
needed, moved code building to new static cb_build_name_reference
* tree.c (compare_field_literal): added check for comparisions against
a reference modified field when the offset or length is known
2018-01-16 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_build_assignment_name): only warn ASSIGN EXTERNAL fname
interpretation when fname was changed
2018-01-14 Ron Norman <rjn@inglenet.com>
* typeck.c (validate_move), config.def: check for new config option
cb_move_nonnumlit_to_numeric_is_zero / move-non-numeric-lit-to-numeric-is-zero
and auto-convert MOVE LOW-VALUES/HIGH-VALUES/SPACES to PIC 9 DISPLAY field
into MOVE ZERO like MicroFocus does this
2018-01-12 Ron Norman <rjn@inglenet.com>
* scanner.l (scan_floating_numeric): allow larger float constants
2018-01-12 Simon Sobisch <simonsobisch@gnu.org>
* config.def: added cb_missing_statement, see FR #288
* parser.y (if_statement): first change for FR #288 leading to warning
message for "IF cond ELSE statements"
* tree.c (cb_build_reference, cb_ref), parser.y (procedure_name):
store position (section/paragraph) for all references not only for labels
* error.c (cb_verify_x, cb_set_ignore_error): never ignore errors that
depend on compiler configuration
* parser.y (procedure_name), typeck.c (cb_validate_program_body), tree.h:
don't raise errors for labels in ignored code parts and skip some
verifications on these
2018-01-07 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c: moved all code parts for (output_function_entry_function)
to this function and adjusted the callers
* typeck.c, parser.y, tree.h: adjusted (cb_build_program_id) to directly
get the external name passed, removing duplicated code
2018-01-03 Edward Hart <edward.dan.hart@gmail.com>
* typeck.c (cb_build_move_literal): fixed bug #486, where literals moved
to an ANY LENGTH item where truncated to one character.
* typeck.c (validate_move): fixed spurious "value exceeds data size"
warning for ANY LENGTH items.
2017-12-31 Ron Norman <rjn@inglenet.com>
* codegen.c, tree.c: fix bug #471 Mark report fields as being
referenced so that the cob_field is always emitted
2017-12-26 Edward Hart <edward.dan.hart@gmail.com>
* cobc.h, config.c, field.c: added more lax "gc" option to
screen-section-rules.
2017-12-25 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c, codegen.c, parser.y, scanner.l, tree.h, tree.c: renamed
CB_PROGRAM_TYPE to COB_MODULE_TYPE_PROGRAM and CB_FUNCTION_TYPE to
COB_MODULE_TYPE_FUNCTION and moved definition to libcob/common.h
* codegen.c (output_module_init): deactivated generation of currently
unused module_returning
2017-12-24 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (file_status_clause): FR #51 added parsing for
secondary VSAM status, unconformable to any other than IBM/MVS
where it is ignored (with a warning with -Wall)
* config.c, cobc.h: parse standard-define, checking for valid entry
and actually setting it again
2017-12-24 Edward Hart <edward.dan.hart@gmail.com>
* config.def, config.c, field.c: added screen-section-rules option to
set rules for SCREEN SECTION item clauses.
* field.c: removed "alphanumeric value is expected" warning when using
numeric VALUEs in the SCREEN SECTION.
2017-12-22 Simon Sobisch <simonsobisch@gnu.org>
* tree.h, parser.y (begin_implicit_statement), codegen.c (output_stmt):
fixed duplicated trace code generation for implicit statements
2017-12-22 Ron Norman <rjn@inglenet.com>
* codegen.c (output_attr): set flag COB_FLAG_IS_FP for all FLOAT types
2017-12-21 Ron Norman <rjn@inglenet.com>
* codegen.c: For REPORT pass CODE value to report structure
* parser.y: pass back CODE value
2017-12-17 Simon Sobisch <simonsobisch@gnu.org>
* scanner.l (read_literal): fix endless loop on invalid literals for
systems that define EOF as -1
2017-12-15 Edward Hart <edward.dan.hart@gmail.com>
* reserved.c: adding/removing a register now removes the reserved word
with the same name (if it exists) (feature request #278).
* cobc.c (cobc_print_usage): added help text for -f(not-)register.
2017-12-15 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (process_command_line) [_MSC_VER]: check if -l was specified
including ".lib" before adding it
* cobc.c (process_filename): don't allocate and set fn->object for
most used cb_compile_level == CB_LEVEL_MODULE as it is is compiled
without intermediate object file
* reserved.c (function_list): corrected number of parameters according
to all other checked implementations and the Programmer's Guide
(PRESENT-VALUE min 1->2, RANDOM max unlimited->1)
2017-12-13 Edward Hart <edward.dan.hart@gmail.com>
* tree.h: renamed special_index to index_type and replaced magic
constants with (cb_index_type) enum.
2017-12-12 Edward Hart <edward.dan.hart@gmail.com>
* parser.y (rep_name_list): handle case where $1 == cb_error_node
(bug #472).
2017-12-12 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: fix --list-registers to list these, not mnemonics...
2017-12-11 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: set RW VARYING clause as PENDING
* parser.y: FR #167 added ACUCOBOL CONTROL KEY as PENDING
* codegen.c, tree.c: fixed compiler warnings in RW code
* field.c, ppparse.def: removed constant evaluations of pointer size
by using COB_64_BIT_POINTER
2017-12-11 Edward Hart <edward.dan.hart@gmail.com>
* config.def, field.c, parser.y: added binary-comp-1 option (feature
request #272).
* pplex.l, ppparse.y: added COMP1 directive.
* ppparse.y: removed redundant checks for well-formed literals.
* ppparse.y: slightly improved error messages for invalid directives.
* parser.y: added syntax checks for PAGE LIMITS clause.
* reserved.c: fixed COLUMNS not being detected by GnuCOBOL.
* parser.y (report_group_description_entry): added syntax error handler.
2017-12-10 Edward Hart <edward.dan.hart@gmail.com>
* reserved.c (get_reserved_words_with_amendments): no longer ignore
user-specified aliases for default reserved words.
* pplex.l, ppparse.y, reserved.c, scanner.l: added support for MF's
reserved word directives ADDRSV, ADDSYN, MAKESYN, OVERRIDE and REMOVE.
2017-12-10 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: adjustments after merge of split/sparse keys from rw-branch,
minimized the number of necessary rules
2017-12-06 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, tree.c, tree.h, typeck.c: minor adjustments after merge
of reportwriter branch
* codegen.c: adjustments after merge of reportwriter branch for
refactored code parts (no additional refactoring so far)
* cobc.c (cobc_enum_explain): added CB_TAG_REPORT_LINE
* cobc.c (process_run) [_WIN32]: change / in given output name to \
2017-12-04 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (build_evaluate): error position improvement for
"wrong number of WHEN parameters"
2017-12-02 Simon Sobisch <simonsobisch@gnu.org>
* config.def, parser.y: FR #158 added cb_perform_varying_without_by
* parser.y: FR #168 adding missing compile time checks for
PERFORM BY ZERO
2017-12-01 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: FR 259 delete temporary files as soon as possible:
moved cleanup of intermediates for a single processed file
from (cobc_clean_up) to (clean_up_intermediates) and call this in
main after processing the single file
* parser.y, typeck.c: fixed some errors spotted by COB_TREE_DEBUG
2017-11-30 Simon Sobisch <simonsobisch@gnu.org>
* cobc.h, cobc.c (process_translate), codegen.c: local_filename with
additional attribute local_include_name as short name,
local_name containing the full name for file handling again
2017-11-29 Simon Sobisch <simonsobisch@gnu.org>
* error.c (undefined_error): always raise "not defined" error if
word is already qualified
* parser.y, reserved.c, cobc.h: FR #265 added parsing for ACUCOBOL
graphical controls, control styles, control properties and rough
parsing of INQUIRE and MODIFY statements
* tree.h, field.c (validate_pic, setup_parameters): set new attribute
pic->flag_is_calculated where picture wasn't originally specified
and don't check this pseudo PICTURE later.
* tree.c, tree.h: disabled pic->real_digits as it is currently not
in use anywhere (just calculated in tree.c)
2017-11-25 Simon Sobisch <simonsobisch@gnu.org>
* reserved.c: moved aliases VALUES/ZEROES/ZEROS to default.conf
2017-11-25 Ron Norman <rjn@inglenet.com>
Bug #175 fixed: LENGTH OF constants with grouped fields
* typeck.c: make sure field has been verified for constant LENGTH
* field.c: set pic.category for POINTER and ignore PIC for it later
* field.c (setup_parameters): set PIC 9(17) for pointer in 64 bit mode
2017-11-23 Ron Norman <rjn@inglenet.com>
* codegen.c: change in generation of comments concerning returning items
2017-11-22 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, reserved.c: added parsing for ARITHMETIC clause
* parser.y, reserved.c, cobc.h: added context sensitivity for
SCREEN SECTION, adjusted reserved words to CB_CS_SCREEN and CB_CS_SET
* parser.y: renamed "not" to much more clearer "not_expr" to prevent
confusing it with "flag_not"
* reserved.c: moved aliases LOW-VALUES/HIGH-VALUES to default.conf
* parser.y: moved reset of cobc_cs_check from _mnemonic_conv to end of
call_statement
* reserved.c (lookup_reserved_word): fixed returning of context-sensitive
word without context (happened when the word *set* a context, too);
no auto-reset within CB_CS_SCREEN context
2017-11-21 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (process_run): fixed possible SIGSEGV for long run options,
use output_name, with stripped extension if necessary (see bug #466)
* cobc.c (process_translate): fixed bug #466 by removing path from
C source names after fopen
* cobc.c: fixed possible SIGSEGV for long COB_STRIP_CMD
* cobc.c (process_link): only add COB_EXE_EXT for running strip command
if is isn't already specified
* pplex.l (ppopen): fixed bug #467 by adding missing checks for
recursive sources before fopen
* cobc.c, error.c: allowed messages with filenames only, line number
isn't printed if -1
2017-11-20 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (process_assemble, process_filename)[__OS400__]: fixed
SIGSEGV by ensuring bufflen to always include the size of the full
path for fn->translate and a minor memory issue by calling
cobc_main_free with original fn->translate before assigning it with
the full path
* cobc.c (process_assemble)[__OS400__, __WATCOMC__]: removed running
the created object file
* cobc.c: renamed cobc_stradd_dup to cobc_main_stradd_dup and added
a new version of cobc_stradd_dup that uses temporary memory
* cobc.c: added optional parameter to file_basename to specify which
extension to remove (if NULL all extensions will be removed)
* cobc.c (process_filename): use strcasecmp instead of strcmp
because of possible compilation on FAT/NTFS
* cobc.c: removed wants_nonfinal, directly check cb_compile_level instead
* cobc.c (set_compile_level_from_file_extension): new function to
adjust cb_compile_level if outputname was specified but no option
to set the compile level
2017-11-15 Simon Sobisch <simonsobisch@gnu.org>
* pplex.l, cobc.c: removed superfluous memset to 0 after cobc_malloc
in listing functions
* cobc.c, cobc.h: always store cb_source_format as enum cb_format,
using getopt return values for --fixed / --free instead as
getopt assigns an integer which is not guaranteed to be sizeof(enum)
* cobc.c (cobc_xref_call): bug #463 - fixed memory leak in Xref code
* cobc.c: modularized cleanup code to (cleanup_copybook_reference)
* cobc.c: bug #463 - reset cb_current_file->copy_tail on listing setup
* cobc.c: modularized processing of files from (main) to (process_file)
and separated functions (begin_setup_compiler_env),
(finish_setup_compiler_env), (begin_setup_internal_and_compiler_env),
(finish_setup_internal_env) from (main) function
2017-11-14 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: removed artificial limit for -fmax-errors
* cobc.c: FR #255 new command line option -O0 (short-opt: '0') for
disabling optimizations (new define CB_COPT_0),
postpone addition for -O option group to cflags
* tree.c (cb_int, cb_build_label): set source position for integers
and labels on tree creation
* parser.y: removed position setting for integers and labels
* parser.y (backup_current_pos, set_pos_from_backup): new functions for
position corrections (currently not used)
* codegen.c (output_call), parser.y (call_body): fixing bug #462
don't generate static calls if ON EXCEPTION is given
2017-11-13 Ron Norman <rjn@inglenet.com>
fixed Bug #461:
* codegen.c: new function cb_init_codegen to clear local variables
* cobc.c: call cb_init_codegen after releasing cob_parsemem_base or
cobc_mainmem_base
2017-11-12 Simon Sobisch <simonsobisch@gnu.org>
* tree.h, tree.c, typeck.c: removed level_redundant_error and moved
the only part of it that was used once to typeck.c (validate_occurs)
* typeck.c (validate_occurs): check level before raising a warning on
use of level 01/77 OCCURS, warn with correct position
2017-11-11 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c: increase size for DEBUG-CONTENT according to file record length
* codegen.c: initialize return_address_ptr to an existing label to ensure
that at least one label is available for computed goto, see bug 439#
2017-11-09 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_call): change to exception handling: only check for
exceptions that are the result of the current CALL
2017-11-09 Simon Sobisch <simonsobisch@gnu.org>
* reserved.c, typeck.c: add DEBUG-ITEM to be handled as register
* typeck.c: change definition of DEBUG-ITEM: DEBUG-LINE is alphanumeric,
DEBUG-NAME and DEBUG-CONTENT X(31) -> X(30)
2017-11-07 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c: change to USE FOR DEBUGGING procedures - don't generate a
local cob_debugging_mode and use runtime setting instead
2017-11-05 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: only switch CALL ... BY VALUE to BY CONTENT for a single
parameter and output its name
* warning.def, cobc.h: allow -Wno-other to suppress messages generated
because of "COBC_WARN_FILLER"
* warning.def, error.c, typeck.c: allow -Wno-dialect to suppress messages
generated because of dialect option value "warning"
* cobc.c: default cb_flag_computed_goto depending on COB_COMPUTED_GOTO
instead of a fixed list of compiler (version) defines
* flag.def, cobc.c, codegen.c: disabled -fif-cutoff (cb_if_cutoff,
gen_if_level), can be re-activated by -DCOBC_HAS_CUTOFF_FLAG (likely
to be removed completely later), see bug #456
2017-11-03 Simon Sobisch <simonsobisch@gnu.org>
* pplex.l: fixed bug #458 by adding error handling for copybooks
that couldn't be opened because of external limits
2017-11-02 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: check missing evaluation of command line option;
code-coverage specific changes
2017-10-25 Ron Norman <rjn@inglenet.com>
* typeck.c (validate_move invalid:) fixed bug #225 report
'invalid SET statement' when appropriate
2017-10-25 Simon Sobisch <simonsobisch@gnu.org>
* Makefile.am: specify all generated source files in BUILT_SOURCES
that have to be built _before_ other sources, fixing parallel builds
2017-10-24 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: fixed bug #454 suspicious warning with actual working
CURRENCY SIGN, better error messages for this clause
* error.c, cobc.c: changed message format back to old version,
see bug #455
* typeck.c: fixed bug #266 - false error on duplicate characters in
class definition
* parser.y: added *parsing* for COBOL2002 options to specify class type
and referenced alphabet in SPECIAL-NAMES, CLASS clause
2017-10-22 Simon Sobisch <simonsobisch@gnu.org>
* Makefile.am: moved include of top_srcdir to AM_CPPFLAGS to prevent
user-specified CPPFLAGS to override own includes, see bug #452
* cobc.c: minimal support for DJGGP, including generation of 8.3 filenames
via internal HAVE_8DOT3_FILENAMES
* cobc.c: don't halt immediately on first PATH error during startup,
postponed until command line arguments are processed
2017-10-18 Ron Norman <rjn@inglenet.com>
* codegen.c (output_internal_function): fixed problem with braces in
variable dump code
2017-10-17 Ron Norman <rjn@inglenet.com>
Fixed bug #449 - debug should not imply trace
* cobc.c: change so -debug does NOT set -ftrace
* codegen.c: set module flags on entry to indicate if module
was compiled with -debug or -ftrace[all] so that the module
is not traced at runtime unless it had been compiled with that
option
2017-10-14 Edward Hart <edward.dan.hart@gmail.com>
* typeck.c: refactored and improved variable names in external form
functions.
2017-10-07 Edward Hart <edward.dan.hart@gmail.com>
* typeck.c: extracted (cb_check_arithmetic) from (cb_emit_arithmetic) and
(cb_check_set_to) from (cb_emit_set_to)
* typeck.c (cb_emit_incompat_data_checks): renamed from
(cb_check_data_incompat)
* parser.y, reserved.c, codegen.c, tree.h, typeck.c: work on
PROTOTYPE support
2017-10-07 Ron Norman <rjn@inglenet.com>
* codegen.c: correction for -fodoslide
2017-10-06 Edward Hart <edward.dan.hart@gmail.com>
* parser.y, tree.c, tree.h: added RECORD DELIMITER syntax checks.
* parser.y, cobc.h, reserved.c: added BINARY-SEQUENTIAL and
LINE-SEQUENTIAL phrases to RECORD DELIMITER.
* config.def: added config options for RECORD DELIMITER clause.
2017-09-28 Edward Hart <edward.dan.hart@gmail.com>
* parser.y (stop_statement): set context-sensitive flag (bug #433).
2017-09-22 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (cobc_abort_msg): output orig_program_id instead of C-converted
* codegen.c (codegen): adjust current_program used for error messages
during code generation of nested programs
* parser.y: fixed missing warning for pending CURRENCY SIGN other than '$'
* cobc.c, tree.c, tree.h: fixed #435 - nested programs had no access to
identifiers in its parent's scope: added next_program_ordered to
struct cb_program set in (restore_program_list_order) and used for
checking nested lookups afterwards
2017-09-22 Edward Hart <edward.dan.hart@gmail.com>
* typeck.c (cb_set_intr_when_compiled): #436 fixed timezone printf format
* cobc.c (cobc_enum_explain): added missing tags
2017-09-21 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: ensure correct order of the programs during processing
* codegen.c (output_param): added missing check after calling (cb_ref)
to prevent SIGSEGV, see Bug #435
* typeck.c, tree.c: checked result of (cb_ref) where missing
2017-09-18 Ron Norman <rjn@inglenet.com>
* codegen.c:
Emit Decimal Constants for all module types
2017-09-18 Ron Norman <rjn@inglenet.com>
* config.def:
Added select-working: yes/no
SELECT RELATIVE KEY and ASSIGN fields must be in WORKING-STORAGE
* typeck.c:
Report 'declared outside WORKING-STORAGE' if 'select-working: yes'
and SELECT RELATIVE KEY or ASSIGN field is not in WORKING-STORAGE
* codegen.c:
When SELECT RELATIVE KEY or ASSIGN field is not in WORKING-STORAGE
Then set current data address in each OPEN and for RELATIVE files
on every I/O operation
* tree.c:
Fix compile time resolve of FUNCTION INTEGER with negative value
2017-09-16 Edward Hart <edward.dan.hart@gmail.com>
* parser.y, config.def: added free-redefines-position config option.
2017-09-15 Ron Norman <rjn@inglenet.com>
* tree.c (cb_build_intrinsic): compute CB_INTR_LENGTH CB_INTR_BYTE_LENGTH
at compile time if field is fixed-length, non-national.
NOTE (Simon): other functions are postponed to later
2017-09-10 Edward Hart <edward.dan.hart@gmail.com>
* tree.c (cb_int): corrected bitmask.
* config.def, typeck.c: added line-col-zero-default and display-special-
fig-consts options. This reinstates GnuCOBOL's previous behaviour of
DISPLAYing a field on screen at the current position of the cursor and
disabling the MF DISPLAY SPACES extension.
* parser.y: increase number of places which accept ZERO (including SIZE
clause).
2017-09-05 Edward Hart <edward.dan.hart@gmail.com>
* tree.c (cb_int): add bitmask to suppress runtime loss-of-data warning
on Windows.
2017-09-05 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_validate_program_data): temporarily disabled ASSIGN
fields with changing address (BASED + LINKAGE) to prevent SIGSEGV
until code generation is changed, see bug #421
* codegen.c: changed generated newlines/comments for file initialization
2017-09-04 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c, tree.c, tree.h, typeck.c: started to change compiler
internal variables to be unsigned int instead of int to prevent
C compiler warnings about a possible negative access to arrays
and sign mismatches in comparisons
* codegen.c: output comment for decimal constants only if we have
actually generate decimal constants
2017-09-02 Simon Sobisch <simonsobisch@gnu.org>
* reserved.c: adjusted some missing context-sensitive options
* reserved.c, parser.y: added parsing of PHYSICAL attribute in
LENGTH functions
2017-08-28 Edward Hart <edward.dan.hart@gmail.com>
* field.c (validate_field_1): refactored.
2017-08-23 Edward Hart <edward.dan.hart@gmail.com>
* cobc.c (cobc_clean_up): added calls to (plex_call_destroy) and
(ylex_call_destroy), *actually* fixing bug #407.
* pplex.l (ylex_clear_all): added calls to (cb_reset_78) and
(cb_reset_global_78) to prevent memory leak on abort (bug #417).
2017-08-20 Simon Sobisch <simonsobisch@gnu.org>
* tree.c: work on expression warning messages and added more
2017-08-19 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c, flag.def, warnings.def, cobc.h: changed handling for
cobc --help, mainly to provide translators with context for msgids
* field.c: adjusted message for cb_warn_ignored_initial_val
2017-08-18 Simon Sobisch <simonsobisch@gnu.org>
* flag.def: always activate cb_flag_recursive_check by CB_FLAG_ON
* tree.c, codegen.c: assume RECURSIVE for -fno-recursive-check
2017-08-18 Ron Norman <rjn@inglenet.com>
* codegen.c: emit code for CALL to handle ON EXCEPTION
2017-08-17 Ron Norman <rjn@inglenet.com>
* scanner.l: Added SET_LOCATION when returning 'literal'
which is a 78/01 constant
* codegen.c: Emit cob_module_global_entry instead of cob_module_enter and
pass the 'entry' value (currently only set in rw-branch).
2017-08-17 Simon Sobisch <simonsobisch@gnu.org>
* tree.c: work on expression warning messages
2017-08-18 Edward Hart <edward.dan.hart@gmail.com>
* parser.y (screen_occurs_clause): marked as pending.
2017-08-15 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c: bug #413 don't generate cob_check_based for UDF return fields
* cobc.c (xref_print): output marker for receiving references
2017-08-14 Simon Sobisch <simonsobisch@gnu.org>
* tree.c: fixed tree cast error for literals
* typeck.c (cb_build_cond): fixed tree cast error with cb_arithmetic_osvs
2017-08-13 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: added cobc_early_exit and adjusted exit calls to fix missing free
* ppparse.y: CDF: warn if compiler flag is unknown
* typeck.c: allow figurative constants to be used for CALL USING as
documented for IBM COBOL
2017-08-12 Ron Norman <rjn@inglenet.com>
* codegen.c: Place all code to clear Decimal Constant values under
label P_clear_decimal and invoke that code when 'entry' is -20
2017-08-11 Edward Hart <edward.dan.hart@gmail.com>
* reserved.c: implemented (not-)register: DIALECT-ALL.
* codegen.c (output_internal_function): fixed C compile error when
RETURN-CODE register is disabled.
2017-08-10 Edward Hart <edward.dan.hart@gmail.com>
* cobc.c (cobc_clean_up): added calls to (plex_clear_all) and
(ylex_clear_all), fixing bug #407.
2017-08-09 Edward Hart <edward.dan.hart@gmail.com>
* config.c (cb_config_entry): removed extraneous free (bug #409).
* config.c (cb_config_entry): fixed indentation.
2017-08-07 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, reserved.c, typeck.c, tree.h: adjusted and included
Patch #27 by Wim Niemans 2016-06-13 for FR #100 as PENDING
* field.c, tree.c: adjustments for EXTERNAL-FORM
* cobc.c, error.c, parser.y, typeck.c: msgid specific changes
2017-08-07 Edward Hart <edward.dan.hart@gmail.com>
* typeck.c: moved RELATIVE KEY validating code to
(validate_relative_key), called in (cb_validate_program_data).
* typeck.c (validate_relative_key): altered to check key is not the
associated file's records and improved category check.
* parser.y: added check that correct KEY clause is used with
RELATIVE/INDEXED files (bug #405).
2017-07-29 Edward Hart <edward.dan.hart@gmail.com>
* reserved.c (system_name_table): added switches USW-0 thru USW-31.
* field.c (validate_field_1): added warning for useless FULL clause on
numeric items.
* parser.y (error_stmt_recover): removed ELSE from list of verbs,
preventing recursion on syntax error in IF statements (bug #403).
2017-07-27 Simon Sobisch <simonsobisch@gnu.org>
* reserved.c: fixed bug #402 - optional WITH clause functional
* parser.y, reserved.c: FR #78 more phrases for DISPLAY WINDOW
* parser.y, typeck.c: FR #77 fixed HANDLE references
* parser.y, reserved.c: FR #190 minimal support for DISPLAY MESSAGE BOX
* parser.y, typeck.c: fixed SIGSEGV in cobc for DISPLAY OMITTED
2017-07-26 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, reserved.c: added clauses COLOR and SIZE as PENDING
* parser.y: added ACCEPT FROM SCREEN as PENDING
2017-07-27 Ron Norman <rjn@inglenet.com>
* tree.c:
Improve warning messages for comparing literals to fields
2017-07-23 Ron Norman <rjn@inglenet.com>
* tree.c: Improve line number used in warnings about 'always TRUE/FALSE'
Check for IF/WHEN with NOT condition to resolve compile time expr
* typeck.c: Turn off ignore of errors as required
* codegen.c: Emit line # in C code for WHEN statements
2017-07-20 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: fixed memory overlap for long strings in listing title
* cobc.c [_MSC_VER](process_filtered): fixed cobc_free of NULL pointer
2017-07-19 Ron Norman <rjn@inglenet.com>
* typeck.c, parser.y, tree.h, tree.c:
Limit ignoring errors to IF, WHEN and PERFORM UNTIL
when the condition is resolved at compile time
* tree.c: When comparing a display numeric field to a literal
and the literal is longer than the field, the result
can be determined at compile time as TRUE or FALSE
2017-07-18 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, tree.c: check both increased MAX_FD_RECORD and the new
introduced MAX_FD_RECORD_IDX depending on file organization
* config.c: for -fnot-reserved=word: additional to removing "word"
from reserved word list remove "word" from register, system-names
and intrinsic function list
2017-07-17 Edward Hart <edward.dan.hart@gmail.com>
* typeck.c (cb_expr_shift): corrected r1347 - only set expr_lh to NULL
if the token in parentheses is a relational expression (see bug #321).
2017-07-17 Simon Sobisch <simonsobisch@gnu.org>
* config.c: better handling of empty/comment only lines
* tree.h, tree.c, typeck.c: added explain_operator and used where
appropriate
2017-07-17 Ron Norman <rjn@inglenet.com>
* tree.c: in cb_build_binary_op provide details on why an
expression is always TRUE or FALSE and better indicate which
line this happened on
* tree.c: in cb_build_binary_op check for '@' parens operator
with a numeric literal inside the parens
2017-07-14 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: only allow RETURNING/GIVING in EXIT PROGRAM/GOBACK
if RETURN-CODE register is not disabled; always return 0 on
STOP RUN if no RETURN-CODE register is available
* reserved.c, tree.h: new functions cb_register_list_get_first and
cb_register_list_get_next for iterating through all active registers
* typeck.c: modularize register creation
2017-07-13 Simon Sobisch <simonsobisch@gnu.org>
* config.def: added support options cb_move_fig_constant_to_numeric
"move-figurative-constant-to-numeric" and cb_move_fig_quote_to_numeric
"move-figurative-quote-to-numeric"
* typeck.c: re-allow move of figurative constants to numeric/numeric
edited fields, cater for new compiler support flags
cb_move_fig_constant_to_numeric and cb_move_fig_quote_to_numeric;
removed the explicit internal change in this case to ALL ZERO
* typeck.c, cobc.h, cobc.c: renamed cb_list_system
to cb_list_system_routines
* reserved.c, cobc.h, cobc.c: renamed cb_list_mnemonics
to cb_list_system_names
* reserved.c: added switch alias-names UPSI-0 to UPSI-8
* cobc.c (cobc_enum_explain), codegen.c (output_param), tree.h:
added missing parts for CB_TAG_DECIMAL_LITERAL to fix
cast check errors
2017-07-12 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c, parser.y, tree.c, codegen.c: checked the now optional fields
cb_return_code, cb_call_params, cb_sort_return before accessing them
* flag.def: removed -fsyntax-extension "cb_syntax_extension" because
there's no actual use any more as non-standard switches can now be
activated by compiler configuration and/or command line option
-fsystem-name=SW1
* reserved.c: added ACUCOBOL synonym ABSOLUTE-VALUE for function ABS
2017-07-11 Simon Sobisch <simonsobisch@gnu.org>
* reserved.c: added functions for (de)activating registers, system names,
intrinsics; removed ext_system_table and added its entries as deactived
to system_table
* config.c: added options to (de)activate registers, system names,
intrinsics
* cobc.c: added --list-registers and -f[no-]intrinsic-function,
-f[no-]system-name, -f[no-]register
* parser.y: don't stop parsing on wrong entries in REPOSITORY
2017-07-10 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: FR #206 added -O3 option
2017-07-09 Edward Hart <edward.dan.hart@gmail.com>
* reserved.c: output a reserved word's aliases during --list-reserved
(feature request #214).
2017-07-07 Edward Hart <edward.dan.hart@gmail.com>
* codegen.c: Prevent undefined behaviour and fixed typos in RW code
2017-07-07 Simon Sobisch <simonsobisch@gnu.org>
* tree.c: RECORD KEY in SELECT does not support FD in name bug #331
* tree.h: added cb_feature_mode for compiler features we can have
activated, disabled (by compiler configuration), or not implemented;
(cb_intrinsic_table): replaced "const int implemented" by
"enum cb_feature_mode active"
* reserved.c, tree.c: adjusted cb_intrinsic_table to use cb_feature_mode
2017-07-06 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, reserved.c, typeck.c, tree.h: added parsing for ACU
extensions DISPLAY WINDOW, CLOSE WINDOW and DESTROY statements
2017-07-05 Ron Norman <rjn@inglenet.com>
* codegen.c, typeck.c, error.c, parser.y, tree.c, tree.h:
Updates to skip emiting code for IF, WHEN in cases where
the condition is resolved down to TRUE or FALSE at compile time
cb_error reports as 'Error (ignored)' when code is not being emitted
2017-07-04 Simon Sobisch <simonsobisch@gnu.org>
* error.c: don't output "[re]defined here" messages when there
is no actual location to reference
* parser.y, reserved.c: added ACU extension USAGE HANDLE (both generic
and typed variants), added parser part for ACU THREADs (started via
CALL/PERFORM) and THREAD statements (SET THREAD PRIORITY and STOP THREAD)
[nothing done in libcob yet]
* codegen.c, field.c: changes for USAGE HANDLE
2017-07-03 Ron Norman <rjn@inglenet.com>
* typeck.c: Move check for cb_warn_parentheses to cb_build_expr routine
so that the check is done before constant expressions get folded
2017-07-03 Simon Sobisch <simonsobisch@gnu.org>
* tree.c (cb_build_binary_op): raise "invalid expression" for
invalid elements instead of COBC_ABORT
* config.def, cobc.c (cb_build_binary_op): added cb_constant_folding
"constant-folding" configuration option to provide a way to disable
this optimization (which is active in nearly all conf-files)
* config.def: reordered for nicer help output
* warning.def, typeck.c (validate_move): renamed cb_warn_truncate
"-Wtruncate" to cb_warn_pos_truncate "-Wpossible-truncate" and
cb_warn_constant "-Wconstant" to cb_warn_truncate "-Wtruncate"
* config.def, scanner.l: renamed cb_acucobol_literals
"acucobol-literals" option to cb_acu_literals "acu-literals"
* parser.y: set context CB_CS_ALLOCATE and CB_CS_READ
2017-07-02 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (cobc_print_usage): added -std=rm and all strict variants
2017-06-30 Simon Sobisch <simonsobisch@gnu.org>
* config.c: allow support options to be prefixed with '+'
to override the valaue previous set only if it is less strict
ok and +warning => ok, warning and +ok => ok
* parser.y (terminator_warning, terminator_error): don't warn/error
for missing terminators that don't exist in the current dialect
2017-06-22 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c, cobc.h, config.def, config.c, reserved.c: replaced
"specify-all-reserved" (cb_specify_all_reserved) by
"reserved-words" (cb_reserved_words)
* cobc.c (process_command_line): process -std= and -conf= even when
specified after --list-reserved
2017-06-20 Dave Pitts <dpitts@cozx.com>
* cobc.c: Added CALL cross reference functions.
* tree.h: Added CALL cross reference structures.
* typeck.c: Added CALL cross reference calls.
2017-06-16 Simon Sobisch <simonsobisch@gnu.org>
* Makefile.am: added CODE_COVERAGE parts as provided by AX_CODE_COVERAGE
* cobc.c, codegen.c, codeoptim.c, error.c, field.c, pplex.l, tree.c
typeck.c: surrounded exception ABORTs that cannot be tested by LCOV_EXCP
markers
2017-06-16 Dave Pitts <dpitts@cozx.com>
* cobc.c (reflow_replaced_fixed_format_text): listings: Fixed multiple
line output.
2017-06-13 Dave Pitts <dpitts@cozx.com>
* cobc.c (get_next_token): listings: Keep string as a single token.
2017-06-13 Ron Norman <rjn@inglenet.com>
* typeck.c: #306 check for misplaced operators and report error
2017-06-12 Simon Sobisch <simonsobisch@gnu.org>
* config.def: renamed "debugging-line" option (cb_debugging_line)
to "debugging-mode" (cb_debugging_mode) because of name conflict
with option -fdebugging-line to activate these lines
* parser.y, pplex.l: moved compiler verification for DEBUGGING MODE
from parser.y to pplex.l
* pplex.l: actual compiler verification for debugging indicators
2017-06-10 Simon Sobisch <simonsobisch@gnu.org>
* pplex.l: error on $SET var lit OVERRIDE (as this isn't available it was
interpreted as unknown SET OPTION)
2017-06-09 Ron Norman <rjn@inglenet.com>
* ppparse.y, scanner.l: pass OVERRIDE thru the
preprocessor to allow variables to be redefined
2017-06-09 Simon Sobisch <simonsobisch@gnu.org>
* pplex.l: remove trailing spaces and inline comments
for >> DISPLAY and $DISPLAY, remove surrounding quotation symbols
* typeck.c (cb_build_const_from): create numeric constant instead
of alphanumeric if the compile-time variable is numeric
2017-06-07 Simon Sobisch <simonsobisch@gnu.org>
* ppparse.y, config.def: only allow extension ">> DEFINE CONSTANT var [AS]"
depending on configuration option define-constant-directive
--> use plain >> DEFINE var [AS] literal for conditional compilation
and use 01 CONSTANT with/without FROM clause for constant definitions
2017-05-14 Edward Hart <edward.dan.hart@gmail.com>
* parser.y, config.def: part reverted r837 - allow incorrect
configuration section paragraph order with
incorrect-conf-sec-order option (see bug #224).
* parser.y (check_comp_duplicate): removed redundant code checking
for duplicate SOURCE-/OBJECT-COMPUTER paragraphs.
2017-06-05 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: prevent memory leak when options are specified multiple times
* cobc.c (print_program_trailer): correct program order in listing
for both with/without code generation
* cobc.c (process_translate): on processing errors set cb_flag_syntax_only
to not loose the information "no codegen occured"
* cobc.c: replaced --no-symbols (cb_no_symbols) by
-tsymbols (cb_listing_symbols)
* cobc.c: added (cobc_enum_explain_storage) to output
storage note in symbol listing
2017-06-03 Simon Sobisch <simonsobisch@gnu.org>
* config.def, pplex.l: renamed cb_eject_statement to cb_listing_statements,
added title-statement
* pplex.l, ppparse.y: added parsing for *CONTROL statement (PENDING)
and EJECT/SKIP1/SKIP2/SKIP3 + TITLE statements (either "removing" from
further handling [processed in cobc.c directly] or pass for example as
user-defined word)
* cobc.c: handle listing-directive statements for listing creation
2017-06-02 Simon Sobisch <simonsobisch@gnu.org>
* reserved.c, cobc.h, parser.y: added context check for OBJECT-COMPUTER
* parser.y: added missing parts to MEMORY SIZE (parsing only)
* parser.y: checking of segment values in SEGMENT LIMIT and SECTION,
allow segment numbers in declaratives (PENDING)
2017-05-30 Simon Sobisch <simonsobisch@gnu.org>
* pplex.l, ppparse.y: removed PAGE_DIRECTIVE (checked in pplex.l,
processed in cobc.c)
* pplex.l: don't skip separator period in directives,
combined common parts for directives in a single place,
better error handling for directives
* pplex.l: added MF extension $DISPLAY VCS = version string as PENDING
* cobc.c: directly pass the source_format to (line_has_page_eject),
(line_has_listing_directive) and process it there
* cobc.c: added (get_first_nonspace, get_directive_start) to correctly
process listing related directives
2017-05-30 Simon Sobisch <simonsobisch@gnu.org>
* pplex.l, ppparse.y: removed undocumented extension
"optional AS in $SET CONSTANT VAR [AS] VAL" - as this is a MF extension
MF doesn't allow the AS at all
* pplex.l, ppparse.y: implemented >> LEAP-SECOND directive (while keeping
the ON setting as PENDING)
2017-05-29 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, typeck.c: adjustments of constant value changes
2017-05-28 Ron Norman <rjn@inglenet.com>
* field.c, typeck.c: check for misplaced operators in constant expressions
2017-05-26 Ron Norman <rjn@inglenet.com>
Work on constant values:
* checks for application 78 versus internal 78 and allow internal 78
to get handled
* add constant-01 and constant-78 compile options
2017-05-25 Simon Sobisch <simonsobisch@gnu.org>
Work on constant values:
* parser.y, typeck.c, tree.h: tightened syntax checks for NEXT /
START OF as 78 VALUE
* typeck.c: set correct values for NEXT / START OF as 78 VALUE
2017-05-24 Ron Norman <rjn@inglenet.com>
Work on constant values:
* parser.y, typeck.c, tree.h: 78/CONSTANT accepts VALUE expression
* parser.y, typeck.c, tree.h: implemented NEXT / START OF as 78 VALUE
* ppparse.y, cobc.c, cobc.h: allow define list to be
searched outside of ppparse
* parser.y, typeck.c: implemented CONSTANT FROM
2017-05-22 Ron Norman <rjn@inglenet.com>
* codegen.c: create numeric literals with correct attributes
COB_FLAG_HAVE_SIGN | COB_FLAG_SIGN_SEPARATE | COB_FLAG_SIGN_LEADING
As this is how the literal is coded in the COBOL code.
2017-05-21 Ron Norman <rjn@inglenet.com>
* parser.y: accept ACUCOBOL SET var TO SIZE OF field, handle as
MOVE LENGTH OF field TO var
2017-05-20 Ron Norman <rjn@inglenet.com>
* codegen.c, tree.c, tree.h, typeck.c, codeoptim.c: Enhancements to
handle nested OCCURS DEPENDING ON including -fodoslide
2017-05-18 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_call): for static calls only generate parameters
up to the maximum number of the call, otherwise the static calls
cannot be resolved at compile time.
Note: currently only done for system library calls, we'd need an
external repository for doing this with other calls, too.
* typeck.c (cb_emit_call): warn if more than the max parameters is
used for system library calls
* typeck.c (cb_list_system): output min/max parameters for system
library entries
2017-05-15 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: bug #373 - level 78 constants: only allow a single value
and no optional ARE
* parser.y: don't check the warning option for cb_warning[_x] twice
2017-05-14 Ron Norman <rjn@inglenet.com>
* typeck.c (cb_build_binary_op): use integer arithmetic for compile
time configuration instead of (pow)
2017-05-13 Edward Hart <edward.dan.hart@gmail.com>
* typeck.c (validate_move): make warning on numeric literals in VALUE
clause of numeric-edited items configurable (original patch thanks to
David Newall).
2017-05-10 Dave Pitts <dpitts@cozx.com>
* cobc.c: Added "Too many errors" message to listing.
2017-05-08 Dave Pitts <dpitts@cozx.com>
* cobc.c: Added code to generate listing when max error count exceeded.
2017-05-07 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (emit_entry): checked RETURNING item for not having
REDEFINES clause, use field name instead of cb_name(reference)
2017-05-01 Ron Norman <rjn@inglenet.com>
* tree.c: improved resolving constant expressions at compile time:
now handles cases with decimal constants, too
* parser.y, typeck.c, tree.h: Implement arithmetic-osvs for conditions;
compute intermediate results to precision of variables used in expression
2017-04-30 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c, error.c, flag.def: added -fmax-errors / cb_max_errors
for early/late aborting depending on number of errors, defaulting
to the old value: 100
* cobc.c: added -W[no-]fatal-errors for aborting on first error
note: this option takes precedence over -fmax-errors
* cobc.c: return 97 for aborts, not 99 as autotest recognizes 99
as hard failure and we may want to check for aborts
* cobc.c: simplified --no-symbols option handling
2017-04-28 Simon Sobisch <simonsobisch@gnu.org>
* Makefile.am: using builtin rule for bison and cleaned rule for
flexx, moved hack for _MSC_VER to ../create_win_dist.sh
2017-04-27 Ron Norman <rjn@inglenet.com>
* field.c: Specific error messages for ANY NUMERIC
2017-04-27 Sergey Kashyrin <ska@kiska.net>
* parser.y: Fix for CALL-CONVENTION (was broken)
* codegen.c: on Windows we need to output entries prototypes
with dllexport, otherwise they will not be seen.
* cobc.c: print_error_for_line cut continuation
snprintf returns -1 in MSC and on HPUX if max is reached
2017-04-13 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (print_fields, print_88_values): removed indent parameter as
we no longer indent by level number
* cobc.c: cb_listing_linecount and cb_lines_per_page as unsigned int
* cobc.c: finished implementation of -Werror
2017-04-22 Edward Hart <edward.dan.hart@gmail.com>
* parser.y (stop_statement): added support for STOP identifier.
2017-04-22 Brian Tiffin <btiffin@gnu.org>
* error.c, cobc.h, cobc.c, field.c, parser.y, ppparse.y, tree.h,
scanner.l, tree.c, pplex.l: cb_warning[_x] change with
preference argument, refactor undefined_error to account for new
prototype.
2017-04-17 Edward Hart <edward.dan.hart@gmail.com>
* cobc.c (process_translate): reverse program list in place so that
current_program doesn't point to last program in file (see bug #265).
* codegen.c: reinstated local variable current_prog removed in
r1309. (codegen) would leave current_program pointing to the last
program in a file, from which you cannot get the first program. This
caused the listing code to break (bug #265) because it assumed
current_program would point to the first program in the file.
2017-04-13 Edward Hart <edward.dan.hart@gmail.com>
* cobc.c: fixed buffer overflows and memory leaks in listing code.
* cobc.c, pplex.l: refactored listing code: added comments,
improved variable names and modularised code.
2017-04-13 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c: don't generate DEBUGGING code for empty PERFORMs,
fixes #368 (SIGSEGV)
* cobc.c (cobc_sig_handler): don't ask for bug report on SIGPIPE
2017-04-10 Brian Tiffin <btiffin@gnu.org>
* codegen.c: remove use of cob_get_prog_pointer.
2017-04-09 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: fixed missing initialization for programs without
PROCEDURE DIVISION
2017-04-08 Edward Hart <edward.dan.hart@gmail.com>
* cobc.c, codegen.c, pplex.l: fixed buffer overflows and double
frees in listing code, SORT of table with OCCURS DEPENDING 0 TO n
and when aborting compilation in the lexer.
2017-03-31 Ron Norman <rjn@inglenet.com>
* parser.y: allow ASCENDING/DESCENING and INDEXED BY to follow OCCURS
in any order with -frelax-syntax
2017-03-31 Edward Hart <edward.dan.hart@gmail.com>
* typeck.c (cb_emit_set_to): added error when trying to set address of a
non-01/77-level linkage item. Also improved error messages.
2017-03-30 Edward Hart <edward.dan.hart@gmail.com>
* field.c (compute_size): padding for aligned OCCURS items should go
after the last item, not the beginning of the group (bug #155).
2017-03-22 Dave Pitts <dpitts@cozx.com>
* cobc.c, cobc.h: Added Error/Warning summary to listings.
* error.c: Added filename to error struct for summary.
* cobc.c: Added code to close and open append the listing file when
calling the external cross reference, cobxref.
2017-03-21 Dave Pitts <dpitts@cozx.com>
* cobc.c: Changed symbol listing indentation and added redefines clause
to symbol listing.
2017-03-19 Ron Norman <rjn@inglenet.com>
* codegen.c: fixed emission of decimal constants to go into program.c.h
2017-03-19 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c: bug #364 moved (output_initialize_chaining) out of
(output_initialize_one), special handling for chaining only during
program initialization
* codegen.c (output_internal_function): [bugs:#354] generate code for
raising COB_FERROR_CHAINING when CHAINING program is not the
main program instead of when it is called the second time
2017-03-19 Dave Pitts <dpitts@cozx.com>
* cobc.h, pplex.l: Restored copy_tail functionality. The copy books were
not being chained for the listing processor.
2017-03-19 Edward Hart <edward.dan.hart@gmail.com>
* parser.y (setup_program_start): moved call to (cb_build_program) to
(setup_program), after the PROGRAM-ID has been checked for
redefinition (see bug #271).
* parser.y (file_control_entry): fixed bug #352 by not setting
current_file to NULL in invalid SELECT entries.
* parser.y (file_control_entry): added parser error handler so typos
don't define an erroneous SELECT entry.
2017-03-18 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_check_overlapping): return a possible overlap if at least
one of the vars can have an assignment of a different address
* parser.y (end_scope_of_program_name): fix possible access of NULL var
* typeck.c [_MSC_VER] (cb_check_overlapping): silence wrong warning 6011
2017-03-12 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c, error.c: fix minor memory leaks in listing / configuration code
* field.c: fix mismatching memory allocation in picture handling
2017-03-11 Ron Norman <rjn@inglenet.com>
* codegen.c (output_call): Fixed #353 to correctly emit parameter for
CALL BY CONTENT with an INTRINSIC function
2017-03-05 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: fix #362 one-liner not generating by setting entry_convention
2017-02-18 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: do (setup_program_start) early in IDENTIFICATION DIVISION
if given, otherwise in PROGRAM ID / FUNCTION ID as we did before
2017-02-06 Ron Norman <rjn@inglenet.com>
* codegen.c:
Emit routines cob_file_external_addr, cob_file_malloc, cob_file_free
so that 'cob_file' is allocated within libcob
This will allow the structure have fields added to the end
without forcing a recompile. COB_FILE_VERSION is unchanged
Emit cob_module_free so that structure gets freed within libcob
2017-02-06 Simon Sobisch <simonsobisch@gnu.org>
* tree.c: fixed use of warn_cannot_get_utc while available
2017-02-02 Brian Tiffin <btiffin@gnu.org>
* cobc.h: Updated CB_PENDING CB_UNFINISHED macros with quieter ONCE_COB
2017-02-02 Brian Tiffin <btiffin@gnu.org>
* cobc.h, warning.def: test cb_warn_pending in CB_PENDING message macro.
2017-01-30 Ron Norman <rjn@inglenet.com>
* codegen.c: emit call to pass address of file for dump of
specific fields such as FILE STATUS
2017-01-30 Edward Hart <edward.dan.hart@gmail.com>
* parser.y, reserved.c, tree.h: allow EXTERN, STDCALL and STATIC to be
disabled by mnemonics by removing (part of) their context flags.
2017-01-29 Simon Sobisch <simonsobisch@gnu.org>
* cobc.h: removed CB_CS_PROCEDURE, alphabetical order for CB_CS_...
* pplex.l, ppparse.y, cobc.h, parser.y, tree.c:
implemented CALL-CONVENTION directive
* parser.y, tree.h: removed cb_entry_convention - stored as
call-convention now
* parser.y, codegen.c: implemented entry-convention for entry points
including stdcall generation
* reserved.c, parser.y: removed WINAPI
2017-01-25 Ron Norman <rjn@inglenet.com>
* flag.def, cobc.h: new option -fdump=<scope> added (cb_flag_dump)
* cobc.c: added code to set cb_flag_dump
* cobc.h: added defines for values
* codegen.c: added code to emit calls to new trace & dump routines
2017-01-22 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: fix bug #271 by raising an error on UDF without PROCEDURE
DIVISION and generating a minimal entry when this occurs with a program
* parser.y: work on SIZE IS for items passed BY VALUE
* cobc.c (cobc_abort_msg): output "FUNCTION-ID" if we abort in a UDF
2017-01-22 Edward Hart <edward.dan.hart@gmail.com>
* cobc.h: added CB_CS_OPTIONS.
* parser.y: added the OPTIONS paragraph, with DEFAULT ROUNDED MODE and
ENTRY-CONVENTION implemented.
2017-01-22 Simon Sobisch <simonsobisch@gnu.org>
FR #194: generate a WinMain() function instead of main
* flag.def: new cb_flag_winmain / -fwinmain for generating a WinMain()
function instead of main when compiling as executable
* codegen.c (output_standard_includes): generate additional include
"windows.h" if cb_flag_winmain is active
* codegen.c (output_main_function): generate WinMain instead of main
if cb_flag_winmain is active
2017-01-20 Brian Tiffin <btiffin@gnu.org>
* tree.h: add PROCEDURE DIVISION entry convention types
* cobc.h: add CB_CS_PROCEDURE context test value
* parser.y: PROCEDURE DIVISION EXTERN support
* reserved.c: EXTERN, COBOL, WINAPI context sensitive words
* codegen.c: EXTERN program entry
2017-01-19 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: fixed output of error messages (result of previous change)
by adding and using (list_error_reverse)
* parser.y: reactivate check PROCEDURE DIVISION returning item needs
to be in LINKAGE SECTION
* codegen.c (output_internal_function): only allocate UDF RETURNING items
when in LINKAGE SECTION
2017-01-18 Ron Norman <rjn@inglenet.com>
* field.c: set COB_FLAG_REAL_BINARY to on for COMP-5
* codegen.c: for numeric literals passed on CALL, COB_FLAG_REAL_BINARY is
not set on since the internal field is actually S9(9) COMP-4
2017-01-17 Ron Norman <rjn@inglenet.com>
* parser.y: fixed coding errors in referencing CB_LITERAL before
verifying that the token is a literal in REPORT DIVISION
2017-01-17 Ron Norman <rjn@inglenet.com>
* codegen.c (output_integer) [COB_NON_ALIGNED]: insert (cob_u8_ptr)
before cob_get_pointer (..) for systems not allowing pointer arithmetic
on (void*)
2017-01-16 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, reserved.c: some work on program-prototypes,
added parsing of COBOL 2002 NESTED phrase for CALL
* cobc.c, cobc.h, errror.c: removed error_tail and copy_tail
* cobc.c: fixed SIGSEGV in listing on machines where char is signed
and COBOL sources contain characters > 127
* cobc.c: fixed SIGSEGV in listing when compiling from multiple sources
which all show errors
2017-01-15 Simon Sobisch <simonsobisch@gnu.org>
* tree.h, cobc.h, parser.y: removed unused cb_statement->statement and
its assignment from cobc_glob_line which wasn't set at all
* parser.y (begin_implicit_statement): copy attributes common and name
from current_statement when creating an implicit new current_statement
2017-01-14 Edward Hart <edward.dan.hart@gmail.com>
* tree.c (userbp): fixed bug #350 - caused by userbp initialisation not
matching current cb_intrinsic_table layout.
* tree.c (userbp), tree.h: made cb_intrinsic_table pointers const.
2017-01-13 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c [_MSC_VER]: swapped order of parameters for C compiler
and linking so that -L options come before -l
* cobc.c: swapped order of setting and size calculation of compiler/linker
options to match the order used for the actual call
2017-01-11 Simon Sobisch <simonsobisch@gnu.org>
* tree.c (cb_name_1): output name for USER FUNCTIONs
2017-01-11 Mário Matos <matosma@users.sf.net>
* codegen.c (output_entry_function):
fixed bug #349 (compatibility for C89 / _MSC_VER < 1800) - moved
generation of pointer fields for BY VALUE items before any code
2017-01-10 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: Copyright year 2017
2017-01-10 Ron Norman <rjn@inglenet.com>
* codegen.c:
For CALL statements parameters passed BY VALUE or CONTENT are copied
to a temporary variable with the attribute of COB_FLAG_CONSTANT.
This is done so that the subroutine will not accidentally try to
overwrite these parameter fields.
2017-01-09 Edward Hart <edward.dan.hart@gmail.com>
* parser.y (expr_token): restricted IS to before ZERO/classes/condition
words.
2017-01-09 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_build_identifier): corrected minimum check for OCCURS
* cobc.c: updates for generation of cross reference / symbol listing
2017-01-08 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (print_program_header): print only one page header when -tlines=0
is used and removed the " Page 0001" that would always be printed
* cobc.c: new function print_program_data for output of data to the list
file - needed for suppressing empty lines after page header and for
correct counting of lines per page
* cobc.h, cobc.c: moved all listing #define from cobc.h to cobc.c
* cobc.c, tree.h, tree.c, parser.y: added receiving flag to cb_xref_elem,
set it on appropriate places (especially from references)
2017-01-07 Simon Sobisch <simonsobisch@gnu.org>
* cobc.h: added CB_CS_ALLOCATE
* reserved.c: set context sensitivity: CAPACITY -> OCCURS,
INITIALIZED -> ALLOCATE, OCCURS
2017-01-06 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c: always emit an internal move for WRITE/REWRITE if the FROM
clause consist of a literal
* typeck.c (cb_check_overlapping): fixed handling when called with a field
instead of with a reference (which is the case for level 88 validation)
* codegen.c (output_data): added resolve of CB_TAG_FIELD
2017-01-05 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (accept_body): check that PROMPT and SIZE clauses are not set
for ACCEPT OMITTED (as these are ignored at run-time)
* typeck.c (cb_emit_accept): bugfix - extended ACCEPT wasn't used if the
only attributes set were: timeout || prompt || size_is
* cobc.c (cobc_sig_handler): fixed TODO about unused var
* cobc.c (process)[WIFSIGNALED]: use cob_raise instead of cobc_sig_handler
2017-01-02 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c, cobc.h: new variable current_compile_time for resolving all
compilation dates, set by call to libcob's cob_get_current_date_and_time
* typeck.c (cb_build_registers): use time from current_compile_time
providing a higher precision and is identical to the listing which is
requested by COBOL 2002+
* cobc.c, cobc.h, codegen.h: renamed cb_oc_build_stamp to
cb_cobc_build_stamp
* cobc.c: if -t listing_file is passed multiple times use the last option
value instead of the first one
* cobc.c, cobc.h, tree.c, tree.h, parser.y: numerous changes for generation
of internal symbol-table and cross-reference listing - nearly all
references are now stored in tree.c (cb_ref), ANY LENGTH/NUMERIC, OCCURS
with PICTURE or UNBOUNDED are shown correctly now,
references by parent/child only are shown, too
2017-01-02 Brian Tiffin <btiffin@gnu.org>
* cobc.h: test cb_warn_unfinished in CB_UNFINISHED message macro.
2017-01-02 Ron Norman <rjn@inglenet.com>
* cobc.c, warning.def:
renamed cb_warn_external_val to cb_warn_ignored_initial_val
2016-12-29 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: changes for -verbose, optional argument for verbose level,
-vv output shows information from the compiler, -vvv from linker,
-v -help shows help from compiler/linker,
-### shows external commands but doesn't execute them
* cobc.c (cobc_sig_handler): only ask for bug report if the signal isn't
a user-requested one
* codegen.c (codegen): reset pic_cache pointer
* cobc.c (xref_print): corrected size of numbuf
2016-12-28 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c: disabled nested ODO as the current implementation
has too many flaws (see re-opened FR #99)
2016-12-27 Ron Norman <rjn@inglenet.com>
* typeck.c: Added checks for RELATIVE KEY field being
integer in WORKING-STORAGE and having no OCCURS
2016-12-27 Simon Sobisch <simonsobisch@gnu.org>
integrating patch #30 by Frank Swarbrick and make sure it works
* parser.y: finished OCCURS ... TO UNBOUNDED
* reserved.c: new token LENGTH_FUNC for BYTE-LENGTH, LENGTH, LENGTH-AN
* parser.y, tree.h, typeck.c: new var suppress_data_exceptions used with
LENGTH_FUNC for suppressing runtime checks for field-allocation
* typeck.c: passing additional parameters for table name / flag for ODO
in generation of cob_check_odo and cob_check_subscript
2016-12-22 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (main): bugs #346 moved compiler specific COB_CFLAGS from
to configure to provide transparency and full control to the user
2016-12-22 Edward Hart <edward.dan.hart@gmail.com>
* scanner.l, pplex.l: suppress unused function warning in clang.
2016-12-22 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c: use global current_program instead of local current_prog
* cobc.c (cobc_abort_msg): part of fixing bug #344
distinguish between compilation and final code generation
* cobc.c: added message for internal compiler errors to report them
* codegen.c (output_param): part of fixing bug #344
check for field reference to prevent SIGSEGV
* typeck.c (cb_emit_move): fixing bug #344 check that MOVE target is
no label or program prototypes
* tree.c (cb_name): only use as much parsing memory for names as necessary
2016-12-19 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, typeck.c: stricter syntax checking for WRITE|REWRITE FILE
2016-12-16 Simon Sobisch <simonsobisch@gnu.org>
* scanner.l: limit for ACUCOBOL literals: UINT_MAX
* tree.c: check for LLONG_MAX and define it if it is defined as
LONG_LONG_MAX / _I64_MAX
* parser.y, reserved.c: added ACUCOBOL line sequential
device names for ASSIGN
2016-12-12 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, typeck.c, tree.h: FR#182 added ADD|SUBTRACT TABLE as pending
2016-12-08 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (cobc_print_info): output exact C compiler which was used
to build cobc and if GMP/MPIR header was used
2016-12-06 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (process_filename) [_WIN32]: check extension .asm along to .s
* cobc.c (process_compile) [!_MSC_VER]: use COB_PIC_FLAGS when compiling
to a module, surround the translation name by quotes
2016-11-30 Ron Norman <rjn@inglenet.com>
* parser.y, typeck.c: FR #170 implement WRITE|REWRITE FILE filename
2016-11-22 Dave Pitts <dpitts@cozx.com>
* cobc.c (print_program_code): Free replace text. Realloc replace text
instead of memcpy of source.
* pplex.l (ppopen): Only strdup filename if NULL.
2016-11-21 Simon Sobisch <simonsobisch@gnu.org>
* tree.c, parser.y: fixing tree cast errors (found by COB_TREE_DEBUG)
* cobc.c (print_88_values, get_next_listing_line): fix SIGSEGV for uncommon
long names / lines
* cobc.c: fix minor memory leaks in listing code
* pplex.l, cobc.h: commented copy_tail as it doesn't seem to be used
2016-11-19 Edward Hart <edward.dan.hart@gmail.com>
* parser.y, reserved.c, etc.: added complete recognition of all
COMMUNICATION SECTION syntax.
* config.def: added use-for-debugging config option.
2016-11-07 Ron Norman <rjn@inglenet.com>
* typeck.c, cobc.c, config.def: added code for 'move-ibm' option which does
MOVE same as IBM MVC instruction
2016-11-16 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_call_cache): fix bug #341 added generation of macro
check in C function declarations for static CALLs
2016-11-14 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_trim_program_id): change warning message for remove of
spaces in program-id to be more specific and don't warn embedded spaces
2016-11-13 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, typeck.c (cb_trim_program_id), tree.h: added code to warn
if SPACES are used in a PROGRAM-ID or CALL 'literal' plus the SPACES
are removed
2016-11-12 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: fixed extended_with_lock by differentiating between WITH
LOCK / NO LOCK / KEPT LOCK
* typeck.c (cb_emit_read): set read_opts COB_READ_LOCK and
COB_READ_KEPT_LOCK for I/O statements with KEPT LOCK
2016-11-11 Dave Pitts <dpitts@cozx.com>
* cobc.c, cobc.h: Multiple changes to support 5 digit variable size and
cross reference changes.
2016-11-10 Simon Sobisch <simonsobisch@gnu.org>
* tree.h: added cb_field->validation (First level 88 field, if any)
* field.c (cb_build_field_tree): add validation entry and sisters
* cobc.c (print_88_values, xref_88_values): use new validation entries
instead of checking all word references against the field
(huge! time saver and correct order)
2016-11-09 Dave Pitts <dpitts@cozx.com>
* cobc.c, cobc.h, parser.y, tree.h, typeck.c: Added internal cross
reference support.
2016-11-07 Jim Rinn <jimrinn1@gmail.com>
* parser.y (lock_mode): OR-ing SELECT settings into file->lock_mode as they
would override COB_LOCK_MULTIPLE (set in _lock_with) otherwise
2016-11-07 Dave Pitts <dpitts@cozx.com>
* cobc.c (print_88_values): Added to print 88 level values.
(print_fields): call print_88_values for a variable.
2016-11-06 Simon Sobisch <simonsobisch@gnu.org>
* cobc/cobc.c (print_program_header): changed the version string limit
(including patch level) to 14 digits
2016-11-04 Simon Sobisch <simonsobisch@gnu.org>
* parser.y (terminator_warning, terminator_error, terminator_clear):
COBC_ABORT for invalid calls, warn/error with current_statement and
only free stmt when it is valid (currently isn't the case when an alias
for a statement is used)
2016-11-03 Simon Sobisch <simonsobisch@gnu.org>
* config.c (read_string): fixing changes to pointer generated by
cobc_main_malloc (needs to stay for later cobc_main_free)
* error.c, cobc.h: defined own error procedure flex_fatal_error for
running cobc's internal error procedures (including showing the
current source/line of both the processed COBOL and the generated
flex source) instead of a simple error exit
* pplex.l, scanner.l [__GNUC__]: added pragma to ignore unused
functions there as flex generates unused ones
* Makefile.am: change to auto-edit of files generated by flex
2016-11-02 Edward Hart <edward.dan.hart@gmail.com>
* pplex.l (ppinput): fixed comment paragraphs being rejected in free
format (see bug #297).
* reserved.c (try_remove_removal): stopped freed memory being read.
2016-11-02 Dave Pitts <dpitts@cozx.com>
* cobc.c (main): Change calls from free() to cobc_free().
2016-11-01 Dave Pitts <dpitts@cozx.com>
* cobc.c (print_program_code): Scan for "#line " and set line number.
* pplex.l (ppcopy): Restore old list file and emit "#line..." on error.
2016-10-31 Dave Pitts <dpitts@cozx.com>
* cobc.c (cobc_terminate): Added calls to print header/trailer.
2016-10-31 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: renamed COB_MAX_FIELD_PARAMS to MAX_CALL_FIELD_PARAMS
* parser.y: bug #110 fix LENGTH OF not working in some places
* codegen.c: bug #314 (output_search_all): SEARCH ALL with ODO zero
did not exit early
2016-10-30 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: added cb_unix_lf to enable possible output of generated files
with unix lf (especially for listing files and testsuite)
* codegen.c (output_entry_function): don't generate "return" for
void functions
* parser.y, reserved.c, cobc.h: added part of COMMUNICATION SECTION
syntax for being able to check this in NIST
2016-10-29 Dave Pitts <dpitts@cozx.com>
* cobc.c (print_program_header): Changed to allow for 9 character
version field (eg. VV.RR.PPP).
2016-10-28 Dave Pitts <dpitts@cozx.com>
* cobc.h: Moved CB_LIST_PICSIZE here and increased length to 80.
* cobc.c (set_picure): Added picture_len argument and reorganized.
* cobc.c (print_fields): Added picture_len argument set to width of
listing.
2016-10-27 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (process_run): use COB_EXEEXT for systems that need it
* parser.y: added "local_" prefix for function parameters that used
identical names as static vars
2016-10-26 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c: fixed checks of overlapping MOVE and don't raise warnings for
items in occurs as the check for this was borked
* warning.def, typeck.c: added new CB_NOWARNDEF -Wpossible-overlap for
items that only *may* overlap (-Woverlap only warns if overlap is sure)
2016-10-25 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c. cobc.h: moved multiple #undef of internal used macros to cobc.h
* config.def: feature-request #173 added reference-out-of-declaratives
* typeck.c (cb_validate_program_body): use cb_reference_out_of_declaratives
* cobc.c (process_command_line): make sure cb_reference_out_of_declaratives
is not stricter than CB_WARNING when cb_relaxed_syntax_checks is active
2016-10-23 Simon Sobisch <simonsobisch@gnu.org>
* tree.h, tree.c, typeck.c, parser.y: fixed missing type changes
from int to cob_flags_t for functions using disp_attrs
2016-10-23 Edward Hart <edward.dan.hart@gmail.com>
* scanner.l: Fixed bug introduced in r1116 which broke lowercase comment
paragraphs.
2016-10-22 Dave Pitts <dpitts@cozx.com>
* cobc.c: added --no-symbols for symbol table listing
2016-10-18 Dave Pitts <dpitts@cozx.com>
* cobc.c (print_fixed_line): fixed SOURCEFORMAT VARIABLE bug
2016-10-17 Edward Hart <edward.dan.hart@gmail.com>
* scanner.l (RETURN): renamed to RETURN_TOK (see bug #330)
2016-10-16 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_list_system): simplified, removed hard-coded values
* cobc.c: listing: allow page break to be disabled with -tlines=0
2016-10-15 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: improved checks for duplicate/conflicting clauses in ACCEPT
and DISPLAY statements (finished Edwards changes from 2016-10-02)
2016-10-13 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c: fixed missing initialization of static_call_cache
* flags.def, cobc.c: added CB_FLAG_ON for compiler flags that are
active by default
* flags.def, codegen.c: added new cb_flag_c_decl_for_static_call as
CB_FLAG_ON, to create the option for disabling the auto-generation
of C function declarations for static CALLs
2016-10-12 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: refactored handling of occurs to (setup_occurs) and
(setup_occurs_min_max)
* parser.y (setup_occurs): check for TO without DEPENDING (allow for
relaxed syntax)
* cobc.c (print_fields): print fixed size OCCURS without TO phrase
* ppparse.y (set_choice): fixed bug #328 SIGSEGV for SET SOURCEFORMAT
directive without active listing
* parser.y (mnemonic_name_clause): fixed buffer overflow on long
(unknown) system names
2016-10-11 Dave Pitts <dpitts@cozx.com>
* cobc.c: Added OCCURS <minimum> TO <maximum> to print_fields() and
corrected length printout.
Also added "-R" to TYPE field for REDEFINES.
2016-10-08 Edward Hart <edward.dan.hart@gmail.com>
* config.c: let reserved and not-reserved accept comma-separated lists
2016-10-13 Ron Norman <rjn@inglenet.com>
* typeck.c, config.def: added code for 'arithmetic-osvs' option
which computes intermediate results similar to IBM OSVS & MVS
2016-10-02 Edward Hart <edward.dan.hart@gmail.com>
* parser.y: improved checks for duplicate/conflicting clauses in ACCEPT
and DISPLAY statements
* codegen.c, parser.y, tree.h: introduced cob_flags_t typedef for
variables made up of bit flags
* parser.y: improved function names
* parser.y: improved support for ACUCOBOL screen phrases
* config.def: added no-echo-means-secure config option
2016-09-28 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: use at least one tab for spacing between option and text in help
* config.c: check range (defined in config.def) for all integer flags
2016-09-27 Simon Sobisch <simonsobisch@gnu.org>
* tree.c (cb_build_picture), config.def: feature-request #173
compiler configuration pic-length for number of characters
in PICTURE clause
* config.c: check range (defined in config.def) for all integer flags
2016-09-25 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c: fix bug #316 static linking with stdcall was broken
* new struct static_call_list (including convention and
return-type), removing return-type from call_list
* store call-convention and generate __stdcall modifiers if requested
* codegen.c (call_list_reverse, static_call_list_reverse): added for
keeping the generated variables in the same order it has in COBOL,
called in (codegen)
2016-09-24 Edward Hart <edward.dan.hart@gmail.com>
* reserved.c: changed reserved and no-reserved options to generate
amendments to the reserved word list so that specify-all-reserved can
be examined at the end of configuration processing (allowing it to be
unset after being set).
* cobc.c: removed -R/-reserve-all option.
2016-09-21 Edward Hart <edward.dan.hart@gmail.com>
* parser.y: added RETRY and ADVANCING ON LOCK as pending features.
* parser.y, reserved.c: made FOREVER context-sensitive.
* reserved.c (default_reserved_words): corrected year of standard from
2008 to 2014.
* reserved.c (lookup_reserved_word): changed to allow context-sensitive
words to be activated by different words.
2016-09-19 Ron Norman <rjn@inglenet.com>
* codegen.c, tree.c, tree.h: added code to optimize handling of
'decimal constants' in expressions
2016-09-18 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_validate_program_data): moved check for record depending
to (validate_record_depending) and activated storage check - relax-syntax
can be used to compile legacy programs
2016-09-16 Simon Sobisch <simonsobisch@gnu.org>
* tree.c (finalize_file): bug #278 move key field checks
to (validate_key_field) and verify that variable record size
is at least large enough to hold the keys
2016-09-16 Edward Hart <edward.dan.hart@gmail.com>
* typeck.c (cb_build_move_literal): fixed bug #69 by forcing a call to
cob_move when binary-truncate is in effect.
2016-09-15 Edward Hart <edward.dan.hart@gmail.com>
* pplex.l (ppinput): fixed bug #297 where quote marks were parsed in
comment paragraphs.
* error.c, cobc.h: added (cb_plex_verify).
2016-09-12 Edward Hart <edward.dan.hart@gmail.com>
* parser.y (accept_clause): added ACCEPT ... BEFORE TIME extension.
2016-09-11 Simon Sobisch <simonsobisch@gnu.org>
* pplex.l (ppinput): bug #312 don't ignore directives starting with $
at column 7 when in fixed format (if acucomment doesn't apply)
2016-09-11 Edward Hart <edward.dan.hart@gmail.com>
* ppparse.y, cobc.c: simplified implementation of variable format by
treating it as fixed-format with the program-text area ending at
column 250.
2016-09-06 Dave Pitts <dpitts@cozx.com>
* cobc.c: Rearranged pline allocation and added some checks.
Added pline_check_limit() function.
2016-09-06 Dave Pitts <dpitts@cozx.com>
* cobc.c: Changed the pline array to an array of pointers.
The lines are allocated and the allocation limits are checked.
If the the CB_READ_AHEAD is exceeded an abort is issued.
* cobc.h: Increase CB_READ_AHEAD to 800.
2016-09-05 Edward Hart <edward.dan.hart@gmail.com>
* cobc.c, cobc.h: delete references to cobc_init_scanner, which was
deleted in [r1100].
2016-09-04 Edward Hart <edward.dan.hart@gmail.com>
* tree.c, scanner.l: replaced code parsing constant-names in PICTURE
strings with new implementation containing more checks.
2016-09-03 Edward Hart <edward.dan.hart@gmail.com>
* pplex.l, ppparse.y, cobc.c: added support for Micro Focus' variable
format.
* cobc.h: moved CB_FORMAT defines into new cb_format enum.
2016-09-03 Simon Sobisch <simonsobisch@gnu.org>
* tree.c (cb_concat_literals): allow concatenation of national and
Boolean literals
2016-09-02 Simon Sobisch <simonsobisch@gnu.org>
* cobc.h: added CB_UNFINISHED as replacement for CB_PENDING for code that
compiles and "works somehow" (not necessarily according to specs)
* cobc.c, cobc.h, warning.def: CB_ONWARNDEF for warnings that default to on
* cobc.c. cobc.h, warning.def: new warning option "unfinished"
(defaults to on) - don't warn if unfinished features are used
* tree.c, parser.y: marking "USAGE NATIONAL" and
"parameters passed by VALUE" as UNFINISHED instead of PENDING
* parser.y: added more checks and pending messages to CURRENCY SIGN with
and without PICTURE SYMBOL
2016-09-02 Edward Hart <edward.dan.hart@gmail.com>
* codegen.c (codegen, output_entry_function): modularised and shortened
code.
2016-09-01 Edward Hart <edward.dan.hart@gmail.com>
* field.c (validate_field_1), parser.y (sign_clause): fixed bug #305 by
adding checks that elementary item with SIGN has S in PIC and is USAGE
DISPLAY or NATIONAL.
* tree.h (cb_usage): deleted unused CB_USAGE_PROGRAM.
* cobc.c: refactored (set_picture) and improved some function names.
* field.c (validate_field_1): refactored SIGN and BLANK ZERO checks.
* field.c: fixed bug #310 by adding cb_get_usage_string.
2016-08-31 Edward Hart <edward.dan.hart@gmail.com>
* cobc.c (cobc_check_valid_name): refactored to take enum parameters
instead of magic numbers.
* parser.y (print_bits): improved style.
* tree.c (cb_build_picture): added warning message to PIC N.
2016-08-30 Simon Sobisch <simonsobisch@gnu.org>
* scanner.l: added premature implementation of national-literals,
hexadecimal-national-literals, hexadecimal-boolean-literals
* tree.c, tree.h: new function cb_build_national_literal
* tree.c (cb_concat_literals): allow concatenation of national and
boolean literals within the same category
2016-08-28 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c: added hint to change dialect if a known system device
is used which is not reserved in current dialect
2016-08-25 Edward Hart <edward.dan.hart@gmail.com>
* parser.y, scanner.l, tree.h: fixed bug #305, where the
error_stmt_recover token was consumed when it was needed to resume
normal parsing.
2016-08-20 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_interal_function): deactivated storing module call
parameters after module entry
* codegen.c: generating a local cob_call_params and using it for all
parameter checks
* codegen.c (output_entry_function): don't generate a call to
cob_get_global_ptr() without checking that the runtime is initialized
2016-08-20 Edward Hart <edward.dan.hart@gmail.com>
* parser.y (identifier): added check that identifier references a field.
* parser.y: added checks that INSPECT and TRANSFORM have USAGE DISPLAY
operands.
* parser.y, scanner.l: split class-names into separate token from WORD,
as they can only be referenced in class conditions.
* scanner.l: improved style.
* typeck.c: refactored checking of INSPECT/TRANSFORM targets.
2016-08-16 Edward Hart <edward.dan.hart@gmail.com>
* typeck.c (emit_screen_displays): fixed bug introduced in the previous
commit where invalid MOVEs were generated (see discussion [eed1ec4a]).
2016-08-15 Edward Hart <edward.dan.hart@gmail.com>
* parser.y, typeck.c: fixed bug #299 (cannot have multiple screens in
one DISPLAY).
2016-08-13 Frank Swarbrick <infocat@@users.sf.net>
patch #30 adding IBM extension OCCURS ... TO UNBOUNDED
* tree.h: new field flag_unbounded for OCCURS ... TO UNBOUNDED
* cobc.h: added CB_CS_OCCURS
* reserved.c: added UNBOUNDED as context sensitive reserved word for OCCURS
* parser.y: added token UNBOUNDED and first attemt to add
OCCURS ... TO UNBOUNDED in the parser
2016-08-13 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c, reserved.c: temporarily added new command line option
-R, -reserve-all for unsetting specify-all-reserved in compiler conf;
FIXME: should be possible with -fno-specify-all-reserved-words
2016-08-12 Simon Sobisch <simonsobisch@gnu.org>
* reserved.c (is_invalid_word): new function for checking the words,
currently only checks user defined words to be < COB_MAX_WORDLEN
* reserved.c: don't compare/print indicators and alias as part of the words
* config.c (cb_config_entry): reserved words handling - remove whitespace
and translate : to =
* cobc, config.c: set output name for -f<tag>=<value> in cobc.c instead
in multiple functions in config.c and show the complete parameter
2016-08-11 Simon Sobisch <simonsobisch@gnu.org>
* config.def: renamed compiler configuration relaxed-syntax-check to
relax-syntax-checks for supporting the use of the removed command line
flag -frelax-syntax
* general: renamed cb_relaxed_syntax_check to cb_relaxed_syntax_checks
2016-08-10 Simon Sobisch <simonsobisch@gnu.org>
* reserved.c: use printf to do formatting instead of tabs
* cobc.c: added option --brief (-q) to reset -verbose and
remove the path to cobc in argv[0]
* cobc.c, cobc.h: better help for compiler flags
* flag.def, cobc.c, cobc.h: added more parameters in flag.def for better
help output; changed defines for CB_FLAG_RQ and CB_FLAG_NQ
* Makefile.am: add config.def as prerequisite for manpage
2016-08-09 Edward Hart <edward.dan.hart@gmail.com>
* parser.y, typeck.c, codegen.c: added support for program-prototypes in
REPOSITORY and CALL and CANCEL statements.
* tree.h (cb_func_prototype): renamed to cb_prototype.
* condig.def: added program-name-redefinition (thus fixing bug #268) and
program-prototypes.
2016-08-08 Simon Sobisch <simonsobisch@gnu.org>
* error.c, tree.h, typeck.c, parser.y: suppress listing output and
counting of warnings/errors with the new functions
listprint_suppress/listprint_restore
* cobc.c (print_program_trailer): correct grammar for 1 error/warning
2016-08-08 Edward Hart <edward.dan.hart@gmail.com>
* parser.y (x): fixed bug #209, where invalid mnemonic message had line
number of mnemonic entry in SPECIAL-NAMES.
2016-08-05 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: don't stop if preprocessing errors but activate
cb_flag_syntax_only and let the parser do further checks
* cobc.c: initialize errorcount only for each source file instead
of for each processing stage
* pplex.l (ppinput): don't fake EOF on buffer overrun for
continuation lines (still process all following lines)
* cobc.c, pplex.l: only do listing specific parts if vars
cb_src_list_file/cb_current_file are set
* cobc.c: moved code for listing titles to own functions
(set_listing_title_code) and (set_listing_title_symbols)
* cobc.c (terminate_str_at_first_of_char): changed to terminate at
passed char instead of '\n'
2016-08-04 Edward Hart <edward.dan.hart@gmail.com>
* codegen.c (initialize_type): renamed to deduce_initialize_type.
* codegen.c (deduce_initialize_type): fixed bug #287, where reference-
modified group item was not treated as an elementary item.
2016-08-04 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (process_command_line): save conf_ret via |= instead of extra var
2016-08-03 Dave Pitts <dpitts@cozx.com>
* cobc.c: Redo listings when copybooks are missing. Changed replace
string positioning in free format listings.
* cobc.h: Add list file source format field.
* pplex.l, ppparse.y: Record source format in the list file struct.
2016-08-03 Simon Sobisch <simonsobisch@gnu.org>
* scanner.l (read_literal): Fix SIGSEGV for uncommon literals - bug 195
* cobc.c, cobc.h: changes to listfile generation: start use of compiler
configurations (cb_tab_width, cb_text_col)
2016-08-02 Dave Pitts <dpitts@cozx.com>
* cobc.c: Fixes to put file not found into the listing file. Also,
changes to list the "file.i" preprocessed file.
2016-08-02 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (set_picture): fixed SIGSEGV on processing invalid
picture definitions, print "INVALID" as picture instead
* error.c (print_error): fixed SIGSEGVs for empty prefix and
missing source files
* parser.y: bug #259 - better checks for STRING syntax
2016-08-01 Dave Pitts <dpitts@cozx.com>
* cobc.c, error.c, pplex.l: Changes to change fixed sized character
arrays to pointers. Allocate strings based on length.
* cobc.h: Moved structure declatations and added comments.
2016-08-01 Simon Sobisch <simonsobisch@gnu.org>
* error.c, cobc.h (cb_get_strerror): own reentrant version of strerror
* error.c: extracted (configuration_error_head) from (configuration_error)
* error.c: adjusted (cb_perror) to receive a formatted message
* adjusted callers of (cb_perror)
2016-08-01 Edward Hart <edward.dan.hart@gmail.com>
* parser.y (renames_entry): fixed bug #289 where PICTURE of renamed
field was not copied to the RENAMES item.
2016-07-31 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: FR #127 extracted (cobc_abort_msg) from (cobc_abort_terminate)
and using it in (cobc_sig_handler), too
* cobc.c: minimized (cob_reg_sighnd) and register libcob's signal handler
instead of self-registering one
2016-07-31 Edward Hart <edward.dan.hart@gmail.com>
* parser.y (program_type_clause): marked EXTERNAL as pending.
2016-07-30 Edward Hart <edward.dan.hart@gmail.com>
* parser.y (return_at_end): allow NOT AT END before AT END (bugs #242).
2016-07-29 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c, cobc.h, tree.c, typeck.c: removed COBC_DUMP_ABORT as it did not
work as intended (fixing compiler warnings because of return not reached)
* pplex.l, scanner.l: removed standard C headers already included by flex
* error.c: removed inline attribute from (cb_verify), (cb_verify_x) and
removed extra function (cb_verify_common)
2016-07-27 Simon Sobisch <simonsobisch@gnu.org>
* error.c, cobc.h: new function cb_perror for returning system errors
* error.c (print_error): changes for cb_perror
* cobc.c (cobc_terminate), config.c (cb_load_conf_file), pplex.l (ppcopy):
use cb_perror instead of output of a guessed error message
2016-07-27 Edward Hart <edward.dan.hart@gmail.com>
* parser.y, scanner.l: separated 66-, 78- and 88-level handling from
data_description, making it impossible to specify improper clauses.
* field.c: removed code made redundant by the above change.
* field.c, tree.h (cb_validate_renames_item): strengthened 66-level
syntax checks.
* config.def: added renames-uncommon-levels config option (for MF
extension).
* pplex.l: reverted gobbling of redundant periods after COPY/REPLACE
(bugs #283).
2016-07-24 Dave Pitts <dpitts@cozx.com>
* cobc.c: Additional picture information. TYPE field additions/changes.
2016-07-18 Dave Pitts <dpitts@cozx.com>
* cobc.c: Added symbol listing support for LINKAGE and SCREEN sections.
Added function support in print_program_trailer.
* pplex.l, cobc.c, tree.c: Fixed compile warnings.
2016-07-18 Edward Hart <edward.dan.hart@gmail.com>
* parser.y (screen_or_device_display): changed permitted DISPLAY
combinations (to follow Micro Focus). Now screens must have their own,
individual displays and cannot be mixed with the display of
non-screens on CRT. CRT and non-CRT displays can no longer be mixed.
* parser.y, typeck.c: added support for LINE/COLUMN/AT 0 and removed
requirement of LINE/COLUMN clause on CRT displays.
* config.def: added accept-display-extensions to enable/disable
the above and any other non-standard extensions.
* config.def: added console-is-crt to set the default DISPLAY/ACCEPT
device to CRT (for ACUCOBOL).
* parser.y (accept_statement): fixed bug where context-sensitive words
were not detected.
2016-07-17 Brian Tiffin <btiffin@gnu.org>
* codegen.c: when emitting source for a function entry, if cob_call_params
is zero, and cob_module is not set, set cob_call_params to the number of
arguments in GnuCOBOL using_list. Need to document that C can't call a
GnuCOBOL function with zero arguments if GnuCOBOL expects at least one,
even if all are optional from the GnuCOBOL perspective. Except for that
edge case, this fixes bug #208 (and possibly others).
* codegen.c: allow for ENTRY lookup inside main module.
2016-07-15 Edward Hart <edward.dan.hart@gmail.com>
* scanner.l, pplex.l: fixed bug #269. GnuCOBOL now gobbles redundant
periods, instead of releasing them to the parser.
2016-07-15 Brian Tiffin <btiffin@gnu.org>
* codegen.c: correction to exception code tested for ACCEPT ON EXCEPTION
2016-07-10 Edward Hart <edward.dan.hart@gmail.com>
* parser.y, scanner.l, tree.h: fixed bug #270 by only returning
PROGRAM_NAME's from scanner inside the identification division.
2016-07-06 Edward Hart <edward.dan.hart@gmail.com>
* typeck.c: fixed bug #264, where fields of category CB_CATEGORY_UNKNOWN
were rejected in the AT clause despite being numeric (or having only
numeric children).
* typeck.c (valid_screen_pos): removed extension to AT clause where less
than 4 digits was permitted (I'd added this because I thought leading
zeroes were truncated from literals).
2016-06-30 Edward Hart <edward.dan.hart@gmail.com>
* pplex.l (is_condition_directive_clause): fixed bug #263 where >>IF's
where not detected inside false >>IF's.
2016-06-29 Edward Hart <edward.dan.hart@gmail.com>
* cobc.c, cobc.h: Added comments to functions, improved names where possible and
fixed style issues (see below).
* cobc.c (print_replace_main): Made cb_inreplace a static variable
in_replace. Also split code into new functions free_replace_list and
copy_list_replace.
2016-06-28 Dave Pitts <dpitts@cozx.com>
* cobc.c: Fixed mystery edits that broke FILE and FILLER listing.
2016-06-27 Edward Hart <edward.dan.hart@gmail.com>
* field.c (validate_field_1): fixed bug #260, where + or - in PIC was
mistaken for S.
2016-06-26 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (codegen): renamed parameter nested to subsequent_call
removing the confusing title (for nested check nested_level)
2016-06-26 Dave Pitts <dpitts@cozx.com>
* cobc.c, cobc.h, pplex.l, ppparse.y: Added LISTING ON/OFF directive.
2016-06-26 Edward Hart <edward.dan.hart@gmail.com>
* cobc.c: lengthened variable names, fixed style issues (see below, also
replacing while loops with for where appropriate) and simplified and
modularised code.
2016-06-25 Edward Hart <edward.dan.hart@gmail.com>
* pplex.l: fixed bug #248, where any directive was evaluated inside the
false part of a conditional directive. Restricted this to ELSE,
END(-IF), WHEN, etc.
* cobc.c, error.c: fixed style issues: non_snake_case variable names,
non-K&R or missing braces, no space before parentheses or around + or
-, spaces instead of tabs, variable declarations without names
indented and more than one declaration per line.
* cobc.c (print_program_code): fixed corrupt doubled-linked list error
caused when cb_listing_files and cb_current_file pointed to the same
struct and cb_current_file was freed.
* pplex.l: moved COPY-specific code to get_new_listing_file and added
call to it from INCLUDE.
* cobc.h, parser.y, pplex.l, ppparse.y: moved PENDING macro to cobc.h as
CB_PENDING.
2016-06-22 Edward Hart <edward.dan.hart@gmail.com>
* parser.y, error.c: added hints to change dialect if an undefined word
is used which is reserved in another dialect (see Wish List #107).
* parser.y (_identification_header): reinstate ID DIVISION option.
* parser.y (setup_program): fixed bug #255, where function could be
defined within a program.
2016-06-21 Ron Norman <rjn@inglenet.com>
* error.c (print_error): fixed to verify 'file' is NOT NULL before using it
* cobc.c: FR #138 added checks for some env vars which are not allowed to
have PATHSEP_CHAR in them
2016-06-20 Dave Pitts <dpitts@cozx.com>
* cobc.c, cobc.h, error.c, pplex.l, ppparse.y: Added support for compiler
listings.
2016-06-20 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_internal_function): fixing bug #234 segfault by
generating code for setting not passed parameter pointers to NULL as if
they would have been passed as OMITTED, allowing (cob_is_omitted) to work
2016-06-18 Simon Sobisch <simonsobisch@gnu.org>
* ppparse.def: Added compiler constants GNUCOBOL (alias for OPENCOBOL)
and GCCOMP (alias for OCCOMP)
2016-06-15 Brian Tiffin <btiffin@gnu.org>
* cobc.c: Added optional arguments for -j job submits and -job alias
2016-06-14 Edward Hart <edward.dan.hart@gmail.com>
* reserved.c (default_reserved_words): moved uncommon, non-standard
aliases (e.g., AUTOTERMINATE for AUTO) to config files.
* parser.y: renamed TIMEOUT token to TIME-OUT.
2016-06-13 Wim Niemans <niemans@nlbox.com>
* parser.y, reserved.c, typeck.c, tree.h: added ACUCOBOL CGI extension
EXTERNAL-FORM / IDENTIFIED BY as DATA DIVISION clauses processed in
handling of DISPLAY / ACCEPT statements
2016-06-13 Simon Sobisch <simonsobisch@gnu.org>
* pplex.l (ppinput): FR #126 treat invalid indicator (free format) as
line comment instead of aborting compilation
* typeck.c (cb_validate_program_environment): FR #67 output duplicate values
in errornous alphabet-names at correct error position
2016-06-12 Simon Sobisch <simonsobisch@gnu.org>
* general: revised all message strings
* cobc.h: changed PENDING to not use apostrophe
2016-06-12 Edward Hart <edward.dan.hart@gmail.com>
* tree.c (cb_build_picture): fixed bug where PIC SS9 was not detected as
invalid. (See bug #40.) Also improved error messages.
* parser.y (check_preceding_tallying_phrases): fixed bug where
consecutive FOR phrases were allowed.
2016-06-08 Simon Sobisch <simonsobisch@gnu.org>
* general: renamed (cobc_abort_pr) to (cobc_err_msg),
revised message strings for exceptional/fatal errors
2016-06-03 Edward Hart <edward.dan.hart@gmail.com>
* config.def, parser.y: added not-exception-before-exception
configuration option (see bug #242).
* parser.y (program_id_paragraph), tree.c: fixed bug #244 and allow
INITIAL or RECURSIVE before COMMON.
2016-06-02 Edward Hart <edward.dan.hart@gmail.com>
* parser.y (display_atom): fixed bug #243, which was caused by a
begin_implicit_statement causing exceptions to be set to off before
checking which exception handler to go to.
* codegen.c: fixed another cause of bug #243, where only EC-IMP-DISPLAY
(and not EC-SCREEN) triggered the ON EXCEPTION phrase. As part of
this, refactored the handling of exception handlers.
* tree.h (cb_statement): renamed handler1 and handler2 to ex_handler and
not_ex_handler, respectively.
2016-06-01 Edward Hart <edward.dan.hart@gmail.com>
* parser.y: fixed bug #242 and allowed exception handlers to be in any
order.
2016-05-31 Brian Tiffin <btiffin@gnu.org>
* typeck.c: fix bug #235 ADD/SUBTRACT CORRESPONDING only for NUMERIC items.
2016-05-31 Edward Hart <edward.dan.hart@gmail.com>
* parser.y: fixed bug #47 - tightened INSPECT syntax rules.
2016-05-22 Edward Hart <edward.dan.hart@gmail.com>
* tree.c, field.c, codegen.c: replaced PICTURE strings containing packed ints with
array of (cob_pic_symbol) structs which are easier to use.
* codegen.c (codegen): split large chunks of code in separate functions.
2016-05-21 Brian Tiffin <btiffin@gnu.org>
* codegen.c: improving CALL BY VALUE. One step of many, more to do.
2016-05-20 Edward Hart <edward.dan.hart@gmail.com>
* tree.c: fixed bug #232, tightening permitted PICTURE strings and
improving error messages.
* field.c: improved error checking for BLANK WHEN ZERO with invalid
PICs.
2016-05-16 Brian Tiffin <btiffin@gnu.org>
* codeoptim.c: bug #229, missed patching cob_cmp_align_u64.
2016-05-15 Brian Tiffin <btiffin@gnu.org>
* cobc.c: correct process_run return code for systems with WEXITSTATUS
2016-05-05 Simon 'sf-mensch/human' Sobisch <sf-mensch@users.sf.net>
* tree.c: give correct error position (cb_source_file + cb_exp_line)
for expression warnings (did not work with constants before)
2016-05-03 Simon 'sf-mensch/human' Sobisch <sf-mensch@users.sf.net>
* warning.def, tree.c: added cb_warn_constant_expr for warnings added
by Ron Norman on 2016-05-01
* tree.c: resolve the value at compile time if literal size differs
and checks are for = or !=
2016-05-01 Ron Norman <rjn@inglenet.com>
* tree.c: for binary (arithmetic & relational) operations between integer constants
resolve the value at compile time and reduce the expression down to the
computed value
* tree.c Also, added checks to validate resolving contant expressions
2016-04-24 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: implement STOP RUN integer/identifier (RM/COBOL extension)
* parser.y, pparse.y: remove printf non literal spec warning.
2016-04-24 Edward Hart <edward.dan.hart@gmail.com>
* parser.y, tree.c: fixed bug #231: tightened handling of alphabet-names
and recording-modes. Also added FOR clause syntax to CODE-SET clause.
2016-04-23 Brian Tiffin <btiffin@gnu.org>
* typeck.c: 64bit signed constant did not allow max negative.
2016-04-23 Brian Tiffin <btiffin@gnu.org>
* typeck.c: 64bit unsigned treated as signed when long int
same size as long long.
* tree.h: realign some tabs.
* codegen.c, error.c, pplex.l, scanner.l, tree.c, typeck.c: remove printf
non literal spec warning.
2016-04-23 Brian Tiffin <btiffin@gnu.org>
* codeoptim.c: Bug #229: binary-double unsigned compares failed when high
bit set.
2016-04-22 Ron Norman <rjn@inglenet.com>
* parser.y, scanner.l, reserved.c, codegen.c: support features of an
IBM REPORT WRITER - LINE LIMIT, PRESENT AFTER & ABSENT AFTER
2016-04-17 Edward Hart <edward.dan.hart@gmail.com>
* parser.y (screen_description): fixed bug #227: code now handles case
where no screen precedes a 78-level item.
* parser.y (undefined_word): Added error case to improve error handling.
This required a slight change to file_control_entry.
2016-04-15 Edward Hart <edward.dan.hart@gmail.com>
* parser.y: fixed bug #224: disallow configuration section elements in
any order.
* scanner.l, parser.y: moved handling of IDENTIFICATION DIVISION header
to parser.y.
* parser.y: disallow functions without END FUNCTION.
* parser.y: allow nested programs to omit END PROGRAM, per standard.
* parser.y: emit error if nested programs are defined in a program
without a PROCEDURE DIVISION header.
* parser.y: refactored grammar of source_element and program_body.
* parser.y: renamed all optional tokens to be begin with underscore for
consistency.
2016-03-29 Edward Hart <edward.dan.hart@gmail.com>
* codegen.c (find_func_ext_name): moved missing prototype/function check
to tree.c, to be done when REPOSITORY entry is given.
* tree.h (cb_func_prototype): removed now redundant check_needed flag.
* warning.def: added prototype warning flag for above.
* parser.y, tree.h, typeck.c: added SET LAST EXCEPTION TO OFF.
2016-03-27 Edward Hart <edward.dan.hart@gmail.com>
* codegen.c (find_func_ext_name), tree.h: corrected AS clause of
REPOSITORY FUNCTION phrase: actually gives function (prototype)
external name, not actual function-(prototype-)name. This fixed bug
#124.
* parser.y: allow redundant FUNCTION clauses.
* tree.c (cb_build_func_prototype): set check_needed to 0 when ext_name
is given.
2016-03-26 Edward Hart <edward.dan.hart@gmail.com>
* codegen.c (find_func_ext_name), tree.h: created to find external name
of functions from a given prototype. Also created struct
(cb_func_prototype).
* tree.c (cb_build_repo_func_prototype): dropped repo_ from name.
* parser.y, tree.c (cb_build_func_prototype): made FUNCTION-ID
generate implicit REPOSITORY entry to permit recursion.
* scanner.l: moved code for finding program based on program-name to
separate function (cb_find_defined_program).
* typeck.c: stopped function-names being converted to upper-case.
2016-03-25 Edward Hart <edward.dan.hart@gmail.com>
* parser.y, scanner.l, tree.c, tree.h, typeck.c: added checks for
redefinition of program and function-prototype names. (See bugs #212
and #205).
* parser.y: moved duplicated PROGRAM/FUNCTION-ID and END PROGRAM/
FUNCTION code into functions.
2016-03-23 Edward Hart <edward.dan.hart@gmail.com>
* parser.y: added check that BY VALUE formal parameters are not ANY
LENGTH (see bug #219).
2016-03-19 Brian Tiffin <btiffin@gnu.org>
* codegen.c, reserved.c, parser.y, tree.h: Allow for
PROCEDURE DIVISION RETURNING OMITTED and CALL ... RETURNING NOTHING
2016-03-18 Edward Hart <edward.dan.hart@gmail.com>
* reserved.c, config.c, cobc.h: added ability to specify aliases for
default reserved words (Wish List #112).
2016-03-09 Edward Hart <edward.dan.hart@gmail.com>
* reserved.c, cobc.h: enhanced reserved conf. option to allow
specification of context-sensitive words.
2016-03-05 Edward Hart <edward.dan.hart@gmail.com>
* parser.y: disabled formal BY VALUE parameters, pending fix of bug
#109.
2016-02-29 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (process_command_line): Fix missing memory release for cobc -V,
let --list-reserved work together with other --list-options again
2016-02-28 Edward Hart <edward.dan.hart@gmail.com>
* config.def, config.c, reserved.c: added reserved and specify-all-
reserved options to let configs specify all the reserved words. Also
removed now redundant cobol85-reserved option.
* reserved.c (default_reserved_word_list): removed unimplemented
COBOL-85 words.
* reserved.c (cob_strcasecmp): removed assumption that second arg was
all caps.
* cobc.c (process_command_line): moved cb_list_reserved call to after
the configuration has loaded.
* cobc.h (noreserve): renamed to reserved_word_list.
* tree.h (cobc_reserved): removed const qualifiers from members.
2016-02-23 Simon Sobisch <simonsobisch@gnu.org>
* scanner.l, typeck.c (cb_check_word_length), tree.h: moved word length
check out of scanner.l to also check numeric-only words that bypass
the checks in scanner.l
2016-02-21 Simon Sobisch <simonsobisch@gnu.org>
* scanner.l (read_literal): Fix wrong error about max-literal length
when the last position is an escaped literal mark
2016-02-20 Edward Hart <edward.dan.hart@gmail.com>
* parser.y (procedure_returning): fixed bug #203: emit error if function
returning item has ANY LENGTH clause.
2016-02-17 Edward Hart <edward.dan.hart@gmail.com>
* parser.y (display_atom): prepare for DISPLAY OMITTED.
* typeck.c (cb_emit_display): refactored.
* typeck.c: added non-functional version of (cb_emit_display_omitted).
2016-02-17 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_expr_finish): tweak line number to match the error
2016-02-16 Edward Hart <edward.dan.hart@gmail.com>
* parser.y: fixed bug #201 - where a specified UPON device was replaced
with the default.
2016-02-13 Edward Hart <edward.dan.hart@gmail.com>
* parser.y: permit DISPLAY and ACCEPT clauses in any order.
* parser.y: add optional WITH before every disp/accp_attr and optional
AT before each LINE/COL clause.
* parser.y: allow the screen and device formats of the DISPLAY statement
to be mixed in one statement.
2016-02-02 Simon Sobisch <simonsobisch@gnu.org>
* scanner.l (read_literal): Fix multiple heap corruptions
for uncommon literals - bug 195
2016-01-31 Simon Sobisch <simonsobisch@gnu.org>
* config.c (cb_config_entry): remove CR/LF for error "invalid conf. tag"
2016-01-30 Simon Sobisch <simonsobisch@gnu.org>
* general: fixing all warnings generated by msc code analysis
(possible memory related issues)
* cobc.c (process_filename): don't check object files for valid COBOL
file names
* cobc.c (process_library) [_MSC_VER]: check all input filenames
preventing deletion of passed lib file
* cobc.c (process_filtered) [_MSC_VER]: fix deletion of passed obj file,
only filter for file basename (not including directory)
* cobc.c (line_contains) [_MSC_VER]: only return if all patterns matched
* Makefile.am: included a move for manual post-fix of sources generated
by flex (otherwise the #line directives use the intermediate tmp file)
2016-01-22 Edward Hart <edward.dan.hart@gmail.com>
* parser.y: refactored handling of conflicting screen clauses.
2016-01-20 Edward Hart <edward.dan.hart@gmail.com>
* parser.y: fixed bug #190 - added check that ERASE EOL and EOS are not
specified at the same time.
* parser.y: added [END OF] LINE/SCREEN as synonym for EOL/EOS.
* parser.y: fixed bug #191 - added check that BLANK LINE and SCREEN are
not specified at the same time.
2016-01-17 Edward Hart <edward.dan.hart@gmail.com>
* parser.y (screen_description): fixed bug #186 - only the clauses
in the current screen item are checked for duplication.
* scanner.l (scan_*): suppressed compiler warnings by casting size_t to
int in printf calls.
2016-01-10 Edward Hart <edward.dan.hart@gmail.com>
* parser.y: fixed bug #182 - ON/OFF in SWITCH clause causing incorrect
duplicate CURRENCY clause error.
* parser.y (check_repeated): merged check_*_repeated functions into one
function.
2016-01-09 Simon Sobisch <simonsobisch@gnu.org>
* scanner.l, tree.c: postponed numerical literal checks for possible labels
from scanner.l to tree.c (check_lit_length, error_numeric_literal)
2016-01-08 Edward Hart <edward.dan.hart@gmail.com>
* pplex.l, config.def: reverted [r605]. Marked continuation of COBOL
words as archaic in standard-conforming implementations.
2016-01-04 Edward Hart <edward.dan.hart@gmail.com>
* parser.y: fixed bug #180 - added check that HIGHLIGHT and LOWLIGHT are
not specified at the same time.
* codegen.c (output_set_attribute): made HIGHLIGHT ON imply LOWLIGHT off
and vice versa.
2016-01-03 Edward Hart <edward.dan.hart@gmail.com>
* parser.y: fixed bug #178 - added check that certain identifiers are
not 88-level items.
2016-01-02 Ron Norman
* codegen.c (output_index): If subscript is unsigned then output the
code as if it was signed. This is to avoid a core dump when an
unsigned binary subscript has a value of ZERO.
2016-01-01 Simon Sobisch <simonsobisch@gnu.org>
* scanner.l: moved SET_LOCALATION to tree.c (cb_build_xyz)
* tree.c (cb_concat_literals): the new literal inherits its position from
the first literal, check for cb_literal_length
ODO checks:
* parser.y (integer): return numeric literal -1 instead of cb_int1
for incorrect numerical literals
* parser.y: add check OCCURS max. must be greater than OCCURS min.
NESTED OCCURS with DEPENDING - feature-requests:#99:
* tree.h: remove flag_odo_item, add odo_level instead
* typeck.c: compute odo_level in (cb_validate_program_data),
add check for nested ODO to (cb_validate_one)
2015-12-31 Edward Hart <edward.dan.hart@gmail.com>
* reserved.c (reserved_words), parser.y: corrected GRID implementation;
is different to LEFTLINE.
2015-12-30 Edward Hart <edward.dan.hart@gmail.com>
* codegen.c, codeoptim.c: Changed code to generate cob_screen as a
doubly linked list.
* reserved.c (reserved_words): added GRID as synonym for LEFTLINE.
2015-12-30 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c, config.c: changes for replacing -cb_conf=<tag>:<value> with
additional flags -f<tag>=<value> including -f[no-]<tag> for binary confs
* config.def, cobc.c, cobc.h, config.c: added additional parameter in
config.def for help output; changed defines for CB_CONFIG_*
2015-12-28 Simon Sobisch <simonsobisch@gnu.org>
part fixed bug #177 - added missing ODO checks for subordinate items
* tree.h: renamed flag_odo_item to flag_odo_relative, add new flag_odo_item
* typeck.c, codegen.c: adjustments for changes to tree.h
* typeck.c (cb_validate_program_data): set flag_odo_item for ODO parents
* typeck.c (cb_build_identifier): generate cob_check_odo for all sub-items
of items with flag_odo_item (instead of only for ODO fields of itself)
2015-12-27 Simon Sobisch <simonsobisch@gnu.org>
* config.c (invalid_value): added output for not-numeric, min, max
* config.c (cb_config_entry): validate word length against COB_MAX_WORDLEN
* cobc.c (process_command_line): moved check of configuration values for
tab-width and text-columns to config.c (cb_config_entry)
* cobc.c (process_command_line): process the command line twice: first time
for handling all options that read a complete configuration or are
output-only options, the second time for every other option including
overriding of single configuration flags
* error.c, cobc.h: new (configuration_warning)
* config.c (cb_load_conf): issue a warning if a previous loaded configuration
is discarded
2015-12-25 Simon Sobisch <simonsobisch@gnu.org>
first implementation of feature-requests:#99 - NESTED OCCURS with DEPENDING
* field.c (validate_field_1): allow nested ODO with complex-odo = yes
* codegen.c (output_data): recalculate size for nested ODO by -fodoslide
2015-12-24 Edward Hart <edward.dan.hart@gmail.com>
* parser.y: added checks of number of args passed to
FORMATTED-(DATE)TIME.
* parser.y, reserved.c: added SYSTEM-OFFSET to FORMATTED-(DATE)TIME.
* parser.y: removed PENDING from FULL and REQUIRED clauses.
* tree.c: added (warn_cannot_get_utc).
2015-12-22 Simon Sobisch <simonsobisch@gnu.org>
* Makefile.am: post-process generated flex sources via sed for non-GNU
compilers that define __STDC_VERSION__ >= 199901L but don't work correct
2015-12-20 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: exit on -V for GNU-coding-conformance, added -vv (very verbose)
resulting in a call to cobc_print_version() after command line parsing,
removed -R as we have a short version for --debug in -d already
* cobc.h: added CB_STD_ACU and CB_STD_2014
2015-12-19 Simon Sobisch <simonsobisch@gnu.org>
* tree.h: change order of fields in cb_intrinsic_table
* tree.c (cb_build_intrinsic): better check of min/max arguments
* reserved.c: set correct min/max values in function_list,
(cb_list_intrinsics): output min/max value
2015-12-18 Simon Sobisch <simonsobisch@gnu.org>
* config.def: new configuration "call-overflow"
* parser.y: split exception_or_overflow to value cb_call_overflow
2015-12-15 Brian Tiffin <btiffin@gnu.org>
* cobc.c (cobc_print_usage, process_command_line): command line option -a
replaced with -R, as animator will eventually get -a.
2015-12-05 Edward Hart <edward.dan.hart@gmail.com>
* tree.c (offset_time_format, offset_arg_param_num): deleted functions
as offset parameter for the formatted datetime functions is optional.
2015-12-03 Edward Hart <edward.dan.hart@gmail.com>
* tree.c (offset_time_format): fixed bug #169 - require datetime
functions with Z format to take an offset parameter.
2015-11-25 Sergey Kashyrin <ska@kiska.net>
* codegen.c (output_integer): cast program-pointer to unsigned char *,
not to void *
2015-11-23 Simon Sobisch <simonsobisch@gnu.org>
* tree.c (cb_get_int): Fix for Bug #167 - activated size check and set
limit depending on INT_MAX
* tree.c (cb_get_int, cb_get_long_long, cb_get_u_long_long): don't call
COBC_ABORT if numeric literals are too big but raise a normal compiler
error showing the actual (system specific) limit
2015-11-11 Simon Sobisch <simonsobisch@gnu.org>
Fix for Bug #165:
* pplex.l (ppopen): activated check for BOM independent of WIN32, skipped
it on compilations from stdin
* cobc.c [_MSC_VER]: build and pass exename to cl.exe and mt.exe
Fix for Bug #166:
* cobc.c [_MSC_VER]: split (process) to (process_filtered) for filtering
cl.exe's verbose output - now filtering *all* lines instead of first three
* cobc.c [_MSC_VER]: rewritten (line_contains) for matching "special" names
2015-11-06 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c (process) [_MSC_VER]: bugfix in output filter
* cobc.c (process_run): enable -j to work on systems that need ".\", too
2015-10-28 Simon Sobisch <simonsobisch@gnu.org>
* scanner.l: maximum word-length always resulted in error if -W[all]
was set, now only raise an error if -frelax-syntax is not set and
raise a warning if both -frelax-syntax and -W[all] are active
* tree.h: new field flag flag_is_pdiv_opt
* parser.y: set f->flag_is_pdiv_opt for vars in USING with OPTIONAL clause
* typeck.c (cb_build_identifier): add check for access of OPTIONAL LINKAGE
items if COB_EC_PROGRAM_ARG_OMITTED is active
* typeck.c (cb_build_identifier): build and use full name (including the
actual used var, not only the name of the parent) for runtime checks of
BASED items and OPTIONAL LINKAGE items
2015-10-27 Simon Sobisch <simonsobisch@gnu.org>
* error.c: warning/error output for compiler support options
2015-10-25 Simon Sobisch <simonsobisch@gnu.org>
* config.c: tweaked error messages, added possible values if invalid
* config.c (cb_load_conf_file): if include file is not found prefix it
with path of current loaded configuration file
2015-10-18 Edward Hart <edward.dan.hart@gmail.com>
* parser.y, scanner.l: added support for MF's/ACUCOBOL's ON ESCAPE
phrase for ACCEPT.
2015-10-25 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, reserved.c: added RM/ACU extension ASSIGN TO PRINT/PRINTER-1,
both with and without assign names
2015-09-24 Edward Hart <edward.dan.hart@gmail.com>
* scanner.l: added non-standard numeric literals: MF's numeric
boolean and ACUCOBOL's B#, O#, X# and H# literals.
* tree.c: improved error messages and refactored (cb_concat_literals).
2015-09-21 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c [_MSC_VER]: make sure that only temporary lib-files are removed
2015-09-15 Brian Tiffin <btiffin@gnu.org>
* cobc.h, moved COB_DASH defines out of ../configure.ac
2015-08-25 Edward Hart <edward.dan.hart@gmail.com>
* parser.y: tightened AT clause definition.
* typeck.c (valid_screen_pos): improved error message and refactored.
2015-08-23 Edward Hart <edward.dan.hart@gmail.com>
* parser.y: improved error messages of integer and report_integer.
2015-08-21 Edward Hart <edward.dan.hart@gmail.com>
* parser.y: removed PENDING from LOWLIGHT clause.
2015-08-20 Edward Hart <edward.dan.hart@gmail.com>
* typeck.c: adding check for ACCEPT/DISPLAY statements taking
the cursor position as a single field so that the position is an
integer with 6 digits or less than 4 digits.
* parser.y: improved error messages of integer and report_integer.
2015-08-19 Ron Norman <rjn@inglenet.com>
* cobc.c: swapped order of parameters for C compiler and linking so that
-L options come before -l
Otherwise the linker does not find things correctly on Linux
* field.c (validate_field_1): warning instead of an error for VALUEs in
REDEFINES with -frelax-syntax as some legacy COBOL code does this
2015-08-03 Brian Tiffin <btiffin@gnu.org>
* cobc.h, cobc.c, pplex.l: allow compiles from stdin
* cobc.c: add -j after build run
added short aliases for -free (-F) and -debug (-a)
2015-07-07 Ron Norman <rjn@inglenet.com>
* parser.y, typeck.c, reserved.c, tree.h:
Added CB_DEVICE_PRINTER with a new value to differentiate between
PRINTER and SYSOUT. DISPLAY ... UPON PRINTER can be redirected via
the env var COBPRINTER similar to what Micro Focus supports
2015-07-06 Simon Sobisch <simonsobisch@gnu.org>
* scanner.l: Improved parsing of all literals including error messages,
fixing bug ".e000-expand-macro-calls." being misinterpreted as (wrong)
floating-point literal
compiler configuration, including feature-request #43:
* config.def: new configurations "literal-length" and
"numeric-literal-length"
* typeck.c (non_integer_move): don't value suppress_warn more than
cb_move_noninteger_to_alphanumeric
* scanner.l: value cb_numeric_literal_length and cb_literal_length
2015-07-05 Edward Hart <edward.dan.hart@gmail.com>
* typeck.c: added TALLY special register (Wish List #34).
* scanner.l: Improved error detection of invalid floating-point literals
and associated error messages. Also minor refactoring.
2015-07-03 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c (output_size): Fix Bug #146 reference modification
ignored ODO size
2015-06-12 Edward Hart <edward.dan.hart@gmail.com>
* codegen.c: bug #78 - changed location of initialization of
local-storage items.
* pplex.l: bug #102 - added check for continuation line without literal
or word to continue.
2015-06-09 Edward Hart <edward.dan.hart@gmail.com>
* parser.y: bug #83 - added check for relative LINE/COLUMN clauses in
screen section occurs items.
2015-06-08 Luke Smith <cobcoder@users.sourceforge.net>
FR #37 - Added WITH SIZE to ACCEPT/DISPLAY field
* parser.y (accp_attr): added [PROTECTED] SIZE clause
* parser.y (disp_attr): added SIZE clause
* reserved.c: added context-sensitive PROTECTED
* tree.c, tree.h (cb_build_funcall): additional parameter,
new macro CB_BUILD_FUNCALL_10
* typeck.c (cb_emit_accept, cb_emit_display): cater for new size attribute
2015-05-29 Ron Norman <rjn@inglenet.com>
* parser.y fixed so UNSTRING works with identifier/literal/function
2015-05-16 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: bug #136 added check for duplicate on/off clauses for switches
* reserved.c, tree.h: fr #65 added more switches "SWITCH-16" to "SWITCH-36"
* parser.y, reserved.c, scanner.l: fr #65 better support for ACUCOBOL
extension "SWITCH 1" to "SWITCH 26", added alias SWITCH [A-Z],
allow this extension only with -fsyntax-extension
2015-05-12 Simon Sobisch <simonsobisch@gnu.org>
* config.c: new options "includeif" to include only if file exists
(implemented according to runtime configuration by Ron Norman)
2015-05-07 Simon Sobisch <simonsobisch@gnu.org>
* parser.y, typeck.c, cobc.h: bug #135 - give correct error position
(cb_source_file + new cb_exp_line) for expression errors
2015-04-27 Ron Norman <rjn@inglenet.com>
* config.c: don't store configuration values additional to the setting
2015-04-14 Ron Norman <rjn@inglenet.com>
* cobc.c codegen.c common.h tree.h parser.y typeck.c:
updated to include support REPORT COLUMN LEFT/RIGHT/CENTER
Also REPORT: PLUS, STEP on OCCURS and multi COLUMN numbers
NOTE (Simon): -fibmcomp is deactivated for now
* cobc.c, flag.def: added -fibmcomp: Handle COMP fields like MF IBMCOMP
(binary-size: 1--8 & synchronized-clause: ignore)
2015-04-28 Ron Norman <rjn@inglenet.com>
* codegen.c now emits extern <function prototype> ();
for each subroutine called statically to avoid
C compiler warnings
2015-04-25 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (cb_emit_initialize): bug #84 check target for INITIALIZE,
almost fixed as suggested by Edward Hard
2015-04-14 Ron Norman <rjn@inglenet.com>
* codegen.c: for RELATIVE files ACCESS SEQUENTIAL if no KEY is
defined then an internal one is created. This was required as
parts of fileio.c expect there to be a key field for RELATIVE
files to hold the record number being processed.
* cobc.c, cobc.h, flag.def: new option -fcallfh (alias CIT compatibility:
-use-extfh) with option function-name to include support for Micro Focus
style EXTFH interface, see NEWS
* tree.c, tree.h (struct cb_file): added extfh parameter
* typeck.c: generate call to EXTFH depending on cb_file->extfh
2015-04-12 Simon Sobisch <simonsobisch@gnu.org>
* config.c: load configuration file from COB_CONFIG_DIR if file cannot be
accessed in current directory, only check for missing definitions if
configuration file loaded without errors
2015-04-02 Edward Hart <edward.dan.hart@gmail.com>
* reserved.c: set FORMATTED-CURRENT-DATE, INTEGER-OF-FORMATTED-DATE, and
TEST-FORMATTED-DATETIME and INTEGER-OF-FORMATTED-DATE to implemented
2015-04-02 Edward Hart <edward.dan.hart@gmail.com>
* cobc.c: replaced "MSC_VER >= 1400" with COB_USE_VC2005_OR_GREATER
2015-04-01 Simon Sobisch <simonsobisch@gnu.org>
* reserved.c, parser.y : added column orientation as pending
* reserved.c : marked SYNCHRONIZED RIGHT as pending as generation was LEFT
2015-03-10 Simon Sobisch <simonsobisch@gnu.org>
* config.c: support for multiple inclusion of conf files while
checking for recursion
2015-03-09 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c: added more checks of overlapping MOVE,
generate MOVEs as overlapping if it's not sure it isn't
2015-03-05 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c: added check of recursive CALL for INITIAL programs
2015-02-23 Ron Norman <rjn@inglenet.com>
* tree.c, tree.h, typeck.c: moved cb_field_size to tree.c
* codegen.c, parser.y, tree.c, tree.h, typeck.c: FR #23 + FR #281
Implemented support for sparse and split keys for INDEXED files
Most of the compiler code was borrowed from the fileio-rewrite
2015-02-13 Ron Norman <rjn@inglenet.com>
* tree.c: fix to only adjust up file record_max for REPORT files
2015-02-12 Ron Norman <rjn@inglenet.com>
* Merged Report Writer code into 2.0 code base to create a new 2.0
with all collective features
2015-01-31 Edward Hart <edward.dan.hart@gmail.com>
* tree.c: updated valid_time_format and valid_datetime_format to pass
decimal points
2015-01-16 Edward Hart <edward.dan.hart@gmail.com>
* reserved.c: set TEST-FORMATTED-DATETIME and INTEGER-OF-FORMATTED-DATE
to implemented
2015-01-06 Brian Tiffin <btiffin@users.sf.net>
* parser.y: fixed segfault with STOP "literal" with the ACCEPT OMITTED
feature attempting to generate code with null pointer
2014-12-11 Ron Norman <rjn@inglenet.com>
* Fixes so WARNING is given if no DETAIL lines in a report
2014-06-16 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: fixing Bug #79 by defining PLUS_KEYWORD: PLUS|+
2014-06-14 Ron Norman <rjn@inglenet.com>
* Fixes for LINE|COL 0 to get error message
2014-12-02 Sergey Kashyrin <ska@kiska.net>
* codegen.c: fix for bug #52 incorrect premature memory release (CANCEL)
of INITIAL programs
2014-12-01 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: fix bug #108 figurative constants not accepted in screen items
2014-11-18 Sergey Kashyrin <ska@kiska.net>
* field.c: fix bug #89 incorrect LENGTH OF redefined
2014-11-06 Simon Sobisch <simonsobisch@gnu.org>
* typeck.c (decimal_expand): fix bug #106 allocating cob_decimal too often
2014-10-29 Simon Sobisch <simonsobisch@gnu.org>
* config.c (cb_config_entry): remove inline comments from entry
* config.def, scanner.l: check maximum word length depending on new
configuration word-length
* cobc.c: added std=acu
2014-10-17 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: added SUPPRESS clause as PENDING, see request #23
2014-09-18 Simon Sobisch <simonsobisch@gnu.org>
* pplex.l: bug #96 prevent line overflow, add warning "Source text too long"
* pplex.l: only show warning "Source text after column ..." if no comment was
started in this line before
2014-09-17 Edward Hart <edward.dan.hart@gmail.com>
* reserved.c: Set FORMATTED-DATE/DATETIME/TIME functions to implemented
* reserved.c, parser.y: replaced FORMATTED_CURRENT_FUNC with FUNCTION_NAME
* tree.c: added compile time checking of date/time formats and offset
time presence.
2014-09-12 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c [_MSC_VER]: correct handling of -l (add .lib and pass to linker)
* cobc.c, cobc.h, error.c: message style change according to C compiler,
can be changed via COB_MSG_FORMAT (GCC/MSC)
* cobc.c (process) [_MSC_VER]: bugfix in output filter
* parser.y, reserved.c, typeck.c: Added parser support for OCCURS DYNAMIC
along with CAPACITY clause as not implemented
2014-09-08 Philipp B hme <phi.boehme@googlemail.com>
* cobc.c (process) [_MSC_VER]: bugfix in output filter
2014-09-03 Philipp B hme <phi.boehme@googlemail.com>
* cobc.c, cobc.h: added cobc_free() function
(Own freeing functions for debugging purposes.
(e.g. to locate heap crashes caused by malloc/free))
* change all free() to cobc_free()
* cobc.c (process) [_MSC_VER]: cob_malloc() to cobc_malloc()
* cobc.c: use COB_PIC_FLAGS for CB_LEVEL_ASSEMBLE
2014-08-25 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: never warn ENTRY as unreachable
2014-08-25 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: Changed output of --help for help2man
* Makefile.am: Added manpage generation + install
2014-07-31 Simon Sobisch <simonsobisch@gnu.org>
* pplex.l, flag.def: new flag acucomment:
'$' in indicator area treated as '*', '|' treated as floating comment
2014-07-29 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c, config.c: new option -cb_conf for overriding configuration
options
* config.c, cobc.c, error.c (configuration_error): new function for errors
concerning configuration options --conf / --cb_conf /
configuration parsing, complete rewrite of configuration error messages
* parser.y : Added WITH DEFAULT as alias for WITH UPDATE
* config.def, parser.y : new configuration option accept-update
for setting WITH UPDATE/DEFAULT clause as standard, adding new extension
WITH NO UPDATE/DEFAULT to disable this behaviour explicit
* config.def, parser.y : new configuration option accept-auto
for setting WITH AUTO clause as standard, adding new extension
WITH TAB to disable this behaviour explicit
2014-07-28 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: fix #88 false unreachable warning after END DECLARATIVES
without main section/paragraph
2014-07-18 Edward Hart <edward.dan.hart@gmail.com>
* pplex.l: fixed bug #86 whitespace handling for IDENTIFICATION DIVISION
and DEBUGGING MODE
2014-07-10 Philipp B hme <phi.boehme@googlemail.com>
* typeck.c (cb_emit_sort_init): calculation of table key offset fixed
2014-07-02 Philipp B hme <phi.boehme@googlemail.com>
* cobc.c [_MSC_VER]: filter output of cl.exe (instead of redirecting to
NUL), errors are printed in non-verbose mode now; new: (read_buffer_line)
(line_contains)
* cobc.c [_MSC_VER]: remove temporary object files after building
2014-06-30 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: move cobc's (cobc_temp_name) to libcob as (cob_temp_name)
* cobc.c: use (cob_sys_getpid) everywhere instead of (getpid)
2014-06-29 Simon Sobisch <simonsobisch@gnu.org>
* tree.c: Detect missing ASSIGN at compile time
2014-06-19 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: Fixing compilers (like MSC) that don't HAVE_DESIGNATED_INITS
cobc_init_reserved() has to be called before process_command_line()
2014-05-20 Simon Sobisch <simonsobisch@gnu.org>
* scanner.l: Fixing #71 Referencing GLOBAL 78/CONSTANT in SELECT
causes internal error
2014-05-26 Ron Norman <rjn@inglenet.com>
* typeck.c: use memmove for move of LINKAGE items
2014-05-26 Simon Sobisch <simonsobisch@gnu.org>
* scanner.l : Fixing #71 Referencing GLOBAL 78/CONSTANT in SELECT causes
internal error
2014-05-20 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: Added extension "USE AT PROGRAM START/END" as not implemented
2014-05-14 Philipp B hme <phi.boehme@googlemail.com>
* cobc.c: Catch and treat error when no disc space is available for
output files
2014-05-07 Ron Norman <rjn@inglenet.com>
* typeck.c: use memmove for move of LINKAGE items
2014-04-30 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: Added extension "GOBACK/EXIT PROGRAM RETURNING/GIVING x"
2014-04-29 Philipp B hme <phi.boehme@googlemail.com>
* codeoptim.c: Fixed bug in COB_ADD_PACKED_INT.
Computing COMP-3 failed in MSVC-build versions,
in output_storage() calls '%' should be '%%'.
2014-03-10 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: support for user-defined LOCALEDIR via environment
2014-03-07 Simon Sobisch <simonsobisch@gnu.org>
* field.c: Added check for maximum size of group/alphanumeric items
2014-02-17 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: Tweaked --info for showing current settings (environment) along
with settings hard-wired during build (COB_xyz)
2014-01-07 Simon Sobisch <simonsobisch@gnu.org>
* parser.y: Bugfix: no exception check for NULL address on FREE statement
(as this is explicit allowed)
2014-01-02 Simon Sobisch <simonsobisch@gnu.org>
* codegen.c: Fixing Bug #55 UDF with no parameters does not compile
2013-11-20 Ron Norman <rjn@inglenet.com>
* Report Writer module
2012-05-09 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c: Added conversion for enabling options in WIN style
201?-??-?? ??
* parser.y: Added checks for RETURNING item: OCCURS, LOCAL-STORAGE
2010-06-28 Roger While <simrw@sim-basis.de>
* MARK - Version 2.0
* Move to GPL/LGPL 3
2010-0?-?? Roger While <simrw@sim-basis.de> ?
* flag.def, cobc.h, parser.y, scanner.l, tree.c: removed -ffunctions-all
* flag.def, cobc.h, scanner.l: added -fintrinsics=<val>, with
<val>being [ALL|intrinsic function name(,name,...) to prevent reuse of
user-defined names and to mimic CONFIGURATION SECTION. REPOSITORY.
2010-05-?? Roger While <simrw@sim-basis.de> ?
* flag.def, cobc.c: remove compiler flags if-cutoff, extra-brace,
optional-file
* error.c: remove special warnings for lvl-78
* pplex.l [_WIN32]: check for UTF-8 BOM in source files and skip it
201?-??-?? Roger While <simrw@sim-basis.de>
* cobc.c, cobc.h, pplex.l (ppopen): removed -MT and -MF options
2009-??-?? Roger While <simrw@sim-basis.de>
* parser.y, reserved.c, tree.c, tree.h, codegen.c: full support of ANSI 85
debugging module by adding USE FOR DEBUGGING declarative procedures
(only part of the generation if WITH DEBUGGING MODE is active during
compilation) and special register DEBUG-ITEM
note: the execution at runtime is depending on COB_SET_DEBUG
2009-??-?? Roger While <simrw@sim-basis.de>
* cobc.c, cobc.h, codegen.c, tree.h, typeck.c: Adding new commands to cobc
--info with most important configuration/environment details
--list-system for displaying all registered system routines
2009-??-?? Roger While <simrw@sim-basis.de>
* parser.y, typeck.c (cb_emit_accept_escape_key): Implementing
ACCEPT .. FROM ESCAPE KEY
20??-??-?? Simon Sobisch <simonsobisch@gnu.org>
* codegen.c : Simplify by handling stuff for different compilers
by general define (COB_ALIGN)
20??-??-?? Roger While <simrw@sim-basis.de>
* cobc.c, cobc.h, tree.h: Simplify by handling stuff for
different compilers by general defines (CB_COPT_x, COB_A_...),
added parsing step and source name to verbose messages,
added some comments
20??-??-?? Simon Sobisch <simonsobisch@gnu.org>
* cobc.c, cobc.h, tree.c, typeck.c : adjustments for MSC,
fix some compiler warnings, support possible spaces in different
path names, enable linking of already assembled modules for
different UNIXes
2009-12-25 Roger While <simrw@sim-basis.de>
* typeck.c : Added validate_inspect for check of operands in
INSPECT REPLACING/CONVERTING
2009-10-29 Simon Sobisch <simonsobisch@gnu.org>
* cobc.c : Warn if -Debug is used (because likely -debug was intended)
2009-10-08 Simon Sobisch <simonsobisch@gnu.org>
* error.c, field.c, typeck.c : Fix field names "WORK$"->"FILLER"
in warning/error messages
2009-08-18 Roger While <simrw@sim-basis.de>
* codegen.c : initialize_type corrected to handle occurs at 01 level,
output_initialize_compound corrected, output_perform_exit - OSVS corrected
2009-??-?? Roger While <simrw@sim-basis.de>
* typeck.c : fix move to SIGN TRAILING SEPARATE field
20??-??-?? ??
* parser.y : exclude level 77 from "Item requires a data name" check
2009-08-06 Simon Sobisch <simonsobisch@gnu.org>
* parser.y : Add output of unreachable statement to -Wunreachable
2009-06-19 Roger While <simrw@sim-basis.de>
* parser.y : Fix invalid syntax with OPEN/CLOSE
* parser.y, tree.h : Preliminary RW changes
2009-06-17 Roger While <simrw@sim-basis.de>
* pplex.l : Save/restore fixed/free status on COPY
2009-06-09 Roger While <simrw@sim-basis.de>
* typeck.c : Fix constant calculation for redefines/renames
2009-06-01 Roger While <simrw@sim-basis.de>
* codegen.c : Revise trace processing
2009-05-25 Roger While <simrw@sim-basis.de>
* parser.y, typeck.c, codegen.c : CALL ... RETURNING NULL
2009-05-11 Roger While <simrw@sim-basis.de>
* parser.y, typeck.c : Implement ACCEPT OMITTED
* parser.y : UNTIL EXIT as alternative to FOREVER
2009-05-01 Roger While <simrw@sim-basis.de>
* General : Code clean/sanitize
2009-04-11 Roger While <simrw@sim-basis.de>
* General : Support icc
* parser.y, typeck.c : Support LOCK clause on OPEN
2009-03-16 Roger While <simrw@sim-basis.de>
* codegen.c : Cancel contained programs
2009-03-12 Roger While <simrw@sim-basis.de>
* Makefile.am : Fix for newest development tools
2009-03-09 Roger While <simrw@sim-basis.de>
* codegen.c : Fix valid multi-source nested and contained programs
2009-03-06 Roger While <simrw@sim-basis.de>
* field.c : Fix up LENGTH clause with CONSTANT
2009-03-03 Roger While <simrw@sim-basis.de>
* codegen.c : Fixes for icc
2009-02-23 Roger While <simrw@sim-basis.de>
* parser.y : Allow figurative literal on FROM clause
* cobc.c : Harden against stack smash/buffer overflow attacks
* typeck.c : Fix up COLUMN clause
2009-02-16 Roger While <simrw@sim-basis.de>
* parser.y, scanner.l : Differentiate LENGTH OF as special
2009-02-14 Roger While <simrw@sim-basis.de>
* tree.c, tree.h, typeck.c, field.c : Fix size warning for BINARY-xxx
* scanner.l : Fix compiling a listing output from a previous compile
2009-02-12 Roger While <simrw@sim-basis.de>
* tree.c, tree.h, typeck.c, codegen.c : Fix CANCEL for contained programs
* pplex.l : Ignore $SET at column 7 when fixed format
2009-02-11 Roger While <simrw@sim-basis.de>
* tree.h, typeck.c, field.c : Fix up ODO checking
* codegen.c, parser.y, tree.c, tree.h, cobc.c :
Nested/contained visibility fixes
2009-02-06 Roger While <simrw@sim-basis.de>
* pplex.l : Check all of "Area A" after AUTHOR etc.
2009-02-02 Roger While <simrw@sim-basis.de>
* scanner.l : Fix parsing of # lines
2009-01-30 Roger While <simrw@sim-basis.de>
* warning.def, parser.y, scanner.l, tree.h : Unreachable statement warn
* cobc.c : Fix program name
2009-01-29 Roger While <simrw@sim-basis.de>
* parser.y, scanner.l, tree.h : Force LITERAL for PROGRAM-ID
2009-01-28 Roger While <simrw@sim-basis.de>
* parser.y : Fix warning on non-USING LINKAGE item redefines
* codegen.c : Remove refs to call.def
* cobc.c, codegen.c, typeck.c : Remove -dynopt usage
* Makefile.am : Remove call.def
2009-01-27 Roger While <simrw@sim-basis.de>
* parser.y : Fix PROGRAM-ID types
* typeck.c : Change hyphen interpretation
* codegen.c : Optimize CALL literal
2009-01-24 Roger While <simrw@sim-basis.de>
* cobc.c, codegen.c : Fix up labels
2009-01-24 Roger While <simrw@sim-basis.de>
* cobc.c : Fix signals for MinGW
2009-01-23 Roger While <simrw@sim-basis.de>
* tree.c, typeck.c : RETURN-CODE is GLOBAL in nested programs
* reserved.c : Allow not-reserved from config on functions
2009-01-22 Roger While <simrw@sim-basis.de>
* typeck.c, tree.c, tree.h, codegen.c :
Change warning for special registers
* parser.y : Divorce constant fields from the working list
* typeck.c : Fix ACCEPT/DISPLAY AT llcc for screen items
* reserved.c, tree.c, tree.h, scanner.l, parser.y :
Functions CONCATENATE and SUBSTITUTE-CASE
2009-01-20 Roger While <simrw@sim-basis.de>
* scanner.l : Allow empty alphanumeric literal
* parser.y, codegen.c : Minimal value occurs support for screen items
2009-01-18 Roger While <simrw@sim-basis.de>
* parser.y, reserved.c : Preliminary parse syntax for RW
* field.c : Fix 78 level
2009-01-17 Roger While <simrw@sim-basis.de>
* cobc.c, tree.h, reserved.c : --list-mnemonics
2009-01-15 Roger While <simrw@sim-basis.de>
* parser.y, tree.h, typeck.c, codegen.c : SCROLL for ACCEPT/DISPLAY
* tree.c : Fix usage of FUNCTION as PERFORM subject
2009-01-14 Roger While <simrw@sim-basis.de>
* parser.y, tree.h, typeck.c : ACCEPT .. FROM LINES/COLUMNS
2009-01-12 Roger While <simrw@sim-basis.de>
* scanner.l : Fix DISPLAY UPON
* parser.y, tree.h, field.c : Allow 78 level within record description
2009-01-03 Roger While <simrw@sim-basis.de>
* codegen.c : Fix group initialization with ODO subitems
2008-12-31 Roger While <simrw@sim-basis.de>
* codegen.c : Fix LOCAL-STORAGE variable definition
* parser.y, scanner.l : Tighten checks
2008-12-21 Roger While <simrw@sim-basis.de>
* field.c : Fix GLOBAL INDEXED
* scanner.l : Fix comma parsing yet again
2008-12-20 Roger While <simrw@sim-basis.de>
* General : Clean up
* tree.c, tree.h, reserved.c, scanner.l : Implement SUBSTITUTE function
2008-12-16 Roger While <simrw@sim-basis.de>
* codegen.c : Fix local storage
* parser.y, scanner.l, tree.c, flag.def :
CONFIGURATION SECTION is not allowed in nested programs.
CONFIGURATION SECTION is inherited by nested programs.
FUNCTION ALL INTRINSIC in REPOSITORY allows functions
without FUNCTION keyword. Can also be activated
with -ffunctions-all.
2008-12-15 Roger While <simrw@sim-basis.de>
* scanner.l : Clean up
* parser.y : Fix program type parsing
* parser.y, scanner.l, typeck.c : Split out display constructs
2008-12-12 Roger While <simrw@sim-basis.de>
* scanner.l : Fix comma parsing
* cobc.c, tree.h, reserved.c : Option --list-intrinsics
2008-12-08 Roger While <simrw@sim-basis.de>
* parser.y, tree.h, codegen.c, reserved.c : Implement infinite PERFORM
* tree.h, typeck.c, codegen.c : Do not gen internal registers unnecessarily
2008-12-03 Roger While <simrw@sim-basis.de>
* codegen.c : Better code for handling file errors
2008-12-01 Roger While <simrw@sim-basis.de>
* parser.y : Fix up OBJECT-COMPUTER paragraph
* codegen.c : Use pointer for frame stack manipulation
2008-11-28 Roger While <simrw@sim-basis.de>
* parser.y, cobc.c, tree.c, tree.h, codegen.c : USE GLOBAL changes
2008-11-21 Roger While <simrw@sim-basis.de>
* typeck.c : Fix binary initialization
2008-11-20 Roger While <simrw@sim-basis.de>
* General : Tidy up
* typeck.c : Fix abort due to invalid syntax
* parser.y : Tighten up checking
2008-11-14 Roger While <simrw@sim-basis.de>
* cobc.c : Insert signal processing
2008-11-12 Roger While <simrw@sim-basis.de>
* parser.y : Preliminary acceptance of REPOSITORY.
LOCAL-STORAGE is not allowed in nested programs
2008-11-11 Roger While <simrw@sim-basis.de>
* tree.h, typeck.c, codegen.c : Fix BASED NULL check, add NULL check
for LINKAGE item (-debug) when not a PROC DIV USING param
2008-11-09 Roger While <simrw@sim-basis.de>
* General : Correct CALL conventions, tidy code
2008-11-07 Roger While <simrw@sim-basis.de>
* General : Preliminary support for GLOBAL
2008-11-02 Roger While <simrw@sim-basis.de>
* cobc.c, cobc.h, tree.h, codegen.c, typeck.c :
Handling of local fields, alphabet names, etc.
Create local include file for each, possibly nested, program
2008-11-01 Roger While <simrw@sim-basis.de>
* scanner.l : Relax comma separator rule
2008-10-31 Roger While <simrw@sim-basis.de>
* typeck.c : Figurative constant as call parameter is invalid
2008-10-30 Roger While <simrw@sim-basis.de>
* typeck.c : ASSIGN to 88 item is invalid
2008-10-27 Roger While <simrw@sim-basis.de>
* flags.def, pplex.l : New -fmfcomment - '*' and '/' in col 1
2008-10-26 Roger While <simrw@sim-basis.de>
* tree.h, typeck.c, codegen.c : Fix sign manipulation on overflow fields
* typeck.c : Relax checking on literal to binary move
2008-10-24 Roger While <simrw@sim-basis.de>
* parser.y : Implement legacy TRANSFORM
* parser.y : Allow SORT STATUS
2008-10-17 Roger While <simrw@sim-basis.de>
* typeck.c : Check BASED items in debug mode
2008-10-11 Roger While <simrw@sim-basis.de>
* field.c : Do not allow edited PIC with binary/packed fields
2008-10-05 Roger While <simrw@sim-basis.de>
* parser.y : Fix invalid SEARCH abort
2008-09-29 Roger While <simrw@sim-basis.de>
* codegen.c : Fix bug in multi-program source file genning
* codegen.c : Tidy up date/time info in genned C code
2008-09-22 Roger While <simrw@sim-basis.de>
* typeck.c : Pass FILE STATUS for SORT files
2008-09-15 Roger While <simrw@sim-basis.de>
* cobc.c : -I options must also be passed to the C compiler
* reserved.c, parser.y, typeck.c : Preliminary WAIT support
2008-08-20 Roger While <simrw@sim-basis.de>
* codegen.c : Change to check for __builtin_expect
2008-08-16 Roger While <simrw@sim-basis.de>
* codegen.c : Unions for function pointers
2008-08-10 Roger While <simrw@sim-basis.de>
* parser.y, cobc.c, cobc.h, typeck.c : Do not allow C keywords
as file names or PROGRAM-ID's
2008-08-01 Roger While <simrw@sim-basis.de>
* pplex.l : Specific fix for >>D
2008-07-31 Roger While <simrw@sim-basis.de>
* parser.y : FOREGROUND/BACKGROUND must be propagated from parent
2008-07-28 Roger While <simrw@sim-basis.de>
* typeck.c : Check min/max values on BINARY-xxx/COMP-5/COMP-X properly
2008-07-26 Roger While <simrw@sim-basis.de>
* parser.y : Allow literal on FROM clause for WRITE/REWRITE/RELEASE
* pplex.l : Rewrite source reading
* warning.def : Don't set column-overflow/terminator with -Wall
2008-07-22 Roger While <simrw@sim-basis.de>
* cobc.c, cobc.h, warning.def : Remove unused field from macros
2008-07-21 Roger While <simrw@sim-basis.de>
* typeck.c : Tighten up 88 level checking
* pplex.l : Directives parsing rewrite
2008-07-20 Roger While <simrw@sim-basis.de>
* parser.y : Catch mutliple PROGRAM-ID without matching END PROGRAM
2008-07-19 Roger While <simrw@sim-basis.de>
* General : Tidy up syntax
2008-07-18 Roger While <simrw@sim-basis.de>
* General : Tighten up invalid syntax checking
* parser.y, tree.c, tree.h, typeck.c : Experimental CONSTANT support
2008-07-16 Roger While <simrw@sim-basis.de>
* typeck.c : Fix segfault on invalid expressions, fix gcc warning
* parser.y : Preliminary CONSTANT support
* reserved.c : ACU keywords
2008-07-11 Roger While <simrw@sim-basis.de>
* parser.y, tree.c, typeck.c, codegen.c : ALPHABET/CLASS
syntax/checking changes
2008-07-09 Roger While <simrw@sim-basis.de>
* tree.h, typeck.c, codegen.c : Fix up SCREEN handling
2008-07-08 Roger While <simrw@sim-basis.de>
* cobc.c : Prevent display of -fstatic-call in help text
2008-07-07 Roger While <simrw@sim-basis.de>
* codegen.c : Remove gcc nested function code
2008-07-05 Roger While <simrw@sim-basis.de>
* codegen.c : Prevent C warning with -fstatic-call and pointer return
2008-07-04 Roger While <simrw@sim-basis.de>
* General : Cleanup
* pplex.l : Fix for strict directive parsing
2008-07-02 Roger While <simrw@sim-basis.de>
* reserved.c, parser.y : Implement BINARY-C-LONG
* parser.y : Proper checks for missing END-xxx terminators
2008-07-01 Roger While <simrw@sim-basis.de>
* codegen.c : Fix BY VALUE passing of POINTER
2008-06-29 Roger While <simrw@sim-basis.de>
* tree.c : Temporary nuke of literal length test
2008-06-25 Roger While <simrw@sim-basis.de>
* parser.y : SCREEN section input field definition
2008-06-22 Roger While <simrw@sim-basis.de>
* pplex.l, ppparse.y : Fix SOURCE FORMAT directive
2008-06-17 Roger While <simrw@sim-basis.de>
* parser.y : Amendments to SCREEN/ACCEPT/DISPLAY
2008-06-12 Roger While <simrw@sim-basis.de>
* tree.c, codegen.c : Fix possible segfault
2008-06-11 Roger While <simrw@sim-basis.de>
* parser.y : Fix ALTERNATE key
2008-06-10 Roger While <simrw@sim-basis.de>
* parser.y, tree.c, tree.h, typeck.c, codegen.c : More SCREEN changes
2008-06-05 Roger While <simrw@sim-basis.de>
* codegen.c : Prepare for linptr reuse
2008-06-03 Roger While <simrw@sim-basis.de>
* tree.h, parser.y, typeck.c : Support UNLOCK statement
2008-05-31 Roger While <simrw@sim-basis.de>
* parser.y, tree.c : Allow VARYING on LINE SEQUENTIAL
* tree.h, typeck.c : Prepare for parser changes
* codegen.c : Do not do screen initialization until required
2008-05-23 Roger While <simrw@sim-basis.de>
* parser.y, typeck.c : Allow FUNCTION (obviously only alphanumeric) as the
object of a CALL (e.g. CALL FUNCTION UPPER-CASE (dataitem) ...
* parser.y, tree.h, codegen.c : Better display of POINTER items
2008-05-22 Roger While <simrw@sim-basis.de>
* codegen.c : Fix pointer usage for non-aligned architecture
2008-05-21 Roger While <simrw@sim-basis.de>
* codegen.c : Fix use of special literals in CLASS clause
2008-05-19 Roger While <simrw@sim-basis.de>
* cobc.c : Fix "translating" verbose message being printed too early
* parser.y, codegen.c, tree.h : More support for SCREEN
2008-05-16 Roger While <simrw@sim-basis.de>
* typeck.c : Allow MOVE NULL to index item
2008-05-14 Roger While <simrw@sim-basis.de>
* tree.h, typeck.c, parser.y : Simplify accept from environment
* pplex.l : Add legacy REMARKS
2008-05-12 Roger While <simrw@sim-basis.de>
* codegen.c : Fix NULL params for sticky linkage
* field.c, typeck.c, codegen.c : Add some more SCREEN code
* typeck.c : Allow DISPLAY on stderr when screen active
2008-04-21 Roger While <simrw@sim-basis.de>
* codegen.c : Fix offset for fields following an ODO (MF)
2008-04-18 Roger While <simrw@sim-basis.de>
* typeck.c : Fix initialization of fractional packed fields
2008-04-15 Roger While <simrw@sim-basis.de>
* tree.c, tree.h, parser.y, typeck.c : Handle qualified INDEXED BY items
* cobc.c, codegen.c : Add build date to info lines
2008-04-02 Roger While <simrw@sim-basis.de>
* reserved.c, tree.c, tree.h : Implement FUNCTION COMBINED-DATETIME
2008-03-31 Roger While <simrw@sim-basis.de>
* reserved.c, scanner.l, tree.c, tree.h : Implement function
LOCALE-TIME-FROM-SECONDS
2008-03-29 Roger While <simrw@sim-basis.de>
* General : Fix up sparse warnings
2008-03-24 Roger While <simrw@sim-basis.de>
* parser.y, tree.c, tree.h, codegen.c : Refmodding for some FUNCTIONS
2008-03-19 Roger While <simrw@sim-basis.de>
* ppparse.y, pplex.l : Correct COPY ... IN .. processing
* parser.y : Relax syntax for MF
* parser.y, reserved.c : Allow PRINTER
2008-03-17 Roger While <simrw@sim-basis.de>
* typeck.c : Optimize MOVE ALL
2008-03-06 Roger While <simrw@sim-basis.de>
* flag.def : Remove line-directive, tidy up comments
* codegen.c : Take out line directive
* cobc.c : Turn on source location for -g
* cobc.c, cobc.h : Define ABORT to cobc_abort, make cob_jmpbuf static
* cobc.c, cobc.h, scanner.l, typeck.c : Use new routine cobc_realloc
* cobc.c : In case of unrecognized option, exit immediately
2008-03-05 Roger While <simrw@sim-basis.de>
* tree.c : Cater for SELECT without corresponding FD clause
* cobc.c : Retain .c and .c.h files when -g option specified
2008-03-04 Roger While <simrw@sim-basis.de>
* cobc.c : The -ext option must take precedence over default suffixes
2008-02-22 Roger While <simrw@sim-basis.de>
* codegen.c : NULL terminate CALL, clean up
2008-02-19 Roger While <simrw@sim-basis.de>
* codegen.c : Fix INITIALIZE on field reference modification
2008-02-16 Roger While <simrw@sim-basis.de>
* parser.y, codegen.c, tree.c, tree.h, field.c : Preliminary support for
ANY LENGTH
2008-02-14 Roger While <simrw@sim-basis.de>
* tree.c : Tighten checking on field size
* parser.y : Produce real names instead of tokenized names on error
Change "$end" to "end of file"
2008-02-12 Roger While <simrw@sim-basis.de>
* codegen.c : Use new function cob_set_location
2008-01-19 Roger While <simrw@sim-basis.de>
* warning.def, typeck.c : Warn when ASSIGN references implicit field
2008-01-10 Roger While <simrw@sim-basis.de>
* codegen.c : Fix up BY REFERENCE/CONTENT/VALUE processing
2008-01-09 Roger While <simrw@sim-basis.de>
* parser.y : BY CONTENT is not allowed in PROCEDURE header
2008-01-07 Roger While <simrw@sim-basis.de>
* parser.y, reserved.c, tree.c : Allow MF syntax for ASSIGN DISK/FILE-ID
* parser.y, typeck.c, tree.c, tree.h : DISPLAY .. UPON COMMAND-LINE
2008-01-06 Roger While <simrw@sim-basis.de>
* typeck.c, codegen.c : Fix CALL statement returning a pointer
Note, this needs fixing for alignment intolerant machines
2008-01-03 Roger While <simrw@sim-basis.de>
* typeck.c, codegen.c : Remove references to own_memxxx and SUPER_OPTIMIZE
2008-01-02 Roger While <simrw@sim-basis.de>
* parser.y : Fix up VALUE OF in FD clause
2007-12-27 Roger While <simrw@sim-basis.de>
** Mark 1.0 RELEASE
2007-12-12 Roger While <simrw@sim-basis.de>
* typeck.c : numeric literal is not allowed with ALL
2007-12-03 Roger While <simrw@sim-basis.de>
* typeck.c : Fix values of PI and E
2007-10-30 Roger While <simrw@sim-basis.de>
* cobc.c, codegen.c : Fix size_t <-> int casts
* typeck.c, codegen.c : Fix binary alignment on non-tolerant machines
* typeck.c : Fix abort with invalid condition syntax
2007-10-24 Roger While <simrw@sim-basis.de>
* typeck.c : Fix unsigned comparison
2007-10-23 Roger While <simrw@sim-basis.de>
* codegen.c : Check HAVE_ATTRIBUTE_ALIGNED
* typeck.c : Fix C-5 comparison
2007-10-22 Roger While <simrw@sim-basis.de>
* cobc.c : Fix -fnotrunc
* typeck.c : Enumerate PI and E to 35 digits
2007-10-18 Roger While <simrw@sim-basis.de>
* typeck.c : Tighten up 88 level usage in conditions
2007-10-12 Roger While <simrw@sim-basis.de>
* tree.c, tree.h, typeck.c, codegen.c : The special registers
RETURN-CODE, SORT-RETURN and NUMBER-OF-CALL-PARAMETERS must be
per module and not per compilation unit.
2007-10-10 Roger While <simrw@sim-basis.de>
* field.c : More checking for 77/78 levels
2007-09-20 Roger While <simrw@sim-basis.de>
* field.c : Fix up PIC string encoding
2007-09-12 Roger While <simrw@sim-basis.de>
* tree.h, typeck.c, reserved.c : Add in definitions for channels
2007-09-11 Roger While <simrw@sim-basis.de>
* codegen.c : Fix a PERFORM problem whereby the UNTIL was comparing
signed to unsigned.
2007-09-10 Roger While <simrw@sim-basis.de>
* typeck.c, codegen.c : Fix unsafe optimization
2007-09-08 Roger While <simrw@sim-basis.de>
* parser.y, error.c : Fixes for EXIT SECTION/PARAGRAPH
* flag.def, cobc.c : New option -fnotrunc ala MF
2007-09-07 Roger While <simrw@sim-basis.de>
* General : unistd.h is not available on native Win
* codegen.c, tree.c, typeck.c : Fix up pic string creation
* reserved.c, parser.y : Implement EXIT SECTION/PARAGRAPH
2007-08-31 Roger While <simrw@sim-basis.de>
* flags.def, codegen.c : New option -fstack-check, autoset when
--debug or -g set, no longer reliant on a -O option
* All : 78 levels in ASSIGN
* typeck.c : Better checking for source moves
* codegen.c : Cater for changed fileio struct
2007-08-23 Roger While <simrw@sim-basis.de>
* All : Remove ASCII 10/20, default display sign according to target machine,
allow -fsign-ascii, -fsign-ebcdic
2007-08-20 Roger While <simrw@sim-basis.de>
* typeck.c : Fix a segfault with invalid expression
2007-08-17 Roger While <simrw@sim-basis.de>
* cobc.h, codegen.c : Detect native EBCDIC machine.
Treat ALPHABET/COLLATING EBCDIC as native on EBCDIC machines.
ALPHABET/COLLATING STANDARD-1/2 must go through transaltion on
EBCDIC machines
2007-08-14 Roger While <simrw@sim-basis.de>
* codegen.c : Set file version
2007-08-12 Roger While <simrw@sim-basis.de>
* typeck.c : Fix for EBCDIC machines
2007-08-10 Roger While <simrw@sim-basis.de>
* parser.y, typeck.c, tree.h, flag.def : Implement -fassign-external
This allows MF conform ASSIGN EXTERNAL filename mapping
2007-08-09 Roger While <simrw@sim-basis.de>
* cobc.c : Allow environment variable COBCPY to specify copy directories
2007-08-01 Roger While <simrw@sim-basis.de>
* codegen.c : If -fimplicit-init is specified, always set up the cancel
callback
2007-07-30 Roger While <simrw@sim-basis.de>
* parser.y : Allow unqualified names in the OCCURS KEY clause
2007-07-26 Roger While <simrw@sim-basis.de>
* tree.h, parser.y, codegen.c : Trace improvements
* parser.y, error.c, codegen.c : Fix a problem with valid duplicate
paragraph names
* typeck.c : Optimize comparison of unsigned numeric display fields
2007-07-24 Roger While <simrw@sim-basis.de>
* codegen.c : Reinstate aligned attribute
2007-07-21 Roger While <simrw@sim-basis.de>
* cobc.h, typeck.c, codegen.c : Fixup for DEC Alpha alignment
* cobc.c : Use calloc instead of malloc
2007-07-18 Roger While <simrw@sim-basis.de>
* codegen.c : Fix a leak of cob_decimal structures when doing CANCEL
2007-07-09 Roger While <simrw@sim-basis.de>
* typeck.c : Fix debugging subscript check to report correct
field name
* tree.c, typeck.c : Optimize VARYING always
2007-07-07 Roger While <simrw@sim-basis.de>
* parser.y, tree.c : Tighten checks on RECORD clause
2007-07-05 Roger While <simrw@sim-basis.de>
* codegen.c : Fix wrong BY VALUE parameter generation
2007-07-01 Roger While <simrw@sim-basis.de>
* cobc.c : Always export TMPDIR to the enviroment
* typeck.c : Further optimization
2007-06-26 Roger While <simrw@sim-basis.de>
* codegen.c : Fix C warning on CLASS clause
2007-06-25 Roger While <simrw@sim-basis.de>
* parser.y, typeck.c : Fix up EVALUATE checks yet again
* parser.y, pplex.l : Constify string params to cb_error(_x)
2007-06-21 Roger While <simrw@sim-basis.de>
* tree.c : Produce error for partial expression code on WHEN clause
* codegen.c : When calling a "system" function (e.g. CBL_OPEN_FILE) with
implicit "sticky linkage" (ie. -std=mvs), do not extend the parameter list
with NULL's
* cobc.c : Help was missing for -conf=
2007-06-19 Roger While <simrw@sim-basis.de>
* parser.y : Fix up WHEN NOT
2007-06-18 Roger While <simrw@sim-basis.de>
* General : Replace the word illegal with invalid
2007-06-16 Roger While <simrw@sim-basis.de>
* tree.h, parser.y, typeck.c, codegen.c : Fix subtle difference between GOBACK
and EXIT PROGRAM
2007-06-14 Roger While <simrw@sim-basis.de>
* codegen.c : Fix field access on REDEFINES of BASED/EXTERNAL items
2007-06-06 Roger While <simrw@sim-basis.de>
* parser.y, typeck.c : LOCK clause on WRITE/REWRITE
2007-05-21 Roger While <simrw@sim-basis.de>
* parser.y, typeck.c : Implement IGNORING LOCK
* parser.y : Take out PENDING status for LOCK on READ
2007-05-18 Roger While <simrw@sim-basis.de>
* parser.y : Prevent duplicate ORGANIZATION use; particularly the mistake
INDEXED SEQUENTIAL
2007-05-16 Roger While <simrw@sim-basis.de>
* parser.y : LOCK clause on a READ is illegal when the SELECT clause specifies
LOCK AUTOMATIC
2007-05-15 Roger While <simrw@sim-basis.de>
* parser.y : The END PROGRAM identifier must agree with the PROGRAM-ID
2007-05-14 Roger While <simrw@sim-basis.de>
* parser.y, codegen.c : Use original names, not the mangled names when tracing
2007-05-11 Roger While <simrw@sim-basis.de>
* codegen.c : Fix miscompilation with nested source programs
* cobc.c : Tighten up checking for presence of input files
2007-05-09 Roger While <simrw@sim-basis.de>
* cobc.c : Implement -D option to specify defines for C compiles and
and eventuallly for conditional COBOL compilation.
Fix up HP-UX machines that per default do not honour SHLIB_PATH.
Implement -b option to create a single dynamically loadable object from
multiple input files.
2007-05-08 Roger While <simrw@sim-basis.de>
* codegen.c : More fixes alignment intolerant machines
2007-05-04 Roger While <simrw@sim-basis.de>
* parser.y, codegen.c, tree.h : Preliminary support for LOCK clause in SELECT
2007-04-30 Roger While <simrw@sim-basis.de>
* field.c : BINARY-CHAR is always one byte regardless of -std=
2007-04-28 Roger While <simrw@sim-basis.de>
* codegen.c : If -fimplicit-init is used, we must always honour an EXIT PROGRAM
2007-04-26 Roger While <simrw@sim-basis.de>
* typeck.c, codegen.c : Fix POINTER on alignment intolerant architecture
2007-04-11 Roger While <simrw@sim-basis.de>
* parser.y, typeck.c, tree.c, tree.h : Either LINE or COLUMN
can be optional on DISPLAY/ACCEPT
2007-04-10 Roger While <simrw@sim-basis.de>
* typeck.c : Enable runtime numeric checks for ADD/SUBTRACT in debug mode
Pass number of delimiters for unstring
* pplex.l : If -fdebugging-line is specified, treat a "D" in column 7
(fixed format) as a space
2007-03-29 Roger While <simrw@sim-basis.de>
* codegen.c : EXIT PROGRAM should be ignored for main program
2007-03-28 Roger While <simrw@sim-basis.de>
* field.c : Fix loop caused by ODO field item following ODO clause
2007-03-27 Roger While <simrw@sim-basis.de>
* codegen.c : Fix warning on 64-bit, display prog id with trace
2007-03-16 Roger While <simrw@sim-basis.de>
* typeck.c : Do more param checking otherwise we get a cast abort
2007-03-01 Roger While <simrw@sim-basis.de>
* codegen.c : Fix LOCALE reference, general code cleanup
* parser.y : Allow LOCALE field reference
2007-02-23 Roger While <simrw@sim-basis.de>
* parser.y : Fix multiple EXIT PERFORM
* cobc.c, cobc.h, tree.c, codegen.c : Use separate id fields for attributes,
literals and fields
2007-02-13 Roger While <simrw@sim-basis.de>
* tree.h, typeck.c, codegen.c : Gen cob_decimal_set_int if required
* cobc.c : Test -Wno-pointer-sign only with _GNUC_
2007-02-11 Roger While <simrw@sim-basis.de>
* codegen.c : Change char to int for flags
* warning.def : Check for non 01/77 levels on CALL params
should/is not activated per default (standards)
2007-02-09 Roger While <simrw@sim-basis.de>
* tree.c, tree.h, typeck.c : Implement SORT-RETURN
2007-02-07 Roger While <simrw@sim-basis.de>
* parser.y, tree.c, tree.h, reserved.c, scanner.l, codegen.c :
Implement LOCALE in special names
Implement FUNCTION's LOCALE-DATE, LOCALE-TIME
2007-02-01 Roger While <simrw@sim-basis.de>
* tree.h, typeck.c : A READ/RETURN INTO must not move contents
when the AT END/INVALID KEY condition is met.
2007-01-29 Roger While <simrw@sim-basis.de>
* parser.y, tree.[hc] : Preliminary stuff for LOCALE
* parser.y, config.def : Implement odo-without-to; For
85/2002, an ODO without a TO clause is not allowed
2007-01-26 Roger While <simrw@sim-basis.de>
* typeck.c : Harden validity tests
2007-01-24 Roger While <simrw@sim-basis.de>
* parser.y, typeck.c : Implement new SORT routines
Note that these no longer need the ISAM handler
2007-01-17 Roger While <simrw@sim-basis.de>
* parser.y, typeck.c, tree.c :
Add support for OMITTED as parameter to a CALL.
Add support for "IF item OMITTED"
2007-01-16 Roger While <simrw@sim-basis.de>
* reserved.c, tree.c, tree.h : Implement FUNCTIONs
SECONDS-PAST-MIDNIGHT, SECONDS-FROM-FORMATTED-TIME
2007-01-15 Roger While <simrw@sim-basis.de>
* typeck.c, codegen.c : Pass field offsets for keys
* parser.y, tree.c, tree.h, codegen.c, typeck.c : Allow special
ASSIGN [TO] DISPLAY
2007-01-10 Roger While <simrw@sim-basis.de>
* parser.y : A file SORT (as opposed to a table SORT) must have
a KEY phrase and a USING or INPUT PROCEDURE and a
GIVING or OUTPUT PROCEDURE.
A table SORT must not have USING/INPUT or GIVING/OUTPUT.
* parser.y, tree.c, tree.h, codegen.c, typeck.c : Allow special
ASSIGN [TO] KEYBOARD
2007-01-08 Roger While <simrw@sim-basis.de>
* codegen.c : Implement new cancel processing
2006-12-19 Roger While <simrw@sim-basis.de>
* parser.y : Fix DECLARATIVES followed by non-section, cleanup
* flex files cleanup
2006-12-17 Roger While <simrw@sim-basis.de>
* reserved.c, tree.c, parser.y, codegen.c, scanner.l : Correct the NUMVAL-C function
2006-12-07 Roger While <simrw@sim-basis.de>
* reserved.c, tree.c, parser.y : Implement TRIM function
2006-11-28 Roger While <simrw@sim-basis.de>
* tree.[hc], error.c field.c : Fix incorrect line reporting of FILLER items
* typeck.c : Use new compare routines
2006-11-18 Roger While <simrw@sim-basis.de>
* parser.y : Initialize EVALUATE check stack at current level
at statement start
2006-11-12 Roger While <simrw@sim-basis.de>
* pplex.l : Check source suffixes also when a COPY refers to
an absolute path name
Fix an obscure problem whereby a 2 line data definition
following a COPY and the second line was a literal
continuation would not compile
* typeck.c : Remaining cmp/add/sub optimizations
2006-11-06 Roger While <simrw@sim-basis.de>
* tree.h, typeck.c, error.c, field.c :
Fix incorrect line number on redefinition warning
Fix abort when ASSIGN data name duplicates SELECT name
2006-10-25 Roger While <simrw@sim-basis.de>
* parser.y : Allow COBOL standard of INSPECT REPLACING
NOTE - TALLYING is still deficient
2006-10-23 Roger While <simrw@sim-basis.de>
* Makefile.am : Remove gcc options
cobc.c : Check for .lib suffix on MSC compile
2006-10-18 Roger While <simrw@sim-basis.de>
* typeck.c : Fix ODO subscript checking
2006-10-15 Roger While <simrw@sim-basis.de>
* typeck.c : Use table for optimization
* cobc.c : Compilation defines generated by codegen
* codegen.c : Generate optimization defines
2006-10-14 Roger While <simrw@sim-basis.de>
* scanner.l : Fix a problem with 78 level
* tree.c, tree.h : Fix abort, clean up and new cb_fits_long_long
2006-09-30 Roger While <simrw@sim-basis.de>
* codegen.c : Sergey's non-gcc fixes
* parser.y : Fix an abort with ENTRY
* general : clean up
2006-08-23 Roger While <simrw@sim-basis.de>
* scanner.l, tree.c : Fix 78 levels
2006-08-11 Roger While <simrw@sim-basis.de>
* parser.y, cobc.h, typeck.c : The target of an INSPECT can be
a FUNCTION/Literal provided there is only a TALLYING clause
2006-08-09 Roger While <simrw@sim-basis.de>
* reserved.c : Fix wrong categories for some functions
2006-08-03 Roger While <simrw@sim-basis.de>
* flags.def, codegen.c : -fimplicit-init, allow libraries
to be built.
2006-07-31 Roger While <simrw@sim-basis.de>
* field.c : Fix COMP-X allocation
2006-07-28 Roger While <simrw@sim-basis.de>
* scanner.l : Usage of 78 is allowed in PIC clauses
* typeck.c : Allow 66 as CALL parameter
2006-07-26 Roger While <simrw@sim-basis.de>
* All : clean up for gcc 4
* typeck.c, tree.c, tree.h, codegen.c : System routines
2006-07-19 Roger While <simrw@sim-basis.de>
* parser.y, typeck.c : Tighten up field checking
* All : General clean up
2006-07-14 Roger While <simrw@sim-basis.de>
* parser.y, field.c : Change EXTERNAL checking
2006-07-12 Roger While <simrw@sim-basis.de>
* parse.y, reserved.c, tree.h, tree.c typeck.c, codegen.c :
Implement ALLOCATE/FREE
2006-07-02 Roger While <simrw@sim-basis.de>
* tree.c, typeck.c : Check not referenced SELECT
2006-06-28 Roger While <simrw@sim-basis.de>
* All : Change cob_malloc to cobc_malloc
2006-06-08 Roger While <simrw@sim-basis.de>
* typeck.c : With --debug, we should be generating subscript checking
* pplex.l, cobc.c : Change listing output
2006-06-06 Roger While <simrw@sim-basis.de>
* parser.y : Initialize INDEXED BY fields to 1
* codegen.c, typeck.c : Optimization for machines that are not alignment tolerant
2006-06-05 Roger While <simrw@sim-basis.de>
* codegen.c, typeck.c, reserved.c, parser.y :
Accept [WITH] [NO] LOCK on READ
Accept UNLOCK filename [RECORD[S]]
Implement PREVIOUS for IS files
2006-06-02 Roger While <simrw@sim-basis.de>
* typeck.c : Fix wrongly optimized partial reference
2006-05-27 Roger While <simrw@sim-basis.de>
* codegen.c : Stack overflow check, implement new cob_fatal_error,
fix null ref on cob_current_section/paragraph
2006-05-23 Roger While <simrw@sim-basis.de>
* parser.y, scanner.l, field.c : Change 78 level processing
2006-05-20 Roger While <simrw@sim-basis.de>
* warning.def, cobc.c, cobc.h : Change CB_WARNING to CB_WARNDEF
Just to simplify as we have an enumerator with this name
* warning.def, cobc.c, typeck.c : Implement -Wtruncate
Thanks to Hans-Martin Rasch for providing the meat of this code.
This warns when a MOVE might cause truncation.
The option is NOT turned on by -Wall
* typeck.c : Fixes for extended ACCEPT/DISPLAY
2006-05-18 Roger While <simrw@sim-basis.de>
* reserved.c, tree.c, codegen.c : Implement FUNCTION's EXCEPTION-FILE,
EXCEPTION-STATEMENT, EXCEPTION-LOCATION and EXCEPTION-STATUS
* codegen.c : Fixes for HP IA64 port
2006-05-13 Roger While <simrw@sim-basis.de>
* parser.y : Allow slightly different DISPLAY syntax
* warning.def, typeck.c : Warning option "call-params" to check
that CALL parameters are 01 or 77
* codegen.c : Fix a possible out-of-bounds reference discovered
with valgrind
2006-05-12 Roger While <simrw@sim-basis.de>
* typeck.c : Do not accept 66, 88 levels as USING params
* parser.y, typeck.c : [NOT] EXCEPTION on ACCEPT/DISPLAY
2006-05-10 Roger While <simrw@sim-basis.de>
* parser.y, typeck.c, codegen.c : Prelimary syntax support for
CURSOR IS and CRT STATUS IS
* reserved.c, tree.c, codegen.c : Implement STORED-CHAR-LENGTH (Fujitsu)
2006-05-09 Roger While <simrw@sim-basis.de>
* parser.y, reserved.c, field.c : Implement BINARY-(CHAR/SHORT/LONG/DOUBLE)
and the ACU synonyms (UN)SIGNED-(SHORT/INT/LONG)
2006-05-08 Roger While <simrw@sim-basis.de>
* parser.y, tree.h, typeck.c : Implement TRAILING in INSPECT clause (ACU)
2006-05-06 Roger While <simrw@sim-basis.de>
* reserved.c, parser.y,codegen.c : PROCEDURE DIVISION CHAINING
2006-05-04 Roger While <simrw@sim-basis.de>
* codegen.c : Use likely/unlikely macros
2006-05-03 Roger While <simrw@sim-basis.de>
* parser.y, typeck.c, codegen.c : Preliminary changes for screen
and extended accept/display
* scanner.l : Allow MF extension from SPECIAL-NAMES SWITCH syntax
2006-05-01 Roger While <simrw@sim-basis.de>
* All : General clean up
Changes for native EBCDIC machines
Optimization - See libcob/ChangeLog
* parser.y, typeck.c : Allow ACU's SET ENVIRONMENT
* parser.y, typeck.c : Start changes for WHEN partial expression
* parser.y : Allow CONSOLE [IS] CRT (MF, ACU)
* cobc.c : Add CPY and cpy to automatically detected COPY extensions
* codegen.c : Detect gcc < 3 (Doesn't like nested functions)
* config.c : Fix an enum
Allow sign-ebcdic and sign-ascii20
* pplex.l, scanner.l : Allow underscore '_' in user names (2002 standard)
* field.c : Implement support for 78 level (MF, ACU)
2006-04-17 Roger While <simrw@sim-basis.de>
* typeck.c : Optimize cob_add_xxx, cob_cmp_xxx
codegen.c, parser.y : Fix SPACE, ZERO in CLASS
2006-04-05 Roger While <simrw@sim-basis.de>
* field.c : Fix memory allocation when OCCURS at 01 level
parser.y, codegen.c : Fix CLASS clause in SPECIAL-NAMES
2006-04-04 Roger While <simrw@sim-basis.de>
* parser.y : Correctly produce minimal one-line program:
PROGRAM-ID. MYPROG.
* codegen.c, field.c : Run lindent
2006-03-31 Roger While <simrw@sim-basis.de>
* typeck.c : Fix abort on invalid SET
typeck.c, codegen.c, tree.c : Tidy abort reporting
Allow usage of ALPHABET names as identifiers
2006-03-30 Roger While <simrw@sim-basis.de>
* reserved.c, parser.y : Allow DISK in SELECT
2006-03-25 Roger While <simrw@sim-basis.de>
* cobc.[hc], codegen.c : Allow alternate ASCII/EBCDIC
SORT sequence. Exporting environment variable
COB_EBCDIC=FULL will activate *at compile time*
the full ASCII-EBDIC (256 character) sequence.
Otherwise, we use, as it was upto now, the MF
sequence.
2006-03-22 Roger While <simrw@sim-basis.de>
* reserved.c : Fix reserved table sequence (INTO)
codegen.c : Fix ASCII/EBCDIC table again
2006-03-22 Roger While <simrw@sim-basis.de>
* typeck.c : Implement COLLATING on table SORT
codegen.c : Update ASCII/EBCDIC table
2006-03-21 Roger While <simrw@sim-basis.de>
* pplex.l : Fix regression in comma processing
2006-03-20 Roger While <simrw@sim-basis.de>
* parser.y : Restrict values for CURRENCY SIGN
parser.y, typeck.c, tree.h, tree.c, codegen.c :
Support for PROGRAM-POINTER and PROCEDURE-POINTER.
Allow CALL PROGRAM-POINTER.
pplex.l, scanner.l, parser.y : Process comma in expressions
2006-03-16 Roger While <simrw@sim-basis.de>
* parser.y : Fix param check for PROCEDUE/ENTRY
Allow EXTERNAL/DYNAMIC in SELECT
typeck.c : Force ref count for display items
2006-03-10 Roger While <simrw@sim-basis.de>
* parser.y, tree.h, tree.c, typeck.c reserved.c :
Prepare support for PROGRAM-POINTER and
PROCEDURE-POINTER
2006-03-05 Roger While <simrw@sim-basis.de>
* parser.y : Make syntax more correct
2006-03-04 Roger While <simrw@sim-basis.de>
* codegen.c : Don't generate NULL params on CALL for !cb_sticky_linkage
parser.y : Allow ACU variant of ACCEPT FROM ENVIRONMENT
parser.y, tree.h, typeck.c : Implement WHEN SET TO FALSE IS
Also SET TO FALSE
2006-03-02 Roger While <simrw@sim-basis.de>
* tree.c : cb_int cannot use hash table as value may be negative
* typeck.c : Param to cb_build_memset should be int
2006-02-28 Roger While <simrw@sim-basis.de>
* parser.y, tree.h, tree.c, typeck.c, codegen.c : Handle CONTINUE
2006-02-21 Roger While <simrw@sim-basis.de>
* typeck.c, codegen.c : Implement new inlines in
libcob/codegen.h
2006-02-15 Roger While <simrw@sim-basis.de>
* parser.y : Check that PROCEDURE/ENTRY USING params
are in the LINKAGE SECTION
Check for executable program ("-x") and PROCEDURE/ENTRY
with USING params
2006-02-12 Roger While <simrw@sim-basis.de>
* parser.y : Check duplicate ENTRY
2006-02-08 Roger While <simrw@sim-basis.de>
* parser.y : Fix EVALUATE/88 again
parser.y, typeck.c, tree.h : Allow multiple destinations
on MOVE CORRESPONDING
typeck.c, codegen.c : Optimize COMP/COMP-3
2006-02-02 Roger While <simrw@sim-basis.de>
* parser.y : Fix EVALUATE and 88 level checking
2006-02-01 Roger While <simrw@sim-basis.de>
* All : Changes for nested programs
Changes for EXTERNAL FD
2006-01-28 Roger While <simrw@sim-basis.de>
* typeck.c : Optimize move literals, check PROG-ID not = source name
* parser.y : ID DIV is optional, don't abort on rubbish input,
generate "source name" entry point when != PROG-ID
2006-01-26 Roger While <simrw@sim-basis.de>
* reserved.c : Allow not-reserved for not implemented words
2006-01-25 Roger While <simrw@sim-basis.de>
* tree.h, tree.c, typeck.c, codegen.c : When using
CALL .. RETURNING .. with an OVERFLOW clause, do
not overwrite the returning field
2006-01-20 Roger While <simrw@sim-basis.de>
* parser.y, field.c : Prepare for duplicate paragraph names
* scanner.l : Fix incorrect parsing
* field.c : Allow mismatched level numbers based on config
parameter relax-level-hierarchy
* codegen.c : Generate memset instead of memcpy for literals
when literal is a repeated character
* pplex.l : Fix fixed format literal continuation
2006-01-18 Roger While <simrw@sim-basis.de>
* parser.y : Allow EQUAL in COMPUTE, Fix OBJECT-COMPUTER
2006-01-17 Roger While <simrw@sim-basis.de>
* cobc.c : Don't warn -x/-m when using -E
field.c : Don't allow binary fields > 18 digits
2006-01-08 Roger While <simrw@sim-basis.de>
* tree.c, field.c, typeck.c : Preliminary support for numeric
fields with up to 36 digits
2006-01-07 Roger While <simrw@sim-basis.de>
* cobc.c : Remove --verbose long option. getopt_long_only
has a problem with e.g. -mv
Change 'Version' back to 'version'.
2006-01-05 Roger While <simrw@sim-basis.de>
* General : Bootstrap to new libtool/automake
* cobc.c [MSC_VER]: MS VS/VC specific changes
Get COB_LDFLAGS from config
* tree.c : Fix invalid picture
* codegen.c : Non-gcc and MS VS/VC fixes
2006-01-03 Roger While <simrw@sim-basis.de>
* scanner.l : Fix wrong numeric scan
2005-12-30 Roger While <simrw@sim-basis.de>
* Change ifdef's on MINGW to WIN32 (Also defined on 64-bit Win)
2005-12-28 Roger While <simrw@sim-basis.de>
* General : Further fixes for non-gcc
codegen.c : Don't use computed goto's for non-gcc
2005-12-27 Roger While <simrw@sim-basis.de>
* General : Change all occurrences of "char[variable]"
* typeck.c : Fix huge literal generation
Hack for systems that need pointer alignment
2005-12-23 Roger While <simrw@sim-basis.de>
* reserved.c : Use bsearch
2005-12-19 Roger While <simrw@sim-basis.de>
* codegen.c : Fix sticky-linkage with ENTRY
2005-12-18 Roger While <simrw@sim-basis.de>
* All : cleanup of "shadowed" variables
* codegen.c : File struct initialization
Save/restore params for sticky-linkage
Generate Ebcdic table when needed
2005-12-13 Roger While <simrw@sim-basis.de>
* codegen.c : sticky-linkage changes
2005-12-13 Roger While <simrw@sim-basis.de>
* codegen.c : Do not statically initialize the file structure
* cobc.c : Change long_opt "version" to "Version"
* parser.y : Extra EXTERNAL checking
2005-12-09 Roger While <simrw@sim-basis.de>
* cobc.c : Show a warning to use '-x' for executables.
* typeck.c : Implement new display code.
2005-12-08 Roger While <simrw@sim-basis.de>
* cobc.h : New defines - COB_SMALL_BUFF, COB_MEDIUM_BUFF, COB_LARGE_BUFF
* Relevant files : Replace all occurences of FILENAME_MAX/BUFSIZ
* codegen.c : Do not use arrays for cob_decimal
* flags.def : Mark -fmain as deprecated
* cobc.c : Implement '-x' option (Create executable).
Harden buffer checking for command lines.
Check illegal option combinations.
2005-12-05 Roger While <simrw@sim-basis.de>
* tree.c : Take out unnecessary zero clears (Done by cob_malloc)
* cobc.c : Use the executable extension when stripping
2005-12-04 Roger While <simrw@sim-basis.de>
* tree.c : Fix buffer usage
* typeck.c : Fix strftime for MingW
2005-12-04 Roger While <simrw@sim-basis.de>
* codegen.c : Fix INITIALIZE
2005-11-28 Roger While <simrw@sim-basis.de>
* parser.y, tree.c, typeck.c : Improve error checking
* codegen.c : Fix -debug code generation
2005-11-25 Roger While <simrw@sim-basis.de>
* scanner.l, pplex.l : clean up
* cobc.c : don't use mkstemp on non-Win, tidy cleanup code,
add in bs2000 to help text, getopt includes, put back in -fno-gcse
* codegen.c : preliminary sticky-linkage code,
further mods for perform-osvs
2005-11-09 Roger While <simrw@sim-basis.de>
* parser.y, tree.h, tree.c : Implement SAME RECORD
2005-11-06 Roger While <simrw@sim-basis.de>
* parser.y, cobc.h, typeck.c, codegen.c : EXTERNAL changes
* typeck.c, codegen.c : character test optimization
2005-11-05 Roger While <simrw@sim-basis.de>
* codegen.c : Preliminary code for perform OSVS
2005-11-04 Roger While <simrw@sim-basis.de>
* cobc.c : Take out option -no-gcse
* codegen.c : Don't use arrays for local stack variables
Put in experimental (deactivated) setjmp/longjmp code for performs.
2005-11-01 Roger While <simrw@sim-basis.de>
* codegen.c : Take out attribute aligned. It borks under latest Cygwin.
2005-10-31 Roger While <simrw@sim-basis.de>
* cobc.c : Cater for -Wno-pointer-check correctly
2005-10-26 Roger While <simrw@sim-basis.de>
* typeck.c : Remove HAVE_DB ifdef
2005-10-25 Roger While <simrw@sim-basis.de>
* cobc.c, typeck.c : Add in optimizations (memset/memcpy)
2005-10-14 Roger While <simrw@sim-basis.de>
* All : More GCC 4 fixes
* typeck.c : Take out last references to cb_runtime_inlining
* flag.def : Mark -fruntime_inlining as deprecated in help text
2005-10-13 Roger While <simrw@sim-basis.de>
* cobc.c : For GCC >= 4, add -Wnopointer-sign
2005-10-06 Roger While <simrw@sim-basis.de>
* pplex.l : Ignore DATE-MODIFIED
2005-10-06 Roger While <simrw@sim-basis.de>
* Indent again - typeck.c
indents too far - need to look at cb_build_identifier
2005-10-01 Roger While <simrw@sim-basis.de>
* Indent run on most source
* typeck.c/codegen.c: Start optimizing -
Unsigned numeric (Pic 9) field optimize
Retrieval of binary-swap 2,4,8 byte fields
Retrieval of 1 byte binary fields always optimized
Optimize referencing linkage section items
Test/set of 1 byte fields
* cobc.c : Print patch level for -V (e.g. 0.33.0)
2005-08-07 Roger While <simrw@sim-basis.de>
* codegen.c : Prototypes, unneeded fields
* parser.y : unneeded fields
* config.c : indent
2005-08-04 Roger While <simrw@sim-basis.de>
* codegen.c : Change initialization point of cob_screen_init
Change generated exit to cob_stop_run
* typeck.c : Typo
2005-07-31 Roger While <simrw@sim-basis.de>
* parser.y : Fix a DISPLAY usage clash
* typeck.c : Bump the ref count for the field referred to by an 88
* codegen.c : Implement program versioning
Change the aligned attribute again - Let the compiler do it
except if the field is >= 64; then align 64 - Only for
Intel/AMD 32-bit (Intel Optimization Manual)
* cobc.c : Allow -g when optimizing with -Os or -O2
2005-07-14 Roger While <simrw@sim-basis.de>
* pplex.l : Carriage-return must be ignored if not
followed by new-line.
2005-07-14 Roger While <simrw@sim-basis.de>
* parser.y : Check for START on SEQ file
* All : Do malloc's through own new routine cob_malloc
This will produce an error and terminate if memory
cannot be acquired.
2005-07-02 Roger While <simrw@sim-basis.de>
* scanner.l : Fix bugs in early parsing (Bug list)
* pplex.l : Fix REPLACING (Bug list)
* codegen.c : Change cob_module bit fields to char
2005-06-28 Roger While <simrw@sim-basis.de>
* Cater for FUNCTION's
* Fix a LENGTH bug
* Fix the 2 compile warnings in cobc.c
2005-06-13 Roger While <simrw@sim-basis.de>
* reserved.c : Add in missing 2002 reserved words.
2005-06-11 Roger While <simrw@sim-basis.de>
* some cleanups
2005-06-09 Roger While <simrw@sim-basis.de>
* parser.y : Fix 88 level check for nested EVALUATE's.
2005-06-07 Roger While <simrw@sim-basis.de>
* parser.y : INITIALIZE WITH FILLER
* tree.h, tree.c, typeck.c, codegen.c : Handle above and
also handle an INITIALIZE on a REDEFINE.
2005-06-04 Roger While <simrw@sim-basis.de>
* typeck.c : disable optimization until we can do it really.
2005-06-01 Roger While <simrw@sim-basis.de>
* cobc.c : Include unistd.h for MinGW.
* field.c : Warning for VALUE on EXTERNAL field.
2005-05-31 Roger While <simrw@sim-basis.de>
* codegen.c : Fix code for children of external items.
* field.c, tree.h, tree.c, typeck.c, reserved.c :
Rough implementation of COMP-1/2.
2005-05-31 Roger While <simrw@sim-basis.de>
* codegen.c : Fix false placement of the c.h file.
2005-05-23 Roger While <simrw@sim-basis.de>
* cobc.c : New option -dynopt
* codegen.c : cater for -dynopt
Optimize dynamic calling
Move the include of the c.h down into the internal function.
This is necessary for upcoming nested programs.
* parser.y : cater for optimized dynamic calling.
2005-05-21 Roger While <simrw@sim-basis.de>
* New file call.def : Defines entry points that will be generated as
static calls in COBOL programs.
e.g. own C routines or other software entry points that are
linked to the main program (or cobcrun).
* codegen.c : Inline cob_module_xxx, cater for above call.def
check for cob_initialized in initialization path
2005-05-15 Roger While <simrw@sim-basis.de>
* error.c - Change "warning: " to "Warning: " and insert "Error: ".
2005-05-13 Roger While <simrw@sim-basis.de>
* cobc.c: Allow multiple input files when producing executable.
2005-05-03 Roger While <simrw@sim-basis.de>
* tree.h : bit fields are unsigned. Round to boundaries.
* typeck.c :Internal register NUMBER-OF-CALL-PARAMETERS.
* tree.c : Fix ambiguous paragraph errors.
* scanner.l : Move some syntax from the parser to here in the lexxer.
* pplex.l : Initialize variables.
* parser.y Move some syntax to the lexer.
Initialize variables.
Allow MF relaxed syntax.
SORT DUPLICATES is default. No need for warning.
* field.c : Allow larger redefines than original field for
-std=cobol2002 and -std=mf.
* config.def : New variables - larger-redefines-ok and
relaxed-syntax-check.
* codegen.c : Do not generate unnecessary code e.g. switch
statement for only one entry point, loop counters.
Cater for NUMBER-OF-CALL-PARAMETERS.
Initialize variables.
Restructure generated C code.
Use builtin_expect.
* cobc.c : Initialize variables.
Pass -fsigned-char to the compiler.
Fix dangling file with multiple compile.
* cobc.h : Extern definitions.
2005-04-15 Keisuke Nishida <knishida@opencobol.org>
* Makefile.am (cobc_CFLAGS): Add -fsigned-char.
* codegen.c (output_perform_call): Work around the GCC bug on ppc.
(Thanks to Tristan Gingold and Tom Murtagh)
2005-03-07 Roger While <simrw@sim-basis.de>
* cobc.h, config.c, reserved.c :
New config variable - not-reserved
2005-03-03 Roger While <simrw@sim-basis.de>
* tree.h, parser.y, reserved.c, tree.c, codegen.c, typeck.c :
Implement LINAGE;
Fix ASSIGN implicit data-item when not referenced
Change an incorrect long to int
Change bit fields from long to int
* cobc.h, cobc.c: Implement -Os;
Implement stripping of main/modules with O2 or Os;
* cobc.c: Fix dangling preprocess file after non-existent file;
Implement some options for gcc >= 3
2005-02-22 Roger While <simrw@sim-basis.de>
* codegen.c : Generated C code indentation
* typeck.c : Check usage of 66 level with pointer
2005-02-15 Roger While <simrw@sim-basis.de>
* codegen.c : Fix incorrect cast check,
LENGTH OF past as int (COMP-5)
2005-02-15 Roger While <simrw@sim-basis.de>
* codegen.c : Fix .. BY VALUE LENGTH OF
2005-02-12 Roger While <simrw@sim-basis.de>
* tree.h, tree.c, typeck.c, field.c, codegen.c :
.. BY CONTENT LENGTH OF ..
2005-02-11 Roger While <simrw@sim-basis.de>
* codegen.c : small optimization and module
initialization sequence.
2005-02-09 Roger While <simrw@sim-basis.de>
* codegen.c : Change order of generating variable assignment. In the
generated C header, we now have the item definitions first, then the
attributes and finally the cob_field items; EXTERNAL variable pointers
are generated local to the static prog function.
We are fairly close to achieving Keisuke's wish for generating only
a single source file.
2005-02-08 Roger While <simrw@sim-basis.de>
* parser.y, codegen.c, tree.h, tree.c
Implement EXTERNAL AS Literal
2005-02-08 Roger While <simrw@sim-basis.de>
* codegen.c : Rearrange generated code slightly;
Do not gen stack values we do not need;
Generate static function prototype so that we can gen code in order:
main (if appropriate), entry points, static function
2005-02-07 Roger While <simrw@sim-basis.de>
* cobc.c : Slight change for Cygwin
* codegen.c : Adjust handling for EXTERNAL items
2005-02-04 Roger While <simrw@sim-basis.de>
* codegen.c : Fix code gen for tag NULL
2005-02-04 Roger While <simrw@sim-basis.de>
* parser.y, typeck.c, tree.h, tree.c, reserved.c :
implement DISPLAY .. UPON ENVIRONMENT-VALUE
implement DISPLAY .. UPON ARGUMENT-NUMBER
implement ACCEPT .. FROM ARGUMENT-NUMBER
implement ACCEPT .. FROM ARGUMENT-VALUE
2005-02-01 Roger While <simrw@sim-basis.de>
* cobc.c : Add help text for -std=
2004-11-05 Roger While <simrw@sim-basis.de>
* codegen.c : readjust align to 8
2004-11-05 Roger While <simrw@sim-basis.de>
* cobc.h : Print file/line when ABORT()
2004-11-05 Roger While <simrw@sim-basis.de>
* codegen.c, field.c, tree.c, typeck.c : Handle arithemetic
for !binary_trunc.
2004-11-02 Roger While <simrw@sim-basis.de>
* codegen.c : Thinko by me - Do not exit execution
if there is a file USE declarative and no FILE STATUS.
2004-11-01 Roger While <simrw@sim-basis.de>
* tree.c : Fix bug 1014371 - 88 on POINTER
2004-10-31 Roger While <simrw@sim-basis.de>
* cobc.c, codegen.c : Activate exceptions for I/O
2004-10-31 Keisuke Nishida <knishida@opencobol.org>
* parser.y (evaluate_object): Print error in the case when the
compiler cannot handle the expression correctly. Need fix.
2004-10-30 Roger While <simrw@sim-basis.de>
* typeck.c, parser.y, error.c, field.c config.c, tree.c, tree.h,
pplex.l : Replace back-tick "'" with quote "'"
* codegen.c : specify aligned(4) and not just aligned. On IA32,
with gcc, default alignment is 16 which is non-optimal.
For 64-bit non-Intel platforms we may need 8 here to cater
for eventual direct casts for pointers and COMP-1/2 fields.
2004-10-29 Keisuke Nishida <knishida@opencobol.org>
* typeck.c (cb_build_length_1): New function.
(cb_build_length): Create an anonymous index and use it for length.
2004-09-28 Keisuke Nishida <knishida@opencobol.org>
* typeck.c (cb_build_move_field): Compare flag_binary_swap for
numeric moves. (Thanks to Roger While)
2004-09-07 Keisuke Nishida <knishida@opencobol.org>
* tree.c (finalize_file): Use cb_build_implicit_field to create record.
2004-07-06 Keisuke Nishida <knishida@opencobol.org>
* parser.y (add_statement, add_body, compute_statement, compute_body)
(divide_statement, divide_body, multiply_statement, multiply_body)
(subtract_statement, subtract_body): Parse on_size_error before
emitting the statement.
* typeck.c (build_store_option): New function.
(decimal_assign, build_decimal_assign, cb_build_add)
(cb_build_sub, cb_emit_divide): Updated for the new store scheme
in libcob.
2004-05-15 Keisuke Nishida <knishida@opencobol.org>
* parser.y (stop_statement): Accept RETURNING/GIVING phrase.
* typeck.c, tree.h (cb_emit_stop_run): Take an argument.
2004-05-06 Keisuke Nishida <knishida@opencobol.org>
* parser.y (procedure_division, entry_statement): Use using_clause.
* codegen.c (codegen, output_entry_function): Handle using_list
with BY REFERENCE/CONTENT/VALUE.
* typeck.c, tree.h (cb_build_using_list): Removed.
* cobc.c (process_translate): Do not call codegen when no entry.
2004-05-04 Keisuke Nishida <knishida@opencobol.org>
* parser.y (x): Accept literal with LENGTH OF operator.
* typeck.c (cb_build_length): Handle non-references.
2004-05-04 Keisuke Nishida <knishida@opencobol.org>
* typeck.c (cb_build_move_field): Optimize when the usage of src
and dst are the same, not only when they are DISPLAY.
(cb_build_move_high, cb_build_move_low): Really move low/high
values to numeric fields.
(cb_build_move): Do not convert 0 literal to ZERO.
2004-04-19 Keisuke Nishida <knishida@opencobol.org>
* tree.h (cb_perform): New members 'exit_label' and 'cycle_label'.
* reserved.c (CYCLE): New reserved word.
* parser.y (exit_statement): EXIT PERFORM [CYCLE] statement.
* codegen.c (output_perform_once, output_perform): Output labels.
2004-04-07 Keisuke Nishida <knishida@opencobol.org>
* parser.y (basic_literal, alnum_literal): Literal concatenation.
* tree.c, tree.h (cb_concat_literals): New function.
2004-04-07 Keisuke Nishida <knishida@opencobol.org>
* parser.y (sort_statement): Table sort.
* typeck.c (cb_emit_sort_init): Updated for table sort.
2004-03-30 Keisuke Nishida <knishida@opencobol.org>
* tree.c (cb_ref): Resolve by file name.
2004-03-29 Keisuke Nishida <knishida@opencobol.org>
* cobc.c (process_link) [__CYGWIN__, __MINGW32__]: Set
-Wl,--export-all-symbols instead of -Wl,--export-dynamic.
(Thanks to peg@coboler.com)
2004-03-12 Keisuke Nishida <knishida@wind.sannet.ne.jp>
* cobc.c (process_module, process_link): Modify compile options
for Win32.
2004-03-10 Keisuke Nishida <knishida@wind.sannet.ne.jp>
* parser.y (lock_mode_clause): Full parse without codegen.
* reserved.c (AUTOMATIC, EXCLUSIVE, MANUAL, ROLLBACK): New words.
2004-03-10 Keisuke Nishida <knishida@wind.sannet.ne.jp>
* codegen.c (output_call): Byte swap for literals.
2004-03-10 Keisuke Nishida <knishida@wind.sannet.ne.jp>
* parser.y (assignment_name): Accept qualified_word.
2004-03-08 Keisuke Nishida <knishida@wind.sannet.ne.jp>
* config.def (cb_synchronized_clause): New option.
* field.c (compute_size): Handle the SYNCHRONIZED clause.
* tree.c, tree.h (cb_field_align_size): Removed.
2004-03-08 Keisuke Nishida <knishida@wind.sannet.ne.jp>
* pplex.l (switch_to_buffer): Duplicate file name.
2004-03-06 Keisuke Nishida <knishida@wind.sannet.ne.jp>
* codegen.c (output_base): Always align the 01 items.
* field.c (compute_size): No alignment for now.
* tree.c, tree.h (cb_field_need_aligned): Removed.
2004-03-06 Keisuke Nishida <knishida@wind.sannet.ne.jp>
* reserved.c (system_table): Add "SYSLST".
2004-03-06 Keisuke Nishida <knishida@wind.sannet.ne.jp>
* typeck.c (cb_build_move): Handle cb_error_node.
(cb_build_add, cb_build_sub): Native arithmetic for pointers.
2004-03-06 Keisuke Nishida <knishida@wind.sannet.ne.jp>
* cobc.c: Use _WIN32 instead of __CYGWIN__ or __MINGW32__.
2004-02-16 Keisuke Nishida <knishida@wind.sannet.ne.jp>
* pplex.l, ppparse.y: improved text manipulation
2004-02-13 Keisuke Nishida <knishida@wind.sannet.ne.jp>
* pplex.l: literal concatenation fix
2004-02-06 Keisuke Nishida <knishida@wind.sannet.ne.jp>
* pplex.l, ppparse.y: parse (and ignore) COPY SUPPRESS PRINTING
2003-05-26 Keisuke Nishida <knishida@wind.sannet.ne.jp>
* pplex.l (ppcopy), pparse.y, cobc.c, cobc.h: split ppcopy from ppopen
2003-05-21 Keisuke Nishida <knishida@netlab.jp>
* tree.h (cb_class, cb_category): New enums.
2003-05-19 Keisuke Nishida <knishida@netlab.jp>
* cobc.h (CB_STANDARD_GNU): New standard.
* cobc.h, cobc.c (cb_standard): Default compiler is now gnu.
2003-05-18 Keisuke Nishida <knishida@netlab.jp>
* cobc.c (short_options): New option '-O'
* flag.def (cb_flag_inline_get_int, cb_flag_inline_move): New flags.
* codegen.c (output_int32): Inlining cob_get_int.
(output_move): Inlining cob_move.
2003-05-06 Keisuke Nishida <knishida@netlab.jp>
* flag.def (cb_flag_check_numeric): Removed.
(cb_flag_check_subscript): Removed.
(cb_flag_check_ref_mod): Removed.
* warning.def (cb_warn_obsolete): New variable.
* cobc.h (cb_standard, cb_binary_rep): New variables.
(cb_exception_table): New variable.
(CB_EXCEPTION_CODE, CB_EXCEPTION_NAME, CB_EXCEPTION_ENABLE): New macro.
* cobc.c (long_options): New option -std and -debug.
(short_options): Remove -T.
(process_command_line): Handle new/old options.
(cb_obsolete, cb_unconformable): New functions.
* tree.c (compute_size): Compute size depending on cb_binary_rep.
* parser.y (push_file_handler): New macro.
2003-05-04 Keisuke Nishida <knishida@netlab.jp>
* flag.def: New file.
2003-04-18 Keisuke Nishida <knishida@netlab.jp>
integrate cobcpp into cobc
* pplex.l: renamed and adjusted from cobpp/scanner.l
* pparse.y: renamed and adjusted from cobpp/parser.y
* cobc.h: definitions from scanner.h
* Makefile.am, cobc.c: adjusted
2003-04-02 Keisuke Nishida <knishida@netlab.jp>
* pparse.y <- cobpp/parser.y, pplex.l <- cobpp/scanner.l: support for
SOURCE FORMAT compiler directive
2003-03-26 Keisuke Nishida <knishida@netlab.jp>
* cobpp.h (COBPP_DEFAULT_TAB_WIDTH): New macro.
(COBPP_DEFAULT_TEXT_COLUMN): New macro.
(COBPP_FORMAT_UNKNOWN): Removed.
(COBPP_FORMAT_SEMI_FIXED): Removed.
* cobpp.c (short_options): New option `C'. Remove `D'.
(long_options): "debug" is replaced by "-fdebugging-line".
"-Wtrailing-line" is replaced by "-Wcolumn-overflow".
* cobpp.h, cobpp.c (cobpp_text_column): New variable.
* pplex.l <- cobpp/scanner.l (read_line): Use it to cater for first 6 chars
* cobpp.c (main): Do not infer the source format.
2003-01-24 Keisuke Nishida <knishida@netlab.jp>
* pplex.l <- cobpp/scanner.l (open_buffer): open copy file in "rb" mode
to avoid seek error on MinGW. (Thanks to peg@coboler.com)
2002-11-01 Keisuke Nishida <knishida@netlab.jp>
* parser.y (resolve_predefined_names): call recursively
* tree.h (YYLTYPE): moved from parser.y
* pplex.l <- cobpp/scanner.l (read_line): check newline at the end of file;
check column 7 before post-column 72
2002-10-30 Keisuke Nishida <knishida@netlab.jp>
* inline.c (output_search): Move index to variable.
* inline.c (output_search_all): Unified 'cmp' variable.
* codegen.c (output_perform_until): Merge 'output_perform_before'
and 'output_perform_after'.
(output_perform): Call 'output_perform_until'.
2002-10-08 Keisuke Nishida <knishida@netlab.jp>
* codegen.h (cobc_program_spec): New member 'loop_counter'.
* parser.y (perform_option): Increment loop_counter.
* codegen.c (loop_counter, loop_counter_max): Removed.
(output_perform): Declare loop_counter as a local variable.
(global_label, output_switch): Removed.
(output_perform_call): Don't use global_label.
(codegen): Merge codegen_1. Traverse the tree only once.
2002-10-07 Keisuke Nishida <knishida@netlab.jp>
* pplex.l <- cobpp/scanner.l (read_line): Inhibit column 72 warnings after
4 times
2002-10-06 Keisuke Nishida <knishida@netlab.jp>
* Integrate numeric expressions and conditional expressions.
* tree.h (cobc_tag_cond, cobc_cond_type, cobc_cond): Removed.
(make_negative): New macro.
* tree.c (make_expr): Build conditional as well.
(make_cond, make_negative): Removed.
* codegen.c, inline.c, parser.y: Updated.
* tree.h (cobc_evaluate): Removed.
* tree.c (make_evaluate): Removed.
* codegen.c (output_tree): Do not handle cobc_evaluate.
(output_evaluate, output_evaluate_test): Removed.
* parser.y (make_evaluate, make_evaluate_test): Build evaluate tree.
2002-10-02 Keisuke Nishida <knishida@netlab.jp>
* parser.y (CONDITIONAL_NAME): Removed.
(condition_name_list, condition_name, qualified_cond_name): Removed.
(data_name, expr_item): Handle conditional names here.
* scanner.l: Don't return CONDITIONAL_NAME.
2002-10-02 Keisuke Nishida <knishida@netlab.jp>
* Rename 'label_name' to 'label'.
* Rename 'file_name' to 'file'.
2002-10-01 Keisuke Nishida <knishida@netlab.jp>
* tree.h (cobc_tag_register, cobc_register): Removed.
* tree.c (make_register): Removed.
2002-09-30 Keisuke Nishida <knishida@netlab.jp>
* cobc.h (COBC_PACKAGE), cobpp.h (COBPP_PACKAGE): Use PACKAGE_NAME
2002-09-29 Keisuke Nishida <knishida@netlab.jp>
* codegen.c (output_file_name): Updated for new cob_file scheme.
* parser.y (sort_keys): Rename 'cob_sort_keys' to 'cob_sort_init'.
2002-09-28 Keisuke Nishida <knishida@netlab.jp>
* tree.c (init_constants): Typo fixed. Thanks to Mike Black.
2002-09-24 Keisuke Nishida <knishida@netlab.jp>
* scanner.l: Do not support single-quoted strings.
* pplex.l <- cobpp/scanner.l: Do not support single-quoted strings.
* codegen.c (codegen_1): Do not support non-computed-goto jump.
* pplex.l <- cobpp/scanner.l (display_line): Removed.
(yyinput): Append multiple LF's during concatenating lines.
2002-09-24 Keisuke Nishida <knishida@netlab.jp>
* tree.h (cobc_parameter): Renamed from cobc_generic.
All files updated.
2002-09-24 Keisuke Nishida <knishida@netlab.jp>
* inline.c (output_call_statement): Output the pointer to the
content length for COBC_CALL_BY_LENGTH.
2002-09-23 Keisuke Nishida <knishida@netlab.jp>
* cobc.c (process_translate): Verbose output.
2002-09-17 Keisuke Nishida <knishida@netlab.jp>
* cobc.c (probe_source_format): Removed.
(preprocess): Don't set source format.
(process_command_line): Set cobpp flags here.
* pparse.y <- cobpp/parser.y (yywarn): New function.
* cobpp.h (COBPP_FORMAT_UNKNOWN): New macro.
* cobpp.h, cobpp.c (cobpp_source_format_inferred): New variable.
* cobpp.c (cobpp_source_format): Default to COBPP_FORMAT_UNKNOWN.
(main): Infer source format here
* cobpp.h, cobpp.c (cobpp_warn_trailing_line): New variables.
* pplex.l <- cobpp/scanner.l (read_line): Show warnings for over column 72.
* tree.h (COBC_CALL_BY_LENGTH): New macro.
* reserved.c (reserved_words): Add LENGTH.
* parser.y (call_mode): Add CONTENT LENGTH.
* inline.c (output_call_statement): Handle COBC_CALL_BY_LENGTH.
* cobpp: Rename all `cob_*' to `cobpp_*'.
2002-09-13 Keisuke Nishida <knishida@netlab.jp>
* tree.h (cobc_field): Remove 'category'. Related files updated.
* tree.c (setup_parameters): Merge 'validate_field' and 'setup_cname'.
* parser.y (validate_field): Removed.
2002-09-12 Keisuke Nishida <knishida@netlab.jp>
* cobc.c (temp_name): Call GetTempFileName with 3rd argument 0.
Call DeleteFile to remove the temporary file.
* parser.y (validate_field_tree): Validate groups not having PICTURE.
(validate_field_tree): Create PICTURE of INDEX here, not in USAGE.
2002-09-09 Keisuke Nishida <knishida@netlab.jp>
* parser.y (ambiguous_error): display all fields with the same name.
(occurs_index): Use undefined_word. Set cobc_location.
* pplex.l <- cobpp/scanner.l (read_line): Don't use fgets.
2002-08-29 Keisuke Nishida <knishida@netlab.jp>
* cobc.c (temp_name): Use GetTempFileName on MinGW.
2002-08-28 Keisuke Nishida <knishida@netlab.jp>
* cobc.c (terminate): Renamed from 'error'.
(temp_name): Use GetTempPath on MinGW environment.
2002-08-20 Keisuke Nishida <knishida@netlab.jp>
* parser.y: No support of comments in IDENTIFICATION DIVISION.
(AUTHOR, DATE_WRITTEN, DATE_COMPILED, INSTALLATION, SECURITY): Removed.
(identification_division_options, identification_division_option)
(comment): Removed.
* reserved.c (reserved_words): Removed the tokens above.
* scanner.h, scanner.l (cobc_skip_comment): Removed.
* scanner.l: Don't handle the case of cobc_skip_comment.
* pplex.l <- cobpp/scanner.l: Better implementation of line connection.
Comments in IDENTIFICATION DIVISION are skipped here.
* cobc.c: New option -semi-fixed.
2002-08-12 Keisuke Nishida <knishida@netlab.jp>
* cobpp.h (COB_FORMAT_SEMI_FIXED): New macro.
* cobpp.c (long_options): New option `semi-fixed'.
* pplex.l <- cobpp/scanner.l (yyinput): Support semi-fixed.
Skip comments and debugging lines here.
2002-08-02 Keisuke Nishida <knishida@netlab.jp>
* codegen.c (output_compare): Use the new cob_cmp_all scheme.
2002-08-01 Keisuke Nishida <knishida@netlab.jp>
* parser.y, reserved.c: SORT and MERGE support.
* tree.h (cobc_key): Define 'dir' as int.
Use COB_ASCENDING or COB_DESCENDING for this.
* inline.c (output_search_all): Updated.
* parser.y (ascending_or_descending): Updated.
* parser.y (occurs_clause): Use predefined_name for DEPENDING ON.
(record_depending): Set 'record_depending' directly.
2002-07-31 Keisuke Nishida <knishida@netlab.jp>
* codegen.h (cobc_program_spec): Renamed from 'program_spec'.
* parser.y (program_spec): Updated.
* codegen.c: (output_switch): New variable.
(output, output_newline, output_prefix, output_line): Updated.
(loop_counter, loop_counter_max): New variables.
(codegen_1): Renamed from codegen. Set counter variables.
(codegen): New function.
(output_perform): Use loop_counter.
2002-07-31 Keisuke Nishida <knishida@netlab.jp>
* codegen.c (codegen): Return cob_return_code from main.
2002-07-30 Keisuke Nishida <knishida@netlab.jp>
* tree.c, tree.h (make_perform_once): New function.
2002-07-26 Keisuke Nishida <knishida@netlab.jp>
* parser.y: Accept SD clause.
* tree.c (make_word): Take constant and duplicate the name.
2002-07-22 Keisuke Nishida <knishida@netlab.jp>
* parser.y (FUNCTION_NAME): Defined as the string type.
* scanner.l (FUNCTION_STATE): Set value for FUNCTION_NAME.
* parser.y (display_with_no_advancing): Fixed port number.
2002-07-08 Keisuke Nishida <knishida@netlab.jp>
* codegen.c (output_field): Support literals.
(output_file_name): Output ASSIGN clause.
* parser.y (open_list): Call "cob_open" without file name.
* codegen.c (output_field): New function.
(output_file_name): Use it.
2002-07-05 Keisuke Nishida <knishida@netlab.jp>
* parser.y (screen_description): Set default line/column.
* codegen.c (output_screen_definition): Updated.
Handle COB_SCREEN_TYPE_ATTRIBUTE.
2002-07-04 Keisuke Nishida <knishida@netlab.jp>
* codegen.c (output_file_name): Rename 'cob_file_desc' to 'cob_file'.
* codegen.c (output_field_definition): New arguments 'gen_data'
and 'gen_filler'.
(output_file_name, codegen): Updated.
* parser.y (screen_option): Set LINE/COLUMN flags appropriately.
(screen_plus_minus): PLUS/MINUS flags.
2002-07-03 Keisuke Nishida <knishida@netlab.jp>
* parser.y (program_sequence): Removed.
2002-07-01 Keisuke Nishida <knishida@netlab.jp>
* tree.h (cobc_field): New members: f.screen, screen_line,
screen_column, screen_from, screen_to, and screen_flag.
* codegen.h (screen_storage): New members: enable_screen and
screen_storage.
* codegen.c (output_screen_definition): New function.
(output_tree): Output screen data.
(codegen): Output screen definition.
* parser.y (special_name): Add CURSOR and CRT STATUS.
(screen_section): New rules.
(accept_statement, display_statement): Support screen data.
* reserved.c (reserved_words): Add related tokens.
2002-06-26 Keisuke Nishida <knishida@netlab.jp>
* tree.c (compute_size): Handle SIGN SEPARATE only for numeric fields.
* parser.y (validate_field): Don't throw error for multiple redefines.
* cobc.c, cobc.h (cobc_flags): New variable.
(LINK_STATIC, LINK_DYNAMIC): Removed.
(cobc_main_flag, cobc_debug_flag, cobc_verbose_flag)
(cobc_optimize_flag, cobc_failsafe_flag, cobc_link_style): Removed.
* codegen.c (codegen, output_expr, output_line_directive): Updated.
* inline.c (output_call_statement): Updated.
2002-06-24 Keisuke Nishida <knishida@netlab.jp>
* parser.y (delete_statement, read_statement, start_statement)
(write_statement): set $$ instead of current_file_name.
(at_end, opt_invalid_key): Updated.
2002-06-18 Keisuke Nishida <knishida@netlab.jp>
* Makefile.am (cobc_LDADD): Add LIBCOB_LIBS.
2002-06-17 Keisuke Nishida <knishida@netlab.jp>
* inline.c, inline.h (output_call_statement): Take st1 and st2.
* parser.y (call_mode): Renamed from 'current_call_mode'.
(call_statement): Updated and clean up.
2002-06-11 Keisuke Nishida <knishida@netlab.jp>
* cobc.c (process_module): Use COB_MODULE_EXT.
Don't use -soname.
* codegen.c: Use 'cob_alnum_desc' where appropriate.
* codegen.c (output_field_definition): Output NULL for
cob_field.desc when it is a group.
* codegen.c, inline.c: Updated for the change in libcob that
moved the 'size' field from cob_field_desc to cob_field.
2002-06-09 Keisuke Nishida <knishida@netlab.jp>
* tree.h (cobc_field): New member 'in_redefines'.
* parser.y (validate_field): Set 'in_redefines' and validate REDEFINES.
Display error if a field under REDEFINES has VALUE clause.
(init_field): Inherit the 'in_redefines' flag.
* tree.c (make_tree, make_picture, make_word): Use memset to
initialize the memory allocated.
(make_literal, make_field, make_file_name, make_label_name_nodef)
(make_perform): Let make_tree initialize the memory by zero.
2002-06-08 Keisuke Nishida <knishida@netlab.jp>
* cobc.c (long_options): Accept '-main' option.
* cobc.c, cobc.h: New variable cobc_main_flag, removed cobc_module_flag
* codegen.c (OUTPUT_HANDLER): Removed.
* codegen.c (codegen): Updated.
* parser.y (procedure_using): Don't show -m warning.
2002-06-07 Keisuke Nishida <knishida@netlab.jp>
* pparse.y <- cobpp/parser.y (copy_statement, copy_in, copy_replacing):
Support "COPY ... IN/OF ..." syntax.
* pplex.l <- cobpp/scanner.l, scanner.h (include_copybook): Take a library name.
2002-06-06 Keisuke Nishida <knishida@netlab.jp>
* inline.c (search_set_keys): Dont check syntax error.
* parser.y (search_statement): Check syntax error here.
* parser.y (resolve_predefined_name): Return filler on error.
* codegen.c (codegen): Always generate program function,
putting main() at the end.
* cobc.c (process_command_line, print_usage): Activate -g.
2002-06-05 Keisuke Nishida <knishida@netlab.jp>
* cobc.c (print_usage): Don't show -g.
2002-06-04 Keisuke Nishida <knishida@netlab.jp>
* codegen.c (output_perform_call): New function.
* codegen.c (output_perform_once): Use 'output_perform_call'.
* inline.c (output_file_handler): Use 'output_perform_call'. Cleanup.
* cobpp/Makefile.am (cobpp_CFLAGS): -I$(top_srcdir), not -I$(top_srcdir)/lib.
* cobpp.c, pplex.l <- cobpp/scanner.l: Updated.
* Makefile.am (cobc_CFLAGS): -I$(top_srcdir), not -I$(top_srcdir)/lib.
* cobc.c, parser.y, scanner.l: Updated.
2002-06-03 Keisuke Nishida <knishida@netlab.jp>
* cobc.c (init_environment): Recognize COB_LDADD.
* cobpp/Makefile.am (cobpp_LDADD): Add libsupport.a here.
(cobpp_LIBS): Removed.
* Makefile.am: Add libsupport.a to cobc_LDADD, removed cobc_LIBS
2002-05-31 Keisuke Nishida <knishida@netlab.jp>
* functions.h: Removed.
* tree.h (cobc_call): New field 'name' and 'func'. Remove 'tag'.
(make_call): Exported
(make_call_0, make_call_1, make_call_2, make_call_3, make_call_4):
Defined as macros.
(make_inline_0, make_inline_1, make_inline_2, make_inline_3,
make_inline_4, make_call_1_list): New macros.
* tree.c (make_call): Updated and Exported.
(make_call_0,make_call_1,make_call_2,make_call_3,make_call_4): Removed.
* inline.c, codegen.h: (output_goto, output_goto_depending,
output_move, output_initialize, output_initialize_replacing,
output_display, output_search, output_search_all,
output_call_statement): Exported.
* codegen.c, codegen.h: Don't include functions.h.
* codegen.c (output_call): Updated.
* parser.y: Updated.
(push_call_1_list, push_inline_0, push_inline_1, push_inline_2,
push_inline_3, push_inline_4): New macros.
* Makefile.am (cobc_SOURCES): Updated.
2002-05-31 Keisuke Nishida <knishida@netlab.jp>
* Display index name with the error message.
* codegen.c (output_refmod_offset, output_length)
* codegen.c (output_field_definition): Updated.
* tree.c, tree.h (cobc_return_code): New variable.
* parser.y (call_returning): Move RETURN-CODE to RETURNING field.
* inline.c (output_move_index): New function.
* inline.c (output_call_statement): Don't take ret.
* codegen.c (output_expr): Give field name to cob_check_numeric.
* codegen.c (output_field_definition): No longer output field name.
2002-05-29 Keisuke Nishida <knishida@netlab.jp>
* parser.y (expr_item_list): Better source location.
* codegen.c (output_compare): Take additional argument for better
source location.
* codegen.c (output_condition), inline.c (output_search_all): Updated.
* codegen.c (output_recursive): Process top-level redefinition.
* Keep field names at run-time.
* codegen.c (output_field_definition): Output field name.
2002-05-29 Keisuke Nishida <knishida@netlab.jp>
* cobc.c: Rename 'COB_LDADD' to 'COB_LIBS'
* cobc.c (cobc_verbose_flag): New variable.
* cobc.c (short_options, long_options): New option -v and --verbose.
* cobc.c (process_command_line): Handle -v option.
* cobc.h (cobc_verbose_flag): Declared.
2002-05-23 Keisuke Nishida <knishida@netlab.jp>
* cobc.c, parser.y, scanner.l, Makefile.am, cobpp/Makefile.am,
cobpp/cobpp.c, cobpp/cobpp.h, ppparse.y <- cobpp/parser.y,
pplex.l <- cobpp/scanner.l, cobpp/scanner.h: gettextized,
improved message handling
* cobc.c, cobpp/cobpp.c: call of bindtextdomain and other NLS calls
2002-05-02 Keisuke Nishida <knishida@netlab.jp>
* cobc.c, cobpp/cobpp.c, cobpp/cobpp.h: changed source format options
-X to --fixed and -F (X/Open free format) to --free
* cobpp/cobpp.h (print_usage): fixed help output for -MF and -MT
2002-02-12 Keisuke Nishida <knishida@netlab.jp>
* cobc.c, cobpp/cobpp.c: renamed -M to -MF, added -MT to adjust target name
2002-01-29 Keisuke Nishida <knishida@netlab.jp>
* cobpp.c, cobpp.h, pplex.l <- cobpp/scanner.l, cobc.c: add -M option to
place dependency list (copybooks) into dependency file for make
* cobc.c: cleanup for passing arguments to cobpp
2001-12-29 Keisuke Nishida <knishida@netlab.jp>
* pplex.l <- cobpp/scanner.l: handle line continuation (only in fixed format)
* cobc.c, cobpp.c, cobpp.h, pplex.l <- cobpp/scanner.l, scanner.h,
ppparse.y <- cobpp/parser.y: implement -I for copybook lookup
2001-12-14 Keisuke Nishida <knishida@netlab.jp>
* pplex.l <- cobpp/scanner.l, ppparse.y <- cobpp/parser.y: work on
COPY REPLACING
2001-12-06 Keisuke Nishida <knishida@netlab.jp>
* cobpp.c, cobpp.h, pplex.l <- cobpp/scanner.l, cobc.c: added tab-expansion
to rewritten cobpp
2001-11-29 Keisuke Nishida <knishida@netlab.jp>
* pplex.l <- cobpp/scanner.l: activate debugging code (D in col 7)
2001-11-27 Keisuke Nishida <knishida@netlab.jp>
* cobpp.c, cobpp.h, pplex.l <- cobpp/scanner.l, scanner.h (new file),
ppparse.y <- cobpp/parser.y, cobc.c: re-implement cobpp,
dropping some options for now
Copyright 2001-2023 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification, are
permitted provided the copyright notice and this notice are preserved.
|