vaaarg3 failure
Geoff Keating
geoffk@apple.com
Mon Dec 15 20:47:00 GMT 2003
On Dec 12, 2003, at 1:00 PM, Geoffrey Keating wrote:
> The actual failure is:
>
> FAIL: g++.old-deja/g++.pt/vaarg3.C (test for errors, line 15)
>
> and line 15 is:
>
> va_start (argp, somearg); // { dg-error "" } cannot pass non-POD
>
> I am not sure if the testsuite should be updated or if this really
> should be an error.
I looked into this. The C++ standard says:
> The restrictions that ISO C places on the second parameter to the
> va_start() macro in header <stdarg.h> are different in this
> International Standard. The parameter parmN is the identifier of the
> rightmost parameter in the variable parameter list of the function
> definition (the one just before the ...). If the parameter parmN is
> declared with a function, array, or reference type, or with a type
> that is not compatible with the type that results when passing an
> argument for which there is no parameter, the behavior is undefined.
There is no mention here that non-POD types are prohibited, or in
[expr.call], so therefore they should be allowed and this testcase is
in error. I'll commit a patch to fix it.
--
Geoff Keating <geoffk@apple.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2361 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-regression/attachments/20031215/ca9f7b20/attachment.p7s>
More information about the Gcc-regression
mailing list