This is the mail archive of the
mailing list for the GCC project.
Re: [patch] Fix PR c++/27547: ICE on invalid operator=
Mark Mitchell wrote:
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.
I'd be happy with that too. I nearly suggested it to Volker except that (a) his
patch was already there and (b) I thought we were attempted to accept this kind
of stuff to stifle later errors about trying to use a non-existant operator=.
I'd be fine with a policy of 'no ill-formed C++ data structures'. In fact, if
we don't already have one, then I'm proposing it.
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery
firstname.lastname@example.org :: http://www.planetfall.pwp.blueyonder.co.uk