]> git.pld-linux.org Git - packages/gcc.git/blame - gcc-PR10849.patch
- 3.3.1
[packages/gcc.git] / gcc-PR10849.patch
CommitLineData
e401b547 1diff -cprN gcc-33-save/gcc/cp/search.c gcc-33-new/gcc/cp/search.c
2*** gcc-33-save/gcc/cp/search.c Thu May 22 19:19:30 2003
3--- gcc-33-new/gcc/cp/search.c Sat May 24 19:03:32 2003
4*************** type_access_control (type, val)
5*** 1020,1026 ****
6 {
7 if (val == NULL_TREE
8 || (TREE_CODE (val) != TEMPLATE_DECL && TREE_CODE (val) != TYPE_DECL)
9! || ! DECL_CLASS_SCOPE_P (val))
10 return;
11
12 if (type_lookups == error_mark_node)
13--- 1020,1027 ----
14 {
15 if (val == NULL_TREE
16 || (TREE_CODE (val) != TEMPLATE_DECL && TREE_CODE (val) != TYPE_DECL)
17! || ! DECL_CLASS_SCOPE_P (val)
18! || processing_specialization)
19 return;
20
21 if (type_lookups == error_mark_node)
22diff -cprN gcc-33-save/gcc/testsuite/g++.dg/template/access10.C gcc-33-new/gcc/testsuite/g++.dg/template/access10.C
23*** gcc-33-save/gcc/testsuite/g++.dg/template/access10.C Thu Jan 1 07:00:00 1970
24--- gcc-33-new/gcc/testsuite/g++.dg/template/access10.C Sat May 24 23:26:59 2003
25***************
26*** 0 ****
27--- 1,16 ----
28+ // { dg-do compile }
29+
30+ // Origin: Giovanni Bajo <giovannibajo@libero.it>
31+
32+ // PR c++/10849: Incorrect access checking on template specialization.
33+
34+ class X {
35+ private:
36+ template <typename T> struct Y;
37+ };
38+
39+ template <> struct X::Y<int> {};
40+
41+ template <typename T> struct X::Y {};
42+
43+ template struct X::Y<int>;
This page took 0.046995 seconds and 4 git commands to generate.