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: [patch] Fix PR c++/27547: ICE on invalid operator=


Nathan Sidwell wrote:
> Volker Reichelt wrote:
>> On 11 May, Nathan Sidwell wrote:
>>
>>> Volker Reichelt wrote:
>>>
>>>
>>>> 2006-05-11  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
>>>>
>>>>     PR c++/27547
>>>>     * decl.c (copy_fn_p): Return early on non-member functions.
>>>
>>> ok.  please add a comment explaining why we might get there with a
>>> non-member.

I'm not proposing that we undo this change (it does no harm, certainly)
but I would have preferred that -- if possible -- we just drop the
invalid operator=.

It's very hard to make the front-end robust if we must constantly
account for the possible presence of things that make no sense; it
requires that, as people knowledgeable about what constitutes valid C++,
we constantly think about the possibly that we've got invalid C++
around.  IMO, we would be better off just issuing an error about this
invalid non-member operator, and dropping it on the floor.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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