Merge integration refs/builds/qtci/dev/1616767130
This commit is contained in:
commit
2801c19887
@ -7013,6 +7013,12 @@ void tst_QObject::mutableFunctor()
|
|||||||
|
|
||||||
void tst_QObject::checkArgumentsForNarrowing()
|
void tst_QObject::checkArgumentsForNarrowing()
|
||||||
{
|
{
|
||||||
|
// Clang and ICC masquerade as GCC, so introduce a more strict define
|
||||||
|
// for exactly GCC (to exclude/include it from some tests).
|
||||||
|
#if defined(Q_CC_GNU) && !defined(Q_CC_CLANG) && !defined(Q_CC_INTEL)
|
||||||
|
#define Q_CC_EXACTLY_GCC Q_CC_GNU
|
||||||
|
#endif
|
||||||
|
|
||||||
enum UnscopedEnum { UnscopedEnumV1 = INT_MAX, UnscopedEnumV2 };
|
enum UnscopedEnum { UnscopedEnumV1 = INT_MAX, UnscopedEnumV2 };
|
||||||
enum SignedUnscopedEnum { SignedUnscopedEnumV1 = INT_MIN, SignedUnscopedEnumV2 = INT_MAX };
|
enum SignedUnscopedEnum { SignedUnscopedEnumV1 = INT_MIN, SignedUnscopedEnumV2 = INT_MAX };
|
||||||
|
|
||||||
@ -7030,7 +7036,7 @@ void tst_QObject::checkArgumentsForNarrowing()
|
|||||||
|
|
||||||
// GCC < 9 does not consider floating point to bool to be narrowing,
|
// GCC < 9 does not consider floating point to bool to be narrowing,
|
||||||
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65043
|
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65043
|
||||||
#if !defined(Q_CC_GNU) || Q_CC_GNU >= 900
|
#if !defined(Q_CC_EXACTLY_GCC) || Q_CC_EXACTLY_GCC >= 900
|
||||||
NARROWS(float, bool);
|
NARROWS(float, bool);
|
||||||
NARROWS(double, bool);
|
NARROWS(double, bool);
|
||||||
NARROWS(long double, bool);
|
NARROWS(long double, bool);
|
||||||
@ -7063,10 +7069,10 @@ void tst_QObject::checkArgumentsForNarrowing()
|
|||||||
FITS(float, double);
|
FITS(float, double);
|
||||||
FITS(float, long double);
|
FITS(float, long double);
|
||||||
|
|
||||||
// GCC thinks this is narrowing only on architectures where
|
// GCC < 11 thinks this is narrowing only on architectures where
|
||||||
// sizeof(long double) > sizeof(double)
|
// sizeof(long double) > sizeof(double)
|
||||||
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92856
|
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94590
|
||||||
#if defined(Q_CC_GNU)
|
#if defined(Q_CC_EXACTLY_GCC) && (Q_CC_EXACTLY_GCC < 1100)
|
||||||
NARROWS_IF(long double, double, sizeof(long double) > sizeof(double));
|
NARROWS_IF(long double, double, sizeof(long double) > sizeof(double));
|
||||||
#else
|
#else
|
||||||
NARROWS(long double, double);
|
NARROWS(long double, double);
|
||||||
@ -7340,6 +7346,10 @@ void tst_QObject::checkArgumentsForNarrowing()
|
|||||||
#undef FITS_IF
|
#undef FITS_IF
|
||||||
#undef NARROWS
|
#undef NARROWS
|
||||||
#undef FITS
|
#undef FITS
|
||||||
|
|
||||||
|
#ifdef Q_CC_EXACTLY_GCC
|
||||||
|
#undef Q_CC_EXACTLY_GCC
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QObject::nullReceiver()
|
void tst_QObject::nullReceiver()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user