Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-1179

--enable-maintainer-flags doesn't add -Wdeclaration-after-statement

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 1.4.0
    • 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.

      Attachments

        Activity

          People

            jesse@mongodb.com A. Jesse Jiryu Davis
            bjori Hannes Magnusson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: