Andres Freund <and...@anarazel.de> writes: > What is bugging me is that I am fairly sure that my local compilers at some > point complained about such mismatches on linux as well. But I can't reproduce > that right now :/
> Now I wonder if I just saw it when cross compiling locally... I still don't understand what are the conditions for MSVC to complain. The rule is evidently not that every extern must agree with the function definition, because for example you added +extern PGDLLEXPORT void _PG_init(void); in fmgr.h, but you didn't change any of the existing extern declarations or definitions for _PG_init functions, and yet everything seems to work. I had concluded that gcc/clang follow the rule "use an attribute if it appears on at least one extern for the function", and this seems like evidence that it works like that in MSVC too. regards, tom lane