jakubjelinek wrote:
I'm not suggesting to encode the number of limbs anywhere, I'm suggesting
encoding the bit precision of a limb somewhere. And the limb ordering.
On little endian of bits in a limb and little endian ordering of limbs in the
limb array, at least if the limbs are sane (have pr
@@ -125,6 +137,25 @@ class TypeDescriptor {
return 1 << (TypeInfo >> 1);
}
+ const char *getBitIntBitCountPointer() const {
+DCHECK(isBitIntTy());
+DCHECK(isSignedBitIntTy());
+// Scan Name for zero and return the next address
+const char *p = getTypeNam
@@ -103,6 +103,13 @@ class TypeDescriptor {
/// representation is that of bitcasting the floating-point value to an
/// integer type.
TK_Float = 0x0001,
+/// An _BitInt(N) type. Lowest bit is 1 for a signed value, 0 for an
+/// unsigned value. Remaining bits
@@ -125,6 +137,25 @@ class TypeDescriptor {
return 1 << (TypeInfo >> 1);
}
+ const char *getBitIntBitCountPointer() const {
+DCHECK(isBitIntTy());
+DCHECK(isSignedBitIntTy());
+// Scan Name for zero and return the next address
+const char *p = getTypeNam
jakubjelinek wrote:
@ThePhD @AaronBallman @cor3ntin
Joseph Myers raised an interesting question whether the tokens in
embed-parameter-sequence are macro expanded or not.
Consider
```c
#define FILE "/etc/passwd"
#define LIMIT limit(1)
#define THIS , 1, 2, 3
#define PRE prefix (42,
ONE
#embed FILE
jakubjelinek wrote:
@ThePhd @AaronBallman
And even more importantly (checking on godbolt again):
```c
int a = sizeof (
#embed __FILE__ limit (1)
);
```
is 1 in clang as well as clang++ trunk and 4 with clang/clang++ trunk with
-save-temps.
I thought there was agreement that at least for C th
jakubjelinek wrote:
I meant also e.g. basic tests like gcc/testsuite/c-c++-common/cpp/embed-20.c in
https://gcc.gnu.org/pipermail/gcc-patches/2024-July/657053.html
(and various others too). Just checked that one and it still fails on latest
clang trunk using godbolt.
https://github.com/llvm/ll
jakubjelinek wrote:
Maybe, but I've add quite a few new testcases too...
https://github.com/llvm/llvm-project/pull/97274
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jakubjelinek wrote:
I'd like to point out that most of the testcases I wrote for the GCC
implementation still fail with the latest clang on godbolt.
https://github.com/llvm/llvm-project/pull/97274
___
cfe-commits mailing list
cfe-commits@lists.llvm.or
@@ -0,0 +1,98 @@
+// RUN: %clang_cc1 %s -fsyntax-only --embed-dir=%S/Inputs -verify=expected,cxx
-Wno-c23-extensions
+// RUN: %clang_cc1 -x c -std=c23 %s -fsyntax-only --embed-dir=%S/Inputs
-verify=expected,c
+#embed
+;
+
+void f (unsigned char x) { (void)x;}
+void g () {}
+voi
10 matches
Mail list logo