error.c (dump_decl): Make sure there is lang_specific info before checking for DTOR...
authorAndrew MacLeod <amacleod@redhat.com>
Thu, 16 Sep 2004 18:52:48 +0000 (18:52 +0000)
committerAndrew Macleod <amacleod@gcc.gnu.org>
Thu, 16 Sep 2004 18:52:48 +0000 (18:52 +0000)
2004-09-16  Andrew MacLeod  <amacleod@redhat.com>

* error.c (dump_decl): Make sure there is lang_specific info before
checking for DTOR and CTOR decls.

From-SVN: r87610

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

index 6c46adc27891fea878514d7a08b5a3b606617c4b..2979b3d3a302862952e4f19e7308fb68da207c62 100644 (file)
@@ -1,3 +1,8 @@
+2004-09-16  Andrew MacLeod  <amacleod@redhat.com>
+
+       * error.c (dump_decl): Make sure there is lang_specific info before 
+       checking for DTOR and CTOR decls.
+
 2004-09-16  Nathan Sidwell  <nathan@codesourcery.com>
 
        * class.c (copy_virtuals): Remove.
index 03feaf3b7dac943b3285717ca5c164412877e63e..dd6affa3f83aa3d9a8ba2c752b1d7f79d0c7ed64 100644 (file)
@@ -831,10 +831,10 @@ dump_decl (tree t, int flags)
       /* Fall through.  */
 
     case FUNCTION_DECL:
-      if (DECL_GLOBAL_CTOR_P (t) || DECL_GLOBAL_DTOR_P (t))
-       dump_global_iord (t);
-      else if (! DECL_LANG_SPECIFIC (t))
+      if (! DECL_LANG_SPECIFIC (t))
        pp_identifier (cxx_pp, "<built-in>");
+      else if (DECL_GLOBAL_CTOR_P (t) || DECL_GLOBAL_DTOR_P (t))
+       dump_global_iord (t);
       else
         dump_function_decl (t, flags);
       break;