Bug 20317 - Solaris 10 and HUGE_VAL
Summary: Solaris 10 and HUGE_VAL
Status: RESOLVED DUPLICATE of bug 19933
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 3.4.2
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-04 14:13 UTC by martin
Modified: 2005-07-23 22:49 UTC (History)
2 users (show)

See Also:
Host: sparc-sun-solaris2.10
Target: sparc-sun-solaris2.10
Build: sparc-sun-solaris2.10
Known to work:
Known to fail:
Last reconfirmed:


Attachments
preprocessor output (1.98 KB, text/plain)
2005-03-04 14:16 UTC, martin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description martin 2005-03-04 14:13:17 UTC
Compiling the program

#define _XOPEN_SOURCE 600
#include <math.h>

int main()
{
  double x = HUGE_VAL;
}

using 
/opt/sfw/bin/gcc --std=gnu99 a.c
gives
a.c: In function `main':
a.c:6: error: incompatible types in initialization

I'll attach the preprocessor output if I can; in short,
HUGE_VAL expands to __builtin_huge_val, which is a
function in gcc but a constant in SunPRO.

fixinclude needs to adjust this difference, fixing 
iso/math_c99.h appropriately.
Comment 1 martin 2005-03-04 14:16:33 UTC
Created attachment 8327 [details]
preprocessor output
Comment 2 joseph@codesourcery.com 2005-03-04 17:58:59 UTC
Subject: Re:  New: Solaris 10 and HUGE_VAL

On Fri, 4 Mar 2005, martin at v dot loewis dot de wrote:

> I'll attach the preprocessor output if I can; in short,
> HUGE_VAL expands to __builtin_huge_val, which is a
> function in gcc but a constant in SunPRO.
> 
> fixinclude needs to adjust this difference, fixing 
> iso/math_c99.h appropriately.

Surely this is the same as bug 19933?

Comment 3 Eric Botcazou 2005-03-04 18:10:34 UTC
> Surely this is the same as bug 19933?

Right, Duplicates with a big D. :-)


*** This bug has been marked as a duplicate of 19933 ***
Comment 4 martin 2005-03-04 19:01:23 UTC
Right. I did not find it because it does not have Solaris in its subject.