#3900 closed defect (fixed)
type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
Reported by: | strk | Owned by: | pramsey |
---|---|---|---|
Priority: | high | Milestone: | PostGIS 2.5.0 |
Component: | postgis | Version: | 2.4.x |
Keywords: | Cc: |
Description
Recently introduced:
g_serialized.c: In function ‘gserialized_cmp’: g_serialized.c:308:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] *(uint32_t*)(g1->data) == POINTTYPE && ^ g_serialized.c:309:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] *(uint32_t*)(g2->data) == POINTTYPE && ^
strict aliasing rules are there so you don't assume it is safe to cast to pointers to structors of different alignemnt constraints.
Change History (4)
comment:3 by , 7 years ago
Milestone: | PostGIS 2.4.1 → PostGIS 2.5.0 |
---|
This was marked for 2.4.1 release but was not back-ported to 2.4.1. I've change the milestone to 2.5.0. If this is wrong, fix in 2.4.1 and change milestone back.
comment:4 by , 7 years ago
Is there a reason not to backport this? I'm still getting this error when building the 2.4 branch.
Version 0, edited 7 years ago by (next)
Note:
See TracTickets
for help on using tickets.
fix: https://github.com/postgis/postgis/pull/161