bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: signed/unsigned issue in "as".


From: Nick Clifton
Subject: Re: signed/unsigned issue in "as".
Date: 21 Aug 2001 18:07:49 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Hi Rogier, 

> as problem. 
> 
> /home/wolff> rpm -qf `which as`
> binutils-2.9.1.0.25-11

This is quite an old version of binutils.  I would normally suggest
that you try downloading the latest version (2.11.2) and seeing if the
bug still exists in that version.  In this case however, my tests show
that it is also present in 2.11.2.

Also in order for us to debug this problem, you need to tell us which
target the assembler was configured for.  I have created a potential
patch (see below) but I cannot fully test it because I do not know
your environment.  Please could you try applying the patch to your
sources and let me know if it fixes the problem.

Cheers
        Nick

Index: read.c
===================================================================
RCS file: /cvs/src/src/gas/read.c,v
retrieving revision 1.46
diff -p -r1.46 read.c
*** read.c      2001/08/17 16:01:49     1.46
--- read.c      2001/08/21 17:06:50
*************** s_comm (ignore)
*** 1375,1388 ****
  
    input_line_pointer++;               /* skip ',' */
  
!   if ((temp = get_absolute_expression ()) < 0)
!     {
!       as_warn (_(".COMMon length (%ld) < 0 ignored"), (long) temp);
!       ignore_rest_of_line ();
!       if (flag_mri)
!       mri_comment_end (stop, stopc);
!       return;
!     }
  
    *p = 0;
    symbolP = symbol_find_or_make (name);
--- 1375,1407 ----
  
    input_line_pointer++;               /* skip ',' */
  
!   {
!     expressionS exp;
! 
!     /* We used to just call get_absolute_expression() here
!        but that does not allow us to detect large unsigned
!        numbers.  */
!     expression (& exp);
!     if (exp.X_op != O_constant)
!       {
!       if (exp.X_op != O_absent)
!         as_bad (_("bad or irreducible absolute expression"));
!       temp = 0;
!       }
!     else
!       {
!       temp = exp.X_add_number;
! 
!       if ((! exp.X_unsigned) && (temp < 0))
!         {
!           as_warn (_(".COMMon length (%ld) < 0 ignored"), (long) temp);
!           ignore_rest_of_line ();
!           if (flag_mri)
!             mri_comment_end (stop, stopc);
!           return;
!         }
!       }
!   }
  
    *p = 0;
    symbolP = symbol_find_or_make (name);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]