changeset 1442:bfebb405f3ed

r7390@birke: tk | 2007-03-29 16:07:56 +0200 [Issue 957] linkage attributes for function level declarations are ignored Thomas K?hne <thomas-dloop@kuehne.cn> 2007-02-13 http://d.puremagic.com/issues/show_bug.cgi?id=957
author thomask
date Sat, 31 Mar 2007 08:26:20 +0000
parents 8888892dd50e
children b7d5fdb4245d
files run/e/extern_10_A.d run/e/extern_10_B.d run/e/extern_10_C.d run/e/extern_10_D.d run/e/extern_10_E.d run/e/extern_10_F.d
diffstat 6 files changed, 153 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/e/extern_10_A.d	Sat Mar 31 08:26:20 2007 +0000
@@ -0,0 +1,25 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Thomas Kühne <thomas-dloop@kuehne.cn>
+// @date@	2007-02-13
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=957
+// @desc@	[Issue 957] linkage attributes for function level declarations are ignored
+
+module dstress.run.e.extern_10_A;
+
+extern(Pascal) long foo(int a, int b){
+	return (a + 1) * b;
+}
+
+int main(){
+	extern(Pascal) long function(int, int) bar;
+	bar = &foo;
+
+	if(20 != bar(3, 5)){
+		assert(0);
+	}
+
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/e/extern_10_B.d	Sat Mar 31 08:26:20 2007 +0000
@@ -0,0 +1,26 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Thomas Kühne <thomas-dloop@kuehne.cn>
+// @date@	2007-02-13
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=957
+// @desc@	[Issue 957] linkage attributes for function level declarations are ignored
+
+module dstress.run.e.extern_10_B;
+
+extern(Pascal) long foo(int a, int b){
+	return (a + 1) * b;
+}
+
+extern(Pascal) long function(int, int) bar;
+
+int main(){
+	bar = &foo;
+
+	if(20 != bar(3, 5)){
+		assert(0);
+	}
+
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/e/extern_10_C.d	Sat Mar 31 08:26:20 2007 +0000
@@ -0,0 +1,26 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Thomas Kühne <thomas-dloop@kuehne.cn>
+// @date@	2007-02-13
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=957
+// @desc@	[Issue 957] linkage attributes for function level declarations are ignored
+
+module dstress.run.e.extern_10_C;
+
+extern(C) long foo(int a, int b){
+	return (a + 1) * b;
+}
+
+extern(C) long function(int, int) bar;
+
+int main(){
+	bar = &foo;
+
+	if(20 != bar(3, 5)){
+		assert(0);
+	}
+
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/e/extern_10_D.d	Sat Mar 31 08:26:20 2007 +0000
@@ -0,0 +1,25 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Thomas Kühne <thomas-dloop@kuehne.cn>
+// @date@	2007-02-13
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=957
+// @desc@	[Issue 957] linkage attributes for function level declarations are ignored
+
+module dstress.run.e.extern_10_D;
+
+extern(C) long foo(int a, int b){
+	return (a + 1) * b;
+}
+
+int main(){
+	extern(C) long function(int, int) bar;
+	bar = &foo;
+
+	if(20 != bar(3, 5)){
+		assert(0);
+	}
+
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/e/extern_10_E.d	Sat Mar 31 08:26:20 2007 +0000
@@ -0,0 +1,25 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Thomas Kühne <thomas-dloop@kuehne.cn>
+// @date@	2007-02-13
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=957
+// @desc@	[Issue 957] linkage attributes for function level declarations are ignored
+
+module dstress.run.e.extern_10_E;
+
+extern(D) long foo(int a, int b){
+	return (a + 1) * b;
+}
+
+int main(){
+	extern(D) long function(int, int) bar;
+	bar = &foo;
+
+	if(20 != bar(3, 5)){
+		assert(0);
+	}
+
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/e/extern_10_F.d	Sat Mar 31 08:26:20 2007 +0000
@@ -0,0 +1,26 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Thomas Kühne <thomas-dloop@kuehne.cn>
+// @date@	2007-02-13
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=957
+// @desc@	[Issue 957] linkage attributes for function level declarations are ignored
+
+module dstress.run.e.extern_10_F;
+
+extern(D) long foo(int a, int b){
+	return (a + 1) * b;
+}
+
+extern(D) long function(int, int) bar;
+
+int main(){
+	bar = &foo;
+
+	if(20 != bar(3, 5)){
+		assert(0);
+	}
+
+	return 0;
+}