From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-la0-f42.google.com ([209.85.215.42]) by pp; Tue Mar 10 11:53:56 EDT 2015 Received: by lams18 with SMTP id s18so2729674lam.2 for <9front@9front.org>; Tue, 10 Mar 2015 08:53:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=YFu4He1bcsNkHNIG6wqCaa/m2U6xV5aWwkvO5q+pkbg=; b=P4Y3fNVxbuIzTCk20h1EqyNYKNJ/idGKlvi8Aa0S7m0F/tSk2ybXJfZmKXCp9THeur Ydw2WOflPhT6lfxRHHeL5W1w9zQAEA2s3A7HflVy8FvcDTfM24WrnIb6IGx+m6b/OcWS c/lQDZhgVUAwCmULLmhwxdZq9s1WJRyrG86qzxAbMdgIh1sb25KQbI/BDX0l4yx1W6Ja MklPu6aAhz3kI6jnKtqN5l7kkBPs+0eFboUwfVwolAWMwtCxRVzBfAMX4B/LV+xdKbvt wfo1+aa0cAoz3O7+7VxBWK1qZCT6h3BC7Aycgk6NGTIkIpAQm/vZTz7EnYGTp+DgQaOX 9X+Q== X-Gm-Message-State: ALoCoQkzhRuycY6t499wahkwvGfAzrCkvrNz2h7Dh/G7W3jJHb/KE5Z6ia6+6VTpL5m/mhjdwyMk MIME-Version: 1.0 X-Received: by 10.152.183.165 with SMTP id en5mr31837805lac.0.1426002829849; Tue, 10 Mar 2015 08:53:49 -0700 (PDT) Received: by 10.114.172.49 with HTTP; Tue, 10 Mar 2015 08:53:49 -0700 (PDT) Date: Tue, 10 Mar 2015 16:53:49 +0100 Message-ID: List-ID: <9front.9front.org> X-Glyph: ➈ X-Bullshit: basic content-addressed property full-stack manager Subject: 2c(2) error From: Giacomo Tesio To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>, 9front@9front.org Content-Type: multipart/mixed; boundary=001a1134573c1fb0910510f128e2 --001a1134573c1fb0910510f128e2 Content-Type: multipart/alternative; boundary=001a1134573c1fb08c0510f128e0 --001a1134573c1fb08c0510f128e0 Content-Type: text/plain; charset=UTF-8 2c(2) states: Array initializers can specify the indices of the array in > square brackets, as > int a[] = { [3] 1, [10] 5 }; > which initializes the third and tenth elements of the > eleven-element array a. This is somewhat confusing: the third and the tenth element should have index 2 and 9. Moreover if the tenth element is actually referred by index 10, why the array should hold eleven elements? A simple check shows that actually the array has 11 elements and the one initialized are the forth and the eleventh. Giacomo --001a1134573c1fb08c0510f128e0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
2c(2) states:

Array initiali= zers can specify the indices of the array in
=C2=A0 square brackets, as<= br>=C2=A0 =C2=A0 =C2=A0 int a[] =3D { [3] 1, [10] 5 };
=C2=A0 which init= ializes the third and tenth elements of the
=C2=A0 eleven-element array = a.

This is somewhat confusing: the third an= d the tenth element should have index 2 and 9. Moreover if the tenth elemen= t is actually referred by index 10, why the array should hold eleven elemen= ts?

A simple check shows that actually= the array has 11 elements and the one initialized are the forth and the el= eventh.


Giacomo
--001a1134573c1fb08c0510f128e0-- --001a1134573c1fb0910510f128e2 Content-Type: text/plain; charset=US-ASCII; name="man.2c.diff" Content-Disposition: attachment; filename="man.2c.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_i73h8hqp0 ZGlmZiAtciA1MTI4NWFlNGY1NDUgc3lzL21hbi8xLzJjCi0tLSBhL3N5cy9tYW4vMS8yYwlUaHUg TWFyIDA1IDEwOjE3OjIzIDIwMTUgKzAxMDAKKysrIGIvc3lzL21hbi8xLzJjCVR1ZSBNYXIgMTAg MTY6NTI6MDMgMjAxNSArMDEwMApAQCAtMjUwLDcgKzI1MCw3IEBACiAuRVgKICAgICBpbnQgYVtd ID0geyBbM10gMSwgWzEwXSA1IH07CiAuRUUKLXdoaWNoIGluaXRpYWxpemVzIHRoZSB0aGlyZCBh bmQgdGVudGggZWxlbWVudHMgb2YgdGhlIGVsZXZlbi1lbGVtZW50IGFycmF5Cit3aGljaCBpbml0 aWFsaXplcyB0aGUgZm9ydGggYW5kIGVsZXZlbnRoIGVsZW1lbnRzIG9mIHRoZSBlbGV2ZW4tZWxl bWVudCBhcnJheQogLkJSIGEgLgogLlRQCiBcLQo= --001a1134573c1fb0910510f128e2--