Subject:
|
Re: More problems with floats
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Mon, 13 May 2002 16:59:46 GMT
|
Viewed:
|
2359 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:
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 (...) (23 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
|
|
|
|