Project

General

Profile

Bug #468

Variables Declared After Executable Statement

Added by Kyle Beauchamp over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Erik Lindahl
Category:
mdrun
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

In mdlib/force.c, a recent patch introduced new variables after an executable statement. This prevents C-style compiling. Trivially fixed by rearranging two lines.

gmx_enerdata_t ed_lam;
double lam_i;
real dvdl_dum;
set_pbc(&pbc,fr->ePBC,box);
#ifdef GMX_MPI
double t0=0.0,t1,t2,t3; /* time measurement for coarse load balancing */
#endif

Leads to error (in ICC+MSVS)

src\mdlib\force.c(155): error: declaration may not appear after executable statement in block
3> double t0=0.0,t1,t2,t3; /* time measurement for coarse load balancing */
3> ^

History

#1 Updated by David van der Spoel over 9 years ago

Fixed, thanks for reporting.

Also available in: Atom PDF