Re: [PATCH 2/3] driver: Search PATH ourselves rather than by way of PEX_SEARCH
"John Ericson" <[email protected]>
| Newsgroups | gmane.comp.gcc.patches |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Aug 10, 2026, at 3:12 AM, Andrea Pinski wrote: > On Mon, Aug 10, 2026 at 12:04 AM John Ericson <[email protected]> wrote: > > + decltype (callback (nullptr)) ret = nullptr; > > I am not a fan of this at all. Is there a better way? Like requiring > the callback function returning `const char*` or `char*`? We could change it to that, yes. But I just want to be clear that for_each_path (already landed) does the same thing: char *path = NULL; decltype (callback (nullptr, false)) ret = nullptr; // this line bool skip_multi_dir = false; I am happy to change both, but I think we should be consistent. > I Know this was not done before but can we have an explicit list of captures? > > List out the captures so it is more obvious why you need to capture by > reference here. Sure, I will add explicit capture lists to all of these in the next version of the patch series.