diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2017-10-14 15:52:00 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2017-10-14 15:52:00 -0400 |
commit | 82aff8d3369754282114cb0fff92a342b2864e75 (patch) | |
tree | 53f5f91d6f57c0102596d38640047c4dad9c419e /src/include/c.h | |
parent | 4de2d4fba38f4f7aff7f95401eb43a6cd05a6db4 (diff) | |
download | postgresql-82aff8d3369754282114cb0fff92a342b2864e75.tar.gz |
gcc's support for __attribute__((noinline)) hasn't been around forever.
Buildfarm member gaur says it wasn't there in 2.95.3. Guess that 3.0
and later have it.
Diffstat (limited to 'src/include/c.h')
-rw-r--r-- | src/include/c.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/include/c.h b/src/include/c.h index b39bbd7c71..62df4d5b0c 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -644,12 +644,13 @@ typedef NameData *Name; /* - * Forcing a function not to be inlined can be useful if it's the slow-path of - * a performance critical function, or should be visible in profiles to allow - * for proper cost attribution. + * Forcing a function not to be inlined can be useful if it's the slow path of + * a performance-critical function, or should be visible in profiles to allow + * for proper cost attribution. Note that unlike the pg_attribute_XXX macros + * above, this should be placed before the function's return type and name. */ -/* GCC, Sunpro and XLC support noinline via __attribute */ -#if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__) +/* GCC, Sunpro and XLC support noinline via __attribute__ */ +#if (defined(__GNUC__) && __GNUC__ > 2) || defined(__SUNPRO_C) || defined(__IBMC__) #define pg_noinline __attribute__((noinline)) /* msvc via declspec */ #elif defined(_MSC_VER) |