C Compilers Release Changes

From Open Watcom

Jump to: navigation, search

Contents

List of changes in Open Watcom 1.9

See also: latest undocumented features.

  • The NULL macro is now defined as ((void *)0) for C; for C++, NULL is still defined as 0 or 0L as previously. This change may require modifications to user code if NULL was incorrectly used as an integer constant. Note: The 16-bit windows.h header defines NULL as 0; for 16-bit Windows programming, the effective definition of NULL depends on whether windows.h or one of the standard C headers is included first.
  • The C compiler has improved handling of the _Bool type (C99 mode specific). The _Bool type can now generally be used in expressions wherever an integer may be used.
  • The C compiler now considers enumeration types to be compatible with their underlying integer type, as required by ISO C. Note that the choice of the underlying type varies and should not be relied upon.
  • The C compiler now correctly handles initialization of static floating-point variables with 64-bit integer constants.
  • The C and C++ compilers now support the __int8, __int16, and __int32 extension keywords.
  • The 16-bit C and C++ compilers now allow the :> operator to be used in initializers of variables with static storage, as long as both operands are integer constants. This enables the use of MK_FP macro in initializers.
  • The C++ compiler now treats warning W737, implicit conversion of pointers to integral types of same size, as an error.
  • The C++ compiler now supports several new warnings: W931, warn about meaningless cv-qualifier in casts; W932, warn about meaningless cv-qualifier in function return types; and W933, warn about use of C-style casts in C++ code. These warnings must be explicitly enabled through the -wce option.
  • The code generator now eliminates redundant epilog code for 32-bit Intel processors when doing size optimization.
  • The code generator correctly handles constant folding of signed 64-bit integer division and right shift operations.
  • The code generator now supports constant folding of 64-bit integer modulo operations.
  • The code generator no longer mishandles floating-point comparisons where one operand is a variable of type float and the other operand is a constant of type double or long double.
  • The code generator no longer produces incorrect code when a constant expression of type float (e.g., 1.0f + 1.0f) is passed as an argument to a function which takes a float argument.
  • The code generator now makes more accurate decision when choosing whether a multiplication by a constant should be replaced by a sequence of shifts and additions. Results depend on target CPU type.
  • The 386 code generator now produces a CDQ instruction except when targeting a Pentium and optimizing for speed, when a MOV/SAR sequence is emitted as previously when converting a signed 32-bit integer to 64-bit.
  • The code generator no longer emits rendundant CS segment overrides when creating calls to symbols imported from DLLs.
  • The Win32 API headers and import libraries have been updated to support the new interfaces in Windows 7.
  • Support for 16-bit OLE 2.0 has been added.
  • Support for RDOS targets has been added.
  • Support for ZDOS targets has been added to the linker.
  • The floating-point exception handler for 16-bit DOS no longer crashes if the user signal handler modified DS.
  • The _floodfill() graphics library function now works correctly again.
  • The library no longer leaks memory when a thread created by _beginthread() terminates.
  • The %Lf format specifier (and related format specifiers) used with printf family functions now works.
  • The library now contains _fseeki64 and _ftelli64 functions to handle 64-bit file offset pointer for streams.
  • The library implementations of _lseeki64, _telli64, _fileleni64, _(w)stati64, _(w)findfirsti64, _(w)findnexti64 on OS/2 now properly use 64-bit file sizes and offsets.
  • The library implementations of puts and putws now correctly return EOF if they fail
  • DOS long file name (LFN) support has been added (new doslfn??.lib model specific libraries contain DOS LFN version of appropriate modules). By default DOS LFN support is enabled. It can be switch off by setup LFN=N environment variable.
  • The wasm assembler now implements support for Turbo Assembler compatible IDEAL mode. The -zcm option may be used to select this feature.
  • The assembler now supports built-in @code and @data symbols.
  • The assembler now supports ELSEIF directives for conditional assembly.
  • The assembler no longer incorrectly assumes that absolute segments are byte aligned; they are paragraph (16 byte) aligned.
  • The built-in cd command in wmake now supports quoted paths with spaces.
  • The linker now supports libraries in BSD, COFF, and GNU ar format.
  • The linker now allows stack sizes smaller than 512 bytes to be specified and does not silently override them. However, a new warning (W1172) will be emitted in such case.
  • A FULLHEADER option specific to the DOS EXE format has been added to the linker. Please see the Linker Guide for further information.
  • The library manager (wlib) now supports BSD, COFF, and GNU variants of the ar library archive format. Extended -fab, -fag, -fac options select the variant. The -fa option now selects default format depending on host platform.
  • This release introduces Open Watcom's IPF compiler (wipfc) used for creating help files on OS/2.
  • The vi editor now supports non-ASCII characters in the 0x80-0xFF range.
  • The console version of the vi editor for Windows now uses standard Windows keyboard processing; AltGr and dead keys now function correctly. Additionally, Caps Lock is only effective for keys which generate characters.
  • The editor now supports for syntax highlight of awk files.
  • The editor now supports a Select All command.
  • The windowed editor now holds the position of the replace and search/replace dialogs between invocations.
  • The wcl and wcl386 utilities now work correctly on a Linux host.
  • The DOS NetBIOS trap file and debug server have been modified to work when running on Windows NT (through NTVDM).
  • The 16-bit Windows GUI tools no longer require CTL3DV2.DLL, but still use it if the library is present.

