2012-05-09 Pedro Alves <palves@redhat.com>
[deliverable/binutils-gdb.git] / gdb / objc-exp.y
index 881542fccaddedd3cb68d365da3d6fc9a6e5b556..6f51edff8162f1489a91cd03c3a03537f6f29ee4 100644 (file)
@@ -1,7 +1,7 @@
 /* YACC parser for C expressions, for GDB.
 
-   Copyright (C) 1986, 1989, 1990, 1991, 1993, 1994, 2002, 2006, 2007, 2008,
-   2009, 2010, 2011 Free Software Foundation, Inc.
+   Copyright (C) 1986, 1989-1991, 1993-1994, 2002, 2006-2012 Free
+   Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #define yygindex       objc_yygindex
 #define yytable                objc_yytable
 #define yycheck                objc_yycheck
+#define yyss           objc_yyss
+#define yysslim                objc_yysslim
+#define yyssp          objc_yyssp
+#define yystacksize    objc_yystacksize
+#define yyvs           objc_yyvs
+#define yyvsp          objc_yyvsp
 
 #ifndef YYDEBUG
 #define        YYDEBUG 0               /* Default to no yydebug support.  */
@@ -648,6 +654,13 @@ variable:  block COLONCOLON name
                          if (sym == 0)
                            error (_("No symbol \"%s\" in specified context."),
                                   copy_name ($3));
+                         if (symbol_read_needs_frame (sym))
+                           {
+                             if (innermost_block == 0
+                                 || contained_in (block_found,
+                                                  innermost_block))
+                               innermost_block = block_found;
+                           }
 
                          write_exp_elt_opcode (OP_VAR_VALUE);
                          /* block_found is set by lookup_symbol.  */
@@ -985,11 +998,7 @@ name_not_typename :        NAME
 /*** Needs some error checking for the float case.  ***/
 
 static int
-parse_number (p, len, parsed_float, putithere)
-     char *p;
-     int len;
-     int parsed_float;
-     YYSTYPE *putithere;
+parse_number (char *p, int len, int parsed_float, YYSTYPE *putithere)
 {
   /* FIXME: Shouldn't these be unsigned?  We don't deal with negative
      values here, and we do kind of silly things like cast to
@@ -1412,9 +1421,6 @@ yylex (void)
     case '^':
     case '~':
     case '!':
-#if 0
-    case '@':          /* Moved out below.  */
-#endif
     case '<':
     case '>':
     case '[':
@@ -1776,8 +1782,7 @@ yylex (void)
 }
 
 void
-yyerror (msg)
-     char *msg;
+yyerror (char *msg)
 {
   if (*lexptr == '\0')
     error(_("A %s near end of expression."),  (msg ? msg : "error"));
This page took 0.024552 seconds and 4 git commands to generate.