Re: [RFA 05/13] Remove directive-searched cleanups

Tom Tromey
2017-11-03T16:42:10Z

>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:

>> if (*excludep)
>> - {
>> - discard_cleanups (searched_cleanup);
>> - continue;
>> - }
>> + continue;

Simon> In this case, the cleanup is discarded. Shouldn't the same thing
Simon> happen with the scoped_restore? Or was it an error in the original
Simon> code, and we always want to reset searched?

Simon> There's the same case in d-namespace.c.

I'm afraid I hadn't noticed this. Ouch.

However, I think it has to be a latent bug, because it will result in
the using_direct's searched flag being permanently set -- nothing else
will ever clear it.

Tom