/* YACC parser for Java expressions, for GDB.
- Copyright (C) 1997, 1998, 1999, 2000, 2006
+ Copyright (C) 1997, 1998, 1999, 2000, 2006, 2007, 2008
Free Software Foundation, Inc.
This file is part of GDB.
char saved_char = p[len];
p[len] = 0; /* null-terminate the token */
- num = sscanf (p, DOUBLEST_SCAN_FORMAT "%c",
+ num = sscanf (p, "%" DOUBLEST_SCAN_FORMAT "%c",
&putithere->typed_val_float.dval, &c);
p[len] = saved_char; /* restore the input stream */
if (num != 1) /* check scanf found ONLY a float ... */
switch (namelen)
{
case 7:
- if (DEPRECATED_STREQN (tokstart, "boolean", 7))
+ if (strncmp (tokstart, "boolean", 7) == 0)
return BOOLEAN;
break;
case 6:
- if (DEPRECATED_STREQN (tokstart, "double", 6))
+ if (strncmp (tokstart, "double", 6) == 0)
return DOUBLE;
break;
case 5:
- if (DEPRECATED_STREQN (tokstart, "short", 5))
+ if (strncmp (tokstart, "short", 5) == 0)
return SHORT;
- if (DEPRECATED_STREQN (tokstart, "false", 5))
+ if (strncmp (tokstart, "false", 5) == 0)
{
yylval.lval = 0;
return BOOLEAN_LITERAL;
}
- if (DEPRECATED_STREQN (tokstart, "super", 5))
+ if (strncmp (tokstart, "super", 5) == 0)
return SUPER;
- if (DEPRECATED_STREQN (tokstart, "float", 5))
+ if (strncmp (tokstart, "float", 5) == 0)
return FLOAT;
break;
case 4:
- if (DEPRECATED_STREQN (tokstart, "long", 4))
+ if (strncmp (tokstart, "long", 4) == 0)
return LONG;
- if (DEPRECATED_STREQN (tokstart, "byte", 4))
+ if (strncmp (tokstart, "byte", 4) == 0)
return BYTE;
- if (DEPRECATED_STREQN (tokstart, "char", 4))
+ if (strncmp (tokstart, "char", 4) == 0)
return CHAR;
- if (DEPRECATED_STREQN (tokstart, "true", 4))
+ if (strncmp (tokstart, "true", 4) == 0)
{
yylval.lval = 1;
return BOOLEAN_LITERAL;
int is_a_field_of_this = 0;
struct symbol *sym;
sym = lookup_symbol (tmp, expression_context_block, VAR_DOMAIN,
- &is_a_field_of_this, (struct symtab **) NULL);
+ &is_a_field_of_this);
if (sym && SYMBOL_CLASS (sym) != LOC_TYPEDEF)
{
if (symbol_read_needs_frame (sym))
}
/* Assuming a reference expression has been pushed, emit the
- STRUCTOP_STRUCT ops to access the field named NAME. If NAME is a
+ STRUCTOP_PTR ops to access the field named NAME. If NAME is a
qualified name (has '.'), generate a field access for each part. */
static void
{
/* token.ptr is start of current field name. */
token.length = &name.ptr[i] - token.ptr;
- write_exp_elt_opcode (STRUCTOP_STRUCT);
+ write_exp_elt_opcode (STRUCTOP_PTR);
write_exp_string (token);
- write_exp_elt_opcode (STRUCTOP_STRUCT);
+ write_exp_elt_opcode (STRUCTOP_PTR);
token.ptr += token.length + 1;
}
if (i >= name.length)