This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C++ PATCH to be lenient about incomplete types in exception-specifiers


On Thu, 05 Sep 2002 09:38:23 +0100, Nathan Sidwell <nathan@codesourcery.com> wrote:

> 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.

> 1) does it require them to be complete at the function definition? (it
> should)

Yes; we get an error when we try to emit the code to check the EH spec.
("points of definition....")

> 2) Checking the eh specs on every call will slow the compiler down.
> Is there a spare bit 'DECL_EH_MAY_CONTAIN_INCOMPLETE', perhaps it
> could be placed in the eh list. Then you'd only need to check when there
> had been an incomplete during construction.

Good thought.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]