This is the mail archive of the gcc-prs@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]

Re: optimization/3289


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>&nbsp;</DIV>
 <DIV><A=20
 href=3D"http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=3Dview&amp;pr=3D3289&a=
 mp;database=3Dgcc">http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=3Dview&amp;=
 pr=3D3289&amp;database=3Dgcc</A></DIV>
 <DIV>&nbsp;</DIV>
 <DIV><FONT face=3DArial size=3D2>Sorry for the attached file,&nbsp; 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>&nbsp;</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>&nbsp;</DIV>
 <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
 <DIV><FONT face=3DArial size=3D2>extern __const int *__ctype_tolower; /* =
 Case=20
 conversions.&nbsp; */</FONT></DIV>
 <DIV>&nbsp;</DIV>
 <DIV><FONT face=3DArial size=3D2># define __tobody(c, f, a) \<BR>&nbsp;=20
 (__extension__&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n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bsp;&nbsp;&nbsp;&nb=
 sp;&nbsp;=20
 \<BR>&nbsp;&nbsp;&nbsp;&nbsp; __res =3D f=20
 (c);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
 \<BR>&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
 nbsp;&nbsp;&nbsp;=20
 \<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
 else&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
 sp;&nbsp;=20
 \<BR>&nbsp;__res =3D a[(int)=20
 (c)];&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
 \<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; __res; }))</FONT></DIV>
 <DIV>&nbsp;</DIV>
 <DIV><FONT face=3DArial size=3D2># define tolower(c) __tobody (c, =
 tolower,=20
 __ctype_tolower)</FONT></DIV>
 <DIV>&nbsp;</DIV>
 <DIV><FONT face=3DArial=20
 size=3D2>/*--------------------------------------------------------------=
 ----------------<BR>&nbsp;LOWER-<BR>SCO_SV!jef=20
 98/01/29=20
 15:32:16<BR>-------------------------------------------------------------=
 -----------------*/</FONT></DIV>
 <DIV>&nbsp;</DIV>
 <DIV><FONT face=3DArial size=3D2>static void Lower( string )<BR>char *=20
 string;<BR>{<BR>&nbsp;while( *string )&nbsp;*string++ =3D tolower( =
 *string=20
 );<BR>}<BR>/*------------------------------------------------------------=
 ------------------<BR>&nbsp;MAIN-<BR>Linux!alpha=20
 2001/06/0020=20
 13:25:55<BR>-------------------------------------------------------------=
 -----------------*/</FONT></DIV>
 <DIV>&nbsp;</DIV>
 <DIV><FONT face=3DArial size=3D2>int main()<BR>{<BR>&nbsp;char p[] =3D=20
 "string";</FONT></DIV>
 <DIV>&nbsp;</DIV>
 <DIV><FONT face=3DArial size=3D2>&nbsp;Lower( p =
 );<BR>&nbsp;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--
 


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