3 // Copyright (C) 2000 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 4 Feb 2000 <nathan@acm.org>
6 // Array of cv T decays to pointer to cv T, and pointer to array of cv T can
7 // be converted to pointer to cv T. We need to make sure the `cv's don't
10 typedef char const *ary_t[2];
12 void f0 (ary_t const *const &ary)
14 static_cast <void const *> (ary);
15 static_cast <void *> (ary); // { dg-error "" } casts away const
19 void f1 (ary_t *const &ary)
21 static_cast <void *> (ary);
22 static_cast <void const *> (ary);
26 void f2 (ary_t const *&ary)
28 static_cast <void const *> (ary);
29 static_cast <void *> (ary); // { dg-error "" } casts away const
35 static_cast <void *> (ary);
36 static_cast <void const *> (ary);