Skip to content

[osx] -Wpedantic can not be enabled as we use a GNU extension #30

@k4rtik

Description

@k4rtik

If I add -pedantic/-Wpedantic to the Makefile, I receive the following errors:

$ make
cc -fPIC -Wall -Werror -Wunused -Wextra -Wpedantic -O0 -g -std=c11 -fprofile-arcs -ftest-coverage   -c -o common.o common.c
In file included from common.c:5:
./common.h:36:14: error: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Werror,-Wgnu-zero-variadic-macro-arguments]
    log_err(M, ##__VA_ARGS__);                                                 \
             ^
./common.h:25:55: error: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Werror,-Wgnu-zero-variadic-macro-arguments]
          __LINE__, __FUNCTION__, errno, clean_errno(), ##__VA_ARGS__)
                                                      ^
./common.h:36:14: error: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Werror,-Wgnu-zero-variadic-macro-arguments]
    log_err(M, ##__VA_ARGS__);                                                 \
             ^
./common.h:25:55: error: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Werror,-Wgnu-zero-variadic-macro-arguments]
          __LINE__, __FUNCTION__, errno, clean_errno(), ##__VA_ARGS__)
                                                      ^
4 errors generated.
make: *** [common.o] Error 1

No clean solution exists. See: https://stackoverflow.com/questions/5588855/standard-alternative-to-gccs-va-args-trick

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions