To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 2555
2554  |  2556
Subject: 
Re: More problems with floats
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Mon, 13 May 2002 16:59:46 GMT
Viewed: 
2226 times
  
Eric Swalens  <eric.swalens@easynet.be> wrote:
When I try to compile a program containing the following function:

bool tr_guard_foo_loc2_t0() { return getVarVal(&var_foo_cl) >= 0.1; }

I get this error:

/tmp/ccyEbqnS.s: Assembler messages:
/tmp/ccyEbqnS.s:237: Error: cannot create floating-point number

Running gcc with -S gives that declaration at line 237

.LC2:
.float 9.76788634718520058494e-313

The code below seems to execute the function but this doesn't look like a
declaration of 0.1! In fact, if I type 0.5 instead of 0.1 in the source, I
still get the same declaration for LC2!

Any idea?

Eric, did you ever resolve this?

If not, I could try to reproduce this... but I'd need two things:

1) the type of the return value of getVarVal
2) the type of the bool typedef

Also, if you could run your cross compiler with the -v flag, that might
help also.

Also, if you could include the entire file you get with -S, that would be
great too.

-Kekoa



Message has 1 Reply:
  Re: More problems with floats
 
(...) It turns out to be the egcs 1.1.2 I compiled; the RPMs from sourceforge work fine. I'll try to find why my compiler was buggy... Thanks for your reply. Eric (22 years ago, 13-May-02, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  More problems with floats
 
When I try to compile a program containing the following function: bool tr_guard_foo_loc2_t0() { return getVarVal(&var_foo_cl) >= 0.1; } I get this error: /tmp/ccyEbqnS.s: Assembler messages: /tmp/ccyEbqnS.s:237: Error: cannot create floating-point (...) (22 years ago, 10-May-02, to lugnet.robotics.rcx.legos)

3 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR