• <bdo id='0SQGi'></bdo><ul id='0SQGi'></ul>

    <small id='0SQGi'></small><noframes id='0SQGi'>

    1. <legend id='0SQGi'><style id='0SQGi'><dir id='0SQGi'><q id='0SQGi'></q></dir></style></legend>
    2. <tfoot id='0SQGi'></tfoot>

      <i id='0SQGi'><tr id='0SQGi'><dt id='0SQGi'><q id='0SQGi'><span id='0SQGi'><b id='0SQGi'><form id='0SQGi'><ins id='0SQGi'></ins><ul id='0SQGi'></ul><sub id='0SQGi'></sub></form><legend id='0SQGi'></legend><bdo id='0SQGi'><pre id='0SQGi'><center id='0SQGi'></center></pre></bdo></b><th id='0SQGi'></th></span></q></dt></tr></i><div id='0SQGi'><tfoot id='0SQGi'></tfoot><dl id='0SQGi'><fieldset id='0SQGi'></fieldset></dl></div>

      未记录的 GCC 扩展:结构中的 VLA

      时间:2023-09-15
      <tfoot id='nJtSc'></tfoot>
          <i id='nJtSc'><tr id='nJtSc'><dt id='nJtSc'><q id='nJtSc'><span id='nJtSc'><b id='nJtSc'><form id='nJtSc'><ins id='nJtSc'></ins><ul id='nJtSc'></ul><sub id='nJtSc'></sub></form><legend id='nJtSc'></legend><bdo id='nJtSc'><pre id='nJtSc'><center id='nJtSc'></center></pre></bdo></b><th id='nJtSc'></th></span></q></dt></tr></i><div id='nJtSc'><tfoot id='nJtSc'></tfoot><dl id='nJtSc'><fieldset id='nJtSc'></fieldset></dl></div>
            <tbody id='nJtSc'></tbody>
          • <legend id='nJtSc'><style id='nJtSc'><dir id='nJtSc'><q id='nJtSc'></q></dir></style></legend>

            <small id='nJtSc'></small><noframes id='nJtSc'>

              <bdo id='nJtSc'></bdo><ul id='nJtSc'></ul>
                本文介绍了未记录的 GCC 扩展:结构中的 VLA的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                在阅读 Clang 文档时,我发现了以下有趣的花絮:[1]

                While reading the Clang documentation, I came across the following intriguing tidbit: [1]

                clang 不支持允许在结构中使用可变长度数组的 gcc 扩展.这有几个原因:一,实现起来很棘手,二,扩展完全没有记录,三,扩展似乎很少使用.请注意,clang 确实支持灵活的数组成员(结构末尾具有零或未指定大小的数组).

                clang does not support the gcc extension that allows variable-length arrays in structures. This is for a few reasons: one, it is tricky to implement, two, the extension is completely undocumented, and three, the extension appears to be rarely used. Note that clang does support flexible array members (arrays with a zero or unspecified size at the end of a structure).

                这个扩展怎么用?我的理解是,在构造函数中使用 alloca 会导致堆栈指针在调用函数的末尾恢复,在这种情况下,它将是构造函数——而不是在封闭结构的末尾.

                How can this extension be used? My understanding is that using alloca within a constructor causes the stack pointer to be restored at the end of the calling function, which in this case would be the constructor -- not at the end of the enclosing struct.

                感谢您的帮助!

                推荐答案

                参见 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37428

                还有 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42121

                是的,这很奇怪.

                这篇关于未记录的 GCC 扩展:结构中的 VLA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:如何从内存中读取,就像使用 iostream 从文件中读 下一篇:当函数中未指定返回值时,C++ progs 如何获得它们

                相关文章

                最新文章

                  1. <small id='e3lvl'></small><noframes id='e3lvl'>

                    <i id='e3lvl'><tr id='e3lvl'><dt id='e3lvl'><q id='e3lvl'><span id='e3lvl'><b id='e3lvl'><form id='e3lvl'><ins id='e3lvl'></ins><ul id='e3lvl'></ul><sub id='e3lvl'></sub></form><legend id='e3lvl'></legend><bdo id='e3lvl'><pre id='e3lvl'><center id='e3lvl'></center></pre></bdo></b><th id='e3lvl'></th></span></q></dt></tr></i><div id='e3lvl'><tfoot id='e3lvl'></tfoot><dl id='e3lvl'><fieldset id='e3lvl'></fieldset></dl></div>
                  2. <tfoot id='e3lvl'></tfoot>
                  3. <legend id='e3lvl'><style id='e3lvl'><dir id='e3lvl'><q id='e3lvl'></q></dir></style></legend>
                      <bdo id='e3lvl'></bdo><ul id='e3lvl'></ul>