diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/rfg14.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.jason/rfg14.C | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg14.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg14.C new file mode 100644 index 000000000..85a346afe --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.jason/rfg14.C @@ -0,0 +1,16 @@ +// { dg-do assemble } +void *vp; +int (*ap)[]; +struct S *sp; +union U *up; +int (*fp)(); + +void +test () +{ + vp++; /* { dg-error "" } incrementing void * */ + ap++; /* { dg-error "" } incrementing ptr to incomplete type */ + sp++; /* { dg-error "" } incrementing ptr to incomplete type */ + up++; /* { dg-error "" } incrementing ptr to incomplete type */ + fp++; /* { dg-error "" } incrementing ptr to function */ +} |