Summary: Ignore tautological-compare compiler errors with
                 Project: Freeciv
            Submitted by: cazfi
            Submitted on: Sat 11 Jan 2014 08:13:58 AM EET
                Category: bootstrap
                Priority: 5 - Normal
                  Status: Ready For Test
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 2.4.2, 2.5.0, 2.6.0



This came up when trying to compile with clang again.

We use tautological comparisons heavily, and on purpose, to make code more
future-proof. For instance comparison ">= 0" may not make sense against
unsigned type, but it doesn't hurt as it's compiler's job to notice that *in
current codebase* it should not generate any extra code for the "else". If the
type ever gets changed to signed one, the code is ready. Coder (human being)
making the type change would be likely to miss some places where one would
then need to add such comparison for widely-used type.


File Attachments:

Date: Sat 11 Jan 2014 08:13:58 AM EET  Name: TautologicalCompare.patch  Size:
965B   By: cazfi



Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to