gdb.base/{exprs,ptype,ptype1,setvar,whatis}.c C++ify

This adjusts:

 gdb.base/{exprs,ptype,ptype1,setvar,whatis}.c,

to make them buildable as C++ programs.

gdb/testsuite/ChangeLog:

	* gdb.base/exprs.c: Replace 'this' with 'self' throughout.
	* gdb.base/ptype.c: : Replace 'this' with 'self' throughout.
	(charfoo, intfoo): Define full prototype.
	* gdb.base/ptype1.c (charfoo): Define full prototype.
	* gdb.base/setvar.c: Replace 'this' with 'self' throughout.
	* gdb.base/whatis.c: Replace 'this' with 'self' throughout.
This commit is contained in:
Pedro Alves 2020-09-17 23:33:41 +01:00
parent c3e5138dcc
commit 0a229804ab
6 changed files with 20 additions and 11 deletions

View File

@ -1,3 +1,12 @@
2020-09-17 Pedro Alves <pedro@palves.net>
* gdb.base/exprs.c: Replace 'this' with 'self' throughout.
* gdb.base/ptype.c: : Replace 'this' with 'self' throughout.
(charfoo, intfoo): Define full prototype.
* gdb.base/ptype1.c (charfoo): Define full prototype.
* gdb.base/setvar.c: Replace 'this' with 'self' throughout.
* gdb.base/whatis.c: Replace 'this' with 'self' throughout.
2020-09-17 Pedro Alves <pedro@palves.net>
* gdb.base/charset.c [__cplusplus] (wchar_t, char16_t, char32_t):

View File

@ -156,7 +156,7 @@ double v_double_func () { return (0.0); }
struct link {
struct link *next;
#ifdef __STDC__
struct link *(*linkfunc) (struct link *this, int flags);
struct link *(*linkfunc) (struct link *self, int flags);
#else
struct link *(*linkfunc) ();
#endif
@ -166,7 +166,7 @@ struct link {
union tu_link {
struct link *next;
#ifdef __STDC__
struct link *(*linkfunc) (struct link *this, int flags);
struct link *(*linkfunc) (struct link *self, int flags);
#else
struct link *(*linkfunc) ();
#endif

View File

@ -168,7 +168,7 @@ double v_double_func () { return (0.0); }
struct link {
struct link *next;
#ifdef __STDC__
struct link *(*linkfunc) (struct link *this, int flags);
struct link *(*linkfunc) (struct link *self, int flags);
#else
struct link *(*linkfunc) ();
#endif
@ -178,7 +178,7 @@ struct link {
union tu_link {
struct link *next;
#ifdef __STDC__
struct link *(*linkfunc) (struct link *this, int flags);
struct link *(*linkfunc) (struct link *self, int flags);
#else
struct link *(*linkfunc) ();
#endif
@ -269,11 +269,11 @@ func_type v_func_type;
/***********/
extern char charfoo ();
extern char charfoo (int);
typedef int foo;
foo intfoo (afoo)
foo intfoo (int afoo)
{
charfoo (afoo);
return (afoo * 2);

View File

@ -1,6 +1,6 @@
typedef char foo;
foo charfoo (afoo)
foo charfoo (int afoo)
{
return (afoo * 2);
}

View File

@ -161,7 +161,7 @@ double v_double_func () { return (0.0); }
struct link {
struct link *next;
#ifdef __STDC__
struct link *(*linkfunc) (struct link *this, int flags);
struct link *(*linkfunc) (struct link *self, int flags);
#else
struct link *(*linkfunc) ();
#endif
@ -171,7 +171,7 @@ struct link {
union tu_link {
struct link *next;
#ifdef __STDC__
struct link *(*linkfunc) (struct link *this, int flags);
struct link *(*linkfunc) (struct link *self, int flags);
#else
struct link *(*linkfunc) ();
#endif

View File

@ -207,7 +207,7 @@ double v_double_func () { return (0.0); }
struct link {
struct link *next;
#ifdef __STDC__
struct link *(*linkfunc) (struct link *this, int flags);
struct link *(*linkfunc) (struct link *self, int flags);
#else
struct link *(*linkfunc) ();
#endif
@ -217,7 +217,7 @@ struct link {
union tu_link {
struct link *next;
#ifdef __STDC__
struct link *(*linkfunc) (struct link *this, int flags);
struct link *(*linkfunc) (struct link *self, int flags);
#else
struct link *(*linkfunc) ();
#endif