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: Vincent Rivière <vincent dot riviere at freesbee dot fr>
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 8 Jul 2012 08:32:24 -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> <463F5883-4834-49CA-A123-7A26D9BA0377@gmail.com> <4FF0807D.5010809@freesbee.fr>
On 2012-07-01, at 12:53 PM, Vincent Rivière wrote:
> On 01/07/2012 16:16, t-rexky wrote:
>> I discovered that if I rebuild stage 3 with BOOT_CFLAGS="-g -O0", the
>> warnings in stage 3 compiler all disappear!
>
> This is extremely wierd!
>
> So it looks like something is affected by the optimization level. Usually, it is an uninitialized variable, buffer overflow, strict aliasing issue, or maybe a GCC bug...
>
> Since it is unlikely that this specific bug is in the standard GCC sources (other people would have noticed), maybe it could be somewhere in the C sources added for your NeXT configuration?
I am also certain that this is somehow related to my configuration so I reviewed my target config files once again but there
was nothing obvious staring back at me.
At one point I thought that there was an issue with the TARGET_ASM_SELECT_SECTION function that I pulled in from gcc-3.2.3,
so I completely rewrote it using the Darwin version from gcc-4.2.4 (conveniently Darwin is almost identical to NEXTSTEP minus some new features like weak support, coalesced sections, etc). I spent the last week fiddling with this due to the length of the
bootstrap process on the 68040, but unfortunately to no avail...
I might have no choice but to get a newer gdb version going if I do not find anything else...
t-rexky