URL:
<http://gna.org/patch/?4421>
Summary: Ignore tautological-compare compiler errors with
--enable-debug
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
_______________________________________________________
Details:
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
<http://gna.org/patch/download.php?file_id=19720>
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?4421>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev