[LLVMdev] unrecognized command line option "-Wno-long-double"
dalej at apple.com
Thu Jun 5 13:27:44 CDT 2008
On Jun 5, 2008, at 4:33 AM, Duncan Sands wrote:
> Hi Filipe,
>> LLVM-gcc can't recognize this option, don't know why, because the gcc
>> in Mac OS X (quite old, compared to 4.2) can recognize it.
> mainline gcc-4.2 doesn't recognize this option as far as I can see.
> llvm-gcc is based on gcc-4.2, it has inherited this behaviour from it.
Not exactly. -Wno-long-double was always an Apple thing, not in FSF.
Here is the history:
In the earliest Apple releases of gcc (around 2000) long double was
implemented the same as double, which is C standard conformant but not
very useful; however, it was always planned to implement "real" long
double later. Thus, those releases warned about any use of long
double: "size may change in a future release". As always with
warnings, somebody wanted a way to turn it off, and -Wno-long-double
was added to do so. In due course the size of long double was
incompatibly changed, removing the need for the warning: the current
gcc-4.0 does not warn on long double, but continues to accept the
flag, which doesn't do anything. Going forward, gcc-4.2 will remove
the flag as well, and llvm-gcc-4.2 is already there.
So the best thing is not to use it. There is no reason to.
More information about the LLVMdev