<html>
    <head>
      <base href="https://bugzilla.icculus.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:ahmedsayeed1982@yahoo.com" title="Ahmed <ahmedsayeed1982@yahoo.com>"> <span class="fn">Ahmed</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - CC=clang - unsupported compiler options (MinGW)"
   href="https://bugzilla.icculus.org/show_bug.cgi?id=6088">bug 6088</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>ahmedsayeed1982@yahoo.com
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - CC=clang - unsupported compiler options (MinGW)"
   href="https://bugzilla.icculus.org/show_bug.cgi?id=6088#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - CC=clang - unsupported compiler options (MinGW)"
   href="https://bugzilla.icculus.org/show_bug.cgi?id=6088">bug 6088</a>
              from <span class="vcard"><a class="email" href="mailto:ahmedsayeed1982@yahoo.com" title="Ahmed <ahmedsayeed1982@yahoo.com>"> <span class="fn">Ahmed</span></a>
</span></b>
        <pre>$ cat test.c
        struct foo {
            int len; <a href="https://www.webb-dev.co.uk/category/computers/">https://www.webb-dev.co.uk/category/computers/</a>
            int items[];
        };

        struct foo *p;
    <a href="http://www.compilatori.com/category/technology/">http://www.compilatori.com/category/technology/</a>
        int main() {
            return 0;
        }
        $ gcc test.c -g -O0 -o test
<a href="http://www.acpirateradio.co.uk/category/computers/">http://www.acpirateradio.co.uk/category/computers/</a>
        $ ./gdb -q -nx --data-directory=data-directory ./test -ex 'python
gdb.parse_and_eval("p").type.target()["items"].type.range()'
        Reading symbols from ./test...
<a href="http://www-look-4.com/category/computers/">http://www-look-4.com/category/computers/</a>
        /home/simark/src/binutils-gdb/gdb/gdbtypes.h:435: internal-error:
LONGEST dynamic_prop::const_val() const: Assertion `m_kind == PROP_CONST'
failed. <a href="http://www.mconstantine.co.uk/category/services/">http://www.mconstantine.co.uk/category/services/</a> 
        A problem internal to GDB has been detected,
        further debugging may prove unreliable.
        Quit this debugging session? (y or n)
<a href="http://www.logoarts.co.uk/category/computers/">http://www.logoarts.co.uk/category/computers/</a>

    This is because the Python code (typy_range) blindly reads the high
    bound of the type of `items` as a constant value.  Since it is a
<a href="http://www.iu-bloomington.com/category/computers/">http://www.iu-bloomington.com/category/computers/</a>
    flexible array member, it has no high bound, the property is undefined.
    Since commit 8c2e4e0689 <a href="https://komiya-dental.com/category/computers/">https://komiya-dental.com/category/computers/</a>
("gdb: add accessors to struct dynamic_prop"),
    the getters check that you are not
<a href="http://www.go-mk-websites.co.uk/category/services/">http://www.go-mk-websites.co.uk/category/services/</a> getting a property value of
the wrong
    kind, so this causes a failed assertion.
<a href="http://www.slipstone.co.uk/category/computers/">http://www.slipstone.co.uk/category/computers/</a>

    Fix it by checking if the property is indeed a constant value before
<a href="http://embermanchester.uk/category/computers/">http://embermanchester.uk/category/computers/</a>
    accessing it as such.  Otherwise, use 0.  This restores the previous GDB
<a href="http://fishingnewsletters.co.uk/category/services/">http://fishingnewsletters.co.uk/category/services/</a>
    behavior: because the structure was zero-initialized,
<a href="http://connstr.net/category/computers/">http://connstr.net/category/computers/</a>  this is what was
    returned before.  But now this behavior is explicit and not accidental. But
now this behavior is explicit and not accidental. But now this behavior is
explicit and not  <a href="http://the-hunters.org/technology/new-robot/">http://the-hunters.org/technology/new-robot/</a> accidental. But
now this behavior is explicit and not accidental. But now this behavior is
explicit and is explicit and not accidental.
    <a href="http://joerg.li/category/computers/">http://joerg.li/category/computers/</a>
    Add a test, gdb.python/flexible-array-member.exp, that is derived from
    gdb.base/flexible-array-member.exp.
<a href="http://www.jopspeech.com/category/computers/">http://www.jopspeech.com/category/computers/</a>  It tests the same things, but
    through the Python API.  It also specifically tests getting the range
    from the various kinds <a href="http://www.wearelondonmade.com/category/computers/">http://www.wearelondonmade.com/category/computers/</a>
of flexible array member types (AFAIK it wasn't
    possible to do the equivalent through the CLI).
<a href="https://waytowhatsnext.com/category/computers/">https://waytowhatsnext.com/category/computers/</a>

    gdb/ChangeLog:</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>