This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How can I force an optimization level for a single file in aproject?
Stan Shebs <shebs@apple.com> writes:
> Incidentally, this is frequently requested by Apple developers who
> are trying to fine-tune performance - moving code into a separate
> file is not desirable because it affects visibility of static
> variables as well as inlining possibilities. Since Metrowerks'
> compiler does support this #pragma, its lack in GCC becomes a
> reason to continue using the proprietary compiler instead of the
> free one.
I don't think there's any objection in principle to the feature; the
difficulty is simply the mishmash of global variables that control
optimization levels. Maybe that option-parsing rewrite Neil keeps
threatening could have an improvement in this area as a side effect.
zw