annotate compile/o/offsetof_81_A.d @ 1444:b4b14259c787

r7392@birke: tk | 2007-03-29 16:20:48 +0200 [Issue 947] offsetof and alignof for an enum field of a struct fail to compile <guido@grumpy-cat.com 2007-02-11 http://d.puremagic.com/issues/show_bug.cgi?id=947
author thomask
date Sat, 31 Mar 2007 08:27:03 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1444
b4b14259c787 r7392@birke: tk | 2007-03-29 16:20:48 +0200
thomask
parents:
diff changeset
1 // $HeadURL$
b4b14259c787 r7392@birke: tk | 2007-03-29 16:20:48 +0200
thomask
parents:
diff changeset
2 // $Date$
b4b14259c787 r7392@birke: tk | 2007-03-29 16:20:48 +0200
thomask
parents:
diff changeset
3 // $Author$
b4b14259c787 r7392@birke: tk | 2007-03-29 16:20:48 +0200
thomask
parents:
diff changeset
4
b4b14259c787 r7392@birke: tk | 2007-03-29 16:20:48 +0200
thomask
parents:
diff changeset
5 // @author@ <guido@grumpy-cat.com
b4b14259c787 r7392@birke: tk | 2007-03-29 16:20:48 +0200
thomask
parents:
diff changeset
6 // @date@ 2007-02-11
b4b14259c787 r7392@birke: tk | 2007-03-29 16:20:48 +0200
thomask
parents:
diff changeset
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=947
b4b14259c787 r7392@birke: tk | 2007-03-29 16:20:48 +0200
thomask
parents:
diff changeset
8 // @desc@ [Issue 947] offsetof and alignof for an enum field of a struct fail to compile
b4b14259c787 r7392@birke: tk | 2007-03-29 16:20:48 +0200
thomask
parents:
diff changeset
9
b4b14259c787 r7392@birke: tk | 2007-03-29 16:20:48 +0200
thomask
parents:
diff changeset
10 module dstress.compile.o.offsetof_81_A;
b4b14259c787 r7392@birke: tk | 2007-03-29 16:20:48 +0200
thomask
parents:
diff changeset
11
b4b14259c787 r7392@birke: tk | 2007-03-29 16:20:48 +0200
thomask
parents:
diff changeset
12 enum E{
b4b14259c787 r7392@birke: tk | 2007-03-29 16:20:48 +0200
thomask
parents:
diff changeset
13 A,
b4b14259c787 r7392@birke: tk | 2007-03-29 16:20:48 +0200
thomask
parents:
diff changeset
14 B
b4b14259c787 r7392@birke: tk | 2007-03-29 16:20:48 +0200
thomask
parents:
diff changeset
15 }
b4b14259c787 r7392@birke: tk | 2007-03-29 16:20:48 +0200
thomask
parents:
diff changeset
16
b4b14259c787 r7392@birke: tk | 2007-03-29 16:20:48 +0200
thomask
parents:
diff changeset
17 struct S{
b4b14259c787 r7392@birke: tk | 2007-03-29 16:20:48 +0200
thomask
parents:
diff changeset
18 int x;
b4b14259c787 r7392@birke: tk | 2007-03-29 16:20:48 +0200
thomask
parents:
diff changeset
19 E e;
b4b14259c787 r7392@birke: tk | 2007-03-29 16:20:48 +0200
thomask
parents:
diff changeset
20 }
b4b14259c787 r7392@birke: tk | 2007-03-29 16:20:48 +0200
thomask
parents:
diff changeset
21
b4b14259c787 r7392@birke: tk | 2007-03-29 16:20:48 +0200
thomask
parents:
diff changeset
22 static assert(S.x.offsetof != S.e.offsetof);