public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: richarda@ixla.com.au
To: gcc-gnats@gcc.gnu.org
Subject: c++/1722: unsigned int confused with pointer
Date: Sun, 01 Apr 2001 00:00:00 -0000	[thread overview]
Message-ID: <20010122033327.20919.qmail@sourceware.cygnus.com> (raw)

>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


                 reply	other threads:[~2001-04-01  0:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010122033327.20919.qmail@sourceware.cygnus.com \
    --to=richarda@ixla.com.au \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).