On 2019-08-16 15:40, Vitaly Cheptsov via Groups.Io wrote: > I missed your message while writing mine, but I am afraid I disagree > with the functional macro usage for this feature. > > I explicitly quoted C standard static_assert definition in one of my > previous messages, and I want EDK II to be as close to standard C as > possible. >
Choosing a random message in this thread to comment. We could also migrate the existing uses of __STATIC_ASSERT in BaseTools to the new STATIC_ASSERT: BaseTools/Source/C/Common/PcdValueCommon.h:22:#define __STATIC_ASSERT static_assert BaseTools/Source/C/Common/PcdValueCommon.h:24:#define __STATIC_ASSERT _Static_assert Binary file BaseTools/Source/Python/Workspace/DscBuildData.pyc matches BaseTools/Source/Python/Workspace/DscBuildData.py:2037: CApp = CApp + '__STATIC_ASSERT(sizeof(%s_%s_INIT_Value) < %d * sizeof(%s), "Pcd %s.%s Value in Dec exceed the array capability %s"); // From %s Line %s \n ' % (Pcd.TokenSpaceGuidCName, Pcd.TokenCName,pcdarraysize,Pcd.BaseDatumType,Pcd.TokenSpaceGuidCName, Pcd.TokenCName,Pcd.DatumType,Pcd.DefaultValueFromDecInfo[0],Pcd.DefaultValueFromDecInfo[1]) BaseTools/Source/Python/Workspace/DscBuildData.py:2042: CApp = CApp + '__STATIC_ASSERT(%d < %d * sizeof(%s), "Pcd %s.%s Value in Dec exceed the array capability %s"); // From %s Line %s \n' % (ValueSize,pcdarraysize,Pcd.BaseDatumType,Pcd.TokenSpaceGuidCName, Pcd.TokenCName,Pcd.DatumType,Pcd.DefaultValueFromDecInfo[0],Pcd.DefaultValueFromDecInfo[1]) .... -- Rebecca Cran -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#45865): https://edk2.groups.io/g/devel/message/45865 Mute This Topic: https://groups.io/mt/32850582/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-