This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13092] [3.4/3.5 regression] Segfault in convert_nontype_argument
- From: "lerdsuwa at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Jan 2004 10:51:47 -0000
- Subject: [Bug c++/13092] [3.4/3.5 regression] Segfault in convert_nontype_argument
- References: <20031117223716.13092.giovannibajo@libero.it>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From lerdsuwa at gcc dot gnu dot org 2004-01-24 10:51 -------
An example why access checking has to be done later can be seen from
the testcase non-dependent9.C in the patch. In the following code:
template <class T> void fr ()
{
...
X<&D2::i> x1; // { dg-error "context" }
...
we are parsing '&D2::i' and call 'convert_nontype_argument' to see if the
argument is valid. We can't compute access yet because the function 'fr'
is still a template. We have to wait until 'fr' is instantiated to see
if this particular specialization is a friend of 'D2'. The check is done
in 'tsubst_qualified_id' during template instantiation.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13092