[Mesa-dev] [Bug 105238] ast.h:648:16: error: union member 'i' has a non-trivial constructor

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Feb 25 09:02:23 UTC 2018


            Bug ID: 105238
           Summary: ast.h:648:16: error: union member 'i' has a
                    non-trivial constructor
           Product: Mesa
           Version: git
          Hardware: x86-64 (AMD64)
                OS: All
            Status: NEW
          Keywords: bisected, regression
          Severity: normal
          Priority: medium
         Component: Mesa core
          Assignee: mesa-dev at lists.freedesktop.org
          Reporter: vlee at freedesktop.org
        QA Contact: mesa-dev at lists.freedesktop.org
                CC: currojerez at riseup.net, plamena.manolova at intel.com

In file included from ./glsl/glsl_lexer.ll:27:
../../src/compiler/glsl/ast.h:648:16: error: union member 'i' has a non-trivial
      bitset_t i;

commit ba79a90fb52e1e81fbfb38113e85a56b13497c50
Author: Francisco Jerez <currojerez at riseup.net>
Date:   Mon Feb 12 14:18:15 2018 -0800

    glsl: Switch ast_type_qualifier to a 128-bit bitset.

    This should end the drought of bits in the ast_type_qualifier object.
    The bitset_t type works pretty much as a drop-in replacement for the
    current uint64_t bitset.

    The only catch is that the bitset_t type as defined in the previous
    commit doesn't have a trivial constructor (because it has a
    user-defined constructor), so it cannot be used as union member
    without providing a user-defined constructor for the union (which
    causes it in turn to be non-trivially constructible).  This annoyance
    could be easily addressed in C++11 by declaring the default
    constructor of bitset_t to be the implicitly defined one -- IMO one
    more reason to drop support for GCC 4.2-4.3.

    The other minor change was required because glsl_parser_extras.cpp was
    hard-coding the type of bitset temporaries as uint64_t, which (unlike
    would have been the case if the uint64_t had been replaced with
    e.g. an __int128) would otherwise have caused a build failure, because
    the boolean conversion operator of bitset_t is marked explicit (if
    C++11 is available), so the bitset won't be silently truncated down to
    1 bit in order to use it to initialize the uint64_t temporaries

    Reviewed-by: Plamena Manolova <plamena.manolova at intel.com>

You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180225/6b49bb7b/attachment-0001.html>

More information about the mesa-dev mailing list