Am So., 17. Dez. 2023 um 09:50 Uhr schrieb Paul Eggert :
> On 2023-12-16 04:42, Marc Nieper-Wißkirchen wrote:
> > the problem is if further down in the compiler pipeline, the
> > P <= P expression produces some intermediate code that becomes equal to
> > code the optimizer should rightfully optimi
On 2023-12-16 04:42, Marc Nieper-Wißkirchen wrote:
the problem is if further down in the compiler pipeline, the
P <= P expression produces some intermediate code that becomes equal to
code the optimizer should rightfully optimize away
I'm skeptical that such optimizations would be worth the tro
Am Fr., 15. Dez. 2023 um 02:00 Uhr schrieb Paul Eggert :
> On 12/3/23 05:15, Andreas F. Borchert wrote:
> > You will have
> > then to possibly live with annoying warnings and odd behaviours.
>
> The C standard says that when P is a null pointer, P==P must be true
> whereas P<=P has undefined behav
On 12/3/23 05:15, Andreas F. Borchert wrote:
You will have
then to possibly live with annoying warnings and odd behaviours.
The C standard says that when P is a null pointer, P==P must be true
whereas P<=P has undefined behavior. However, in practice any
implementation where P==P succeeds but
On Sun, Dec 03, 2023 at 11:03:30AM +0100, Bruno Haible wrote:
> There is no guarantee, but the malloc() result has an alignment of at least 4
> on all of today's platforms. [1]
It may be legitimate to have such assumptions. But it is likewise
legitimate that compilers and the associated libraries
Andreas F. Borchert wrote:
> > foo *p = (foo *) m; /* CAST */
> ...
> This line is not guaranteed to be ok due to § 6.3.2.3, (7):
>
>A pointer to an object type may be converted to a pointer to a different
>object type. If the resulting pointer is not correctly aligned for the
>r
> foo.c
>
> #include
> #include
> #ifdef __GNUC__
> # define unreachable() __builtin_unreachable ()
> #endif
> typedef struct { int a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t; } foo;
> int main ()
> {
> char *m = malloc (1)
Andreas F. Borchert wrote:
> > I still don't know whether it's OK to have pointers to arrays with
> > 0 elements (which are not "array objects", since "objects" are non-
> > empty (§ 6.2.6.1.(2))).
>
> From § 6.7.6.2 about array declarators:
>
>If the expression is a constant expression, it s