Path: utzoo!attcan!uunet!husc6!cmcl2!rutgers!att!ihlpb!nevin1 From: nevin1@ihlpb.ATT.COM (Liber) Newsgroups: comp.std.c Subject: Re: 31 character identifier length Message-ID: <9265@ihlpb.ATT.COM> Date: 23 Dec 88 03:43:30 GMT References: <3236@pegasus.ATT.COM> <9167@smoke.BRL.MIL> <12643@bellcore.bellcore.com> <9234@ihlpb.ATT.COM> <10237@rpp386.Dallas.TX.US> Reply-To: nevin1@ihlpb.UUCP (55528-Liber,N.J.) Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 31 In article <10237@rpp386.Dallas.TX.US> jfh@rpp386.Dallas.TX.US (The Beach Bum) writes: >My compiler d' jour provides warning messages only if two objects exist >inside the same compilation unit and don't have names unique to 31 >characters. One would hope the compiler would a) use the complete >identifier, or 2) complain about a multiply defined symbol, but not >accept a second definition and then ignore it ... let me give a clearer example: int ThirtyTwoCharacterVariableIdentG; ... void foo(void) { int ThirtyTwoCharacterVariableIdentL; ... ThirtyTwoCharacterVariableIdentG = 1; ... } How a compiler handles this is, according to 3.1.2, 10/88 draft, implementation limits section, paragraph 2, p.21: "If two identifiers differ in a non-significant character, the behavior is undefined." In other words, using identifiers > 31 characters can be (although not necessarily are) dangerous! -- NEVIN ":-)" LIBER AT&T Bell Laboratories nevin1@ihlpb.ATT.COM (312) 979-4751