Mail Archives: djgpp/2000/02/24/06:56:02
On Tue, 22 Feb 2000, Rossz Vámos-Wentworth wrote:
> #ifdef L_floatdidf
> #define WORD_SIZE (sizeof (SItype) * BITS_PER_UNIT)
> #define HIGH_HALFWORD_COEFF (((UDItype) 1) << (WORD_SIZE / 2))
> #define HIGH_WORD_COEFF (((UDItype) 1) << WORD_SIZE)
>
> DFtype
> __floatdidf (DItype u)
> {
> DFtype d;
>
> d = (SItype) (u >> WORD_SIZE); // line 995
> d *= HIGH_HALFWORD_COEFF;
> d *= HIGH_HALFWORD_COEFF;
> d += (USItype) (u & (HIGH_WORD_COEFF - 1)); // line 998
>
> return d;
> }
> #endif
> code ends ---------------------------------------------
>
> Output here:
>
> _floatdidf
> ./libgcc2.c: In function `__floatdidf':
> ./libgcc2.c:995: warning: right shift count >= width of type
> ./libgcc2.c:998: warning: left shift count >= width of type
Are you sure the last warning was about a left shift, not a right
shift? I don't see any left shift on line 998.
Anyway, I think that these warnings are harmless in this case.
> > > Since they are only warning errors and I don't care about
> > > the runtime libraries, I didn't worry.
> >
> > How so? libgcc.a is an essential part of the compiler, you might be
> > unable to produce executables that can be run on the target without
> > libgcc.
>
> I have my own runtime libraries. None of the original GNU libraries can be
> used, anyway (it's an embedded system).
libgcc is also used for some instructions that the target processor
lacks, like long long support. Do you have your own libraries for
this as well?
> > Add -save-temps to the compiler switches and examine the *.ii files it
> > leaves behind. You will then see what does cc1 see on that line.
>
> All it displayed was the name of the file being compiled.
The -save-temps switch doesn't display anything, it prevents the
compiler from deleting the temporary files created by the compiler
passes. Those files are left behind in your temporary-file directory
(the one pointed by the TMPDIR variable), so you should look for them
there.
- Raw text -