This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/20422] Mismatch in pointer indirection level should give specialized warning


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]