From: Nathan Sidwell Date: Fri, 3 Sep 1999 08:59:06 +0000 (+0000) Subject: * g++.old-deja/g++.other/deref1.C: New test. X-Git-Tag: prereleases/libstdc++-2.92~10857 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8c5f3e15b070348e7e4ae9151a79419472a19bf4;p=thirdparty%2Fgcc.git * g++.old-deja/g++.other/deref1.C: New test. From-SVN: r29080 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2bf872df10ac..ef6ee556d090 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +Fri Sep 03 09:31:10 BST 1999 Nathan Sidwell + + * g++.old-deja/g++.other/deref1.C: New test. + Thu Sep 02 09:27:34 BST 1999 Nathan Sidwell * g++.old-deja/g++.other/ambig2.C: New test. diff --git a/gcc/testsuite/g++.old-deja/g++.other/deref1.C b/gcc/testsuite/g++.old-deja/g++.other/deref1.C new file mode 100644 index 000000000000..706cd9239016 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/deref1.C @@ -0,0 +1,13 @@ +// Copyright (C) 1999 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 1 Sep 1999 + +// [expr.unary.op]/1 says you can dereference all pointers except for pointers +// to cv void. + +void fn (void *vp, volatile void *vvp) +{ + *vp; // ERROR - not a pointer to object + *vvp; // ERROR - not a pointer to object + &*vp; // ERROR - not a pointer to object + &*vvp; // ERROR - not a pointer to object +}