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] Set expr loc safely (PR c++/58516)


Hi,

On 9/24/13 11:35 AM, Marek Polacek wrote:
I admit I haven't spent much time on this, but it seems we should just
check whether we can set the expr location before actually setting it...

Regtested/bootstrapped on x86_64-linux, ok for trunk?
Two minor nits (assuming the general idea makes sense, first blush it does).

First, solicited by the ChangeLog entry too and given that non-null expression trees can always have locations, I wonder if we shouldn't check EXPR_P instead, it seems more direct, unless we really fear that body could be NULL_TREE. I would also phrase in a negative form the comment before the check, like "This may not be true when..."

Second, I'm pretty sure about this one, I think we are standardizing on c++11 for testcases, by now c++0x is essentially legacy.

Paolo.


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