This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] Allow some function pointer conversions
- From: Jason Merrill <jason at redhat dot com>
- To: Gabriel Dos Reis <gdr at cs dot tamu dot edu>
- Cc: Mark Mitchell <mark at codesourcery dot com>, Nathan Sidwell <nathan at codesourcery dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Andreas Schwab <schwab at suse dot de>
- Date: Wed, 20 Oct 2004 16:02:05 -0400
- Subject: Re: [C++ PATCH] Allow some function pointer conversions
- References: <4176764F.5020603@codesourcery.com><41769C6A.6030203@codesourcery.com><m3mzyh2tfr.fsf@merlin.cs.tamu.edu>
On 20 Oct 2004 12:25:12 -0500, Gabriel Dos Reis <gdr@cs.tamu.edu> wrote:
> Mark Mitchell <mark@codesourcery.com> writes:
>
> | Nathan Sidwell wrote:
> |
> | I think that if we want to implement DR195, I'd be happiest if we just
> | removed the diagnostic. (Before my patch, things were inconsistent;
> | we issued a pedwarn for reinterpret_cast, but not for a C-style cast.
> | I made the two match up.) I think that we could just remove the
> | diangostic altogether to implement DR195.
> |
> | We could also turn it into a warning, which might be the most
> | conservative choice; we would still conform to TC1, but also implement
> | DR195.
>
> If we believe we really want to implement DR195, then I would
> recommend we do not remove the diagnostic, but make it a warning.
My preference would be for a warning only under -pedantic. This pattern is
supported on all of our platforms, and is in wide use. Warning about it
would just be useless noise unless people are specifically interested in
extreme portability. A hard error is unacceptable.
Jason