The surrounded can be bigger than the actual array (for example a whole file).
Thanks Tzachi > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Hal Rosenstock > Sent: Thursday, June 12, 2008 2:43 PM > To: Leonid Keller > Cc: [EMAIL PROTECTED]; Sasha Khapyorsky; Vincent > Ficet; [email protected] > Subject: RE: [ofw] Re: [ofa-general] Issues with _osm_lin_fwd_tbl > > On Thu, 2008-06-12 at 13:50 +0300, Leonid Keller wrote: > > One can use zero-sized arrays as a structure member, having > disabled > > the warning 4200. > > Here is a real example from hw\mlx4\kernel\bus\core\cache.c: > > > > #pragma warning( disable : 4200) > > struct ib_pkey_cache { > > int table_len; > > __be16 table[0]; > > }; > > #pragma warning( default : 4200) > > So to use this with Windows, any zero size array needs to be > surrounded by the pragma pair ? > > -- Hal > > > > -----Original Message----- > > > From: [EMAIL PROTECTED] > > > [mailto:[EMAIL PROTECTED] On Behalf Of Hal > > > Rosenstock > > > Sent: Thursday, June 12, 2008 1:17 PM > > > To: Sasha Khapyorsky > > > Cc: [EMAIL PROTECTED]; Vincent Ficet; > > > [email protected] > > > Subject: [ofw] Re: [ofa-general] Issues with _osm_lin_fwd_tbl > > > > > > On Thu, 2008-06-12 at 13:00 +0300, Sasha Khapyorsky wrote: > > > > On 16:51 Wed 11 Jun , Vincent Ficet wrote: > > > > > > > > > > Also, could anyone explain why the osm_lin_fwd_tbl_t is > > > declared as > > > > > follows: > > > > > > > > > > typedef struct _osm_lin_fwd_tbl { > > > > > uint16_t size; > > > > > uint8_t port_tbl[1]; > > > > > } osm_lin_fwd_tbl_t; > > > > > > > > AFAIR the reason is a poor windows compiler which > doesn't support > > > > array[0] like definitions in structures. > > > > > > Yes, I too recall something being said along those lines quite a > > > while ago. > > > > > > Is this accurate ? If so, is this still a restriction of > the Windows > > > compilers in use (as I think the build environment and > perhaps the > > > compilers have changed quite a bit since > > > then) ? Can someone knowledgeable in Windows comment on this ? > > > > > > -- Hal > > > > > > > Sasha > > > > _______________________________________________ > > > > general mailing list > > > > [email protected] > > > > http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general > > > > > > > > To unsubscribe, please visit > > > > http://openib.org/mailman/listinfo/openib-general > > > > > > _______________________________________________ > > > ofw mailing list > > > [EMAIL PROTECTED] > > > http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw > > > > > _______________________________________________ > ofw mailing list > [EMAIL PROTECTED] > http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw > -- Tzachi Dar Mellanox Technologies LTD. SW- Windows Phone: +972 (4) 909 7200 (ext 271) Mobile: +972 (57) 741 1269 E-mail: [EMAIL PROTECTED] ---------------------------------------------------------------------- Emails belong on computers, trees belong in forests; if you must print this, do it on recycled paper. http://www.greenpeace.org/international/ ---------------------------------------------------------------------- Disclaimer added by CodeTwo Exchange Rules http://www.codetwo.com _______________________________________________ general mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
