From: millers@cris.com (Brian N. Miller)
Subject: Re: Java Risks (Was: Ada News Brief - 96-05-24
Date: 1996/06/08
Date: 1996-06-08T00:00:00+00:00 [thread overview]
Message-ID: <4paprf$8hu@tribune.concentric.net> (raw)
In-Reply-To: 4p44m2$tc5@watnews1.watson.ibm.com
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");
};
next prev parent reply other threads:[~1996-06-08 0:00 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-05-24 0:00 Ada News Brief - 96-05-24.txt [1/1] AdaIC
1996-05-27 0:00 ` Brian Rogoff
1996-05-27 0:00 ` Tucker Taft
1996-05-28 0:00 ` Richard Riehle
1996-05-29 0:00 ` Andreas Zeller
1996-05-30 0:00 ` Robert Dewar
1996-06-01 0:00 ` AdaWorks
1996-06-01 0:00 ` Robert Dewar
1996-06-01 0:00 ` AdaWorks
1996-06-01 0:00 ` Robert Dewar
1996-06-01 0:00 ` Mike Young
1996-06-03 0:00 ` Robert Dewar
1996-06-04 0:00 ` Richard Riehle
1996-05-30 0:00 ` Java Risks (Was: Ada News Brief - 96-05-24 Richard Riehle
1996-05-31 0:00 ` Java Risks (should be Java mis-speak) The Right Reverend Colin James III
1996-06-02 0:00 ` Richard Riehle
1996-06-03 0:00 ` Tucker Taft
1996-05-31 0:00 ` Java Risks (Was: Ada News Brief - 96-05-24 Brian N. Miller
1996-06-02 0:00 ` Richard Riehle
1996-06-03 0:00 ` Ken Garlington
1996-06-04 0:00 ` Bill Brooks
1996-06-06 0:00 ` Bjarne Stroustrup <9758-26353> 0112760
1996-06-06 0:00 ` Robert Dewar
[not found] ` <4omoh4$k0f@ansible.bbt.com <4ov36b$1665@watnews1.watson.ibm.com>
1996-06-04 0:00 ` Richard Riehle
1996-05-31 0:00 ` Jon S Anthony
1996-06-01 0:00 ` Java Risks David Hopwood
1996-06-02 0:00 ` Java Risks (Was: Ada News Brief - 96-05-24 Richard Riehle
1996-06-01 0:00 ` Bob Crispen
1996-06-05 0:00 ` Alan Brain
1996-06-03 0:00 ` Norman H. Cohen
1996-06-03 0:00 ` Imonics Corporation
1996-06-07 0:00 ` Peter Wentworth
1996-06-05 0:00 ` Norman H. Cohen
1996-06-05 0:00 ` Bill Brennamw
1996-06-08 0:00 ` Brian N. Miller [this message]
1996-06-09 0:00 ` Jim Kingdon
-- strict thread matches above, loose matches on Subject: below --
1996-06-03 0:00 Jon S Anthony
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox