GNU bug report logs -
#65491
[PATCH] Improve performance allocating vectors
Previous Next
Full log
View this message in rfc822 format
16 sep. 2023 kl. 18.32 skrev Mattias EngdegÄrd <mattias.engdegard <at> gmail.com>:
> #define XUNTAG(a, type, ctype) \
> ((ctype *) ((uintptr_t) XLP (a) - (uintptr_t)LISP_WORD_TAG (type)))
I pushed this to master after some experiments.
Interestingly, Clang didn't warn about the new code at all. On the other hand, it did probably warn about the old code (with your configuration), because
char *g(char *p) {return p+(1ULL<<62);}
results in
<source>:8:26: warning: the pointer incremented by 4611686018427387904 refers past the last possible element for an array in 32-bit address space containing 8-bit (1-byte) elements (max possible 4294967296 elements) [-Warray-bounds]
char *g(char *p) {return p+(1ULL<<62);}
^ ~~~~~~~~
<source>:8:9: note: array 'p' declared here
char *g(char *p) {return p+(1ULL<<62);}
^
but GCC thinks it's fine.
This bug report was last modified 1 year and 263 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.