bug-gperf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gperf] [PATCH] Use always_inline attribute with gcc


From: Lucas De Marchi
Subject: [bug-gperf] [PATCH] Use always_inline attribute with gcc
Date: Tue, 18 May 2010 21:34:24 -0300

This guarantees the code will be inlined even when no optimizations were
chosen. Prior behavior was not to inline when -O0 was passed or when
compiling with -fno-inline.
---
 src/output.cc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/output.cc b/src/output.cc
index 4b0e4c6..65e9def 100644
--- a/src/output.cc
+++ b/src/output.cc
@@ -1895,7 +1895,7 @@ Output::output_lookup_function () const
     printf ("#ifdef __GNUC__\n"
             "__inline\n"
             "#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__\n"
-            "__attribute__ ((__gnu_inline__))\n"
+            "__attribute__ ((__always_inline__))\n"
             "#endif\n"
             "#endif\n");
 
-- 
1.7.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]