[cfe-commits] r86129 - in /cfe/trunk: lib/Sema/Sema.h lib/Sema/SemaCXXCast.cpp lib/Sema/SemaDeclCXX.cpp lib/Sema/SemaOverload.cpp test/SemaTemplate/instantiate-complete.cpp utils/C++Tests/LLVM-Syntax/lit.local.cfg

Douglas Gregor dgregor at apple.com
Fri Nov 6 08:12:07 PST 2009


On Nov 5, 2009, at 10:59 PM, Chris Lattner wrote:

>
> On Nov 5, 2009, at 8:54 PM, Douglas Gregor wrote:
>
>>>
>>> We build with GCC with this warning though, it clang producing it  
>>> in cases where GCC isn't?
>>
>> Yes. All of the cases where Clang is producing a warning (but GCC  
>> doesn't) seem to have a cast on at least one side of the == or !=.
>
> Here are some comments from the GCC implementation.  It only emits  
> this for code that is not "skip_evaluation" whatever that is (not in  
> a template?).
>

IIRC, skip_evaluation is their flag that states when they are  
processing an unevaluated operand, e.g., the expression in

	sizeof expression

The Clang analogue to skip_evaluation is Sema::ExprEvalContext; we  
should not produce sign-comparison warnings when its value is  
Unevaluated (stating that we're in an unevaluated context).

	- Doug



More information about the cfe-commits mailing list