List of changes in Open Watcom 1.8

  • The C compiler now performs stricter type checking on enumerated types. Previously, enums were treated as their underlying type (signed/unsigned char, int, etc.) for type checks.
  • The C compiler now adds location information about enumerated symbols in appropriate diagnostics.
  • The C compiler has been improved with respect to the handling of near/far pointers, especially when converting or comparing pointers and integers of different sizes.
  • The C compiler now properly recognizes functions that do not return, such as longjmp(), and correctly diagnoses control flow issues such as unreachable code or missing return statements.
  • The C compiler now supports a #pragma alias. This pragma emits alias records into the object file for processing by the linker.
  • The C compiler now has larger capacity and can compile some complex source files that previously caused out of memory errors (E1064).
  • The C compiler now always warns about unprototyped functions (W131). Previously, some forgivable instances of missing prototypes were undiagnosed by default, which caused users to write non-portable code usually by accident.
  • Warning W139 (Divisor for modulo or division operation is zero) has been added to the C compiler. This warning is triggered whenever the right operand of an integer division or modulo operation is a constant expression with the value of zero.
  • The handling of pragam aux is now correct in cases where code is emitted and a function body already exists for the corresponding symbolic name.
  • Various fixes to the handling of the include_alias pragma have been made.
  • The C and C++ compilers now have diagnostics for meaningless comparision of 64-bit and bit-field operands.
  • The C and C++ compilers now have conversion tables from CP=1250,1252 (Latin-2,1 for Windows ANSI) to Unicode to support Windows programming.
  • The C++ compiler now supports the explicit specification of function template arguments. For example: f<T>().
  • The C++ compiler now uses lazy instantiation for class templates and template members. Only the members actually used are instantiated.
  • The C++ compiler now allows member templates to be defined outside their class.
  • Numerous bugs in the C++ compiler have been fixed.
  • The C++ compiler allows a class declaration with modifiers to have those modifiers propagate into the class definition.
  • When -SH switch is used with the Fortran compiler, the default size of an integer constant is now INTEGER*2.
  • The Fortran compiler no longer crashes when equivalencing common/global with automatics.
  • Fortran processing for the text record EOL has been normalized. On UNIX systems write/seek uses LF and read uses LF or CRLF. On non-UNIX systems write/seek uses CRLF and read uses LF or CRLF.
  • Various code generation bug fixes to both the 16-bit and 32-bit compilers have been made.
  • The Win32 headers and libraries are now Open Watcom's own internal version. The MinGW headers and libraries are no longer being used. The new headers and libraries provider greater compatibility with the Microsoft SDK and better support for Microsoft Vista.
  • The version of Causeway in the official distribution is now version 4.03.
  • The Linux run time libraries now have recvfrom() and sendto() implementations.
  • A POSIX compatible fnmatch() function and a corresponding fnmatch.h header has been added.
  • The _dos_getfileattr() function no longer crashes in large data models on 16-bit DOS and Windows.
  • The C run time library now has implementations of the following functions to improve compatibility with other compilers: _chmod, _chsize, _creat, _dup2, _eof, _filelength, _isatty, _read, _sopen, _tell, _umask, _unlink, and _write.
  • The date and time arguments to _dos_getftime() and _dos_setftime() are now using 'unsigned int' type instead of 'unsigned short'. This change has been made to improve compatibility with other compilers.
  • The segment argument used with _dos_allocmem(), _dos_freemem() and _dos_setblock() is now unsigned int instead of unsigned short. This change was made for compatibility with other compilers.
  • The Fortran run time environment now works on Linux.
  • The Linux Fortran run time libraries now have FSYSTEM and FSPAWN implementations.
  • The Fortran run time now exposes the saved stack pointer for when crashes occur in the IO subsystems.
  • The debugger's options context menu now has an option to allow all child nodes to be expanded recursively.
  • The debugger now uses the full size of the type when displaying hexadecimal values (for example 0x03 instead of 0x3).
  • The debugger now has a new menu entry to change the display format of all values in an array (all hex or all decimal).
  • The debugger now supports break on write rather than just break on change. The trap must support exact breakpoints for this to happen.
  • The Windows debugger now properly handles quoted program names.
  • The Windows debugger now has proper color support.
  • The NetWare TCP server and trap have been updated for NW6.5SP7 with the latest libcpre.obj file.
  • The DOS real-mode trap file (std.trp) now correctly displays high parts of 32-bit registers on 386+ CPUs. Previously, the high parts were always displayed as zeros.
  • WLIB now has a new -pa option to set up library page size automaticaly to optimal size.
  • WLIB now handles COFF import libraries more correctly.
  • WCL now properly handles the -fd and -fm options without the file name specified.
  • WASM now handles EXTERNDEF directives properly; an EXTDEF record is created only if the symbol is actually referenced.
  • WASM now handles the auto-dependency filename properly.
  • WASM now implicitly creates the __UNIX__ macro for the BSD target as it has for LINUX and QNX.
  • The internal version numbers for WASM and WMAKE are now compatible with that used by the C and C++ compilers. Specifically the macro __WASM__ has the value 1280 for WASM and the macro __VERSION__ has the value 1280 for WMAKE.
  • The 32-bit DOS WD and WPROF can now be used with DOS/4G 2.x. The DOS4GOPTIONS settings are no longer exported. Users may still override the defaults by supplying their own wd.ini and wprof.ini, respectively. These files must be in the appropriate format for the DOS/4G version used. Note that this does not affect DOS/4GW users.
  • WLINK now handles offsets and groups larger than 64 KB for 32 bit code and 16 bit targets.
  • WLINK now ignores fixup displacement when the target relocation is absolute. This is required for compatibility with object files generated by MASM 5.1.
  • WLINK now properly handles the alignment of the last segment in a group if the last segment fragment is blank.
  • WLINK can now use the WLINK_LNK environment variable to override the default directive file name (wlink.lnk). If the specified file isn't found then the default file is used as usual.
  • WLINK now properly emits segments overlaped by groups to output file.
  • WLINK now properly handles imported symbols that are locally defined with the dllimport specifier in PE formatted files.
  • WRC on Far-Eastern NT-based systems now honors the DBCS encoding specified on the command line.
  • The text editor now supports syntax highlighting for resource files.
  • The Fgrep dialog box in graphical editor now has a browse button to display the standard browse for folder dialog box on versions of Windows that support it.
  • The ide2make utility has been added to the Open Watcom distribution. This utility converts IDE project files to make files.
  • The exe2bin utility now performs properly if relocation items are unsorted.
  • The installer now generates a batch file that automatically sets the environment variables used by the Open Watcom tools.

