OSDN Git Service

* c-tree.h: Add argument to c_objc_common_truthvalue_conversion,
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / misc-column.c
1 /* { dg-options "-fshow-column -Wall -Wfloat-equal -pedantic" } */
2
3 float a, b;
4
5 int *p;
6 struct {
7         int a;
8         char b;
9 } *q;
10
11 extern void bar();
12
13 void foo (void)
14 {
15   if (a == b) /* { dg-warning "9:comparing floating point with" } */
16     bar ();
17
18   if (p < q) /* { dg-warning "9:comparison of distinct pointer types" } */
19     bar ();
20
21   if (&p == 0) /* { dg-warning "10:will never be NULL" } */
22     bar();
23
24   if (p == 4) /* { dg-warning "9:comparison between pointer and integer" } */
25     bar();
26
27   if (p < 0) /* { dg-warning "9:ordered comparison of pointer with" } */
28     bar();
29 }