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]
Other format: [Raw text]

Re: Patch for warnings on various cross targets -- PA string handling breakage


> Looking back at it, I concluded that most of this patch:
> 
> http://gcc.gnu.org/ml/gcc-patches/2001-10/msg01066.html
> 
> is really a whole bunch of obvious one-line changes.

> +2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
> +
...
> +       * pa-protos.h (output_ascii): Use regular char *, not unsigned.
> +       * pa.c (output_ascii): Likewise.

I believe this patch has broken the handling of string constants on the
PA.  The following test program demonstrates the problem:

#define  GZIP_MAGIC     "\037\213"
extern int f (char *);
int g (void)
{
  return (f (GZIP_MAGIC));
}

The assembler output for GZIP_MAGIC is:

        .STRING "\x1f\xOb\x00"

The output for the second character should obviously be x8b.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)


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