Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling without CMC_CALLBACKS support generates warning #43

Open
duarm opened this issue Jan 26, 2024 · 0 comments
Open

Compiling without CMC_CALLBACKS support generates warning #43

duarm opened this issue Jan 26, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@duarm
Copy link

duarm commented Jan 26, 2024

Bug Report template

Describe the bug

Compiling without CMC_CALLBACKS support, generates the following warning with -pedantic:

In file included from /cmc/list.h:84:
/cmc/list/struct.h:43:20: warning: extra ';' inside a struct [-Wextra-semi]
        CMC_CALLBACKS_DECL;

Without CMC_CALLBACKS, CMC_CALLBACKS_DECL is expanded to nothing, so CMC_CALLBACKS_DECL; indeed produces a stray semicolon,

Expected behavior

Perhaps suppress the warning somehow with #pragmas, or something like this

struct {
...
#ifdef CMC_CALLBACKS
     cmc_callback callbacks:
#endif
}
@duarm duarm added the bug Something isn't working label Jan 26, 2024
@duarm duarm changed the title Compiling without CMC_CALLBACKS supports generates warning Compiling without CMC_CALLBACKS support generates warning Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant