[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 09/19] ddb/db_run.c: move declaration of brpc into SOFTWARE_S
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 09/19] ddb/db_run.c: move declaration of brpc into SOFTWARE_SSTEP |
Date: |
Thu, 21 Nov 2013 00:02:48 +0100 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Guillem Jover, le Wed 20 Nov 2013 23:50:59 +0100, a écrit :
> On Wed, 2013-11-20 at 21:48:14 +0100, Samuel Thibault wrote:
> > Guillem Jover, le Wed 20 Nov 2013 21:09:08 +0100, a écrit :
> > > > #ifdef SOFTWARE_SSTEP
> > > > + db_addr_t brpc;
> > > > /* Account for instructions in delay slots */
> > > > brpc = next_instr_address(pc, 1, task);
> > > > if ((brpc != pc) && (inst_branch(ins) || inst_call(ins))) {
> > >
> > > This adds intermixing of statements and declarations.
> >
> > What kind of problem do you expect? C99 is almost 15 years old now.
>
> Oh, no compiler problem; sorry, I should have been explicit, I was
> thinking about this possibly not being in line with the current
> coding style.
Ah, right, we probably don't use that yet indeed. So it'd mean adding a
{} block around the code (or conditionally comment the variable
declaration at its original place, but I usually find it bad looking).
Samuel
- Re: [PATCH 05/19] ddb/db_expr.h: remove (db_addr_t *) argument name, (continued)
[PATCH 06/19] ddb: fix implicit declaration of function, Marin Ramesa, 2013/11/20
[PATCH 07/19] ddb/db_run.c: remove set but unused variable, Marin Ramesa, 2013/11/20
[PATCH 08/19] ddb/db_run.c: trivial stylistic fix for consistency, Marin Ramesa, 2013/11/20
[PATCH 09/19] ddb/db_run.c: move declaration of brpc into SOFTWARE_SSTEP, Marin Ramesa, 2013/11/20
[PATCH 10/19] ddb/db_sym.c: add parentheses around assignment used as truth value, Marin Ramesa, 2013/11/20
[PATCH 11/19] ddb/db_variables.c: fix initializations from incompatible pointer type, Marin Ramesa, 2013/11/20
[PATCH 12/19] ipc/ipc_print.h: include ipc/ipc_pset.h for ipc_pset_t, Marin Ramesa, 2013/11/20
[PATCH 13/19] kern/startup.c: fix implicit declaration of function, Marin Ramesa, 2013/11/20
[PATCH 14/19] kern/xpr.c: quiet warning about uninitialized variable, Marin Ramesa, 2013/11/20
[PATCH 15/19] device/net_io.c: quiet the warning about uninitialized variable, Marin Ramesa, 2013/11/20
[PATCH 16/19] Fix implicit declaration of function, Marin Ramesa, 2013/11/20