This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/20422] Mismatch in pointer indirection level should give specialized warning
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Mar 2005 20:01:22 -0000
- Subject: [Bug c/20422] Mismatch in pointer indirection level should give specialized warning
- References: <20050311100700.20422.pbijdens@storagelabs.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From joseph at codesourcery dot com 2005-03-11 20:01 -------
Subject: Re: Mismatch in pointer indirection level should give
specialized warning
On Fri, 11 Mar 2005, pinskia at gcc dot gnu dot org wrote:
> Really in my mind, we should be rejecting this invalid code instead of just warning.
I should point out that some cases of this are common in real code:
various functions declared in system headers take different pointer
argument types on different systems and software may not always get the
configuration right on all systems. It could arguably be specialised into
different cases: if the only differences are qualifiers, signedness and
differences between integer types (e.g. int versus long) of the same width
or between character types and void then it is likely less dangerous in
practice than if there are bigger differences, so one could give a pedwarn
and the other an error. But equally such distinctions between when this
is a warning and when it is an error might just serve to confuse users.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20422