PR c++/92992 * call.c (convert_arg_to_ellipsis): For decltype(nullptr) arguments that have side-effects use cp_build_compound_expr. * g++.dg/cpp0x/nullptr45.C: New test. From-SVN: r279680
25 lines
213 B
C
25 lines
213 B
C
// PR c++/92992
|
|
// { dg-do run { target c++11 } }
|
|
|
|
int a;
|
|
|
|
void
|
|
bar (int, ...)
|
|
{
|
|
}
|
|
|
|
decltype (nullptr)
|
|
baz ()
|
|
{
|
|
a++;
|
|
return nullptr;
|
|
}
|
|
|
|
int
|
|
main ()
|
|
{
|
|
bar (0, baz ());
|
|
if (a != 1)
|
|
__builtin_abort ();
|
|
}
|