Remove test for gcc -Wuseless-cast constructor inheritance bug

The bug is fixed in all supported versions of gcc, so there is no need
to test for it anymore.
This commit is contained in:
Kp 2022-11-11 02:03:51 +00:00
parent 1110b110c2
commit b2e1345ac9

View file

@ -2439,37 +2439,9 @@ $ x86_64-pc-linux-gnu-g++-5.4.0 -x c++ -S -Wformat -o /dev/null -
*/
#include <SDL_endian.h>
/*
* Recent gcc[1] create a useless cast when synthesizing constructor
* inheritance, then warn the user about the compiler-generated cast.
* Since the user did not write the cast in the source, the user
* cannot remove the cast to eliminate the warning.
*
* The only way to avoid the problem is to avoid using constructor
* inheritance in cases where the compiler would synthesize a useless
* cast.
*
* Reported-by: zicodxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/316>
* gcc Bugzilla: <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70844>
*
* [1] gcc-6.x, gcc-7.x (all currently released versions)
*/
class base
{
public:
base(int &) {}
};
class derived : public base
{
public:
using base::base;
};
''', main='''
derived d(argc);
return SDL_Swap32(argc);
''', msg='whether compiler argument -Wuseless-cast works with SDL and with constructor inheritance', successflags=flags):
''', msg='whether compiler argument -Wuseless-cast works with SDL', successflags=flags):
return
# <=clang-3.7 does not understand -Wuseless-cast
# This test does not influence the compile environment, but is