This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: RFC: Walways-true considered harmful
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'Dave Korn'" <dave dot korn at artimi dot com>, "'Rask Ingemann Lambertsen'" <rask at sygehus dot dk>, 'Manuel López-Ibáñez' <lopezibanez at gmail dot com>
- Cc: "'gcc'" <gcc at gcc dot gnu dot org>
- Date: Sat, 13 Jan 2007 14:01:46 -0000
- Subject: RE: RFC: Walways-true considered harmful
On 13 January 2007 14:00, Dave Korn wrote:
> On 13 January 2007 12:55, Rask Ingemann Lambertsen wrote:
>
>>
>> if (func)
>> {
>> ...
>> }
>>
>> it'll be bad to warn about
>>
>> if (timerstruct->callbackfunc)
>> {
>> ...
>> timerstruct->callbackfunc (...);
>> ...
>> }
>>
>
> And equally bad to warn about
>
>> if (func)
>> {
>> ...
> func (...);
>> ...
>> }
Nope, hang on.. that first 'func' is an explicit function name, the second
two cases are meant to be variables... I don't see why it should be any
problem to only warn for explicit function names.
cheers,
DaveK
--
Can't think of a witty .sigline today....