Skip to content

Commit 82aff8d

Browse files
committed
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.
1 parent 4de2d4f commit 82aff8d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/include/c.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -644,12 +644,13 @@ typedef NameData *Name;
644644

645645

646646
/*
647-
* Forcing a function not to be inlined can be useful if it's the slow-path of
648-
* a performance critical function, or should be visible in profiles to allow
649-
* for proper cost attribution.
647+
* Forcing a function not to be inlined can be useful if it's the slow path of
648+
* a performance-critical function, or should be visible in profiles to allow
649+
* for proper cost attribution. Note that unlike the pg_attribute_XXX macros
650+
* above, this should be placed before the function's return type and name.
650651
*/
651-
/* GCC, Sunpro and XLC support noinline via __attribute */
652-
#if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
652+
/* GCC, Sunpro and XLC support noinline via __attribute__ */
653+
#if (defined(__GNUC__) && __GNUC__ > 2) || defined(__SUNPRO_C) || defined(__IBMC__)
653654
#define pg_noinline __attribute__((noinline))
654655
/* msvc via declspec */
655656
#elif defined(_MSC_VER)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy