Nick Clifton <ni...@redhat.com> writes:
> Hi Richard,
>
>> +      /* Even zero-sized arguments occupy one byte.  */
>> +      if (size == 0)
>> +    size = 1;
>
> That fixes it!  Thanks.
>
> Will you apply this patch yourself, or should I submit the patch and the 
> test case as a separate email to gcc-patches ?

It turns out the patch was wrong.  The testsuite has several
other tests for zero-sized varargs, and we handle those correctly.
The difference here seems to be that the type has doubleword alignment.

The type doesn't occupy room as such.  The problem is that its alignment
is still honoured, so if you have something like:

  word
  double-word-aligned zero-size value
  word

then a word of padding is inserted between the arguments.

I'll need to think about this a bit more...

Richard

Reply via email to