🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1308

Re: Can an enumerator be assigned to an int?

#1308
From: Larry Jones
Date: Sat, 26 May 1990 18:54
32 lines
2115 bytes
In article <16728@haddock.ima.isc.com>, karl@haddock.ima.isc.com (Karl Heuer) writes:
> In article <1421@sdrc.UUCP> gcglan@sdrc.UUCP (Frank Glandorf) writes:
> >	a=CIRCLE;
> >%CC-W-ENUMCLASH, Mismatched enum type in "=" operation.
>      ^
> I presume from this codeletter that the implementation did not in fact
> terminate the compilation as a result of the mismatch.
> 
> 2.1.1.3 footnote 6: "Of course, an implementation is free to produce any
> number of [warning] diagnostics".  A.5 common warnings: "A value is given to
> an object of enumeration type other than by assignment of [something of the
> same enumeration type]."
> 
> In diagnosing violations of the strong-enum model, the implementation is
> (a) legally in the right (as long as it is only a warning) and also (b)
> morally in the right (as long as there is an option to disable the warning).

You're right about (a) and I agree with you about (b) in
priciple, but I have to disagree in this specific case because of
the nature of warnings in Vax C.  The fact that a warning was
issued is recorded in the object file and reiterated every time
you do anything with it like put it in a library or link to it.
Vax C has another category of messages (informational) which are
displayed, but not recorded in the object file which would be
more appropriate for this kind of message.
----
Larry Jones                         UUCP: uunet!sdrc!scjones
SDRC                                      scjones@SDRC.UU.NET
2000 Eastman Dr.                    BIX:  ltl
Milford, OH  45150-2789             AT&T: (513) 576-2070
"You know how Einstein got bad grades as a kid?  Well MINE are even WORSE!"
-Calvin
Technical Details
Message-ID: <1429@sdrc.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!sdrc!scjones
References: <1421@sdrc.UUCP> <16728@haddock.ima.isc.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!sdrc!scjones
From: scjones@sdrc.UUCP (Larry Jones)
Newsgroups: comp.std.c
Subject: Re: Can an enumerator be assigned to an int?
Keywords: VAX/VMS C issues warning
Message-ID: <1429@sdrc.UUCP>
Date: 26 May 90 18:54:25 GMT
References: <1421@sdrc.UUCP> <16728@haddock.ima.isc.com>
Distribution: na
Organization: SDRC, Cincinnati
Lines: 32