home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!charnel!csusac!citrus!ianj
- From: ianj@citrus.SAC.CA.US ( Ian Justman )
- Newsgroups: comp.os.linux
- Subject: GCC typdef gone haywire
- Message-ID: <BxxqGL.3sp@citrus.SAC.CA.US>
- Date: 18 Nov 92 23:26:43 GMT
- Organization: Citrus Grove Public Access ( 916 ) 381-5822 Sacramento CA. USA
- Lines: 42
- X-Newsreader: Tin 1.1 PL4
-
- I have a terrible problem with what appears to be a legitimate typedef.
- Whenever I try to compile unarj straight out of the box, and I either
- comment out or outright delete it. Here's the code in the header file
- "unarj.h" which is duplicated (almost) entirely in
- /usr/include/linux/types.h:
-
- ---begin---begin---begin---
- typedef unsigned char uchar; /* 8 bits or more */
- typedef unsigned int uint; /* 16 - 32 bits or more */
- typedef unsigned short ushort; /* 16 bits or more */
- typedef unsigned long ulong; /* 32 bits or more */
- ---end---end---end---end---
-
- I only keep the first one because it's not defined in the abovementioned
- file in the /usr/include/~~~ hierarchy. Zap the remaining three, and we're
- OK, right? WRONG!!!!!
-
- Here's the offending code it promptly vomits on:
-
- (specifically, a parse error)
-
- ---begin---begin---begin---
- typedef ulong UCRC; /* CRC-32 */
- ---end---end---end---end---
-
- This was extracted from "unarj.h"
-
- THIS LOOKS LIKE (AND IS) A COMPLETELY __LEGITIMATE__ TYPEDEF!!!!!
-
- Excuse me for being slightly blunt, but this means that there's
- something seriously wrong with GCC.
-
- Additional notes, the files were extraced from UARJ230.EXE. I did
- get the ball o' wax to compile, but the way I did it was a little
- bit out of desparation. I removed the duplicate typedefs from the
- /usr/include/linux/types.h and used the ones in unarj.h, and it
- compiled flawlessly.
-
- I shouldn't HAVE to do this; this kind of thing ticks me off and I
- hope someone has an explanation.
- --
- Born to void warranties! ianj@ijpc.UUCP
-