Path: utzoo!mnetor!uunet!husc6!hao!ames!umd5!mimsy!chris
From: chris@mimsy.UUCP (Chris Torek)
Newsgroups: comp.unix.questions
Subject: Re: Portability Question
Message-ID: <9803@mimsy.UUCP>
Date: 15 Dec 87 19:00:14 GMT
References: <122@insyte.uucp>
Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742
Lines: 19
Keywords: Portable VAX VMS vs HPUX c

In article <122@insyte.uucp> jad@insyte.uucp (Jill Diewald) writes:
-... HPUX c ... [and] VMS c ... [give] different answers.  We want to
-know which is right (if either) so we can report it as a bug to the
-correct source.
 ...
-main() {
-    struct { int x : 1; } foo;
-
-    foo.x = 1;
-    printf ("%d\n", foo.x);
-}

Whether bitfields are signed is undefined.  I believe the current
draft says that to get a particular behaviour, you must use either
of the `signed' or `unsigned' keywords.  In other words, the code
is wrong, not either of the compilers.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690)
Domain:	chris@mimsy.umd.edu	Path:	uunet!mimsy!chris