public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: bfkelly@nsa.gov To: gcc-gnats@gcc.gnu.org Subject: c/7762: cast problem with gcc-3.2 on x86 architectures Date: Thu, 29 Aug 2002 12:46:00 -0000 [thread overview] Message-ID: <20020829181455.20561.qmail@sources.redhat.com> (raw) >Number: 7762 >Category: c >Synopsis: cast problem with gcc-3.2 on x86 architectures >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Thu Aug 29 11:16:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: bfkelly@nsa.gov >Release: gcc-3.2 >Organization: >Environment: % uname -a Linux catalina 2.4.9-21smp #1 SMP Thu Jan 17 14:01:48 EST 2002 \ i686 unknown % % gcc -v Reading specs from /u/bfkelly/public/gcc-3.2/Linux-x86/lib/gcc-lib/\ i686-pc-linux-gnu/3.2/specs Configured with: ../gcc-3.2/configure --enable-languages=c \ --prefix=/u/bfkelly/public/gcc-3.2/Linux-x86 Thread model: posix gcc version 3.2 % >Description: /* Demonstrates a cast problem with gcc-3.2 on i686-pc-linux-gnu i386-pc-solaris2.8 but not on other systems tried (SunOS-sparc, OSF1, etc.) % uname -a Linux catalina 2.4.9-21smp #1 SMP Thu Jan 17 14:01:48 EST 2002 \ i686 unknown % % gcc -v Reading specs from /u/bfkelly/public/gcc-3.2/Linux-x86/lib/gcc-lib/\ i686-pc-linux-gnu/3.2/specs Configured with: ../gcc-3.2/configure --enable-languages=c \ --prefix=/u/bfkelly/public/gcc-3.2/Linux-x86 Thread model: posix gcc version 3.2 % % gcc -o foo foo.c % foo 960.000000 960 960.000000 959 ???? % */ #include <stdio.h> int main() { int n = 128000; printf ("%f\n", 128000 * 0.0075); printf ("%d\n", (int) (128000 * 0.0075)); printf ("%f\n", n * 0.0075); printf ("%d\n", (int) (n * 0.0075)); return(0); } >How-To-Repeat: % gcc -o foo foo.c % foo >Fix: >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2002-08-29 18:16 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-08-29 12:46 bfkelly [this message] 2002-10-10 11:49 hubicka
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=20020829181455.20561.qmail@sources.redhat.com \ --to=bfkelly@nsa.gov \ --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: linkBe 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).