Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
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	[thread overview]
Message-ID: <68shad$195@dogbert.cc.ndsu.NoDak.edu> (raw)
In-Reply-To: 34B112CE.6F59@zk3.dec.com


In article <34B112CE.6F59@zk3.dec.com>, Joe Mario  <mario@zk3.dec.com> wrote:
> John Kohl wrote:
> > 
> > Jeff Sullivan <jps@zk3.dec.com> 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 <stdio.h>
#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



  reply	other threads:[~1998-01-06  5:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-12-30  5:00 [Help]gcc ignored #pragma pack on DEC/OSF1 4.0B Ming-Yen Hsu
1997-12-30  5:00 ` Jeff Sullivan
1997-12-31  5:00   ` John Kohl
1998-01-05  5:00     ` Joe Mario
1998-01-06  5:00       ` Tim Mooney [this message]
1998-01-06  5:00         ` Kevin Jacobs
1998-01-08  5:00           ` Jeff Sullivan
1998-01-08  5:00         ` Jeff Sullivan
1998-01-13  5:00         ` Jeff Sullivan
1998-01-16  5:00           ` Tim Mooney
1998-01-05  5:00     ` Jeff Sullivan
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox