[Bug preprocessor/89738] Warn for unused macro arguments
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89738 Andrew Pinski changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed||2021-12-19 Severity|normal |enhancement --- Comment #3 from Andrew Pinski --- Confirmed, though I don't know if this warning should be enabled by default as there are many macro functions which don't use the arguments, especially conditional defined ones.
[Bug preprocessor/89738] Warn for unused macro arguments
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89738 --- Comment #2 from Dávid Bolvanský --- #define PARENT_NODE(x) ((id - 1) / 2) int id = 0; int idx = 1; PARENT_NODE(idx); // macro contais id, but id is defined, warn? But probably such analysis is not so easy...
[Bug preprocessor/89738] Warn for unused macro arguments
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89738 Andrew Pinski changed: What|Removed |Added Component|c |preprocessor --- Comment #1 from Andrew Pinski --- One of the issue is that some macro functions are designed to ignore the argument; e.g. assert.