On 06/12/18 11:15, Gerd Hoffmann wrote: > Hi, > >>> + { >>> + .HorizontalResolution = 640, >>> + .VerticalResolution = 480, >>> + },{ >>> + .HorizontalResolution = 800, >>> + .VerticalResolution = 600, >>> + },{ >>> + .HorizontalResolution = 1024, >>> + .VerticalResolution = 768, >>> + } >>> +}; >> >> (10) In edk2 we cannot use designated initializers. I suggest (for >> example) assigning these values in the entry point function. > > Really? C99 is almost 20 years old now ... > Are there compilers left without C99 support which edk2 still supports?
Visual Studio has never committed to *full* C99 support, to my knowledge. I don't know whether VS happens to support designated initializers specifically; either way, we can't use them in edk2. ... After some googling, I see "signs" that VS >=2013 supports designated initializers. However, edk2 targets VS 2003, 2005, 2008, 2010, and 2012 too, before 2013. Refer to "Supported Tool Chains" in "BaseTools/Conf/tools_def.template". > >> In general, in edk2 there are two accepted indentation styles for >> function calls that extend to multiple lines: >> >> variant #1: all arguments (including the first one) on separate lines, >> with the closing paren also on a separate line: >> >> Status = StructPointer->Function ( >> Arg1, >> Arg2, >> Arg3 >> ); > > Hmm, pretty unusual, Yes, very much. I believe this indentation style might originate from Windows, but I'm not sure. > which is bad for editor auto-indent support. > Anyone knows tricks to teack emacs that style? I don't use emacs, apologies! Laszlo _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel