Skip to content

Tests fail to compile: error: function definition is not allowed here, etc #23

@yurivict

Description

@yurivict
[ 11% 6/9] /usr/bin/cc  -I/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/../include -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -Wall -Wextra -Werror -g -std=gnu99 -Wno-unused-result -Wno-missing-field-initializers -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -MD -MT check/CMakeFiles/check_unit.dir/test/misc.c.o -MF check/CMakeFiles/check_unit.dir/test/misc.c.o.d -o check/CMakeFiles/check_unit.dir/test/misc.c.o -c /disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/test/misc.c
FAILED: check/CMakeFiles/check_unit.dir/test/misc.c.o 
/usr/bin/cc  -I/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/../include -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -Wall -Wextra -Werror -g -std=gnu99 -Wno-unused-result -Wno-missing-field-initializers -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -MD -MT check/CMakeFiles/check_unit.dir/test/misc.c.o -MF check/CMakeFiles/check_unit.dir/test/misc.c.o.d -o check/CMakeFiles/check_unit.dir/test/misc.c.o -c /disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/test/misc.c
/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/test/misc.c:14:42: error: function definition is not allowed here
        lambda(void *, (UNUSED size_t s) { return NULL; }),
                                         ^
/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/test/misc.c:14:9: error: use of undeclared identifier '__fn__'
        lambda(void *, (UNUSED size_t s) { return NULL; }),
        ^
/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/test/utils.h:40:51: note: expanded from macro 'lambda'
#define lambda(RType, Body) ({ RType __fn__ Body; __fn__; })
                                                  ^
/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/test/misc.c:15:41: error: function definition is not allowed here
        lambda(void, (UNUSED void *ptr) {})
                                        ^
/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/test/misc.c:15:9: error: use of undeclared identifier '__fn__'
        lambda(void, (UNUSED void *ptr) {})
        ^
/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/test/utils.h:40:51: note: expanded from macro 'lambda'
#define lambda(RType, Body) ({ RType __fn__ Body; __fn__; })
                                                  ^
/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/test/misc.c:14:9: error: initializing 'void *(*)(size_t)' (aka 'void *(*)(unsigned long)') with an expression of incompatible type 'void'
        lambda(void *, (UNUSED size_t s) { return NULL; }),
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/test/utils.h:40:29: note: expanded from macro 'lambda'
#define lambda(RType, Body) ({ RType __fn__ Body; __fn__; })
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/test/misc.c:15:9: error: initializing 'void (*)(void *)' with an expression of incompatible type 'void'
        lambda(void, (UNUSED void *ptr) {})
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/test/utils.h:40:29: note: expanded from macro 'lambda'
#define lambda(RType, Body) ({ RType __fn__ Body; __fn__; })
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 errors generated.
[ 22% 6/9] /usr/bin/cc -Dcsptr_EXPORTS -I/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/include/csptr -I/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/src -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -Wall -Wextra -Werror -g -std=gnu99 -Wno-unused-result -Wno-missing-field-initializers -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -fPIC   -fPIC -MD -MT CMakeFiles/csptr.dir/src/array.c.o -MF CMakeFiles/csptr.dir/src/array.c.o.d -o CMakeFiles/csptr.dir/src/array.c.o -c /disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/src/array.c
[ 33% 6/9] /usr/bin/cc  -I/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/../include -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -Wall -Wextra -Werror -g -std=gnu99 -Wno-unused-result -Wno-missing-field-initializers -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -MD -MT check/CMakeFiles/check_unit.dir/test/scalar.c.o -MF check/CMakeFiles/check_unit.dir/test/scalar.c.o.d -o check/CMakeFiles/check_unit.dir/test/scalar.c.o -c /disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/test/scalar.c
FAILED: check/CMakeFiles/check_unit.dir/test/scalar.c.o 
/usr/bin/cc  -I/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/../include -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -Wall -Wextra -Werror -g -std=gnu99 -Wno-unused-result -Wno-missing-field-initializers -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -MD -MT check/CMakeFiles/check_unit.dir/test/scalar.c.o -MF check/CMakeFiles/check_unit.dir/test/scalar.c.o.d -o check/CMakeFiles/check_unit.dir/test/scalar.c.o -c /disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/test/scalar.c
/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/test/scalar.c:13:76: error: function definition is not allowed here
    f_destructor dtor = lambda(void, (UNUSED void *ptr, UNUSED void *meta) { dtor_run = 1; });
                                                                           ^
