#include <stdio.h>
const char* a = "nope";
__attribute__((__constructor__)) static void foo(void) {
a = "yep";
}
int main(void) {
puts(a);
}
Gives compiler warning "'void foo(void)' defined but not used" and resulting binary prints "nope" under cparser 8ec1a76. Prints "yep" under GCC and Clang. Removing the keyword static fixes it.
Is cparser still maintained? There haven't been any commits in 5 months or resolved issues in over a year. It doesn't look like there's much point in logging these bugs; mostly I'm just doing it so that other people can find them in case they run into the same bug.