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] PR 54191


On 08/27/2012 08:04 PM, Jason Merrill wrote:
On 08/27/2012 01:36 PM, Paolo Carlini wrote:
Thanks for the feedback. Indeed, as I tried to explain in an older
message, that was also my understanding. The practical difficulty with
the mapping (which you can also guess from the current structure of
get_delta_difference_1, the if (kind == bk_inaccessible || kind ==
bk_ambig) check) is that ba_quiet, as used by lookup_base, doesn't just
control the error calls - like normally tf_error does - it *also*
changes the return value, error_mark_node or NULL_TREE. I'm still not
sure about the correct (and concise! see get_delta_difference_1, again)
way to handle this...

I think the right way is to adjust the callers to handle error_mark_node return properly. Macros may need to become functions.
Ah, ok. I guess the prospect of touching those macros was somehow psychologically "blocking" me., eh ;) But actually, all in all, the code doesn't become more complex, because only the cases where we are now passing tf_none require checking for error_mark_node too where we were simply checking != NULL_TREE as return value of lookup_base and most of the calls are otherwise already Ok, or even become simpler, where we were, on a case by case basis, tweaking to | ba_quiet basing on complain (note: I left DERIVED_FROM_P alone, because we weren't passing ba_quiet to it)

The below passes testing on x86_64-linux.

Thanks!
Paolo.

//////////////////////////

Attachment: patch_54191_2
Description: Text document


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