Skip to content

Commit 8ed51cc

Browse files
Undo code fixes
1 parent 53bacd0 commit 8ed51cc

File tree

5 files changed

+0
-36
lines changed

5 files changed

+0
-36
lines changed

libc/test/UnitTest/LibcTest.h

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -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

libc/test/integration/src/pthread/pthread_exit_test.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@ class A {
2929
}
3030
};
3131

32-
#pragma GCC diagnostic push
33-
#pragma GCC diagnostic ignored "-Wglobal-constructors"
3432
thread_local A thread_local_a(123);
35-
#pragma GCC diagnostic pop
3633

3734
void *func(void *) {
3835
// Touch the thread local variable so that it gets initialized and a callback

libc/test/integration/src/threads/thrd_exit_test.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@ class A {
2929
}
3030
};
3131

32-
#pragma GCC diagnostic push
33-
#pragma GCC diagnostic ignored "-Wglobal-constructors"
3432
thread_local A thread_local_a(123);
35-
#pragma GCC diagnostic pop
3633

3734
int func(void *) {
3835
thread_local_a.set(321);

libc/test/integration/startup/gpu/init_fini_array_test.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@ int GLOBAL_INDEX = 512;
3232
int INITVAL_INITIALIZER = 0x600D;
3333
int BEFORE_INITIALIZER = 0xFEED;
3434

35-
#pragma GCC diagnostic push
36-
#pragma GCC diagnostic ignored "-Wglobal-constructors"
3735
A global(GLOBAL_INDEX, INITVAL_INITIALIZER);
38-
#pragma GCC diagnostic pop
3936

4037
int initval = 0;
4138
int before = 0;

libc/test/integration/startup/linux/init_fini_array_test.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@ class A {
3131
int GLOBAL_INDEX = 512;
3232
int INITVAL_INITIALIZER = 0x600D;
3333

34-
#pragma GCC diagnostic push
35-
#pragma GCC diagnostic ignored "-Wglobal-constructors"
3634
A global(GLOBAL_INDEX, INITVAL_INITIALIZER);
37-
#pragma GCC diagnostic pop
3835

3936
int initval = 0;
4037
int preinitval = 0;

0 commit comments

Comments
 (0)