comp.lang.ada
 help / color / mirror / Atom feed
From: kingdon@harvey.cyclic.com (Jim Kingdon)
Subject: Re: Java Risks  (Was: Ada News Brief - 96-05-24
Date: 1996/06/09
Date: 1996-06-09T00:00:00+00:00	[thread overview]
Message-ID: <m2ennor657.fsf@harvey.cyclic.com> (raw)
In-Reply-To: 4o56db$p66@ns1.sw-eng.falls-church.va.us



(I probably have something better to do than following up, but....)

    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");
    };

My compiler catches this:

bash$ gcc -Wall def.c 
def.c: In function `main':
def.c:9: warning: enumeration value `white' not handled in switch
def.c:8: warning: label `defualt' defined but not used
bash$ 





  parent reply	other threads:[~1996-06-09  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 ` Tucker Taft
1996-05-28  0:00   ` Richard Riehle
1996-05-29  0:00     ` Andreas Zeller
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-30  0:00       ` Ada News Brief - 96-05-24.txt [1/1] 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-06-01  0:00         ` AdaWorks
1996-06-01  0:00           ` Robert Dewar
1996-05-27  0:00 ` Brian Rogoff
1996-05-31  0:00 ` Java Risks (Was: Ada News Brief - 96-05-24 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
1996-06-09  0:00 ` Jim Kingdon [this message]
  -- 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