This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Fix false ARI messages
- From: 'Daniel Jacobowitz' <drow at false dot org>
- To: Pierre Muller <muller at ics dot u-strasbg dot fr>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 13 Feb 2009 13:58:00 -0500
- Subject: Re: [RFC] Fix false ARI messages
- References: <005601c98df5$17ecf940$47c6ebc0$@u-strasbg.fr>
On Fri, Feb 13, 2009 at 05:06:56PM +0100, Pierre Muller wrote:
> I also found out that many
> "if assignment" warnings were due to
> macros containing complete if () then {} else {}
> code.
>
> #define YY_INPUT(BUF, RESULT, MAX_SIZE) \
> if ( *lexptr == '\000' ) \
> (RESULT) = YY_NULL; \
> else \
> { \
> *(BUF) = *lexptr; \
> (RESULT) = 1; \
> lexptr += 1; \
> }
> The proposed change might miss some
> real errors like
>
> if (((test == NULL)|| (test1 == NULL)) && (test2 = NULL)) {
How many are due to this sort of construct? I picked a few others,
and they looked like either real bugs or else deliberate usage
(with the double parentheses that GCC mandates to avoid a warning).
If it's mostly in .l files, then we can use fix() instead.
--
Daniel Jacobowitz
CodeSourcery