Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-1257

Add WT_STATIC_ASSERT calls to the atomic operation macros so we don't choose the wrong macro.

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT2.4.0
    • Component/s: None
    • Labels:

      Description

      @markbenvenuto, @michaelcahill: I have exactly no confidence we'll not change the size of some structure field and get the choice of macro wrong, so I've added WT_STATIC_ASSERT calls to the gcc versions of these macros. We might want to do the same thing for Windows (although, obviously, if gcc and MSVC use different sizes for the fields, we will need different macro names, but at least we'll catch the failure).

      I stared at this for awhile, and couldn't think of anything else that might work that wasn't hugely ugly and/or invasive, I'd love to hear a better idea.

        Attachments

          Activity

            People

            • Assignee:
              keith.bostic Keith Bostic
              Reporter:
              keith.bostic Keith Bostic
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: