Details
-
Bug
-
Resolution: Done
-
Major - P3
-
1.4.0
-
None
-
None
Description
VS2010 isn't a fan of variable declarations after statements, so requires them to be declared at the start of a scope.
For that, we have -Wdeclaration-after-statement as part of our --enable-maintainer-flags both in libbson and mongoc.
Unfortunately, this flag makes no sense in C++ where this is completely valid.
Our m4 function that checks if the various flags are supported by the current compiler also check if the flag is valid under CXX.
If it isn't, it won't add the flag to MAINTAINER_FLAGS.