From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gabriel Dos Reis To: Matt Austern Cc: gcc@gcc.gnu.org Subject: Re: Address of a cast expression in C++ Date: Tue, 06 Aug 2002 16:37:00 -0000 Message-id: References: <2D885D69-A994-11D6-BA47-00039390D9E0@apple.com> X-SW-Source: 2002-08/msg00402.html Matt Austern writes: | On Thursday, July 25, 2002, at 11:38 AM, Gabriel Dos Reis wrote: | | > | As I read the C++ Standard, this is incorrect; a diagnostic is | > | required. 5.4/1 says that the result of (char)n is an rvalue, | > | and 5.3.1/2 says that you can't take the address of an rvalue. | > | | > | Question: is this violation of the C++ Standard deliberate, | > | or is it a bug? | > | > I would say it is a result of a bug -- I suspect another instance of | > code duplication where the problem is fixed in C but not in C++ :-( | | You're right that code duplication is evil, but the problem here | turns out to be different from what we thought. Thanks for the update. Next time, I'll look much harder :-) :-) -- Gaby