List of changes in Open Watcom 1.7

  • Functions using the __cdecl calling convention now return floating-point values in FPU registers in 32-bit code. This is the correct behaviour compatible with other compilers.
  • The C and C++ compilers now support an include_alias pragma which can be used, among other things, to map long include filenames onto 8.3 names. In addition, the compilers now support a -na switch to disable the automatic inclusion of _ialias.h (which contains new include_alias pragmas for certain standard headers).
  • The C compiler now emits warnings on operations which mix multi-level pointer types such as void** and int**. Previously a warning was only emitted in ANSI mode. Note that while void** is not assignment compatible with int**, void* is. The new stricter behaviour is in line with most other C compilers and helps users write cleaner and more portable code.
  • The C compiler now warns (W400) when an expression of plain char type is used as array index. Because the sign of plain char changes depending on compiler choice and settings, using plain char as array index is inherently non-portable and likely to cause problems.
  • The C compiler now folds constant expression before checking for range overflows etc. This enables the compiler to diagnose constant out of range issues in more cases.
  • The C compiler now allows benign variable redefinitions where __near or __far modifiers aren't always explicitly specified but match when current data model is taken into account (eg. 'extern int __near x;' and 'extern int x;' in small data models). The new behaviour is compatible with the C++ compiler as well as with other vendors' compilers.
  • The default stack size for 32-bit DOS extended executables has been increased from 4K to 64K. Note that the linker can still set greater or smaller stack size.
  • The code generator now produces better 16-bit code for 64-bit math operations.
  • The code generator no longer incorrectly optimizes out conditionals. The problem only occurred in very rare situations and probably only when doubles were being compared.
  • A long-standing problem with use of certain 64-bit constants as results of ternary operators has been fixed.
  • The LIBC and CLIB thin netware libraries have been added to the distribution as experimental.
  • 32-bit DOS executables now correctly pass environment to child processes started through the spawn family of functions. Previous incorrect behaviour was introduced in version 1.6.
  • In the NetWare libraries, __get_stdout with __get_std_stream was causing an infinite recursion. This has been fixed.
  • Fixed 8087 emulator/mathlib 80-bit real multiplication if one operator is zero and second is a power of two.
  • The _outgtext() function in graph.lib no longer fails on 32-bit targets.
  • The Win32 stat() function now returns correct results when it tries to access a file with given name and the directory containing that file also contained a subdirectory with the same name.
  • The debugger now supports a "No Source" toggle (right mouse click menu) in the assembly code window to switch on/off associated source code.
  • The debugger no longer crashes when tracing F77 programs that use variable-size arrays. This only applies to DWARF debugging information (which is used by default).
  • The debugger now correctly displays multi-dimensional Fortran arrays when DWARF debug information format is used (which is used by default).
  • The debugger can now display (partial) strings in Fortran code when the string length exceeds the debugger's internal limit. The internal limit has also been increased from 512 to 1024 characters.
  • The resource compiler now properly copies non-resident name table when processing LX executables.
  • The console version of vi for Win32 no longer quits after Ctrl+Left is pressed followed by any other key.
  • WCL now correctly takes options from the environment when there is more then one file to compile.
  • The linker now supports a MIXED1632 option to allow mixing of 16- and 32-bit logical segments into a single physical segment in OS/2 LX/LE executables.
  • The linker now supports a NOSTUB option for Windows and OS/2 executable formats. This option causes no DOS stub executable to be written to the output image.
  • The installer now allows you to disable creating program groups or modifying the startup environment using the /np and /ns switches.

