From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 20243 invoked from network); 13 Jul 1999 11:22:19 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 13 Jul 1999 11:22:19 -0000 Received: from beach.frankfurt.netsurf.de (root@beach.frankfurt.netsurf.de [194.64.181.2]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id HAA05000 for ; Tue, 13 Jul 1999 07:16:10 -0400 Received: from frankfurt.netsurf.de (deck-175.frankfurt.netsurf.de [194.64.181.207]) by beach.frankfurt.netsurf.de (8.8.5/8.8.5) with ESMTP id NAA00799 for ; Tue, 13 Jul 1999 13:16:06 +0200 (MET DST) Sender: fabwes@beach.frankfurt.netsurf.de Message-ID: <378B1F63.1AEACAB0@frankfurt.netsurf.de> Date: Tue, 13 Jul 1999 13:13:39 +0200 From: Joachim Wesner X-Mailer: Mozilla 4.05 [en] (X11; I; Linux 2.0.36 i586) MIME-Version: 1.0 To: axp-list@redhat.com Subject: Re: an evil memcpy() optimizer bug! (egcs-1.1.2, alphaev6, linux) References: <199907131008.LAA05659@mvagusta> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Phil Carmody wrote: > > The 'YEP' paragraph has no connection to the ISO C language at all. > > There is no way an C coder can specify that a register be used for > either a variable or a parameter. One may hint, or suggest, but not specify. > It it the compiler's responsibility to ensure that anything one takes the > address of has an address, and thus is not solely stored in a register. > It was a bug, which is why it appears to have been fixed. Compilers, > however, are permitted to keyhole optimise and convert known length calls > to functions like memcpy into more efficient code. MSVC++ does this without > even breaking into a sweat. > Hu ??? OK, this is not really defined for arguments (and should work anyhow, probably with an warning, as I wrote before), but my copy of K&R says something like (Sorry, only have it in German, need to translate it back): The operator & can only be applied to variables and vector elements ...... Also, taking the adress of a variable of memory class register is illegal ! Maybe this has been changed in ISO C ?? Then, sorry for my ignorance. Sincerely Joachim