blob: 21a4f59a46f3393b56e9842a97a509ef8a8ff2c0 [file] [log] [blame]
// __builtin_LINE gets the location where the default argument is expanded.
// { dg-do run }
#include <cassert>
struct Foo
{
int line;
Foo( int line = __builtin_LINE() )
: line( line )
{}
};
int main()
{
assert (Foo().line == __LINE__);
assert ((new Foo)->line == __LINE__);
}