This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH to be lenient about incomplete types in exception-specifiers
- From: Gerald Pfeifer <pfeifer at dbai dot tuwien dot ac dot at>
- To: Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 11 Sep 2002 09:52:30 +0200 (CEST)
- Subject: Re: C++ PATCH to be lenient about incomplete types in exception-specifiers
On Thu, 5 Sep 2002, Jason Merrill wrote:
> This patch reduces the error for an incomplete type in an
> exception-specifier to a pedwarn, and adds an error for calling a function
> with such a spec. C++ only requires argument types to be complete at the
> points of definition and call; the same seems appropriate for EH specs.
>
> The Intel compiler apparently also provides this extension.
>
> Tests in g++.dg/eh/spec[56].C.
>
> 2002-09-01 Jason Merrill <jason@redhat.com>
>
> * typeck2.c (add_exception_specifier): Only pedwarn for an
> incomplete type.
> (require_complete_eh_spec_types): New fn.
> (cxx_incomplete_type_diagnostic): Also support pedwarning.
> * typeck.c (complete_type_or_diagnostic): Likewise.
> * call.c (build_call): Call require_complete_eh_spec_types.
> * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
> on an incomplete type.
Hi Jason,
if this is an extension, shouldn't it be documented as such somewhere?
(I hope I haven't missed anything here?)
Gerald
--
Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/