List of changes in Open Watcom 1.6

  • The C compiler has been modified to use the underlying bit-field type and not signed/unsigned int as the type of operand which is a bit-field. This is consistent with the C++ compiler and fixes some problems when bit-fields larger than int are used.
  • Processing of #pragma aux has been corrected in the C compiler. This fixes problems when using the mmintrin.h header, among others.
  • The C compiler now accepts __declspec modifiers specifying calling conventions applied to variables, not just functions. The new behavior is consistent with the C++ compiler, and also with the fact that ordinary calling convention type modifiers can be used with variables.
  • The C and C++ compilers have been fixed to properly declare variable names based on calling convention specifiers. This fixes problems with building code using IBM SOM. Note that the current behavior is the same as in Open Watcom 1.3 and earlier.
  • The C compiler's preprocessor has been modified to allow use of macros with large number of arguments (255 or more).
  • The C compiler no longer generates internal errors when options -ri and -oe are specified at the same time.
  • The C++ compiler has been fixed to inline intrinsic functions.
  • The 386 compilers have been changed to default to tuning code for P6 architecture instead of Pentium. Optimizing for P6 typically results in slightly more compact and faster code.
  • The 386 C compiler has been fixed to properly convert between flat and __far16 pointers, especially pointers to functions. Its behavior should now be compatible with the C++ compiler. The problem was most likely affecting OS/2 users who wrote mixed 16-bit and 32-bit code.
  • The C compiler has been changed to allow redeclaration of functions in rare cases where initial declaration did not specify a calling convention and the subsequent declaration specified a calling convention which matched the default.
  • A new -zwf switch has been added to the C and C++ compilers. This switch is off by default and enables generation of FWAIT instructions on 386 and later CPUs. It is only needed in unusual situations.
  • The C compiler now correctly converts 64-bit integer constants to floating-point constants.
  • The code generator no longer merges memory accesses when volatile variables are involved.
  • The code generator now correctly const folds 64-bit right shifts.
  • The code generator now properly converts between far pointers and 64-bit integers. Attempts to convert a 48-bit far pointer to 64-bit integer no longer cause a crash.
  • The code generator has been modified to slightly decrease code size when optimizing for size (-os).
  • The non-standard alloca.h header has been added for compatibility with other compilers.
  • The strftime() library function has been extended to support date formats introduced in C99.
  • The file pointer type used with lseek() and tell() has been changed to off_t (from long) for compatibility with POSIX.
  • The 386 versions of _clear87() and _status87() functions have been modified to use the no-wait form of FPU control instructions. This allows these functions to be used in exception handlers when there are pending unmasked floating-point exceptions.
  • The 16-bit 8087 emulator has been fixed to correctly evaluate multiplies as infinity instead of zero in rare overflow situations.
  • The resource compiler (wrc) has been fixed to store long integer constants as 32-bit quantities in RCDATA or user data resource statements. This behavior applies to Win16, Win32, and OS/2 targets. Integers without the 'L' suffix are stored as 16-bit and potentially truncated.
  • The OS/2 specific part of the resource compiler has been corrected to process RCDATA statements properly.
  • The assembler (wasm) now supports external absolute symbols. The SIZE, SIZEOF, LENGTH, and LENGTHOF operators have been corrected for structures.
  • Classification of privileged instructions in the assembler has been updated to match MASM.
  • The assembler now evaluates expressions in return instructions correctly. Previously, code such as 'ret 28+4' would be sometimes erroneously assembled as 'ret 28' instead of 'ret 32'.
  • The linker has been changed to only recognize segments of class 'STACK' as stack segment. Previously, any segment with class name ending with 'STACK' (eg. 'FSTACK') was recognized.
  • Several minor problems related to creating DOS executables have been fixed in the linker.
  • The RUNTIME linker directive has been extended to allow ELF ABI type and version specification. This functionality is similar to the brandelf utility. See the Linker Guide for details.
  • The wmake utility has been modified such that in native wmake mode, a symbolic target with no command list is always considered to have had its command list executed. That will cause any targets that are dependent on this symbolic target to be considered out of date.
  • The Win32 trap file is now able to determine the full pathname of debuggee's loaded DLLs. This may ease debugging in some cases as the debugger will be more likely to find debugging information for DLLs.
  • The Win16 debugger trap file (std.dll) has been modified to allow 16-bit wdw to run on Windows NT platforms without reporting a spurious error message on exit.
  • Numerous problems with the Win386 extender support have been fixed so that Win386 now works again.
  • The dmpobj utility has been ehnanced to support additional OMF records, and new command line options have been added.

List of changes in Open Watcom 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( <name> ) ) 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, "Extern 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 'extern'. Changing the linkage of a symbol invokes undefined behaviour 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 behaviour. 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 behaviour 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 behaviour 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 in some cases ignored, 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. in 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 hexadecimal 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 linker 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.

