4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #pragma ident "%Z%%M% %I% %E% SMI"
30 * ASSERTION: C and D compilers try to pack bits as efficiently as possible.
32 * SECTION: Structs and Unions/Bit-Fields
35 #pragma D option quiet
91 printf("sizeof (bitRecord1): %d\n", sizeof (var1));
92 printf("sizeof (bitRecord2): %d\n", sizeof (var2));
93 printf("sizeof (bitRecord3): %d\n", sizeof (var3));
94 printf("sizeof (bitRecord4): %d\n", sizeof (var4));
95 printf("sizeof (bitRecord5): %d\n", sizeof (var5));
96 printf("sizeof (bitRecord6): %d\n", sizeof (var6));
97 printf("sizeof (bitRecord7): %d\n", sizeof (var7));
98 printf("sizeof (bitRecord8): %d\n", sizeof (var8));
99 printf("sizeof (bitRecord12): %d\n", sizeof (var12));
104 /(1 != sizeof (var1)) || (2 != sizeof (var2)) || (3 != sizeof (var3)) ||
105 (4 != sizeof (var4)) || (5 != sizeof (var5)) || (6 != sizeof (var6))
106 || (7 != sizeof (var7)) || (8 != sizeof (var8)) || (12 != sizeof (var12))/