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] More location fixes to grokdeclarator


Hi,

On 03/07/2018 18:36, Jason Merrill wrote:

    if ((type_quals & TYPE_QUAL_VOLATILE)
-      && (loc == UNKNOWN_LOCATION || locations[ds_volatile] < loc))
+      && (loc == UNKNOWN_LOCATION
+          || linemap_location_before_p (line_table,
+                                        locations[ds_volatile], loc)))
      loc = locations[ds_volatile];
    if ((type_quals & TYPE_QUAL_RESTRICT)
-      && (loc == UNKNOWN_LOCATION || locations[ds_restrict] < loc))
+      && (loc == UNKNOWN_LOCATION
+          || linemap_location_before_p (line_table,
+                                        locations[ds_restrict], loc)))
      loc = locations[ds_restrict];
Why not use min_location here?
Indeed. Thus I successfully tested the below.

Thanks,
Paolo.

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

Attachment: patch_locs_10f
Description: Text document


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