Topic: Typos in the Standard


Author: Eric Lemings <eric.b.lemings@lmco.com>
Date: 1998/09/30
Raw View
Dear readers:

So where's the list of typos in the ANSI distributed
version of ISO/IEC 14882:1998(E), otherwise known
as Standard C++?

Can anyone confirm that at the top of page 675, that
the for statement is missing a semicolon in the
iteration-statement rule?

Thanks,
Eric.



[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]






Author: Ron Natalie <ron@sensor.com>
Date: 1998/09/30
Raw View
Eric Lemings wrote:
>
> Dear readers:
>
> So where's the list of typos in the ANSI distributed
> version of ISO/IEC 14882:1998(E), otherwise known
> as Standard C++?
>
> Can anyone confirm that at the top of page 675, that
> the for statement is missing a semicolon in the
> iteration-statement rule?
>

What missing semicolon?  I think this is OK.  Are you
referring to the "for" definition.  That one made me
do a doubletake the first time I saw it in the draft.
However note that the "for-init-statement" already
embodies a semicolon.  In C it's for(expr; expr; expr)
but in C++ it is for(statement expr; expr).

I presume this shennanigan is to accomodated an initialized
declaration there (i.e... for(int i = 0; i < 10 ; i++)

-Ron



[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]






Author: clamage@Eng.Sun.COM (Steve Clamage)
Date: 1998/10/01
Raw View
Eric Lemings <eric.b.lemings@lmco.com> writes:

>So where's the list of typos in the ANSI distributed
>version of ISO/IEC 14882:1998(E), otherwise known
>as Standard C++?

The newsgroup FAQ was updated yesterday to cover this sort
of question. The procedures for submitting Defect Reports
(which include reports of errors as well as requests for
clarification) have not yet been established. When they
are, there will probably be a web site devoted to reported
problems and questions.

>Can anyone confirm that at the top of page 675, that
>the for statement is missing a semicolon in the
>iteration-statement rule?

Nope, it's correct. A for-init-statement is an expression-statement
or a simple-declaration. Follow the productions for expression-
statement and simple-declaration, and notice that every production
already ends with a semicolon.

--
Steve Clamage, stephen.clamage@sun.com
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]





Author: scc@netscape.com (Scott Collins)
Date: 1998/10/01
Raw View
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

  >Can anyone confirm that at the top of page 675, that
  >the for statement is missing a semicolon in the
  >iteration-statement rule?

The semicolon is there.  It's just hidden in the definition of
|for-init-statement|.  A |for-init-statement| is a
|expression-statement| is a |expression_opt ;|, i.e., an optional
expression followed by a semicolon.
______________________________________________________________________
Scott Collins              <http://www.meer.net/ScottCollins?Netscape>





-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.0 for non-commercial use <http://www.pgp.com>
Comment: get my key at <http://www.meer.net/ScottCollins/#key>

iQA/AwUBNhK3uPGmojMuVn+fEQJaxgCgixDrIJGg7ExlcqZqRvZWkzLwmCEAoPn1
Iekr3GgDtIt6qucKIzLcC48J
=+6k8
-----END PGP SIGNATURE-----
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]