This is the mail archive of the
mailing list for the GCC project.
Re: [RFC] Changes to the wide-int classes
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: <gcc-patches at gcc dot gnu dot org>, <zadeck at naturalbridge dot com>, <mikestump at comcast dot net>, <rguenther at suse dot de>
- Date: Mon, 02 Sep 2013 18:43:45 +0100
- Subject: Re: [RFC] Changes to the wide-int classes
- Authentication-results: sourceware.org; auth=none
- References: <87wqn0bb5q dot fsf at talisman dot default> <Pine dot LNX dot 4 dot 64 dot 1309021535070 dot 17654 at digraph dot polyomino dot org dot uk>
"Joseph S. Myers" <firstname.lastname@example.org> writes:
> On Sun, 1 Sep 2013, Richard Sandiford wrote:
>> like to get rid of them and just keep the genuine operators. The problem
>> is that I'd have liked the AND routine to be "wi::and", but of course that
>> isn't possible with "and" being a keyword, so I went for "wi::bit_and"
>> instead. Same for "not" and "wi::bit_not", and "or" and "wi::bit_or".
>> Then it seemed like the others should be bit_* too, and "wi::bit_and_not"
>> just seems a bit unwieldly...
>> Hmm, if we decide to forbid the use of "and" in gcc, perhaps we could
>> #define it to something safe. But that would probably be too confusing.
> "and" in C++ is not a keyword, but an alternative token (like %> etc.).
> As such, it can't be defined as a macro, or used as a macro name in
> #define, #ifdef etc., and does not get converted to 0 in #if conditions
> but is interpreted as an operator there.
Ah, thanks, hadn't realised that. In some ways I'm glad that such a bad
idea would fail to work :-)