Skip to content

Commit 25e18c0

Browse files
authored
Merge pull request diffblue#1529 from smowton/smowton/fix/float128
Add _Float128 spelling for 128-bit float type
2 parents 3cf67f7 + 2169a39 commit 25e18c0

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

regression/ansi-c/gcc_types_compatible_p1/main.c

+7
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ STATIC_ASSERT(__builtin_types_compatible_p(typeof (hot) *, int *));
6767
STATIC_ASSERT(__builtin_types_compatible_p(typeof (hot), typeof (janette)));
6868
STATIC_ASSERT(__builtin_types_compatible_p(__int128, signed __int128));
6969

70+
#ifndef __clang__
71+
// clang doesn't have these
72+
#if defined(__x86_64__) || defined(__i386__)
73+
STATIC_ASSERT(__builtin_types_compatible_p(__float128, _Float128));
74+
#endif
75+
#endif
76+
7077
/* Incompatible types */
7178

7279
STATIC_ASSERT(!__builtin_types_compatible_p(char, _Bool));

src/ansi-c/scanner.l

+2-1
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,8 @@ void ansi_c_scanner_init()
466466
return make_identifier();
467467
}
468468

469-
"__float128" { // clang doesn't have it
469+
"__float128" |
470+
"_Float128" { // clang doesn't have it
470471
if(PARSER.mode==configt::ansi_ct::flavourt::GCC)
471472
{ loc(); return TOK_GCC_FLOAT128; }
472473
else

0 commit comments

Comments
 (0)