source: branches/libc-0.6/testcase/456/classenum.cpp@ 2442

Last change on this file since 2442 was 733, checked in by bird, 22 years ago

Initial testcase.

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 819 bytes
Line 
1/* $Id: classenum.cpp 733 2003-09-26 14:14:04Z bird $ */
2/** @file
3 * This testcase show a problem with forward references to enums.
4 * GCC doesn't really make .stabs and enums types debuggable, but it's better
5 * to not have nsUGenCategory - the type name - than loosing all the values.
6 * So, I've switched off 'xe' output and we'll get values only, no type name.
7 */
8class ChildClass
9{
10public:
11 typedef enum
12 {
13 kUGenCategory_Mark = 1,
14 kUGenCategory_Number = 2,
15 kUGenCategory_Separator = 3,
16 kUGenCategory_Other = 4,
17 kUGenCategory_Letter = 5,
18 kUGenCategory_Punctuation = 6,
19 kUGenCategory_Symbol = 7
20 } nsUGenCategory;
21
22public:
23 ChildClass(nsUGenCategory enm)
24 {
25 }
26};
27
28int main(void)
29{
30 ChildClass obj((ChildClass::nsUGenCategory)2);
31 return 0;
32}
Note: See TracBrowser for help on using the repository browser.