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: Avoid push_to_top_level


Giovanni Bajo wrote:

Mark Mitchell wrote:



We should make it faster, but it's even better just to avoid doing it.
It's very easy to make these kinds of mistakes; that's why we manage
to increase compile times so regularly. It would have been very hard
for you to forsee, however, that this change would cause this problem;



Yes, I apologize. I think the long term solution is just to make scope
pushing/popping faster.


There are ways that we can make it faster, but it will never be free; better just not to do it at all, if we can help it.

I'm not sure how to make these kinds of performance issues more
transparent. Anyhow, I've fixed the problem below.



Uhm. I haven't tested it, but it looks like it's not the same because now it
doesn't ignore anymore enclosing namespaces. Consider this slightly modified
testcase:


I mistakenly assumed that we diagnosed that case; I knew it was invalid, and therefore assumed it could not occur.

(I should also mention that I think that Nathan's reading, while plausible, is not what was actually intended. I've asked the EDG folks; their front end implements the rules as they were in G++ before your patch.)

In any case, we should diagnose the invalid namespace-scope declaration; that's the easiest way to fix the problem I caused.

this. Probably this is material for a small followup patch, will you handle
this or shall I?


It's my responsibility; by our current reading of the standard I've introduced a regression. However, if you are willing to fix it, I would be most grateful! Please let me know; if you don't want to do it, I will take care of it.

--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com


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