Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve gcc9 issues with bslmt_testutil.t.cpp #262

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Apr 9, 2020

  1. Resolve gcc9 issues with bslmt_testutil.t.cpp

    gcc9 has changed the way it computes __LINE__ number when a macro
    invocation spans multiple lines, specifically in the case of:
       BSLMT_TESTUIL_LOOPX_ASSERT(I, J, K, L, M, N,   // gcc 9+
                                  some predicate);    // gcc 8-
    
    The line reported by this macro expansion changes from reporting
    the second line in gcc8 and earlier (plus all other Bloomberg
    supported compilers) to reporting the first line in gcc9 and later.
    This change appears intentional, and following recommended best
    practices for the upcoming C standard that specifically tries to
    address this situation.
    
    The issue that arises is comparing error-reporting strings in the
    tests for the ASSERT family of macros.  The solution, as only the
    test driver is impacted, is to rename variables so that no line has
    to wrap to conform to the BDE coding rules.
    
    The second minor issues addressed is warnings from a couple of
    member functions defined in the test machinary, but never used.
    I opted to remove them entirely, on the understanding that if we
    ever need a more fully featured 'OutputRedirector', there is a
    perfectly good one sitting in the 'bsls_outputredictor' component,
    complete with test driver.
    AlisdairM committed Apr 9, 2020
    Configuration menu
    Copy the full SHA
    1da4e6c View commit details
    Browse the repository at this point in the history