Pass -Wno-deprecated-register for gdb.cp that use "register"
authorGary Benson <gbenson@redhat.com>
Thu, 28 May 2020 15:29:48 +0000 (16:29 +0100)
committerGary Benson <gbenson@redhat.com>
Thu, 28 May 2020 15:29:48 +0000 (16:29 +0100)
commit09fe663ed827474bfb73b78d0506cecdcd8ece9d
tree4073d0898412b2e9ee5b488ed910e43c337ce643
parentf030440daa989ae3dadc1fa4342cfa16d690db3c
Pass -Wno-deprecated-register for gdb.cp that use "register"

Clang fails to compile three testcases with the following error:
  warning: 'register' storage class specifier is deprecated and
    incompatible with C++17 [-Wdeprecated-register]

This prevents the following testcases from executing:
  gdb.cp/classes.exp
  gdb.cp/inherit.exp
  gdb.cp/misc.exp

This commit builds those testcases with -Wno-deprecated-register, to
avoid the failure.  Note that this commit reveals five "wrong access
specifier for typedef" failures in gdb.cp/classes.exp when compiling
the testsuite with clang.

gdb/testsuite/ChangeLog:

* gdb.cp/classes.exp (prepare_for_testing): Add
additional_flags=-Wno-deprecated-register.
* gdb.cp/inherit.exp (prepare_for_testing): Likewise.
* gdb.cp/misc.exp: Likewise.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.cp/classes.exp
gdb/testsuite/gdb.cp/inherit.exp
gdb/testsuite/gdb.cp/misc.exp