You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While trying to build dethrace with OpenWatcom 2 (I haven't tried 1.x), I stumbled on this issue.
Dethrace is a CMake project, to which I had to apply small patches to support OpenWatcom.
Brace-enclosed initializing of a union type does not seem to work.
Building the example below in a minimal CMake project causes the following errors to be emitted:
Error log
/home/maarten/owatcom2/binl/wcl386 -zq -d+ -I/home/maarten/owatcom2/h -I/home/maarten/owatcom2/h/nt -aa -za -s -ot -d0 -dNDEBUG -foCMakeFiles/union_test.dir/main.c.obj -c -cc /home/maarten/projects/issues/main.c
/home/maarten/projects/issues/main.c(45): Error! E1063: Missing operand
/home/maarten/projects/issues/main.c(45): Error! E1009: Expecting ',' but found '{'
/home/maarten/projects/issues/main.c(45): Error! E1009: Expecting '}' but found '.'
/home/maarten/projects/issues/main.c(45): Error! E1009: Expecting ',' but found 'i'
/home/maarten/projects/issues/main.c(45): Error! E1063: Missing operand
/home/maarten/projects/issues/main.c(45): Error! E1009: Expecting ';' but found '}'
/home/maarten/projects/issues/main.c(45): Warning! W107: Missing return value for function 'main'
/home/maarten/projects/issues/main.c(45): Error! E1061: Expecting data or function declaration, but found ','
/home/maarten/projects/issues/main.c(46): Error! E1026: Invalid declarator
/home/maarten/projects/issues/main.c(46): Error! E1009: Expecting ';' but found '{'
/home/maarten/projects/issues/main.c(46): Error! E1061: Expecting data or function declaration, but found '{'
/home/maarten/projects/issues/main.c(46): Warning! W132: No storage class or type specified
/home/maarten/projects/issues/main.c(46): Error! E1034: Symbol 'BRT_MATRIX4' already defined
/home/maarten/projects/issues/main.c(46): Note! N2002: 'BRT_MATRIX4' defined in: /home/maarten/projects/issues/main.c(11)
/home/maarten/projects/issues/main.c(46): Error! E1034: Symbol 'br_value' already defined
/home/maarten/projects/issues/main.c(46): Note! N2002: 'br_value' defined in: /home/maarten/projects/issues/main.c(35)
/home/maarten/projects/issues/main.c(46): Error! E1129: Type does not agree with previous definition of 'br_value'
/home/maarten/projects/issues/main.c(46): Note! N2002: 'br_value' defined in: /home/maarten/projects/issues/main.c(35)
/home/maarten/projects/issues/main.c(46): Error! E1009: Expecting ';' but found '{'
/home/maarten/projects/issues/main.c(46): Error! E1061: Expecting data or function declaration, but found '{'
/home/maarten/projects/issues/main.c(46): Error! E1026: Invalid declarator
/home/maarten/projects/issues/main.c(46): Error! E1009: Expecting ';' but found '.'
/home/maarten/projects/issues/main.c(46): Error! E1061: Expecting data or function declaration, but found '.'
/home/maarten/projects/issues/main.c(46): Warning! W132: No storage class or type specified
/home/maarten/projects/issues/main.c(46): Warning! W102: Type mismatch (warning)
/home/maarten/projects/issues/main.c(46): Note! N2003: source conversion type is 'int *'
/home/maarten/projects/issues/main.c(46): Note! N2004: target conversion type is 'int'
/home/maarten/projects/issues/main.c(46): Error! E1009: Expecting ';' but found '}'
/home/maarten/projects/issues/main.c(46): Error! E1061: Expecting data or function declaration, but found '}'
/home/maarten/projects/issues/main.c(46): Error! E1147: Too many errors: compilation aborted
Error: Compiler returned a bad status compiling '/home/maarten/projects/issues/main.c'
ninja: build stopped: subcommand failed.
Small example
# Save this file as CMakeLists.txtcmake_minimum_required(VERSION 3.20)
project(openwatcom_unions)
add_executable(union_test main.c)
edit
I've been asked to run wcl386 without -zq so it showed the wcc386 invocation.
The build system runs (after configuring with -DCMAKE_C_FLAGS="-aa -za99"):
While trying to build dethrace with OpenWatcom 2 (I haven't tried 1.x), I stumbled on this issue.
Dethrace is a CMake project, to which I had to apply small patches to support OpenWatcom.
Brace-enclosed initializing of a union type does not seem to work.
Building the example below in a minimal CMake project causes the following errors to be emitted:
Error log
Small example
I can also reproduce this on ci: this is the project, and this is the ci result
edit
I've been asked to run
wcl386
without-zq
so it showed thewcc386
invocation.The build system runs (after configuring with
-DCMAKE_C_FLAGS="-aa -za99"
):Removing
-zq
shows:The text was updated successfully, but these errors were encountered: