Hello, > > Depends what the type is. If it's an array type, then there's no > > simple equivalent expression. > > using CONSTRUCTOR node? > > What I mean by "simple" is something that's easy to derive. Suppose I have > a record with numerous fields of various sizes and I unchecked convert a > constant to it. Yes, I could write code to convert that into a CONSTRUCTOR > by figuring out what value should be assigned to each field, but that's a > pretty large block of code for a pretty marginal case.
however, avoiding possibly a large amount of bugs in code that does not expect this corner case. I would certainly consider it much cleaner solution than adding hacks to for_each_index and possibly other places that do not expect something as weird. That being said, I think your patch is safe and will not break any of the uses of for_each_index. Zdenek