/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/test/scalar.c:13:25: error: use of undeclared identifier '__fn__'
    f_destructor dtor = lambda(void, (UNUSED void *ptr, UNUSED void *meta) { dtor_run = 1; });
                        ^
/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/test/utils.h:40:51: note: expanded from macro 'lambda'
#define lambda(RType, Body) ({ RType __fn__ Body; __fn__; })
                                                  ^
/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/test/scalar.c:13:18: error: initializing 'f_destructor' (aka 'void (*)(void *, void *)') with an expression of incompatible type 'void'
    f_destructor dtor = lambda(void, (UNUSED void *ptr, UNUSED void *meta) { dtor_run = 1; });
                 ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/test/scalar.c:30:76: error: function definition is not allowed here
    f_destructor dtor = lambda(void, (UNUSED void *ptr, UNUSED void *meta) { dtor_run = 1; });
                                                                           ^
/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/test/scalar.c:30:25: error: use of undeclared identifier '__fn__'
    f_destructor dtor = lambda(void, (UNUSED void *ptr, UNUSED void *meta) { dtor_run = 1; });
                        ^
/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/test/utils.h:40:51: note: expanded from macro 'lambda'
#define lambda(RType, Body) ({ RType __fn__ Body; __fn__; })
                                                  ^
/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/test/scalar.c:30:18: error: initializing 'f_destructor' (aka 'void (*)(void *, void *)') with an expression of incompatible type 'void'
    f_destructor dtor = lambda(void, (UNUSED void *ptr, UNUSED void *meta) { dtor_run = 1; });
                 ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 errors generated.
[ 44% 6/9] /usr/bin/cc  -I/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/../include -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -Wall -Wextra -Werror -g -std=gnu99 -Wno-unused-result -Wno-missing-field-initializers -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -MD -MT check/CMakeFiles/check_unit.dir/test/shared.c.o -MF check/CMakeFiles/check_unit.dir/test/shared.c.o.d -o check/CMakeFiles/check_unit.dir/test/shared.c.o -c /disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/test/shared.c
FAILED: check/CMakeFiles/check_unit.dir/test/shared.c.o 
/usr/bin/cc  -I/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/../include -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -Wall -Wextra -Werror -g -std=gnu99 -Wno-unused-result -Wno-missing-field-initializers -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -MD -MT check/CMakeFiles/check_unit.dir/test/shared.c.o -MF check/CMakeFiles/check_unit.dir/test/shared.c.o.d -o check/CMakeFiles/check_unit.dir/test/shared.c.o -c /disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/test/shared.c
/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/test/shared.c:13:76: error: function definition is not allowed here
    f_destructor dtor = lambda(void, (UNUSED void *ptr, UNUSED void *meta) { dtor_run = 1; });
                                                                           ^
/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/test/shared.c:13:25: error: use of undeclared identifier '__fn__'
    f_destructor dtor = lambda(void, (UNUSED void *ptr, UNUSED void *meta) { dtor_run = 1; });
                        ^
/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/test/utils.h:40:51: note: expanded from macro 'lambda'
#define lambda(RType, Body) ({ RType __fn__ Body; __fn__; })
                                                  ^
/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/test/shared.c:13:18: error: initializing 'f_destructor' (aka 'void (*)(void *, void *)') with an expression of incompatible type 'void'
    f_destructor dtor = lambda(void, (UNUSED void *ptr, UNUSED void *meta) { dtor_run = 1; });
                 ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 errors generated.
[ 55% 6/9] /usr/bin/cc  -I/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/../include -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -Wall -Wextra -Werror -g -std=gnu99 -Wno-unused-result -Wno-missing-field-initializers -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -MD -MT check/CMakeFiles/check_unit.dir/test/test.c.o -MF check/CMakeFiles/check_unit.dir/test/test.c.o.d -o check/CMakeFiles/check_unit.dir/test/test.c.o -c /disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/test/test.c
[ 66% 6/9] /usr/bin/cc -Dcsptr_EXPORTS -I/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/include/csptr -I/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/src -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -Wall -Wextra -Werror -g -std=gnu99 -Wno-unused-result -Wno-missing-field-initializers -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -fPIC   -fPIC -MD -MT CMakeFiles/csptr.dir/src/mman.c.o -MF CMakeFiles/csptr.dir/src/mman.c.o.d -o CMakeFiles/csptr.dir/src/mman.c.o -c /disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/src/mman.c
ninja: build stopped: subcommand failed.

Rev. ac73451
clang-13
FreeBSD 13.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions