GCC emits type-punning warnings for inline functions in nsCoord.h

RESOLVED DUPLICATE of bug 351229

Status

()

Firefox
Build Config
RESOLVED DUPLICATE of bug 351229
12 years ago
12 years ago

People

(Reporter: Art Haas, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20060904 SeaMonkey/1.5a
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20060904 SeaMonkey/1.5a

Hi.

Building Firefox/SeaMonkey with GCC and optimization will produce many, many warnings about NS_IEEEPositiveInfinity()
and NS_IEEEIsNan() functions. The warnings can be removed
by replacing the casts in the function with the use of a
union, as is seen in the supplied patch being submitted with this bug report. The resulting build works seemingly without problems, and the build log has fewer warning messages to dig through benefitting developers.

Reproducible: Always

Steps to Reproduce:
1. Build Firefox/SeaMonkey with GCC and optimizations.
2. Watch the build log for the type-punning warnings.
3.




My machine is i686-pc-linux-gnu, so my build demonstrates that the warning cleanup works. I do not have a 64-bit machine to test the patch on, nor a 32-bit machine running in big-endian mode (like PPCLinux).
(Reporter)

Comment 1

12 years ago
Created attachment 236902 [details] [diff] [review]
Patch using a union to remove type-punning warnings.

Here's the patch promised in the initial bug report.

Comment 2

12 years ago
Someone already beat you to reporting this. :)

*** This bug has been marked as a duplicate of 351229 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → DUPLICATE
Summary: GCC emits type-punning warnings for inline functions in nsCoords.h → GCC emits type-punning warnings for inline functions in nsCoord.h
You need to log in before you can comment on or make changes to this bug.