[SERVER-17568] Report most-vexing parse warnings as errors on MSVC Created: 12/Mar/15  Updated: 25/Jan/17  Resolved: 12/Mar/15

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: 3.0.1
Fix Version/s: 3.0.5, 3.1.0

Type: Task Priority: Major - P3
Reporter: Andy Schwerin Assignee: Andy Schwerin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Backport Completed:
Participants:

 Description   

The version of the most-vexing parse where the developer inadvertently declares a function instead of defining a variable can cause lock acquisitions to be missed, and other RAII behavior to not occur. MSVC has a warning about these, which we should report as build errors.



 Comments   
Comment by Githook User [ 25/Jun/15 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-17568 Report most-vexing-parse warning as error in MSVC.

(cherry picked from commit 7ee3d124070db157181bc1b24f2b84913957c388)
Branch: v3.0
https://github.com/mongodb/mongo/commit/040742e35eba596394ec931b1186824c9e3f00e5

Comment by Githook User [ 25/Jun/15 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-17568 Correctly acquire _mutex in CountdownLatchHolder::get in v8_utils.cpp

(cherry picked from commit 3bb26d2bb96b65177019fb78297a94d50e4acc67)
Branch: v3.0
https://github.com/mongodb/mongo/commit/51931719c69347e36bc4d40b24693559795c9006

Comment by Andy Schwerin [ 12/Mar/15 ]

The only existing error that this uncovered was in code used exclusively by the FSM test framework. Would be nice to backport, but isn't critical.

Comment by Githook User [ 12/Mar/15 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-17568 Report most-vexing-parse warning as error in MSVC.
Branch: master
https://github.com/mongodb/mongo/commit/7ee3d124070db157181bc1b24f2b84913957c388

Comment by Githook User [ 12/Mar/15 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-17568 Correctly acquire _mutex in CountdownLatchHolder::get in v8_utils.cpp
Branch: master
https://github.com/mongodb/mongo/commit/3bb26d2bb96b65177019fb78297a94d50e4acc67

Generated at Thu Feb 08 03:44:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.