This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: VLA inside template functions
- To: Jason Merrill <jason at cygnus dot com>
- Subject: Re: VLA inside template functions
- From: Theodore Papadopoulo <Theodore dot Papadopoulo at sophia dot inria dot fr>
- Date: Fri, 14 Jan 2000 09:32:26 +0100
- cc: gcc-bugs at gcc dot gnu dot org
-----
Well, it was still there last sunday....
mururoa->more TempGnuDynArray.C
// Build don't link:
// Origin: Theo Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
inline const unsigned& f(unsigned const& a) {
return a;
}
template <class T>
void
g(const unsigned n)
{
double D[f(n)];
}
template <class T,class U>
void g(unsigned const int) { }
int main()
{
g<double>(18);
}
mururoa->g++ TempGnuDynArray.C
TempGnuDynArray.C: In function `void g (unsigned int) [with T = double]':
TempGnuDynArray.C:20: instantiated from here
TempGnuDynArray.C:12: invalid type argument of `unary *'
TempGnuDynArray.C:12: size of array has non-integer type
mururoa->g++ -v
Reading specs from /net/home/robotvis/gnu/egcs/lib/gcc-lib/i686-pc-linux-gnu/2.96/specs
gcc version 2.96 20000109 (experimental)
Theo.
---------------------------------------------------------------
Theodore Papadopoulo
Email: Theodore.Papadopoulo@sophia.inria.fr Tel: (33) 04 92 38 76 01
--------------------------------------------------------------------