This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 3.2 critical bug?


thanks, now i got it.
i made some tests and what it should be is a forward declaration of the 
function "p" that returns a type_2 and takes a pointer to a function 
returning a type_2 and no params.

---------------------
struct type_1
{};
struct type_2
{};

struct test
{
	test(const type_1&)
	{}
};

type_2 ft2()
{
}

int main()
{
	test p(type_2())

	p(&ft2);
}
--------------------
i got a link error here but that was expected..
stefano


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]