History

Fix C99ism in vswap()

Declare vtopl in vswap at the beginning of the function before any assignments. Doing otherwise means C99 is assumed when compiling.

Thomas Preud'homme committed 13 years ago

Commit ea583f71 parent 59e18ae1 file · +2 −1Browse files

Unified · Split

tccgen.c+2−1
@@ -458,6 +458,7 @@ static void vseti(int r, int v) · 457 unmodified lines
458458
459459 ST_FUNC void vswap(void)
460460 {
461+ unsigned long *vtopl;
461462 /* cannot let cpu flags if other instruction are generated. Also
462463 avoid leaving VT_JMP anywhere except on the top of the stack
463464 because it would complicate the code generator. */
@@ -473,7 +474,7 @@ ST_FUNC void vswap(void) · 9 unmodified lines
473474 * vswap is called often and exchanging vtop[0] vs vtop[-1] is hot on
474475 * profile, so it is hand optimized
475476 */
476− unsigned long *vtopl = (unsigned long *)vtop;
477+ vtopl = (unsigned long *) vtop;
477478 # define VSIZEL (sizeof(*vtop) / sizeof(*vtopl))
478479
479480 _STATIC_ASSERT( VSIZEL*sizeof(*vtopl) == sizeof(*vtop) );

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t