annotate compile/bug_cgcod_1445_C.d @ 1618:87a6ab8f478d

Returns of non-void expressions are no longer valid in void functions.
author Christian Kamm <kamm incasoftware de>
date Sat, 07 Nov 2009 18:48:11 +0100
parents b8c0195059d9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
756
9a121126b077 major "Torture" review
thomask
parents: 511
diff changeset
1 // $HeadURL$
9a121126b077 major "Torture" review
thomask
parents: 511
diff changeset
2 // $Date$
9a121126b077 major "Torture" review
thomask
parents: 511
diff changeset
3 // $Author$
511
50a9bd194e33 pre DMD-0.120 cgcod.c 1445 crash
thomask
parents:
diff changeset
4
50a9bd194e33 pre DMD-0.120 cgcod.c 1445 crash
thomask
parents:
diff changeset
5 // @author@ David Medlock <amedlock@nospam.org>
50a9bd194e33 pre DMD-0.120 cgcod.c 1445 crash
thomask
parents:
diff changeset
6 // @date@ 2005-05-04
1489
b8c0195059d9 changed nntp: URLs to http: URLs
thomask
parents: 756
diff changeset
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=3886
511
50a9bd194e33 pre DMD-0.120 cgcod.c 1445 crash
thomask
parents:
diff changeset
8
50a9bd194e33 pre DMD-0.120 cgcod.c 1445 crash
thomask
parents:
diff changeset
9 module dstress.compile.bug_cgcod_1445_C;
50a9bd194e33 pre DMD-0.120 cgcod.c 1445 crash
thomask
parents:
diff changeset
10
50a9bd194e33 pre DMD-0.120 cgcod.c 1445 crash
thomask
parents:
diff changeset
11 static int[1][5] array = [[1],[2],[3],[4],[5] ];
50a9bd194e33 pre DMD-0.120 cgcod.c 1445 crash
thomask
parents:
diff changeset
12
1618
87a6ab8f478d Returns of non-void expressions are no longer valid in void functions.
Christian Kamm <kamm incasoftware de>
parents: 1489
diff changeset
13 int[] Lookup(int which){
511
50a9bd194e33 pre DMD-0.120 cgcod.c 1445 crash
thomask
parents:
diff changeset
14 switch(which){
50a9bd194e33 pre DMD-0.120 cgcod.c 1445 crash
thomask
parents:
diff changeset
15 case 0:
50a9bd194e33 pre DMD-0.120 cgcod.c 1445 crash
thomask
parents:
diff changeset
16 return array[which];
50a9bd194e33 pre DMD-0.120 cgcod.c 1445 crash
thomask
parents:
diff changeset
17 }
50a9bd194e33 pre DMD-0.120 cgcod.c 1445 crash
thomask
parents:
diff changeset
18 }
50a9bd194e33 pre DMD-0.120 cgcod.c 1445 crash
thomask
parents:
diff changeset
19