[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
any g++ compilation warning to detect empty if statement
From: |
eric |
Subject: |
any g++ compilation warning to detect empty if statement |
Date: |
Thu, 16 Aug 2007 12:54:25 -0000 |
User-agent: |
G2/1.0 |
Hi all,
recently encounter following bugs:
if (a > b); //<- bug in the careless ";" here
return 0;
Due to the extra ";" in the if statement line, it always return 0.
Anyone know g++ has any compiler - warning flag to detect this kind of
error? if not, is it any source code checking tools can do it ?
thanks,
Eric.
- any g++ compilation warning to detect empty if statement,
eric <=