* go-exp.y (classify_name): Add missing assignment of fields of
authorDoug Evans <dje@google.com>
Wed, 9 May 2012 05:10:26 +0000 (05:10 +0000)
committerDoug Evans <dje@google.com>
Wed, 9 May 2012 05:10:26 +0000 (05:10 +0000)
yylval.ssym.

gdb/ChangeLog
gdb/go-exp.y

index 17039cb57283b805afe9edb40f523b715161d970..6af878090fb534c8e1fd95089f9fc77ddf326d58 100644 (file)
@@ -1,3 +1,8 @@
+2012-05-08  Doug Evans  <dje@google.com>
+
+       * go-exp.y (classify_name): Add missing assignment of fields of
+       yylval.ssym.
+
 2012-05-08  Eli Zaretskii  <eliz@gnu.org>
 
        Display the ">" prompt in interactive mode while reading canned
index f720629b1ed41d51d5b6c8f2cb616fa0d8ce96ad..e73b561d0ea3ccb32cc84a71fdb209d4956489e5 100644 (file)
@@ -1482,7 +1482,7 @@ classify_name (struct block *block)
                             &is_a_field_of_this);
        if (sym)
          {
-           yylval.sval = sval;
+           yylval.ssym.stoken = sval;
            yylval.ssym.sym = sym;
            yylval.ssym.is_a_field_of_this = is_a_field_of_this;
            return NAME;
@@ -1499,9 +1499,15 @@ classify_name (struct block *block)
       YYSTYPE newlval; /* Its value is ignored.  */
       int hextype = parse_number (copy, yylval.sval.length, 0, &newlval);
       if (hextype == INT)
-       return NAME_OR_INT;
+       {
+         yylval.ssym.sym = NULL;
+         yylval.ssym.is_a_field_of_this = 0;
+         return NAME_OR_INT;
+       }
     }
 
+  yylval.ssym.sym = NULL;
+  yylval.ssym.is_a_field_of_this = 0;
   return NAME;
 }