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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [misc-column.c] - Blame information for rev 315

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-options "-fshow-column -Wall -Wfloat-equal -pedantic" } */
2
 
3
int i, j;
4
float a, b;
5
 
6
int *p;
7
struct {
8
        int a;
9
        char b;
10
} *q;
11
 
12
extern void bar();
13
 
14
void foo (void)
15
{
16
  if (a == b) /* { dg-warning "9:comparing floating point with" } */
17
    bar ();
18
 
19
  if (p < q) /* { dg-warning "9:comparison of distinct pointer types" } */
20
    bar ();
21
 
22
  if (&p == 0) /* { dg-warning "10:will never be NULL" } */
23
    bar();
24
 
25
  if (p == 4) /* { dg-warning "9:comparison between pointer and integer" } */
26
    bar();
27
 
28
  if (p < 0) /* { dg-warning "9:ordered comparison of pointer with" } */
29
    bar();
30
 
31
  -q;    /* { dg-error "3:wrong type argument to unary" } */
32
 
33
  ~q;    /* { dg-error "3:wrong type argument to bit" } */
34
 
35
  ++*q; /* { dg-error "3:wrong type argument to increment" } */
36
 
37
  i = j / 0;  /* { dg-warning "9:division by zero" } */
38
 
39
  i /= 0; /* { dg-warning "5:division by zero" } */
40
}

powered by: WebSVN 2.1.0

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