[cfe-commits] r69653 - in /cfe/trunk: include/clang/Lex/LiteralSupport.h lib/Lex/LiteralSupport.cpp
Neil Booth
neil at daikokuya.co.uk
Tue Apr 21 06:25:19 PDT 2009
Sanjiv Gupta wrote:-
> if (IsWide) {
> // Emulate GCC's (unintentional?) behavior: L'ab' -> L'b'.
> - Value = 0;
> + LitVal = 0;
> } else {
I know you didn't write that comment but I thought I'd clarify what
it is referring to, having written some or all of that part of GCC.
There's nothing unintentional at all; in fact it is natural - if
you're left-shifting out wchar_t bits worth of bits, and adding in
the new value of wchar_t bits, you get just the new value. In
generic code this wouldn't be a special case.
char is what's special here - they have type int but get shifted
in a char width at a time.
Neil.
More information about the cfe-commits
mailing list