]> git.pld-linux.org Git - packages/gcc.git/commitdiff
- fixed PR10849 bug
authoraflinta <aflinta@pld-linux.org>
Fri, 6 Jun 2003 13:20:13 +0000 (13:20 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    gcc-PR10849.patch -> 1.1

gcc-PR10849.patch [new file with mode: 0644]

diff --git a/gcc-PR10849.patch b/gcc-PR10849.patch
new file mode 100644 (file)
index 0000000..666049f
--- /dev/null
@@ -0,0 +1,43 @@
+diff -cprN gcc-33-save/gcc/cp/search.c gcc-33-new/gcc/cp/search.c
+*** gcc-33-save/gcc/cp/search.c        Thu May 22 19:19:30 2003
+--- gcc-33-new/gcc/cp/search.c Sat May 24 19:03:32 2003
+*************** type_access_control (type, val)
+*** 1020,1026 ****
+  {
+    if (val == NULL_TREE
+        || (TREE_CODE (val) != TEMPLATE_DECL && TREE_CODE (val) != TYPE_DECL)
+!       || ! DECL_CLASS_SCOPE_P (val))
+      return;
+  
+    if (type_lookups == error_mark_node)
+--- 1020,1027 ----
+  {
+    if (val == NULL_TREE
+        || (TREE_CODE (val) != TEMPLATE_DECL && TREE_CODE (val) != TYPE_DECL)
+!       || ! DECL_CLASS_SCOPE_P (val)
+!       || processing_specialization)
+      return;
+  
+    if (type_lookups == error_mark_node)
+diff -cprN gcc-33-save/gcc/testsuite/g++.dg/template/access10.C gcc-33-new/gcc/testsuite/g++.dg/template/access10.C
+*** gcc-33-save/gcc/testsuite/g++.dg/template/access10.C       Thu Jan  1 07:00:00 1970
+--- gcc-33-new/gcc/testsuite/g++.dg/template/access10.C        Sat May 24 23:26:59 2003
+***************
+*** 0 ****
+--- 1,16 ----
++ // { dg-do compile }
++ 
++ // Origin: Giovanni Bajo <giovannibajo@libero.it>
++ 
++ // PR c++/10849: Incorrect access checking on template specialization.
++ 
++ class X {
++   private:
++     template <typename T> struct Y;
++ };
++ 
++ template <> struct X::Y<int> {};
++ 
++ template <typename T> struct X::Y {};
++ 
++ template struct X::Y<int>;
This page took 0.095227 seconds and 4 git commands to generate.