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

warning: extra ‘;’ [-Wpedantic] #90

Open
corentinmusard opened this issue May 16, 2020 · 3 comments
Open

warning: extra ‘;’ [-Wpedantic] #90

corentinmusard opened this issue May 16, 2020 · 3 comments

Comments

@corentinmusard
Copy link

On gcc and clang, there is this warning when you put a ';' at then end of each macro when compiling with -pedantic.

// test.c(pp)
#include "fff.h"
DEFINE_FFF_GLOBALS;
FAKE_VOID_FUNC(DISPLAY_init);
@acazzaniga
Copy link

any update on this?

@m0rtalis
Copy link

Then don't do it?

@nradulovic
Copy link

nradulovic commented Nov 12, 2021

"Then don't do it" is not a solution. Macros should be implemented in such a way that when they are used in an expression they are always terminated with ";"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants