diff options
| author | loewis <loewis@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-08-11 18:28:36 +0000 |
|---|---|---|
| committer | loewis <loewis@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-08-11 18:28:36 +0000 |
| commit | 32b743ed4e4aa7c246d3cfebefec53e46c67aa6d (patch) | |
| tree | 2decbd61035e15e7314e0ada40cd46a354db3ac7 | |
| parent | 00eb9d0a81a76700c3a12040972f41141e663240 (diff) | |
| download | ppe42-gcc-32b743ed4e4aa7c246d3cfebefec53e46c67aa6d.tar.gz ppe42-gcc-32b743ed4e4aa7c246d3cfebefec53e46c67aa6d.zip | |
* lex.c (do_identifier): Remove unnecessary lookup of class field.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28671 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
| -rw-r--r-- | gcc/cp/lex.c | 28 |
2 files changed, 4 insertions, 28 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 6575c577804..bc2d0d4ba3f 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +1999-08-10 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de> + + * lex.c (do_identifier): Remove unnecessary lookup of class field. + 1999-08-09 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de> * decl2.c (set_decl_namespace): Do not complain about non-matching diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index 48a2d9889b3..81ec12eecfd 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -3091,34 +3091,6 @@ do_identifier (token, parsing, args) else id = lastiddecl; - /* Scope class declarations before global - declarations. */ - if ((!id || is_global (id)) - && current_class_type != 0 - && TYPE_SIZE (current_class_type) == 0) - { - /* Could be from one of the base classes. */ - tree field = lookup_field (current_class_type, token, 1, 0); - if (field == 0) - ; - else if (field == error_mark_node) - /* We have already generated the error message. - But we still want to return this value. */ - id = lookup_field (current_class_type, token, 0, 0); - else if (TREE_CODE (field) == VAR_DECL - || TREE_CODE (field) == CONST_DECL - || TREE_CODE (field) == TEMPLATE_DECL) - id = field; - else if (TREE_CODE (field) != FIELD_DECL) - my_friendly_abort (61); - else - { - cp_error ("invalid use of member `%D'", field); - id = error_mark_node; - return id; - } - } - /* Do Koenig lookup if appropriate (inside templates we build lookup expressions instead). */ if (args && !current_template_parms && (!id || is_global (id))) |

