Re: -Wint-conversion, -Wincompatible-pointer-types, -Wpointer-sign: Are they hiding constraint C violations?

2022-11-11 Thread David Brown via Gcc
On 10/11/2022 20:16, Florian Weimer via Gcc wrote: * Marek Polacek: On Thu, Nov 10, 2022 at 07:25:21PM +0100, Florian Weimer via Gcc wrote: GCC accepts various conversions between pointers and ints and different types of pointers by default, issuing a warning. I've been reading the

Re: -Wint-conversion, -Wincompatible-pointer-types, -Wpointer-sign: Are they hiding constraint C violations?

2022-11-10 Thread Joseph Myers
On Thu, 10 Nov 2022, Florian Weimer via Gcc wrote: > I assumed that there was a rule similar to the the rule for #error for > any kind of diagnostic, which would mean that GCC errors are diagnostic > messages in the sense of the standard, but GCC warnings are not. The rule (for C) is that any

Re: -Wint-conversion, -Wincompatible-pointer-types, -Wpointer-sign: Are they hiding constraint C violations?

2022-11-10 Thread Jonathan Wakely via Gcc
On Thu, 10 Nov 2022 at 19:17, Florian Weimer via Gcc wrote: > > * Marek Polacek: > > > On Thu, Nov 10, 2022 at 07:25:21PM +0100, Florian Weimer via Gcc wrote: > >> GCC accepts various conversions between pointers and ints and different > >> types of pointers by default, issuing a warning. > >> >

Re: -Wint-conversion, -Wincompatible-pointer-types, -Wpointer-sign: Are they hiding constraint C violations?

2022-11-10 Thread Florian Weimer via Gcc
* Marek Polacek: > On Thu, Nov 10, 2022 at 07:25:21PM +0100, Florian Weimer via Gcc wrote: >> GCC accepts various conversions between pointers and ints and different >> types of pointers by default, issuing a warning. >> >> I've been reading the (hopefully) relevant partso f the C99 standard, >>

Re: -Wint-conversion, -Wincompatible-pointer-types, -Wpointer-sign: Are they hiding constraint C violations?

2022-11-10 Thread Marek Polacek via Gcc
On Thu, Nov 10, 2022 at 07:25:21PM +0100, Florian Weimer via Gcc wrote: > GCC accepts various conversions between pointers and ints and different > types of pointers by default, issuing a warning. > > I've been reading the (hopefully) relevant partso f the C99 standard, > and it seems to me that

-Wint-conversion, -Wincompatible-pointer-types, -Wpointer-sign: Are they hiding constraint C violations?

2022-11-10 Thread Florian Weimer via Gcc
GCC accepts various conversions between pointers and ints and different types of pointers by default, issuing a warning. I've been reading the (hopefully) relevant partso f the C99 standard, and it seems to me that C implementations are actually required to diagnose errors in these cases because