Skip to content

Commit 09251eb

Browse files
committed
Do not rely on Clang's results to verify our GCC version handling
We use __float128 to distinguish GCC versions, which is not a distinguishing factor for Clang. (It's supported on several Clang versions on x86, but not on Apple's M1/ARM.) This commit effectively disables the gcc_version1 test on macOS (where "gcc" really is Clang). Fixes: #5828
1 parent c408367 commit 09251eb

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

regression/ansi-c/gcc_version1/gcc-4.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// None of these types should be defined when emulating gcc-4:
1+
// None of these types should be defined when emulating gcc-4, which clang on
2+
// macOS also emulates:
23

34
typedef float _Float32;
45
typedef double _Float32x;

regression/ansi-c/gcc_version1/gcc-5.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// These types should *not* be provided when emulating gcc-5:
2+
3+
#ifndef __clang__
24
typedef float _Float32;
35
typedef double _Float32x;
46
typedef double _Float64;
@@ -8,3 +10,4 @@ typedef long double _Float128x;
810

911
// But this type should:
1012
__float128 f128;
13+
#endif

regression/ansi-c/gcc_version1/gcc-7.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// All these types should be provided when emulating gcc-7:
2+
3+
#ifndef __clang__
24
_Float32 f32;
35
_Float32x f32x;
46
_Float64 f64;
@@ -7,3 +9,4 @@ _Float128 f128;
79
_Float128x f128x;
810

911
__float128 gcc_f128;
12+
#endif

0 commit comments

Comments
 (0)