RE: warning on assignment within conditional

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi John,

> We're using iwmmxt_le-g++ (GCC) 3.3.1 (MontaVista 3.3.1-7.0.2.0401382 2004-10-07) ...

Ahh, C++.

> But it doesn't produce a warning on this line
>        if (bFoundFile = false) {
> which is the actual code line that prompted my question.

In C++, a bool is a truth value.  If bFoundFile is a bool, then that constitutes a truth value.  So it would not result in a warning.

HTH,
--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux