Use of -Wextra-semi-stmt?

Viewed 662

The -Wextra-semi-stmt (included in clang -Weverything) complains about extra semicolons

static void f(void) {}
#define g(x) (void)x;

int main()
{
    f();; // warning
    g(0); // warning
}

I understand that the warning shows that there's one semicolon too many. But why am I warned? Is there any potential danger it tries to warn me of?

0 Answers
Related