List of changes in Open Watcom 1.4

  • Support for C99 designated initializers has been added to the C compiler, for example "struct {int a, b;} c = {.a=0, .b=1};". This is also supported for arrays, for example "int a[4] = {[0]=5, [3]=2};".
  • Handling of enumerations has been fixed in the C compiler. In certain cases, the compiler chose the wrong type for operations on objects of enumerated types. Enumerated constants up to 64 bits wide are now also allowed (including in 16-bit compilers).
  • The C compiler will now warn if the right hand operand of a bitwise shift expression is a constant that is either negative or greater than or equal to the bit with of the promoted left operand. The result of such operation is not defined by ISO C. The warnings are 'W134: Shift amount negative' and 'W135: Shift amount too large'.
  • The C compiler now warns in cases where an unsigned type is compared for <= 0. This is equivalent to 'unsigned == 0' and often indicates that a signed comparison was intended.
  • New __watcall keyword has been added to the C and C++ compilers to designate the default Watcom calling convention.
  • New -ec? switches have been added to set the default calling convention.
  • The 16-bit C compiler now defines _M_I86 macro for consistency with the C++ compiler. The new macro should be used in preference to the existing M_I86.
  • A number of new keywords have been added to the C compiler; these were previously defined as macros: _Cdecl, _Export, _Far16, _Fastcall, _Pascal, __sycall, _System, __try, __except, __finally, __leave.
  • Analogous change has been made to the C++ compiler. The new keywords (and removed predefined macros) are: _Cdecl, _Export, _Far16, _Fastcall, __inline, _Pascal, __syscall, _System.
  • The C++ compiler now handles the "new" template specialization syntax, and partial specialization is partially supported (no pun intended).
  • The C++ compiler now correctly handles the situation where control reaches the end of main() function without encountering a return statement. In that case, the effect is that of executing "return 0;".
  • The C++ compiler now properly allows return statements with a void expression in functions that return void.
  • 386 C and C++ compilers now support the Microsoft fastcall calling convention, and recognize the __fastcall keyword.
  • The C compiler now recognizes #pragma data_seg and code_seg forms that specify segment and class names without enclosing them in parentheses. The new behaviour is consistent with other compilers.
  • New -fti switch has been added to the C compiler to track #include file opens. This helps diagnose include file problems in complex projects.
  • The code generator no longer emits debug information for unreferenced typedefs when -d1+ or -d2 switch is used. This produces slightly to significantly smaller debug information. Note that behaviour of -d3 is unchanged.
  • The 386 code generator will no longer select the 'and' instruction to perform zero extension when optimizing for time on the 686 architecture (-6r or -6s switch). The 'movzx' instruction will always be used instead, because it avoids partial register stalls and in certain cases significantly improves performance on P6 and newer class CPUs.
  • Support for long long based bitfields has been improved in the code generator.
  • The code generator now properly diagnoses attempts to emit symbol names that overflow the OMF limit (255 bytes).
  • Several problems related to loss of segment information in 386 non-flat models have been fixed in the code generator.
  • Command line processing has been changed in the Compile and Link utility (wcl). Forward slashes now may be used as path separators in file arguments, such that "foo/bar" is now interpreted as "foo\bar.c". Note that this does not affect options delimited with forward slashes.
  • Support for raw binary and Intel Hex output has been added to the linker, along with support for 24-bit segmented addressing architectures (HSHIFT option) and arbitrary class/segment reordering (OUTPUT and ORDER directives). See Linker Guide for details.
  • Support for overlays (16-bit DOS) has been reinstated in the linker. A related FARCALLS/NOFARCALLS option has been added to the linker. See Linker Guide for details.
  • The linker now correctly processes relocations to symbols in absolute segments.
  • The linker now checks for bitness conflicts (16 vs. 32-bit) when adding segments to a group.
  • The minimum accepted value for linker OBJALIGN option has been changed to 16 bytes (previously 512).
  • The linker no longer creates a separate .bss section when linking PE modules. Instead, uninitialized data is added at the end of the data section. This creates slightly smaller executables and reduces memory usage.
  • The st_name member was removed from struct stat and related structures. This was done for consistency across platforms (UNIX has no such field), because the st_name field was almost entirely useless (being limited to 13 characters), and for compatibility with Microsoft compilers; the latter because struct _wstat and struct _wstati64 are now obsolete and struct _stat/_stati64 can be used for wide character stat functions. NB: This change requires recompilation. New object files will not work with old libraries and vice versa.
  • The signal() function no longer modifies floating-point control word on Win32 and 32-bit OS/2. Also, default value for SIGFPE has been changed to SIG_DFL from SIG_IGN on all platforms.
  • The e/E format of printf() family of functions has been changed to format the exponent with minimum of two digits (instead of three). This behaviour is dictated by C99 and consistent with most other compilers.
  • The floating-point to string conversion routines now format values with greater precision. This means that floating-point values printed by C and C++ programs may be slightly different from earlier versions of the runtime libraries (but more accurate).
  • The sleep() function is now declared in unistd.h and its return type has been changed to unsigned int, for compatibility with POSIX.
  • The clock() function now uses millisecond counters (where available) on DOS and Windows, and is no longer susceptible to problems related to TZ changes.
  • The DOS runtime has been tuned to produce smaller executables.
  • C99 functions wmemchr(), wmemcmp(), wmemcpy(), wmemmove(), and wmemset() have been added to the C runtime library.
  • A POSIX compatible getopt() function has been added to the C runtime library.
  • A POSIX compatible mkstemp() function has been added to the C runtime library.
  • BSD compatible safe string copy and concatenation functions, strlcpy() and strlcat(), have been added. Use of these functions is highly recommended over strncpy() and strncat(), because they are safer and much easier to use.
  • New strings.h header has been added for POSIX compatibility, although legacy functions index() and rindex() are not supported. Functions strcasecmp() and strncasecmp() are also declared in string.h for compatibility with other compilers.
  • The C runtime library no longer returns ESPIPE when calling write() on a pipe or device that was opened with O_APPEND flag. The old behaviour was not POSIX conforming.
  • Handling of pathnames that include spaces has been improved in the make utility (wmake).
  • The disassembler (wdis) now handles big endian object files on little endian host platforms, and vice versa.
  • Support for MIPS R4000 and SPARC V8 instruction sets has been added to the disassembler.
  • New -zz and -zzo option have been added to the assembler (wasm) for backwards compatibility. See Tools User's Guide for details.
  • Default behaviour of inline assembler has changed. The CPU optimization level (-4, -5, -6) now implies the available instruction set: -5 implies MMX and 3DNow!, -6 also implies SSE/SSE2/SSE3. Also note that any CPU setting override now reverts to default at the end of each inline assembly block.
  • 16-bit DOS version of the assembler (wasmr) has been added. This version runs on 8086 and above and requires less memory than the protected mode version.
  • The debugger has been changed to look for support files in directories relative to the debugger executable's location. This allows the debugger to be used when no debugger specific environment variables have been set.
  • A problem with stepping into code (F8) right after debuggee was loaded has been fixed in the debugger.
  • The debugger now looks for debug information in a .sym file when the /DOwnload option was specified. Previously it erroneously only looked at the executable if the download option was used.
  • Support for Microsoft/IBM .sym files generated by the MAPSYM utility has been added to the debugger and profiler. This is helpful especially with symbol files provided by IBM for OS/2 system DLLs; disassembly now shows for instance "call DOS32EXIT" instead of "call 01C74634".
  • The CauseWay trap file no longer incorrectly maps symbol addresses in 'large' executables (code segment > 64K).
  • Interoperability with GNU tools has been improved. The debugger (wd/wdw) should now be able to debug GNU-produced executables (with DWARF 2 debug information) and vice versa.
  • New -zld option has been added to the library manager (wlib) to strip autodependency information from OMF objects.
  • New exe2bin utility has been added. See Tools User's Guide for details.
  • Basic support for compiling OS/2 resource scripts and binding resources into OS/2 executables (both NE and LX formats) has been added to the resource compiler (wrc).
  • The include search order in the resource compiler has been changed to be more consistent with the C/C++ compilers, as well as with IBM's and Microsoft's resource compilers. System include files (enclosed in angle brackets) are no longer searched in current directory or in the dicrectory of the file containing the #include directive.
  • The Windows resource compiler has been made more compatible with scripts designed for Microsoft's RC in the way it treats string literals.
  • The MS LINK compatibility wrapper now supports a /RELEASE switch.
  • Syntax highlighting support for makefiles has been added to the editor. The default syntax highlighting scheme has also been made more colourful.
  • The editor and Windows GUI tools now store configuration files in more appropriate locations (notably on multi-user machines).
  • Several new DOS extender related targets have been added to the IDE. Better support for remote debugging has also been added to the IDE.
  • The CauseWay DOS extender now supports SSE instructions on plain DOS.
  • Several simple OS/2 SOM programming examples have been added.

List of changes in Open Watcom 1.3

  • The C++ compiler now restricts the scope of variables declared in a for loop to the scope of that loop in accordance with ISO C++, not extending the scope beyond the loop (ARM compliant behaviour). Code relying on the pre-standard behaviour must either be changed or compiled with new -zf switch which reverts to old scoping rules.
  • Support for default template arguments has been added to the C++ compiler.
  • Support for alternative tokens (and, xor etc.) has been added to the C++ compiler. It is enabled by default, can be turned off with the new -zat switch.
  • The C runtime library has been made significantly more C99 compliant. A number of new headers have been added (inttypes.h, stdbool.h, stdint.h, wctype.h) and corresponding new functions implemented. Wide character classification functions were moved out of ctype.h into wctype.h. C99 va_copy macro was added to stdarg.h.
  • Added 'cname' style C++ headers.
  • Support for SSE, SSE2, SSE3 and 3DNow! instruction sets has been added. Affected tools are the assembler (wasm), as well as all x86 compilers, disassembler and debugger. The debugger now also supports MMX registers formatted as floats (for 3DNow!) as well as a new XMM register window for SSE.
  • Inline assembler directives .MMX, .K3D, .XMM, .XMM2 and .XMM3 are now supported in the _asm as well as #pragma aux style inline assembler interface. Note: .MMX directive is now required (in addition to .586) to use MMX instructions.
  • C compiler performance has been significantly improved (up to 5-10 times speedup) when compiling large and complex source files.
  • All x86 compilers now have the ability to perform no truncation when converting floating point values to integers. Additionally, 32-bit x86 compilers have the option to inline the rounding code instead of calling __CHP.
  • The C lexical scanner no longer evaluates constants with (U)LL suffix that fit into 32 bits as zero (1ULL was wrong, LONGLONG_MAX was correct).
  • C and C++ x86 inline assembler has been fixed to properly process hexadecimal constants postfixed with 'h'.
  • The C compiler now supports the C99 'inline' keyword, in addition to previously supported '_inline' and '__inline' keywords.
  • The C compiler now treats a sequence of adjacent character strings as wide if any of the components are wide (required by C99), instead of depending on the type of the last component. For example, L"foo " "bar" is now interpreted as L"foo bar", instead of "foo bar".
  • The internal C compiler limit on complex expressions has been increased and if it is still insufficient, the compiler now reports an error instead of crashing.
  • The C compiler now issues a warning on the default warning level if a function with no prototype is referenced. This was previously warning W301 (level 3), now it is warning W131 (level 1).
  • Warning "W132: No storage class or type specified" has been added to the C compiler. This warning is issued if a variable is declared without specifying either storage class or type. This is not allowed in C89.
  • Warning "W304: Return type 'int' assumed for function 'foo'" has been added. This warning is issued if a function is declared without specifying return type. This is allowed in C89 but not in C99.
  • Warning "W305: Type 'int' assumed in declaration of 'foo'" has been added to the C compiler. This warning is issued if a variable is declared without specifying its type. This is allowed in C89 but not in C99. Note that if warning W132 is issued, W305 applies as well.
  • The C compiler now properly warns if a function with implied 'int' return type fails to return a value. This potential error was previously undetected.
  • C++ compiler diagnostic messages have been made more consistent and slightly more detailed.
  • Linker for Win32 targets can now create file checksums. These are primarily used for DLLs and device drivers, but can be applied to all Win32 PE images if required.
  • Linker for Win32 targets can now set operating system version requirements into the PECOFF optional header (Microsoft extended header).
  • Linker for Win32 targets can now set the linker version number into the PE optional header (Microsoft extended header).
  • The linker will now eliminate zero-sized segments from NE format (16-bit OS/2 and Windows) executables. This fixes a problem where Windows 3.x would refuse to load an executable with zero sized segment. This could happen especially with C++ programs where some segments may have ended up empty after eliminating unused functions.
  • The linker now (again) produces correct Watcom style debugging information. This was a regression introduced in previous version.
  • Command line parsing for wccxxx, wppxxx and cl has been changed such that a double backslash inside a quoted string is collapsed to a single backslash, and hence "foo\\" now translates to 'foo\' and not 'foo\"'.
  • The IDE and other graphical tools no longer leak system resources (a bug introduced in version 1.2).
  • The Image Editor limit on bitmap size has been changed from 512x512 pixels to 2048x2048 pixels.
  • The source browser now correctly decodes array information; Version 11.0c of Watcom C/C++ started emitting array browse information in a new format and the browser hadn't been updated accordingly.
  • The NT debugger trap file has been changed so an exception generated during a step operation is handled correctly. Previously, the single step flag was not being cleared and when the exception was being offered to the debuggee's own exception handlers, a single step exception occurred in NT's exception handler rather than the exception being passed back to our handler.
  • The OS/2 debuggers now dynamically allocate buffer for the command line, preventing crashes when the command line was over approx. 260 bytes long.
  • The NetWare 5 debugger NLM has been changed to use kernel primitives. Previous version were using legacy semaphores.
  • The make program (wmake) has been sped up very slightly. Also the 'echo' command is now internal and no longer spawns the system command interpreter.
  • The precision of DBL_MAX, DBL_MIN and DBL_EPSILON has been increased; the non-standard variants prefixed with an underscore have been removed.
  • The C99 functions atoll(), lltoa(), ulltoa(), strtoll(), strtoull() and corresponding wide character functions have been added to the C runtime library.
  • The _beginthread() function now consistently returns -1 in case of error on all platforms.
  • The stdaux and stdprn streams are now only defined on DOS based platforms, ie. DOS, Win16 and Win386. No other platforms support stdaux or stdprn.
  • The assert() macro now prints function name in addition to source file and line number, in accordance with C99.
  • The _heapchk() function will now always perform a consistency check on the heap, where it would previously only check consistency if there had been allocations/frees since last call to _heapchk(). As a consequence, _heapchk() previously did not detect certain instances of heap corruption.
  • [OS/2 32-bit] The default __disallow_single_dgroup() implementation no longer statically links agaist PMWIN.DLL. This allows DLLs to load on systems where PMWIN.DLL isn't present.
  • [OS/2 32-bit] Re-implemented clock(). The new implementation uses the OS millisecond counter and is hence not susceptible to TZ changes. It is also smaller, faster and more accurate, although it may wrap around earlier than the original implementation.
  • The disassembler (wdis) now correctly processes x86 'push 8-bit immediate' instructions.
  • The disassembler now correctly processes absolute memory references. All memory references without fixup are now disassembled as ds:[...] or sreg:[...].
  • Several DirectX Win32 programming samples have been added. Note that a separate DirectX SDK (available from Microsoft) is required to build these sample programs.

List of changes in Open Watcom 1.2

  • Handling of default libraries for Win32 targets has been changed. Previously default library records were included in the C runtime library, now they are specified part of the wlink Win32 target definitions in wlsystem.lnk. The list of libraries has changed from previous version as well and now reflects the Microsoft compiler defaults; existing IDE projects and makefiles may need to have additional libraries specified if those are no longer part of the default list.
  • The C compiler now performs stricter checking on function prototypes and pointer operations. This may lead to previously undiagnosed warnings/errors appearing when compiling incorrect or ambiguous code.
  • The C compiler diagnostic messages have been improved to print more information, making it easier to isolate the problem.
  • A new warning (W130) has been added to the C compiler to diagnose possible precision loss on assignment operations. This warning is never on by default and must be enabled through '#pragma enable_message(130)' or '-wce=130' switch.
  • Support for C99 style variable argument macros (and __VA_ARGS__) has been added to the C and C++ compilers.
  • Added support for the __func__ symbol (name of the current function) which is equivalent to the already existing __FUNCTION__ symbol.
  • Better C99 style support for "long long" type is now available in the C and C++ compilers. LL, ULL and LLU suffixes are recognized for constants. "long long int" is now also recognized.
  • Added C99 style *LLONG_MIN/MAX defines to limits.h.
  • The C++ compiler has been fixed to properly accept source files where a template was the last item in a namespace or an external linkage.
  • Several new -adxx options have been added to the C and C++ compilers to support automatic generation of 'make' style dependency files.
  • The C compiler has been fixed to correctly diagnose illegal union assignments.
  • The C compiler now issues warnings on operations involving pointers to different but compatible unions.
  • The C and C++ compilers now ensure word alignment of wide character string literals to satisfy Win32 API restrictions.
  • The __UNIX__ macro is now supported in C and C++ compilers, wmake and wasm. It is currently defined for QNX and Linux targets.
  • Default windowing support has been re-enabled for Win16 and Win386 runtime libraries.
  • Since default windowing is no longer supported on most platforms, the Programmer's Guide and IDE tutorial have been updated to reflect that fact.
  • The Win32 GUI tools now support the Windows XP look and feel.
  • AutoCAD and MFC targets have been removed from the IDE, the -bw switch (default windowing) is no longer available in the IDE for OS/2 and Win32 targets.
  • Manual for the CauseWay DOS extender has been added.
  • The dmpobj tool has been added. This utility dumps the contents of OMF object files and can be useful to developers.
  • Several system definitions have been added to wlink: os2_pm (16-bit OS/2 Presentation Manager executable), os2_dll (16-bit OS/2 DLL) and os2v2_dll (32-bit OS/2 DLL).
  • The linker has been fixed to read "AR" style archives produced by third party tools.
  • The linker has been fixed to prevent crashes when linking with COFF files providing uninitialised COMDAT entries
  • Several linker crashes related to ELF object files and executables have been resolved.
  • Updated wlink to call wlib with the -c (case sensitive) option when creating import libraries. This fixes problems with DLLs that export symbols differring only in case.
  • The C runtime library has been optimized to produce smaller executables.
  • The printf() function now supports the "ll" format specifier for "long long" integers.
  • The printf() function has been enhanced to support %b format specifier for bitfields.
  • Execution order of C library termination routines is now better defined to prevent instances where temporary files created through mktemp() could be left behind.
  • [OS/2 32-bit] To prevent crashes, termination code is not run if second instance of a DLL failed to load due to single DGROUP.
  • [OS/2 32-bit] The __grow_handles() function was incorrectly adding n requested handles to existing limit instead of setting the limit to n.
  • [OS/2 32-bit] Fixed a problem with _STACKLOW in multithreaded programs and DLLs. This prevents crashes where Fortran DLLs would run out of stack.
  • [OS/2 16-bit] Fixed default math exception handler which wasn't popping the FP status word off the stack and would therefore crash on exit.
  • The Win32 Image Editor has been enhanced with drag-and-drop support.
  • The IDE has been fixed to properly handle mixed case filenames.
  • The Microsoft compatibility tools (NMAKE, CL) have been fixed to better handle command line arguments.
  • The Dialog Editor (wde) has been fixed to prevent occasional DDE related crashes when run from inside the Resource Editor (wre).
  • The 'Change font' option no longer crashes the GUI debugger (wdw).
  • On OS/2, wdw now intercepts the F10 key instead of passing it on to the system.
  • The code generator now deletes object files if it was interrupted. Previously zero-length invalid object files could be left behind, interfering with make operation.
  • The wasm assembler has been enhanced to generate file dependency information usable by wmake.
  • Numerous minor fixes have been made to wasm.
  • Compatibility with MASM 6 has been improved with wasm.
  • Support for sysenter and sysexit instructions has been added to wasm and wdis.
  • Disassembly of xchg and bound instructions has been fixed in wdis (corrected order of operands).
  • Several previously undocumented wmake directives have been documented.
  • A -sn ('noisy') option has been added to wmake to print all commands that wmake executes, including silent ones.
  • The w32api project has been updated to the latest version.
  • The os2api project has been enhanced - added multimedia headers and libraries and numerous fixes have been made to the header files.
  • The debugger now supports the F7 key as a shortcut for "run to cursor". This is consistent with CodeView.
  • New internal variable dbg$ntid (next thread id) has been added to the debugger. This permits automated iteration of all threads.
  • The wsample tool has been updated to dynamically allocate storage for command line, where previously the command line length was limited to 128 characters.
  • The FORTRAN compiler has been changed to preserve case of symbols with linkage other than FORTRAN. This is especially helpful when calling OS API functions and using case sensitive link step (now default).

