Discussion:
[Bug compile/23586] New: Compile C++: printing functions broken
keiths at redhat dot com
2018-08-29 14:20:13 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23586

Bug ID: 23586
Summary: Compile C++: printing functions broken
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: compile
Assignee: unassigned at sourceware dot org
Reporter: keiths at redhat dot com
Target Milestone: ---

compile-cplus-print.exp tries to do:

(gdb) compile print main
warning: function has unknown return type; assuming int
gdb command line: In function 'void _gdb_expr(__gdb_regs*, void*)':
gdb command line:5:30: warning: invalid application of 'sizeof' to a function
ty
pe [-Wpointer-arith]
warning: function has unknown return type; assuming int
gdb command line: In function 'void _gdb_expr(__gdb_regs*, void*)':
gdb command line:5:30: warning: invalid application of 'sizeof' to a function
ty
pe [-Wpointer-arith]
gdb command line:5:31: error: invalid conversion from 'int (*)()' to 'const
void
*' [-fpermissive]
In file included from
/home/keiths/work/gcc/branches/gcc-7/built/include/c++/7.2
.1/cstring:42:0,
from /tmp/gdbobj-C3uaZo/out5.c:11:
/usr/include/string.h:43:14: note: initializing argument 2 of 'void*
memcpy(vo
id*, const void*, size_t)'
extern void *memcpy (void *__restrict __dest, const void *__restrict __src,
^~~~~~
Compilation failed.

Tweaking of the code generator (cplus_add_input::add_input) is necessary.
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...