|
From: Jeremy F. <je...@go...> - 2003-03-26 23:59:24
|
The MMX code has the following in vg_to_ucode.c:
} else {
pair = disAMode ( cb, sorb, eip, dis?dis_buf:NULL );
Int tmpa = LOW24(pair);
eip += HI8(pair);
This isn't C, since you can't declare a variable in the middle of a
block like that - though you can in C++.
gcc 3.2 on my RH8 box doesn't complain about this, but gcc 2.76 in RH7.2
does.
Looks like gcc 3.2 is treating C more like C++ code - or perhaps this
became allowed in C9X.
J
|
|
From: Tom H. <th...@cy...> - 2003-03-27 00:07:14
|
In message <104...@ix...>
Jeremy Fitzhardinge <je...@go...> wrote:
> This isn't C, since you can't declare a variable in the middle of a
> block like that - though you can in C++.
You can in C99.
> gcc 3.2 on my RH8 box doesn't complain about this, but gcc 2.76 in RH7.2
> does.
Because gcc 3 understands at least some C99 extensions.
> Looks like gcc 3.2 is treating C more like C++ code - or perhaps this
> became allowed in C9X.
Exactly ;-) Of course it probably isn't wise to rely on such new
features yet.
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|
|
From: Julian S. <js...@ac...> - 2003-03-27 00:39:51
|
Oops! Now fixed. Thx. J On Thursday 27 March 2003 12:06 am, Tom Hughes wrote: > In message <104...@ix...> > > Jeremy Fitzhardinge <je...@go...> wrote: > > This isn't C, since you can't declare a variable in the middle of a > > block like that - though you can in C++. > > You can in C99. > > > gcc 3.2 on my RH8 box doesn't complain about this, but gcc 2.76 in RH7.2 > > does. > > Because gcc 3 understands at least some C99 extensions. > > > Looks like gcc 3.2 is treating C more like C++ code - or perhaps this > > became allowed in C9X. > > Exactly ;-) Of course it probably isn't wise to rely on such new > features yet. > > Tom |
|
From: Jeremy F. <je...@go...> - 2003-03-27 01:57:37
|
On Wed, 2003-03-26 at 16:48, Julian Seward wrote:
> Oops! Now fixed. Thx.
You missed the other one:
Index: coregrind/vg_to_ucode.c
===================================================================
RCS file: /cvsroot/valgrind/valgrind/coregrind/vg_to_ucode.c,v
retrieving revision 1.52
diff -u -r1.52 vg_to_ucode.c
--- coregrind/vg_to_ucode.c 27 Mar 2003 00:39:21 -0000 1.52
+++ coregrind/vg_to_ucode.c 27 Mar 2003 01:56:42 -0000
@@ -4767,8 +4767,9 @@
nameMMXReg(eregOfRM(modrm)),
nameMMXReg(gregOfRM(modrm)));
} else {
+ Int tmpa;
pair = disAMode ( cb, sorb, eip, dis?dis_buf:NULL );
- Int tmpa = LOW24(pair);
+ tmpa = LOW24(pair);
eip += HI8(pair);
uInstr2(cb, MMX2_MemRd, 8,
Lit16,
|
|
From: Julian S. <js...@ac...> - 2003-03-27 07:49:16
|
On Thursday 27 March 2003 1:57 am, Jeremy Fitzhardinge wrote: > On Wed, 2003-03-26 at 16:48, Julian Seward wrote: > > Oops! Now fixed. Thx. > > You missed the other one: Oops! Just call me Mr Pea-Brain. J |