Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.old-deja/g++.jason/rfg14.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
// { dg-do assemble } void *vp; int (*ap)[]; struct S *sp; union U *up; int (*fp)(); void test () { vp++; /* { dg-error "5:ISO C\\+\\+ forbids incrementing" } incrementing void * */ ap++; /* { dg-error "5:cannot increment" } incrementing ptr to incomplete type */ sp++; /* { dg-error "5:cannot increment" } incrementing ptr to incomplete type */ up++; /* { dg-error "5:cannot increment" } incrementing ptr to incomplete type */ fp++; /* { dg-error "5:ISO C\\+\\+ forbids incrementing" } incrementing ptr to function */ }