This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/14188] Suggestion: improve warning message for call through incompatible type
- From: "falk dot hueffner at student dot uni-tuebingen dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Feb 2004 11:11:24 -0000
- Subject: [Bug c/14188] Suggestion: improve warning message for call through incompatible type
- References: <20040218100631.14188.simonmar@microsoft.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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