[Fixed-point] Bug in interpret_fixed ?

Mohamed Shafi shafitvm@gmail.com
Wed Jan 31 13:49:00 GMT 2007


Hello,

Is the variable "copylen", in the function interpret_fixed in c-lex.c,
updated properly for accum data types?

Here is the relevant portion.of the file(for unsigned accum)
http://gcc.gnu.org/viewcvs/branches/fixed-point/gcc/c-lex.c?revision=118838&view=markup


	  if ((flags & CPP_N_WIDTH) == CPP_N_LARGE)
	    {
	      type = unsigned_long_long_accum_type_node;
	      copylen -= 3;
	    }
	  else if ((flags & CPP_N_WIDTH) == CPP_N_MEDIUM)
	    {
	      type = unsigned_long_accum_type_node;
	      copylen -= 2;
	    }
	  else if ((flags & CPP_N_WIDTH) == CPP_N_SMALL)
	    {
	      type = unsigned_short_accum_type_node;
	      copylen -= 2;
	     }
	  else
	    {
	      type = unsigned_accum_type_node;
	      copylen --;
	    }


Regards,
Shafi



More information about the Gcc-patches mailing list