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] |
Hi, On 12/23/2014 07:13 PM, Jason Merrill wrote:
Ok. I think the below is closer, the only detail I want to mention is that it still checks *init_loc == UNKNOWN_LOCATION before assigning, because the location of the error doesn't change if more than one initializer is present. Likewise for the comma.On 12/23/2014 11:30 AM, Paolo Carlini wrote:if (maybe_range_for_decl) - *maybe_range_for_decl = error_mark_node; + { + *maybe_range_for_decl = error_mark_node; + if (*equal_loc == UNKNOWN_LOCATION) + tmp_equal_loc = token->location;Even though the range-for case is the only place we care about the initializer location, I'd rather set *equal_loc whenever equal_loc is non-null. We can also use the local initializer location in place of initializer_start_token->location.And let's call it init_loc rather than equal_loc.
Thanks, Paolo. ///////////////////////
Attachment:
patch_63985_5
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |