patch: revise doc for always_inline

Andrew Pinski pinskia@physics.uc.edu
Wed Nov 29 20:08:00 GMT 2006


> I recently discovered (got a bug :-) that the always_inline attribute  
> doesn't always work at -O0 or -O1.  This is because always_inline  
> requires -funit-at-a-time, and -funit-at-a-time is off for -O0 and -O1.

Actually unit-at-a-time is on for -O1 and has been since before 4.1.0.

I think the only time always-inline can fail is really is the function that is
declared as always inline is used before it was declared.

Maybe you should show an example of where it fails because there has been
talk about getting rid of no unit-at-a-time anyways.
Also it might be a good idea to put this example in the documentation.

Thanks,
Andrew Pinski

PS here are the changelog references for unit-at-a-time being turned on at -O1:
2006-05-26  Eric Botcazou  <ebotcazou@adacore.com>

        * doc/invoke.texi (Optimize Options): Document that -funit-at-a-time
        is enabled at -O and above.

2005-06-24  Jan Hubicka  <jh@suse.cz>

        * opts.c (decode_options): Enable unit-at-a-time by default at -O1.



More information about the Gcc-patches mailing list