By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,332 Members | 1,117 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,332 IT Pros & Developers. It's quick & easy.

GCC 4.1.1 on redhat 4.5

P: 41
Hi,

Does anyone know how Ican use inline function calls when i have optimize turned off like so -00 -ggdb so that i can have debug symbols for debugging .
I am using gcc version 4.1.1 I have been looking on the gcc man pages and having no luck in finding the solution ...
In order for iinline functions it needs to have -02 (optimise level switched on)

Any one know what i could use
Nov 15 '07 #1
Share this Question
Share on Google+
1 Reply

Motoma
Expert 2.5K+
P: 3,237
Hi,

Does anyone know how Ican use inline function calls when i have optimize turned off like so -00 -ggdb so that i can have debug symbols for debugging .
I am using gcc version 4.1.1 I have been looking on the gcc man pages and having no luck in finding the solution ...
In order for iinline functions it needs to have -02 (optimise level switched on)

Any one know what i could use
A quick google for "gcc optimize inline" (without quotes) reveals:
GCC does not inline any functions when not optimizing unless you specify the always_inline attribute for the function, like this:

/* Prototype. */
inline void foo (const char) __attribute__((always_inline));
Nov 15 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.