Download Open Watcom 1.5

Spread the love

In the summer of 1965, a group of students at the University of Waterloo in Canada developed a FORTRAN compiler called WATFOR that ran on an IBM 7040 system. This compiler was written in WSL and was also ported to other systems such as the IBM 360 and the DEC PDP-11. After many developments, which this page can be read, it eventually grew into Open Watcom. This open source compiler can convert source code in C, C++ and Fortran into an executable file on the DOS, OS/2 and Windows platform. The developers of SciTech have released version 1.5 with the following list of changes:

Open Watcom 1.5 has been released. A major new addition is support for ISO TR 24731, also known as the Safer C Library. This is a set of C runtime functions with additional error checking and recovery, designed to avoid common programming errors.

List of changes in C/C++ 1.5:

  • Support for ISO/IEC TR 24731, “Extensions to the C Library, Part I: Bounds-checking interfaces” has been added to the C runtime library. The C compiler now predefines the macro __STDC_LIB_EXT1__ (which evaluates to 200509L) to indicate this support. This set of functions is also known as the Safer C Library. Please see the C Library Reference for detailed documentation of these functions.
  • In C99 mode, the C compiler now supports C99 style declarations intermixed with statements within a block, as well as declarations in the opening clause of a for loop.
  • The C compiler now predefines additional macros required by the C standards. These include __STDC_HOSTED__ (evaluates to 1) to indicate a hosted implementation and __STDC_VERSION__ (either 199409L or 199901L) to indicate C94 or C99 support depending on compilation switches.
  • A __restrict keyword has been added to the C compiler. It is functionally equivalent to the C99 ‘restrict’ keyword but is always visible, even in non-C99 mode.
  • In C99 mode, the C compiler no longer requires explicit return statement in a main function returning an integer. In accordance with C99 standard, ‘return 0;’ is implied if end of function is reached and no return statement was encountered.
  • The C compiler has been fixed so that it no longer loses track of pointer base when using __based(__self) pointers. The C compiler has also been fixed to properly handle dereferencing of based arrays.
  • The 16-bit C++ compiler now correctly casts pointers to __segment type without crashing. Proper semantics of the cast were implemented.
  • The 16-bit C compiler has also been modified to handle casts to __segment type correctly, ie. return segment portion of a pointer.
  • The C compiler has been fixed to properly support named based segments (ie. __based( __segname( ) ) pointers) that reference the default _DATA and _CONST segments.
  • The compilers and library headers have been modified to properly support use of standard libraries when one of the -ec switches is used to change default calling convention.
  • The C compiler has been modified such that segments created through #pragma data_seg are no longer part of DGROUP. Typically, the pragma is used only when data segments need to be located in a physically separate segment in the output module.
  • New warning W137, “External function ‘fn’ redeclared as static”, has been added to the C compiler. Existing error E1072, “Storage class disagrees with previous definition of ‘symbol'” has been extended to cover redefinitions from ‘extern’ to ‘static’ and not only from ‘static’ to ‘external’. Changing the linkage of a symbol invokes undefined behavior according to ISO C.
  • New warning W138, “No newline at end of file”, has been added to the C compiler. It is emitted if no line terminator character was found before the end of a source file. Such files do not conform to ISO C. The missing newline character will be automatically inserted; this matches the C++ compiler behavior. Note that missing newlines could previously lead to spurious “#endif matches #if in different source file” warnings.
  • The C compiler has been modified to allow the __export or __declspec(dllexport) modifier on a declaration when earlier declaration exists with no modifier. The updated behavior is compatible with the C++ compiler as well as some compilers from other vendors.
  • In ISO/ANSI mode (-za), the compiler now always warns if it encounters a call to unprototyped function. In extensions mode (default, -ze), this warning (W131) is suppressed if a matching prototype is found later in the source file. Note that the behavior in extensions mode is unchanged from earlier versions.
  • The C compiler now eliminates static functions that are always inlined from the object file (the functions are of course still emitted if their address is taken).
  • The C compiler has been fixed to properly evaluate boolean expressions (especially the ternary operator) where the condition is a 64-bit integer constant. Previously, the high 32 bits were ignored in some cases, which could lead to erroneous results.
  • The C compiler has been modified to properly cast floating-point constants to the specified type. Notably FLT_MIN stored or passed as double is now handled correctly (without spurious precision).
  • Handling of empty macro arguments has been corrected in the C compiler’s preprocessor. Previously, empty macro arguments could result in invalid tokens in certain cases.
  • The peephole optimizer is now run again after register allocation. This allows the code generator to take advantage of some optimization opportunities that were previously missed.
  • The code generator has been modified to copy DS into ES in __interrupt routine prolog (right after DS was loaded) if the ES register is considered unalterable, ie. flat model. This may avoid crashes if ES is dereferenced explicitly or implicitly in interrupt handlers, for instance when calling memcpy().
  • The linker and other tools have been fixed to correctly classify code segments. Previously, code segments could be misclassified as data, which led to incorrect disassembly and generation of debugging information.
  • A performance problem related to emitting debugging information for structures or unions with many members has been corrected in the code generator.
  • The POSIX-defined header libgen.h has been implemented. This includes two functions, basename() and dirname().
  • The functions btowc(), fwide(), mbsinit(), wctrans(), and towctrans() have been added to the C runtime library. These functions are all related to wide-character and multi-byte support, and were first defined by the ISO C Normative Amendment 1.
  • C99 functions llabs(), lldiv(), and _Exit() have been added to the C runtime library. Note that the latter is equivalent to _exit(), defined by POSIX.
  • Support for C99 floating-point classification macros has been implemented. This includes fpclassify, isfinite, isinf, isnan, isnormal, and signbit.
  • Modifiers ‘hh’, ‘j’, ‘z’, and ‘t’ defined by C99 for the printf and scanf family of functions have been implemented in the C runtime library. Please see the C Library Reference for details.
  • The ‘F’ modifier for printf and scanf families of functions conflicts with ‘F’ format specifier defined by ISO C for floating-point conversions. It has been replaced by a ‘W’ modifier which is now used to denote a far pointer. The ‘F’ modifier is still recognized in DOS builds of the runtime library (which therefore cannot handle the ‘F’ format specifier as defined by ISO C), but is no longer documented and will be removed in a future release.
  • Several very obscure bugs have been fixed in the printf and scanf family of functions. These problems were discovered thanks to a more stringent testing procedure and had never been reported by users.
  • The strtod function has been enhanced to follow C99 specification. It will now parse infinity and NaN, as well as exadecimal floating-point numbers. See the C Library Reference for details.
  • The math library has been fixed to perform binary to decimal floating-point conversions with greater precision. This fixes a problem where in some cases a conversion from binary to decimal and back was losing precision or producing erroneous results.
  • The graphics library has been fixed to correctly work with VESA modes where the number of bytes per line does not directly correspond to width of the mode in pixels.
  • The owcc utility has been much improved and documented; this tool is a POSIX style compiler driver, designed to provide certain level of command line compatibility with gcc and ease porting.
  • The NOEXTension left option has been documented; this option instructs the linker not to add any extension (.exe, .dll, etc.) to the executable name. Any argument to the NAME directive will be used verbatim. This option had been supported by earlier versions of the linker but not documented.
  • The ‘include’ preprocessor directive not prefixed by an exclamation mark is now recognized in wmake -ms mode for compatibility with Microsoft and IBM NMAKE.
  • The wmake utility has been enhanced to evaluate NMAKE style ‘[cmd]’ expressions (ie. shell commands) in preprocessor !if directives. This functionality is supported in both wmake and -ms mode.
  • Several problems related to the Watcom debugging information format have been fixed in the linker and debugger. Note that the Watcom format is considered obsolete and its use is not recommended.
  • A random but very rare startup failure of Windows based GUI tools (notably wdw) has been fixed.

Version number 1.5
Operating systems Windows 9x, Windows NT, Windows 2000, Windows XP, DOS, OS/2, Windows Server 2003
Website Open Watcom
Download
License type Conditions (GNU/BSD/etc.)
You might also like