From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: ** X-Spam-Status: No, score=2.1 required=5.0 tests=BAYES_20,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f43e6,12f4d07c572005e3 X-Google-Attributes: gidf43e6,public X-Google-Thread: 103376,12f4d07c572005e3 X-Google-Attributes: gid103376,public X-Google-Thread: ff6c8,12f4d07c572005e3 X-Google-Attributes: gidff6c8,public X-Google-Thread: 1108a1,12f4d07c572005e3 X-Google-Attributes: gid1108a1,public X-Google-Thread: 10db24,12f4d07c572005e3 X-Google-Attributes: gid10db24,public From: millers@cris.com (Brian N. Miller) Subject: Re: Java Risks (Was: Ada News Brief - 96-05-24 Date: 1996/06/08 Message-ID: <4paprf$8hu@tribune.concentric.net>#1/1 X-Deja-AN: 159069311 distribution: world references: <4o56db$p66@ns1.sw-eng.falls-church.va.us> <4p44m2$tc5@watnews1.watson.ibm.com> content-type: Text/Plain; charset=US-ASCII organization: Brian from home. mime-version: 1.0 reply-to: bnm@bbt.com newsgroups: comp.lang.ada,comp.sw.components,comp.object,comp.software-eng,comp.edu Date: 1996-06-08T00:00:00+00:00 List-Id: In article <4p44m2$tc5@watnews1.watson.ibm.com>, ncohen@watson.ibm.com says... > >Here's the latest C/C++ pitfall to bite me: > > char * six_string_guitar[6] = > { "E string", > "A string", > "D string" > "G string", > "B string", > "E string" > }; > >Because of the missing comma following "D string" (did you notice it?), >six_string_guitar is actually quietly initialized to {"E string", >"A string", "D stringG string", "B string", "E string", 0}. How about this one which prints nothing because mispelled 'default:' is treated as a goto label: enum {red,white,blue} color = white; switch (color) { case red: printf("red"); break; case blue: printf("blue"); /* Fall thru */ defualt: printf("blue or other color"); };