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/14188] Suggestion: improve warning message for call through incompatible type


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


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