public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/1722: unsigned int confused with pointer
@ 2001-04-01 0:00 richarda
0 siblings, 0 replies; only message in thread
From: richarda @ 2001-04-01 0:00 UTC (permalink / raw)
To: gcc-gnats
>Number: 1722
>Category: c++
>Synopsis: unsigned int confused with pointer
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jan 21 19:36:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Richard Andrews, Ixla Ltd.
>Release: CVS-2001-01-15
>Organization:
>Environment:
i686-pc-linux-gnu (RH6.2)
>Description:
Construction of unsigned int results in pointer type.
>How-To-Repeat:
compile this
int
main()
{
typedef unsigned int UInt32;
double d1(11.1);
UInt32 whole( UInt32(d1) );
UInt32 whole2 = UInt32(d1);
double remainder( d1 - double(whole) );
remainder = d1 - double(whole2);
return 0;
}
>Fix:
A work-around exits. Use
UInt32 whole = UInt32(d1);
instead of
UInt32 whole( UInt32(d1) );
>Release-Note:
>Audit-Trail:
>Unformatted:
>From dje@gcc.gnu.org Sun Apr 01 00:00:00 2001
From: dje@gcc.gnu.org
To: dje@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org
Subject: Re: target/248
Date: Sun, 01 Apr 2001 00:00:00 -0000
Message-id: <20010320223601.30301.qmail@sourceware.cygnus.com>
X-SW-Source: 2001-q1/msg02480.html
Content-length: 765
The following reply was made to PR target/248; it has been noted by GNATS.
From: dje@gcc.gnu.org
To: dje@gcc.gnu.org, gcc-gnats@gcc.gnu.org, matt_conway@i2.com,
nobody@gcc.gnu.org
Cc:
Subject: Re: target/248
Date: 20 Mar 2001 22:30:41 -0000
Synopsis: Template instantiation problems under aix 4.3.3.0
Responsible-Changed-From-To: unassigned->dje
Responsible-Changed-By: dje
Responsible-Changed-When: Tue Mar 20 14:30:41 2001
Responsible-Changed-Why:
AIX issue
State-Changed-From-To: analyzed->closed
State-Changed-By: dje
State-Changed-When: Tue Mar 20 14:30:41 2001
State-Changed-Why:
This has been fixed as much as practical in the gcc-3
development sources.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=248&database=gcc
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-04-01 0:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-01 0:00 c++/1722: unsigned int confused with pointer richarda
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).