TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: Adam Fitzpatrick
from: Paul Edwards
date: 1996-06-04 19:39:14
subject: indirection

PE> I am not sure anyone knows everything about C.  I didn't know the
PE> above.  Another thing I only found out recently is that you have
PE> to go unsigned int xxx:1;
PE> in a structure, rather than unsigned short xxx:1;

AF> Is that in the standard or something you've observed? This compiled without
AF> error with EMX/GCC:

Actually, it was a warning/error I got from Borland C++ 3.1.
I didn't double-check that in the standard.

AF> int main()
AF> {
AF>   struct fred {
AF>     unsigned short xxx:1;
AF>     unsigned int yyy:1;
AF>     unsigned short int zzz:1;
AF>   };
AF> }

AF> It might be the compiler (or maybe GCC does something it shouldn't. Does

Well, if they create an extension, and don't warn you when you use
the extension, it's still just as much the programmer's fault.

AF> "unsigned short int" work?

"short" and "short int" are identical, so I didn't test that.
BFN.  Paul.
@EOT:

---
* Origin: X (3:711/934.9)

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.