[Bug 107772] Mesa preprocessor matches if(def)s & endifs incorrectly

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Sep 6 02:41:56 UTC 2018


Timothy Arceri <t_arceri at yahoo.com.au> changed:

           What    |Removed                     |Added
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #7 from Timothy Arceri <t_arceri at yahoo.com.au> ---
Fixed by:

commit b9fe8ff23dcfe4956be1eac4de0838d4a3720315
Author: Timothy Arceri <tarceri at itsqueeze.com>
Date:   Sat Sep 1 23:57:38 2018 +1000

    glsl: fixer lexer for unreachable defines

    If we have something like:

       #ifdef NOT_DEFINED
       #define A_MACRO(x) \
            if (x)

    The # on the #define is not skipped but the define itself is so
    this then gets recognised as #if.

    Until 28a3731e3f this didn't happen because we ended up in
    <HASH>{NONSPACE} where BEGIN INITIAL was called stopping the
    problem from happening.

    This change makes sure we never call RETURN_TOKEN_NEVER_SKIP for
    if/else/endif when processing a define.

    Cc: Ian Romanick <idr at freedesktop.org>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107772
    Tested-By: Eero Tamminen <eero.t.tamminen at intel.com>
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20180906/593f90d8/attachment.html>

More information about the intel-3d-bugs mailing list