error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope to current_function_decl...
authorJakub Jelinek <jakub@redhat.com>
Sat, 27 Oct 2007 15:56:49 +0000 (17:56 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sat, 27 Oct 2007 15:56:49 +0000 (17:56 +0200)
* error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
to current_function_decl rather than 0.

From-SVN: r129683

gcc/cp/ChangeLog
gcc/cp/error.c

index 90a010f934e3bf9b043193b388a3bb7425fbab3c..2857d4b35d265b20acb095ef3abc3580aadb36d6 100644 (file)
@@ -1,5 +1,8 @@
 2007-10-27  Jakub Jelinek  <jakub@redhat.com>
 
+       * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
+       to current_function_decl rather than 0.
+
        PR c++/33844
        * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
        ->* rather than .*.
index 5456c85c39b6d6a72bf040a86a7ec2bec78be981..b949f192a51331af59734a225035816fe61d06db 100644 (file)
@@ -2107,7 +2107,7 @@ reinit_cxx_pp (void)
   pp_base (cxx_pp)->padding = pp_none;
   pp_indentation (cxx_pp) = 0;
   pp_needs_newline (cxx_pp) = false;
-  cxx_pp->enclosing_scope = 0;
+  cxx_pp->enclosing_scope = current_function_decl;
 }