Although nothing wrong with the implementation apart from it complicates a bit the understanding of conventional C parse flow by adding extra corner case, I don't see anything in the spec that states explicitly how the vector components should be parsed. I guess with extra parenthesis the parsing problem can easily be avoided:
((int3)(32, 32, 32)).x
I would prefer to simply the test and avoid using macros... it will be easier for us to maintain it in the future.
Ok. But in current implementation if I forget to parenthesize the defined expression (as in the test) I will get the following message: "error: member reference base type 'int' is not a structure or union". I don't think that the message is clear to understand that you just forgot to add parenthesis.
So, should we change the diagnostic message to do it more understandable or push this patch because it can be more convenience for users?
I don't think that diagnostics can always be very clear. This is not the case neither for C nor C++.
As I said I don't see any issue to continue with this patch. I would just like to see the test simplified a bit.