This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
suggest parentheses around assignment used as truth value
- To: egcs at cygnus dot com
- Subject: suggest parentheses around assignment used as truth value
- From: "Marc Rouaix" <rouaix at my-dejanews dot com>
- Date: Tue, 30 Jun 1998 19:19:49 -0700
- Organization: Deja News Mail (http://www.my-dejanews.com:80)
I'd just like to register my opiniont that code like
if (x = p()) {...}
shouldn't generate a warning under gcc -Wall. Even if
you feel that code like this is obscure, the recommended
if ((x = p())) {...}
is just bizarre.
---
Marc
-----== Sent via Deja News, The Discussion Network ==-----
http://www.dejanews.com/ Easy access to 50,000+ discussion forums