home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / cplus / 11558 < prev    next >
Encoding:
Text File  |  1992-07-25  |  1.1 KB  |  43 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!mips!news.cs.indiana.edu!noose.ecn.purdue.edu!nationalrd.ecn.purdue.edu!luj
  3. From: luj@nationalrd.ecn.purdue.edu (John Lu)
  4. Subject: Is It Illegal Construct ?
  5. Message-ID: <1992Jul26.064922.22891@noose.ecn.purdue.edu>
  6. Sender: news@noose.ecn.purdue.edu (USENET news)
  7. Organization: Purdue University Engineering Computer Network
  8. Distribution: na
  9. Date: Sun, 26 Jul 1992 06:49:22 GMT
  10. Lines: 31
  11.  
  12.  
  13. ---------------------
  14. luj@mulberry [562]$ cat foo.C
  15. typedef int Pint;
  16.  
  17. typedef struct {
  18.     union Ploc_pets {
  19.         struct Ploc_pet_r1 {
  20.            Pint         unused;
  21.         } pet_r1;
  22.         struct Ploc_pet_r2 {
  23.            Pint         unused;
  24.         } pet_r2;
  25.         struct Ploc_pet_r3 {
  26.            Pint         unused;
  27.         } pet_r3;
  28.     } pets;
  29. } Ploc_data;
  30. luj@mulberry [563]$ CC -c foo.C
  31. "foo.C", line 4: internal <<AT&T C++ Translator 2.1.03 08/31/90>> error:
  32. Ploc_pets is not a class name
  33. Compilation failed
  34. errno: 1
  35. ---------------------
  36.  
  37. Where does the ARM say that above construct is illegal, or is this 
  38. a compiler bug ?
  39.  
  40. --
  41. -- John Lu 
  42.    luj@ecn.purdue.edu
  43.