This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Q.: inconsistent (?) warnings about functions called through non-compatible types
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Godmar Back <godmar at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 29 Mar 2015 21:26:06 +0200
- Subject: Re: Q.: inconsistent (?) warnings about functions called through non-compatible types
- Authentication-results: sourceware.org; auth=none
- References: <CAB4+JY+wKi2YniOOJLydB_Q6QHSE4f9i7x-Ld+dO6X0V9hApHg at mail dot gmail dot com>
Godmar Back <godmar@gmail.com> writes:
> ps: I would like to see the warning, of course, since casting a bool
> returning function to an int returning function is undefined behavior.
The cast itself is ok, the undefined behavior only occurs when calling
it without casting back.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."