On Tue, 2018-06-26 at 01:44 +0200, Paolo Carlini wrote: > Hi, > > this includes straightforward tweaks to check_concept_fn and quite a > bit > of additional work on grokdeclarator: most of it is also rather > straightforward. In a few places there is the subtlety that we want > to > handle together ds_storage_class and ds_thread, whichever location > is > the smallest but != UNKNOWN_LOCATION (UNKNWON_LOCATION meaning that > the > issue is with the other one) or use the biggest location when say > ds_virtual and ds_storage_class conflict, because - I believe - we > want > to point to the place where we give up. Thus I added the > min_location > and max_location helpers.
Note that directly comparing location_t values can be problematic: (one value might be an ad-hoc location, and the other not; one might be a macro expansion, etc). You might want to use linemap_compare_locations or linemap_location_before_p for this. Hope this is helpful Dave