On Mon, Dec 14, 2015 at 12:16 PM, Jason Merrill <ja...@redhat.com> wrote:
> On 12/12/2015 01:42 PM, Marc Glisse wrote:
>>
>> On Sat, 12 Dec 2015, Jakub Jelinek wrote:
>>
>>> On Sat, Dec 12, 2015 at 09:51:23AM -0500, Jason Merrill wrote:
>>>>
>>>> On 12/11/2015 06:52 PM, H.J. Lu wrote:
>>>>>
>>>>> On Thu, Dec 10, 2015 at 3:24 AM, Richard Biener
>>>>> <richard.guent...@gmail.com> wrote:
>>>>>>
>>>>>> On Wed, Dec 9, 2015 at 10:31 PM, Markus Trippelsdorf
>>>>>> <mar...@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.
>>
>>
>>
>> About this patch, aren't we supposed to enable new C++ ABIs with
>> -fabi-version=42 (or whatever the next number is)?
>
>
> Yes, the patch should definitely make this conditional on
> abi_version_at_least.
>
>>>>>>> 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
>>>>>
>>>>
>>>> Yes, I think this is just a (nasty) bug on some GCC targets.
>>>
>>>
>>> Well, the argument in that thread is weird, because C and C++ empty
>>> structs
>>> are different, so it isn't surprising they are passed differently.
>>> C++ makes those sizeof == 1, while C has them sizeof == 0.
>>
>>
>> Maybe it isn't surprising, but it isn't particularly helpful either. It
>> increases the number of places where the 2 are incompatible.
>> (I personally don't care about empty C structs)
>
>
> Yep.  The C standard doesn't have empty structs; it's a GNU extension. But
> in any case argument passing can be compatible between C and C++, so it
> really should be.
>
>

Before I make any changes, I'd like to ask if we should make
argument passing can be compatible between C and C++ for
all targets GCC support or just x86.


-- 
H.J.

Reply via email to