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 2/2] Better system header location detection for built-in macro tokens


On 06/03/2012 05:27 AM, Jason Merrill wrote:
On 06/02/2012 12:40 PM, Paolo Carlini wrote:
That said, the tricks we are playing with the global input_location vs the loc we are passing around still confuse me quite a lot. Actually any *assignment* to input_location makes me a bit more nervous than I was already ;) Do you have any idea whether just passing down to build_x_modify_expr a different value for loc instead of assigning to input_location would also work for you? Maybe together with more throughly forwarding the loc from build_x_modify_expr itself to the build_min* functions (ie the project I mentioned above)??

We already pass to build_x_modify_expr the location that he is assigning to input_location. I would guess that the issue in this case is with the "in_system_header" macro, which uses input_location.


I think the input_location hack here is OK until we improve our use of explicit locations to make it unnecessary.
Good.

In any case, as far as I can see, the assignment Dodji is adding just before calling build_x_modify_expr doesn't change anything for "my" issue, which actually has to do with build_x_binary_op: if I apply to below, thus passing an actual loc to build_min_non_dep_loc, there is a diagnostic regression for the locations of libstdc++-v3/testsuite/20_util/bind_ref_neg.cc. If you see something obviously wrong somewhere, just let me know...

Paolo.

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

Attachment: p
Description: Text document


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