Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.bugs / 900211_04.C
blob5043606107de3400c853029d6d95579db81875e5
1 // { dg-do assemble  }
2 // g++ 1.36.1 bug 900211_04
4 // g++ fails to flag as errors attempts to compare pointer values against
5 // (nonzero) integer values;
7 // Since implicit conversions of pointer to integers (or vise versa) are
8 // illegal, these comparisons are also illegal.
10 // Cfront 2.0 passes this test.
12 // keywords: comparison operators, pointer types, integral types
14 int result;
15 int i;
16 char *p;
18 void function ()
20   result = i == p;      /* { dg-error "" } caught by g++ */
21   result = i != p;      /* { dg-error "" } caught by g++ */
22   result = i >  p;      /* { dg-error "" } missed */
23   result = i <  p;      /* { dg-error "" } missed */
24   result = i >= p;      /* { dg-error "" } missed */
25   result = i <= p;      /* { dg-error "" } missed */
28 int main () { return 0; }