List of changes in Open Watcom 1.1

  • Using the -ol option (loop optimization) sometimes resulted in generation of incorrect code.
  • The printf() function could access too much data when formatting strings, causing page faults.
  • NANs, INFs and denormals were not handled correctly by the math emulation library.
  • The assembler did not generate implicit segment override prefixes when accessing data in code segment.
  • The clock() function sometimes produced incorrect results on OS/2 if the TZ environment variable was set.
  • The Open Watcom editor (vi/viw) has been changed to store temporary files in directory designated by the TMP environment variable, instead of using the TMPDIR environment variable.
  • Many packaging problems (missing files) have been resolved.

List of changes in Open Watcom 1.0

Open Watcom 1.0 is not substantially different from Watcom version 11.0. There are however several changes that may require you to change your source and/or makefiles or project files.

  • The C compiler now implements stricter function prototype processing. This may result in new warning or error messages on code that was previously compiling cleanly but contained mismatches between function prototypes and actual definitions. The C++ compiler did not have this problem.
  • The linker now defaults to case sensitive symbol resolution. In most cases this is not a problem and may in fact avoid certain problems. If your project relies on case insensitive linking, please add OPTION NOCASEEX to your linker directives.
  • Default windowing support has been removed from the runtime libraries.
  • Components of the Win32 SDK and OS/2 Toolkits are no longer supplied.
  • MFC libraries, source code and documentation are no longer supplied.
Personal tools