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: mooney@dogbert.cc.ndsu.NoDak.edu (Tim Mooney) Subject: Re: [Help]gcc ignored #pragma pack on DEC/OSF1 4.0B Date: 1998/01/06 Message-ID: <68shad$195@dogbert.cc.ndsu.NoDak.edu>#1/1 X-Deja-AN: 313205319 References: <689ng7$ja2@news.seed.net.tw> <34A918FF.EE41F28F@zk3.dec.com> <6c1zytk51r.fsf@dextrose.atria.com> <34B112CE.6F59@zk3.dec.com> Organization: North Dakota Higher Education Computing Network (NDHECN) Newsgroups: comp.unix.osf.osf1 In article <34B112CE.6F59@zk3.dec.com>, Joe Mario wrote: > John Kohl wrote: > > > > Jeff Sullivan writes: > > > > > You should try using the ANSI modes of the default compiler (DEC C) > > > Ok, you asked for it... (warning, flame-bait follows :) > > Why is -std1 not the default mode of operation (or at least -std)? > > C has been standardized for 8 years now, shouldn't the default mode of > > the compiler, without extra flags, be the standard behavior? > > Let those who still insist on non-standard K&R C provide the > > command line flag(s). > > The default is changing to -std in the DU V5.0 (Steel) release. > Many agree with you this should have been done long ago. Thanks for the info, Jeff & Joe! While we're talking about the compiler... :-) One compiler flag that I like to use is `-portable' -- it's a lot like gcc's `-Wall', so it turns up a lot of problem areas in code. I have found a couple annoyances with using that flag, though. 1) it warns about `__inline', and stdio.h uses `__inline', so one gets screenfulls of warnings for any file that includes stdio.h. Is there a #pragma to turn off particular warnings (or even warning altogether)? It would be nice to be able to either #pragma no_inline_portable_warnings #include #pragma inline_portable_warnings or have the friendly folks at Digital (that's you! ;-) ) do it for us, by wrapping the places where __inline is used right in stdio.h 2) It warns about this: GTK_HAS_SHAPE_MASK = 1 << 22 in an enum: In this declaration, the enumeration constant GTK_HAS_SHAPE_MASK is out of the range -32768 to 32767. The way I read K&R (2nd ed.) , an enum value is an int. Presumably the compiler is warning us that if we plan to port the code to some place where an int is 16 bits, we will run into a problem. I guess there might be someone out there that finds that useful, but for all of the "spurious" warnings it generates on 32 and 64 bit machines (where an int is 32 bits and has a large enough range to handle the value) it seems to be more "noise" than it's worth. 3) Any chance that the linker will *finally* be fixed so that it doesn't dump core when the filesystem fills? ;-) Thanks for the info on 5.0! I'm looking forward to it. Tim -- Tim Mooney mooney@dogbert.cc.ndsu.NoDak.edu Information Technology Services (701) 231-1076 (Voice) Room 242-J1, IACC Building (701) 231-8541 (Fax) North Dakota State University, Fargo, ND 58105-5164