wchar_t values

Doug Gwyn gwyn at smoke.brl.mil
Mon Apr 1 23:54:14 AEST 1991


In article <1991Apr1.065249.25920 at tkou02.enet.dec.com> diamond at jit345.enet@tkou02.enet.dec.com (Norman Diamond) writes:
-In article <15640 at smoke.brl.mil> gwyn at smoke.brl.mil (Doug Gwyn) writes:
->In article <990 at sranha.sra.co.jp> erik at sra.co.jp (Erik M. van der Poel) writes:
->>Which of the following two conditions is the correct interpretation of
->>the ANSI C standard:
->>	('c' == L'c')
->>	('c' == ((char) L'c'))
->Neither one, although the first one is close.  The numerical values
->of these two (possibly distinct) integer types shall be the same.
-Huh?  When they have the same numerical value and both are integer types,
-how is it possible for them to not compare equal?

My point was that the correct interpretation of the standard encompasses
more than the specific example.  The example is implied by the standard's
specification, but not vice-versa.  Thus they are not equivalent.



More information about the Comp.std.c mailing list