From: Kamil Iskra <kamil@dwd.interkom.pl>
To: Carlo Wood <carlo@runaway.xs4all.nl>
Cc: egcs@cygnus.com
Subject: Re: suggest parentheses around assignment used as truth value
Date: Fri, 03 Jul 1998 14:48:00 -0000 [thread overview]
Message-ID: <Pine.LNX.3.96.980703210029.826B-100000@jinks.home> (raw)
In-Reply-To: <199807011250.OAA00754@jolan.ppro>
On Wed, 1 Jul 1998, Carlo Wood wrote:
> It is a very common mistake to type '=' where '==' was intended.
> Using extra parentheses is a very logical way to make the code
> more clear in what you mean. Not only for the author itself,
> but also for others that read the code later and wonder if this
> is a typo/bug, or if it was intended (something not always clear
> from the context).
>
> My personal opinion is that this warning is so useful that I'd
> even object to move it to -pedantic warnings.
I don't think that's a good idea. -pedantic serves completely different
pupose:
@item -pedantic
Issue all the warnings demanded by strict ANSI standard C; reject
all programs that use forbidden extensions.
AFAIK, ANSI doesn't require any diagnostic in this case.
/ Kamil Iskra AmigaOS Linux/i386 Linux/m68k \
| GeekGadgets GCC maintainer UNIX system administrator |
| iskra@student.uci.agh.edu.pl kiskra@ernie.icslab.agh.edu.pl |
\ kamil@dwd.interkom.pl http://student.uci.agh.edu.pl/~iskra /
next prev parent reply other threads:[~1998-07-03 14:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-06-30 19:49 Marc Rouaix
1998-07-01 2:51 ` Andreas Schwab
1998-07-01 9:20 ` Richard Earnshaw
1998-07-01 21:20 ` Bill Currie
1998-07-02 7:08 ` Richard Earnshaw
1998-07-03 3:31 ` Nathan Sidwell
1998-07-03 6:15 ` Richard Earnshaw
1998-07-01 3:42 ` Branko Cibej
1998-07-02 7:08 ` Carlo Wood
1998-07-03 14:48 ` Kamil Iskra [this message]
1998-07-01 4:00 Brad M. Garcia
1998-07-01 20:20 ` Tim Hollebeek
1998-07-02 1:39 ` Harvey J. Stein
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.3.96.980703210029.826B-100000@jinks.home \
--to=kamil@dwd.interkom.pl \
--cc=carlo@runaway.xs4all.nl \
--cc=egcs@cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).