concurrencykit / ck

Concurrency primitives, safe memory reclamation mechanisms and non-blocking (including lock-free) data structures designed to aid in the research, design and implementation of high performance concurrent systems developed in C99+.
http://concurrencykit.org/
Other
2.34k stars 312 forks source link

compilation: error: expected expression before 'struct' #197

Closed jscheid-ventana closed 1 year ago

jscheid-ventana commented 1 year ago

Only attempting a vanilla build. GCC is 12.2.0

% ./configure --prefix=/work/jscheid/src/gh/concurrencykit/ck/INSTALL
Detecting operating system.......success [linux]
Detecting machine architecture...success [x86_64]
Finding dirname command..........success [/usr/bin/dirname]
Determining build directory......success [/users/jscheid/work/src/gh/concurrencykit/ck]
Finding gzip tool................success [/usr/bin/gzip]
Finding suitable compiler........success [/usr/bin/cc]
Finding suitable archiver........success [/usr/bin/ar]
Detecting VMA bits...............success [48]
Checking header file usability...success [stdbool.h]
Checking header file usability...success [stddef.h]
Checking header file usability...success [stdint.h]
Checking header file usability...success [string.h]
Detecting git SHA................success [6e8e5be]
Generating header files..........success
Generating build files...........success

           VERSION = 0.7.1
           GIT_SHA = 6e8e5be
         BUILD_DIR = /users/jscheid/work/src/gh/concurrencykit/ck
           SRC_DIR = /users/jscheid/work/src/gh/concurrencykit/ck
            SYSTEM = linux
           PROFILE = x86_64
                AR = /usr/bin/ar
                CC = /usr/bin/cc
          COMPILER = gcc
            CFLAGS = -D_BSD_SOURCE -D_DEFAULT_SOURCE -std=gnu99 -pedantic -Wall -W -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wcast-align -Wcast-qual -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wdisabled-optimization -fstrict-aliasing -O2 -pipe -Wno-parentheses  -fPIC -D_XOPEN_SOURCE=600
    PTHREAD_CFLAGS = -pthread
                LD = /usr/bin/cc
            LDNAME = libck.so
    LDNAME_VERSION = libck.so.0.7.1
      LDNAME_MAJOR = libck.so.0
           LDFLAGS = -Wl,-soname,libck.so.0 -m64  -shared -fPIC
        STATIC_LIB = 0
              GZIP = /usr/bin/gzip -c
             CORES = 1
      POINTER_PACK = CK_MD_POINTER_PACK_DISABLE
      PPC32_LWSYNC = CK_MD_PPC32_LWSYNC_DISABLE
          VMA_BITS = 48
      MEMORY_MODEL = CK_MD_TSO
               RTM = CK_MD_RTM_DISABLE
               LSE = CK_MD_LSE_DISABLE
               SSE = CK_MD_SSE_ENABLE

Headers will be installed in /work/jscheid/src/gh/concurrencykit/ck/INSTALL/include
Libraries will be installed in /work/jscheid/src/gh/concurrencykit/ck/INSTALL/lib
Documentation will be installed in /work/jscheid/src/gh/concurrencykit/ck/INSTALL/share/man
% make regressions
...
../../../include/ck_ec.h:493:5: error: expected expression before ���struct���
     struct ck_ec32 : ck_ec32_inc,   \
     ^
ck_ec_smoke_test.c:369:2: note: in expansion of macro ���ck_ec_inc���
  ck_ec_inc(&ec, mode);
  ^
ck_ec_smoke_test.c: In function ���test_threaded_add_64���:
../../../include/ck_ec.h:516:5: error: expected expression before ���struct���
     struct ck_ec32 : ck_ec32_add,    \
     ^
ck_ec_smoke_test.c:387:2: note: in expansion of macro ���ck_ec_add���
  ck_ec_add(&ec, mode, 4);
  ^
make[2]: *** [ck_ec_smoke_test] Error 1
make[2]: Leaving directory `/work/jscheid/src/gh/concurrencykit/ck/regressions/ck_ec/validate'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/work/jscheid/src/gh/concurrencykit/ck/regressions'
make: *** [regressions] Error 2
jscheid-ventana commented 1 year ago

I suspect this is something to do with my toolchain or OS environment. I can build on other platforms, so won't burden you with this unless I can root cause.