URL:
<http://gna.org/bugs/?20731>
Summary: startpos_iter_init(): warning: type-punning to
incomplete type might break strict-aliasing rules
Project: Freeciv
Submitted by: jtn
Submitted on: Tue Apr 9 22:23:00 2013
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Status: None
Assigned to: None
Originator Email:
Open/Closed: Open
Release:
Discussion Lock: Any
Operating System: None
Planned Release:
_______________________________________________________
Details:
In passing in bug #20057, David Fernandez observed (2012 Aug 28):
---
[...] now I get a different error:
trunk:
cc1: warnings being treated as errors
map.c: In function ‘startpos_iter_init’:
map.c:1608: warning: type-punning to incomplete type might break
strict-aliasing rules
make[4]: *** [map.lo] Error 1
S2_4:
cc1: warnings being treated as errors
map.c: In function ‘startpos_iter_init’:
map.c:1558: warning: type-punning to incomplete type might break
strict-aliasing rules
make[4]: *** [map.lo] Error 1
----
(He said "I'm using ubuntu 9.04 that I can no longer update", so presumably
the GCC version was whatever was current in that release.)
The line pointed to on trunk at the time was
(void) nation_iter_init((struct nation_iter *) &iter->nation_iter);
Just raising this so we don't lose it. I've not tried to reproduce the warning
-- maybe it's been resolved in the months since, in which case close the
ticket. (But there do seem to be shenanigans in this area; see
startpos_iter_sizeof() for instance.)
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?20731>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev