This is the mail archive of the gcc-patches@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]

[C++ PATCH] Fix PR6892


Hi

This patch fixes PR6892.  This is a regression from GCC 3.0 and
present in both 3.1 and main trunk.  It's due to the FILE_STMT
tree node addition earlier this year.  Changes were made in
the C frontend but the tsubst_expr isn't updated for this
particular tree node.

Bootstrapped and tested with no regressions.  OK to commit
to the main trunk and 3.1 branch?

2002-06-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>

        PR c++/6892
        * pt.c (tsubst_expr): Handle FILE_STMT.


diff -cprN gcc-main-save/gcc/cp/pt.c gcc-main-new/gcc/cp/pt.c
*** gcc-main-save/gcc/cp/pt.c   Sat May 25 18:59:50 2002
--- gcc-main-new/gcc/cp/pt.c    Sun Jun  2 00:47:55 2002
*************** tsubst_expr (t, args, complain, in_decl)
*** 7533,7538 ****
--- 7533,7543 ----
        finish_label_stmt (DECL_NAME (LABEL_STMT_LABEL (t)));
        break;
  
+     case FILE_STMT:
+       input_filename = FILE_STMT_FILENAME (t);
+       add_stmt (build_nt (FILE_STMT, FILE_STMT_FILENAME_NODE (t)));
+       break;
+ 
      case GOTO_STMT:
        prep_stmt (t);
        tmp = GOTO_DESTINATION (t);


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