daily update
[deliverable/binutils-gdb.git] / gdb / c-exp.y
index 1f3e68381035054f88c4c75ef4d5a124d6029556..706b4074d88cb77179966b8dc3342c3d53c5ee01 100644 (file)
@@ -1,6 +1,6 @@
 /* YACC parser for C expressions, for GDB.
    Copyright 1986, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
-   1998, 1999, 2000, 2003
+   1998, 1999, 2000, 2003, 2004
    Free Software Foundation, Inc.
 
 This file is part of GDB.
@@ -53,9 +53,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "block.h"
 #include "cp-support.h"
 
-/* Flag indicating we're dealing with HP-compiled objects */ 
-extern int hp_som_som_object_present;
-
 /* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
    as well as gratuitiously global symbol names, so we can have multiple
    yacc generated parsers in gdb.  Note that these are only the variables
@@ -939,11 +936,6 @@ typebase  /* Implements (approximately): (type-qualifier)* type-specifier */
    decode_line_1), but I'm not holding my breath waiting for somebody
    to get around to cleaning this up...  */
 
-/* FIXME: carlton/2003-09-25: Currently, the only qualified type
-   symbols that we generate are nested namespaces.  Next on my TODO
-   list is to generate all nested type names properly (or at least as
-   well as possible, assuming that we're using DWARF-2).  */
-
 qualified_type: typebase COLONCOLON name
                {
                  struct type *type = $1;
@@ -953,14 +945,16 @@ qualified_type: typebase COLONCOLON name
                  memcpy (ncopy, $3.ptr, $3.length);
                  ncopy[$3.length] = '\0';
 
-                 if (TYPE_CODE (type) != TYPE_CODE_NAMESPACE)
-                   error ("`%s' is not defined as a namespace.",
+                 if (TYPE_CODE (type) != TYPE_CODE_STRUCT
+                     && TYPE_CODE (type) != TYPE_CODE_UNION
+                     && TYPE_CODE (type) != TYPE_CODE_NAMESPACE)
+                   error ("`%s' is not defined as an aggregate type.",
                           TYPE_NAME (type));
 
                  new_type = cp_lookup_nested_type (type, ncopy,
                                                    expression_context_block);
                  if (new_type == NULL)
-                   error ("No type \"%s\" in namespace \"%s\".",
+                   error ("No type \"%s\" within class or namespace \"%s\".",
                           ncopy, TYPE_NAME (type));
                  
                  $$ = new_type;
This page took 0.024412 seconds and 4 git commands to generate.