Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Sep 1998 19:44:58 -0400 (EDT)
From:      Simon Shapiro <shimon@simon-shapiro.org>
To:        Kevin Day <toasty@home.dragondata.com>
Cc:        freebsd-current@FreeBSD.ORG, (Terry Lambert) <tlambert@primenet.com>
Subject:   Re: Compiler Problem in 64bit math?
Message-ID:  <XFMail.980928194458.shimon@simon-shapiro.org>
In-Reply-To: <199809280229.VAA13889@home.dragondata.com>

next in thread | previous in thread | raw e-mail | index | archive | help
[ Sorry for the late reaction...]

Kevin Day, On 28-Sep-98 you wrote:
> > > works correctly.  IF, however, I change the first line to be:
> > > 
> > >          register off_t top_size    = QUAD_MAX, ...
> > > 
> > > then the test at the bottom is always false.  This is with large
> > > numbers,
> > > such as QUAD_MAX...
> > 
> > What processor are you using?
> > 
> > If the Alpha, then I'm surprised.

P6-200 Works well on the Alpha.

> > If Intel, well, you realize that registers are 32 bits, right?  I'm
> > not sure the compiler knows how to do a 64 bit register, but you
> > might be confusing it into trying.  8-(.

Must be, as the same exact code works wwll in another program.
> > 
> > 
> >                                     Terry Lambert
> >                                     terry@lambert.org
>  
>  I believe this is illegal though... Doesn't ansi say that by adding the
>  'register' modifier, the type/size can't silently change?

Then the compiler should generate an error message, me thinks.

>  'register' is a suggestion, if it can't do it, it's just supposed to
>  ignore
>  it, so why is this happening? :)

They used to call these compiler bugs :-)


Sincerely Yours,                 Shimon@Simon-Shapiro.ORG
                                             770.265.7340
Simon Shapiro

Unwritten code has no bugs and executes at twice the speed of mouth


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.980928194458.shimon>