[Bug c/14188] Suggestion: improve warning message for call through incompatible type

falk dot hueffner at student dot uni-tuebingen dot de gcc-bugzilla@gcc.gnu.org
Wed Feb 18 11:11:00 GMT 2004


------- Additional Comments From falk dot hueffner at student dot uni-tuebingen dot de  2004-02-18 11:11 -------
Subject: Re:  New: Suggestion: improve warning message for call through incompatible type

"simonmar at microsoft dot com" <gcc-bugzilla@gcc.gnu.org> writes:

> When calling a function through an incompatible type, gcc emits this warning 
> message:
> 
>    test1.hc:14: warning: function called through a non-compatible type
> 
> and replaces the call with a fatal trap.  This is legal, since the behaviour 
> in such cases is undefined.  However, it would be useful to the programmer if 
> the warning message mentioned that the call had been compiled as a fatal trap.

While we're at it, the same thing happens for va_arg(ap, char) or
similar, and maybe other illegal constructs. I suggest something like

Note: If this code is reached, the program will abort



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14188



More information about the Gcc-bugs mailing list