This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Endless "declared 'static' but never defined" warnings with stage 2 & 3 compilers
- From: t-rexky <gvvn1200 at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Cc: Vincent Rivière <vincent dot riviere at freesbee dot fr>
- Date: Sun, 1 Jul 2012 10:16:43 -0400
- Subject: Re: Endless "declared 'static' but never defined" warnings with stage 2 & 3 compilers
- References: <2EAA874D-E5C8-4DD2-9686-9AB2CD9BCE6B@gmail.com> <4FD72FF6.5010203@freesbee.fr> <A3440FFD-7E1C-4336-AB9F-F3EA3601DC60@gmail.com>
On 2012-06-17, at 11:54 PM, t-rexky wrote:
> When I have a moment I will check my target configuration once again and if this does not help I will spend some time with
> a debugger to see if I can figure out where things go wrong. I'm afraid though that I will get completely lost in the complexity
> of gcc.
Unfortunately I am not able to use gdb-4.7 in a sensible way since it is having trouble with most of the data types that I need to
inspect. However, I spent quite a bit more time with the compiler and I was able to make a small step in the right direction.
I discovered that if I rebuild stage 3 with BOOT_CFLAGS="-g -O0", the warnings in stage 3 compiler all disappear! This is despite
that fact that the stage 2 compiler was built with -O2 and continues to generate the warnings.
I then tried to isolate which specific -O1 optimization flag was responsible for the issue. Unfortunately many recompiles later
I determined that the issue arises from gcc -O1 optimization code that is not controlled by any of the flags that -O1 switches on.
Recompiling stage 3 with all the optimization flags equivalent to -O1 produces stage 3 compiler that does not generate any
of the warnings.
So I am baffled and stuck yet again...
>> Good luck.
>>
>> --
>> Vincent Rivière
>
> Thank you,
> t-rexky