mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-08 16:07:24 +08:00
pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
cp: * pt.c (unify, ARRAY_TYPE): Element type can be more qualified. testsuite: * g++.dg/template/deduce1.C: New test. From-SVN: r57120
This commit is contained in:
parent
32b4f6f42a
commit
712467a4c9
@ -1,3 +1,7 @@
|
||||
2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
|
||||
|
||||
2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
|
||||
|
||||
* decl.c: Fix comment formatting.
|
||||
|
@ -8921,7 +8921,7 @@ unify (tparms, targs, parm, arg, strict)
|
||||
TYPE_DOMAIN (arg), UNIFY_ALLOW_NONE) != 0)
|
||||
return 1;
|
||||
return unify (tparms, targs, TREE_TYPE (parm), TREE_TYPE (arg),
|
||||
UNIFY_ALLOW_NONE);
|
||||
strict & UNIFY_ALLOW_MORE_CV_QUAL);
|
||||
|
||||
case REAL_TYPE:
|
||||
case COMPLEX_TYPE:
|
||||
|
@ -1,3 +1,7 @@
|
||||
2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* g++.dg/template/deduce1.C: New test.
|
||||
|
||||
2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
|
||||
|
||||
* gcc.c-torture/execute/simd-1.c: Force all use of int to
|
||||
|
25
gcc/testsuite/g++.dg/template/deduce1.C
Normal file
25
gcc/testsuite/g++.dg/template/deduce1.C
Normal file
@ -0,0 +1,25 @@
|
||||
// { dg-do run }
|
||||
|
||||
// Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 13 Sep 2002 <nathan@codesourcery.com>
|
||||
|
||||
template <typename T> int Foo (T const *)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
template <typename T> int Foo (T const &)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
template <typename T, __SIZE_TYPE__ I> int Foo (T const (&ref)[I])
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main ()
|
||||
{
|
||||
static int array[4] = {};
|
||||
|
||||
return Foo (array);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user