This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: Patch for PR 28288 & PR 14556, Remove <? and >? operators from C++


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


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