aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/misc-column.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/misc-column.c')
-rw-r--r--gcc/testsuite/gcc.dg/misc-column.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/misc-column.c b/gcc/testsuite/gcc.dg/misc-column.c
index f84a553..a24427e 100644
--- a/gcc/testsuite/gcc.dg/misc-column.c
+++ b/gcc/testsuite/gcc.dg/misc-column.c
@@ -1,5 +1,6 @@
/* { dg-options "-fshow-column -Wall -Wfloat-equal -pedantic" } */
+int i, j;
float a, b;
int *p;
@@ -26,4 +27,14 @@ void foo (void)
if (p < 0) /* { dg-warning "9:ordered comparison of pointer with" } */
bar();
+
+ -q; /* { dg-error "3:wrong type argument to unary" } */
+
+ ~q; /* { dg-error "3:wrong type argument to bit" } */
+
+ ++*q; /* { dg-error "3:wrong type argument to increment" } */
+
+ i = j / 0; /* { dg-warning "9:division by zero" } */
+
+ i /= 0; /* { dg-warning "5:division by zero" } */
}