This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] detect incompatible aliases (PR c/81854)
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Martin Sebor <msebor at gmail dot com>
- Cc: Gcc Patch List <gcc-patches at gcc dot gnu dot org>, Jonathan Wakely <jwakely at redhat dot com>, libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Tue, 12 Sep 2017 16:17:29 +0000
- Subject: Re: [PATCH] detect incompatible aliases (PR c/81854)
- Authentication-results: sourceware.org; auth=none
- References: <b8534b3c-9ffd-5a1c-d5e7-536548c9b742@gmail.com>
On Thu, 17 Aug 2017, Martin Sebor wrote:
> + || (prototype_p (t1)
> + && prototype_p (t2)
> + && !types_compatible_p (t1, t2))))
Why the restriction to prototyped types? I'd expect a warning for an
alias between unprototyped functions of types int () and void (), for
example. Or for an alias between void () and void (char), as a function
with a char argument is not compatible with a non-prototype function in C.
Is this an issue with the problem being diagnosed at a point where the
langhooks for language-specific type compatibility rules aren't available?
If that's preventing diagnosing incompatibility involving unprototyped
functions, then the patch is OK.
--
Joseph S. Myers
joseph@codesourcery.com