This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13963] gcc rejects array of unknown bounds as parameter of function template specialization
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Feb 2004 00:59:03 -0000
- Subject: [Bug c++/13963] gcc rejects array of unknown bounds as parameter of function template specialization
- References: <20040201194206.13963.austern@apple.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From gdr at integrable-solutions dot net 2004-02-02 00:59 -------
Subject: Re: gcc rejects array of unknown bounds as parameter of function template specialization
"austern at apple dot com" <gcc-bugzilla@gcc.gnu.org> writes:
| And, of course, the test that began all this is that gcc thinks that
| h<int[]>(A) is illegal while icc accepts it. Based on my reading of
| the standard (see above), I believe that icc is right and gcc is wrong.
| Does anyone have an argument from the standard that says that gcc's
| behavior is right?
Matt is right. When, looking at these stuffs, we should try to deduce
the right behaviour from the standard specification; not from random
tools we have at hand (sure, they are handy, but until we prove they
are correct we can't use them to set what is the right behaviour).
As Matt pointed out, the standard is pretty clear that the
array-to-pointer conversion should happen in the function parameter
type list.
-- gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13963