This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: optimization/3289
- To: nobody at gcc dot gnu dot org
- Subject: Re: optimization/3289
- From: <jef dot alpha dot soft at wanadoo dot fr>
- Date: 21 Jun 2001 09:56:02 -0000
- Cc: gcc-prs at gcc dot gnu dot org,
- Reply-To: <jef dot alpha dot soft at wanadoo dot fr>
The following reply was made to PR optimization/3289; it has been noted by GNATS.
From: <jef.alpha.soft@wanadoo.fr>
To: <gcc-gnats@gcc.gnu.org>,
<gcc-prs@gcc.gnu.org>,
<jef.alpha.soft@wanadoo.fr>,
<gcc-bugs@gcc.gnu.org>,
<nobody@gcc.gnu.org>
Cc:
Subject: Re: optimization/3289
Date: Thu, 21 Jun 2001 11:51:24 +0200
This is a multi-part message in MIME format.
------=_NextPart_000_0022_01C0FA48.7F144CC0
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_0023_01C0FA48.7F144CC0"
------=_NextPart_001_0023_01C0FA48.7F144CC0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=3Dview&pr=3D3289&database=3Dgc=
c
Sorry for the attached file, here is the right one.
Thanks
JEF
P.S.:=20
in case of pbs, here is the exemple :
extern __const int *__ctype_tolower; /* Case conversions. */
# define __tobody(c, f, a) \
(__extension__ \
({ int __res; \
if (sizeof (c) > 1) \
{ \
if (__builtin_constant_p (c)) \
{ \
int __c =3D (c); \
__res =3D __c < -128 || __c > 255 ? __c : a[__c]; \
} \
else \
__res =3D f (c); \
} \
else \
__res =3D a[(int) (c)]; \
__res; }))
# define tolower(c) __tobody (c, tolower, __ctype_tolower)
/*-----------------------------------------------------------------------=
-------
LOWER-
SCO_SV!jef 98/01/29 15:32:16
-------------------------------------------------------------------------=
-----*/
static void Lower( string )
char * string;
{
while( *string ) *string++ =3D tolower( *string );
}
/*-----------------------------------------------------------------------=
-------
MAIN-
Linux!alpha 2001/06/0020 13:25:55
-------------------------------------------------------------------------=
-----*/
int main()
{
char p[] =3D "string";
Lower( p );
printf("(%s)\n", p );
}
------=_NextPart_001_0023_01C0FA48.7F144CC0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV> </DIV>
<DIV><A=20
href=3D"http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=3Dview&pr=3D3289&a=
mp;database=3Dgcc">http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=3Dview&=
pr=3D3289&database=3Dgcc</A></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Sorry for the attached file, here =
is the=20
right one.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Thanks</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>JEF</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>P.S.: </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>in case of pbs, here is the exemple =
:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>extern __const int *__ctype_tolower; /* =
Case=20
conversions. */</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2># define __tobody(c, f, a) \<BR> =20
(__extension__  =
; =20
\<BR> ({ int=20
__res; &=
nbsp;=20
\<BR> if (sizeof (c) >=20
1) =20
\<BR> { &=
nbsp; =20
\<BR> if (__builtin_constant_p=20
(c)) =20
\<BR> =20
{ =
=20
\<BR> int __c =3D=20
(c); =20
\<BR> __res =3D __c < -128 || __c =
> 255=20
? __c : a[__c]; =20
\<BR> =20
} =
=20
\<BR> =20
else &nb=
sp; =20
\<BR> __res =3D f=20
(c); =20
\<BR> } &=
nbsp; =20
\<BR> =20
else &nb=
sp; =20
\<BR> __res =3D a[(int)=20
(c)]; =20
\<BR> __res; }))</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2># define tolower(c) __tobody (c, =
tolower,=20
__ctype_tolower)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial=20
size=3D2>/*--------------------------------------------------------------=
----------------<BR> LOWER-<BR>SCO_SV!jef=20
98/01/29=20
15:32:16<BR>-------------------------------------------------------------=
-----------------*/</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>static void Lower( string )<BR>char *=20
string;<BR>{<BR> while( *string ) *string++ =3D tolower( =
*string=20
);<BR>}<BR>/*------------------------------------------------------------=
------------------<BR> MAIN-<BR>Linux!alpha=20
2001/06/0020=20
13:25:55<BR>-------------------------------------------------------------=
-----------------*/</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>int main()<BR>{<BR> char p[] =3D=20
"string";</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> Lower( p =
);<BR> printf("(%s)\n", p=20
);<BR>}<BR></FONT></DIV></BODY></HTML>
------=_NextPart_001_0023_01C0FA48.7F144CC0--
------=_NextPart_000_0022_01C0FA48.7F144CC0
Content-Type: application/octet-stream;
name="aa.c"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="aa.c"
/*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D[ (c) ALPHA SOFT =
]=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
=0A=
FICHIER : [aa.c]=0A=
=0A=
DATE : 2001/06/0020 13:25:21=0A=
=0A=
CREATEUR : [Linux!alpha]=0A=
=0A=
COMMENTAIRE :=0A=
=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=0A=
--- gcc -v=0A=
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0/specs=0A=
Configured with: ./configure --enable-languages=3Dc++=0A=
Thread model: single=0A=
gcc version 3.0=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D*/=0A=
=0A=
/* this is an a short cut to my ctype.h tolower function */=0A=
=0A=
extern __const int *__ctype_tolower; /* Case conversions. */=0A=
=0A=
# define __tobody(c, f, a) \=0A=
(__extension__ \=0A=
({ int __res; \=0A=
if (sizeof (c) > 1) \=0A=
{ \=0A=
if (__builtin_constant_p (c)) \=0A=
{ \=0A=
int __c =3D (c); \=0A=
__res =3D __c < -128 || __c > 255 ? __c : a[__c]; \=0A=
} \=0A=
else \=0A=
__res =3D f (c); \=0A=
} \=0A=
else \=0A=
__res =3D a[(int) (c)]; \=0A=
__res; }))=0A=
=0A=
# define tolower(c) __tobody (c, tolower, __ctype_tolower)=0A=
=0A=
/*-----------------------------------------------------------------------=
-------=0A=
LOWER-=0A=
SCO_SV!jef 98/01/29 15:32:16=0A=
-------------------------------------------------------------------------=
-----*/=0A=
=0A=
static void Lower( string )=0A=
char * string;=0A=
{=0A=
while( *string ) *string++ =3D tolower( *string );=0A=
}=0A=
/*-----------------------------------------------------------------------=
-------=0A=
MAIN-=0A=
Linux!alpha 2001/06/0020 13:25:55=0A=
-------------------------------------------------------------------------=
-----*/=0A=
=0A=
int main()=0A=
{=0A=
char p[] =3D "string";=0A=
=0A=
Lower( p );=0A=
printf("(%s)\n", p );=0A=
}=0A=
=0A=
------=_NextPart_000_0022_01C0FA48.7F144CC0--