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: c++/6211: internal compiler error using __attribute__


This code:

template<class T> __attribute__((stdcall)) int f(T x){}

compiles without error on cc gversion 3.1 20020405 (prerelease) built for
mingw.

Instantiating the function like so:
int foo(){
long x;
return f(x);
} 

produces 
.globl __Z1fIlEiT_@4
	.def	__Z1fIlEiT_@4;	.scl	2;	.type	32;	.endef
__Z1fIlEiT_@4:
	pushl	%ebp
	movl	%esp, %ebp
	popl	%ebp
	ret	$4

Which is correct.

Danny

http://www.sold.com.au - SOLD.com.au Auctions
- 1,000s of Bargains!


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