From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,c818447ef81c263f X-Google-Attributes: gidfee84,public From: Jeff Sullivan Subject: Re: [Help]gcc ignored #pragma pack on DEC/OSF1 4.0B Date: 1997/12/30 Message-ID: <34A918FF.EE41F28F@zk3.dec.com>#1/1 X-Deja-AN: 311355853 References: <689ng7$ja2@news.seed.net.tw> To: Ming-Yen Hsu Content-Type: multipart/mixed; boundary="------------9AE5426822C907C31753AD3A" Organization: Digital Equipment Corporation Mime-Version: 1.0 Newsgroups: comp.unix.osf.osf1 This is a multi-part message in MIME format. --------------9AE5426822C907C31753AD3A Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit You should try using the ANSI modes of the default compiler (DEC C) to compile code with preprocessor directives not in column 1. You may use either -std (relaxed ANSI) or -std1 (strict ANSI). That feature, and others are ANSI only and are not supported in the common (or K&R mode). The following program will demonstate: % cat t.c # include #define OK 1 void main() { #if OK == 1 printf("Expected result in -std/-std1\n"); #else printf("Unexpected result in -std0\n"); #endif } % cc t.c; a.out cc: Warning: t.c, line 5: # not in column 1 is ignored, skipping to end of line. #if OK == 1 --^ cc: Warning: t.c, line 7: # not in column 1 is ignored, skipping to end of line. #else --^ cc: Warning: t.c, line 9: # not in column 1 is ignored, skipping to end of line. #endif --^ Expected result in -std/-std1 Unexpected result in -std0 % cc t.c -std; a.out Expected result in -std/-std1 % cc t.c -std1 ; a.out Expected result in -std/-std1 I think you will find that the default compiler (DEC C) in V4.0B is much improved over gcc in both features and runtime performance. See http://www.unix.digital.com/ for more info. If you have further questions, let me know. -Jeff -- Jeff Sullivan | Digital Equipment Corp | sullivan@decc.enet.dec.com DEC C and C++ | Nashua, NH ZK3-2/2X09 | or jps@zk3.dec.com --------------9AE5426822C907C31753AD3A Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Jeff Sullivan Content-Disposition: attachment; filename="vcard.vcf" begin: vcard fn: Jeff Sullivan n: Sullivan;Jeff org: Digital Equipment Corporation email;internet: jps@zk3.dec.com title: Principal Software Engineer note;quoted-printable:http://www.digital.com/=0D=0A= x-mozilla-cpt: ;0 x-mozilla-html: FALSE version: 2.1 end: vcard --------------9AE5426822C907C31753AD3A--