Re: what is this [0 ... n] array notation?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 16 Jan 2007, Mike Frysinger wrote:

> On 1/16/07, Robert P. J. Day <rpjday@xxxxxxxxxxxxxx> wrote:
> > drivers/scsi/ipr.c:
> >         const u8 zero_sn[IPR_SERIAL_NUM_LEN] = { [0 ...
> > IPR_SERIAL_NUM_LEN-1] = '0' };
> >
> > where does this "..." range syntax come from?  i know gcc supports the
> > *case* range extension, but i don't know where the above *arrray*
> > range syntax comes from.
>
> just like it looks ... instead of writing '0' IPR_SERIAL_NUM_LEN
> times, gcc will fill it for you

sorry, i wasn't clear.  i wanted to know where that syntax is
*defined*.  i don't see it in my C99 spec, and it's not listed as a
gcc extension.  so where did it come from?

rday

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux