Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/25/11 06:45
Read: times


 
#180763 - Looks Like...
Responding to: ???'s previous message
Looks as if this error refers to the specified line number @ SDCCval.c:1073.

If this is a source file for some part of library code or intrinsic functions that SDCC places into the compiled code then it seems that more information could be had by looking at source file SDCCval.C. Maybe this is available in the source tree of SDCC at their web site.

I found a copy of SDCCval.C (it may very well not be the latest version) at this web location:

http://www.ecse.rpi.edu/courses/C.../SDCCval.c

When I opened that page and looked toward line #1073 I seem to be looking at this subroutine at the line number I marked as #1073:
/*------------------------------------------------------------------*/
/* floatFromVal - value to double float conversion                  */
/*------------------------------------------------------------------*/
double
floatFromVal (value * val)
{
  if (!val)
    return 0;

  if (val->etype && SPEC_SCLS (val->etype) != S_LITERAL)
    {
      werror (E_CONST_EXPECTED, val->name);
      return 0;
    }

  /* if it is not a specifier then we can assume that */
  /* it will be an unsigned long                      */
  if (!IS_SPEC (val->type))
    return SPEC_CVAL (val->etype).v_ulong;

  if (SPEC_NOUN (val->etype) == V_FLOAT)
    return SPEC_CVAL (val->etype).v_float;

  if (SPEC_NOUN (val->etype) == V_FIXED16X16)
    return doubleFromFixed16x16 (SPEC_CVAL (val->etype).v_fixed16x16);

  if (SPEC_LONG (val->etype))
    {
      if (SPEC_USIGN (val->etype))
        return SPEC_CVAL (val->etype).v_ulong;
      else
        return SPEC_CVAL (val->etype).v_long;
    }

  if (SPEC_NOUN (val->etype) == V_INT)
    {
      if (SPEC_USIGN (val->etype))
        return SPEC_CVAL (val->etype).v_uint;
      else
        return SPEC_CVAL (val->etype).v_int;
    }

  if (SPEC_NOUN (val->etype) == V_CHAR)
    {
      if (SPEC_USIGN (val->etype))
        return (unsigned char) SPEC_CVAL (val->etype).v_uint;
1073: else
        return (signed char) SPEC_CVAL (val->etype).v_int;
    }

  if (IS_BITVAR(val->etype))
    return SPEC_CVAL (val->etype).v_uint;

  if (SPEC_NOUN (val->etype) == V_VOID)
    return SPEC_CVAL (val->etype).v_ulong;

  /* we are lost ! */
  werror (E_INTERNAL_ERROR, __FILE__, __LINE__, "floatFromVal: unknown value");
  return 0;
}


Michael Karas




List of 7 messages in thread
TopicAuthorDate
SDCC validateLink failed            01/01/70 00:00      
   Looks Like...            01/01/70 00:00      
   please post code            01/01/70 00:00      
      minimal example            01/01/70 00:00      
         if you trust me enough...            01/01/70 00:00      
            This is more probably a bug in SDCC            01/01/70 00:00      
   Workaround            01/01/70 00:00      

Back to Subject List