@@ -334,18 +334,6 @@ CString libc_make_test_file_path_func(const char *file_name);
334334 return " [ParamType = " #TYPE " ]" ; \
335335 }
336336
337- #define LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA (x ) _Pragma (#x)
338-
339- #define LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA_BEGIN \
340- LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA (GCC diagnostic push)
341-
342- #define LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA_BODY \
343- LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA (GCC diagnostic ignored \
344- " -Wglobal-constructors" )
345-
346- #define LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA_END \
347- LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA (GCC diagnostic pop)
348-
349337#define TYPED_TEST (SuiteName, TestName, TypeList ) \
350338 static_assert ( \
351339 LIBC_NAMESPACE::testing::internal::valid_prefix (#SuiteName), \
@@ -363,11 +351,8 @@ CString libc_make_test_file_path_func(const char *file_name);
363351 void Run () override ; \
364352 const char *getName () const override { return name; } \
365353 }; \
366- LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA_BEGIN \
367- LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA_BODY \
368354 TypeList::Tests<SuiteName##_##TestName>::type \
369355 SuiteName##_##TestName##_Instance; \
370- LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA_END \
371356 template <typename T> void SuiteName##_##TestName<T>::Run()
372357
373358#define TYPED_TEST_F (SuiteClass, TestName, TypeList ) \
@@ -386,11 +371,8 @@ CString libc_make_test_file_path_func(const char *file_name);
386371 void Run () override ; \
387372 const char *getName () const override { return name; } \
388373 }; \
389- LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA_BEGIN \
390- LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA_BODY \
391374 TypeList::Tests<SuiteClass##_##TestName>::type \
392375 SuiteClass##_##TestName##_Instance; \
393- LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA_END \
394376 template <typename T> void SuiteClass##_##TestName<T>::Run()
395377
396378#define TEST (SuiteName, TestName ) \
@@ -402,10 +384,7 @@ CString libc_make_test_file_path_func(const char *file_name);
402384 void Run () override ; \
403385 const char *getName () const override { return #SuiteName " ." #TestName; } \
404386 }; \
405- LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA_BEGIN \
406- LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA_BODY \
407387 SuiteName##_##TestName SuiteName##_##TestName##_Instance; \
408- LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA_END \
409388 void SuiteName##_##TestName::Run()
410389
411390#define TEST_F (SuiteClass, TestName ) \
@@ -418,10 +397,7 @@ CString libc_make_test_file_path_func(const char *file_name);
418397 void Run () override ; \
419398 const char *getName () const override { return #SuiteClass " ." #TestName; } \
420399 }; \
421- LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA_BEGIN \
422- LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA_BODY \
423400 SuiteClass##_##TestName SuiteClass##_##TestName##_Instance; \
424- LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA_END \
425401 void SuiteClass##_##TestName::Run()
426402
427403// Helper to trick the compiler into ignoring lack of braces on the else
0 commit comments