On 9/23/24 7:45 PM, Nathaniel Shead wrote:
I feel like there should be a way to make use of LAMBDA_TYPE_EXTRA_SCOPE to
avoid the need for the new TYPE_DEFINED_IN_INITIALIZER_P flag, perhaps once
something like my patch here[1] is accepted (but with further embellishments
for concepts, probably), but I wasn't able to work it out. Since currently as
far as I'm aware only lambdas can satisfy being a type with no name defined in
an 'initializer' this does seem a little overkill but I've applied it to all
class types just in case.

[1]: https://gcc.gnu.org/pipermail/gcc-patches/2024-September/662393.html

It's definitely overkill, since a defining-type-specifier can't appear in an expression. I'm reluctant to allocate a bit on all types to such an obscure use.

I agree that LAMBDA_TYPE_EXTRA_SCOPE should do the trick; a lambda is TU-local if it has no mangling scope. I'd prefer to pursue fixing holes in LAMBDA_TYPE_EXTRA_SCOPE as needed to make it work, starting with the patch above.

Maybe be permissive for lambdas for this patch, and fix them up later?

-  /* Determine Strongy Connected Components.  */
+  /* Determine Strongy Connected Components.  This will also strip any

While we're touching this, "Strongly".

Jason

Reply via email to