This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch for warnings on various cross targets -- PA string handling breakage
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: gcc-patches at gcc dot gnu dot org, ghazi at caiprutgers dot edu
- Date: Fri, 30 Nov 2001 15:36:54 -0500 (EST)
- Subject: 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)