🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #54304

enums

#54304
From: mmodrall%greystone
Date: Wed, 05 Dec 1990 16:18
18 lines
1305 bytes
Hi...
	I ran into another small problem using gcc...
our program has a few enum's that have over 127 elements in them.
I discovered yesterday that gcc imposes a signed char interpretation
on an enum, so i was having trouble making comparisons between one
char and an enum code... i had used the -traditional flag on compiling,
so instead of issuing a warning when i referenced an enum element over
127, it just substituted 127.  The result being that the comparison
was faulty...

	I've tried using the -fshort-enum and -fno-short-enum flags that
i saw mentioned in the ChangeLog, but i didn't see any discernable
difference... is there something in the configuration of gcc i can switch
to change how enum's are cast?

thanks

-mark
Technical Details
Message-ID: <9012051618.AA04869@uunet.UU.NET>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!UUNET.UU.NET!mmodrall%greystone

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,3ed4bbf9e0aff159,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1990-12-05 14:53:51 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!UUNET.UU.NET!mmodrall%greystone
From: mmodrall%greystone@UUNET.UU.NET
Newsgroups: gnu.gcc.help
Subject: enums
Message-ID: <9012051618.AA04869@uunet.UU.NET>
Date: 5 Dec 90 16:18:47 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 18
Posted: Wed Dec  5 17:18:47 1990