diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-03-03 02:08:28 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-03-03 02:08:28 +0000 |
commit | fb94b0ca7ae80abb8bbe508ed7d6f88921893a70 (patch) | |
tree | 7d49cdcbb57df867e17ec4561d2c016e94fd556c /gcc/go/gofrontend/expressions.h | |
parent | 67869e7419a1efc52146c60e73c11fd865202d6c (diff) | |
download | gcc-fb94b0ca7ae80abb8bbe508ed7d6f88921893a70.tar.gz |
Determine call types even if first call result is not used.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170637 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/go/gofrontend/expressions.h')
-rw-r--r-- | gcc/go/gofrontend/expressions.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/go/gofrontend/expressions.h b/gcc/go/gofrontend/expressions.h index c050a4a9c0c..b6fc9c012d9 100644 --- a/gcc/go/gofrontend/expressions.h +++ b/gcc/go/gofrontend/expressions.h @@ -1161,7 +1161,7 @@ class Call_expression : public Expression source_location location) : Expression(EXPRESSION_CALL, location), fn_(fn), args_(args), type_(NULL), tree_(NULL), is_varargs_(is_varargs), - is_value_discarded_(false), varargs_are_lowered_(false), + varargs_are_lowered_(false), types_are_determined_(false), is_deferred_(false) { } @@ -1220,7 +1220,7 @@ class Call_expression : public Expression void do_discarding_value() - { this->is_value_discarded_ = true; } + { } virtual Type* do_type(); @@ -1263,6 +1263,11 @@ class Call_expression : public Expression lower_varargs(Gogo*, Named_object* function, Type* varargs_type, size_t param_count); + // Let a builtin expression check whether types have been + // determined. + bool + determining_types(); + private: bool check_argument_type(int, const Type*, const Type*, source_location, bool); @@ -1286,10 +1291,10 @@ class Call_expression : public Expression tree tree_; // True if the last argument is a varargs argument (f(a...)). bool is_varargs_; - // True if the value is being discarded. - bool is_value_discarded_; // True if varargs have already been lowered. bool varargs_are_lowered_; + // True if types have been determined. + bool types_are_determined_; // True if the call is an argument to a defer statement. bool is_deferred_; }; |