err.D_DECL_COMBO.StructWithoutColon1.d revision 178476
1184610Salfred/* 2184610Salfred * CDDL HEADER START 3184610Salfred * 4184610Salfred * The contents of this file are subject to the terms of the 5184610Salfred * Common Development and Distribution License (the "License"). 6184610Salfred * You may not use this file except in compliance with the License. 7184610Salfred * 8184610Salfred * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9184610Salfred * or http://www.opensolaris.org/os/licensing. 10184610Salfred * See the License for the specific language governing permissions 11184610Salfred * and limitations under the License. 12184610Salfred * 13184610Salfred * When distributing Covered Code, include this CDDL HEADER in each 14184610Salfred * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15184610Salfred * If applicable, add the following below this CDDL HEADER, with the 16184610Salfred * fields enclosed by brackets "[]" replaced with your own identifying 17184610Salfred * information: Portions Copyright [yyyy] [name of copyright owner] 18184610Salfred * 19184610Salfred * CDDL HEADER END 20184610Salfred */ 21184610Salfred 22184610Salfred/* 23184610Salfred * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 24184610Salfred * Use is subject to license terms. 25184610Salfred */ 26184610Salfred 27184610Salfred#pragma ident "%Z%%M% %I% %E% SMI" 28184610Salfred 29184610Salfred/* 30184610Salfred * ASSERTION: 31184610Salfred * Combining multiple struct definitions in a single line should throw a 32184610Salfred * compiler error. 33184610Salfred * 34184610Salfred * SECTION: Structs and Unions/Structs 35184610Salfred * 36184610Salfred */ 37184610Salfred 38184610Salfred#pragma D option quiet 39184610Salfred 40184610Salfredstruct record { 41184610Salfred int position; 42184610Salfred char content; 43184610Salfred}; 44184610Salfred 45184610Salfred 46184610Salfredstruct pirate { 47184610Salfred int position; 48184610Salfred char content; 49184610Salfred} 50184610Salfred 51184610Salfredstruct record rec; 52184610Salfredstruct pirate pir; 53184610Salfred 54184610SalfredBEGIN 55184610Salfred{ 56184610Salfred rec.content = 'a'; 57184610Salfred rec.position = 1; 58184610Salfred 59184610Salfred pir.content = 'b'; 60184610Salfred pir.position = 2; 61184610Salfred 62184610Salfred printf( 63184610Salfred "rec.content: %c\nrec.position: %d\npir.content: %c\npir.position: %d", 64184610Salfred rec.content, rec.position, pir.content, pir.position); 65184610Salfred 66184610Salfred exit(0); 67184610Salfred} 68184610Salfred 69184610Salfred