🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1465

Re: Multibyte character constants????

#1465
From: Doug Gwyn
Date: Sun, 01 Jul 1990 02:18
32 lines
2037 bytes
In article <1824@tkou02.enet.dec.com> diamond@tkou02.enet.dec.com (diamond@tkovoa) writes:
>In article <1990Jun28.221927.6823@idt.unit.no> arnej@solan1.solan.unit.no writes:
>>We have stumbled across the subject of multibyte character
>>constants.  Is this defined anywhere?
>Exactly the opposite.  The standard did not even just leave it undefined
>by saying nothing.  The standard explicitly says that it's undefined.

Please do not provide incorrect information like that.

What the C standard actually says is:
	The value of an integer character constant containing more
	than one character, or containing a character or escape
	sequence not represented in the basic execution character
	set, is implementation-defined.

If you don't know the difference in meaning between "implementation-
defined" and "explictly ... undefined", then you should not be trying
to interpret the standard for others.

>>For example, if we say
>>main(){printf("%d\n",'AB');}
>>what should the output be?
>It does not have to compile.  It does not have to execute.  It it does,
>it can print anything, or exec rogue.

Apart from nonconformance introduced by using printf() without having
#included <stdio.h>, and of failing to return a value for the main()
function, the program would be a correct, conforming program that a
conforming implementation would be obliged to compile and do something
useful for when the program is executed.  The specific output obtained
from executing the program would depend on factors that a conforming
implementation is obliged to document.
Technical Details
Message-ID: <13273@smoke.BRL.MIL>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!wuarchive!uwm.edu!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!ames!haven!adm!smoke!gwyn
References: <1990Jun28.221927.6823@idt.unit.no> <1824@tkou02.enet.dec.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!wuarchive!uwm.edu!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!ames!haven!adm!smoke!gwyn
From: gwyn@smoke.BRL.MIL (Doug Gwyn)
Newsgroups: comp.std.c
Subject: Re: Multibyte character constants????
Message-ID: <13273@smoke.BRL.MIL>
Date: 1 Jul 90 02:18:08 GMT
References: <1990Jun28.221927.6823@idt.unit.no> <1824@tkou02.enet.dec.com>
Organization: U.S. Army Ballistic Research Laboratory, APG, MD.
Lines: 32