This is the mail archive of the 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: [RFC] Changes to the wide-int classes

"Joseph S. Myers" <> 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 :-)


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