This is the mail archive of the
mailing list for the GCC project.
Re: [RFC] Changes to the wide-int classes
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Richard Sandiford <rdsandiford at googlemail 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, 2 Sep 2013 15:54:23 +0000
- Subject: Re: [RFC] Changes to the wide-int classes
- Authentication-results: sourceware.org; auth=none
- References: <87wqn0bb5q dot fsf at talisman dot default>
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. (The status of "new" and
"delete" in this regard is less clear; see
Joseph S. Myers