[llvm-commits] [llvm] r41378 - in /llvm/trunk: include/llvm/ADT/APFloat.h lib/CodeGen/SelectionDAG/SelectionDAG.cpp lib/Support/APFloat.cpp lib/VMCore/Constants.cpp

Dale Johannesen dalej at apple.com
Fri Aug 24 16:38:45 PDT 2007


On Aug 24, 2007, at 4:03 PM, Chris Lattner wrote:

>>
>> +    /* The definition of equality is not straightforward for
>> floating point,
>> +       so we won't use operator==.  Use one of the following, or
>> write
>> +       whatever it is you really mean. */
>> +    bool operator==(const APFloat &) const;     // DO NOT IMPLEMENT
>
> Hey Dale,
>
> I think that you can just remove this and the compiler will give you
> a compile-time error if you try to use it.  If you define it like
> this, you just get a link-time error.

Yep, and the linker error message doesn't tell you where the  
reference is coming from (I'm speaking from experience).  I mostly  
did it this way because I see about 40 other places it was done this  
way, and I  do see the utility as a statement of intent.  Why is this  
one different?




More information about the llvm-commits mailing list