OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr34651.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
/* { dg-do compile } */
2
 
3
typedef bool Bool;
4
struct CString {
5
    CString (const char * =__null);
6
    CString & operator += (const CString &);
7
};
8
struct THotKey {
9
   short Key;
10
   Bool Control;
11
   Bool Shift;
12
   Bool Alt;
13
};
14
THotKey m_HotKey;
15
THotKey GetHotKey () { return m_HotKey; }
16
void Serialize ()
17
{
18
   THotKey inHotKey (GetHotKey());
19
   CString outCombinaison (inHotKey.Control
20
                           ? ((inHotKey.Alt || inHotKey.Shift)
21
                              ? "ctrl+" : "ctrl")
22
                           : __null);
23
   outCombinaison += inHotKey.Alt ? inHotKey.Shift ? "alt+" : "alt" : "";
24
   outCombinaison += inHotKey.Shift ? "shift" : "";
25
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.