aboutsummaryrefslogtreecommitdiff
path: root/gdb/d-exp.y
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@ericsson.com>2015-11-17 13:07:24 +0000
committerPedro Alves <palves@redhat.com>2015-11-18 15:59:30 +0000
commit79f338988c53625a3ab3fba63f06c6ffd224e9ff (patch)
tree3735d0b1d929d5475c5801f428efa6ef006f1ee2 /gdb/d-exp.y
parente3a3797ee558f4f84c67a65e1d9abce845f15abd (diff)
downloadgdb-79f338988c53625a3ab3fba63f06c6ffd224e9ff.zip
gdb-79f338988c53625a3ab3fba63f06c6ffd224e9ff.tar.gz
gdb-79f338988c53625a3ab3fba63f06c6ffd224e9ff.tar.bz2
[C++] Add casts to obstack_base calls
The recent libiberty import of upstream obstack.h (314dee8ea9be) makes obstack_base return a 'void *', with the consequence that a few places in gdb need a (char *) cast. gdb/ChangeLog: 2015-11-18 Simon Marchi <simon.marchi@ericsson.com> Pedro Alves <palves@redhat.com> * break-catch-sig.c (signal_catchpoint_print_one): Add cast. * c-exp.y (parse_string_or_char, yylex): Add casts. * c-lang.c (evaluate_subexp_c): Add casts. * d-exp.y (parse_string_or_char, yylex): Add casts. * go-exp.y (parse_string_or_char, build_packaged_name): Add casts. * p-valprint.c (pascal_object_print_value_fields): Add casts. * valprint.c (generic_emit_char, generic_printstr): Add casts.
Diffstat (limited to 'gdb/d-exp.y')
-rw-r--r--gdb/d-exp.y6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/d-exp.y b/gdb/d-exp.y
index 0481b14..fb955ba 100644
--- a/gdb/d-exp.y
+++ b/gdb/d-exp.y
@@ -1005,7 +1005,7 @@ parse_string_or_char (const char *tokptr, const char **outptr,
else
value->type = C_STRING;
- value->ptr = obstack_base (&tempbuf);
+ value->ptr = (char *) obstack_base (&tempbuf);
value->length = obstack_object_size (&tempbuf);
*outptr = tokptr;
@@ -1558,7 +1558,7 @@ yylex (void)
obstack_grow (&name_obstack, next->value.sval.ptr,
next->value.sval.length);
- yylval.sval.ptr = obstack_base (&name_obstack);
+ yylval.sval.ptr = (char *) obstack_base (&name_obstack);
yylval.sval.length = obstack_object_size (&name_obstack);
current.token = classify_name (pstate, expression_context_block);
@@ -1638,7 +1638,7 @@ yylex (void)
obstack_grow (&name_obstack, next->value.sval.ptr,
next->value.sval.length);
- yylval.sval.ptr = obstack_base (&name_obstack);
+ yylval.sval.ptr = (char *) obstack_base (&name_obstack);
yylval.sval.length = obstack_object_size (&name_obstack);
current.value = yylval;
current.token = classification;