This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

64-bit (?) patch for cp/spew.c


The following warning message is given for line 1253 of cp/spew.c
on alphaev6-unknown-linux-gnu:

overflow in implicit constant conversion

I don't really know why this warning was given, so I didn't make up
a ChangeLog entry, but I think the following is the Right Thing to do
to fix it (sizeof returns a long on alpha):

===================================================================
RCS file: RCS/spew.c,v
retrieving revision 1.1
diff -p -r1.1 spew.c
*** spew.c	2000/09/11 21:10:34	1.1
--- spew.c	2000/09/29 01:58:15
*************** snarf_defarg ()
*** 1250,1256 ****
    /* Unget the last token.  */
    push_token ((struct token *) (obstack_base (&inline_text_obstack) + point));
    /* This is the documented way to shrink a growing obstack block.  */
!   obstack_blank (&inline_text_obstack, - sizeof (struct token));
  
   done:
    len = obstack_object_size (&inline_text_obstack);
--- 1250,1256 ----
    /* Unget the last token.  */
    push_token ((struct token *) (obstack_base (&inline_text_obstack) + point));
    /* This is the documented way to shrink a growing obstack block.  */
!   obstack_blank (&inline_text_obstack, - (int) sizeof (struct token));
  
   done:
    len = obstack_object_size (&inline_text_obstack);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]