public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/7762: cast problem with gcc-3.2 on x86 architectures
@ 2002-10-10 11:49 hubicka
  0 siblings, 0 replies; 2+ messages in thread
From: hubicka @ 2002-10-10 11:49 UTC (permalink / raw)
  To: bfkelly, gcc-bugs, gcc-prs, nobody

Synopsis: cast problem with gcc-3.2 on x86 architectures

State-Changed-From-To: open->closed
State-Changed-By: hubicka
State-Changed-When: Thu Oct 10 11:49:13 2002
State-Changed-Why:
    This is double rouding due to higher precision of x87 registers.  It is valid according to c99

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


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

* c/7762: cast problem with gcc-3.2 on x86 architectures
@ 2002-08-29 12:46 bfkelly
  0 siblings, 0 replies; 2+ messages in thread
From: bfkelly @ 2002-08-29 12:46 UTC (permalink / raw)
  To: gcc-gnats


>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:


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

end of thread, other threads:[~2002-10-10 18:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-10 11:49 c/7762: cast problem with gcc-3.2 on x86 architectures hubicka
  -- strict thread matches above, loose matches on Subject: below --
2002-08-29 12:46 bfkelly

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).