This is the mail archive of the
mailing list for the newlib project.
Re: [RFA] Avoid aliasing problems tickled by gcc-3.4.4
On Thu, Jun 16, 2005 at 04:06:28PM -0400, Jeff Johnston wrote:
>Christopher Faylor wrote:
>>Really? I wasn't really sure about the ldtoa.c changes since I didn't
>>detect any obvious breakage there.
>Sorry, I am confused here. I thought you said that using the
>-Wstrict-aliasing option uncovered problems in ldtoa.c. The
>recommended way from gcc to handle such aliasing problems is to use a
I didn't see any obvious problems with the code in ldtoa.c under gcc 3.4
before/after the patch. The only symptom I saw was the warning from
The vfprintf warning, however, was indicative of a miscompilation, which
seemed to be a compiler bug. Fixing the aliasing problems in vfprintf.c
corrected the compiler problems regardless.
I thought that I should probably provide a patch to fix the
strict-aliasing problems in two files that gcc detected even though I
only detected an actual problem in one case.