This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/13092] [3.4/3.5 regression] Segfault in convert_nontype_argument


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]