public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/5132: NaN = 0.0 * HUGE_VAL fails to compile in templates
@ 2002-01-29  1:53 nathan
  0 siblings, 0 replies; 6+ messages in thread
From: nathan @ 2002-01-29  1:53 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nathan, wwcopt

Synopsis: NaN = 0.0 * HUGE_VAL fails to compile in templates

State-Changed-From-To: analyzed->closed
State-Changed-By: nathan
State-Changed-When: Tue Jan 29 01:53:26 2002
State-Changed-Why:
    2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
    
    	PR c++/5132
    	* typeck2.c (digest_init): Make sure non-array core type is
    	instantiated.
    	* decl2.c (reparse_absdcl_as_casts): Just store the type in the
    	constructor, rather than build a new one.
    	(build_expr_from_tree, CONSTRUCTOR case): Be careful with the
    	PURPOSE of constructor elts.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5132


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: c++/5132: NaN = 0.0 * HUGE_VAL fails to compile in templates
@ 2002-01-26 13:23 nathan
  0 siblings, 0 replies; 6+ messages in thread
From: nathan @ 2002-01-26 13:23 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nathan, wwcopt

Synopsis: NaN = 0.0 * HUGE_VAL fails to compile in templates

State-Changed-From-To: closed->analyzed
State-Changed-By: nathan
State-Changed-When: Sat Jan 26 13:23:40 2002
State-Changed-Why:
    Reopened, as one cannot actually instantiate the offending
    function now. Still working on a patch

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5132


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: c++/5132: NaN = 0.0 * HUGE_VAL fails to compile in templates
@ 2002-01-02  3:39 nathan
  0 siblings, 0 replies; 6+ messages in thread
From: nathan @ 2002-01-02  3:39 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nathan, wwcopt

Synopsis: NaN = 0.0 * HUGE_VAL fails to compile in templates

State-Changed-From-To: analyzed->closed
State-Changed-By: nathan
State-Changed-When: Wed Jan  2 03:39:04 2002
State-Changed-Why:
    2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
    
    	PR c++/5132
    	* decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
    	are processing a template decl.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5132


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: c++/5132: NaN = 0.0 * HUGE_VAL fails to compile in templates
@ 2001-12-31  6:27 nathan
  0 siblings, 0 replies; 6+ messages in thread
From: nathan @ 2001-12-31  6:27 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nathan, nobody, wwcopt

Synopsis: NaN = 0.0 * HUGE_VAL fails to compile in templates

Responsible-Changed-From-To: unassigned->nathan
Responsible-Changed-By: nathan
Responsible-Changed-When: Mon Dec 31 06:27:12 2001
Responsible-Changed-Why:
    patch in progress

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5132


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: c++/5132: NaN = 0.0 * HUGE_VAL fails to compile in templates
@ 2001-12-30 15:39 nathan
  0 siblings, 0 replies; 6+ messages in thread
From: nathan @ 2001-12-30 15:39 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, wwcopt

Synopsis: NaN = 0.0 * HUGE_VAL fails to compile in templates

State-Changed-From-To: open->analyzed
State-Changed-By: nathan
State-Changed-When: Sun Dec 30 15:39:07 2001
State-Changed-Why:
    confirmed

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5132


^ permalink raw reply	[flat|nested] 6+ messages in thread

* c++/5132: NaN = 0.0 * HUGE_VAL fails to compile in templates
@ 2001-12-16 10:36 wwcopt
  0 siblings, 0 replies; 6+ messages in thread
From: wwcopt @ 2001-12-16 10:36 UTC (permalink / raw)
  To: gcc-gnats


>Number:         5132
>Category:       c++
>Synopsis:       NaN = 0.0 * HUGE_VAL fails to compile in templates
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 16 10:36:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     wolfgang wander
>Release:        3.1 20011216 (experimental)
>Organization:
none
>Environment:
System: Linux groby 2.4.17-pre5 #39 Sat Dec 8 15:36:51 EST 2001 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc/configure --enable-long-long --enable-languages=c++,c --prefix=/work/gcc
>Description:
    Generating a NaN from 0.0*HUGE_VAL fails with a tree check error
    if the expression is inside template code (function or class).
>How-To-Repeat:
    Compile the following code with g++ -c bugnan.C
    ------------------------- bugnan.C ----------------------
// snippets from bits/huge_val.h

#define __HUGE_VAL_bytes        { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }
#define __huge_val_t    union { unsigned char __c[8]; double __d; }
#define HUGE_VAL       (__extension__ \
                         ((__huge_val_t) { __c: __HUGE_VAL_bytes }).__d)


void
foo( const int&) {
  const double nan = 0.0 * HUGE_VAL; // no problem here
}

template <class F>
void
Tfoo( const F&) {
  const double nan = 0.0 * HUGE_VAL; // g++ fails here
}
    --------------------------
>Fix:
   Only workaround is to avoid templates ...

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-01-29  9:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-29  1:53 c++/5132: NaN = 0.0 * HUGE_VAL fails to compile in templates nathan
  -- strict thread matches above, loose matches on Subject: below --
2002-01-26 13:23 nathan
2002-01-02  3:39 nathan
2001-12-31  6:27 nathan
2001-12-30 15:39 nathan
2001-12-16 10:36 wwcopt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).