This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Wdisabled-optimizations strange warning
- From: Ian Lance Taylor <iant at google dot com>
- To: "Paulo J. Matos" <paulo at matos-sorge dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Wed, 31 Aug 2011 07:42:27 -0700
- Subject: Re: Wdisabled-optimizations strange warning
- References: <j3kvsk$ng1$1@dough.gmane.org>
"Paulo J. Matos" <paulo@matos-sorge.com> writes:
> With GCC 4.3.4:
> $ echo 'char id[] = "x";' > id_test.c
> $ gcc-4.3.4 -Wdisabled-optimization -c id_test.c
> cc1: warning: -funit-at-a-time is required for inlining of functions
> that are only called once
>
> What's the reason for this warning? GCC46 doesn't emit it so I am
> guessing this is a bug. Anyone agree?
Certainly looks like a bug.
I'm guessing that in gcc 4.3 -Wdisabled-optimization can only be used
with -O.
Ian