On 2016-08-16 18:33, Robert Haas wrote:
> It wouldn't be that much work to maintain, either: we'd
> just set up some buildfarm members that compiled using C++ and when
> they turned red, we'd go fix it.

I think that there exist subtle differences between C and C++ that 
without compile-time diagnostic could potentially lead to different 
run-time behavior. As an artificial example:

$ cat ./test.c
#include <stdio.h>

int main(void) {
        FILE *f = fopen("test.bin", "w");
        if (f == NULL)
                return 1;
        fwrite("1", sizeof '1', 1, f);
        return 0;
$ clang ./test.c -o test
$ ./test
$ hexdump test.bin
0000000 0031 0000
$ clang++ ./test.c -o test
clang-3.9: warning: treating 'c' input as 'c++' when in C++ mode, this 
behavior is deprecated
$ ./test
$ hexdump test.bin
0000000 0031

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to