I was wondering whether clang's new amazing custom size (things like 13-bit int, or 70-bit int, etc.) will get added to gcc.
Asked
Active
Viewed 268 times
2 Answers
0
No most likely, it won't. That is because clang
uses llvm
as its compiling backend, and gcc
doesn't. The llvm
backend is what allows clang
to pull off that feat. LLVM allows from 1
to 16,777,215
bit ints.

xilpex
- 3,097
- 2
- 14
- 45
-
2Even with a 16,777,215 bit int folk will still complain it's not large enough! – Bathsheba Apr 24 '20 at 15:59
-
2
-
Depends it's being considered by the ISO WG14 C Language Committee see: http://blog.llvm.org/2020/04/the-new-clang-extint-feature-provides.html So if GCC intends to follow the standard ... – Richard Critten Apr 24 '20 at 16:04
-
2
-
2@Ayxan: I'm wondering what `int a[2];` as automatic storage would do to your stack? – Bathsheba Apr 24 '20 at 16:16
-
@Bathsheba Stack size can be changed on a per-compilation-unit basis. Just make it large enough – Jesper Juhl Apr 24 '20 at 16:48
-
@Bathsheba Doesn't seem to work at all https://godbolt.org/z/orAgnH – Aykhan Hagverdili May 23 '20 at 16:20
-
@Bathsheba in fact, I could not use the 16,777,215 bit integer in any meaningful way. Even if it's on the heap. It simply segfaults. – Aykhan Hagverdili May 23 '20 at 16:40
-
@Ayxan -- I don't know why that is, but when I built clang 11 from source, it worked just fine. – xilpex May 23 '20 at 18:08
-
@xilpex I m noticing the gcc s golang frontend supports golang big integers. – user2284570 Dec 16 '20 at 10:02