public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* -Wint-conversion, -Wincompatible-pointer-types, -Wpointer-sign: Are they hiding constraint C violations?
@ 2022-11-10 18:25 Florian Weimer
  2022-11-10 18:43 ` Marek Polacek
  0 siblings, 1 reply; 6+ messages in thread
From: Florian Weimer @ 2022-11-10 18:25 UTC (permalink / raw)
  To: 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 they are constraint violations:
the types are not compatible.

Is this interpretation correct?

Sorry if this questions this is more appropriate for the gcc-help list.

Thanks,
Florian


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-11-11  9:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-10 18:25 -Wint-conversion, -Wincompatible-pointer-types, -Wpointer-sign: Are they hiding constraint C violations? Florian Weimer
2022-11-10 18:43 ` Marek Polacek
2022-11-10 19:16   ` Florian Weimer
2022-11-10 23:05     ` Jonathan Wakely
2022-11-10 23:33     ` Joseph Myers
2022-11-11  9:21     ` David Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).