Re: Questions about C as used/implemented in practice

2015-04-17 Thread msebor
On 04/17/2015 09:01 AM, Peter Sewell wrote: On 17 April 2015 at 15:19, wrote: On Apr 17, 2015, at 9:14 AM, Peter Sewell wrote: Dear gcc list, we are trying to clarify what behaviour of C implementations is actually relied upon in modern practice, and what behaviour is guaranteed by curren

Re: Is it Okay for GCC to do the following simplifications with "-ffast-math" flag

2015-05-05 Thread msebor
On 05/05/2015 08:27 AM, Renlin Li wrote: Hi all, For the following illustrative code, double f1(int x) { return (double)(float)x; } --> return (double)x; int f2(double x) { return (int)(float)x; } --> return (int)x; Is it Okay for the compiler to do the simplifications shown above with fast-ma

Re: Spurious warning for zero-sized array parameters to a function

2022-12-09 Thread msebor--- via Gcc
> On Dec 6, 2022, at 9:22 AM, Alejandro Colomar via Gcc wrote: > > Hi! > > In the following function, past_end is a pointer to one-past-the-end of the > array. Holding such a pointer is legal in C. I use it as a sentinel value > that helps (1) avoid overrunning the buffer, and (2) detect tr