PING^1: [PATCH] Add TYPE_EMPTY_RECORD for C++ empty class

H.J. Lu hjl.tools@gmail.com
Fri Dec 11 23:52:00 GMT 2015


On Thu, Dec 10, 2015 at 3:24 AM, Richard Biener
<richard.guenther@gmail.com> wrote:
> On Wed, Dec 9, 2015 at 10:31 PM, Markus Trippelsdorf
> <markus@trippelsdorf.de> wrote:
>> On 2015.12.09 at 10:53 -0800, H.J. Lu wrote:
>>>
>>> Empty C++ class is a corner case which isn't covered in psABI nor C++ ABI.
>>> There is no mention of "empty record" in GCC documentation.  But there are
>>> plenty of "empty class" in gcc/cp.  This change affects all targets.  C++ ABI
>>> should specify how it should be passed.
>>
>> There is a C++ ABI mailinglist, where you could discuss this issue:
>> http://sourcerytools.com/cgi-bin/mailman/listinfo/cxx-abi-dev
>
> Yep.  As long as the ABI doesn't state how to pass those I'd rather _not_ change
> GCCs way.

It is agreed that GCC is wrong on this:

http://sourcerytools.com/pipermail/cxx-abi-dev/2015-December/002876.html

Here is the updated patch.   I updated -WpsABI to warn empty
record which are passed in a variable argument list or aren't the last
arguments.   They are triggered in:

/export/build/gnu/gcc-x32/build-x86_64-linux/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/bits/hashtable.h:1507:7:
note: the ABI of passing empty record has changed in GCC 6
/export/build/gnu/gcc-x32/build-x86_64-linux/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/bits/hashtable_policy.h:901:67:
note: the ABI of passing empty record has changed in GCC 6
/export/gnu/import/git/sources/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:238:4:
note: the ABI of passing empty record has changed in GCC 6
/export/gnu/import/git/sources/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:266:26:
note: the ABI of passing empty record has changed in GCC 6
/export/gnu/import/git/sources/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:273:4:
note: the ABI of passing empty record has changed in GCC 6
/export/gnu/import/git/sources/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:289:61:
note: the ABI of passing empty record has changed in GCC 6
/export/gnu/import/git/sources/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:296:11:
note: the ABI of passing empty record has changed in GCC 6
/export/gnu/import/git/sources/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:304:11:
note: the ABI of passing empty record has changed in GCC 6
/export/gnu/import/git/sources/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:312:11:
note: the ABI of passing empty record has changed in GCC 6
/export/gnu/import/git/sources/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:320:11:
note: the ABI of passing empty record has changed in GCC 6
/export/gnu/import/git/sources/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:328:11:
note: the ABI of passing empty record has changed in GCC 6
/export/gnu/import/git/sources/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:341:4:
note: the ABI of passing empty record has changed in GCC 6
/export/gnu/import/git/sources/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:375:19:
note: the ABI of passing empty record has changed in GCC 6
/export/gnu/import/git/sources/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:375:4:
note: the ABI of passing empty record has changed in GCC 6
/export/gnu/import/git/sources/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:390:19:
note: the ABI of passing empty record has changed in GCC 6
/export/gnu/import/git/sources/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:390:4:
note: the ABI of passing empty record has changed in GCC 6
/export/gnu/import/git/sources/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:415:16:
note: the ABI of passing empty record has changed in GCC 6
/export/gnu/import/git/sources/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:425:12:
note: the ABI of passing empty record has changed in GCC 6
/export/gnu/import/git/sources/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:442:29:
note: the ABI of passing empty record has changed in GCC 6
/export/gnu/import/git/sources/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:449:4:
note: the ABI of passing empty record has changed in GCC 6
/export/gnu/import/git/sources/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:457:4:
note: the ABI of passing empty record has changed in GCC 6
/export/gnu/import/git/sources/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:500:5:
note: the ABI of passing empty record has changed in GCC 6
/export/gnu/import/git/sources/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:529:5:
note: the ABI of passing empty record has changed in GCC 6
/export/gnu/import/git/sources/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:547:5:
note: the ABI of passing empty record has changed in GCC 6
/export/gnu/import/git/sources/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:569:5:
note: the ABI of passing empty record has changed in GCC 6
/export/gnu/import/git/sources/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:617:5:
note: the ABI of passing empty record has changed in GCC 6
/export/gnu/import/git/sources/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:637:5:
note: the ABI of passing empty record has changed in GCC 6
/export/gnu/import/git/sources/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:657:5:
note: the ABI of passing empty record has changed in GCC 6
/export/gnu/import/git/sources/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:673:5:
note: the ABI of passing empty record has changed in GCC 6
/export/gnu/import/git/sources/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:686:5:
note: the ABI of passing empty record has changed in GCC 6
/export/gnu/import/git/sources/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:722:5:
note: the ABI of passing empty record has changed in GCC 6
/export/gnu/import/git/sources/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:753:5:
note: the ABI of passing empty record has changed in GCC 6


-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-TYPE_EMPTY_RECORD-for-C-empty-class.patch
Type: text/x-patch
Size: 36605 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20151211/bc883771/attachment.bin>


More information about the Gcc-patches mailing list