This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch for PR 28288 & PR 14556, Remove <? and >? operators from C++
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Steve Ellcey <sje at cup dot hp dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 9 Aug 2006 17:39:45 +0000 (UTC)
- Subject: Re: Patch for PR 28288 & PR 14556, Remove <? and >? operators from C++
- References: <200608091720.KAA12724@hpsje.cup.hp.com>
On Wed, 9 Aug 2006, Steve Ellcey wrote:
> This patch resolves PR c++/28288 and PR c++/14556 by removing the <?,
> >?, <?=, and >?= operators from C++. The comments in the PR say that
> they were supposed to be removed in 4.1 but they were not. Both the 4.0
> and 4.1 branches do give a 'depreciated' message when they are used.
>
> This patch is to remove them from 4.2 and, as a side effect, get rid of
> the ICE failures reported in the bug reports and thus resolve the two
> defects. I do not intend to backport this to the 4.1 branch.
>
> Most of the changes are in the libcpp directory, but I also changed two
> files in gcc/cp and removed a number of tests. I added one test to make
> sure we give errors on these operators now instead of just warnings.
>
> OK for Checkin? Tested on IA64 HP-UX and Linux with no regressions.
When this was being deprecated I gave Mark a testcase illustrating how the
extension causes us to mishandle valid code. The following testcase
should be added to the testsuite as C++ code that is currently wrongly
rejected because of this extension, but should be accepted after the
patch.
#define foo < ## <?
#define h(x) #x
#define s(x) h(x)
const char *p = s(foo);
--
Joseph S. Myers
joseph@codesourcery.com