This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: about inline
- From: ishare <june dot tune dot sea at gmail dot com>
- To: Chung-Ju Wu <jasonwucj at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 26 Mar 2013 08:41:08 +0800
- Subject: Re: about inline
- References: <20130324034422 dot GC23928 at debian dot localdomain> <CADj25HN6BOZ+rRyRf+B01mACPh_pgn490smORPnMietOx_UVow at mail dot gmail dot com> <1364127702 dot 2351 dot 44 dot camel at yam-132-YW-E178-FTW> <20130325032703 dot GA10084 at debian dot localdomain> <CADj25HP4bwEMOYjShnVXrJ4aiw-Rx6gOGoJhhOtQ09qBb9N0hg at mail dot gmail dot com>
On Mon, Mar 25, 2013 at 10:18:25PM +0800, Chung-Ju Wu wrote:
> 2013/3/25 ishare <june.tune.sea@gmail.com>:
> > On Sun, Mar 24, 2013 at 01:21:42PM +0100, Oleg Endo wrote:
> >> On Sun, 2013-03-24 at 15:03 +0800, Chung-Ju Wu wrote:
> >> > 2013/3/24, ishare <june.tune.sea@gmail.com>:
> >> > >
> >> > > If I not use optimization in compilation , will those inline functions be
> >> > > actually inlined by gcc ?
> >> > >
> >> > > thanks!
> >> > >
> >> >
> >> > Not unless you use 'always_inline' attribute.
> >> >
> >> > http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html#Function-Attributes
> >>
> >> Also, when in error or in doubt, use option '-save-temps' and look at
> >> the asm code that is generated by the compiler.
> >
> > Can this help to print all temp varibles on stack whose value may be optimized out by -O2 ?
> >
> > thanks!
>
> Hi,
>
> No. The option '-save-temps' is to store the intermediate files permanently.
>
> If you want to know what variables/statement might be optimized out,
> you should use some static code analysis tools.
Are there static code analysis tools for linux ?
I only know some for windows .
Thanks!
>
>
>
> Best regards,
> jasonwucj