From -2085321781523762892
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,13ce76b24fcf616c
X-Google-Attributes: gidf78e5,public
From: Pieter van Beek <vanbeek@kobasoft.nl>
Subject: Re: Operator precedence
Date: 1999/12/29
Message-ID: <386926F0.7AA1C2AA@kobasoft.nl>#1/1
X-Deja-AN: 565937920
X-NNTP-Posting-Host: node1527a.a2000.nl
Content-Transfer-Encoding: 7bit
Approved: stephen.clamage@sun.com (comp.std.c++)
References: <3868B1A1.D47627B4@kobasoft.nl> <3868DE6D.5C90C109@sensor.com>
To: Ron Natalie <ron@sensor.com>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: abuse@a2000.nl
X-Trace: weber.a2000.nl 946415085 2299 24.132.82.122 (28 Dec 1999 21:04:45 GMT)
Organization: Kobayashi Software
Mime-Version: 1.0
NNTP-Posting-Date: 28 Dec 1999 21:04:45 GMT
Newsgroups: comp.std.c++
Originator: clamage@taumet


Ron Natalie wrote:

> Pieter van Beek wrote:
> >
> > Hi all,
> >
> > There seems to be no operator precedence table in de ansi C++ standard.
> > I always used the one from Stroustrup, and only found out yesterday this
> > topic is not covered by the standard.
> >
> > AIMS?
> >
>
> Precedence is not defined by that table, even in C, it is implied by
> the language grammar.  The inclusion of the table in K&R and Stroustrup
> is purely informational.  Note the comment from Stroustrup at the bottom
> of page 121:
>         A few grammar rules cannot be expressed in terms of precedence
>         (also known as binding strength) and associativity.
>
> This has lead to some confusion with the ?: operator interpretation.

If this is so, then how know, from the standard, how for example
*array_of_arrays[3] will be interpreted? Or *foo->bar() ?

Pieter

--
KOBAYASHI SOFTWARE
Tel. +31 20 4165015
Rich text (HTML) e-mail is preferred
PGP Key ID:  0x823C9CEC
Fingerprint: CE4E E2D5 C18C 45AD 2DBD  08E5 BACA 342F 823C 9CEC




[ 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              ]




