On Tue, Nov 24, 2020 at 10:06 AM David Rowley <dgrowle...@gmail.com> wrote: > > On Tue, 24 Nov 2020 at 09:36, David Rowley <dgrowle...@gmail.com> wrote: > > Well, that makes it look pretty good. If we can get 10-15% on some > > machines without making things slower on any other machines, then that > > seems like a good win to me. > > Pushed. > > Thank you both for reviewing this. > > David > >
Hmmm, unfortunately this seems to break my build ... make[1]: Entering directory `/space2/pg13/postgres/src' make -C common all make[2]: Entering directory `/space2/pg13/postgres/src/common' gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -O0 -DFRONTEND -I. -I../../src/common -I../../src/include -D_GNU_SOURCE -DVAL_CC="\"gcc -std=gnu99\"" -DVAL_CPPFLAGS="\"-D_GNU_SOURCE\"" -DVAL_CFLAGS="\"-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -O0\"" -DVAL_CFLAGS_SL="\"-fPIC\"" -DVAL_LDFLAGS="\"-Wl,--as-needed -Wl,-rpath,'/usr/local/pg14/lib',--enable-new-dtags\"" -DVAL_LDFLAGS_EX="\"\"" -DVAL_LDFLAGS_SL="\"\"" -DVAL_LIBS="\"-lpgcommon -lpgport -lpthread -lz -lreadline -lrt -ldl -lm \"" -c -o archive.o archive.c In file included from ../../src/include/postgres_fe.h:25:0, from archive.c:19: ../../src/include/c.h:198:49: error: missing binary operator before token "(" #if defined(__has_attribute) && __has_attribute (cold) ^ ../../src/include/c.h:204:49: error: missing binary operator before token "(" #if defined(__has_attribute) && __has_attribute (hot) ^ make[2]: *** [archive.o] Error 1 make[2]: Leaving directory `/space2/pg13/postgres/src/common' make[1]: *** [all-common-recurse] Error 2 make[1]: Leaving directory `/space2/pg13/postgres/src' make: *** [world-src-recurse] Error 2 [gregn@localhost postgres]$ gcc --version gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44) Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I think your commit needs to be fixed based on the following documentation: https://gcc.gnu.org/onlinedocs/cpp/_005f_005fhas_005fattribute.html#g_t_005f_005fhas_005fattribute "The first ‘#if’ test succeeds only when the operator is supported by the version of GCC (or another compiler) being used. Only when that test succeeds is it valid to use __has_attribute as a preprocessor operator. As a result, combining the two tests into a single expression as shown below would only be valid with a compiler that supports the operator but not with others that don’t. " (Thanks to my colleague Peter Smith for finding the doc explanation) Regards, Greg Nancarrow Fujitsu Australia