[CDRIVER-1387] BSON_EXTRA_ALIGN 0 does not compile with MSVC Created: 15/Jul/16 Updated: 10/Aug/16 Resolved: 18/Jul/16 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libbson |
| Affects Version/s: | None |
| Fix Version/s: | 1.4.0 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Shane Harvey | Assignee: | Shane Harvey |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Description |
|
If BSON_EXTRA_ALIGN is 0 the BSON_ALIGNED_BEGIN macro defined here is invalid. MSVC does not allow mathematical expressions in align:
https://msdn.microsoft.com/en-us/library/83ythb65.aspx The cmake file always sets BSON_EXTRA_ALIGN to 1 so this was never noticed. |
| Comments |
| Comment by Githook User [ 18/Jul/16 ] | ||||||
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@emptysquare.net'}Message: Merge pull request #170 from ShaneHarvey/master
| ||||||
| Comment by Githook User [ 18/Jul/16 ] | ||||||
|
Author: {u'username': u'ShaneHarvey', u'name': u'Shane Harvey', u'email': u'shane.harvey@mongodb.com'}Message: | ||||||
| Comment by Shane Harvey [ 15/Jul/16 ] | ||||||
|
It's not even possible to do align((8)) because of the extra parentheses. So
|