[CXX-106] MsgData's cast from char[4] to int* leads to type alias warnings in C++ clients with strict aliasing warnings as errors. Created: 17/Apr/12  Updated: 24/Apr/14  Resolved: 24/Apr/14

Status: Closed
Project: C++ Driver
Component/s: Implementation, Portability
Affects Version/s: None
Fix Version/s: legacy-0.9.0

Type: Improvement Priority: Major - P3
Reporter: Andy Schwerin Assignee: Mira Carey
Resolution: Duplicate Votes: 0
Labels: cxxmove, legacy-cxx
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates CXX-49 Fix strict aliasing warnings so that ... Closed

 Description   

This is plain old type punning. Use of a union might make GCC happier.



 Comments   
Comment by Andrew Morrow (Inactive) [ 03/Apr/14 ]

Bumping to 0.9 since this is going to happen by way of server side changes that we backport, but probably not in the 0.8 timeframe.

Comment by Andy Schwerin [ 17/Apr/12 ]

MongoDB's current implementation extensively assumes that the platform is little-endian. Without extensive work, it plain and simple will not operate on big-endian systems.

Comment by Pedro Larroy [ 17/Apr/12 ]

but it wouldn't be endian safe also.

Generated at Wed Feb 07 21:58:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.