On 2019-11-12 20:00, Andres Freund wrote:
Looking at the cplusplus variant, I'm somewhat surprised to see that you made both fallback and plain version unconditionally use GCC style compound expressions:
Was that intentional? The C version intentionally uses compound expressions only for the _Static_assert case, where configure tests for the compound expression support? As far as I can tell this'll not allow using our headers e.g. with msvc in C++ mode if somebody introduce a static assertion in a header - which seems like a likely and good outcome with the changes proposed here?
I don't recall all the details anymore, but if you're asking, why is the fallback implementation in C++ different from the one in C, then that's because the C variant didn't work in C++.
I seem to recall that I did this work in order to get an actual C++-using extension to compile, so it worked(tm) at some point, but I probably didn't try it with a not-gcc compatible compiler at the time.
-- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services