summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/byval2.C
blob: 40bf2a365284f07f32ee5ebbe5524d4abc2d39af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// { dg-do assemble  }
// From: panisset@cae.ca (Jean-Francois Panisset)
// Subject: 2.6.0 pre-rel, internal error, regression, mips-sgi-irix4
// Date: Thu, 14 Jul 94 23:34:21 EDT

class Char
{
protected:
  char          rep;
public:
  Char (const char ) {}
  operator char() const;
  void  operator -= (const Char   );
};

inline  Char  operator -  (const Char    a, const Char    b) { return Char(0); }
inline  char  operator == (const Char    a, const char b) { return 0; }

char mystrcmp(Char s[31], Char t[31])
{
  for (; *s == *t; ++s, ++t) if (*s == '\0') return 0;
  return char(*s - *t);
}