[cfe-dev] struct initialization with open brace placed in a newline

Kostas Sotiropoulos via cfe-dev cfe-dev at lists.llvm.org
Tue Apr 21 05:28:01 PDT 2020


Hi,
I would like to ask if it is possible when initializing a C struct to have open brace "{" placed in a newline.For example if we have the following struct:
struct point{int x;int y;}
and we want to initialize it, can we have this:
struct point A = {  .x = 2;  .y = 3;}
and not this one:
struct point A = {  .x = 2;  .y = 3;}
Best regards,Kostas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200421/a325558a/attachment.html>


More information about the cfe-dev mailing list