03/17/87 KCC 560, LIBC 124: <2,,1> Binary KCC update A copy of CC.EXE.560 is included which fixes a number of annoying bugs that users encountered with KCC 557. The sources are still those for 557, however. The library is unchanged. 03/06/87 KCC 557, LIBC 124: <2,,1> Third formal distribution snapshot IMPORTANT: this version of KCC is incompatible with previous versions! The way that structures are returned from functions has changed, and the layout of "char" and "short" objects in structures has also changed. In order to enforce this, the symbol $$CVER has been updated, and any attempt to load .REL modules which have been produced by incompatible versions of KCC will cause LINK to complain with an error message similar to this: %LNKMDS Multiply-defined global symbol $$CVER Detected in module PRINTF from file C:LIBC.REL Defined value = 1000001, this value = 2000001 This is easily remedied by re-compiling old modules. Fortunately, no further incompatible changes are expected to be necessary. Nothing has really changed from the user's viewpoint. However, there are several new features available, and some inefficiencies corrected. The noteworthy changes are listed below, very briefly; as usual, CC.DOC should be consulted for more complete and informative details. KCC: --------------------------------------------------------------- KCC - Bug fixes: A multitude of minor bug fixes too trivial to mention, almost all having to do with incorrectly optimized code. One that wasn't trivial was that {char c, *cp = &c;} used to produce an (int *)! KCC - Incompatible changes: * "shorts" are now 18 bits long (halfwords), with sizeof(short) == 2. * The mechanism for returning structure values from functions is different. This is an internal change, invisible to the user, which is much more efficient than the previous method. * Structure members of type "char" and "short" are now packed differently (more compactly). Any structure using these types will be laid out differently in storage. * Integer narrowing and widening is now done properly in all situations. This may cause incorrectly written code to behave differently. * Implicit arithmetic conversions now follow the ANSI value-preserving rules rather than the old K&R and H&S unsigned-preserving rules. Ambiguous code may behave differently. * "float" values are no longer automatically converted to "double", except for function arguments. This conforms to the ANSI draft. * The "signed" keyword (introduced by ANSI) has been implemented. * "volatile" and "const" (also new from ANSI) are now reserved words (but unimplemented). KCC - Extension: New data types: 5 new data types have been introduced, which act like "char" but with different byte sizes. You can now manipulate signed or unsigned bytes of 6, 7, 8, 9, or 18 bits. This is non-portable and intended strictly for PDP-10 machine-dependent code where efficiency is desirable. KCC - Efficiency improvements: The change to the structure handling mechanism falls in this category. Structure copies used to always take two subroutine calls and two copies; they now use a single in-line BLT (or a series of single-word moves, whichever is best), and are much faster than element-by-element copying. KCC's constant initialization code has been improved to the point where almost all constants are now initialized at load time rather than at run time; a similar mechanism eliminates the code that used to generate string constant pointers. You will see a significant difference with code that uses many string literals; both startup time and program size are reduced. KCC's pointer arithmetic for byte pointers is MUCH better. Pointer comparison and subtraction formerly used subroutine calls and many, many instructions; both now use a handful of in-line instructions and some magic numbers. There are no more calls to internal run-time subroutines. All of the operations which used to require this are now compiled in-line, including double-int and int-double conversion, pointer operations, and structure copying. KCC - unsigned and signed data: KCC now fully supports "unsigned int" operations. Some code that uses unsigned integers will now compile differently. Division in particular needs many more instructions. Any integer type, "char" in particular, may be declared as "signed" and will behave accordingly. KCC - Switch changes: -L= Passes in the command string to the linking loader. -v= (Verbosity) has been expanded; see CC.DOC. -v alone prints out everything, including the loader command string. -l Libraries loaded with the -l switch are now loaded in /SEARCH mode (they evidently weren't before). KCC - Miscellaneous -d=sym now produces a *.CYM file instead of *.SYM, to avoid conflicts with LINK output files. -P=ansi+kcc is now the default. The effects are minor and documented in CC.DOC. The three new ANSI keywords of "signed", "const", and "volatile" are recognized, although only the first has any real effect. LIBC: --------------------------------------------------------------- More minor bug fixes to the LIBC stdio routines. open() now attempts to track down and expand logical device names completely (thus performing what the monitor should be doing but isn't). Thus, open("X:subdir/filename.ext",0) will work even if X is a search path. Previously only the first device/directory could be tried. This permits KCC #includes to work with C: defined as a search path. malloc() no longer allocates pages 770-777 (non-extended) or 37770-37777 (extended), so that obsolete forms of DDT can be mapped therein. 12/07/86 KCC 537, LIBC 93: <1,,1> Informal distribution snapshot Various additional bug fixes. There may be some stray files and other cruft as this was made just so that Systems Concepts could get the latest stuff; some things haven't been checked out. 10/21/86 KCC 534 Fixed a register allocation bug which got tickled by very large floating-point expressions. LIBC: fixed a minor scanf bug. Fixed system/vfork/exit to work properly. 09/28/86 KCC 533, LIBC 14: <1,,1> Second formal distribution snapshot This is called a "snapshot" to emphasize that while the sources in this distribution should be consistent and working, the compiler and library are still under active development to remove known quirks and deficiencies, and have already changed. As before, all .REL files must be recompiled; the STDIO structures are different and there are new C runtime hooks. Most importantly, the symbol $$CVER is now defined in every module (currently it is <1,,1>) so as to detect any future conflicts when loading modules that were incompatibly compiled. Various change notes follow. For all of them, see the CC.DOC file for more details. KCC: --------------------------------------------------------------- KCC - Command line There are several new switches, and the way KCC interprets filenames is slightly different. A file with a .REL extension is always ignored, but is passed on to the loader. A file without any extension is special if the -q switch is given; it is only compiled if the .C source is more recent than the .REL binary. New switches: -A Specify nonstandard assembler header file (old meaning of -H) -H Specify nonstandard path for #include <> files. -i Loader: load program to run with extended addressing. -L Loader: nonstandard path for library files. -l Loader: search specified library -o Loader: specify .EXE filename. -P Set portability level. -q Compile extension-less files conditionally. KCC - General There are no real changes in code generation. A couple of over-optimization bugs were fixed, and a couple of other optimizations added. KCC now generates its own assembler header based on the target CPU, assembler, and system; the file C-HDR.FAI no longer exists. Two more KCC extensions were added: the `ident` quoting syntax, and the asm() in-line code mechanism. #asm and #endasm must now appear only within a function body. KCC identifiers are now unique up to 31 characters, as per the ANSI draft (external symbols are still only unique up to 6). The runtime variable $EXADF no longer exists. The decision on whether to run extended is now made at load time, either with the -i switch or by loading C:LIBCKX as the first module. LIBC: -------------------------------------------------------------- LIBC - CHAR ispunct() was "fixed" to exclude space. CARM claims space is included, but neither ANSI nor BSD does so. We assume this is a mistake in CARM. LIBC - STRING The routines memchr, memcmp, memcpy, memset were added from ANSI. LIBC - STORAGE free(), malloc(), and realloc() now behave as per ANSI when given NULL or zero as arguments. LIBC - STDIO The "update" mode is now supported for streams. In addition to this, the library implements the ANSI concept of text vs binary streams. The 'R' specification was flushed; 'b', '7', '8', '9', 'C', and "C-" were added. LIBC - other system() was added. 07/26/86 KCC 512, CLIB 225: First formal distribution version. If you already had a version of KCC on your system, you will need to recompile any .REL modules generated by the old version, because the new KCC uses a different STDIO package. .EXE files do not need to be recompiled.