GDCC
GDCC copied to clipboard
Improved compound literal handling
Currently, compound literals work by generating an object, then making a *(obj = init, &obj)
expression with it. This has several unfortunate consequences. Particularly the fact that it takes the object's address, meaning that it has to have automatic storage even if the compound literal's address is not otherwise used. It also means that it initializes an object even when it is only used for its value. The solution is, I think, to have a dedicated compound literal expression class that can defer object creation.