On 11/15/19 7:28 AM, Jakub Jelinek wrote:
+  loc = LOCATION_LOCUS (loc);
...
+  entry.loc
+    = linemap_resolve_location (line_table, loc, LRK_MACRO_EXPANSION_POINT,
+                               &map);

You don't need LOCATION_LOCUS if you're calling linemap_resolve_location. LGTM with that change and David's.

I know David and Jonathan had comments on the patch and can try to
incorporate them, but more importantly I'd like to ask whether we want to
add this at all or wait till GCC 11 and add something else.
Yet another option would be make it clear that the builtin is a temporary
thing until we implement something different and then would be removed,
say by reporting error if the builtin is used anywhere but in default
argument of std::source_location::current or something similar; I mean if
the ABI is sound, but we might have __builtin_constexpr_force_static or
whatever else or some new expression form one day and replace the builtin
uses with that.

I don't think we need to worry about enforcement; we say in general that C++20 support is experimental, and we don't try to maintain compatibility; even more so for internal details like this.

Jason

Reply via email to