@@ -299,6 +299,19 @@
return this->type_ != NULL ? this->type_ : this->init_->type();
}
+// Return the tree for the temporary variable.
+
+tree
+Temporary_statement::get_decl() const
+{
+ if (this->decl_ == NULL)
+ {
+ gcc_assert(saw_errors());
+ return error_mark_node;
+ }
+ return this->decl_;
+}
+
// Traversal.
int
@@ -487,11 +487,7 @@
// Return the tree for the temporary variable itself. This should
// not be called until after the statement itself has been expanded.
tree
- get_decl() const
- {
- gcc_assert(this->decl_ != NULL);
- return this->decl_;
- }
+ get_decl() const;
protected:
int